A steepest descent algorithm for the optimal control of a cascaded hydropower system

Olalekan Ogunbiyi, Cornelius T. Thomas, Oludare Y. Ogundepo, Isaac O. A. Omeiza, Jimoh Akanni, B. J. Olufeagba Electrical and Computer Engineering Department, Kwara State University, Nigeria Electrical and Information Engineering Department, Achievers University, Nigeria Electrical and Electronic Engineering, Federal University of Petroleum Resources, Nigeria Electrical and Information Engineering, Landmark University, Nigeria Electrical and Electronics Engineering Department, University of Ilorin, Nigeria


INTRODUCTION
Hydropower generation in Nigeria is currently provided at three major locations [1]. Two of these stations are located on the River Niger, operated in cascade. They are the Kainji hydroelectric power station (KHEPS) and the Jebba hydroelectric power station (JHEPS). They are the Kainji hydroelectric power station (KHEPS) and the Jebba hydroelectric power station (JHEPS). The KHEPS which is located at 09 0 51 ′ 45 ′′ , 04 0 36 ′ 48 ′′ with an install capacity of 760 MW form eight units of turboalternators. The JHEPS is located 103 km downstream of the KHEPS on 09 0 08 ′ 08 ′′ , 04 0 47 ′ 16 ′′ . It was commissioned on April 13, 1985, with a rated capacity of 578.4 MW from six (6) fixed blade [2,3].
The Jebba Reservoir depends on discharge and spill from the KHEPS, this arrangement imposes the need for better water management if the units at Jebba are to operate efficiently all the year. The operators of the JHEPS face serious challenges that involve balancing conflicting needs involving the operational safety of the stations and the demand requirements from an energy-starved electricity grid [2,4]. Practical observation of operations reveals the serious challenges confronting the JHEPS operators as they try to perform the functions of a regulator that was omitted in the fixed vane designs of the JHEPS turbo alternators [5,6]. These operational problems are present in each HEPS in one form or the other, and it is only because of the robust nature of the turbo alternators that major catastrophes have not yet occurred [7]. Nonetheless, there is evidence of such problems lurking in the possibilities when one observes that one turbo alternator catastrophically failed at JHEPS and another at KHEPS. Both cases share the feature that no local regulator was included in the initial design. For example, the use of Francis Turbines at a very low head scheme as the KHEPS posed especial problems that meant poor performance and ultimately catastrophic failure. In the JHEPS case, the narrow operating head demanded by the fixed vane Kaplan turbines posed a very serious challenge to the operators [8].
The latter problem, however, lends itself to the application of optimal control methods. Indeed, this is the problem addressed in this research. It is posed as an optimal control problem to determine the inflow into the JHEPS reservoir so that the operating head falls within a specified range [9,10]. This work considered the determination of optimal control law for the release of water from KHEPS such that the reservoir head at JHEPS remains relatively constant. The optimal control algorithm is to be incorporated into a real-time embedded controller.
Unfortunately, the design of such a system that ensures the optimal use of hydropower resources to maximize power generation within a cascaded system is challenging. The problem must be properly posed in a standard form before it can be solved [11,12]. Solutions of optimal control problems are often analytically intractable and computationally complex [9,13].
Due to the complexity of systems and applications, analytical methods are rarely used to compute the solutions to optimal control problems. Numerical solutions are mostly used in determining optimal control [14,15]. In most cases, the numerical methods are highly sophisticated, and they do task computers [16,17]. There have been numerous numerical procedures developed over the years, these procedures can be classified into two categories, the direct methods and indirect methods [18]. The direct method of computing optimal control involves the discretization of the state and the control in such a way that the problem is converted to a nonlinear optimization problem or nonlinear programming problem [17,19,20]. The indirect method applies calculus of variation to set up necessary conditions that must be satisfied by the optimal control.

STEEPEST DESCENT SOLUTION OF AN OPTIMAL CONTROL PROBLEM
The steepest descent algorithm is generally used for determining the minimum of a differentiable function and hence, employed as a direct method of solving optimal control problem in this work [21][22][23]. Given a performance index (ℎ, ) that is differentiable, the steepest descent direction is the path opposite ∇ ( ). The search starts at a differentiable point =0 ( ) and decreases after each iteration until it reaches the minimum point with * ( ), such that: Steepest descent algorithm is very fast in moving a solution from any local point within the feasible region to the vicinity of the point of convergence [21,24,25]. If a suitable method of solution is unknown, steepest descent is guaranteed to iterate towards the minimum point but characterised by slow convergence. Numerous researches on this method have been on the determination of appropriate step size and means of speeding it up [26].

Statement of the problem
The optimal control solved in this work is the determination of the control signal ( ) (generated by the control System) to be released from KHEPS (actuator) that will force the operating head ℎ( ) of JHEPS (Controlled Plant) to follow a predefined trajectory within a given time ( 0 → ). The system is the dynamical model for the JHEPS operating head described by the nonlinear differential head 3.1 [8,27]: Hence, the system model can be written in d standard form as;

Performance index 'J'
Performance indices can be selected to reflect the aspect of the system's behaviour that is considered as vital. As a result, a performance index which accommodates and appropriately penalizes deviation from a specified head and ensures that the control does not require values outside the capability of KHEPS was selected. A quadratic performance index was selected consisting of the integral of the square error from the desired operational head and the square deviation from the maximum discharge possible. Given a performance index (ℎ, , ) that is differentiable: Subject to the system constraints: Nonlinear penalties on : where ℎ( ) represents the desired final value for the state and is a positive weighing scalar constant.

