1 Introduction

The transformation towards more sustainable power systems concerns abating the negative impacts on the climate and biodiversity, while simultaneously providing an affordable and secure electricity supply. To achieve this, efficient use of renewable energy resources and storage is a prerequisite [1]. Power systems with larger shares of variable renewable energy resources have higher variability and uncertainty in power generation than thermal power systems, thereby increasing the need for balancing power and reserve capacity [2]. Hydropower is anticipated to be a key enabler for the green transition in many parts of the world as a provider of renewable power production and energy storage. The potential for long-term energy storage combined with the ability to rapidly adjust generation distinguishes reservoir hydropower from all other renewable energy resources [3]. In power systems with high shares of renewable energy resources, the operational flexibility of hydropower plants may therefore be imperative to the security of supply.

On the other hand, negative impacts are associated with all types of power production, including hydropower. Land use changes have had the largest relative negative impact on nature since 1970 and power production contributes substantially to this [4]. Many of the world’s watercourses are regulated for the purpose of hydropower generation, leading to interruption of natural flow conditions, fragmentation of ecosystems and changes in habitat conditions [5,6,7]. Furthermore, hydropower operations may also limit the access to water for other important functions, such as agriculture, drinking water supply, flood control, tourism or recreation, while in several cases these functions can also co-exist and benefit from each other. To mitigate the negative impacts of power generation, environmental regulations may be imposed, such as the goals for improved ecological status of freshwater ecosystems defined in the European Water Framework Directive [8].

To protect the interests of local ecosystems and communities, environmental restrictions are often imposed through concessions for hydropower plants. In the Nordic region, hydropower concessions may be revised after 30–50 years in operation. In this process, environmental constraints can be updated or added to improve the environmental conditions of the watercourse. There is considerable potential for ecological improvements in many Norwegian watercourses used for hydropower generation [9]. For hydropower plants considered to have a high ecological priority by the Norwegian regulator (NVE) [10], it is expected that stricter environmental restrictions will be imposed during the revision of the concessions. At the same time, higher shares of wind power, electrification and more cross-border transmission capacity are expected to result in higher requirements for balancing power in the Nordic power market [11]. The Norwegian transmission system operator (TSO), Statnett, has emphasised that several of the hydropower plants with a “high ecological priority" also are important contributors of flexibility services to the Nordic power system [11]. Particularly, some of these plants are essential to the security of supply in congested regions of the power system. This may lead to trade-off situations where ecological and recreational needs are weighted against the need for a flexible power supply.

It is the TSOs that are responsible for maintaining security of supply by balancing out short-term imbalances in the Nordic power market. Reserve capacity may be acquired in advance to ensure that flexible resources can be activated when required. The requirements for reserve capacity are categorised depending on response time and required duration. Reserve capacities with short activation time (fast-responding reserves) are often referred to as spinning reserves (e.g., FCR and aFRR in the Nordic and European power markets) [12]. Reserve capacities that are slower to activate, also referred to as non-spinning reserves (e.g., mFRR and RR in the Nordic and European power markets), are used to release the fast-responding reserves and may be required for a longer duration [13]. An overview of the Nordic balancing markets and the procurement procedure are presented in [14].

Hydropower can provide non-spinning and spinning reserves. The latter requires that the plants are running (i.e., to respond fast) and may therefore require a higher level of detail to be included in the scheduling models, such as unit commitment and minimum production levels. Procurement of spinning-reserve capacity has previously been considered for the Nordic power system in combination with fundamental long-term planning models in [15, 16], and in a fundamental short-term hydrothermal scheduling model in [12]. Furthermore, procurement of spinning reserve capacity has been considered in medium-term hydropower scheduling from the perspective of a producer operating as a price-taker in [17, 18] and a price-maker in [19]. Accurate representation of unit commitment introduces non-convexities into the problem as discussed in [18, 19]. Such details are therefore often linearised, like in [17, 20], which may lead to an overestimation of available reserve capacity [20] and inaccurate estimations of costs [12]. A review of methods for solving large-scale unit commitment problems with uncertainty is provided in [21], but with a focus on short-term problems. Accurate modelling of unit commitment is rarely considered in large-scale, stochastic hydropower scheduling problems for long planning horizons.

In this paper, we explore the interaction between security of electricity supply and environmental constraints on operation of hydropower plants in congested regions of power systems with high shares of wind- and hydropower generation. This is relevant for the congested Nordic power system where parts of the system may be weakly linked to the rest of the system. Traditionally, these regions rely on large, flexible hydropower plants, but in recent years several of these areas have also seen new developments in wind power. It is well established that large amounts of wind power, above 50% of the capacity, can be integrated into hydropower-dominated power systems like the Nordic power system [22, 23], while also considering limited transmission capacity [24]. Furthermore, coordinated operation of wind and hydropower has been shown to ease congestion problems [25]. Still, to the best of our knowledge, modern environmental regulations of hydropower plants combined with reserve capacity requirements have not previously been considered in the long-term operational planning of hydropower-dependent systems with wind power. Previous research that considers both reserve capacity requirements and environmental constraints on hydropower is based on short-term modelling. A weekly hydropower scheduling model for the day-ahead and spinning reserve markets that includes environmental constraints on the operation of hydropower is presented in [26]. Similarly, environmental constraints on hydropower operations are included in the short-term hydrothermal scheduling model used to assess the benefits of exchanging spinning reserve capacity in the Nordic market in [12]. Still, the implications for long-term operational planning under uncertainty have not been considered, nor has the interplay between reserve capacity requirements and environmental regulation been assessed.

We consider three types of environmental constraints on the operation of hydropower plants in this paper: (1) discharge constraints with dependencies on the water level in the reservoir (here referred to as state-dependent discharge constraints), (2) ramping restrictions on flow, and (3) minimum flow requirements. The economic impacts of environmental minimum flow requirements and ramping rates have been extensively studied in the existing literature, see e.g., [27,28,29]. These types of environmental constraints have also been shown to have a significant impact on medium-term hydropower scheduling [30, 31]. Constraints that introduce binary logic or nonconvex characteristics are often omitted or simplified in long-term operational planning under uncertainty, due to the trade-off between accuracy and computational complexity [32]. Non-convex constraints with dependencies on the water level in the reservoir can be challenging to include in long-term scheduling models that require a convex model formulation. However, such constraints have previously been demonstrated to have a considerable influence on medium-term hydropower scheduling in [33, 34]. Furthermore, linear approximations for discharge constraints with dependencies on the water level in the reservoir are suggested in [35].

The novelty of this work lies in the modelling of modern environmental constraints on hydropower operation in combination with reserve capacity requirements in a wind- and hydropower-dominated power system. A stochastic optimisation model for the long-term scheduling of a hydropower-dominated power system is used to assess the implications of environmental constraints on the security of electricity supply in a wind- and hydropower-dependent region. The system relies on flexible hydropower generation to meet the variable electricity demand and the spinning and non-spinning reserve capacity requirements. Uncertainty in inflow to the hydropower reservoirs, wind power generation and temperature-dependent electricity demand are considered in the model. To the best of our knowledge, no previous model for long-term stochastic scheduling of a hydro- and wind power system which considers both state-dependent environment constraints and reserve capacity requirements has been presented in the literature. Furthermore, limited work considers environmental constraints in combination with reserve capacity requirements. The main contributions of this work are twofold:

  1. 1.

    The formulation of a stochastic optimisation model for long-term scheduling which balance environmentally-constrained hydropower, wind power and exchange with an external power system to meet variable demand and reserve capacity requirements. Environmental constraints on hydropower discharge are modelled, including reservoir-level dependent maximum discharge, maximum ramping of discharge and minimum release.

  2. 2.

    A thorough assessment of the interplay between environmental constraints on hydropower and the system’s reserve capacity constraints in long-term operation planning. Both types of constraints limit the operational flexibility of hydropower plants. A representative Norwegian case study is presented, including a sensitivity study of certain characteristics of the hydropower system.

The rest of this article is structured as follows. The long-term scheduling model is presented in Sect. 2. The environmental constraints are described in Sect. 3, including a discussion of the flexibility implications and the mathematical formulations. The case study is described in Sect. 4, before the results are presented in Sect. 5. Finally, the paper is concluded in Sect. 6.

2 Stochastic scheduling model

We consider the long-term scheduling of a wind- and hydropower-dependent region in the Nordic power system. By regional, we mean that the model represents a limited geographical area, for example, a part of a price area in the Nordic power system with a weak transmission link to the larger power system, or a small-scale equivalent. The problem is formulated as a cost-minimizing operational problem, where electricity demand is met by wind- and hydropower plants, or import. In addition, reserve capacity requirements and environmental constraints are imposed on the system. Two large reservoir hydropower plants provide short-term operational flexibility and seasonal energy storage in the system. The optimal use of the hydropower reservoirs for energy storage is strongly dependent on the meteorological conditions (i.e., water inflow and wind) and the electricity demand. The ability to store water in the reservoirs couples the dispatch decisions in time, while the large variations in inflow, wind power generation and electricity demand on multiple time scales make the problem stochastic in nature.

