Optimal Re-Dispatching of Cascaded Hydropower Plants Using Quadratic Programming and Chance-Constrained Programming

Stochastic production from wind power plants imposes additional uncertainty in power system operation. It can cause problems in load and generation balancing in the power system and can also cause congestion in the transmission network. This paper deals with the problems of congestion in the transmission network, which are caused by the production of wind power plants. An optimization model for corrective congestion management is developed. Congestions are relieved by re-dispatching several cascaded hydropower plants. Optimization methodology covers the optimization period of one day divided into the 24 segments for each hour. The developed optimization methodology consists of two optimization stages. The objective of the first optimization stage is to obtain an optimal day-ahead dispatch plan of the hydropower plants that maximizes profit from selling energy to the day-ahead electricity market. If such a dispatch plan, together with the wind power plant production, causes congestion in the transmission network, the second optimization stage is started. The objective of the second optimization stage is the minimization of the re-dispatching of cascaded hydropower plants in order to avoid possible congestion. The concept of chance-constrained programming is used in order to consider uncertain wind power production. The first optimization stage is defined as a mixed-integer linear programming problem and the second optimization stage is defined as a quadratic programming (QP) problem, in combination with chance-constrained programming. The developed optimization model is tested and verified using the model of a real-life power system.


Introduction
Electricity market liberalization and the increase in renewable generation investments (especially wind power plants (WPPs)) bring changes and challenges in transmission system operation.It is necessary to adapt the existing or develop new methods used in transmission system operation and planning; thus, new opportunities arise for exploring different optimization methodologies adapted to new conditions.The uncertainty that is introduced by the stochastic nature of WPP production, in addition to the problems of energy balancing in the system, can cause congestion in the transmission network.In some countries [1], construction of new WPPs is much faster than reinforcements of the transmission network, and congestion is more likely to occur.The aforementioned problem may be particularly pronounced in systems with cascaded hydropower plants (HPPs), where any change in the output power of one of the HPPs causes consequences for other HPPs that are located at the same river flow.Also, due to the possible time delay of water between two neighboring HPPs, every change in HPP output power causes consequences through later time periods.When congestion may occur, the transmission system operator (TSO) will try to avoid it by using devices such as phase-shifting transformers (PST) and flexible alternating current (AC) transmission systems (FACTS).If these devices are not sufficient, re-dispatch of the nearby power plants in order to control active power flows is needed.Re-dispatching brings additional costs because it changes the optimal dispatch plan of the power plants.If re-dispatching is conducted with cascaded HPPs, the situation is more complex because the optimal reservoir management plan is also changed.Optimal levels of water in the HPP reservoirs can be changed, and even unwanted spillage of water beside the HPP turbine can occur.This problem presents a specific niche that is investigated in this paper.
This paper deals with the optimization of the re-dispatching of cascaded HPPs in a section of the transmission network where only HPPs and WPPs are located.The main hypothesis of the optimization methodology proposed in this paper is that, by taking into account the uncertainties of WPP production forecasts in the short-term re-dispatching optimization, re-dispatching can be minimized, optimal reservoir levels can be preserved, and spillage can be avoided.
The main concern of the short-term hydro scheduling (or dispatching) problem is to find out the optimal short-term water management plan of cascaded hydro reservoirs subject to different conditions.The cascaded HPP scheduling problem is a well-known optimization problem, investigated in many papers even long before the electricity market reform [2,3].Electricity market liberalization puts profit maximization as a key element in the objective function.In a previous study [4], a detailed description of the linear optimization model with an objective function that maximizes the sales of electricity on the day-ahead market was developed.Taking into account the nonlinearity of the discharge characteristics of the HPP, successive linear programming (LP) was presented in Reference [5].Optimization models that take into account the nonlinear discharge characteristic of the HPP using mixed-integer linear programming (MILP) were developed in References [6][7][8][9].The same problem was solved with mixed-integer quadratic programming in Reference [10].In addition to the abovementioned different variations of LP, nonlinear programming was also used for solving the cascaded hydro scheduling problem [11,12].The next step in the cascaded hydro scheduling problem is to take into account the stochastic nature of water inflows and/or electricity market price.Good examples of stochastic programming application to the short-term hydro scheduling problem can be found in References [13][14][15].Research trends direct the solution of the hydro scheduling problem toward heuristic methods such as the bee colony algorithm [16], ant colony algorithm [17], etc.A good review of heuristic algorithms applied to the short-term hydro scheduling problem can be found in Reference [18].
The uncertainty of WPP production brings challenges to power system balancing, and HPPs are suitable for balancing energy deviations caused by WPPs [19].Scientists are developing new optimization methods for joint optimization of hydro and wind production systems.In addition to the day-ahead electricity market, balancing and reserve markets present new opportunities for HPP owners.A detailed review of the literature covering the research area of short-term hydro scheduling in systems with a large share of wind power can be found in Reference [20].Good examples of joint wind-hydro optimization can be found in References [21,22].Reference [23] presented an interesting optimization model for finding a joint market bid of a hydroelectric system and wind park.Optimization problems of coordinated scheduling of HPPs and WPPs in transmission networks where congestion occurs were studied in References [24,25].In these studies, the transmission network was not modeled in detail; instead, the radial connection between the area where HPPs and WPPs are located and the rest of the system was assumed.It was also assumed that congestion occurs only on these radial lines.
A real (meshed) transmission network is modeled in this study and linearized power flow calculations are suggested using the concept of power transfer distribution factors (PTDFs) that were firstly introduced in Reference [26].Also, the uncertainty of the wind speed (and WPP production) forecast is taken into consideration using the concept of chance-constrained programming (CC), introduced in Reference [27].The concept of CC programming was used in optimization for the consideration of uncertain WPP output [28][29][30][31], but it is yet to be used for solving problems of congestion in transmission networks with HPPs and WPPs.The optimization methodology developed in this study is a combination of quadratic programming (QP) and chance-constrained programming.The exact contributions of this study can be summarized as follows: • A combination of QP and CC programming for the minimization of HPP re-dispatching is proposed in this paper.The aim of re-dispatching is to avoid congestion in the transmission network caused by uncertain WPP production.

•
The meshed transmission network and uncertainty in wind speed forecast are taken into consideration using the concept of PTDFs, together with CC programming.

•
Verification of the proposed optimization methodology was carried out using a model of a real-life transmission system, as well as a real-life cascaded hydropower system.
The structure of this study is as follows: firstly, a general description of the developed optimization methodology, and a detailed explanation of HPPs, WPPs, and transmission network models are presented in Section 2. A mathematical model of the proposed optimization methodology is described in detail in Section 3. In Section 4, a case study containing a real-life power system model is presented.A short conclusion and comments for further research work are provided at the end of the paper.

