Optimization of Year-End Water Level of Multi-Year Regulating Reservoir in Cascade Hydropower System Considering the Inﬂow Frequency Di ﬀ erence

: In order to analyze the year-end water level of multi-year regulating reservoir of the cascade hydropower system, this paper studied the joint operation optimization model of cascade reservoirs and its solving method based on multi-dimensional dynamic programming, and analyzed the power generation impact factors of cascade system that contains multi-year regulating reservoir. In particular, taking the seven reservoirs in the middle and lower reaches of Yalong River as an example, the optimal year-end water levels of multi-year regulating reservoir under the multi-year average situation and di ﬀ erent inﬂow frequencies situation were studied. Based on the optimal calculation results of multi-dimensional dynamic programming, the inﬂow frequency di ﬀ erence considered operation rule of year-end water level of Lianghekou reservoir was extracted using the least square principle. The simulation results showed that, compared with the ﬁxed year-end water level in multi-year, the extracted rule can improve the cascade power generation by more than 400 million kWh in an average year, representing an increase of 0.4%. This result means that the extracted rule can give full play to the regulation performance of multi-year regulating reservoir and improve the conversion e ﬃ ciency of hydropower resources in cascade system. This is of great signiﬁcance to the practical operation of cascade reservoirs system that contains multi-year regulating reservoir.


Introduction
Hydropower energy is a kind of high-quality and efficient energy which is developing rapidly all over the world. It has the characteristics of being clean and pollution-free, renewable, low operation cost, fast start-up and shutdown speed, rapid output response, etc. [1,2]. In particular, the fast response to power load makes hydropower energy often be used as peak load and frequency modulation power supply, system load standby power supply, etc. [3]. It plays an extremely important role in the safe and stable operation of power system [4].
At present, the development and utilization of hydropower energy is mainly through building dams and reservoirs in the river, centralizing and raising the water head of the scattered water energy resources, and then converting the water energy into electric energy efficiently through the hydro generator unit in hydropower station. For the type of reservoir, according to its regulation performance, it can be divided into daily regulating reservoir, seasonal regulating reservoir, annual regulating reservoir, and multi-year regulating reservoir [5], etc. The regulating reservoir here means the reservoir optimization model of cascade reservoirs, the model solving method based on multi-dimensional dynamic programming, the power generation analysis and the year-end water level optimization of multi-year regulating reservoir. Section 3 presents the case study by taking the seven reservoirs in the middle and lower reaches of Yalong River as an example, the optimal year-end water level of Lianghekou reservoir under multi-year average situation and different inflow frequencies situation are studied, and the results will be presented and analyzed in this section. Finally, the conclusions of this study will be provided in Section 4.

Cascade Reservoirs Operation Optimization Model
A significant benefit derived from a cascade reservoirs system is the clean and renewable hydropower energy. By developing an optimal plan over the entire planning horizon, the cascade reservoirs operation optimization model aims at maximizing the power generation while satisfying some constraints, including water volume balance constraints, reservoir volume limits constraints, outflow limits constraints, power generation limits constraints, boundary conditions limits constraints, etc. Generally, the objective function of this optimization model can be represented as follows [19].
where E is the total power generation over the whole operation period, unit: kWh; T is the number of stages over the whole operation period; N t i is the output of the ith hydropower station in the tth stage, unit: kW, and the reservoir indexes from upstream to downstream are 1, 2, . . . , n; K i is the efficiency coefficient of the ith hydropower station; q t i is the outflow through the turbines of the ith reservoir in the tth stage, unit: m 3 /s; H t i is the average water head of the ith hydropower station in the tth stage, unit: m; ∆t is the duration of a stage, unit: h; and the specific value of ∆t here can be determined according to the actual data.
The following equality and inequality constraints are considered in the model.
(1) Water volume balance constraints, where V i t is the storage volume of the ith reservoir in the tth stage, unit: m 3 ; I i t is the inflow water of the ith reservoir in the tth stage, unit: m 3 /s; Q i t is the total outflow water of the ith reservoir in the tth stage, unit: m 3 /s; W t i is the abandoned outflow water through the flood outflow gate of the ith reservoir in the tth stage, unit: m 3 /s; and Ep t i is the evaporation capacity of the ith reservoir in the tth stage, unit: m 3 /s.
(2) Reservoir volume limits constraints where V i t,min is the lower limit of V i t ; V i t,max is the upper limit of V i t .
(3) Outflow limits constraints where Q i t,min the lower limit of Q i t ; Q i t,max is the upper limit of Q i t .
(4) Power generation limits constraints Energies 2020, 13, 5345 4 of 20 where N i t,min is the lower limit of N i t ; N i t,max is the upper limit of N i t ; N i t,min is usually determined by the allowed minimum output; and N i t,max is usually determined by the installed capacity and expected output of hydropower station.
(5) Boundary conditions limits constraints where V 0 i is the storage volume of the ith reservoir at the beginning of the first stage; V b i is the storage volume of the ith reservoir at the beginning of the whole operation period; V T i is the storage volume of the ith reservoir at the end of the Tth stage; and V e i is the storage volume of the ith reservoir at the end of the whole operation period.