Solution of optimal control using steepest descent algorithm
A solution of the optimal control using steepest descent approach was earlier reviewed. The steepest descent direction is the path opposite ∇ ( ). The search starts at a differentiable point ( ) and decreases after each iteration until it reaches the minimum point * ( ). Where: if ( ) is a unit vector along the increasing gradient, then, moving in the direction − ( ), is the optimum steepest descent step size. An optimum value of must be determined because a larger value of results in the local minimum of being overshot. A smaller value for will require much time and iterations for the search. Hence, must be determined such as to move towards the minimum at the smallest computational time, this is another optimization. As shown in (12) gives an approximate end of the search in the present direction: An innovative approach to finding the optimum is by using the quadratic approach. Hence, The computation was carried out numerically in an EXCEL VBA® programming environment. The Adams-moulton numerical integrator with steepest descent technique was employed in solving the system model and the computation of controls. Step 1: Let = 0 Set the initial condition ℎ ( =0) ( ) = ℎ 0 Guess values for ( =0) ( ) from 0 → . Step 2: Numerically integrate (ℎ( ), ( ), ) from 0 → to obtain ℎ ( ) ( ). The numerical integration is carried out using an Adams-Moulton technique with Adams-Bashforth as predictor and Runge-Kutta for starting.
Step 3: Compute the performance index ( ) The Trapezoidal rule was employed in this computation Step 6: Compute the norm of the gradient ‖ ‖. Step 9: Solve for the constants and Step 10: Compute ( ) ψ ( ) ( ) = − 2 Step 11: Compute the control vector

RESULTS AND ANALYSIS
The results obtained from the computation of optimal control using the steepest descent algorithm are presented in case 1 to case 5. A notation is used for specifying operating conditions under a case being considered, the format is as follows: (number of machines, starting head (m), number of days, penalty). -Case 1: (5, 25.8, 1, ) Applying the stated operating conditions into the steepest descent algorithm and assuming a convergence criterion of 10 −5 for the gradient led to convergence after 15 iterations with ℎ( ) trajectories as shown in Figure 1. The trajectories exhibit some overshoot because the interval of 6 hrs used to specify the controls prevent the adjustment of the control with the precision that would guarantee the desired terminal value nearly precisely. It is evident that operators using protocols based on this result will be able to more precisely control and manage their plants. The results demonstrate the use of the optimal control approach and provide dependable methods for operations with a negligible deviation of 0.03% of the optimum head ℎ * ( ) from the set value ℎ( ). Figure 2 presents the control that is required to produce the needed head trajectory of Figure 1. The fifteenth iterations produced the desired optimal control. The control law starts with a high inflow in the first 6 hours of the day ( 1 ) and reduces to the minimum value in the second 6 hours of the day ( 2 ). The control increases lightly in the remaining 12 hours to move the head to the optimum level.   Figure 3 presents the successive iterations determined by using a unidirectional search along the descent on the gradient vector to the local minimum. A peculiar feature of this algorithm can be observed by studying 1 ( ) 2 ( ). While 1 ( ) kept increasing after every iteration, 2 ( ) only increases for the first two iterations and it decreases till the allowable tolerance level.
A necessary condition for a control to be optimum is that the performance index at the last iteration must be minimum. This can be observed in Figure 4 that the performance index keeps decreasing till the last iteration. If the curve differs from this expected behaviour, then the control is not optimum, and the trajectories may not be as seen in Figure 1. It can be observed that the first three iterations reduce the performance index greatly, this is a unique characteristic of steepest descent method. Figures 5 and 6 show the variation of the norm of gradient and the steepest descent steps size. The stopping criteria in the algorithm are that the norm of gradient must be approximately zero and the steepest descent step size should also be very small and insignificant. It is only then that the control can be assumed to be optimum. As could be seen during the implementation, the gradient attains the lowest value and the step size became so small that the changes computed were within the error of computation. This means that the head in Figure 1 and control in Figure 2 are optimum. = 3000 3 ⁄ ) It is possible to modify the problem such that the control is penalized. The penalty is to impose a maximum and minimum value on the control. The control is not allowing to be negative or exceed a value. Different simulation for penalized optimal controls is presented in cases 2 and 3. Figures 7 and 8 presents the results of the case (5, 25.8, 1, > 0 = 3000 3 ⁄ . The effect is that the overshoot on the state trajectory is removed, and it takes more iterations. The optimum control looks more appropriate than the results produced with cases where the control is Unpenalized.

CONCLUSION
The work has considered the development of an optimal control procedure for the cascaded KHEPS and JHEPS. There can be numerous optimal control problem, but the problem solved is the Lagrange problem for the optimal release for inflows into JHEPs such that its operating head remains relatively constant at 26.1 m. The control algorithm is based on the steepest descent, a method that ensure the determination of a local optimum for a convex problem. The quadratic line was employed for the determination of optimum steepest descent step size. When the control is penalized, the algorithm converges faster. The control algorithm was implemented in an Excel VBA® environment to ensure that the optimum head falls within 0.03%. It is recommended for use in system studies, decision making and control design for the optimal power generation in the cascaded hydropower system