General Description of the Problem
Re-dispatching is carried out in order to eliminate congestion in the transmission network caused by uncertainty in wind power production.If large wind power production coincides with low local consumption, energy is exported from the observed part of the transmission network through interconnection lines.The TSO estimates the amount of energy exchanged in advance based on the local load forecast, the data on the electricity market contracts (a day ahead and long-term), and wind forecast.Each forecast has a certain error, and this paper takes into account the wind forecast error while ignoring the load forecast error.In a situation when wind power plants are producing more energy than it is forecasted, congestion may occur.The TSO tries relieving congestion using available equipment such as a PTC transformer or FACTS devices (e.g., a unified power-flow controller (UPFC)).If this action is not enough, re-dispatching of the available hydropower plants is needed.Wind power plants do not participate in re-dispatching.Re-dispatching is costly because the dispatch plan that is obtained at the electricity market needs to be changed.Any difference between the energy production that is contracted at the electricity market and the actual one causes additional costs.Thus, re-dispatching needs to be minimal.Relationships between the free electricity market, the activities carried out by the TSO, and the re-dispatching of the hydropower plants are shown in Figure 1.
Energies 2019, 12, x FOR PEER REVIEW 3 of 26 introduced in Reference [27].The concept of CC programming was used in optimization for the consideration of uncertain WPP output [28][29][30][31], but it is yet to be used for solving problems of congestion in transmission networks with HPPs and WPPs.The optimization methodology developed in this study is a combination of quadratic programming (QP) and chance-constrained programming.
The exact contributions of this study can be summarized as follows: • A combination of QP and CC programming for the minimization of HPP re-dispatching is proposed in this paper.The aim of re-dispatching is to avoid congestion in the transmission network caused by uncertain WPP production.

•
The meshed transmission network and uncertainty in wind speed forecast are taken into consideration using the concept of PTDFs, together with CC programming.

•
Verification of the proposed optimization methodology was carried out using a model of a reallife transmission system, as well as a real-life cascaded hydropower system.
The structure of this study is as follows: firstly, a general description of the developed optimization methodology, and a detailed explanation of HPPs, WPPs, and transmission network models are presented in Section 2. A mathematical model of the proposed optimization methodology is described in detail in Section 3. In Section 4, a case study containing a real-life power system model is presented.A short conclusion and comments for further research work are provided at the end of the paper.

General Description of the Problem
Re-dispatching is carried out in order to eliminate congestion in the transmission network caused by uncertainty in wind power production.If large wind power production coincides with low local consumption, energy is exported from the observed part of the transmission network through interconnection lines.The TSO estimates the amount of energy exchanged in advance based on the local load forecast, the data on the electricity market contracts (a day ahead and long-term), and wind forecast.Each forecast has a certain error, and this paper takes into account the wind forecast error while ignoring the load forecast error.In a situation when wind power plants are producing more energy than it is forecasted, congestion may occur.The TSO tries relieving congestion using available equipment such as a PTC transformer or FACTS devices (e.g., a unified power-flow controller (UPFC)).If this action is not enough, re-dispatching of the available hydropower plants is needed.Wind power plants do not participate in re-dispatching.Re-dispatching is costly because the dispatch plan that is obtained at the electricity market needs to be changed.Any difference between the energy production that is contracted at the electricity market and the actual one causes additional costs.Thus, re-dispatching needs to be minimal.Relationships between the free electricity market, the activities carried out by the TSO, and the re-dispatching of the hydropower plants are shown in Figure 1.Another problem that may arise due to re-dispatching is the disturbance of the water management plan of hydro reservoirs.When HPPs are located on the same river basin (so-called cascaded HPPs), the actions of those upstream affect all power plants downstream.If an upstream HPP is producing energy, it discharges water through its water turbine.Discharged water enters the river and flows to the next HPP that is located downstream.Depending on the distance between the two HPPs and configuration of the river, the water needs some time to come from the upstream HPP to the downstream HPPs (this can take several hours).Relationships between two cascaded HPPs are shown in Figure 2. Another problem that may arise due to re-dispatching is the disturbance of the water management plan of hydro reservoirs.When HPPs are located on the same river basin (so-called cascaded HPPs), the actions of those upstream affect all power plants downstream.If an upstream HPP is producing energy, it discharges water through its water turbine.Discharged water enters the river and flows to the next HPP that is located downstream.Depending on the distance between the two HPPs and configuration of the river, the water needs some time to come from the upstream HPP to the downstream HPPs (this can take several hours).Relationships between two cascaded HPPs are shown in Figure 2. When short-term (day-ahead) scheduling of the cascaded HPPs is taken into consideration, the owner of the HPPs needs to make a day-ahead plan for discharging the water according to the longterm water management plan, current hydrological situation (current levels of water in the reservoirs, external inflow to the river due to rain, etc.), and the electricity market price forecast.Based on the day-ahead discharge plan, the HPP owner makes bids to the day-ahead electricity market.A dayahead discharge plan for the cascaded HPPs can be obtained using optimization methodology, in which the objective is to maximize the profit from the day-ahead electricity market while satisfying all technical and hydrological constraints of the HPPs.One applicable optimization methodology is described in Section 3.2.When the day-ahead discharge plan of the HPPs needs to be changed due to congestion in the transmission network, the HPP owner will have additional costs because the original discharge plan is changed, and because HPPs cannot produce the exact amount of electricity that is contracted at the day-ahead electricity market.The water that is discharged from the upstream HPP hours before re-dispatching will come to the downstream HPPs in the moment of redispatching.If the downstream HPP needs to decrease its output due to re-dispatching, the excess amount of water in the reservoir can occur and spillage of water beside the turbine may be necessary.Such a situation should be avoided, and that is why re-dispatching should also be minimized.When short-term (day-ahead) scheduling of the cascaded HPPs is taken into consideration, the owner of the HPPs needs to make a day-ahead plan for discharging the water according to the long-term water management plan, current hydrological situation (current levels of water in the reservoirs, external inflow to the river due to rain, etc.), and the electricity market price forecast.Based on the day-ahead discharge plan, the HPP owner makes bids to the day-ahead electricity market.A day-ahead discharge plan for the cascaded HPPs can be obtained using optimization methodology, in which the objective is to maximize the profit from the day-ahead electricity market while satisfying all technical and hydrological constraints of the HPPs.One applicable optimization methodology is described in Section 3.2.When the day-ahead discharge plan of the HPPs needs to be changed due to congestion in the transmission network, the HPP owner will have additional costs because the original discharge plan is changed, and because HPPs cannot produce the exact amount of electricity that is contracted at the day-ahead electricity market.The water that is discharged from the upstream HPP hours before re-dispatching will come to the downstream HPPs in the moment of re-dispatching.If the downstream HPP needs to decrease its output due to re-dispatching, the excess amount of water in the reservoir can occur and spillage of water beside the turbine may be necessary.Such a situation should be avoided, and that is why re-dispatching should also be minimized.

Modeling of the Hydropower Plants
Hydropower production depends on the discharge of water through turbines and the net height difference between the water level in the reservoir and the level of water at the exit from the water turbine.This height difference is called the head.The discharge characteristic of the hydropower plant is, thus, nonlinear and multidimensional since the value of the head is not constant-it depends on the water level in the reservoir (see Figure 3a).Since HPP production is an optimization variable in the developed model in order to obtain a linear optimization problem, the dependence of the head and water level in the reservoir is neglected.A similar assumption can be found in the literature [24,32,33].When it comes to short-term (one day) hydropower plant operation planning, this assumption is particularly suitable for the following two cases:

•
When the reservoir of the HPP is large (seasonal reservoir), then discharge of water through the HPP turbine for one day is very small compared to the total volume of water in the reservoir; therefore, the head does not change significantly in one day.This is the situation with HPP1 and HPP2 in our case study.