Model Solving Based on Multidimensional Dynamic Programming
Dynamic programming is a branch of operations research and a mathematical method to solve the optimization problem of decision-making process. In the early 1950s, Bellman et al. (1951) put forward this method when studying the optimization problem of multi-stage decision-making process. This method transforms the multi-stage process into a series of single-stage problems and solves them progressively using the relationship between each stage [20]. Dynamic programming has the advantages of global convergence, no requirement for initial solution, and good at solving the multi-stage and nonlinear problems. Based on this, dynamic programming is often used to solve the reservoir operation optimization problems, in particular, the single reservoir operation optimization problems [21].
Dynamic programming can be used to solve the multi-stage decision-making problems recursively, and the reservoir operation optimization problem can be regarded as a multi-stage decision-making problem by dividing the whole operation period of reservoir into a series of short stages (time intervals). In the application of dynamic programming in solving the reservoir operation optimization problem, there is a recursive procedure which can be expressed by the following recursive equation for the tth stage [22].
where f t * (V) is the optimal cumulative output; V t is the state variable at the beginning of the tth stage; N t () is the output of the tth stage determined by V t−1 and Q t ; Q t is the decision variable which is determined by V t−1 and V t ; and D t is a set of feasible decisions that satisfy the constraints of reservoir. The cumulative output means the sum of the output of each stage in the candidate process from present stage t to last stage T, and the optimal cumulative output means the sum of the output in the optimal candidate process. In the reverse recursion procedure, starting from the last stage, the output can be calculated up to the first stage, and the optimal operation processes can be obtained at last by a chronological order recursion calculation. The number of reservoirs is two or more in cascade reservoirs operation optimization problem, and many variables and constraints are involved in solving this optimization problem. For example, if there is a cascade system that contains n reservoirs, then M n combinations of discrete points of storage volume can be obtained if the discrete accuracy of storage volume for each reservoir is M. According to the reverse recursion calculation of dynamic programming in reservoir operation optimization problem, each combination can be taken as a state. Then, the reverse recursion calculation can be carried out by the exhaustive enumeration over all storage volume combinations of each stage. The optimal storage volume combination of each stage can be got by the chronological order recursion calculation at last, and the maximal total power generation over the entire planning horizon can be obtained too. In solving the cascade reservoirs operation optimization problem, the recursive equation of multidimensional dynamic programming can be formulated as follows, is the decision variable vector; and V t 1 , V t 2 , and V t 3 are respectively discretized to M discrete points, i.e., Taking a hydropower station system which has two reservoirs as an example, the whole flowchart of multi-dimensional dynamic programming in solving the cascade reservoirs operation optimization problem can be illustrated by Figure 1, and its reverse recursion calculation procedure can be expressed with Figure 2. In Figure 1, Ub and Db represent the index of beginning state variable of upstream and downstream reservoirs, respectively. Ue and De represent the index of end state variable of upstream and downstream reservoirs, respectively. M is the number of discrete points of storage volume for each reservoir. Each beginning combination (Ub and Db) and end combination (Ue and De) constitute a candidate paths of a stage, so there are M 2 end combinations corresponding to one beginning combination in calculating the optimal candidate paths of a stage.
Energies 2020, 13, x FOR PEER REVIEW 5 of 21 order recursion calculation at last, and the maximal total power generation over the entire planning horizon can be obtained too. In solving the cascade reservoirs operation optimization problem, the recursive equation of multidimensional dynamic programming can be formulated as follows, where Vt−1 = (Vt−1 1 ,Vt−1 2 , …,Vt−1 n )' is the state variable vector; Qt = (Qt 1 ,Qt 2 ,…,Qt n )' is the decision variable vector; and Vt 1 , Vt 2 , and Vt 3 are respectively discretized to M discrete points, i.e., (Vt 1,1 , Vt 1,2 , …, Vt 1,M ), (Vt 2,1 , Vt 2,2 , …, Vt 2,M ), and (Vt n,1 , Vt n,2 , …, Vt n,M ). Taking a hydropower station system which has two reservoirs as an example, the whole flowchart of multi-dimensional dynamic programming in solving the cascade reservoirs operation optimization problem can be illustrated by Figure 1, and its reverse recursion calculation procedure can be expressed with Figure 2. In Figure 1, Ub and Db represent the index of beginning state variable of upstream and downstream reservoirs, respectively. Ue and De represent the index of end state variable of upstream and downstream reservoirs, respectively. M is the number of discrete points of storage volume for each reservoir. Each beginning combination (Ub and Db) and end combination (Ue and De) constitute a candidate paths of a stage, so there are M 2 end combinations corresponding to one beginning combination in calculating the optimal candidate paths of a stage.   The reverse recursion procedure can be described as follows.
Step 1: In the last stage T, there are M discretized points for the storage volume of each reservoir at the beginning of this stage, and M 2 combinations of these discretized points can be obtained. Because the storage volumes are fixed at the end of this stage, the optimal candidate path of each combination is unique at this moment.
Step 2: In stage T − 1, the storage volumes of each reservoir are not fixed at the end of this stage, so there are also M discretized points for the storage volume of each reservoir and M 2 combinations for these discretized points. For any combination at the beginning of this stage, we can find out its optimal candidate path by traversing all M 2 combinations of the storage volume at the end of this stage. Then, save the optimal candidate path and the cumulative output of this combination for the usage of next stage.
Step 3: Repeats step 2, then the calculation of stage T − 1 can be finished by implementing the same work for the other M 2 − 1 combinations of the storage volume at the beginning of this stage.
Step 4: Repeats steps 2 and 3, then the whole calculation of all stages over the entire planning horizon can be finished by this reverse recursion procedure, and the optimal candidate path of each combination and its optimal cumulative output can be obtained after the calculation.
Step 5: Obtains the route and other details of the optimal operation by chronological recursion process.

