Reservoir Operation Applied to Hydropower Systems

Currently, studies on hydropower systems operations primarily focus on multiple uses of water, i.e., water resources exploitation and control systems to satisfy human needs and demands connected to economic and social activities. Focuses include power generation, urban and industrial water supply, irrigation, navigation, leisure and recreation-related uses, flood control and water pollution control.

In the last few decades, efficient mathematical algorithms have been developed to solve linear and nonlinear optimization problems.The development of efficient optimization routines, along with the rapid development of informatics, which resulted in portable computers with high processing and data storage capabilities, enabled the development of models that are more efficient and easier to process.
A program that incorporates such algorithms is the MINOS (Modular In-core Nonlinear Optimization System) package developed by Stanford University's System Optimization Laboratory (Murtagh & Saunders, 1995).An important application of this program was reported by Tejada-Guilbert et al. (1990), who used MINOS for NLP to optimize the operation of the California Central Valley Project.The package was used to maximize the economic value of the energy generated each month.This work presented a very interesting discussion about the optimization of nonlinear systems and the applicability of MINOS.
An example of stochastic DP, Barros (1989) analyzed the operational problem of reservoirs with an implicit stochastic focus, where the randomness of the process was considered, beginning from the generation of a synthetic series based on the Monte Carlo method.
In an article authored by Kelman et al. (1990), a sampling stochastic dynamic programming technique was used to model the complex structure of the spatial and temporal correlation of flows into reservoirs using a large number of samples in a temporal flow series.Braga et al. (1991) presented an application of stochastic DP with an explicit focus, using the one-at-a-time technique, which is similar to the stratagem of successive approximations to attenuate the "curse of dimensionality".
An application to compare deterministic and stochastic optimization was presented by Lund & Ferreira (1996).The methodology was applied to a system of six reservoirs in the Missouri River (USA).The results involved issues of applicability and limitations in the use of deterministic optimization for large systems.
With respect to the operation of systems with conflicting uses, Ponnambalam & Adams (1996) used stochastic optimization to define rule-curves for a system of reservoirs used for electric energy production and irrigation in India.According to the authors, the results obtained from the application of the optimized operational rules to a simulation model indicated a gain in the system's performance compared with real operational data.
In the context of the problem of defining operational rules for reservoir systems, Oliveira & Loucks (1997) used genetic search algorithms and presented a methodology to generate a set of operational policies, which were tested on a simulation model.The policies that resulted in the best performance were selected and used to define new policies, which were again tested.The process evolved until the performances ceased to improve.The algorithm was applied to an electrical energy production and supply system with promising results.Francato & Barbosa (1997) analyzed several factors that could potentially influenced the results from hydroelectric system optimization models.Their study focused on aspects relating to the type of objective function and the topology of the system.Their analyses were performed based on the models of Emborcação and Itumbiara reservoirs located in the Paranaíba River in Brazil.Labadie (1998) authored a critical review of the principal optimization models, emphasizing implicit and explicit stochastic optimization to treat the randomness of the processes involved in the operation of reservoirs.It is important to note the author's concern in placing the operational problem as part of a decision-making support system to ensure the effective implementation of policies originating from research and development groups.
A reference integrated LP and DP models for the operation of reservoir systems was presented by Braga et al. (1998), where the authors developed the SISCOM (Sistema Computadorizado de Apoio ao Planejamento e Operação de Sistemas Hidroeléticos) model to optimize the operation of Brazil's hydro energy system.Philbrick Jr. & Kitanidis (1999) also analyzed the problem concerning the operation of reservoirs, comparing results produced by deterministic optimization and by stochastic optimization.The authors concluded that the deterministic approach tended to produce pseudo-optimal results that may underestimate the benefits associated with the systems.
An article by Peng & Buras (2000) presented another MINOS application to optimize the operation of reservoirs, emphasizing that the evolution of computers and operational research algorithms have expanded the use of packages for solving large LP and NLP problems.The authors developed a model of reservoir systems with multiple objectives, using the implicit method to consider the stochastic nature of the inflows.Lopes (2001) discussed NLP applications in the operation of hydroelectric plant systems, obtaining rules of operation according to the system's topology.For parallel configurations, the author suggested that reservoirs with a lower head loss per unit volume (drop reduction factor) should be emptied first.For systems in series, the reservoirs should be emptied in an upstream to downstream sequence, except when the differences between the head reduction factors indicate the contrary.This work also emphasized the need to consider nonlinear treatment when the reservoirs are used to generate hydroelectricity to obtain correct productiveness values (magnitude expressed in MW/m 3 .s - ) as a function of the head.Barros et al. (2003) also used MINOS in a SISOPT model to deterministically optimize the operation of large electrical energy generating systems.The model optimized the operation using the LP technique and successive linear programming (SPL) and allowed the user to define objective functions, such as the minimization of spillage and minimization of quadratic deviations in relation to a rule-curve, among others.
Motivated by the current conjuncture that imposes the intensification and improvement of the performance of existing systems, Labadie (2004) authored a new review on the state-ofthe-art on operation of reservoir systems.In the article, the author discusses stochastic optimization methods for both implicit and explicit schemes, involving DP (and its derivations), linear and nonlinear programming, network-flow models and multi-objective optimization models.He also described heuristic programming methods, such as neural network models and fuzzy mathematics techniques.It is interesting to note the author's comments concerning the present difficulties concerning how to deal realistically with the problems relating to hydrological uncertainties.Lopes (2007) developed optimization models based on the equivalent reservoir approach applied to the Brazilian electrical system using the commercial nonlinear programming packages MINOS, SNOPT (Sequential Non-linear Optimiser) and CONOPT (Constrained Optimization) with the support of the optimization language GAMS (General Algebraic Modelling System), where the spreadsheet optimizer SOLVER was also used.
The HIDRO model, proposed by Zambon (2008), evolved from the SISOPT model.However, the LP and SLP were no longer used.The objective function sought to minimize the supplement of power generated by thermal power plants to meet energy demand.The objective function proposed by Zambon minimized the square of the difference between the energy demand and energy production.It is therefore a model to be solved by NLP.The decision variables include the water discharge and spillage from each reservoir.To generate a complete and feasible initial solution for the NLP, it was developed a simulator that had three options: operation as run-of-river power plants, operation considering the maximum flow through turbines and flow through turbines and spillage defined by the user.
In the same study, Zambon (2008) proposed the TERM model, which aggregated the thermal power plants and the energy demands into subsystems.The objective function proposed by Zambon minimized the total cost of thermal generation, exchanges and deficits in each time interval.The input data for each subsystem included the demand forecast, the generation by small hydro and nuclear plants, the resulting HIDRO model generation, the imports and exports of energy, the inflexible thermal generation limits, the limits of exchange between the subsystems and the cost of thermal generation for each subsystem.The decision variables included the additional thermal generation and exchanges in each time interval for each subsystem.Zambon (2008) also proposed the implementation of the model, HIDROTERM, which used an iterative process between the TERM and HIDRO models or by a unified formulation.In the model, one could choose the minimization of the quadratic thermal complementation used in the HIDRO model or the minimization of the sum of the cost of thermal generation, exchanges and the deficit used by the TERM model as the objective function.
From the most recent works, it can be concluded that many studies and applications have used packages that solve linear and nonlinear programming problems, which is associated with the development of programs and computers that provide increasingly fast solutions to increasingly complex problems.Moreover, many of these packages can be used in conjunction with graphic interfaces that allow for a high degree of generalization of the problems and their use in modeling a variety of systems.