•
When the reservoir of the HPP is located in one place (up a hill) and a water turbine is located in another place (in a valley), the total head can be very large (even a few hundred meters).
The reservoir and the turbine are connected with long penstock, which constitutes most of the head.Such a hydropower plant type is called a diversion.Since the water level in the reservoirs is just a small portion of the total head, its variability cannot significantly change the total head.This is the situation with HPP4 in our case study.
plant is, thus, nonlinear and multidimensional since the value of the head is not constant-it depends on the water level in the reservoir (see Figure 3a).Since HPP production is an optimization variable in the developed model in order to obtain a linear optimization problem, the dependence of the head and water level in the reservoir is neglected.A similar assumption can be found in the literature [24,32,33].When it comes to short-term (one day) hydropower plant operation planning, this assumption is particularly suitable for the following two cases: • When the reservoir of the HPP is large (seasonal reservoir), then discharge of water through the HPP turbine for one day is very small compared to the total volume of water in the reservoir; therefore, the head does not change significantly in one day.This is the situation with HPP1 and HPP2 in our case study.

•
When the reservoir of the HPP is located in one place (up a hill) and a water turbine is located in another place (in a valley), the total head can be very large (even a few hundred meters).The reservoir and the turbine are connected with long penstock, which constitutes most of the head.Such a hydropower plant type is called a diversion.Since the water level in the reservoirs is just a small portion of the total head, its variability cannot significantly change the total head.This is the situation with HPP4 in our case study.
The above assumption fails in the situation when the HPP has a small head and a relatively small reservoir.In such a case, the variable head model needs to be taken into consideration.A good example of the variable head model using MILP can be found in the literature [6].The advantage of the constant head assumption is a simplification of the optimization model, and a disadvantage is the limitation of the model when it is applied to certain types of HPPs.
Also, the nonlinear discharge characteristic can be linearized.In this paper, the variable head is neglected, and the discharge characteristic is piece-wise linearized as shown in Figure 3b.Piece-wise linearization is used, whereby the original discharge characteristic (shown in Figure 3a) is divided into segments and the original discharge characteristic in each segment is approximated with a linear curve.Every linear curve is determined by the discharge (Qas) and the production equivalent ( ( ) as j μ ) as shown in Figure 3b.The above assumption fails in the situation when the HPP has a small head and a relatively small reservoir.In such a case, the variable head model needs to be taken into consideration.A good example of the variable head model using MILP can be found in the literature [6].The advantage of the constant head assumption is a simplification of the optimization model, and a disadvantage is the limitation of the model when it is applied to certain types of HPPs.
Also, the nonlinear discharge characteristic can be linearized.In this paper, the variable head is neglected, and the discharge characteristic is piece-wise linearized as shown in Figure 3b.Piece-wise linearization is used, whereby the original discharge characteristic (shown in Figure 3a) is divided into segments and the original discharge characteristic in each segment is approximated with a linear curve.Every linear curve is determined by the discharge (Qas) and the production equivalent (µ as ( j)) as shown in Figure 3b.According to Reference [32], "HE corresponds to the water flow of 1 m 3 /s for one hour.It is sometimes interpreted as the volume of water and sometimes as water flow".
Every linear segment in the piece-wise linearized discharge characteristic is determined by production equivalent µ which can be defined as where j is the index of the linear segment, a is the index of the production unit (water turbine with associated generator) in the HPP, µ as ( j) is the production equivalent of production unit a and linear segment j, P as ( j) is the output electrical power of production unit a and linear segment j, and Q as ( j) is the discharge of water through production unit a and linear segment j.
The sum of discharges of all linear segments gives a total discharge through the water turbine of production unit a.
where Q a ( j) is the total discharge through the water turbine of production unit a, and n aj is the total number of linear segments of the piece-wise linearized discharge characteristic of production unit a.
If the conditions µ as ( j) > µ as (k) and j < k are satisfied, then the piece-wise linearized characteristic is concave.The total electrical output power of the generator in the production unit a is As can be seen in Figure 3b, piece-wise linearization of the actual discharge characteristic causes some errors.Thus, some parts of the actual discharge characteristic can be divided into more linear segments in order to achieve more precise approximation.In practice, the areas with low discharge (left part of the discharge characteristic) are often avoided due to lower efficiency and possible vibration.In order to avoid a certain area of the discharge characteristic, an additional integer (binary) variable is defined as follows: If the operation of the turbine is forbidden in an area where the discharge through the turbine is between 0 and a pre-set value (Q amin ), total discharge and production of production unit a are modeled.
It is necessary to model additional rules which will ensure that, if the production unit is ON, it should not work with output power less than P amin (electric output power that corresponds to the discharge Q amin ); in other words, if the discharge through the first linear segment (in which discharge is in the range from 0 to Q amin ) is equal to 0, then the discharge through the other linear segments of the same production unit a should be equal to 0. This can be achieved by adding additional constraints and variable limits.
where Q as ( j) is the maximal discharge through linear segment j of production unit a. Equations ( 5)-( 9) are used in this paper in order to model the production of HPP dependent on the water discharge through the turbine (discharge characteristic).This model is derived from those used in References [32,33].

Modeling of the Wind Power Plants
Production of wind power plant (WPP) depends on the wind speed and a common production characteristic of WPP is shown in Figure 4. the same production unit a should be equal to 0. This can be achieved by adding additional constraints and variable limits.

( ) ( )
where ( ) as Q j is the maximal discharge through linear segment j of production unit a.
Equations ( 5)-( 9) are used in this paper in order to model the production of HPP dependent on the water discharge through the turbine (discharge characteristic).This model is derived from those used in References [32,33].