Power Generation Analysis and Year-End Water Level Optimization of Multi-Year Regulating Reservoir
The difference between separate operation and cascade combined operation of multi-year regulating reservoir is that, only the water head of its own reservoir is considered in the separate operation, while in the combined operation, if the multi-year regulating reservoir is located at the upstream, the water head of power generation is the sum of the water heads of all the downstream reservoirs. When the multi-year regulating reservoir operates alone, a high year-end water level is generally determined, the main purpose of this is to make use of the water head benefit. That is to say, the benefit of storing partial water to raise the water head is higher than that of using this partial water volume to generate electricity. In the combined operation, the available water head of each The reverse recursion procedure can be described as follows.
Step 1: In the last stage T, there are M discretized points for the storage volume of each reservoir at the beginning of this stage, and M 2 combinations of these discretized points can be obtained. Because the storage volumes are fixed at the end of this stage, the optimal candidate path of each combination is unique at this moment.
Step 2: In stage T − 1, the storage volumes of each reservoir are not fixed at the end of this stage, so there are also M discretized points for the storage volume of each reservoir and M 2 combinations for these discretized points. For any combination at the beginning of this stage, we can find out its optimal candidate path by traversing all M 2 combinations of the storage volume at the end of this stage. Then, save the optimal candidate path and the cumulative output of this combination for the usage of next stage.
Step 3: Repeats step 2, then the calculation of stage T − 1 can be finished by implementing the same work for the other M 2 − 1 combinations of the storage volume at the beginning of this stage.
Step 4: Repeats steps 2 and 3, then the whole calculation of all stages over the entire planning horizon can be finished by this reverse recursion procedure, and the optimal candidate path of each combination and its optimal cumulative output can be obtained after the calculation.
Step 5: Obtains the route and other details of the optimal operation by chronological recursion process.