The resulting stochastic and dynamic optimisation problem calls for efficient decomposition methods and is solved using stochastic dynamic programming (SDP) [36]. SDP is an established solution method for long-term hydropower scheduling problems (see e.g., [37]), that decomposes the problem into smaller stage-wise problems, here referred to as weekly decision problems. The overall aim is to optimise the operation of the reservoirs and power plants in the system to meet the electricity demand and the reserve capacity requirements at the lowest possible cost, while respecting the physical and regulatory constraints. We assume that the problem can be decomposed into weekly decision stages for a planning horizon of one year, with an intra-week time resolution of 3 h. Furthermore, we assume that the stochastic variables can be represented by a discrete Markov chain as briefly described in Sect. 2.1. The weekly decision problem is described in detail in Sect. 2.2 before an overview of the modelling framework and the SDP-model are described further in Sect. 2.3. The Markov model and scenario generation method used in the case study is explained in Sect. 4.2.

2.1 Representation of uncertainty

We consider uncertainty over a weekly resolution for three variables: inflow of water to the reservoirs, wind power generation and temperature-dependent electricity demand of households. A weekly time resolution is considered suitable for describing uncertainty in inflow for hydropower in the Nordic system [38, 39], but may not be ideal for the modelling of short-term uncertainty and variations in wind power. However, the model aims to model the scheduling of hydropower with reservoirs over a long planning horizon, which in itself is a difficult problem to solve. Short-term uncertainty should instead be handled in the short-term modelling.

In general, we assume that the stochastic variables are correlated in time and between themselves. The stochastic variables are represented by a discrete Markov chain, allowing the conditional probability distribution of future states to only depend on the current state. Markov chains are frequently used to represent stochastic variables in SDP-based models for hydropower scheduling [40]. Correlations of one lag are considered by including a stochastic state variable in the SDP algorithm. A Markov model with M nodes in each stage is generated for use in the SDP model. Each node comprises a value for each of the stochastic variables, namely inflow, wind power generation and temperature-dependent electricity demand. The Markov model used in the case study is described further in Sect. 4.2, together with the scenario generation procedure.

2.2 The weekly decision problem

The weekly decision problem for the scheduling of wind- and hydropower generation is described in the following. The model aims to meet electricity demand, which consists of a deterministic industry demand and a stochastic household demand, as well as requirements for spinning and non-spinning reserve capacity at the lowest possible cost. The weekly decision problem is solved for every stage (week), discrete reservoir state and stochastic state (i.e., node in the Markov model) in the SDP model. The model solves the weekly decision problems over a yearly planning horizon (\(t \in {\mathcal {T}}\)), from the last week (T) to the first. The uncertain nature of the problem is represented in the SDP algorithm by the stochastic states and corresponding transition probabilities in the Markov chain. All uncertain variables are assumed known at the beginning of the week and the weekly decision problem is therefore deterministic. This implies that the total weekly inflow (Z), the average weekly wind power generation (W) and the average weekly household demand (\(D^C\)) are known at the beginning of the week (t).

The decision problem is formulated as a linearised (i.e., continuous) unit commitment model, jointly optimising the energy generation and procurement of reserve capacity from the hydropower plants. This implies that all the hydropower functions are linearised in the decision problem. The weekly problem is solved for K time steps of 3 h, allowing for intra-week variations in the input parameters, i.e., inflow, wind power, electricity demand and power price, to be considered in the decision-making. For the stochastic variables, the intra-week variations are modelled by weekly profiles which scale the stochastic input parameters to each time step. For brevity of the mathematical formulation, the index denoting the stage (week), t, is only used to indicate the change of stage (week). The presented formulation is for a hydropower system with two reservoirs.

2.2.1 Objective function

The objective function (1) minimises the cost of operating the system in the current week and the expected future cost of operating the system. The current cost is determined by import/export (\(e_{k}\)) at the price (\(\lambda _{k}\)), rationing of demand (\(ls_k\)) at the cost (\(C^{ls}\)), a penalty cost (\(C^{r}\)) of relaxing the spinning and non-spinning reserve requirements (\(s^{s+}_k,s^{s-}_k, s^{ns}_k\)) and a start-up cost (\(c_{k,h}\)) of each hydropower plant h in each time step k. Some cost elements are scaled for the number of hours in each time step (\(F^H_k\)). The future expected operating cost (\(\alpha _{t+1}\)) is a function of the current stochastic state (\(s^u_{t}\)) and the reservoir state at the end of the week (given by \(v_{h \in {\mathcal {H}},k=K}\)).

$$\begin{aligned} \begin{aligned} \alpha _{t}( s^p, s^u_{t} )&= \text {min}\Biggl \{ \sum _{k \in {\mathcal {K}}} F^H_k\Big (\lambda _{k} e_{k} + C^{ls}ls_k + C^{r}(s^{s+}_k + s^{s-}_k + s^{ns}_k)\Big ) \\ {}&\quad + \sum _{k \in {\mathcal {K}}} \sum _{h \in {\mathcal {H}}} c_{k,h} + \alpha _{t+1}(v_{h \in {\mathcal {H}},k=K}, s^u_{t})\ \Biggr \} \end{aligned} \end{aligned}$$
(1)

2.2.2 Approximation of the expected future cost function

The expected future cost function is approximated by a two-dimensional piecewise linear and convex combination of the discrete expected future cost points (\(\alpha _{t+1}(V_{n, m}, s^u_{t})\)) in Eq. (2). The future cost points are the expected objective function value, given the current stochastic state (\(s^u_{t}\)), calculated in the previous stage (\(t+1\)) for each reservoir state (\(V_{n, m}\)), where nm denotes the combination of discrete reservoir fillings in the two reservoirs. The weighting variables (\(\gamma _{n,m}\)) are defined for all possible combinations of discrete reservoir fillings in the reservoirs and have to sum up to one as given in Eq. (3). The final reservoir fillings by the end of the stage (week) are connected to the weighting variables and the discrete reservoir states as given in Eqs. (4) and (5), respectively, where each reservoir is discretised into \(n \in {\mathcal {N}}\) reservoir segments.

$$\begin{aligned}{} & {} \alpha _{t+1}(v_{h \in {\mathcal {H}},k=K}, s^u_{t}) = \sum _{n \in {\mathcal {N}}} \sum _{m \in {\mathcal {N}}}\gamma _{n, m} \alpha _{t+1}(V_{n, m}, s^u_{t}) \end{aligned}$$
(2)
$$\begin{aligned}{} & {} \sum _{n=1}^{N}\sum _{m=1}^{N} \gamma _{n,m} = 1 \end{aligned}$$
(3)
$$\begin{aligned}{} & {} v_{k,h} = \sum _{n \in {\mathcal {N}}}\sum _{m \in {\mathcal {N}}} \gamma _{n,m}V^{seg}_{h,n} \;\;\;\;\;\; \forall \;\;\; k = K, h = 1 \end{aligned}$$
(4)
$$\begin{aligned}{} & {} v_{k,h} = \sum _{n \in {\mathcal {N}}}\sum _{m \in {\mathcal {N}}}\gamma _{n,m} V^{seg}_{h,m} \;\;\;\;\;\; \forall \;\;\; k = K, h = 2 \end{aligned}$$
(5)

Nonconvex future cost functions can be handled by introducing special ordered sets of type two (SOS-2). SOS-2 are ordered sets of non-negative variables where only 2 adjacent variables are allowed to take on non-zero values. This behaviour can be used to force the use of neighbouring weighting variables (\(\gamma _{n,m}\)) in the interpolation between future cost points, thereby capturing the nonconvex characteristics in the linear approximation of the future cost function. The implementation follows the approach for piecewise linear approximation of two-dimensional functions described in [41]. Special ordered sets are frequently applied in operational research and are included as functionality in many commercial solvers such as CPLEX. Note that the basic formulation of the decision problem in this study is linear, but that nonconvex expected future cost functions may occur when the state-dependent maximum discharge constraint is included, as described in Sect. 3.3. If a nonconvex expected future cost function may occur, SOS-2 are added to the formulation through Eqs. (6)–(7), where \(\theta _{l,h}\) is the sum of the weighting variables for each discrete reservoir segment l in reservoir h, as given in Eq. (6), and \(\Theta _{h} = \{\theta _{l=1,h},\theta _{l=2,h},\ldots , \theta _{l=N,h} \}\).

$$\begin{aligned} \theta _{l,h} = \sum _{\{n,m\} \in {\mathcal {N}}^{comb}_{l,h}} \gamma _{n,m} \;\;\;\;\;\; \forall \;\;\; l \in {\mathcal {N}}, h \in {\mathcal {H}} \end{aligned}$$
(6)
$$\begin{aligned} \Theta _{h} \;\;\; SOS-2 \;\;\;\;\;\; \forall \;\;\; h \in {\mathcal {H}} \end{aligned}$$
(7)

2.2.3 Hydropower constraints