Methodology
The methodology described in this chapter is intended to improve the modeling of multipleuse reservoir systems, where alternative ways to solve the problem are explored.Currently, the model of these systems, as used by ONS, the Brazilian agency in charge of the power generation systems operation, considers other water uses as constraints.Another aspect to be considered is the issue of hydrological risk associated with natural flows into the reservoirs.
The methodology used is general because it can be applied to any type of water resource reservoir system.
The optimization problem of a multiple-use reservoir system may be formulated as follows: , 11 where OF is the objective function; R i,t is a function that measures return and/or performance associated with reservoir i at an interval t; i = 1, 2,...,m (m = number of reservoirs in the system); t = 1, 2,...,n (n = number of time intervals).The equation is subject to where QD i,t = outflow from reservoir i throughout time interval t (decision variable) in m 3 /s; QC i,t = flow of consumptive use of reservoir i throughout time interval t (this may be a decision variable or only a restriction, depending on the type of objective function) in m 3 /s; QA i,t = inflow to reservoir i throughout time interval t (including the flow in the intermediate drainage area between reservoir i and the reservoirs that lie immediately upstream plus the sum of the outflows from these reservoirs) in m 3 /s; K = a constant to convert flows from m 3 /s to monthly volumes in m 3 , or multiples of this unit; VF i,t = volume of reservoir i at the end of interval t (state variable) in m 3 , or multiples of this unit, EV i,t = volume evaporated from reservoir i during interval t in m 3 , or multiples of this unit.
In an attempt to formalize and rationalize the solution of the optimization problem in the case of multiple uses, two methods may be defined: Weighting Method.This method includes several direct or indirect decision variables in the objective function, where examples include power generation flows, irrigation flows, flows for other consumptive uses, minimum and maximum levels for navigation, recreation, conservation, etc.In this case, the restriction equations considered are the physical characteristics and water balance.In this method, the objective function is a weighted type, where the weights of each objective are defined by the stakeholder.
Restriction Method.This method includes a single use in the objective function, for example, power generation, and considers the other uses in the restriction equations.One may then determine the exchange relations between uses (Pareto curves), varying the limits of fulfilling each objective as related to the other.
Considering both irrigation and power generation, the solution of the two methods proposed is presented below.In this case, an attempt is made to maximize the mean energy and mean discharge for irrigation throughout the period of analysis.
Objective function restriction method: , 1 where QI i,t = irrigation flow supplied by reservoir i during interval t; DI i,t = irrigation demand to be fulfilled by reservoir i during interval t; E i,t = energy generated by the plant of reservoir i during time interval t;  and  are the weighting parameters for energy and irrigation, respectively.
The parameters,  and are values that express the relative importance of each use.In a way, they indicate an order of preference of one use over another, i.e., a hierarchical order.These parameters are assigned subjectively by the stakeholders and/or managers.In this chapter, the parameters were subjected to a sensitivity.
When one of the uses of a given system is to generate electric energy, the problem of reservoir operation must be complemented by functions that rule energy production, as follows: where E i,t = the mean generation of reservoir i in interval t, in average MW, which is the energy corresponding to the mean power generated over a month or a certain number of months; ng, nt and nh = the efficiencies of the generator, turbine and hydraulic circuit (penstock and restitution), respectively; HB i,t = mean monthly gross head in reservoir i during interval t in meters (difference between water levels in the reservoir and plant tailrace); QT i,t = turbine discharge corresponding to reservoir i during interval t in m 3 /s.
Next, the solution for the operation of a reservoir system to generate electric energy based on the initially proposed optimization problem is presented.In this case, an objective function is used, which seeks to maximize the mean energy of the system over the period of analysis.where QV i,t = spilled discharge from the plant corresponding to reservoir i during interval t in m 3 /s; PI i = installed capacity of plant i in MW; ID i = availability index of generators in plant i, which defines the mean power capacity available over time, where the scheduled or forced downtime for maintenance and other reserves have been discounted.
The objective function represented in eq. ( 10) is non-linear because PRT i, is a non-linear function of reservoir volume and of the released flow (sum of turbine and spilled discharges).To obtain the value of PRT i,t , the mean gross head over interval t should be calculated.This head is obtained from the difference between the water level in the reservoir (upstream level) and the downstream water level.The water level in the reservoir is calculated based on the elevation volume curve.The downstream water level is obtained from the rating curve (stage-discharge relation) of the plant tailrace.Both relations are represented by non-linear relations.
The optimization model formulated is stochastic in nature because the natural flows into the reservoir are random variables associated with time, whose future performance is unknown.
One way of treating the problem indirectly is through the implicit method.Based on a time series generation model, several sequences of synthetic natural inflows are generated, which are then used as input data to solve the optimization problem.The results obtained are statistically analyzed, and then the system operation rules, the levels to ensure fulfilling demands, and others are defined.
The generation of synthetic inflows was conducted using AR (autoregressive) and ARMA (autoregressive and moving average) models, which are the most commonly used models in hydrology and many other areas, with some adjustments depending on the type of time series modeling and application.There are also MA (moving average) and ARIMA (autoregressive integrated moving average) models.
The AR model of order p, which is usually referred to as AR (p), is presented by Salas (1993) as follows: where y t = the random variable modeled, i.e., the time series under study; p = "lag" or order of the model, indicates the degree of temporal autocorrelation;  t = uncorrelated noise -the random variable normally distributed with mean zero and standard deviation   .
Because  t is normally distributed, y t is normally distributed as well.The model parameters are ,  1 ,  2 ,..., p and   .The parameter,  can be estimated by the mean of y t , and the other model parameters are estimated by the Yule-Walker equations.All these equations are presented in detail in the reference.
The ARMA models with p autoregressive and q moving average parameters, known as ARMA (p, q), are presented by the referred author, as the following equation: The last term in eq. ( 19) is the moving average term.The other terms correspond to the portion of the autoregressive model, as shown in eq. ( 18).The moving averages parameters are  1 ,  2 ,..., q .A moving average model, MA (q), displays the corresponding terms, i.e., the last term in eq. ( 19).The equations for estimating the parameters of ARMA models are also presented in Salas (1993).

