Frequency Containment Control of Hydropower Plants Using Different Adaptive Methods

: With the growth in the share of variable renewable energy sources, fluctuations in the power generation caused by these types of power plants can diminish the stability and flexibility of the grid. These two can be enhanced by applying frequency containment using hydropower plants as an operational reserve. The frequency containment in hydropower plants is automatically con ‐ trolled by speed governors within seconds. Disturbances such as fluctuations in the net head and aging may diminish the performance of the controllers of the speed governors. In this study, model reference adaptive control approaches based on the Massachusetts Institute of Technology (MIT) rule and Lyapunov method were exploited in order to improve the performance of the speed gov ‐ ernor for frequency containment control. The active power control with frequency control was en ‐ hanced by the aforementioned adaptive control methods. A mathematical model of a hydropower plant with a surge tank and medium penstock was constructed and validated through site meas ‐ urements of a plant. It was shown that, as they are applicable in real life, both methods perform significantly better compared to conventional proportional ‐ integrator control. Even in first five de ‐ viations, the performance of the conventional controller improved by 58.8% using the MIT rule and by 65.9% using the Lyapunov method. When the two adaptive control approaches were compared with each other, the MIT rule outputted better results than the Lyapunov method when the disturb ‐ ance frequency was higher; however, the latter was more functional for rare disturbances.