The hydropower system is modelled as a cascade of connected hydropower plants with stations and reservoirs. The reservoir management is restricted by the water balance (Eq. 8) and the reservoir regulation boundaries (Eq. 9). Equation (8) describes the balance of water entering and exiting the hydropower reservoirs for each plant h in each time step k. Water can exit from the reservoirs by release in the form of discharge to the turbines (\(q_{k,h}\)), bypass (\(b_{k,h}\)) or spillage (\(f_{k,h}\)) if the reservoir is full. Water may enter the reservoir as inflow (\(Z_{h}\)) or due to discharge from reservoirs higher up in the cascade (\(\mathcal {{H}}^{up}_h\)). The total weekly inflow is distributed to each time step by (\(\omega ^Z_k\)). Bypass and spillage are assumed to flow directly to sea level. The units are converted from flow (\(\frac{m^3}{s}\)) to volume (\(Mm^3\)) by a conversion factor (\(F^{C}\)).

$$\begin{aligned}{} & {} \begin{aligned} v_{k,h} - v_{k-1,h} +F^{C} ( q_{k,h} + b_{k,h} + f_{k,h} ) - F^{C} \sum _{j \in {\mathcal {H}}^{up}_h} (q_{k,j} ) = \omega ^Z_k Z_{h} \\ \forall \;\;\; k \in {{\mathcal {K}}}, h \in {\mathcal {H}} \end{aligned} \end{aligned}$$
(8)
$$\begin{aligned}{} & {} V^{min}_h \le v_{k,h} \le V^{max}_h \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}}, h \in {\mathcal {H}} \end{aligned}$$
(9)

The operation of the hydropower stations h for each time step k is constrained by Eqs. (10)–(15). The unit commitment of each station is controlled by a variable indicating if the station is running (\(u_{k,h}\)). A linear approximation of unit commitment is used for computational purposes, i.e., the “running" variable (\(u_{k,h}\)) is a continuous variable between 0 and 1, as given by Eq. (10). Linear approximations of the power-discharge relationship (PQ-curve) normally provide good estimates when the hydropower stations are operated close to the best efficiency points of the units in the station, but overestimate the power generation when the station is running on low output. To reflect the reduced efficiency in “low operation" points, we include a minimum discharge (\(Q_{h}^{min}\)) and power output (\(P^{min}_{h}\)), following the approach described in [12].

The cost of start-up (\(c_{k,h}\)) is given by the cost \(C^{start}_h\) and change in running status as given in Eqs. (11) and (12). The total discharge is described by Eq. (15) and the total power output as a function of the station discharge by Eq. (13). The modelling of the minimum operational point is based on the running variable (\(u_{k,h}\)). The power output for a station operating above the minimum generation level is described as a piecewise linear and concave function of \({\mathcal {D}}_h\) discharge segments, where the power output of each discharge segment d is given by the efficiency (\(\eta _{h,d}\)). The use of each segment (\(q_{k,h,d}\)) is restricted by a maximum limit (\(Q_{h,d}^{max}\)) in Eq. (14).

$$\begin{aligned}{} & {} 0\le u_{k,h} \le 1 \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}}, h \in {\mathcal {H}} \end{aligned}$$
(10)
$$\begin{aligned}{} & {} c_{k,h}\ge C^{start}_h(u_{k,h}-u_{k-1,h}) \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}}, h \in {\mathcal {H}} \end{aligned}$$
(11)
$$\begin{aligned}{} & {} c_{k,h}\ge 0 \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}}, h \in {\mathcal {H}} \end{aligned}$$
(12)
$$\begin{aligned}{} & {} p_{k,h} = u_{k,h} P^{min}_{h} + \sum _{d \in {\mathcal {D}}_h}\eta _{h,d} q_{k,h, d} \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}}, h \in {\mathcal {H}} \end{aligned}$$
(13)
$$\begin{aligned}{} & {} 0 \le q_{k,h,d} \le u_{k,h} Q_{h,d}^{max} \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}}, h \in {\mathcal {H}}, d \in {\mathcal {D}}_h \end{aligned}$$
(14)
$$q_{{k,h}} \le u_{{k,h}} Q_{h}^{{min}} + \sum\limits_{{d \in {\mathcal{D}}_{h} }} {q_{{k,h,d}} } \;\;\;\;\;\;\forall \;\;\;k \in {\mathcal{K}},h \in {\mathcal{H}}$$
(15)

Equations (16)–(19) describe the amount of reserve capacity that can be provided by the hydropower plants. Provisions of upwards (\(r^{s+}_{k,h}\)) and downwards (\(r^{s-}_{k,h}\)) spinning reserves require that the hydropower plant is running, as given by Eqs. (16) and (18), respectively. Provision of upwards non-spinning reserves (\(r^{ns+}_{k,h}\)) is restricted by the total turbine capacity in Eq. (17) and the availability of water in the reservoirs. Equation (19) provides an optimistic boundary for the required available water based on the maximum efficiency (\(\frac{r^{ns+}_{k,h}}{\eta ^{max}_{h}}\)), where \(F^{C}\) converts the units from flow (\(\frac{m^3}{s}\)) to volume (\(Mm^3\)).

$$\begin{aligned}{} & {} r^{s+}_{k,h} + p_{k,h} \le u_{k,h}P^{max}_{h} \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}}, h \in {\mathcal {H}} \end{aligned}$$
(16)
$$\begin{aligned}{} & {} r^{ns+}_{k,h} + r^{s+}_{k,h} + p_{k,h} \le P^{max}_{h} \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}}, h \in {\mathcal {H}} \end{aligned}$$
(17)
$$\begin{aligned}{} & {} r^{s-}_{k,h} \le p_{k,h} - u_{k,h}P^{min}_{h} \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}}, h \in {\mathcal {H}} \end{aligned}$$
(18)
$$\begin{aligned}{} & {} F^{C} \left(\frac{r^{ns+}_{k,h}}{\eta ^{max}_{h}}\right) \le v_{k,h} \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}}, h \in {\mathcal {H}} \end{aligned}$$
(19)

The linearised unit commitment formulation does not guarantee operation above the minimum production point. To discourage operation below minimum output to occur for the purpose of delivering reserves, parameters \(\sigma ^{up}_h\) and \(\sigma ^{down}_h\) are introduced in Eqs. (20) and (21) respectively. Equation (20) limits the delivery of upwards spinning reserves from hydropower plant h if operating below minimum output, where \(\sigma ^{up}_h = \frac{P_h^{min}}{R^{S+}}\) for \(P_h^{min} \ge R^{S+}\) and 0 if \(P_h^{min} < R^{S+}\). Similarly, Eq. (21) limits the delivery of downwards spinning for operations below minimum output, where \(\sigma ^{down}_h = \frac{P_h^{min}}{R^{S-}}\). The requirements for upwards and downwards spinning reserves are given by \(R^{S+}\) and \(R^{S-}\), respectively. Note that Eqs. (20) and (21) only tighten the problem formulation if \(P_h^{min} \ge R^{S+}\) and \(P_h^{min} \ge R^{S-}\), accordingly. These constraints are therefore only useful in some special situations, for example, if a smaller amount of reserve capacity is required to be provided within a region or from a particular hydropower cascade, e.g., like the case study in [17].

$$\begin{aligned}{} & {} \sigma ^{up}_h r^{s+}_{k,h} \le p_{k,h} \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}}, h \in {\mathcal {H}} \end{aligned}$$
(20)
$$\begin{aligned}{} & {} (\sigma ^{down}_h+1) r^{s-}_{k,h} \le p_{k,h} \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}}, h \in {\mathcal {H}} \end{aligned}$$
(21)

2.2.4 Wind power constraints

The wind power generation (\(w_k\)) is restricted by the wind power potential (W) and the curtailment of wind power (\(w^c_k\)), as given in (22). The average weekly wind power potential is scaled to each time step by a weekly profile (\(\omega ^W_k\)).

$$\begin{aligned} w_k - w^c_k = \omega ^W_k W \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}} \end{aligned}$$
(22)

2.2.5 System constraints

The power balance, given by Eq. (23), ensures that the sum of the hydropower generation (\(p_{k,h}\)), wind power generation (\(w_{k}\)) and exchange of energy (\(e_{k}\)) equals the total demand in all time steps k. The total electricity demand is given by an industry demand (\(D^I_k\)), a household demand (\(D^C\)) and the option to ration demand (\(ls_k\)) at a high cost. The weekly average household demand is scaled to each time step by a weekly demand profile (\(\omega ^D_k\)). The utilisation of the transmission cable is limited by Eq. (24).

$$\begin{aligned}{} & {} \sum _{h \in {\mathcal {H}}} p_{k,h} + w_k + e_{k} + ls_k = D^C_k + \omega ^D_kD^I \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}} \end{aligned}$$
(23)
$$\begin{aligned}{} & {} -E \le e_{k} \le E \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}} \end{aligned}$$
(24)

The requirements for reserve capacity can only be met by provision of spinning (\(r^{s+}_{k,h}, r^{s-}_{k,h}\)) and non-spinning (\(r^{ns+}_{k,h}\)) reserves by the hydropower plants in the system. Equations (25)–(27) ensure that the requirements for upwards spinning reserves (\(R^{S+}\)), downwards spinning reserves (\(R^{S-}\)) and non-spinning reserves (\(R^{NS+}\)) are met. The reserve requirements in Eqs. (25)–(27) can be relaxed by the use of slack variables (\(s^{s+}, s^{s-}, s^{ns+}\)) but are penalised at a high cost in the objective function.

