1. Introduction
Given its stochasticity and large scale, it is difficult to find a consistent operational policy for power systems with a predominance of hydroelectric resources. Consequently, the policy is usually obtained in a few steps, wherein the first one consists of solving the long-term hydrothermal scheduling (LTHS) problem. The LTHS focuses on obtaining an optimal policy that minimizes the operational cost over a pluriannual planning horizon, considering constraints related to the operating characteristics of the system and power plants. In such a long horizon, the primary source of uncertainty is associated with the inflows of hydroelectric plants, which are modeled in the LTHS problem by a multistage scenario tree. The breakthrough technique for solving this problem was the development of stochastic dual dynamic programming (SDDP) [
1], which breaks the problem down into subproblems that are dynamically solved into two steps:
i. obtaining trial points (forward pass) and
ii. building piecewise linear approximations of the cost-to-go functions using the trial points (backward pass). We suggest the reference [
2] for an overview of the LTHS problem, describing characteristics related to the formulation of the problem and solution algorithms. Likewise, [
3,
4] present tutorials regarding the application of SDDP to solve the LTHS problem.
For the inflow’s time series modelling (TSM), as widely discussed by [
5], some data properties must be captured by generation-scenario models, e.g., time-dependency, seasonality, and spatial correlation. Time-dependency modeling in the SDDP requires special care to guarantee the convergence properties. For instance, work [
6] proposes a multi-lag time-dependent structure for a TSM that ensures the cut-sharing requirement of the SDDP method. This multi-lag time-dependent is composed of an independent term, which accounts for the inflow randomness, and a linear combination of the time-dependent terms. This structure is used in the present work to adjust the inflow model to the SDDP algorithm. A similar approach is applied in [
7,
8,
9,
10,
11], ignoring the independence of the random term.
The SDDP requires a linear TSM (or convex models), which prevents models such as the lag-
p periodical autoregressive, in short, PAR(
p), from being used on non-normal datasets. As a result, alternative models must be formulated without nonlinear transformations, such as Box–Cox transformation, in the parameter estimation and scenario generation processes. This approach is used in [
7,
8,
9,
10,
11,
12,
13], wherein a three-parameter lognormal PAR model is estimated for energy and reservoir inflows, respectively. In any case, normalized datasets and multi-lag forecast models that follow the TSM structure of [
6] can generate negative inflow values, even if the parameter estimation is computed on a positive dataset. In the LTHS problem, negative inflows can lead to water balance constraint infeasibilities.
Additionally, negative realizations related to other time-dependent TSM, e.g., wind power generation and power demand, in SDDP may cause infeasibilities in the LTHS problem [
14]. In this context, this work discusses three strategies, used individually or combined, to deal with this drawback that preserves the statistical properties of the TSM and still guarantees the convergence of the SDDP algorithm. The strategies are:
Optimal value: In this case, an optimal inflow value is obtained by solving a hydraulic resource allocation problem. It is highlighted that this strategy can only be used in the forward pass. As far as we know, this strategy has not yet been explored in literature and consists of finding the optimal value for the inflow that guarantees the hydraulic balance constraint feasibility (even maintaining the inflow negativity).
Penalty: In this strategy, we insert the penalized slack variables in the objective function to assume the exact value, eliminating the nonpositive inflow values.
Truncation: If the inflow is negative, it assumes a value of zero.
Regarding the strategies already presented in the literature, penalty variables are commonly used to handle the negative inflows due to their easy computing implementation, as discussed in [
15]. However, it is pointed out that such a strategy generates inconsistencies between the SDDP forward and backward passes, hindering the convergence process. The truncation strategy is based on [
12], which indicates the use of a partially truncated model, allowing the generation of negative values by the PAR model. This strategy truncates these values to zero in the SDDP subproblems, preserving the negative value in the cut and the sequence of inflows, i.e., time series statistic properties are maintained. Another similar approach is proposed by [
16], in which the truncation point is the minimum historical inflow.
On the other hand, the authors in [
17] propose using a first-order multiplicative PAR(
p) model compatible with the SDDP algorithm, ensuring positive energy inflow values. Nevertheless, the models’ parametrization step must rely on datasets containing only positive values, which may not always be the case for water inflow values. Also, some alternatives to the PAR(
p) model are proposed in [
18,
19,
20].
This work carries out the following procedure to assess the impacts of the optimal value, penalty, and truncated strategies:
Optimization step: An SDDP run is carried out for each negative inflow strategy. At the end of each SDDP execution is obtained an operational policy.
Simulation step: The performance of the operational policy (obtained in the optimization step) is assessed via an out-of-sample simulation. The operational cost and the stored energy are considered for the performance comparison.
Thus, the main contributions of this work are:
Present the main strategies employed in literature to deal with negative inflows (penalty and truncation), as well as propose a novel strategy called optimal value;
Compare these strategies individually and combine them to improve the operating policy, i.e., an operating policy that performs better in out-of-sample inflow scenarios.
Finally, this paper is organized as follows:
Section 2 shows the TSM for river inflow generation and the strategies to deal with negative inflows;
Section 3 presents numerical convergence evidence and the assessment of operational policies obtained from different negative inflow strategies. For that, data from the entire Brazilian power system is used. Finally,
Section 4 highlights the final remarks.
2. Method
A test power system is used to illustrate the strategies to deal with the negative inflows generated by the TSM.
Figure 1 shows the power system’s diagram, composed of two cascaded hydropower plants (HP) and four thermopower plants (TP). These plants meet a constant demand of 450 MW via a single-bus model.
The hydraulic coupling of the hydro plants is shown in
Figure 2, where the upstream HP1 can control the amount of water that flows downstream into the run-of-river HP2. In this figure,
yh is the incremental inflow volume related to the HP
h.
In this work, we focus on the linear TSM for river inflow with lag p [
16,
21], described by:
where:
x is the generalized inflow forecast;
is a linear coefficient;
is the past inflow, and
is the model’s residual, wherein the randomness is presented.
Using Equation (1), the stochastic process of river inflows may be generalized to river basins, sets of rivers, or reservoirs. The generalized inflow can be decomposed into incremental inflow, for each reservoir h, using the linear transformation:
where
is the participation coefficient of each hydropower plant in the river basin inflow, and
is the degree of freedom of the historical distribution.
Regardless of all the parameters estimation process, the target of this work is how to deal with the negative values of that can lead to an infeasible linear problem (LP) when applying the SDDP algorithm. This test problem is explored for practical reasons, considering one lag of temporal dependence between periods.
Below are described the strategies to deal with the negative inflows.
2.1. Optimal Value Approach
The optimal value is a novel approach that focuses on finding the optimal inflow value that makes the problem feasible. Hence, it is necessary to find the value that does not violate the water balance equation, which can be found by solving a simple hydraulic resource allocation problem. It is important to highlight that the optimal value may still be negative, as long as the LTHS problem becomes feasible. Such behavior aims to find a less relaxed problem, more adherent with the stochastic process. The following subproblem represents one stage of the LTHS problem:
Equation (3) is the operating cost function , which is composed of the thermal costs. Constraint (4) is the balance between supply and demand. As can be seen, we assume that hydro generation of HPh is equal to the qh. In turn, (5) and (6) are the water balance constraints in the HPs, wherein i is the initial storage volume, and sh is the spilled volume of HPh. The terms ( are defined as the minimum values that guarantee a feasible subproblem, depending on the values of (). Equation (7) is the inflow related to the river basin considering a lag one dependency into the stochastic process, i.e., the current inflow depends on past time-step inflow. Equation (8) are the incremental inflow volumes from each HP. Equations (9) and (10) are the variable limits.
As the optimal value for inflow volumes (
) can be previously obtained, the hydraulic resource allocation problem is defined by:
The water allocation problem consists of the LTHS equations related to hydroelectric plants and the slack variables for the incremental inflows. Therefore, when the problem (3)–(10) is infeasible, the water allocation problem is solved to define the minimum value of the slack variables () that makes the problem feasible, and then the LTHS is solved again.
To illustrate this approach, the cost function,
, is assessed for a range of initial volumes with the past inflows, considering
. The result is shown in
Figure 3. It is clear that
is non-convex, which makes impossible the use of the optimal value approach in the SDDP backward phase. Using a 2D approximation for the function on
,
Figure 4 shows the optimality cuts (orange lines), approximating the cost function (blue line). Note that when the function is non-convex, the cut (orange dashed line) fails to be a valid lower bound for the cost function. Another approach can be implemented to solve this issue, as described in the following sections.
2.2. Penalty
In the penalty approach, a slack variable is included to assume the exact value to eliminate the inflow’s negativity, and it is penalized in the objective function. Therefore,
receives a new element that penalizes (
):
A critical point in this strategy is the definition of the penalty value (
). If this value is too low, the model may use the slack variable such as a “thermal power plant,” generating energy based on a cost per MW payment. Defining the penalty with the same value as the most expensive thermal (500
$), we have the result of
Figure 5a. For a multistage problem, this strategy is even more critical because there is no guarantee the penalty value does not allow an excess of virtual water
or, even worse, overprices the cost to go function, once critical scenarios are evaluated in the SDDP framework.
Note that the use of the penalty approach also convexifies the function, for which
Figure 5b shows the comparison between the penalty and the optimal value approach, considering
. As the slack variable value is defined by optimization, the penalty strategy provides a good approximation of the cost function. However, when the slack variable is used, the slope of the function is defined by the penalty value.
2.3. Truncation
Another way to deal with the infeasibilities produced by the negative inflows is the truncation approach proposed in [
12]. By this approach, there is a condition that, if (
), the slack variable (
) assumes the inverse of the negative inflow, as follows:
Figure 6a shows the cost function using the truncation approach.
It is clear that the approach proposed in [
12] produces a non-convex function for a substantial part of
domains, since the TSM used in the previous problem is a generalized model for the river basin, following the scheme of
Figure 2. To produce a convexified problem, at least for most of the
domain, the slack variable must be added to compensate (
) as following:
The corrected
of the truncation approach is shown in
Figure 7.
Besides the constant behavior at the beginning of
, wherein
, the rest of the function is convex, and the cuts are valid inferior boundaries. Therefore, the truncation approach implies that
will be convexified by the cuts in the SDDP framework. However, this also implies that the estimation of the cost function’s lower and upper bounds must be reviewed for the SDDP framework, as discussed in
Section 2.1.
A key point for the use of the generalized truncation approach is the difference between the ratios () of the reservoirs of the same river basin. According to Equation (44), the higher is the difference, the more relaxed is the version of obtained. In this case, a better approach is to formulate a TSM for each reservoir, where ().
2.4. Truncation Combined with Penalty
A better version of the formulation of
, i.e., as close to
as possible, can be defined by combining truncation and the penalty formulations. The slack variable is now both truncated and penalized as follows:
Therefore, the slack variable is bounded by zero and the maximum value between the individual power plant incremental inflows. The resultant cost function
is presented in
Figure 8.
2.5. Convergence Criteria
As mentioned in the previous sections, the non-convex parts of
and
will be convexified by the cuts computed in the SDDP framework. Therefore, depending on the values of
, the results of the primal LP problems of
and
formulated in the previous sections will be lower than the convexified version of these functions on their master problems, i.e., LP problems composed of the cuts. To illustrate this behavior, the primal and master problems of
are shown in
Figure 9 for (
) and a range of values of (
):
For ( < 80), the value of the primal problem (blue line) is lower than the value of the cut activated on the master problem, which means that the value of the primal problem may not be a good estimator for the upper bound of the operational cost function, especially in the non-convex domain.
Therefore, the lower and upper bounds must be estimated by the solution of the current master problem. In the SDDP framework, this means that a new version of the master problem must be solved at the forward pass exclusively to estimate the lower and upper bounds. Since the SDDP combines the primal problem of a stage (
) with the master problem of the next stage (
), the new master problem must be formulated for each stage
depending on the inputs of scenario
as presented in (54)–(57):
where (
) is the number of realizations in
; (
) and (
) are respectively the cost and the probability of the realization (
) in (
); (
) is the expected cost in (
), and (
), (
), (
) are respectively the operational cost and the cut’s RHS and slope coefficients.
Assuming a multistage problem with (
) stages and (
) scenarios, the lower and upper bounds must be computed as shown in (58) and (59), respectively.
where:
maps the realization (
) associated with scenario (
) and stage (
).
3. Results
This section compares the proposed strategies to deal with negative inflow values using the Brazilian long-term hydrothermal scheduling problem. The Brazilian interconnected power system comprises 163 hydropower plants (97 are run-of-river) and 127 thermal power plants. The goal of the problem is to satisfy the demand at the lowest possible cost with a risk-averse measure, considering five years divided into monthly time-steps.
Figure 10 shows the power availability and demand.
The inflows are modeled into a multistage scenario tree using a PAR model with maximum order 6. This work considers a TSM for the 21 river basins of the system.
Figure 11 shows a comparison of the natural energy between the historical data scenarios (repeating its values for all years as a benchmark), the observed inflow scenario from January 2020 to October 2021, and the inflow scenarios randomly obtained for the optimization process (8160 scenarios) and the simulation step (2000 scenarios), both presented in
Section 3.2. Note that the realizations for the first three months obtained by the TSM model present scenarios below the average of the historical natural energy, which is due to the inflow trend in the PAR model before January 2020. The rest of the TSM scenarios are entirely aligned with the historical data. It is highlighted that the observed inflow scenario from January 2020 is an outlier (severe scenario) of the historical dataset.
The results are divided as follows:
Section 3.1 presents an algorithm’s convergence proof for the different strategies to deal with negative inflow values. In addition,
Section 3.2 indicates the SDDP considerations to obtain the operational policy assessed in an out-of-sample simulation and considering the observed inflow scenario.
3.1. Whole Tree Optimization
Initially, the optimization is performed by solving the whole tree to prove the validity of the algorithm’s convergence, as pointed out in
Section 2.5. As the problem grows exponentially with the number of stages, a reduced problem is considered to solve the whole tree, with two inflow residual realizations per stage and an optimization horizon of 10 stages.
Figure 12 shows the convergence of the SDDP algorithm considering the truncation, penalty, and truncation combined with penalty strategies. The figure shows that the gap between the lower and upper bound for each strategy is below 0.1%. In this way, the figure proves that, when adopting the truncation strategy, or truncation associated with the penalty, it is necessary to change the calculation of the lower and upper bounds, according to
Section 2.5, so that the algorithm converges.
Moreover, the strategies do not converge to the same value since each strategy deals differently with negative inflow. For instance, the truncation strategy converges to the lowest value, which does not indicate this is the best strategy. As the truncation strategy sets the negative inflows equal to zero, this strategy most relaxes the problem. The following section compares the strategies to a large scenario tree with a subsequent simulation of the operation policy obtained in the optimization step.
3.2. Stochastic Optimization and Operational Policy Simulation
This work considers the following SDDP settings for the optimization process:
85 iterations (forward/backward steps);
96 forwards per iteration distributed in a synchronous parallel setting. At the end of the whole optimization, 8160 scenarios are optimized;
96 inflow realizations per stage;
Five years horizon with monthly stages;
Selection cut strategy of [
22];
CVaR1- α with parameters α = 0.25 and λ = 0.5.
Below are the cases compared in this study:
Trunc.: Forward and backward steps use the truncation strategy of
Section 2.3;
O.V + Trunc.: Forward uses the optimal value approach, and the backward step uses the truncation approach;
Trunc. & Pen.: Forward and backward steps use the truncation combined with the penalty strategy as presented in
Section 2.4;
O.V + Trunc. & Pen.: Forward step uses the optimal value approach, and backward step uses truncation with penalty;
Pen.: Forward and backward steps use the penalty approach of
Section 2.2;
O.V + Pen: The forward step uses the optimal value approach, and the backward step uses the penalty approach.
Figure 13 compares the lower-bound evolution throughout 85 iterations of the optimization process. The iteratively random selection of different first-stage realizations is responsible for the lower-bound drops between iterations. Note that the negative inflow strategy has a considerable impact on the lower bound of the problem. For instance, the lower bound level of case O.V Trunc & Pen increases 1.5 times compared to the O.V Pen. However, as the penalty strategy consists of penalizing the slack variable related to the negative inflow, the lower bound of the strategies that involve penalty are, in any case, superior to the others. Therefore, the lower bound is not comparable between all strategies.
At the end of the optimization process, a set of approximations (cuts) of the cost-to-go functions are obtained per stage. These cuts are an operational policy since they have the information (future water cost) of how the hydro resources must be used. The following sections assess the operational policy obtained for all cases with two simulations: i. 2000 out-of-sample scenarios and ii. the observed inflow scenario between 2020 and 2021. The simulation process uses the same hydrothermal system configuration as the optimization process.
3.2.1. Out-of-Sample Simulation
The out-of-sample simulation aims to verify the performance of the policy (optimality cuts) obtained in the optimization step in scenarios different from those used in the optimization. For this simulation, 2000 scenarios are used, which has the distribution shown in
Figure 11.
Figure 14 presents the operational costs obtained simulating the policy obtained from all cases tested. As it can be noticed, the higher operational cost is obtained using the truncation strategy. When
Figure 13 and
Figure 14 are compared, the truncation strategy has the lowest optimization cost in
Figure 13 and the highest simulation cost in
Figure 14. This fact suggests that the truncation strategy relaxes the problem. Therefore, as the problem does not have to deal with the most critical scenarios in optimization, its policy is less risk-averse.
On the contrary, the strategy with the lowest average operational cost is the O.V + Trunc. & Pen, which combines the three strategies proposed. This strategy seeks to be more austere in the backward step when the optimal value strategy cannot be used. Thus, it only allows the slack variable to assume values greater than zero when there is a negative inflow value and makes its value the closest to necessary, avoiding the penalty. A similar average cost is obtained by combining the truncation strategy with the optimal value. However, it is essential to point out that the policy obtained with the O.V + Trunc. result in an asymmetrical distribution of costs since the mean value of the distribution is displaced from the boxplot, showing the existence of outliers with very high costs. Therefore, in wet scenarios, the strategy behaves well; however, when some extreme scenario presents itself, the system does not reserve enough water and needs to dispatch more expensive thermopower plants and increase the deficit risk.
Comparing the Truncation operational cost with the one from O.V + Trunc. and O.V + Trunc. & Pen, the former has an average cost 15% higher than the latter.
Furthermore, it is significant to note that the penalty strategy, widely used in the literature, presents an average operational cost 11% lower than the truncation strategy, being the best strategy among the two. However, the penalty also results in a 5% higher cost than the O.V + Trunc strategy or O.V. + Trunc. & Pen. and 2% higher than O.V. + Pen, which shows that the optimal value strategy, first presented in this study, makes the calculated policy more consistent with reality.
Figure 15 exhibits the stored energy for all cases in the percentage of the maximum energy stored in the reservoirs. The energy stored level in the reservoir can impact how much energy needs to be dispatched from the thermopower plants at each stage. When the system stores less water in the reservoirs, it is believed that this energy supply is not needed; on the other hand, if some extreme scenario materializes, there may not be enough water to supply demand, and costly thermal power plants have to be dispatched. Thus,
Figure 15 shows that the truncation strategy results in more empty reservoirs, revealing that this strategy does not prepare the system for the risk of future droughts.
Moreover, strategies without truncation save more water in the reservoirs as they do not have the same level of relaxation in the problem.
3.2.2. Observed Inflow Scenario
This subsection tests the policy in the observed inflow scenario, referring to January 2020 to October 2021. As shown in
Figure 11, the performed scenario is an outlier and critical from a hydrological point of view.
Figure 16 shows the marginal cost found for the southeast subsystem of the Brazilian power system. This subsystem is the most important in Brazil, with the most significant demand to be met and the most remarkable power generation capacity.
Note that the truncation strategy presents a peak in its marginal costs in August and September 2021, which shows that it did not take precautions against a critical inflow scenario, resulting in the need to dispatch more expensive thermopower plants. On the contrary, the scenarios with lower marginal cost peaks involve the optimal value strategy. For all combinations (Trunc., Trunc. & Pen. And Pen.), when the optimal value strategy is added, the marginal cost decreases, showing that the use of this strategy tends not to relax the problem as much, since the inflow is only modified enough to avoid the problem infeasibility.
This behavior is also observed in
Figure 17, which shows the storage level in the reservoirs for each tested strategy. The results for the cases involving the truncation strategy are the ones that present smaller storage values, while the ones that involve the penalty strategy are the ones that result in larger storage values.
While interesting, it is essential to note that the observed scenario is critical, so the policy must operate a system in an extreme situation.
4. Conclusions
To sum up, this study has presented a comparison between strategies to deal with negative inflows in the LTHS problem. First, it was discussed how negative inflows occur in the problem, which may arise from the TSM model or negative values presented in the historical observations. Then, three strategies are presented to deal with the infeasibilities caused by negative inflows and the combination of these strategies.
The main conclusion of this study is that, despite being a problem seldom discussed in the literature, the strategy to deal with negative inflows dramatically affects the operation policy obtained in the optimization of the LTHS problem.
When considering the truncation strategy, which is the most relaxed strategy to deal with negative inflows, the operational cost can be 15% higher than the O.V + Truncation and O.V + Truncation & Pen strategies present the lowest operational cost. This result also shows that the optimal value strategy, first presented in this work, results in operational policy that better represents the uncertainties since, through this strategy, the least possible relaxation of the problem is sought. Despite providing a better solution, it is important to emphasize that the optimal value strategy increases the complexity of the implementation and solution of the problem, since, if the negative inflow causes infeasibility, in addition to solving each stage a LTHS subproblem, it is also necessary to solve a problem of hydraulic resources allocation.
Furthermore, when the policy was tested in a real and critical scenario, the marginal cost obtained by applying the truncation strategies showed sharp peaks, which demonstrates that the relaxation makes it unable to protect itself against more extreme scenarios, since it does not feel the need to store enough water.
For future work, it is important to compare the strategies in a model that considers the inflows of hydropower plants individually and does not aggregate them by river basins. In an individualized system, inflow negativity is more present and can change the strategies performance.