Power Generation Analysis and Year-End Water Level Optimization of Multi-Year Regulating Reservoir
The difference between separate operation and cascade combined operation of multi-year regulating reservoir is that, only the water head of its own reservoir is considered in the separate operation, while in the combined operation, if the multi-year regulating reservoir is located at the upstream, the water head of power generation is the sum of the water heads of all the downstream reservoirs. When the multi-year regulating reservoir operates alone, a high year-end water level is generally determined, the main purpose of this is to make use of the water head benefit. That is to say, the benefit of storing partial water to raise the water head is higher than that of using this partial water volume to generate electricity. In the combined operation, the available water head of each cubic meter of water for multi-year regulating reservoir is the sum of the water heads of downstream reservoirs. At this time, if the year-end water level is raised, it is at the expense of the water efficiency of whole cascade reservoirs to obtain the high water head of current reservoir. Whether this is economic needs further proof. If the multi-year regulating reservoir operates alone, and assuming that there are different year-end water levels Z 1 , Z 2 , and Z 3 , and Z 1 < Z 2 < Z 3 . As shown in Figure 3, then there are (1) Water head of power generation: H 1 < H 2 < H 3 ; (2) Available water for power generation: Energies 2020, 13, x FOR PEER REVIEW 7 of 21 cubic meter of water for multi-year regulating reservoir is the sum of the water heads of downstream reservoirs. At this time, if the year-end water level is raised, it is at the expense of the water efficiency of whole cascade reservoirs to obtain the high water head of current reservoir. Whether this is economic needs further proof. If the multi-year regulating reservoir operates alone, and assuming that there are different yearend water levels Z1, Z2, and Z3, and Z1 < Z2 < Z3. As shown in Figure 3, then there are (1) Water head of power generation: H1 <H 2 < H3; (2) Available water for power generation: At this time, if assuming that the output efficiency coefficients of different hydropower stations are the same, then the power generation benefit of each year-end water level can be simplified as E1=K·Q1·H1 T