$$\begin{aligned}{} & {} \sum _{h\in {\mathcal {H}}}r^{s+}_{k,h} + s_k^{s+} \ge R^{S+} \;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}} \end{aligned}$$
(25)
$$\begin{aligned}{} & {} \sum _{h\in {\mathcal {H}}}r^{s-}_{k,h} + s_k^{s-} \ge R^{S-}\;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}} \end{aligned}$$
(26)
$$\begin{aligned}{} & {} \sum _{h\in {\mathcal {H}}}r^{ns+}_{k,h} + s_k^{ns+} \ge R^{NS+}\;\;\;\;\;\; \forall \;\;\; k \in {\mathcal {K}} \end{aligned}$$
(27)

2.3 Overview of the model framework

The solution framework is divided into two main parts: a strategy calculation (SDP model) and an operational forwards simulation (FS) as described in Fig. 1. The strategy calculation serves to compute the expected future cost functions (sometimes also referred to as the cost-to-go functions) that are used in the forwards simulation to represent the value of storing water.

In the strategy calculation, the SDP model is solved iteratively based on backward recursion. The algorithm iterates from the last stage T to the first stage. In each stage, the decision problem is solved for all combinations of discrete reservoir states (i.e., \(N^2\) states) and the nodes in the Markov model (i.e., M nodes). The state variables comprise all the information passed from one decision stage to the next. We consider two state variables: the reservoir state (\(s^p\)) and the stochastic state (\(s^u_{t}\)). The reservoir states comprise information about the water levels in the reservoirs at the beginning of each stage, while the stochastic states comprise information about the stochastic variables. Three stochastic variables are considered in this work: the total weekly inflow to the reservoirs, average weekly wind power generation and the total weekly temperature-dependent electricity demand. The expected future costs are calculated by taking the expectation of the calculated future costs for each system state over all the stochastic states.

To account for end-of-horizon effects, the algorithm iterates until the water values in the first and last stages converge, as shown in Fig. 1. The water values are the marginal value of storing water in the reservoir (i.e., the marginal change in the expected future cost function). Convergence is achieved when the maximum difference between the water values in the last stage and the first stage is below a predefined error (\(\epsilon\)). The water value matrix (\(\Psi\)) comprises the calculated expected water values for all reservoir states. If the convergence criterion has not been met, the water values from the first stage are used to calculate the expected future cost at the end of the planning horizon (\(t=T\)) before a new iteration starts. The pseudocode of the implemented SDP algorithm is given in Appendix 1. When convergence is achieved, the operation of the system is optimised for the weekly decision stages in a forwards sequence in the simulation. The forwards simulation is conducted for a set of S scenarios, using the calculated expected future costs to approximate the value of storing water in the weekly decision problem.

Fig. 1
figure 1

Flow chart of the solution process with the strategy phase (SDP-model) and final simulation

The weekly decision problem is solved in both the strategy calculation and the forward simulation. The basic formulation of the decision problem is given by Eqs. (1)–(5), (8)–(27) and is an LP, as described in Sect. 2.2. All decision variables are defined as positive variables, except the expected future cost (\(\alpha _{t+1}\)) and exchange (\(e_k\)), which may take non-positive values. Furthermore, the environmental constraints presented in Sect. 3 may be added to the problem. If the environmental constraints make the problem nonconvex, Eqs. (6)–(7) are added to the formulation, turning the problem into a MILP. If the simulation comprises weekly decision problems that are MILPs, a second simulation may be conducted in order to obtain dual values from the solution. In the second simulation, the weighting variables (\(\gamma _{n,m}\)) that are used to represent the nonconvex expected future value curve (see Sect. 2.2.1) are fixed to the optimal solution from the first round of simulations. The SOS-2 (Eqs. (6)–(7)) can then be removed from the decision problem, turning the problems into LPs before a second round of simulations is conducted.

3 Modelling of environmental constraints

Operation of hydropower plants can be restricted by a wide range of environmental constraints, often with the goal of controlling the water level in the reservoir or the flow downstream of the plant or in a side river (bypass section). The constraints aim to mitigate negative effects on surrounding ecosystems or facilitate other water uses (e.g., recreational use or irrigation). While some environmental constraints are designed for a specific purpose, and might therefore only be used for one particular hydropower plant or system, some types of environmental constraints are frequently recommended and more generic in type. Most commonly used are constraints to control the flow in certain parts of the river reach, i.e., minimum flow requirements or maximum ramping rates.

In the following, we present the three types of environmental constraints included in this study. We briefly describe the purpose of the constraints and the implications for operational flexibility, before we provide the mathematical formulation of the constraints as included in the weekly decision problem described in Sect. 2.2. The environmental constraints can be imposed on all or a subset of the hydropower plants in the system (\(\hat{{\mathcal {H}}} \subset {\mathcal {H}}\)), for the entire planning horizon or a given period (\(\bar{{\mathcal {T}}} \subset {\mathcal {T}}\)). State-dependent constraints introduce non-convex characteristics to the problem and are therefore challenging to include in models based on linear programming [32].

3.1 Minimum flow constraints

Minimum flow constraints can be attributed either to the bypass section or to the river section downstream of the outlet of the hydropower plant. Minimum flow in the bypass section requires a constant discharge of water to be released from the reservoir past the turbines or intake, to maintain water flow in the original river bed. This results in a direct energy loss proportional to the amount of water released. The minimum discharge constraint targeted at the downstream section of the river also requires a minimum flow of water to be released from the reservoir, but in this case, the water can be released through the turbines, which implies that the water can still be used for power generation. Still, total power production can be reduced, as operations with sub-optimal efficiency may occur more frequently in order to meet the constraint. The minimum flow regimes are often defined as a constant flow throughout the year, sometimes diversified between seasons [42], but are usually only a small proportion of the original flow. In Norway, a few cases have more dynamic minimum flow regimes with the intention to mimic natural, hydrological variations.

Both for minimum flow requirements in the bypass sections and downstream sections, water must be stored and available to meet the constraint in all periods of the year, hence reducing the operational flexibility of the hydropower plant. Considering the minimum discharge downstream of the outlet, parts of the power generation may be moved from hours with high demand to hours with low demand to meet the constraint, thereby reducing the operational flexibility of the plant. In addition, the hydropower plant’s capability to supply downwards reserves may be reduced, since the plant may be forced to stay in operation to deliver the required water flow.

Minimum flow requirements are normally straightforward to include in long-term scheduling models, even though more advanced requirements may introduce modelling complexities (e.g., flow regulations dependent on the stochastic state). The minimum release requirement, given in Eq. (28), ensures that the sum of discharge (\(q_{k,h}\)) and bypass (\(b_{k,h}\)) is above a minimum requirement (\({\underline{Q}}_{h}^{env}\)). The amount of discharge allocated to meet the minimum release requirement is represented by a separate variable (\(q^{min}_{k,h}\)) and constrained by the total discharge (Eq. 29). The parameter \(\sigma ^{min}_h = max\{\frac{Q^{min}_h}{{\underline{Q}}_{h}^{env} }, 1\}\) is introduced to discourage operation below minimum output. A slack variable penalised with a high cost in the objective function can be included in Eq. (28) to ensure feasibility in low water and inflow states or if negative inflows are considered.

$$\begin{aligned}{} & {} q^{min}_{t,k,h} + b_{t, k,h} \ge {\underline{Q}}_{t,h}^{env} \;\;\;\;\;\; \forall \;\;\; t \in {\mathcal {T}}, k \in {\mathcal {K}}, h \in \hat{{\mathcal {H}}} \end{aligned}$$
(28)
$$\begin{aligned}{} & {} (\sigma ^{min}_h) q^{min}_{t,k,h} \le q_{t,k,h} \;\;\;\;\;\; \forall \;\;\; t \in {\mathcal {T}}, k \in {\mathcal {K}}, h \in \hat{{\mathcal {H}}} \end{aligned}$$
(29)

As discussed, minimum discharge obligations may limit the plants’ ability to deliver downwards spinning reserves. By introducing \(q^{min}_{k,h}\) as a separate variable, the minimum amount of turbine capacity allocated to meeting the minimum release requirement (\(q^{min}_{k,h} \eta _h^{min}\)) can be withdrawn from the capacity available for providing downwards reserves by updating Eq. (18) as shown in Eq. (30). The efficiency of operating at the minimum output is given by \(\eta _h^{min}\). Furthermore, Eq. (21) is tightened as shown in Eq. (31).

$$\begin{aligned}{} & {} r^{s-}_{t,k,h} \le p_{t,k,h} - u_{t,k,h}P^{min}_{h} - q^{min}_{t,k,h} \eta _h^{min} \;\;\;\;\;\; \forall \;\;\; t \in {\mathcal {T}}, k \in {\mathcal {K}}, h \in \hat{{\mathcal {H}}} \end{aligned}$$
(30)
$$\begin{aligned}{} & {} (\sigma ^{down}_h+1) r^{s-}_{t,k,h} \le p_{t,k,h} - q^{min}_{t,k,h} \eta _h^{min} \;\;\;\;\;\; \forall \;\;\; t \in {\mathcal {T}}, k \in {\mathcal {K}}, h \in \hat{{\mathcal {H}}} \end{aligned}$$
(31)