Introduction
As the penetration of variable renewable energy sources (V-RES) such as wind and photovoltaics in the grid increases to higher proportions, a higher amount of operational reserve will be needed to provide grid stability and flexibility. Grid stability involves the availability of electricity at all times and a power quality covering the voltage and frequency stability. In a similar manner, grid flexibility means the capacity for load and generation fluctuations, especially resulting from the high share of V-RESs. The operation of hydropower plants (HPPs) with storage capacity (e.g., reservoir HPPs) is a key solution for maintaining the power quality and grid flexibility of an interconnected network, relying on their very short start-up and action times.
Considering the frequency stability, there are four steps of action that can be taken against the frequency deviation [1]. The most rapid one is frequency containment control (FCC), formerly known as primary frequency control, which is used for limiting the deviations in the grid frequency within a few seconds. These deviations result from the imbalance between demand (e.g., load fluctuations) and supply (e.g., intermittent generation of V-RESs. The units contributing to the frequency containment control automatically start this action. In HPPs, the speed governor of the unit is responsible for the FCC. Speed governors adjust the turbine speed for grid synchronization. Following the synchronization process, the speed governors regulate the active power output for network operation. As long as the FCC function is on, they are expected to increase/decrease the active power output of the unit depending on the sign of the frequency deviation, i.e., an increase in the frequency, meaning an excess of supply, will result in the automatic action of speed governors by decreasing the active power. As there exist other generating units contributing to the frequency response, each unit takes a portion of the required load according to its permanent speed droop value. An FCC action is traditionally implemented at the generation side in the existing control strategy of the speed governors. Recent studies on FCC have focused on the high penetration of V-RESs. Flywheel systems for inertia control were proposed in [2] for active power support in the case of frequency dips. A fuzzy-logicbased algorithm controls the bidirectional active power flow in a wind farm, according to the system frequency and the rate-of-change of system frequency. The possibility of FCC in smaller-alternative-current (AC) subnetworks that are connected to a high-voltage direct current (HVDC) network was investigated [3]. Different controller schemes were analyzed to benefit from the abundant inertial resources of rotors in wind power plants [4]. FCC studies for HPPs have concentrated on performance analyses of HPP models with/without surge tanks in [5,6] using frequency response, step response, and setpoint change tests.
The state of the art for hydraulic turbine control is digital governors, mostly with Proportional -Integral (PI) controllers and some with modern control techniques [7]. These controllers are tuned under ideal conditions with newly installed equipment. On the classical control side, PI control stability issues [8,9] and techniques for tuning PI parameters [10][11][12][13] have been studied by the majority. On the modern control side, various studies have covered nonlinear, optimal, and robust control using state variable representation. A self-tuning power system stabilizer, which uses the minimization of the quadratic performance index, was presented in [14]. A genetic algorithm was used in [15] to optimize the speed governor performance of an HPP. Speed governor designs with neural networks were described in [16] with an intelligent PI tuning method, in [17] for an isolated power system, and in [18] by the implementation of neuro-controllers. The robust control of hydraulic turbines through frequency-response was presented in [19]. In [20], a robust H∞ control was investigated for a very long headrace tunnel. Ref. [21] studied the multi-frequency dynamic performance of an HPP with a surge tank through the coupling effect among penstock, a water turbine, and the electrical grid. In [22], the chaotic motion of the speed governor was investigated while nonlinear turbine characteristics were present.
The performance of speed governors can be disrupted by the changes in the reservoir and tailwater levels, as well as aging effects, e.g., wear and tear in the flow-regulating mechanism. Model reference adaptive control (MRAC) can improve the performance of speed governors in the presence of these disturbances, as MRAC with the Massachusetts Institute of Technology (MIT) rule and Lyapunov method follows the desired behavior described by a reference model. MRAC for FCC is only investigated in [23] for micro-grids. However, there is a gap in the literature for MRAC usage for FCC in interconnected networks.
In this study, the usage of MRAC for FCC in an interconnected grid was investigated. First, a dynamic HPP model and a reference model describing the ideal behavior for FCC were formed. Then, adaptive controllers, designed with the MIT rule and the Lyapunov method, were added into the main active power control loop of the speed governor to rapidly adapt the controller to the changing plant conditions. Finally, the simulation results of both controllers were compared.
The rest of the article is organized as follows: the HPP modeling is detailed in Section 2. The proposed controllers including the MIT rule and the Lyapunov method, along with the reference model, are presented in Section 3. The simulations and results are presented in Section 4, and Section 5 concludes the paper.

Hydropower Models
The control parameters of speed governors are traditionally determined by using linear models. This approach is convenient when the changes in the loading and speed of the unit are within 10% and 1%, respectively.
On the other hand, significant changes in the active power output and turbine speed of the unit occur during isolated (i.e., without being interconnected with other generating units) or islanded (i.e., interconnection with only a small number of units) operation, as well as during loading, unloading, load rejection, and turbine speed adjustment before network synchronization. It is necessary to simulate the speed governor controller and related systems with nonlinear models for changes larger than 25% in loading and 8% in turbine speed [24]. Nonlinear HPP models include the compressibility of water. An instance of this effect could be the propagating wave and hydraulic pressure oscillations in penstock during load rejections [25].
In this study, a nonlinear model was used to test all possible scenarios and a linear model was used to conduct a stability analysis of the controller. Figure 1 shows the general layout of an HPP including the feedbacks to the speed governor.

Nonlinear HPP Model
The modeling equations of the depicted components in the waterway, servomotor and guide vanes, turbine, and generator are given in the following subsections [24][25][26][27][28][29][30][31][32]. Many of the quantities below are given in the per-unit system, which is the expression of the quantities as a ratio of the actual value over the base value, and it is dimensionless. The base value is the rated value of the quantity during normal operation. The relationships between the water head in the turbine and the reservoir level, including the energy tunnel, surge tank, penstock dynamics, and friction loss, are given as follows:

Tunnel
The rate of change of water velocity through the tunnel is calculated as: (1) where Uwt is the water velocity through the tunnel in pu, Hr is the reservoir water level in pu, Hs is the water level in the surge tank in pu, Hft is the head loss due to friction in the tunnel in pu, and twt is the water starting time of the tunnel in s, which is calculated as: (2) where Q0 is the nominal flow rate in m 3 /s, H0 is the nominal net head in m, g is the gravitational acceleration in m 2 /s, and lt and At are the length and cross-sectional area of tunnel portions in m and m 2 , respectively.

Surge Tank
The water level in the surge tank is found as: where Cs is the storage capacity of the surge tank in s, and Uwt and Uwp are the water velocities, in pu, through the tunnel and penstock, respectively. The storage capacity is calculated as follows: where As is the average cross-sectional area of the surge tank in m 2 .

Penstock
The rate of change of water velocity through the penstock is defined as: where Htur is the water head in the turbine in pu, Hfp is the head loss due to friction in the penstock in pu, Hw is the head change due to the propagating wave effect in pu, and twp is the water starting time of the penstock in s, which is calculated as follows: where Q0 is nominal flow rate in m 3 /s, H0 is the nominal net head in m, g is the gravitational acceleration in m 2 /s, and lp and Ap are the length and cross-sectional area of penstock portions in m and m 2 , respectively. The water starting time or water time constant is the time needed to accelerate the water in the penstock from zero discharge to the rated discharge under the rated head. This parameter is used in both linear and nonlinear models. Its value depends on the length and cross-sectional area of the penstock, rated head, and discharge.

Turbine and Servo Cylinders
The relationships between the mechanical power output of the turbine and the guide vane opening, including the servo cylinder and the water head in front of the turbine, are given below: The mechanical power output of the turbine is defined as follows: .
where Pm is the mechanical power output of the turbine in pu, Ktur is the turbine gain, Htur is the water head in front of the turbine in pu, Utur and Unl are the water velocities, in pu, through the turbine at load and no-load, respectively, Tm is the mechanical torque in pu, and ω is the turbine speed in pu.
Utur depends on Htur and the guide vane opening G, and it is equal to Uwp: The turbine gain, Ktur, is defined as: 1 where Gfl and Gnl are, respectively, the full-load and no-load of the guide vane openings.
where G is the guide vane opening in pu, tservo is the time constant of the servomotor in s, Gset is the guide vane opening setpoint, in pu, sent from the speed governor controller, and _ is the time delay for servo opening in s.

Generator and Excitation System
The equations relating the turbine speed with the electrical torque, including field voltage, are given as follows: where Te is the electromagnetic torque in pu, and H is the inertia constant, in s, which depends on the flywheel effect [29] as: where GD 2 is the flywheel effect of the generator in tone.m 2 , n is the turbine speed in rpm, and S is the nominal apparent power of the generator in kVA. The generator in the steady-state is electrically modeled by considering the simplifications explained in [30]: where Eq is the generator internal voltage in pu, Vs is the voltage of the electrical network bus in pu, δ is the angle between ∠° and ∠0°, Xd is the direct axis reactance in pu, Xe is the bus impedance in pu, and: where Vf is the main field voltage in pu, Mf is the mutual inductance between the field and any armature phase in pu, and rf is the resistance of the field circuit in pu.
The interactions between the subsystems of the generic model are depicted in Figure  2. The implementation of the generic nonlinear model is given in Figure 3.

Linear HPP Model
Linear models are used for modeling small changes in the turbine speed and the active power of the HPP. Stability issues for the controller are investigated through the linear model. Linear model equations are obtained by the linearization of the aforementioned nonlinear equations around an operating point. The linearization of relationships between the mechanical power output of the turbine, the head in front of the turbine, the velocity of the water entering the turbine, and the guide vane opening rooting from Equations (7) and (8) where is the water starting time of the penstock in s. When the natural frequency effect is taken into account, the dynamic behavior due to the presence of penstock and the surge tank is obtained as in Equation (16) [33].
where is the water starting time of the penstock in s and ωs is the natural frequency of the mass oscillation due to the surge tank in rad/s. ωs could be calculated by using lp and Ap, which are the length and cross-sectional area of the penstock in m and m 2 , respectively, and As, which is the cross-sectional area of the surge tank in m 2 .

System Description
In this study, Seyhan I HPP was modeled with the characteristic parameters listed in Table 1. Seyhan I HPP is an aged hydropower plant that started operation in 1957. It has three vertical Francis turbines with 22.5 MVA of installed capacity each. 1. The modeled HPP has a short-medium penstock and a surge tank, but it does not have an energy tunnel. Although there are no common or standardized lengths to classify the penstocks, if any fluctuations in the active power output are observed due to wave effects within the penstock, the penstock can be considered as mediumlong and the wave effect should be taken into account while modeling the waterway. Hence, wave propagation is not considered; 2. The electrical dynamics of the generator has a very short time constant compared to that of hydrodynamics [34]. Electromagnetic interactions in the generator occur much faster than the speed governor control actions do; hence, electromagnetic generator dynamics are not considered. On the other hand, during the adjustment of the turbine speed before network synchronization, it is critical to pay regard to the mechanical starting time (also known as mechanical inertia time) for tuning speed governor parameters. Furthermore, the speed rise following a load rejection is limited by the rotational inertia of the unit. The turbine rotational inertia is approximately 5% of the generator rotational inertia [27], meaning that the rotational inertia of the unit dominantly depends on the generator characteristic rather than the hydraulic turbine. Therefore, the rotational inertia of the generator is taken into account; 3. The modelling of the electrical grid and load is necessary for simulations of the speed governor in isolated and islanded modes of operation, where small load changes result in significant frequency deviations. An interconnected mode of operation, as preferred in this study, requires the network frequency to be kept constant [35].

Model Validation
As the validation methodology, the mathematical model was constructed considering the aforementioned assumptions and modeling principles. Then, site tests were conducted for unit start-up, shut-down, and loading. The guide vane opening, the turbine speed, and the active power measurements were recorded during the site tests. Following the site tests, the measured guide vane opening values were given as workspace inputs to the mathematical model in MATLAB/Simulink. The simulations conducted led to the simulated turbine speed and the simulated active power. These simulation results were compared with the actual site measurements in Figure 4, a-c during start-up and shut-down, and the unit was disconnected from the grid. The simulated turbine speed profiles were in close agreement with the site measurements. In Figure 4-b, the unit was already synchronized with the network; hence, the guide vane opening affected the active power output. Despite the acceptable lead in the simulated response, loading profiles were in correspondence, and they attained the same active power output. In Figure 5, different models are compared with the measured active power. Each model was given the measured guide vane opening values as input. The first linear model was constructed by using the relationship in Equation (15). The second was established using Equation (16). The third was the nonlinear model generated by Equations (1)- (14). Although the nonlinear model had the most correspondence, in order to use it in stability issues, the model by Equation (16) was the most convenient one.

Proposed Adaptive Methods
Speed governors take advantage of active power control in order to follow the active power setpoint given by the operator. Figure 6 shows that the input of the main PI controller (with proportional gain, Kp, and the integral time, Ti) has two branches with different setpoints and feedbacks. One is the active power control branch, where the error is the difference between the given active power setpoint, Pset, and the measured active power, P. The other is the FCC branch, through which the frequency deviation (fset-f) exceeding the speed dead-band is added to the active power control branch after being divided by the permanent speed droop, R. Figure 6 shows the inside of the speed governor in Figure  1. Adaptive control is used for the automatic adjustment of controllers in real-time to maintain the desired performance. It is an efficient technique for dealing with deviations and uncertainties in slow-varying plant parameters [36,37].
MRAC is a direct adaptive control approach, in which the desired performance of the plant controller is obtained through a dynamic model called the reference model. This

Active Power (pu)
controller has an ordinary feedback loop taken from the process and another loop for adjusting the controller parameters. As displayed in Figure 7, the controller-which outputs a processed setpoint through comparing the given setpoint and the feedback signal, the plant in which the process occurs, the reference model by which the desired performance of the plant is modeled, and the adaptation mechanism that compares the outputs of the reference model and the plant-and MRAC are the main parts in the adaptive structure. The mechanism for adjusting the parameters can be developed by the gradient method (e.g., MIT rule) or stability theory (e.g., Lyapunov method).

Model Reference Adaptive Controller using MIT Rule
The gradient design method is based on the MIT rule, which is used for the computation of approximate sensitivity functions. The adaptive law is designed such that the controller's parameters are tuned in a direction, which decreases the quadratic performance function. For this purpose, the partial derivative of the cost function is used. The output of the adaptation mechanism, , and its relationship with the learning rate, , the output of the reference model, , and the error, , are written in Equation (17) [38,39].
: : : : : , | , | : 2 Figure 8 shows the block diagram of the proposed controller including MRAC with the MIT rule. In addition to the controller scheme shown in Figure 6, the reference model and adaptation mechanism are embedded. The frequency containment error is also given as an input to the reference model. A transport delay is added to represent the latency in the first movement of the guide vanes. The limiter in the reference model confines the reference model output in the predetermined active power reserve of the power plant. The difference between the ideal behavior through the reference model and the actual primary control action is given as an input to the adaptation mechanism. The output of the PI controller is corrected by the output θ of the adaptation mechanism. In most speed governor systems, the output of the controller is limited by the load limiter. The controller output is sent to the guide vane mechanism actuator.

Model Reference Adaptive Controller Using Lyapunov Method
The stability method relies on Lyapunov stability theory. This theory assures the stability and convergence of the error between the plant output and the model output. The procedure for developing the MRAC with the Lyapunov method starts with the derivation of the differential equation for the error. Then, a Lyapunov function is found that makes the error go to zero. In order to drive the error to zero, a Lyapunov function is used with a symmetric positive definite matrix P. The derivative of the Lyapunov function is made negative by solving the Lyapunov function with a positive definite matrix Q. The output of the adaptation mechanism, , and its relationship with the learning rate, , the output of the reference model, , and the error, , are given in Equation (18) [40][41][42].
: : : : : Figure 9 represents the block diagram for the model reference adaptive controller based on Lyapunov stability. The practical difference of this method compared to the MIT rule is using instead of as an input to the multiplication block within the adaptation mechanism.

Reference Model for Frequency Containment Control
Frequency containment control is the fastest control action taken against frequency deviations in the grid. All units, contributing to FCC, automatically give active power support by increasing/decreasing their active power output depending on the sign of the frequency deviation. An FCC action is expected to start immediately following the frequency deviation. All FCC reserves are to be given in 30 s and last for 15 min. In particular, hydropower plants are permitted to start this action with a 4 s delay at maximum [43,44].
As shown in Figure 10, the amount of active power contribution of each unit is determined according to the predefined permanent speed droop value. The responses of all interconnected units contributing to the FCC are coordinated with this value. The amount of active power support, ∆P, of the unit depends on the amount of frequency deviation, ∆f, and the permanent speed droop, R, i.e., a 200 mHz decrease in frequency of a 50 Hz network requires a 0.1 pu increase in active power output with a permanent speed droop of 0.04. The relationship between the frequency deviation, permanent droop, and change in active power output is given in Equation (19). For the adaptive controller, a reference model is needed to define the desired behavior of the plant. A first-order transfer function, as given in Equation (20), is an appropriate reference model for the frequency containment action. A time constant, , of 6 s is used in the simulations.
The defined reference model with its permitted limits is depicted in Figure 11. Within 90 s after a negative frequency deviation, (e.g., f = 49.8 Hz), the actual control action should not exceed the ideal action by 2% of the nominal generator power output [45].

Stability of the Power Control Loop
The parameters of the main PI controller shown in Figure 6 are Kp = 0.25 and Ti = 11 s. Figure 12 shows the root locus of the closed-loop system, with no active MRAC, for the different values of the proportional gain. The low-frequency pair of poles crosses to the right-hand side of the complex plane at Kp = 0.388. As the output of the MRAC effectively amplifies Kp, the closed-loop system is stable up to θ = 1.55.

Change in Net Head
The reservoir level of an HPP could change from 0.9 pu, during an arid season, to 1.1 pu, following a rainy or snowy season. The presence of other units in the power plant, which are in operation, also raises the tailwater level or decreases the inlet pressure for a common penstock. The contribution of the MRAC for FCC is more perceivable when the net head drops to 0.9 pu. The speed governor opens the guide vanes more than that in the nominal head to reach the same active power output. This introduces latency in the FCC behavior. The Hr parameter is adjusted to reflect this scenario on the mathematical model.

Degradation in Turbine Efficiency
The turbine efficiency could dramatically drop over the years due to aging. It is necessary to increase the guide vane opening to reach the same value of active power when the efficiency drops. This scenario could be simulated by increasing Gfl, which represents

Deceleration in Guide Vane Driving
The elements in the guide vane driving system are the servo cylinder, hydraulic power unit, regulation ring, and the guide vanes. Any aging, clogging, and wear in this system could slow down the movement of the guide vanes. By changing the values of ts and _ parameters, this scenario will be reflected in the simulation. Figure 13 shows the simulation results for the net head of 0.9 pu for the MRAC. The simulation conditions are as follows: The reference model matches the actual FCC action for the nominal head (i.e., net head of 1.0 pu). The learning rate, Γ, is 1 as long as the reference model corresponds to the actual FCC action. The permanent speed droop value, R, is 0.04. The FCC setpoint value changes between 0 and 0.1 as a result of the 0.004 pu frequency deviation, meaning a 49.8 Hz network frequency. Figure 13-a displays the results for MRAC with the MIT rule; similarly, Figure 13-b depicts the simulations for MRAC with the Lyapunov method. A pseudo-frequency deviation signal is given to the validated mathematical model. It is seen that when MRAC is not active, the action for FCC does not meet the requirements. It takes nearly 60 s to provide the necessary FCC reserve; however, it is expected to be given in 30 s. However, the FCC action satisfies the requirements as soon as MRAC is activated even when the Γ value is low with a very low number of occurrences (e.g., 0.8 after five cycles). As the number of the occurrences is increased to 50 and the Γ value is raised to 5, the FCC with the MIT rule action is nearly the same as the reference model. When focused on FCC with the Lyapunov method, it is seen that FCC with the Lyapunov method also satisfies the FCC requirements. The change in θ for both the MIT rule and Lyapunov method is depicted in Figure  14. One should note that θ converged to the same value and the convergence was faster with greater Γ values until a critical value. During the simulations, it was seen that when a critical Γ value was exceeded, θ displayed unstable behavior. The critical Γ value was found to be 5.6 for MRAC with the MIT rule; similarly, the critical Γ value was found to be 7.1 for MRAC with the Lyapunov method. For the MRAC with the MIT rule, the θ value converged to 1.15 independent of the value of the learning rate, Γ. For the MRAC with the Lyapunov method, the θ value converged to 1.45. Considering these saturation values, both MRAC controllers were within the stability margin, as explained in the previous section. However, a greater θ value means a greater change in guide vane opening. As the θ value was greater in the Lyapunov method, it is critical to limit the guide vane opening for secure operation. The insufficient response, i.e., when the MRAC was off, was set as the baseline performance for both the MIT rule and the Lyapunov method. The results of the simulations with different Γ values and the number of cycles for both methods (i.e., recursive occurrences of frequency deviation) are displayed on Figure 15 and listed in Table 2. The sum of the squared errors (e 2 ) to the response of the reference model was normalized to 1 pu. After 5 cycles with Γ = 0.8, the improvement was 58.8% for the MIT rule and was 65.9% for the Lyapunov method. This shows that for the same number of occurrences and the learning rate, the Lyapunov method had a better improvement in performance. Similarly, after 50 cycles with Γ = 5, the improvement was 97.5% for the MIT rule and was 96.5% for the Lyapunov method. Considering the top performance, the MIT rule performed better than the Lyapunov method.

Conclusions
Hydropower generation plays a crucial role in modern electric power systems to retard fluctuations caused by V-RESs. The FCC contribution of HPPs helps in decreasing the imbalances between supply and demand for the whole grid. In this study, model reference adaptive controllers with the MIT rule and Lyapunov method were designed for the speed governor controller of an HPP to improve the FCC performance of the unit.
The very first conclusion is that the performance of the conventional PI controller can be diminished by external disturbances, as shown in the simulations. Therefore, it is useful to add precautionary loops into the controller in order to provide the tuned performance. Secondly, adaptive controllers are very helpful in real life because it is not necessary to adjust adaptive parameters each time the disturbance occurs; however, the very first tuning of the adaptive controllers' parameters requires considerable experience or a high level of modeling. As the third conclusion, the MRAC with both the MIT rule and Lyapunov method in the active power control loop makes considerable improvements in FCC against slow-varying disturbances such as variations in the net head. Both adaptive methods are also convenient to implement on the off-the-shelf controllers such as programmable logical controllers (PLCs).
The final conclusion is on the comparison of the adaptive approaches. It was seen that the Lyapunov method has a better performance for a small number of occurrences (1-5 times); however, disregarding the time scales, the top performance of the MIT rule was greater than the Lyapunov method. For the same number of occurrences, the θ value of the Lyapunov method reaches higher than the MIT rule, meaning that the guide vanes will be opened more in the Lyapunov method. This can bring a practical precaution of adding a limiter for this potential risk.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.