Case study
The São Francisco River basin, which is shown in Figure 1, has seven hydropower plants on its main course, two of which, Três Marias and Sobradinho, have a large accumulation capacity.These two reservoirs allow plurianual discharge regulation, i.e., they have filling and emptying cycles of over one year.The Itaparica reservoir located downstream from Sobradinho presents an annual regulation capacity, and the other reservoirs have a small water accumulation capacity.Downstream from Itaparica are located the power plants of the Moxotó-Paulo Afonso complex and the Xingó hydroelectric plant.
The model was prepared based on the structured language, GAMS, to solve mathematical programming problems.The solver used was MINOS, which can solve linear and non-linear programming problems.
The water uses in the case study were electric energy generation and irrigation, which are the main conflicting uses in the São Francisco basin.
The optimization problem also took into account other operational restrictions for each reservoir/plant.The time interval adopted for calculation was on a monthly basis, where the horizon for the analysis period is 6 years (72 months), which was chosen according to the duration of the recorded critical period observed in most river basins in Brazil.Table 1 shows key information related to the hydropower plants and reservoirs of the São Francisco system.The model was developed in two modules.The first module treated the problem according to the restriction method.In this case, the objective function sought to maximize the energy generated by the system over the period of analysis.The second module focused on the problem according to the weighting method, where the solution included an objective function, which sought to maximize a weighting between the mean energy generated by the system and the total mean flow extracted from the system for irrigation.