3.2 Ramping constraints

Maximum ramping constraints limit the rate of change in discharge from the power plants. The aim of such restrictions is to reduce the environmental impacts of rapid and frequent fluctuations in flow, sometimes denoted as hydropeaking operations. A major concern related to hydropeaking operation is stranding of fish and other water-related organisms during down-ramping (because of de-watering of the downstream rivers), and flushing of organisms when the hydropower plants ramp up. In Norway, the majority of such restrictions have previously been expressed in qualitative terms. More quantitative constraints on ramping rates are expected to be defined in revisions of these types of terms, following new classification systems for environmentally acceptable hydropower operations [43].

Constraints on ramping rates do not have a direct energy loss but reduce the flexibility of the plant by shifting parts of the production between hours in the short-term (within a day). Furthermore, the plants’ potential to supply up and/or down-regulating reserves is limited by the maximum allowed ramping rates. Ramping restrictions can be more challenging to model in long-term scheduling models, as such constraints couple decision variables in consecutive periods. Here we consider ramping rates within the weekly decision problem, as given in Eq. (32), and not between the stages. The maximum allowed ramping rates are given by \(\delta _{h}^{env}\).

$$\begin{aligned} -\delta _{h}^{env} \le q_{t,k,h} - q_{t,k-1,h} \le \delta _{h}^{env} \;\;\;\;\;\; \forall \;\;\; t \in {\mathcal {T}}, k \in {\mathcal {K}}, h \in \hat{{\mathcal {H}}} \end{aligned}$$
(32)

Provision of upwards and downwards reserves is implicitly restricted by Eq. (32). The problem formulation is tightened further by adding Eqs. (33) and (34). By including these constraints, the maximum allowed increase/decrease in power output per time step (\(\eta ^{max}_h\delta _{h}^{env}\)) is scaled to an hourly limitation on provision of reserve capacity (\(\frac{1}{F^H_k}\)). For example, a ramping restriction of 15 MW per time step of 3 h would give a maximum ramping of 5 MW per hour, if we assume even ramping within the time step, and the maximum reserve capacity that can be provided would therefore be 5 MW.

$$\begin{aligned}{} & {} r^{ns+}_{t,k,h} + r^{s+}_{t,k,h} \le \frac{1}{F^H_k}\eta ^{max}_h\delta _{h}^{env} \;\;\;\;\;\; \forall \;\;\; t \in {\mathcal {T}},k \in {\mathcal {K}}, h \in \hat{{\mathcal {H}}} \end{aligned}$$
(33)
$$\begin{aligned}{} & {} r^{s-}_{t,k,h} \le \frac{1}{F^H_k}\eta ^{max}_h\delta _{h}^{env} \;\;\;\;\;\; \forall \;\;\; t \in {\mathcal {T}},k \in {\mathcal {K}}, h \in \hat{{\mathcal {H}}} \end{aligned}$$
(34)

3.3 State-dependent maximum discharge constraints

State-dependent maximum discharge constraints (also known as soft reservoir constraints) are limitations on discharge imposed to achieve certain water levels in the reservoirs for given periods and are therefore categorised as a type of reservoir constraint. In Norway, reservoir constraints are divided into hard and soft reservoir constraints. Hard reservoir constraints define maximum and minimum allowed water levels for given periods. Minimum water levels may be imposed to ensure water supply (e.g., for ecological purposes, irrigation and drinking water) or to facilitate tourism and recreational activities, while maximum reservoir levels can be imposed to secure sufficient dampening of floods. State-dependent maximum discharge constraints (i.e., soft reservoir constraints) can be used when hard reservoir constraints are unsuitable because of seasonal variation in inflow, or if hard constraints are considered too strict. In Norway, state-dependent discharge constraints are used to incentivise high water levels in the summer season for recreational and landscape purposes, but these constraints can also be applied to ensure irrigation or drinking water supply [44].

Hard reservoir constraints, and especially minimum water levels, may have large flexibility implications. A minimum water level requirement for the summer season could potentially reduce the power production in winter and early spring, since water must be restrained in the reservoir to ensure that the minimum level can be met for all possible inflow realisations. Instead, power production is increased in the summer season (which typically has lower demand) and the probability of spillage increases. The plants’ capability to provide reserve capacity is not considered to be reduced. On the contrary, state-dependent maximum discharge constraints do not require water to be restrained in the reservoir before the constraint becomes active, but the operation of the plant is strictly limited during the constraint period. As illustrated in Fig. 2, power production can be restricted in parts of the period when the constraint is active, also limiting the provision of spinning and non-spinning reserves.

Fig. 2
figure 2

Illustration of the state-dependent discharge constraint. The constraint is active in periods 2 and 3 (red and yellow shaded areas). When the water level is below the threshold, discharge from the reservoir is not permitted (i.e., red shaded area, period 2), but when the threshold is met, the constraint changes into a minimum water level constraint (i.e., yellow shaded area, period 3)

The constraint is defined mathematically as follows:

  1. 1.

    If the water level in the reservoir is below a given threshold \(V^{lim}_h\) for a given period \(t \in \bar{{\mathcal {T}}}\), discharge from the reservoir is restricted to allow only environmental flow requirements by Eq. (35).

    $$\begin{aligned} q_{t,k,h} \le {\underline{Q}}_h^{env} \;\;\; \mid v_{t-1,k=K,h} < V^{lim}_h \;\;\;\;\;\; \forall \;\;\; t \in \bar{{\mathcal {T}}}, k \in {\mathcal {K}}, h \in \hat{{\mathcal {H}}} \end{aligned}$$
    (35)
  2. 2.

    If the water level exceeds the threshold \(V^{lim}_h\) within the given period \(\bar{{\mathcal {T}}}\), Eq. (35) is replaced by a minimum reservoir level constraint enforcing the water level to stay above the threshold for the remainder of period \(\bar{{\mathcal {T}}}\) in Eq. (36).

    $$\begin{aligned} v_{t,k,h} \ge V^{lim}_h \;\;\; \mid v_{t-1,k=K,h} \ge V^{lim}_h \;\;\;\;\;\; \forall \;\;\; t \in \bar{{\mathcal {T}}}, k \in {\mathcal {K}},h \in \hat{{\mathcal {H}}} \end{aligned}$$
    (36)

By constraining the discharge, the power production and provision of reserve capacity from the plant are also restricted. In practice, no provision of reserves is allowed when Eq. (35) is active, as given by Eq. (37). If the reservoir threshold is met (i.e., Eq. (35) is replaced by Eq. (36)), provision of reserves is possible, but Eq. (19) is replaced by Eq. (38).

$$\begin{aligned}{} & {} \sum _{h\in {\mathcal {H}}}(r^{ns+}_{t,k,h}+ r^{s+}_{t,k,h} + r^{s-}_{t, k,h}) \le 0 \;\;\; \mid v_{t-1,k=K,h} < V^{lim}_h \;\;\;\;\;\; \forall \;\;\; t \in \bar{{\mathcal {T}}}, k \in {\mathcal {K}} \end{aligned}$$
(37)
$$\begin{aligned}{} & {} F^{C} \left(\frac{r^{ns+}_{t,k,h}}{\eta ^{max}_{h}}\right) \le v_{t,k,h} - V^{lim}_h \;\;\; \mid v_{t-1,k=K,h} \ge V^{lim}_h \;\;\;\;\;\; \forall \;\;\; t \in \bar{{\mathcal {T}}}, k \in {\mathcal {K}},h \in \hat{{\mathcal {H}}} \end{aligned}$$
(38)

We also consider a relaxed version of the state-dependent maximum discharge constraint;

  1. 1.

    Even if the reservoir threshold is \({\underline{\hbox {not}}}\) met, production at the minimum discharge point and provision of spinning reserves are allowed, replacing Eq. (35) with Eqs. (40) and (37) with Eq. (39).

$$\begin{aligned}{} & {} \sum _{h\in {\mathcal {H}}}r^{ns+}_{t,k,h} \le 0 \;\;\; \mid v_{t-1,k=K,h} < V^{lim}_h \;\;\;\;\;\; \forall \;\;\; t \in \bar{{\mathcal {T}}}, k \in {\mathcal {K}} \end{aligned}$$
(39)
$$\begin{aligned}{} & {} q_{t,k,h} \le {\underline{Q}}_h^{min} \;\;\; \mid v_{t-1,k=K,h} < V^{lim}_h \;\;\;\;\;\; \forall \;\;\; t \in \bar{{\mathcal {T}}}, k \in {\mathcal {K}}, h \in \hat{{\mathcal {H}}} \end{aligned}$$
(40)

The reservoir level dependent logical conditions described above are handled in the SDP algorithm. Within the constraint period (\(t \in \bar{{\mathcal {T}}}\)), the water level in the reservoir is checked at the beginning of each week (stage) before the decision problem is solved. If the water level is below the threshold, constraints (35) and (37) are added to the decision problem. For the relaxed version of the constraint, (40) and (39) are added instead of (35) and (37). If the water level is above the threshold, constraints (36) and (38) are added to the decision problem. In the backwards recursion, the decision problem is solved for a set of discrete reservoir states. The reservoir level at the beginning of the week is then given by the discrete value for the water level in each reservoir (given by \(V_{n,m}\)), instead of the end-reservoir filling in the previous week (\(v_{t-1,k=K,h}\)).