Modeling of the Wind Power Plants
Production of wind power plant (WPP) depends on the wind speed and a common production characteristic of WPP is shown in Figure 4.A mathematical model for the production characteristic used in this paper is derived according to Reference [34].
where P(v) is the electrical output power of the WPP, and A, B, and C are constants which can be calculated as follows: A mathematical model for the production characteristic used in this paper is derived according to Reference [34].
where P(v) is the electrical output power of the WPP, and A, B, and C are constants which can be calculated as follows: The abovementioned model is adequate for the squirrel-cage asynchronous machine type of WPPs.If it is necessary to use any other wind turbine generator type (for example, the more modern doubly Energies 2019, 12, 1604 8 of 25 fed induction generator), an appropriate model can be used.The production model of WPP is nonlinear since the dependence on the output power and wind speed is cubic.Wind speed is a continuous random variable (direction and value vary continuously) and, in this paper, forecasted wind speed is used in order to calculate output power of the WPP.In the developed model, the production of WPPs is used as the input parameter based on the wind speed forecast; thus, linearization of the production curve is not needed.
There is no perfect forecast, and every real-life forecast has an associated forecasted error.This error is not constant during the time frame.The second optimization stage is performed just before the first hour of the optimization period.The forecast for the first hour of the optimization period will have the smallest error because it is made just before the real time, while the forecast for the last hour of the optimization period will have the biggest error as it is made 24 h before the real time.According to German experience [35], the root-mean-square error (RMSE) for a 24 h forecasting period is from 0.5% for the first hour in the day to 4% for the last (24th) hour in the day.As demonstrated in the literature [36], mean average error (MAE) is the most natural measure of average error magnitude, and it can also be used in the developed optimization methodology.Forecasted wind speed determines, according to Equation ( 10), the produced active power of the WPP.
In the proposed optimization methodology (second optimization stage), WPP production is modeled in the optimization constraint.To take into consideration abovementioned wind speed forecast error, the chance-constrained methodology, introduced by Charnes and Cooper [27], is used.Let B be a random variable and as part of the following linear constraint: where a j is a coefficient in the linear inequality, and x j is an optimization variable.The stochastic constraint in Equation ( 14) is satisfied when solution x fulfills the inequality in Equation ( 14) for all values of random variable B. If the distribution of the random variable is limited to the interval B min < B < B max , then the lower boundary B min can be included in the constraint instead of random variable B, and the stochastic constraint becomes deterministic.In this way, it is ensured that the constraint is satisfied for all possible values of random variable B; in other words, the constraint is satisfied with the probability of 100%.In practical optimization applications, stochastic constraints often do not need to be satisfied with the probability of 100%; rather, a certain tolerance is allowed, i.e., a certain risk is accepted that the stochastic constraint will not be satisfied.Accepted risk can be modeled with the following expression: where: P r is the probability, and α is a coefficient that can take the value from the interval [0,1] and which indicates the maximum acceptable risk that the constraint will not be met.
If the probability density function of random variable B is known, then parameter α determines the so-called critical value of random variable B cr .By inserting B cr into Equation (15), the stochastic constraint in Equation ( 14) can be modeled as deterministic.
The probability that the constraint in Equation ( 16) would not be satisfied is equal to the user-defined risk parameter α.If parameter α is given, critical value B cr can be easily calculated using the inverse cumulative distribution function of random variable B.
According to Reference [37], many authors assume that the wind speed forecast error distribution follows a normal distribution.This assumption is made in this paper as well.In addition to a normal distribution, Weibull, beta, and hyperbolic distributions were also investigated [37] and can be easily used instead of normal distribution.Figure 5 presents the normal probability distribution function for the WPP production forecast error.The mean value (P v,µ ) that corresponds to the forecasted value is 50 MW, and the standard deviation (ς) is 2.5.Risk parameter α is also shown in Figure 5, as well as the critical value of WPP power P v,cr .Parameter α can be defined as the area underneath the curve between +∞ and P v,cr .
The probability that the constraint in Equation ( 16) would not be satisfied is equal to the userdefined risk parameter α.If parameter α is given, critical value Bcr can be easily calculated using the inverse cumulative distribution function of random variable B.
According to Reference [37], many authors assume that the wind speed forecast error distribution follows a normal distribution.This assumption is made in this paper as well.In addition to a normal distribution, Weibull, beta, and hyperbolic distributions were also investigated [37] and can be easily used instead of normal distribution.Figure 5 presents the normal probability distribution function for the WPP production forecast error.The mean value (Pv,μ) that corresponds to the forecasted value is 50 MW, and the standard deviation (σ) is 2.5.Risk parameter α is also shown in Figure 5, as well as the critical value of WPP power Pv,cr.Parameter α can be defined as the area underneath the curve between +∞ and Pv,cr.

Modeling of the Power Flows in the Transmission Network
Calculations of power flow in the transmission network can be solved using any of the wellknown methods for power flow solution (Newton-Raphson [38], fast decoupled method [39], etc.).Since the original power flow problem is nonlinear, it is necessary to use some kind of linearized model in order to solve the optimization problem presented in this paper.The power transfer distribution factor (PTDF) is used as a linear approximation to estimate the changes in the power flows of transmission lines due to re-dispatching of particular HPPs.The concept of PTDFs is introduced in Reference [26], derived from direct current (DC) power flows; thus, a good approximation of the original alternating current (AC) problem only occurs when small changes around the starting operating point are made.Re-dispatching presents small changes in the starting operating point of the system, and PTDFs present a suitable approximation.PTDFij,k define the changes in power flow on the transmission line that connects buses i and j due to a change in output power of the generator (HPP) k.The equation for PTDF is

Modeling of the Power Flows in the Transmission Network
Calculations of power flow in the transmission network can be solved using any of the well-known methods for power flow solution (Newton-Raphson [38], fast decoupled method [39], etc.).Since the original power flow problem is nonlinear, it is necessary to use some kind of linearized model in order to solve the optimization problem presented in this paper.The power transfer distribution factor (PTDF) is used as a linear approximation to estimate the changes in the power flows of transmission lines due to re-dispatching of particular HPPs.The concept of PTDFs is introduced in Reference [26], derived from direct current (DC) power flows; thus, a good approximation of the original alternating current (AC) problem only occurs when small changes around the starting operating point are made.Re-dispatching presents small changes in the starting operating point of the system, and PTDFs present a suitable approximation.PTDF ij,k define the changes in power flow on the transmission line that connects buses i and j due to a change in output power of the generator (HPP) k.The equation for PTDF is where x ik is an element of the bus reactance matrix in row i and column k, x jk is an element of the bus reactance matrix in row j and column k, and X ij is the actual reactance of the transmission line between buses i and j.
The change in the transmission line active power flow due to re-dispatching of HPP k is where ∆P ij,k is the active power flow change on the transmission line between buses i and j, and ∆P k is the change in output power of HPP k due to re-dispatching.

Description of the Proposed Methodology
This chapter presents a developed optimization methodology whose objective is to minimize the re-dispatching of cascaded HPPs with the purpose of removing congestion in the transmission network caused by uncertainties of the wind power forecasts.The optimization period is one day divided into hourly segments.Any other short-term planning period (such as one week) and any other time segments (such as half-hour, 10 min, etc.) are possible to model with a proposed optimization methodology.In order to test and verify the developed optimization methodology, it is necessary to obtain a day-ahead hourly dispatch plan of the HPPs, taking into account forecasted day-ahead electricity market prices, as well as any other hydrological conditions (available water in the reservoirs, local inflow to the river and reservoirs, etc.).For this purpose, the mixed-integer linear programming (MILP) method is used.Outputs of this first optimization stage are then used as input data to the second optimization stage in which re-dispatching of HPPs is optimized.Quadratic programming (QP), in combination with chance-constrained programming (CC), is used in the second optimization stage.A block diagram of the two-stage optimization methodology proposed in this paper is shown in Figure 6.
The optimization methodology starts one day before (d − 1) the optimization period.Input data to the first optimization stage are as follows:

•
Technical data of the HPPs-the number of production units in every HPP and discharge characteristics of every production unit.

•
Data from the day previous to the optimization period-reservoir levels at the end of the previous day (this is the starting point for the reservoir level in the optimization period), and discharge from the last few hours of the previous day (these data are necessary due to the time delay of water).

•
Hydrological data-reservoir limits (minimum water limit of the reservoir, as well as maximal water limit of the reservoir), the time delay of water from the upstream reservoir to the downstream reservoir, and the desired level of water in the reservoirs at the end of the optimization period.

•
Forecast of local water inflow to the river and reservoirs, the forecast of day-ahead electricity market price, and the forecast of the average market price for the next optimization period (future market price).
The outputs (results) of the first optimization stage are as follows: • Day-ahead dispatch plan of all HPPs (discharge or production plan for every hour in the optimization period).

•
Day-ahead reservoir management plan (the levels of water in reservoirs at the end of every hour of the optimization period).
Just before the optimization period (real time), the TSO uses the day-ahead dispatch plan of the HPPs and forecasted production of WPPs (calculated based on the forecasted wind speed) in order to calculate power flows in the transmission network for every hour of the optimization period.For this purpose, any kind of available power flow program can be used.In the case when power flow results do not show the possibility of congestion in the transmission network, the optimization methodology ends and there is no need for a second optimization stage.However, if the power flow results show the possibility of congestion in the transmission network during the optimization period, the second optimization stage is needed.The optimization methodology starts one day before (d − 1) the optimization period.Input data to the first optimization stage are as follows: • Technical data of the HPPs-the number of production units in every HPP and discharge characteristics of every production unit.