Analysis for multiple uses
During this phase, a time series of mean monthly flows lasting six years was used, which consisted of pre-defined hydrological scenarios.

Selection of hydrological scenarios
The studies for the selection of hydrological scenarios were developed based on the Três Marias and Sobradinho flow series that were considered "key" series in this study.
The values of the correlation coefficients of the Três Marias series and the incremental Sobradinho series were on the order of 0.65 for both the annual series and the monthly series.This value indicates that there is a considerable spatial correlation between these two flow series that must be taken into account when formulating hydrological scenarios.
To select the scenarios, the moving averages of six consecutive years were calculated for the two flow series.Based on the joint distribution of these two variables, the cases that correspond approximately to the 1 st , 2 nd and 3 rd quartile were selected, i.e., periods of six consecutive years whose moving averages were associated with joint cumulative probabilities, equal to 25%, 50% and 75%.These scenarios were called "dry", "median" and "wet", respectively.

Multiple use analysis: restriction method
The processing used to analyze the restriction method using the model was done based on the maximization of the mean energy generated in each time sequence considered.The flows diverted for irrigation were treated as constraints.The three hydrological scenarios selected plus the scenario corresponding to the critical period of the interlinked systems, which occurred during the first half of the 1950s, were considered.
The results obtained are reproduced in Figure 3, where the exchange relationship can be seen, i.e., the trade-off between irrigation and hydroelectric generation in the São Francisco system.The curves presented in this figure are the Pareto curves.The gradients of these curves indicate the trade-off value between these two uses.In the case of the dry scenario and the critical period, this gradient was on the order of -2 average MW of generation per m 3 /s used in irrigation.For each m 3 /s diverted for irrigation, approximately 2 average MW are lost, which over a year totals 17.5 GWh of power generation.
In the cases of the median and dry scenarios, these gradients are on the order of -1.3 and -0.8, respectively, as a consequence of more water availability contained in those scenarios.
Based on these results, one can note the influence of the hydrological scenarios on the tradeoffs between these two uses.In this case, because the irrigation flow is a restriction that must always be met, water availability regulates how much may be generated by the hydroelectric plants.