We avoid adding binary variables to the decision problem by handling the state-dependent logic directly in the SDP algorithm. However, due to the nonconvex characteristics of the regulation, the future expected cost function may become nonconvex. This is handled by including special ordered sets in the modelling of the expected future cost curve, i.e., adding Eqs. (6)–(7) to the decision problem as described in Sect. 2.2.2, which turn the problem into a MILP.

4 Case study

This section describes the test case study of a regional, renewable-based power system based on real-life and simulated data from Norway. The test case is used to analyse the impact of different environmental constraints on the operation of the system, while also considering three different levels of reserve capacity requirements. The operational flexibility needed to meet net demand and the reserve capacity requirements has to be supplied by the hydropower plants. The system represents a realistic future situation in parts of the Nordic system where hydropower plants have to balance net load in systems with high shares of wind power generation, while delivering reserve capacity and respecting stricter environmental constraints. The case study design is highly relevant for the hydro-dominated Norwegian power system. Several hydropower cascades in the Nordic area are subject to environmental constraints and contain power plants that are crucial for security of supply. Moreover, several of these systems have limited access to the larger power system due to grid constraints.

The case study was conducted using the scheduling model described in Sect. 2 including the different environmental constraints described in Sect. 3. The model was implemented in Julia v1.5 using the JuMP package [45] and the CPLEX 12.10 solver [46]. For the MILP problems, the relative MIP gap is set to zero and the absolute MIP gap to \(10^{-10}\) in the solver settings. The SDP model was solved for a convergence criterion of \(\epsilon < 0.1 \frac{\hbox{\EUR } }{Mm^3}\), where \(\epsilon\) denotes the maximum difference in the water values from the previous iteration.

4.1 System description

An overview of the case study system is provided in Fig. 3a. The system consists of two hydropower plants in a cascade, wind power, household demand and industry demand. We assume that there are no grid limitations within the modelled area, but the system is connected to a larger power system through a transmission line with limited capacity. The transmission line can be used to trade towards a deterministic, exogenous power price (given in Appendix 3). The transmission link can cover parts of the demand but is not sufficient to completely support the local system. The costs of curtailment of demand for energy and reserve capacity are set to 4000 \(\frac{\hbox{\EUR } }{MWh}\) and 2000 \(\frac{\hbox{\EUR } }{MW}\), respectively.

Fig. 3
figure 3

Illustration of the test case system

The hydropower system is set up to resemble a physical system, in order to represent the physical properties of the environmental constraints. The topology of the system is given in Fig. 3b together with an illustration of the PQ-curves of both stations. As discussed in Sect. 2.2, a lower efficiency is assumed for operation at minimum output (or below). The efficiency at minimum output is set 20% lower than the best operational efficiency.

4.2 Markov model and scenarios sampling

As described in 2.1, three stochastic variables are considered in this work: weekly inflow to the reservoirs, average weekly wind power generation and average weekly household demand. The stochastic variables are represented by a Markov model in the SDP model and a set of scenarios in the simulation. Plots of the stochastic input data, the sampled scenarios and the Markov model are shown in Appendix 2.

The Markov model was generated by the use of a vector auto-regressive model and clustering. Weekly time series from 58 weather years from the HydroCen Low Emission dataset for 2030 of Northern Europe [47] are used as input data for the stochastic variables. The dataset consists of weekly historical inflow series, simulated wind power generation and temperature-adjusted household demand for a region in mid-Norway. The data follow seasonal patterns. To subtract the seasonality from the time series, the data was first normalised by Eq. (41), where \(\mu _t\) and \(\sigma _t\) are the mean and standard deviation of the series in week t.

$$\begin{aligned} {\bar{X}}_t = \frac{X_{t} - \mu _t}{\sigma _t} \end{aligned}$$
(41)

To account for correlations in time and between the variables in the multivariate time series, a vector auto-regressive model of order one (VAR(1)) was fitted to the data, assuming the seasonally adjusted data to be weekly stationary. VAR models have been found to give improved descriptions of inflow in systems with correlations between inflow and wind [48]. A general VAR(p) model is given in Eq. (42), where \({\varvec{X}}_t\) are vectors of variables, \({\varvec{B}}_i\) are the coefficient matrices and \(\varvec{\epsilon }_t\) are noise vectors.

$$\begin{aligned} {\varvec{X}}_t = \sum _{i =1}^p {\varvec{B}}_i{\varvec{X}}_{t-i} + {\varvec{y}}_t \end{aligned}$$
(42)

The SDP model requires a discrete representation of the stochastic variables. This was achieved by scenario generation and clustering [49]. To generate a larger sample of scenarios than provided in the original data, 10,000 scenarios consisting of successive, weekly realisations of the stochastic variables were sampled from the VAR(1) model. To obtain a manageable number of scenarios, a Markov chain with 10 nodes per stage (week) was generated from the sampled scenarios by the use of K-means clustering [50].

The Markov model was generated based on the sampled scenarios, rather than the original data, to have a larger sample (than the original 58 scenarios). If a small sample is used for clustering, some nodes may only be visited by a few scenarios, which could lead to very low transition probabilities and numeric issues in the SDP algorithm. The centre points of the clusters are used as nodes (stochastic states) in the Markov model and the probability of transitioning between the nodes (stochastic states) from one week to the next was determined by counting the share of trajectories transitioning between the clusters. Note that each stochastic state comprises a value for each of the three stochastic variables. The generation of the Markov model is illustrated in Fig. 4. An alternative approach to clustering could be to use a scenario reduction method like in [51].

A weakness of the applied method is that the nodes in the Markov model may not represent the most extreme outcomes of each stochastic variable adequately. Extreme realisations of the stochastic variables are essential for the scheduling of the hydropower plants [52]. If low and high inflow years are not satisfactorily represented in the stochastic model, the cost of running out of water or spilling water may be undervalued. To account for this, the representation of extreme inflow scenarios in the Markov model is adjusted by adding an additional high and low inflow node for each week, similar to the approach in [52]. The extreme nodes are set equal to the highest and lowest inflow values for each week in the original input data. Finally, the transition probabilities are adjusted by allocating the scenarios closest to the extreme values to the new nodes.

Fig. 4
figure 4

Illustration of the generation of a Markov model by clustering. For each stage (week), the scenario trajectories are clustered together, as illustrated by the coloured areas in a. Each cluster is represented by the centre point of the cluster. The centre points are used as nodes (representative stochastic states) for each stage in the Markov chain, illustrated in b. Finally, the Markov chain is expanded by adding two extreme nodes in each stage, as represented by red in b

The stochastic variables (scenarios and Markov model) are de-normalized reversing the process in Eq. (41) before being applied in the case study. The forward simulation was conducted for 1000 of the 10,000 sampled scenarios. The scenarios were drawn randomly from the sample, and the same scenarios were used for all the cases in the case study.

4.3 Intra-week variability

Inter-weekly variations in the stochastic variables are modelled by weekly profiles which are used to distribute the weekly values to the 3-h time steps. Household demand is represented by a generic weekly profile with a 3-h resolution. For wind power generation and inflow, flat weekly profiles are used in the SDP calculation, as the real weekly variations cannot be well described by a single generic profile. In the forwards simulation, a set of weekly profiles for variability in wind power generation are used. The weekly wind profiles are from the original input data and matched to the weekly scenario values based on the average weekly wind power generation. The deterministic industry demand is assumed to be constant in all time steps, while the deterministic, exogenous power price is given for a 3-h resolution. The deterministic exogenous power price, the average seasonal profiles for inflow, wind power and household demand, and the weekly profiles for demand and wind power generation are given in Appendix 3.

4.4 Environmental constraints

Three environmental constraints are considered for the lower hydropower plant (HY 2): state-dependent maximum discharge, ramping on discharge and minimum release. An overview of the environmental constraints is presented in Table 1. The environmental constraints are considered in each case by adding the associated equations (given in Sect. 3) to the decision problem.

Table 1 Overview of environmental constraints

The state-dependent maximum discharge constraint (E1) states that from week 18, no discharge is permitted from the reservoir before a target level of 85% of the reservoir capacity is reached. After the wanted water level is reached, the water level has to stay above the target level until week 35. The relaxed version of the constraint (E1*) is active for the same period but allows for operation at minimum output when the water level is below the thresholds in the constraint period. The ramping constraint limits the maximum permitted change in discharge from one time step to the next (up and down). This type of constraint is only considered within the week and not included as a state variable connecting the subproblems in the SDP-model. The maximum ramping level corresponds to a ramp-up period of approximately 12 hs to ramp up from 0 to maximum capacity, while the minimum output point can be reached in 3 h (one time step). Finally, the required minimum release is defined for the summer and winter seasons specifically. For the summer season, the minimum release requirement is set to 35% of maximum turbine discharge, while the requirement is set to 12% in the winter. This is a relatively high flow requirement, but in line with emerging best-designed mitigation measures in the range of 25–30% of the max turbine flow capacities [9].