•
Data from the day previous to the optimization period-reservoir levels at the end of the previous day (this is the starting point for the reservoir level in the optimization period), and discharge from the last few hours of the previous day (these data are necessary due to the time delay of water).

•
Hydrological data-reservoir limits (minimum water limit of the reservoir, as well as maximal water limit of the reservoir), the time delay of water from the upstream reservoir to the downstream reservoir, and the desired level of water in the reservoirs at the end of the optimization period.

•
Forecast of local water inflow to the river and reservoirs, the forecast of day-ahead electricity market price, and the forecast of the average market price for the next optimization period (future market price).
The outputs (results) of the first optimization stage are as follows: • Day-ahead dispatch plan of all HPPs (discharge or production plan for every hour in the optimization period).

•
Day-ahead reservoir management plan (the levels of water in reservoirs at the end of every hour of the optimization period).
Just before the optimization period (real time), the TSO uses the day-ahead dispatch plan of the HPPs and forecasted production of WPPs (calculated based on the forecasted wind speed) in order to calculate power flows in the transmission network for every hour of the optimization period.For Input data for the second optimization stage are as follows:

•
All the output data from the first optimization stage.

•
Forecasted wind speed for every hour of the optimization period, together with the error of the forecast.

•
Available transfer capacities (ATCs) of the transmission lines that are congested.

•
PTDFs for the congested transmission lines and HPPs.
The output results from the second optimization stage are as follows: • Changed dispatched plan of the HPPs (changed discharge plan) and changed reservoir management plan for the optimization period.
The TSO once more calculates power flows; however, now, the changed dispatch plan of HPPs is used as input data.If the power flow results show that there is still unsolved congestion in the transmission network, the second optimization stage is started again.If the power flow results show that congestion is solved, the optimization methodology is finished.

First Optimization Stage-Mixed-Integer Linear Programming
The first optimization stage of the proposed optimization methodology aims to optimize (maximize) the profit of the cascaded HPPs from the day-ahead electricity market, taking into account technical and hydrological constraints of the HPPs, as well as potential long-term bilateral contracts.This optimization model is intended for the owner of the HPPs, who can optimize its day-ahead electricity market performance (profit) with it.In the first optimization stage, the following assumptions are made:

•
HPP owner is a price taker (they cannot influence the electricity market price).The day-ahead electricity market price is forecasted and forecast uncertainty is neglected.

•
Production costs (fuel costs and maintenance costs) of HPP are neglected.

•
The discharge characteristics of every production unit are modeled using a piece-wise linear model, as explained in Section 2.2.

•
Modeling of the forbidden zone in the discharge characteristic is enabled using an integer variable, as explained in Section 2.2.

•
The optimization period is one day with the optimization step of one hour.
The optimization model used in this stage is mixed-integer linear programming (MILP).Similar models are well known in the literature, and the closest examples can be found in References [4,32].The advanced interactive multidimensional modeling system (AIMMS) [40] is used, and the CPLEX solver is utilized for solving the optimization problem.

Objective Function
The objective function of the first optimization stage is the maximization of the following expression: Expression I in the objective function in Equation ( 19) represents the income from selling energy to the day-ahead electricity market, expression II is the expected income from the usage of water that remained in reservoirs at the end of the optimization period, and expression III represents the penalty cost for spillage of water.Equation ( 19) is linear and contains integer variables.Also, all constraints are linear; thus, the optimization problem can be classified as MILP.

Optimization Constraints
Technical constraints of the HPP are defined by the following expressions: Equality constraints that connect discharge through the individual segments and the total discharge of the production unit, as well as constraints that connect discharge and output electrical power of the generator, are described by the following expressions: µ as (i, a, j)Q as (i, a, j, t); Hydrological constraints of the HPP reservoirs are defined as follows: Hydrological couplings of water reservoirs that are located at the same river can be expressed as If lateral inflow exists (for example, when some reservoirs are located at another river and the two river systems are connected), Equation ( 29) needs to be expanded.One example of lateral inflow is shown in the case study, and a complex hydrological balance constraint is shown in Equations ( 36)- (39).
If the owner of the HPPs contracted a long-term bilateral contract that needs to be satisfied during the optimization period, the following constraint is added:

Second Optimization Stage-Mixed-Integer Quadratic Programming and Chance-Constrained Programming
Before the second optimization stage starts, the TSO needs to check power flows in the observed transmission network in order to detect possible congestion.If congestion occurs, then the second optimization stage is carried out.In the second optimization stage, the dispatch plan of HPPs obtained in the first optimization stage is changed in order to relieve the congestion.The second optimization stage is used by the HPP owner in order to minimize necessary re-dispatching.In the second optimization stage, the following assumptions are made:

•
The dispatch characteristic of the HPP is linearized with only one linear segment around the operating point, obtained in the first optimization stage.It is expected that the operating point of the HPP will be slightly changed due to re-dispatching.

•
The production of the WPPs is modeled based on the forecasted value and associated uncertainty of the forecast.The uncertainty of the forecast is not a constant value, but it increases as the time between the moment of forecasts and the moment that is forecasted increases.The assumed probability distribution of the uncertainty of WPP production forecasts is a normal or Gaussian distribution.

•
The optimization period is the same as in the first optimization stage-one day with the optimization step of one hour.The optimization step can be changed easily.
The optimization model used in this stage is quadratic programming (QP), in combination with chance-constrained programming (CC), and it represents the original contribution of this paper.For modeling this type of optimization problem, the advanced interactive multidimensional modeling system (AIMMS) [40] is used, and the CPLEX solver is utilized for solving the optimization problem.

Objective Function
The objective function of the second optimization stage is the minimization of the following expression: The first part of the objective function in Equation ( 31) minimizes the square deviation of the old dispatch plan (obtained in the first optimization stage) and the new one (obtained in the second optimization stage).The second part of Equation ( 31) minimizes the possible spillage.The objective function is quadratic and does not contain any integer variable.Also, all constraints are linear; thus, the optimization problem can be classified as QP.

Optimization Constraints
The technical constraint in Equation ( 20) needs to be satisfied in the second optimization stage, but the constraint of the integer variable in Equation ( 21) is omitted.Hydrological constraints in Equations ( 26)-( 28) are also modeled in the second optimization stage.The volume of water at the end of the last hour (t = 24) calculated in the first optimization stage represents the optimal value; if re-dispatching is needed, this value can be changed in the second optimization stage.This change needs to be minimal; thus, a new hydrological constraint is added.
Values for V setmin and V setmax are user-defined.Equation ( 29) represents water balanced between the water reservoirs that are situated at the same river; this constraint is included in the second optimization stage, as well as the forward market constraint in Equation (30).
If power flow results show that there is possible congestion in the transmission network during the optimization period, re-dispatching of HPPs is needed in order to avoid congestion.The transmission lines that are congested are called critical.In the next step, it is necessary to calculate the ATC values of the critical line in the case without WPP production.The calculated ATC values, thus, indicate the available capacity of the line that can be utilized by the WPP.In the case when WPP production increases the active power flow of the transmission line beyond the ATC value, the HPPs change the output power to avoid congestion.
To carry out the re-dispatching of the HPPs, an additional constraint is proposed.
Re-dispatching needs to be optimized over the entire optimization period, since there is a time delay (Equation ( 29)) between the water reservoirs, and every change in water discharge from the upstream water reservoir affects downstream reservoirs in the next few hours.Also, if the downstream HPP reduces its output due to re-dispatching, the water that is discharged from the upstream HPP in the hours before re-dispatching will increase the water level in the reservoir, and spillage may occur.Re-dispatching of the HPPs due to the complexity of the hydrological system does not necessarily have to occur in hours when congestion occurs.
The objective function in Equation ( 31), together with the constraint in Equation ( 34), will ensure minimally needed re-dispatching and spillage in the case when WPP production causes congestion in the transmission network.Equation ( 34) is deterministic since WPP production (P v (v,t)) is a deterministic value.In order to take into consideration the stochastic characteristic of wind speed, Equation ( 34) is modified according to the principle of chance-constrained programming, as described in Section 2.3.
The user-defined parameter α (see Section 2.3) represents the probability that actual WPP production is higher than P v,cr (v,t).Using risk parameter α and the inverse cumulative distribution function of the random variable P v (v,t), the critical value P v,cr (v,t) is easily calculated.