E2=K·Q2·H2·T E3=K·Q3·H3·T
At this time, the value of E1, E2, and E3 is affected by Q and H together, which is difficult to judge their size relationship.
However, when the cascade reservoirs formed by multiple reservoirs, especially when the multiyear regulating reservoir is the leading reservoir and followed by several non-regulating reservoirs, not only the water volume of the multi-year regulating reservoir can generate electricity in its own hydropower station, but also in the downstream hydropower stations, as shown in Figure 4. At this time, if assuming that the output efficiency coefficients of different hydropower stations are the same, then the power generation benefit of each year-end water level can be simplified as At this time, the value of E 1 , E 2 , and E 3 is affected by Q and H together, which is difficult to judge their size relationship.
However, when the cascade reservoirs formed by multiple reservoirs, especially when the multi-year regulating reservoir is the leading reservoir and followed by several non-regulating reservoirs, not only the water volume of the multi-year regulating reservoir can generate electricity in its own hydropower station, but also in the downstream hydropower stations, as shown in Figure 4.  At this time, if assuming that there are different year-end water levels Z 1 1, Z 1 2 and Z 1 3 in the multi-year regulating reservoir, and Z 1 1 < Z 1 2 < Z 1 3, then there are (1) Available water for power generation: (2) For the water head of power generation, it is no longer a simple H 1 1<H 1 2<H 1 3 at this time. When the downstream water level is fixed, it is ( At this time, if assuming that there are different year-end water levels Z 1 1 , Z 1 2 and Z 1 3 in the multi-year regulating reservoir, and Z 1 1 < Z 1 2 < Z 1 3 , then there are (1) Available water for power generation: (2) For the water head of power generation, it is no longer a simple H 1 1 <H 1 2 <H 1 3 at this time. When the downstream water level is fixed, it is (H 1 At this time, the total power generation benefit under the three year-end water levels can be simplified as At this time, the value of E 1 , E 2 , and E 3 is affected by Q and (H 1 + H 2 + H 3 + H 4 + . . . ), which is also difficult to judge their size relationship directly. However, in general, when the sum of the water head of downstream hydropower stations is quite large, it is more advantageous to "release water to use the downstream water head for power generation" than "store water to raise its own water head". It should be noted that the above description is under the simplified situation that the inflow water of reservoir does not take into account. In fact, the inflow water must have an impact on the power generation in the actual operation process. Moreover, we also know that the power generation of the reservoir or cascade reservoirs system is not only related to the water head, but also the natural inflow. Therefore, in the process of analysis, it is necessary to further consider the influence of different inflow on the optimization of the year-end water level.
In order to obtain the optimal year-end water level of multi-year regulating reservoir considering the inflow uncertainty, according to the above-mentioned joint operation model and multi-dimensional dynamic programming algorithm, one way is to establish the functional relationship between the inflow frequency and the optimal year-end water level. The steps of this method include: Step 1: Within the feasible water level range, discretize the year-end water level to obtain a series of discrete water level values. Carry out the following calculation by setting different discrete water levels as the water level boundary in the joint operation model, which is the water level constraint corresponding to Equation (3).
Step 2: According to the inflow and joint operation model, the optimal year-end water level of each year can be determined from the series of discrete water level values by taking the maximum power generation as the optimization goal.
Step 3: Based on the optimal operation results of many years, draw the scatter chart between the inflow frequency and the optimal year-end water level, and find out the corresponding functional relationship between them, and extract the control rules of year-end water level.
Step 4: Carry out simulation calculation based on the obtained control rules of year-end water level, and analyze its rationality.
The overall flowchart of this method can be shown in Figure 5.

Basic Data
Yalong River is the largest tributary of Jinsha River in China, which originates from the south foot of Bayan Kala Mountain in Yushu County, Qinghai Province. The main stream has a total length of 1571 km, a drainage area of about 136,000 km 2 and a natural drop of about 3830 m. The average annual flow of the estuary is 1910 m 3 /s, and the annual runoff is nearly 60 billion m 3 , accounting for 13.3% of the total water in the upper reaches of Yangtze River. The Yalong River is rich in hydropower resources. A total of 22 hydropower stations have been planned in the main stream, with a total installed capacity of about 30 million kilowatts and an annual generating capacity of about 150 billion kilowatt hours. The middle and lower reaches of the Yalong River are the key reaches of hydropower development at present. There are seven hydropower stations, namely Lianghekou, Yangfanggou, Jinxi, Jindong, Guandi, Ertan, and Tongzilin. Among them, Lianghekou, Jinxi, and Ertan reservoirs all have regulation performance, among which Lianghekou reservoir has a multi-year regulating performance, Jinxi reservoir has an annual regulating performance, and Ertan reservoir has a seasonal regulating performance [23].
In particular, Lianghekou reservoir is the control reservoir for the cascade hydropower stations in the middle and lower reaches of the Yalong River, which has a great impact on the whole cascade power stations development of Yalong River. After putting into operation, it can realize the multi-year regulation of the cascade reservoirs in the middle and lower reaches of Yalong River. At the same time, it will have a positive impact on the development of the lower reaches of the Jinsha river, it can improve the power generation quality of the Three Gorges and Gezhouba hydropower station and reduce the flood control burden of the middle and lower reaches of the Yangtze River.
The geographical location of the seven reservoirs in Yalong River basin is shown in Figure 6, and the key parameters of each reservoir are shown in Table 1. all have regulation performance, among which Lianghekou reservoir has a multi-year regulating performance, Jinxi reservoir has an annual regulating performance, and Ertan reservoir has a seasonal regulating performance [23].
In particular, Lianghekou reservoir is the control reservoir for the cascade hydropower stations in the middle and lower reaches of the Yalong River, which has a great impact on the whole cascade power stations development of Yalong River. After putting into operation, it can realize the multiyear regulation of the cascade reservoirs in the middle and lower reaches of Yalong River. At the same time, it will have a positive impact on the development of the lower reaches of the Jinsha river, it can improve the power generation quality of the Three Gorges and Gezhouba hydropower station and reduce the flood control burden of the middle and lower reaches of the Yangtze River.
The geographical location of the seven reservoirs in Yalong River basin is shown in Figure 6, and the key parameters of each reservoir are shown in Table 1.   In this case study, there are ten-day runoff data of the river basin from June 1957 to May 2019, a total of 62 years, so the ∆t is ten-day (i.e., 240 h) in Equations (1) and (2). In the joint optimal operation model, the initial and final water level of each reservoir with regulating performance are set as dead water level, and the other reservoirs without regulating performance operate according to the water level in Table 1. In the output calculation of the model, the output coefficient difference of each power station in different operation stages is also considered. In addition, it should be noted that the purpose of this paper is to extract the operation rules of multi-year regulating reservoir through simulation calculation, so the data used in this paper are all historical data.

Results and Discussion
In order to analyze the variation of power generation  Table 2. From Table 2, it can be seen that with the increase of the year-end water level, the annual average power generation of cascade system gradually decreases. When the year-end water level is 2785 m, the annual average power generation of cascade system is the largest. That is to say, under the multi-year average situation, the 2785 m is the best year-end water level, i.e., if the Lianghekou reservoir is operated as an annual regulating reservoir under this situation, the total power generation of the cascade system is the largest.
The annual average power generations in Table 2 only consider the different year-end water levels, in fact, the power generation is affected not only by the water level, but also by the inflow; that is, the inflow frequency. For a specific year, the maximum annual power generation is the comprehensive result of reservoir water level and inflow process. Therefore, in order to analyze the power generation variations of the cascade system under different inflow conditions and different year-end levels, and discuss the coupling relationship between the year-end water level and inflow frequency on the cascade power generation, we firstly analyzed and compared the results of three kinds of typical years, i.e., wet year, normal year and dry year.
Based on the inflow data of Lianghekou, Jinxi and Ertan stations, we selected five typical years for the analysis from the overall perspective of the basin, as shown in Table 3. Considering the complexity of dry years, we chose three typical dry years. For the three kind of typical years, the difference is mainly the difference of inflow, which also reflects the difference of rainfall level to a certain extent. For the wet year, the rainfall is rich, so the inflow of the reservoir is large. For the dry year, the rainfall is poor, so the inflow of the reservoir is small. For the normal year, the inflow and rainfall are relatively moderate. According to the model described in Section 2.1 and the model solution method described in Section 2.2, the calculation is carried out based on the runoff data of the wet year, and the results are shown in Table 4. From the calculation results of the wet year, it can be seen that with the increase of the year-end water level of Lianghekou reservoir, the total power generation of the cascade system gradually decreases, the power generation of Lianghekou reservoir increases first and then decreases, and the total power generation of the downstream reservoirs gradually decreases. The power generation of Lianghekou reservoir increases first and then decreases with the increase of year-end water level. The reason is that when the year-end water level H is low, it can be seen that the contribution of H to N is small according to the output calculation formula N = KQH in Equation (1), so the water head benefit of the reservoir is very low. When the year-end water level is high, the water head benefit is large; however, because a large amount of water is used to raise the water head, the discharge flow Q used for power generation is small. So, the contribution of Q to N is small, i.e., the water quantity benefit is small. So, only in a middle position (such as 2805 m), the water quantity benefit and head benefit are both better, and the sum of them reaches the maximum. The water head benefit mentioned above actually refers to the contribution of water head H to the output N, and the water quantity benefit actually refers to the contribution of the discharge flow Q used for power generation to the output N.
The total power generation of the downstream cascade decreases gradually with the increase of the year-end water level. The reason is that the downstream reservoirs can only use the water volume of Lianghekou reservoir and cannot use its water head. Therefore, the lower the year-end water level of Lianghekou reservoir, the greater the amount of water discharged, and the better the power generation of the downstream reservoirs.
The total cascade power generation is the sum of the power generation of Lianghekou reservoir and the power generation of the downstream reservoirs. With the increase of the year-end water level of Lianghekou reservoir, the total power generation of the cascade system gradually decreases. The reason is that in the wet season, the water head of the downstream reservoirs is high, and the sum of the water head is a very large value. At this time, for every cubic meter of water discharged by the Lianghekou reservoir, the downstream reservoirs will get great power generation benefits. Before 2805 m, although the power generation of Lianghekou reservoir increased with the increase of the year-end water level, the water head effect of the downstream reservoirs is remarkable at this time. The increase of the year-end water level means the decrease of the discharge, which will greatly reduce the power generation of the downstream reservoirs, and finally make the overall cascade system presents a decreasing trend. After 2805 m, the power generation of Lianghekou reservoir and the downstream reservoirs both decreases with the increase of the year-end water level, so the total power generation of the cascade system decrease gradually.
In general, in the wet year, when the year-end water level is the dead level, the overall benefit of the cascade system is the best. According to the model described in Section 2.1 and the model solution method described in Section 2.2, the calculation is carried out based on the runoff data of the normal year, and the results are shown in Table 5. From the calculation results of the normal year, it can be seen that the variation law of power generation is exactly the same as that of the wet year, except that the year-end water level of Lianghekou reservoir at the turning point of power generation is 2825 m, not the 2805 m of the wet year. In general, the overall benefit of the cascade system is the best when the year-end water level is the dead level in the normal year. According to the model described in Section 2.1 and the model solution method described in Section 2.2, the calculation is carried out based on the runoff data of the three dry years, and the results are shown in Tables 6-8. From the results of the dry year, it can be seen that with the increase of the year-end water level of Lianghekou reservoir, the power generation of Lianghekou reservoir itself increases first and then decreases, which is consistent with the variation law of the wet year and the normal year. However, for the cascade total power generation, its value does not strictly decrease with the increase of the year-end water level, but shows the trend of increasing first and then decreasing. For the power generation of downstream reservoirs, the variation has no regularity compared with the wet year and normal year.
The total power generation of the cascade system increases first and then decreases. The reason is that in the dry year, the water head of the downstream reservoirs is not high enough, and the sum of the water head of the downstream reservoirs is also smaller than that in the wet and normal year, which means that for each cubic meter of water discharged by the Lianghekou reservoir, the downstream reservoirs is not necessarily able to obtain large power generation. At this time, it is more advantageous for the water to be stored in the Lianghekou reservoir to raise its own water head; for example, when the year-end water level is before 2830 m in the second dry year, and when the year-end water level is before 2825 m in the third dry year. However, the Lianghekou reservoir cannot just store water without releasing it (for example, the year-end water level is 2845 m), otherwise the power generation benefit of the downstream reservoirs will be very small. Therefore, there is a compromise year-end water level which makes the sum of the power generation of Lianghekou reservoir and downstream reservoirs reaches the maximum; that is, the total generation benefit of cascade system reaches the maximum.
From the above results analysis, it can be concluded that the results of wet year and normal year have a strong regularity (the dead water level is the best), but the results of dry years are more complex and the regularity is weak, which needs further in-depth analysis. In view of this, in order to analyze the optimal year-end water level of Lianghekou reservoir under different inflow frequencies, and to extract the general rules to guide the actual operation, we calculated all the years based on the 62 years runoff data, and arranged their results by the inflow frequencies with ascending order, as shown in Table 9. The average multi-year power generation of cascade system is 101.02 billion kWh at this time. Table 9. Optimal year-end water levels and corresponding power generation under different inflow frequencies.
According to the results in Table 9, the scatter diagram with the inflow frequency as the abscissa and the year-end water level as the ordinate can be obtained, as shown in Figure 7.
According to the results in Table 9, the scatter diagram with the inflow frequency as the abscissa and the year-end water level as the ordinate can be obtained, as shown in Figure 7.  Year-end water level / m 60.0% 80.0% 100.0% 120.0% Inflow frequency Figure 7. Optimal year-end water levels under different inflow frequencies.
From Figure 7, it can be seen that in the wet years (inflow frequency below 48.7%), the optimal year-end water level is 2875 m (dead water level). While in the dry years, the optimal year-end water level fluctuates greatly in different years, and the regularity is not strong, but the overall trend is rising.
That is to say, in the years with low inflow, the optimal year-end water level basically increases with the increase of inflow frequency.
Considering the practicability of the calculation results, it is necessary to extract the overall regularity of the year-end water level in dry years to guide the actual reservoir operation. For this reason, based on the results data where the inflow frequency greater than 48.7%, we have drawn a scatter diagram and fitted the best trend line based on the least square principle [24,25], as shown in Figure 7.
According to the results in Figure 7, the best function relationship between the inflow frequency and the year-end water level in the dry years is as follows.
where Y is the year-end water level and I is the inflow frequency. The correlation index R 2 corresponding to the above Equation (9) is 0.73. Therefore, it can be concluded that under different inflow frequencies, the determination rules of the year-end water level of Lianghekou reservoir are as follows.
At this time, according to the Equation (10), the year-end water level under different inflow frequencies can be determined, and then the simulation calculation can be carried out, and the annual power generation can be obtained, as shown in Table 10 (sorted by inflow frequency with ascending order). The annual average power generation of cascade system is 100.984 billion kWh at this time. It should be noted that since the historical runoff data is used in this paper, the inflow frequency of each year is known at this time. In practical application, the inflow frequency forecasting [26,27] should be used to obtain the inflow frequency of future years.  Tables 9 and 10, the average annual power generation in Table 9 is 101.02 billion kWh, and that in Table 10 is 100.984 billion kWh. Although the power generation obtained by simulation operation according to the year-end water level determined by the extracted rules is reduced, the absolute value is 36 million kWh, and the relative reduction is only 0.036%. In addition, it is easy and feasible to operate the reservoir according to the extracted rules.
Compared with the results of multi-year fixed year-end water level in Table 2, the average annual power generation (100.984 billion kWh) in Table 10 is higher than the maximum value (100.58 billion kWh) in Table 2. The difference is 0.404 billion kWh (100.984 billion kWh minus 100.58 billion kWh), representing an increase of 0.4%. Although it seems that the increase of 0.4% is very small; in fact, the base number of annual generation of the cascade system is very large, and this is the annual increment. In the long run, the economic benefit is very significant, which also shows the effectiveness of the method in this paper.
So, it can be seen that the extracted rules of year-end water level under different inflow frequencies not only has strong operability, but also can well coordinate the coupling relationship between the inflow frequency (water volume) and the year-end water level (water head) of Lianghekou reservoir. They can give full play to the overall benefits of the cascade reservoirs system, so that the total power generation of the cascade system by rules is very close to that by the optimal calculation. After obtaining the above extracted rules, the actual reservoir operation can be guided by these rules. Firstly, the annual inflow frequency of the current year can be obtained according to the inflow frequency prediction model, and then the optimal year-end water level of multi-year regulating reservoir can be obtained according to the predicted inflow frequency and Equation (10), and finally, the actual operation can be carried out based on this year-end water level.

Summary and Conclusions
Based on the joint optimal operation model of cascade reservoirs and the model solution method based on multi-dimensional dynamic programming, this paper studies the year-end water level optimization of multi-year regulating reservoirs in the cascade reservoir system. By taking the cascade system of seven reservoirs of Yalong river as an example, the following conclusions are obtained.
(1) Under the multi-year average situation, with the increase of the year-end water level of Lianghekou reservoir, the annual average power generation of the cascade system gradually decreases.
When the year-end water level of the Lianghekou reservoir is 2785 m, the annual average power generation of the cascade system is the largest. That is to say, under the multi-year average situation, it is better to operate the multi-year regulating reservoir as the annual regulating reservoir.
(2) Under the three typical inflow conditions, the results of wet year and normal year have strong regularity (the dead water level is the best), but the regularity of dry years is weak.
(3) Considering the difference of different inflow frequencies, the annual average power generation of the cascade system can reach up to 101.02 billion kWh by getting the optimal year-end water level of Lianghekou reservoirs in each year. In the years with abundant inflow, the optimal year-end water level is 2875 m. In the years with low inflow, although the optimal year-end water level fluctuates greatly in different years and the regularity is not strong, the overall trend is upward.
(4) In order to improve the practicability of the results, based on the optimal results of multi-dimensional dynamic programming, the rules of determining the year-end water level of Lianghekou reservoir considering the inflow frequency difference are extracted by using the least square principle. The simulation results show that compared with the fixed year-end water level method, the extracted rules can increase the cascade power generation by more than 400 million kWh, representing an increase of 0.4%.