4.5 Reserve capacity requirements

We consider two different levels of required reserve capacities, in addition to the Level 0 (L0) case without reserve capacity requirements, as presented in Table 2 and Fig. 5. The spinning reserve requirement in Level 1 (L1) is approximately 10% of the average variable demand, while the requirement in Level 2 (L2) is dimensioned to 10% of the wind power generation in the 10% hours with the highest wind power potential for the summer and winter seasons, respectively. In Level 1, the non-spinning reserve requirement is defined for the winter season and dimensioned to cover approximately 25% of the average household demand. In Level 2, a constant amount of non-spinning reserves dimensioned to cover approximately 30% of the average household demand is required throughout the year.

Fig. 5
figure 5

Illustration of the spinning (solid lines) and non-spinning (dashed lines) reserve requirements for Level 1 (green) and Level 2 (red)

Table 2 Overview of the reserve capacity levels

4.6 Overview of case runs

The model is solved for a range of different cases, combining the different environmental considerations and reserve capacity requirements as given in Table 3. Note that the E1+L2 case is solved using the modified state-dependent maximum discharge constraint (see E1* in Table 1). An additional set of simulations are conducted for the cases that include environmental constraints (E1–3) to evaluate the importance of consistency in the strategy and simulation part, i.e., the importance of including the environmental constraints in the strategy calculation as well as the simulation. This is done by simulating the cases with the constraints (E1–3) using inconsistent future cost functions (IC), namely expected future cost functions calculated without the constraints (E0). Furthermore, a small sensitivity study of the characteristics of the lower hydropower plant is outlined in Sect. 5.5.

Table 3 Overview of case runs (X), simulations with inconsistent future cost functions (IC) and cases included in the sensitivity study (S)

5 Results and discussion

This section describes the results from the case study. We first discuss some overall operational results. This is done for the three different types of environmental constraints considering the different levels of reserve capacity requirements. Secondly, we discuss the capability of the system to meet the demand for electricity and the requirements for reserve capacity. Thirdly, the value of considering the environmental constraints in the strategy calculation (i.e., the SDP model) is assessed, before we finish with a sensitivity study of the design of the lower hydropower plant.

5.1 Average total results (yearly)

This part describes the overall results given in Table 4 and discusses the development when including the different environmental constraints and reserve capacity requirements. Total curtailments of demand for energy and reserves (i.e., unmet demand and reserve capacity requirements) are only briefly mentioned here and discussed further in Sects. 5.2 and 5.3.

For reference, we first consider the cases without environmental constraints (E0+L0, E0+L1 and E0+L2). The overall operational costs are negative, due to the export of energy out of the area. The cost of operation increases (i.e., the profit is reduced from 12 M\(\hbox{\EUR }\) to around 8 M\(\hbox{\EUR}\)) when reserve capacity requirements are included (E0+L1 and E0+L2 compared to E0+L0). The average total hydropower generation is maintained with increasing levels of reserve capacity requirements, but the average wind power generation is reduced (down 2–5%), resulting in a lower net export of energy. Minor amounts of energy and reserve capacity demand are curtailed. There is a higher curtailment of demand in the E0+L1 case and higher curtailment of demand for reserves in the E0+L2 case (compared to E0+L0). The rest of this section discusses the implications of the environmental constraints (E1–3 compared to E0) considering different levels of reserve capacity requirements (L0–2). In general, larger impacts of the environmental constraints are seen for high reserve capacity requirements (L2). This is logical, as this is the most constrained system setup, where larger parts of the generation capacity are used to provide reserves.

When the state-dependent maximum discharge constraint is included (E1 compared to E0), there is an increase in spillage for all the levels of reserve capacity requirements (L0–2), resulting in a slight reduction in hydropower generation and net export. Only small changes in wind power generation are found when E1 is imposed. Compared to without the constraint (E0), curtailment of demand increases in the E1+L0 case but slightly decreases in the E1+L1 and E1+L2 cases. There is a slight increase in curtailed demand for reserves in the E1+L1 case and a higher increase in the E1+L2 case. The costs of operation increase in all cases with the constraint (E1 compared to E0), and especially for the E1+L2 case compared to E0+L2, due to the penalty of curtailed demand for reserves.

The ramping constraint (E2) has small to no impact (< 1%) on the average hydropower generation, wind power generation and net export for all the levels of reserve capacity requirements (L0–2), compared to without the constraint (E0+L0–2). Curtailment of demand is slightly reduced in the E2+L1 case and more so for the E2+L2 case, while spillage increases by around 2–6% for the two cases, compared to the E0+L1 and E0+L2 cases. A small amount of demand for reserves has to be curtailed in the E2+L1 case, while there is a considerable increase in the E2+L2 case (6.37 MW/h on average compared to a 0.1 MW/h average in the E0+L2 case). Compared to without the ramping constraint (E0+L0–2), the cost of operation is slightly increased for the E2+L0 and E2+L1 cases, while there is a high-cost increase for the E2+L2 case due to a large amount of curtailed demand for reserves.

Table 4 Average total results from all the case runs

For the minimum release constraint (E3), reductions in hydropower generation (of about 3–5%) and net export (of about 10–23%) are seen for all cases and increase with the level of reserve capacity requirements. Spillage is about halved when the minimum release constraint is included. Reductions in both hydropower generation and spillage imply that the hydropower plants are operated at lower efficiency. Wind power generation is slightly reduced when reserve capacity requirements are included (L1 and L2 cases). Higher curtailments in demand for energy and reserve capacity are observed for all cases and increase with the level of reserve capacity requirements.

5.2 Impacts on operational flexibility

The curtailment of demand and the dual value of the power balance can be interpreted as measures of the available operational flexibility in the system. The results in Table 4 show that the minimum release constraint (E3) leads to the highest curtailment of demand of the considered environmental constraints. This increase is due to water being used to meet the minimum release requirement, which reduces the amount of water available for seasonal shifting. The consequence is an increased probability of low water levels (and in the worst case, running out of water) in low-inflow years. Figure 6 shows the average total reservoir filling and curtailment of demand with and without the minimum release constraint for the L1 reserve capacity requirement (E3+L1 compared to E0+L1). An increase in average curtailment is found for many of the weeks when including this constraint, even though curtailment of demand only happens in the most extreme scenarios. A similar development was apparent for all the assessed reserve capacity levels when adding the minimum release constraint (E3). For the state-dependent maximum discharge constraint (E1), the total curtailment of demand increases in the E1+L0 case and decreases for the E1+L1 and E1+L2 cases. The ramping constraint (E2) gives equal or lower amounts of curtailment of demand for all the reserve capacity levels.

Fig. 6
figure 6

The average total reservoir level (solid lines) and curtailment of demand (bars) with and without the minimum release constraint (plotted in red and black respectively) for the Level 1 reserve capacity requirements (E0+L1 compared to E3+L1). The dark red areas are where the grey and red bars overlap

Figure 7 plots the change in the average dual value of the power balance (Eq. 23), when including the environmental constraints (E1–E3) compared to without (E0). The dual value of the power balance can be interpreted as the marginal cost of meeting demand. For the minimum discharge constraint (E3), an increase in the marginal cost of meeting demand is observed for a large part of the year. The ramping constraint (E2), reduces the marginal cost in the period before the snow melting starts (i.e., the end of the winter period) for both the levels of reserve capacity requirements (L1 and L2), but especially for L2. This is because the reservoir filling is kept slightly higher when the ramping constraint is included, resulting in lower average curtailment of demand in the winter period, but also slightly higher system costs due to more spillage and curtailment of wind power.

Fig. 7
figure 7

Change in the average marginal cost of meeting demand (over all the simulated scenarios) when including different environmental constraints (i.e., the difference compared to the E0+L1 and E0+L2 cases)

For the state-dependent maximum discharge constraint (E1), there is first a decrease in the marginal cost around week 16, before there is a larger increase around week 18–20 in the E1+L1 case. This is due to a slightly higher reservoir filling in the late winter, resulting in reduced curtailment of demand in this period. The increase in the marginal cost right after is caused by the environmental constraint limiting discharge from the lower hydropower plant before the target reservoir level is reached, as shown in Fig. 8. In the E1+L2 case, the state-dependent maximum discharge constraint has a smaller impact. This is because a less strict version of the constraint is used, allowing production at minimum output within the constraint period. Even though the constraint still imposes a large reduction in the operational flexibility in this period, the impact on the marginal cost of meeting demand is more or less removed. There is still a small reduction in the marginal cost around week 16, demonstrating that the constraint has an impact on the reservoir filling coming into the constraint period (i.e., there is a slightly higher reservoir filling by the end of the winter period).

Fig. 8
figure 8

The average dual value of the power balance constraint (solid lines) and the average power production (bars) for the lower hydropower plant with and without the state-dependent maximum discharge constraint (plotted in red and black, respectively) for the Level 1 reserve capacity case. The dark red areas are where the grey and red bars overlap

5.3 Provision of reserve capacity