Case Study
The aim of the case study is to illustrate the usability of the proposed optimization methodology under the conditions of a real and complex electric power system.The case study is modeled according to a real Croatian transmission system which contains cascaded HPPs.Basic data about the Croatian transmission system can be found on the official web page of Croatian transmission system operator (HOPS) [41].The HPPs and WPP modeled in this paper are located in the southern part of the Croatian transmission system, which is shown in Figure 7.All locations of HPPs and the WPP are shown in Figure 7.The full single line diagram of the Croatian transmission network that can be found in Reference [42].

Input Data
Bus load data represent the real daily load diagram of the Croatian power system [41].Data for day-ahead electricity prices were retrieved from the European Power Exchange (EPEX SPOT) [43].Day-ahead electricity market prices, together with the total hourly load, are shown in Figure 8.The load diagram shown in Figure 8 represents a characteristic winter Saturday when consumption in the southern part of Croatia is rather low and the production of HPPs is high due to a large amount of water in the reservoirs.Also, during winter, there are lots of windy days; thus, the production of the WPP is high.The energy produced in HPPs and the WPP cannot be consumed locally and it is exported to the northern part of Croatia.In these conditions, transmission lines are loaded near to their maximum.The assumed future price of electricity is 35 €/MWh.

Input Data
Bus load data represent the real daily load diagram of the Croatian power system [41].Data for day-ahead electricity prices were retrieved from the European Power Exchange (EPEX SPOT) [43].Day-ahead electricity market prices, together with the total hourly load, are shown in Figure 8.The load diagram shown in Figure 8 represents a characteristic winter Saturday when consumption in the southern part of Croatia is rather low and the production of HPPs is high due to a large amount of water in the reservoirs.Also, during winter, there are lots of windy days; thus, the production of the WPP is high.The energy produced in HPPs and the WPP cannot be consumed locally and it is exported to the northern part of Croatia.In these conditions, transmission lines are loaded near to their maximum.The assumed future price of electricity is 35 €/MWh.

Input Data
Bus load data represent the real daily load diagram of the Croatian power system [41].Data for day-ahead electricity prices were retrieved from the European Power Exchange (EPEX SPOT) [43].Day-ahead electricity market prices, together with the total hourly load, are shown in Figure 8.The load diagram shown in Figure 8 represents a characteristic winter Saturday when consumption in the southern part of Croatia is rather low and the production of HPPs is high due to a large amount of water in the reservoirs.Also, during winter, there are lots of windy days; thus, the production of the WPP is high.The energy produced in HPPs and the WPP cannot be consumed locally and it is exported to the northern part of Croatia.In these conditions, transmission lines are loaded near to their maximum.The assumed future price of electricity is 35 €/MWh.The modeled hydrological system consists of five cascaded HPPs, as shown in Figure 9.All details about the actual HPPs can be found in Reference [44].The first and second HPPs (HPP1 and HPP2) have a large seasonal reservoir and they control the water volume in the river system downstream.The reservoirs of HPP1 and HPP2 are subject to an additional limit that ensures compliance with the maximum daily discharge.The daily discharge quota for large reservoirs is usually taken from the mid-term reservoir management plan.HPP3 and HPP4 have a smaller reservoir; however, despite that, HPP3 is the largest one due to the largest net head.The last HPP5 is the run-of-river type (it does not have a reservoir) and it uses the water of the biological minimum of the old river flow.A small amount of water (5 m 3 /s) is constantly spilled from the fourth reservoir to the old river flow and this water is used in HPP5; thus, HPP5 is not included The first and second HPPs (HPP1 and HPP2) have a large seasonal reservoir and they control the water volume in the river system downstream.The reservoirs of HPP1 and HPP2 are subject to an additional limit that ensures compliance with the maximum daily discharge.The daily discharge Energies 2019, 12, 1604 17 of 25 quota for large reservoirs is usually taken from the mid-term reservoir management plan.HPP3 and HPP4 have a smaller reservoir; however, despite that, HPP3 is the largest one due to the largest net head.The last HPP5 is the run-of-river type (it does not have a reservoir) and it uses the water of the biological minimum of the old river flow.A small amount of water (5 m 3 /s) is constantly spilled from the fourth reservoir to the old river flow and this water is used in HPP5; thus, HPP5 is not included in the optimization model.The time delay between the first reservoir and HPP2 is seven hours and the time delay between HPP2 and HPP3 is two hours.These are average values of time delay.HPP3 and HPP4 are located close to each other, and the time delay between them is neglected.HPP2 is located at the neighboring hydrological system and presents lateral inflow into the main hydrological system.Due to the complex couplings between two hydrological systems, Equation (29) needs to be expanded for every individual HPP in order to take into consideration the lateral inflow from HPP2.The hydrological balance for HPP1 is then The hydrological balance for HPP2 is The hydrological balance for HPP3 is The hydrological balance for HPP4 is All technical details of the modeled HPPs are shown in Table 1.The assumed WPP consists of 110 wind turbines, each having a rated power of 2.3 MW; the total rated power of the WPP is 253 MW.The assumed wind speed forecast for the planning period, together with the associated error, is shown in Table 2.The WPP output power is obtained with the forecasted wind speed using Equations ( 10)- (13) and is also shown in Table 2. Wind speed forecast is made based on the actual measurement, and forecasting error is assumed based on the data available in Reference [35].