Multiple use analysis: weighting method
To evaluate the weighting method, the module for this type of formulation was used.To simplify the analysis, complementary weighting parameters,  and  were selected, i.e., values whose sum is equal to the unit.However, there was no need for these parameters to be complementary; they only needed to express an order of preference of one use as compared with the others.In Figure 4, the results obtained for the dry scenario are shown.
According to these results, there was a region where the trade-off between irrigation and energy occurred more intensely.This region corresponded approximately to values of  between 0.25 ( = 0.75) and 0.60 ( = 0.40).The maximum and minimum limits were outside this region for the two uses.In other words, for values of  below 0.25 ( above 0.75), the upper limit of irrigation flow was found.In this case, the energy values were minimal, corresponding to approximately 5750 average MW.For  above 0.60 ( below 0.40), the minimum values for irrigation were found.However, these cases resulted in the maximum energy values, i.e., 6170 average MW.For the other hydrological scenarios, the results were similar.

Stochastic analysis of reservoir operation
Next, the treatment of the stochastic issue related to the random nature of natural flows into reservoirs was evaluated.These evaluations were developed beginning with the formulation of the optimization problem, according to the restriction method, imposing the irrigation demand as a constraint to be met by the system.The objective function adopted was the maximization of the mean energy over the period of analysis.
Stretches of six-year synthetic series were generated.To evaluate the influence of the number of series in the results, sets of 200, 500 and 1000 series were considered.
Based on the processing of the optimization model with the three sets of synthetic series (200,500 and 1000 series), the corresponding cumulative probabilities distributions of the mean energy, as shown in Figure 5, were calculated.
Additionally, 65 six-year series were generated based on the data of the historical series of mean monthly flows, available between 1931 and 2001.In this way, each 6-year series began each year of the historical trace up to the year 1995.
The probabilities distribution for the energy generated obtained from the history of flows is also presented in Figure 5, together with the distributions already defined based on the synthetic series.www.intechopen.com The Kolmogorov-Smirnov test was applied to perform a statistical evaluation of the hypotheses of equality on the distributions.The results of the test showed that for 90% and 95% levels of significance, the null hypothesis, i.e., equality among the four distributions, cannot be ruled out.Thus, based on these results, it was accepted that any of the distributions obtained produced statistically similar results.However, based on the visual analysis of the curves in the previous figure, a greater discrepancy was observed between the distributions due to historical traces compared with those resulting from the application of the synthetic series, particularly at the extremes.
Pareto curves were also developed for the 1 st , 2 nd and 3 rd quartiles for the case with 500 synthetic series.These curves are shown in Figure 6.
The gradients of these curves were -2.0, -1.7 and -1.3 average MW/m 3 .s - for the 1 st , 2 nd and 3 rd quartile, respectively.The values of the gradients determined for the scenarios extracted from the historical series, as stated before, were -2.0, -1.3 and -0.8 average MW/m 3 .s - for the dry, median and wet scenarios, respectively.Comparing these numbers, for the dry scenario, the same trade-off values were observed.In the cases of the median and wet scenarios, the trade-offs obtained using the synthetic series were more marked than those corresponding to the historical series.
Based on the comparison of the Pareto curves obtained by the synthetic series to those of the historical series, it was found that the curves essentially coincided with those of the dry scenario.For the median and wet scenarios, the curves obtained using the historical series were greater than those obtained using the synthetic series.For the median scenario, it was found that the increment in energy generated was between 3% and 6%, according to the flow used for irrigation.For the wet scenario, the increment varied between 8% and 13%.
These results indicate that, for the dry scenario, the results are the same, regardless of whether the hydrological scenario is extracted from a historical series or a synthetic series.For the median and wet scenarios, the use of synthetic series has repercussions with more severe evaluations for both the trade-offs (steeper gradients) and the values of the generated energy.