Figure 9 displays the average provision of each type of reserve capacity in several of the cases. We see that the lower hydropower plant (HY 2) delivers less downwards spinning reserves when the minimum release constraint is imposed (E3 compared to E0) but more upwards spinning and non-spinning reserves. As a result, the amount of curtailed demand for downwards reserves increases considerably. When the state-dependent maximum discharge constraint is included (E1 compared to E0), there is a slight decrease in the provision of upwards and non-spinning reserves by HY 2 for the case with level 1 reserve requirements. For the high reserve capacity requirements case (L2), there is a higher decrease in non-spinning reserves and a small increase in upwards-spinning reserves. When the ramping constraint is imposed (E2 compared to E0), HY 2 delivers more upwards and downwards reserves when a medium-high level of reserve capacity is required (L1). However, for higher reserve capacity requirements (L2), a large decrease in the provision of upwards spinning and non-spinning reserves from HY 2 is observed when imposing the ramping constraint. We observe that the high reserve capacity requirements (L2) are not always possible to meet, especially when the ramping constraint is imposed.

Fig. 9
figure 9

Average provision of reserves by the upper (HY1) and lower (HY2) hydropower plant for each type of reserves in the Level 1 and Level 2 reserve capacity requirement cases

The dual value of the requirements for upwards and downwards spinning reserve capacity (Eqs. 25, 26) represent the marginal cost of providing one more unit of each type of reserve capacity, or in other words, the marginal cost of meeting the reserve capacity requirements. The changes in the dual values when the environmental constraints are imposed (E1–3 compared to the E0 case) are plotted in Fig. 10. For the Level 1 reserve capacity requirements, the state-dependent discharge constraint (E1) has a similar impact on the marginal cost of meeting the upwards and downwards spinning reserve requirements as seen for the marginal cost of meeting demand in Fig. 7. The marginal cost decreases around week 16 and then increases in weeks 18–20 when the discharge limitation becomes active. When the minimum discharge constraint is imposed (E3), the marginal costs of meeting both the upwards and downwards spinning reserve requirements increase in all weeks of the year except the summer weeks. Particularly, the marginal cost of providing downwards reserves increases. Similar impacts, only larger in magnitude, are found for higher reserve capacity requirements (L2) when imposing the minimum release requirement. On the contrary, smaller impacts are seen in the E1+L2 case because of the relaxation of the state-dependent maximum discharge limitation, as previously discussed.

For the level 1 reserve capacity requirements, the ramping constraint induces a slight increase in the marginal cost of providing upwards reserves and a slight reduction for the downwards spinning reserves (E2 compared to E0). On the other hand, for higher reserve capacity requirements (L2), the average marginal cost of upwards reserve capacity rises drastically when the ramping constraint is included, implying that the upwards reserve requirement (in combination with the non-spinning requirement) cannot be met. There is also a high increase in the marginal costs of providing downwards reserve capacity in the winter period.

Fig. 10
figure 10

Change in the marginal cost of meeting the upwards and downwards spinning reserve requirements when including different environmental constraints (i.e., the difference compared to the E0 cases)

5.4 Importance of strategy

So far we have discussed the overall operational results, the implications for operational flexibility and the changes in the provision of reserve capacity due to imposing the different environmental constraints. Another aspect is the importance of considering the environmental constraints in the calculation of the expected future cost functions (consistent strategy), compared to when the environmental constraints are \({\underline{{\textbf {not}}}}\) considered in the calculation of the expected future cost functions (inconsistent strategy). Figure 11 shows the difference in costs of the simulated operation using consistent versus inconsistent strategies.

Fig. 11
figure 11

Reduction in the operational costs of using consistent strategies in the forwards simulation compared to using inconsistent strategies (i.e., expected future cost functions calculated considering the environmental constraints versus expected future cost functions not considering the constraints)

We see that there is a reduction in operational costs for the state-dependent maximum discharge constraint (E1) and the minimum release constraint (E3). A larger reduction in costs is observed for higher levels of reserve capacity requirements for both constraints. For the E1 case, the economic improvement is lower for the highest level of reserve capacity requirements (Level 2 compared to Level 1), but this is likely due to a less strict version of the constraint being used in the E1+L2 case. The cost savings are mainly a result of avoiding curtailment of demand for energy and reserve capacity. For the minimum release constraint (E3), the amount of water available for seasonal shifting is overestimated when the constraint is not included in the calculation of the expected future cost functions, resulting in less efficient management of the reservoir. For the state-dependent maximum release constraint (E3), the reservoir management is adjusted to mitigate the implications of the constraint when a consistent strategy is used. This is achieved by increasing the water level in the reservoir and thereby meeting the reservoir threshold earlier in some of the scenarios. We do not find an economic improvement resulting from including the ramping restriction in the calculation of the expected future cost functions. This is partly logical, as the reservoir level cannot actively be used to mitigate the constraint (like for E1), nor does the constraint directly restricts the amount of water (i.e., energy) that can be regulated (like for E3). However, the low impact of including this constraint in the strategy calculation may also partly be a result of the level of detail in the study, such as the ramping constraint only being active within the week, the underestimation of the intra-week variation in the SDP model (backwards recursion) and the coarse temporal resolution (3 h). This result also aligns with previous studies when considering Nordic conditions [31].

5.5 Sensitivity of hydropower plant flexibility

A sensitivity study of the operational flexibility of the lower hydropower plant was conducted for the E0–3+L2 cases. The capacity factor (CF) and the degree of regulation (DR) of the plant were changed by adjusting the maximum turbine capacity and reservoir size. The sensitivity cases are described in Table 5, where V, Q and P give the reservoir size, maximum discharge and maximum power output for the lower reservoir, respectively. The estimated DR for the total hydropower system and the estimated CF of the lower power plant are also given. The “Base" case in the sensitivity study refers to the design as described in Fig. 3b.

Table 5 Description of sensitivity cases

The average operational costs, hydropower production, curtailment of demand and curtailment of reserve capacity of including the state-dependent discharge (E1) and the minimum release (E3) for different configurations of the hydropower system are shown in Fig. 12. In general, similar trends were seen for the solutions based on the different hydropower plant configurations when imposing the two environmental constraints. For the state-dependent discharge case (E1), we did not find a consistent change in how the constraint impacts the operation depending on the configuration of the power plant. For the minimum release constraint (E3), the induced cost of imposing the constraint was found to be lower for more flexible system configurations and higher for less flexible system configurations. Without the environmental constraints (E0), the degree of regulation has a larger cost impact than the capacity factor. However, when including the minimum release constraint (E3), the largest span in average costs is seen for the different capacity factors. In other words, the impact on the operational cost of the minimum release constraint is found to be sensitive to the capacity factor of the plant. Furthermore, the total hydropower production is reduced relatively more for lower turbine capacities when the minimum release constraint is included (E3 compared to E0). The curtailment of demand for energy and reserve capacity increases considerably when the minimum release constraint is included (compared to E0), but the relative increases are higher for lower turbine capacities and for higher degrees of regulation. We have omitted the results considering the ramping constraint (E2) since the requirements for reserve capacity cannot be met for this case (E2+L2).

Fig. 12
figure 12

Average operational costs (a), hydropower production (b), curtailment of demand for energy (c) and curtailment of demand for reserve capacity (d) solving without the environmental constraints (E0), with the state-dependent discharge constraint (E1) and the minimum release constraint (E3) for different configurations of the hydropower system

6 Conclusion

The impacts of environmental constraints on the operation of hydropower plants and the provision of spinning and non-spinning reserve capacity in a wind- and hydropower-dominated region of a congested power system, like the Norwegian, have been assessed using a stochastic, long-term scheduling model. Three types of environmental constraints on hydropower discharge are considered: reservoir-level dependent maximum discharge (i.e., state-dependent), maximum ramping of discharge and minimum release. The representative Norwegian case study demonstrates the economic value of including the state-dependent maximum discharge constraint and the minimum release constraint in the long-term strategic scheduling, i.e., the calculation of the expected future cost functions. This value was found to increase with the level of reserve capacity requirements. In general, the operational costs increase with the level of reserve capacity requirements and when environmental constraints are imposed. The highest cost increases were found for the cases with the minimum release constraint and when a ramping constraint was imposed in combination with high reserve capacity requirements.

The operational flexibility of the hydropower plant and the plant’s capability to provide reserve capacity were found to depend on the type of environmental constraint being imposed. The minimum release and ramping constraints are active throughout the entire year, and the largest flexibility impacts of these constraints are observed in the most energy-restrained periods of the year. On the other hand, the state-dependent discharge constraint is only active for a limited period, mainly resulting in increased marginal costs of meeting demand and reserve capacity requirements at the beginning of this period. The ramping constraint was mostly found to have very small operational consequences, besides reducing the rate of change in discharge. However, high requirements for reserve capacity could not be met when the ramping constraint was imposed. Similarly, the minimum release constraint was found to limit the provision of downwards reserves.

The magnitude of the implications of the environmental constraints was found to be sensitive to the reserve capacity requirements but is also likely to depend on the strictness of the environmental regulation. A slightly relaxed version of the state-dependent maximum discharge constraint was used in some of the cases, showing considerably lower impacts on the marginal cost of meeting the demand for energy and reserve capacity. Alternative formulations of environmental constraints could be investigated further to assess the change in operational flexibility towards the effectiveness of meeting environmental targets.