Results of the First Optimization Stage
The result of the first optimization stage is the optimal HPP dispatch plan that achieves maximum profit from selling electricity to the day-ahead electricity market, as well as profit from the future sales of electricity generated from water stored in reservoirs at the end of the optimization period.The parameters that determine the optimal HPP dispatch plan are the forecasted day-ahead price and the assumed future price of electricity.Figure 10 shows the optimal dispatch plan of the HPPs for the optimization period obtained by the first optimization stage.period.The parameters that determine the optimal HPP dispatch plan are the forecasted day-ahead price and the assumed future price of electricity.Figure 10 shows the optimal dispatch plan of the HPPs for the optimization period obtained by the first optimization stage.From Figure 9, it can be noted that, in hours with relatively low day-ahead electricity price (in the night and early morning), HPPs produce just the energy that is contracted by long-term bilateral contracts.In the hours with the highest day-ahead price, obtained HPP outputs are equal to the rated powers.All HPPs reduced their output in the 22nd hour because there was a drop in day-ahead electricity price for that hour (see Figure 8).HPP1 produces every hour except for hours 4-6.
The volumes of water in the HPP reservoirs at the end of each hour are shown in Figure 11.In the first hours of the optimization period, when day-ahead market prices are low, all reservoirs except the first are filled with water.After hour 10, the small reservoirs of HPP3 and HPP4 are discharged.At the end of the optimization period, the level of water in all reservoirs is close to the minimum limit, since the assumed future price (35 €/MWh) is low and it is more profitable to use From Figure 9, it can be noted that, in hours with relatively low day-ahead electricity price (in the night and early morning), HPPs produce just the energy that is contracted by long-term bilateral contracts.In the hours with the highest day-ahead price, obtained HPP outputs are equal to the rated powers.All HPPs reduced their output in the 22nd hour because there was a drop in day-ahead electricity price for that hour (see Figure 8).HPP1 produces every hour except for hours 4-6.
The volumes of water in the HPP reservoirs at the end of each hour are shown in Figure 11.
In the first hours of the optimization period, when day-ahead market prices are low, all reservoirs except the first are filled with water.After hour 10, the small reservoirs of HPP3 and HPP4 are discharged.At the end of the optimization period, the level of water in all reservoirs is close to the minimum limit, since the assumed future price (35 €/MWh) is low and it is more profitable to use water in the current optimization period.
From Figure 9, it can be noted that, in hours with relatively low day-ahead electricity price (in the night and early morning), HPPs produce just the energy that is contracted by long-term bilateral contracts.In the hours with the highest day-ahead price, obtained HPP outputs are equal to the rated powers.All HPPs reduced their output in the 22nd hour because there was a drop in day-ahead electricity price for that hour (see Figure 8).HPP1 produces every hour except for hours 4-6.
The volumes of water in the HPP reservoirs at the end of each hour are shown in Figure 11.In the first hours of the optimization period, when day-ahead market prices are low, all reservoirs except the first are filled with water.After hour 10, the small reservoirs of HPP3 and HPP4 are discharged.At the end of the optimization period, the level of water in all reservoirs is close to the minimum limit, since the assumed future price (35 €/MWh) is low and it is more profitable to use water in the current optimization period.

Results of the Second Optimization Stage
The first step of the second optimization stage involves power flow calculations in the observed transmission network for every hour in the optimization period.Input data for the power flows include the HPP dispatch plan obtained in the first optimization stage (Figure 10), hourly bus loads (Figure 8), and WPP output power (Table 2).A computer model of the Croatian power system created using PowerWorld software is used.The real power system data describing loads, state of the transmission network.and output power from thermal power plants are used.The data on HPP outputs are taken from the first optimization stage.Because congestion is present only in the observed part of the power system (southern Croatia) where only HPPs are located, re-dispatching is carried out by those HPPs.Production of the thermal power plants is taken into consideration in the

Results of the Second Optimization Stage
The first step of the second optimization stage involves power flow calculations in the observed transmission network for every hour in the optimization period.Input data for the power flows include the HPP dispatch plan obtained in the first optimization stage (Figure 10), hourly bus loads (Figure 8), and WPP output power (Table 2).A computer model of the Croatian power system created using PowerWorld software is used.The real power system data describing loads, state of the transmission network.and output power from thermal power plants are used.The data on HPP outputs are taken from the first optimization stage.Because congestion is present only in the observed part of the power system (southern Croatia) where only HPPs are located, re-dispatching is carried out by those HPPs.Production of the thermal power plants is taken into consideration in the computer model, but they are not re-dispatched.Power flow calculations are made using PowerWorld simulator [45].Power flow calculations results show possible congestion on one 110-kV transmission line (see Figure 7) in hours 10, 11, 12, 13, 14, 17, 18, 19, and 23, as shown in Figure 12.In the next step, it is necessary to calculate the ATC values of the critical line in the case without the WPP production.The calculated ATC values are shown in Table 3.In the next step, it is necessary to calculate the ATC values of the critical line in case without the WPP production.The calculated ATC values are shown in Table 3.In order to re-dispatch HPPs, it is necessary to firstly calculate PTDFs for the critical line, as shown in Table 4.It can be noted that production units in HPP4 are connected via step-up transformers to two different voltage levels (110 kV and 220 kV).Risk parameter α is set to 0.1 and the critical value of WPP output power is calculated according to the explanation in Section 2.3, as shown in Table 5. Figure 13 shows the results of the second optimization stage, i.e., changes in dispatch plan of the HPPs.A negative value of change represents an increase in output power and a positive value of change represents a decrease in output power.As can be seen from Figure 13, re-dispatching is present in the hours when the critical line is congested but also in a few hours (see HPP1) when the critical line is not congested.The reason is the complex hydrological couplings of the water reservoirs and the time delay between them.The highest value of re-dispatching is obtained for those HPPs with the highest PTDFcr (HPP4 and HPP1).Water spillage is not activated at any hour.
Figure 14 presents the comparison of water volume in the reservoirs obtained in the first and second optimization stage.As can be seen from Figure 14, the volume of water in the last hour is close to the optimal one obtained in the first optimization stage.The final step is to repeat calculations of power flow with re-dispatched values of HPP output power in order to check whether re-dispatching was successful or not. Figure 15 shows the power flow solution through the critical transmission line As can be seen from Figure 13, re-dispatching is present in the hours when the critical line is congested but also in a few hours (see HPP1) when the critical line is not congested.The reason is the complex hydrological couplings of the water reservoirs and the time delay between them.The highest value of re-dispatching is obtained for those HPPs with the highest PTDF cr (HPP4 and HPP1).Water spillage is not activated at any hour.Figure 14 presents the comparison of water volume in the reservoirs obtained in the first and second optimization stage.As can be seen from Figure 14, the volume of water in the last hour is close to the optimal one obtained in the first optimization stage.The final step is to repeat calculations of power flow with re-dispatched values of HPP output power in order to check whether re-dispatching was successful or not. Figure 15 shows the power flow solution through the critical transmission line in the case of original and re-dispatched HPP production plans.As can be seen from Figure 15, congestion is removed and the second optimization stage was successful.