Conclusions
Because most reservoir systems exhibit a competition among water uses, it is necessary to define several specific rules to properly distribute the available water resources.To meet the commitments, water planners and managers must consider a number of allocation alternatives using system modeling tools.Therefore, it is possible to define the proper criteria and procedures to balance the allocation rules.In this paper, the model proposed was based on non-linear programming optimization, which was developed using the mathematical programming language, GAMS.The optimization problems formulated were solved by the linear/non-linear programming solver, MINOS.These tools were used to develop a model to optimize multi-purpose reservoir systems operations.
The case study was based on the São Francisco River basin reservoir system located in northeast Brazil.The system consists of six reservoirs, from which three are operated with active-storage.The reservoir's main purpose is power generation, but irrigation, flood control, water quality control, recreation and environmental preservation are also important issues.The major conflicts arise between power generation and irrigation demands.Therefore, the trade-offs between these two uses were analyzed in more detail.The total energy produced by the system is approximately 53,000 GW-hour per year, and the average estimated irrigation demand in the coming years is approximately 230 m 3 /s.
The trade-off analysis on the power generation and irrigation demands was formulated using the restriction and the weighting methods.In the first method, the objective function included only one water use, where the others uses were part of the restriction equations as constant or seasonal demands or constraints.In the second method, the competing water uses were included in the objective function and weighted by coefficients previously chosen by the water planners or managers.
The restriction method was simpler and more directly applicable.This method clearly showed the trade-offs between the competing uses.In other words, it was possible to evaluate the options and find a compromise between the water uses or users.However, it is a method that should only be applied when there are few uses (3 at most) due to the physical limitation in visualizing multidimensional graphic representations.
The weighting method enabled the analysis of a greater number of water uses.However, the weighting coefficients should be established between the competing uses, which introduce a certain degree of subjectivity into the analysis.
In the stochastic analysis, it was concluded that for the case studied, the number of synthetic series does not significantly influence the form of the probability distributions of the energy generated by the optimization model.However, comparing the results of the model obtained using the synthetic series and the historical series, it was observed that the model was sensitive to the synthetic series, particularly when the extremes of the probability distributions of energy were analyzed.
Comparing the Pareto curves defined based on the hydrological scenarios derived from the historical series and those defined based on the generation of synthetic series, the curves essentially coincided in the dry scenario.For the median and wet scenarios, there was a tendency to underestimate the curves obtained using the synthetic series compared with those based on the historical series.

Fig. 1 .
Fig. 1.Location of the São Francisco River basin in Brazil.

Fig. 5 .Fig. 6 .
Fig.5.Cumulative probabilities curves for energy obtained using the synthetic series and historical series -São Francisco River basin.

Table 1 .
Hydropower plants and reservoirs of the São Francisco system.