Conclusions
Results of the case study suggest that the proposed optimization methodology can successfully be used for re-dispatching minimization when solving congestion in the transmission network.Redispatching is minimized, spillage is avoided, and the optimal level of water in the reservoirs is mostly preserved; thus, the main hypothesis of the paper is confirmed.Also, results show that, in the real and complex transmission system, re-dispatching is effective but expensive (large amount of re-

Conclusions
Results of the case study suggest that the proposed optimization methodology can successfully be used for re-dispatching minimization when solving congestion in the transmission network.Redispatching is minimized, spillage is avoided, and the optimal level of water in the reservoirs is mostly preserved; thus, the main hypothesis of the paper is confirmed.Also, results show that, in the real and complex transmission system, re-dispatching is effective but expensive (large amount of re- Comparison of the power flows on the critical transmission line with and without re-dispatching.

Conclusions
Results of the case study suggest that the proposed optimization methodology can successfully be used for re-dispatching minimization when solving congestion in the transmission network.Re-dispatching is minimized, spillage is avoided, and the optimal level of water in the reservoirs is mostly preserved; thus, the main hypothesis of the paper is confirmed.Also, results show that, in the real and complex transmission system, re-dispatching is effective but expensive (large amount of re-dispatching is needed to avoid congestion), and its usage needs to be minimized.Because re-dispatching is costly, its minimal usage is suggested only in a situation when congestion occurs.The TSO needs to evaluate which scenario would require lower cost-re-dispatching or reinforcements of the transmission network.Since HPPs are often used to regulate (balance) WPP production deviations, the further step in extending the proposed optimization methodology would be to include a balancing or intra-day electricity market, which would open up additional business opportunities for HPP owners.Such a model could utilize the possibilities of stochastic programming because WPP production introduces additional uncertainty in power system operation.Also, the next step is testing the developed optimization methodology using MAE and comparing the results with the situation when RMSE is used.In order to make the proposed optimization methodology more generic and applicable to every type of HPP, different variable head models will be investigated.Two possible approaches will be tested, i.e., MILP and mixed integer quadratic programming (MIQP), in order to find the approach that is most suitable for the developed optimization methodology.
V max (i) Maximal reservoir volume of HPP i.The unit is HE.V min (i) Minimal reservoir volume of HPP i.The unit is HE.
V set min (i) Minimum amount of water that can remain in the reservoir of HPP i in the last hour of the optimization period.This value is slightly smaller than the V(i, t = 24) obtained in the first optimization stage.The unit is HE.
V set max (i) The maximum amount of water that can remain in the reservoir of the HPP i in the last hour of the optimization period.This value is slightly higher than the V(i, t = 24) obtained in the first optimization stage.The unit is HE.
W a,min (i) Minimal amount of water that needs to be discharged from the reservoir i during the optimization period.This value is determined by the medium-term reservoir management plan.The unit is HE.
W a,max (i) The maximal amount of water that can be discharged from the reservoir i during the optimization period.This value is determined by the medium-term reservoir management plan.The unit is HE.w(i, t) The local inflow of water in the reservoir i in the hour t.The unit is HE.ρ(t) Forecasted day-ahead electricity market price.The unit is €/MWh.ρ f Forecasted average future electricity price (the average price for the next optimization period-next day).The unit is €/MWh.

C
Artificial penalty cost associated with water spillage.The unit is €/MWh.
The time delay, i.e., time it takes for the water from the upstream reservoir to reach the first downstream reservoir.

P f (i, t)
The amount of electric energy in every hour t (expressed as a constant power for one hour) for every HPP i that is contracted in advance by bilateral contracts.The unit is MW.
PTDF HPP i,k PTDF which determines the change of active power flow of transmission line k due to active power change of HPP i.
PTDF WPP v,k PTDF which determines the change of active power flow of transmission line k due to active power change of the WPP i. P v (v, t) Forecasted production of WPP v in the hour t.The unit is MW.

ATC k (t)
The available transmission capacity of the transmission line k in the hour t.The unit is MWh/h.

D(i, t)
Output active power of HPP i in the hour t obtained in the first optimization stage.The unit is MWh/h.Variables: Q as (i, a, j, t) Discharge of the linear segment j in the discharge characteristic of production unit a in HPP i during the hour t.The unit is HE.Q a (i, a, t) Total discharge through production unit a in HPP i during hour t.The unit is HE.

Q(i, t)
Total discharge of HPP i during hour t.The unit is HE.P a (i, a, t) Output electric power of the unit a in the HPP i during hour t.The unit is MW.P(i, t) Total output electric power of HPP i during hour t.The unit is MW.
z a (i, a, t) An integer variable that is used to model forbidden zones of the discharge characteristic of production unit a in HPP i. V(i, t) Volume of water in the reservoir of HPP i at the end of hour t.The unit is HE.

S(i, t)
The total spillage of water by HPP i during hour t.The unit is HE.

Figure 1 .
Figure 1.Relationships between the electricity market, transmission system operator (TSO) actions, and real-time delivery of electric energy.

Figure 1 .
Figure 1.Relationships between the electricity market, transmission system operator (TSO) actions, and real-time delivery of electric energy.

Figure 3 .
Figure 3. Discharge characteristics of hydropower plant.(a) Original discharge characteristic of the hydropower plant; (b) piece-wise linearized discharge characteristic with neglected variable head.Hn: net head in m; P: output electrical power of HPP in MW; Q: discharge of water through the HPP turbine in HE; HE: hour equivalent.

Figure 3 .
Figure 3. Discharge characteristics of hydropower plant.(a) Original discharge characteristic of the hydropower plant; (b) piece-wise linearized discharge characteristic with neglected variable head.H n : net head in m; P: output electrical power of HPP in MW; Q: discharge of water through the HPP turbine in HE; HE: hour equivalent.

Figure 4 .
Figure 4. Production characteristic of a wind power plant (WPP).vci: cut-in wind speed; vr: rated wind speed; vco: cut-out wind speed; Pr: rated electrical output power of WPP.

Figure 4 .
Figure 4. Production characteristic of a wind power plant (WPP).v ci : cut-in wind speed; v r : rated wind speed; v co : cut-out wind speed; P r : rated electrical output power of WPP.

Figure 5 .
Figure 5.An example of the probability distribution of WPP production forecast error.

Figure 5 .
Figure 5.An example of the probability distribution of WPP production forecast error.

Figure 6 .
Figure 6.Block diagram of the developed two-stage optimization method.

Figure 6 .
Figure 6.Block diagram of the developed two-stage optimization method.

Figure 7 .
Figure 7.The southern part of the Croatian transmission system

Figure 7 .
Figure 7.The southern part of the Croatian transmission system

Figure 8 .
Figure 8. Day-ahead electricity market price and total hourly load.Figure 8. Day-ahead electricity market price and total hourly load.

Figure 8 .
Figure 8. Day-ahead electricity market price and total hourly load.Figure 8. Day-ahead electricity market price and total hourly load.The modeled hydrological system consists of five cascaded HPPs, as shown in Figure 9.All details about the actual HPPs can be found in Reference [44].Energies 2019, 12, x FOR PEER REVIEW 17 of 26

Figure 10 .
Figure 10.Optimal day-ahead dispatch plan of the HPPs obtained by the first optimization stage.

Figure 11 .
Figure 11.The volume of water in the HPP reservoirs at the end of each hour.

Figure 10 .
Figure 10.Optimal day-ahead dispatch plan of the HPPs obtained by the first optimization stage.

Figure 11 .
Figure 11.The volume of water in the HPP reservoirs at the end of each hour.

Figure 11 .
Figure 11.The volume of water in the HPP reservoirs at the end of each hour.

Figure 12 .
Figure 12.Active power flow of the critical transmission line.

Figure 12 .
Figure 12.Active power flow of the critical transmission line.

Energies 2019 , 26 Figure 13
Figure13shows the results of the second optimization stage, i.e., changes in dispatch plan of the HPPs.A negative value of change represents an increase in output power and a positive value of change represents a decrease in output power.

Energies 2019 , 26 Figure 14 .
Figure 14.Comparison of the water volume in the reservoirs.

Figure 15 .
Figure 15.Comparison of the power flows on the critical transmission line with and without redispatching.

Figure 14 .
Figure 14.Comparison of the water volume in the reservoirs.

Energies 2019 , 26 Figure 14 .
Figure 14.Comparison of the water volume in the reservoirs.

Figure 15 .
Figure 15.Comparison of the power flows on the critical transmission line with and without redispatching.

Figure 15 .
Figure 15.Comparison of the power flows on the critical transmission line with and without re-dispatching.

Table 2 .
Wind speed forecast together with the associated uncertainty.WPP-wind power plant.

Table 3 .
Calculated available transfer capacity (ATC) values for the critical line.

Table 3 .
Calculated available transfer capacity (ATC ) values for the critical line.

Table 4 .
Calculated power transfer distribution factor (PTDF) values for the critical line.

Table 5 .
The critical value of WPP output power.