Optimal Control Strategy of Turbine Governor Parameters Based on Improved Beetle Antennae Search Algorithm

: Aiming at the occurrence of long-term and ultra-low frequency oscillations in the hydropower network system, this paper derives the generalized turbine transfer function speed control system model including the flow factor T pq based on the generalized turbine model, and analyzes the influence of T pq and PID parameters on the ultra-low frequency damping of the hydraulic turbine governing system. In order to better suppress the ultra-low frequency oscillation caused by improper PID parameter settings, a comprehensive optimization objective function reflecting damping and turbine speed deviation index (ITAE) in ultra-low frequency band is established. Based on the fast and efficient optimization strategy of Beetle Antennae Search, an improved beetle antennae particle swarm optimization is constructed. In single-machine and multi-machine systems, the improved algorithm is compared with different optimization algorithms. The simulation results show that the improved algorithm can overcome the slow convergence speed and easily fall into local optimization problem, effectively improve the damping level of hydraulic turbine governing system in ultra-low frequency, and is more effective and superior than other optimization algorithms. It provides a new way of thinking and technical means to suppress the ultra-low frequency oscillation by optimizing the parameters of the speed control system. algorithm;


INTRODUCTION
In recent years, the ultra-low frequency oscillation phenomenon with an oscillation frequency lower than 0.1 has repeatedly appeared in the power grid dominated by hydropower units, and its oscillation frequency is significantly lower than the low-frequency oscillation range [1][2]. For example, on March 8, 2016, an ultra-low frequency oscillation with an oscillation frequency of about 0.05 Hz and a frequency fluctuation range of 49.9 -50.1 Hz occurred in the asynchronous interconnection test of the Yunnan power grid. After exiting the primary frequency modulation performance of some power plants, the oscillation subsided [3][4][5]. After the Chongqing-Hubei back-to-back flexible DC project is put into operation, there is also a risk of ultra-low frequency oscillation when the Sichuan-Chongqing power grid is asynchronously interconnected with the main grid. The ultra-low frequency oscillation restricts the stable operation of the power grid after asynchronous interconnection to a certain extent. Therefore, great attention must be paid to this kind of ultralow frequency oscillation phenomenon.
Aiming at the problem of ultra-low frequency oscillation, different scholars put forward different solutions and analysis methods. Based on the phenomenon of ultra-low frequency oscillation in Colombia power grid, the influence of turbine model and controller on oscillation is studied by time-domain simulation method in reference [6], and a method to suppress ultra-low frequency oscillation by adding thermal power units is proposed. In reference [7], the stability of the system is analyzed through the linear and nonlinear models of hydraulic turbines, and the mechanism of ultra-low frequency oscillation is studied by using the limit cycle in the nonlinear model. In reference [8], a method for on-line evaluation of generator damping characteristics based on energy flow is proposed and applied to online analysis and emergency control of ultra-low frequency oscillation. Finally, it is verified in a four machine two area model. In order to improve the primary frequency regulation performance of the unit, most of the research work mainly realizes the suppression of ultra-low frequency oscillation behavior by optimizing the speed control parameters of the speed regulation system. The optimization and adjustment methods can be generally divided into two categories: one is to redesign the turbine governor by combining the fuzzy theory, collaborative control, neural network and other advanced control algorithms [9][10][11][12] to replace the classic PID Governor. The other is based on particle swarm optimization, bacterial colony optimization and other intelligent optimization strategies [13][14][15][16][17][18], which optimizes the parameters of the classic PID governor to adapt to different operating conditions of the prime mover. This kind of method makes full use of the good robustness of the classical PID control strategy and is widely used in Engineering practice. In the analysis and optimization of ultra-low frequency oscillation model of hydraulic turbine, the ideal turbine model based on the linearization of stable operation point or the linear and nonlinear model proposed by IEEE working group are mostly used in the analysis and optimization of ultra-low frequency oscillation model of hydraulic turbine, and different control strategies are adopted in different controlled objects, and the suppression effect of ultra-low frequency oscillation of hydraulic turbine unit is also different. In dealing with the problem of ultra-low frequency oscillation, the system needs to be able to respond to different disturbances quickly and efficiently, so that the system can quickly recover to the original stable state.
In order to better simulate the dynamic behavior of hydraulic turbine, the generalized turbine model is derived based on the generalized equation of hydraulic turbine. Combined with the model, the damping characteristics of the turbine governing system in the ultra-low frequency region are analyzed, and the comprehensive optimization objective function is established considering the damping performance index of ultra-low frequency oscillation and the ITAE index of turbine speed deviation. Then, the PID parameters in the single load model are optimized by improved beetle antennae particle swarm optimization algorithm, and the optimal PID parameter solution is obtained by using the built comprehensive optimization objective function. Finally, the BPA software is used to simulate and analyze the 4 -machine -2 -zone system, which verifies the influence of the optimized PID parameters on the ultra-low-frequency oscillation of the power system.

ANALYSIS OF DAMPING PERFORMANCE INDEXES OF ULTRA-LOW FREQUENCY OSCILLATION
The damping characteristics of hydropower units in ultra-low frequency band are mainly affected by water hammer effect of prime mover system and control parameters of governor. The open-loop system composed of governor and prime mover is shown in Fig. 1. In Fig. 1, Δω is the speed deviation; G gov (s) is the governor transfer function; Δy is the turbine guide vane opening deviation; G ht (s) is the turbine transfer function, and ΔP m is the mechanical power deviation of the generator.
From Fig. 1, the open-loop transfer function G K of the governor and turbine system is: The governor adopts a proportional-integral-derivative (PID) governor, and its transfer function can be expressed as: In Eq. (2), B p is the adjustment coefficient; K p is the proportional adjustment coefficient; K I is the integral adjustment coefficient; K D is the differential adjustment coefficient; T G is the guide vane servomotor response time constant.
When deriving the hydraulic turbine model, starting from the generalized hydraulic turbine equation, calculate the dynamic moment of the water flow acting on the turbine runner blades under instantaneous conditions, and then use the moment of momentum theorem to obtain the generalized hydraulic turbine equation: In Eq. (3), P m is the output power of the turbine, q is the flow of the turbine, h is the working head of the turbine, dW is the volume of any fluid element in a certain flow layer in the runner area; ρ is the water flow density; v u is the water flow The circumferential component of the absolute velocity of the element; r is the radius of the flow element relative to the center of the turbine shaft; Ω is the fluid volume of the entire turbine runner.
According to the flow velocity triangle in Francis turbine runner, the circumferential component v u of absolute velocity of fluid element satisfies: In Eq. (4), F is the cross-sectional area of the runner, and β is the installation angle of the intermediate flow surface wing grid.
Considering that the dynamic angular velocity ω and the flow rate q are only related to the time t, but not to the coordinate position, the Eq. (4) is substituted into the integral term on the right side of the Eq. (3) to get: From the volume of the fluid micro-element: In Eq. (6), rdθ, dr, and dz respectively represent the length, width, and height of the fluid element.
For Francis turbine, substituting Eq. (6) into Eq. (5): In Eq. (7), D is the nominal diameter of the turbine; ; D1, D2 is the inlet and outlet diameter of the turbine runner; b1, b2 is the width of the water cross section at the inlet and outlet of the runner; ᵠ1, ᵠ2 is the crowding coefficient of the inlet and outlet blades of the middle flow surface to the flow; β1, β2 is the placement angle of the blade inlet and outlet. Define the speed factor T pω and flow factor T pq respectively: The Eq. (7) can be expressed as: When the ultra-low frequency oscillation of the hydrogenerator set occurs, the speed variety is very small, and the influence on the output power of the turbine can be ignored. The turbine power output can be expressed as: It can be seen from Eq. (12) that the output power of the turbine is related to the generator flow and head, and also to the instantaneous dynamic variation of the generator flow dq/dt. The flow factor T pq can be used to measure the influence of the instantaneous dynamic change dq/dt on the turbine output power. If the rigid water hammer model is adopted in the diversion system, the transfer function between the turbine generator flow and head can be expressed as: In Eq. (13): T w = (LV 0 )/(gH 0 ) is the inertia time constant of water flow. and V 0 is the initial velocity; H 0 is the initial head; L is the length of the diversion pipe.
The relationship between generator flow and guide vane opening and water head can be expressed as: In Eq. (14): y is the opening of guide vane. Substituting Eq. (12) and Eq. (14) into Eq. (13), the transfer function of the generalized turbine model can be obtained after the Laplace change is: When the system input signal −Δω, substituting Eq. (2) and Eq. (15) into Eq. (1), the mechanical deviation ΔP m produced by the prime mover can be obtained as: Substituting s = jω d into Eq. (16), then decomposition in the Δδ-Δω coordinate plane, the Eq. (16) can be expressed as: In Eq. (17), the specific expressions of K 1 to K 7 are shown in Appendix A. Define: Then D md represents the damping torque coefficient provided by the turbine governing system, and K ms represents the synchronous torque coefficient provided by the turbine governing system. When D md > 0, the speed control system provides positive damping to the system; when D md < 0, the speed control system provides negative damping to the system, and when the sum of the damping component caused by electromagnetic power deviation and the damping of the generator itself is not enough to offset the negative damping generated by the turbine speed regulation system, the whole hydropower unit will be in weak damping or negative damping state, which will induce system overload Low frequency oscillation.
From Eq. (18), it can be seen that the damping level of the turbine governor system in the ultra-low frequency band is closely related to the PID parameters of the governor. Substituting ω = 2πf into Eq. (18) and setting the frequency change range from 0.01 to 0.1, the characteristics of the damping coefficient D md with the PID parameters of the governor and the system frequency in the ultra-low frequency range can be obtained as shown in Fig.  2 to Fig. 4. As shown, the model parameters are:  It can be seen from Fig. 2 that in the ultra-low frequency range, appropriately increasing the K P value can improve the damping level of the hydraulic turbine governing system; from Fig. 3, it can be seen that the oscillation frequency is about 0.05 Hz as the demarcation point for the influence of K i on the damping of the turbine governing system, when the frequency is 0 ～ 0.05 Hz, increasing K i is beneficial to improve the damping level of the turbine governing system, but when the frequency is higher than 0.05 Hz, the effect is just the opposite; Fig. 4 shows that it is known that the influence of K d on the damping level of hydraulic turbine governing system has no obvious difference when the frequency is 0 ～ 0.05 Hz. When the frequency is greater than 0.05 Hz, appropriately increasing K d can effectively improve the damping level of hydraulic turbine governing system.

PARAMETER OPTIMIZATION CONTROL STRATEGY 3.1 Comprehensive Objective Function
In order to not only satisfy that the generator speed can be stabilized in the shortest time after the turbine is disturbed, but also to improve the damping level of the system in the ultra-low frequency band so that the system has stronger anti-interference ability under different disturbance conditions the damping level of the governor in the ultra-low frequency band is used as the ultra-low frequency oscillation damping performance index, combined with the ITAE index of the speed deviation of the turbine to establish a comprehensive optimization objective function.

Damping Level Measurement Index
In this paper, the damping level of the hydraulic turbine governor in the ultra-low frequency band is taken as the ultra-low frequency oscillation damping performance index, and its function J Dmd is defined as: In Eq. (20), n = (f max − f min )/Δf, f max and f min are the maximum and minimum of the oscillation frequency, respectively, Δf = 0.01 Hz is the step length of the frequency point, and for the i-th frequency point, f i = f min + (i − 1)Δf, change D md (f i ) as follows: In Eq. (21), D md (f i ) is the damping torque coefficient of the turbine speed control system when the oscillation frequency is f i .

ITAE Index of Speed Deviation
Take the ITAE criterion of the rotational speed deviation of the hydro-turbine generator set as one of the objective functions of the optimization algorithm, that is, the absolute value of the hydro-generator output speed error multiplied by the time integral as the fitness function of the algorithm, the expression is: In Eq. (22): t is the time; t s is the integral upper limit time; Δω(t) is the speed deviation of the turbine unit.

Comprehensive Objective Function
Taking into account the Ultra-low frequency oscillation damping performance index and ITAE index of the speed deviation of hydraulic turbine, according to Eq. (20) and Eq. (22), the comprehensive objective function J of the optimization algorithm in this paper can be expressed as: In Eq. (23): K 1 and K 2 are the damping level index and speed deviation of hydraulic turbine governor respectively, and the weight coefficient of ITAE index is obtained. When calculating the comprehensive objective, each target component should be normalized. When K 1 > K 2 , it means that the proportion of damping torque in the objective function is larger; when K 1 < K 2 , the proportion of speed deviation in the objective function is larger. In this paper, the proportion of the two is balanced, taking K 1 = K 2 = 0.5.

Optimization Algorithm of Governor Parameters 3.2.1 Standard Particle Swarm Optimization Algorithm
In order to solve the optimal PID control parameters, the optimization space of the standard Particle Swarm Optimization (PSO) is set in the three-dimensional search space. A population composed of n particles X = (X 1 , X 2 , X 3 , ..., X n ), where the i-th particle is represented as a 3- corresponding to the values of K p , K i , K d . According to the fitness function, the fitness value corresponding to each particle is calculated, and the individual extreme value Pbest and the group extreme value Gbest are updated. During each iteration, the particles update their speed and position by tracking Pbest and Gbest. The update formula can be expressed as: In Eq. (24): w is the weight of inertia; d = 1, 2, 3; i = 1, 2, ..., n; t is the current iteration number; V id (t) and X id (t) represent the t-th iteration ,the position and velocity of the i-th particle in the d-dimensional space; c 1 and c 2 are nonnegative constants, called learning factors; r 1 and r 2 are random numbers distributed between (0, 1).

Improved Particle Swarm Optimization Based on Beetle Antennae Search
It can be seen from Eq. (24) that the position update of traditional PSO is not only related to the current speed, but also related to the historical performance of particles and mutual communication, which makes it have a good group character, so that it can be used in fine search. Performance is better. However, in some cases, the convergence speed is slow or it is easy to form premature convergence due to the early search speed being too fast, and eventually fall into the local optimal value. The Beetle Antennae Search (BAS) is different from most optimization algorithms in that there is only one individual "beetle" in the search process, so that the optimization process is fast and the amount of calculation is low, and it does not need to know the specific form of the function, and does not require gradient information, can achieve efficient optimization. Based on the advantages of the BAS, this paper proposes an improved PSO based on the BAS, which is called BASPSO. The algorithm integrates the judgment of the BAS and the PSO to update the position of the particles, so that it can better jump out of the local optimum, and can find the global best point faster and more accurately, so as to realize the comprehensive improvement of global search ability and search speed. Among them, the formula Y id used by the BAS to determine the particle's next direction can be expressed as: In Eq. (25), step represents the step length of beetle; dir represents the direction of beetle randomly generated; sign is a symbolic function; fleft and fright respectively represent the intensity of "food" odor perceived by the left and right antennae of beetle, and its expression for: In Eq. (26), x l and x r respectively represent the coordinates of the left and right antennae of beetle, which can be expressed as: In Eq. (27), x represents the position of the centroid of beetle, and d 0 represents the distance between the two antennaes of beetle.
In order to improve the calculation performance of the algorithm, an adaptive step size strategy is adopted for the step size step of the BAS, which protects particles with fitness values better than the average fitness value, and gives larger step sizes to the poorer particles. So that it can quickly jump out of the poor search range, its formula is expressed as: In Eq. (28): J i is the fitness value of the i-th particle; J min is the minimum fitness value of the current particle swarm; J v is the average fitness value of the current particle swarm.
From Eq. (24) and Eq. (25), we can get the speed and position update formula of BASPSO: In Eq. (29),   0, 1 g  is the weighting coefficient. When g > 0.5, it means that the proportion of PSO judgment in the particle position update is larger; g < 0.5, means the proportion of the BAS judgment in the particle position update is larger. In this paper, in order to highlight the advantages of the BAS and make it account for a larger proportion, g = 0.4.

Optimization Algorithm Flow
The process steps of the BASPSO are shown in Fig. 5.

CASE SIMULATION 4.1 Single-Machine System
Single unit single load system is a common system used to study stability. The analysis model of ultra-low frequency oscillation of hydro generator governing system is given in Fig. 6. Based on this model, the influence of different PID parameters optimization control strategies on ultra-low frequency oscillation of hydropower units is analyzed. The model and parameter selection of the turbine and its governor are the same as the above analysis. The generator and external system are usually simplified as a first-order system, and the transfer function can be expressed as: In Eq. (30): T a is the unit inertia time constant, e n = D + K L , D is the generator damping coefficient; K L is the load frequency adjustment effect coefficient. Generally take T a = 8, e n = 1.3.
A frequency perturbation is applied at the initial moment of the system, and the PID parameters of the governor are optimized by the BASPSO. The relevant parameters are set as follows: Particle swarm size n = 100, the maximum number of iterations is 50, c 1 = c 2 = 2.0, step min = 0.1, step max = 1, w = 0.7, g = 0.4, d 0 = 1. The optimized PID parameters are K p = 2.36, K i = 0.31, K d = 2.49. Fig. 7 shows the change of the damping torque coefficient D md of the turbine governor system before and after optimization. 8 Figure 7 Variation curve of damping coefficient before and after optimization It can be seen from Fig. 7 that the damping torque coefficient D md before optimization is less than 0 in the ultra-low frequency range from 0.04 to 0.1 Hz, and the optimized damping torque coefficient D md is greater than zero in the ultra-low frequency range, indicating the BASPSO has a larger damping torque coefficient in the ultra-low frequency range of 0.04 ～ 0.1 Hz, which is beneficial to the stability of the system. In order to compare the advantages of the improved algorithm in this paper, a disturbance signal of the same frequency is applied at the initial moment of the system, using the PSO, the BAS and the BASPSO optimizes the PID parameters in the singlemachine single-load system in Fig. 6, so as to obtain the fitness value change curve under different algorithms (as shown in Fig. 8), and the generator speed deviation change curve in the first 50s (such as Fig. 9) and optimized parameter values and corresponding performance indicators (shown in Tab. 1).

Figure 8 Convergence curve of fitness value of different algorithms under frequency disturbance
It can be seen from Fig. 8 that the improved optimization algorithm is obviously better than the PSO and the BAS when considering the fitness value and iteration speed, which shows that the improved algorithm has stronger optimization ability. Analysis of Fig. 9 and Tab. 1 shows that compared to the other two algorithms, the improved algorithm has better improvements in overshoot (represented by the maximum value under frequency disturbance) and adjustment time. Under disturbances, the maximum deviation of the improved algorithm is 0.38, and the adjustment time is 12 s, which is reduced compared to the BAS and PSO algorithms. It also shows that the improved algorithm is effective in setting the governor parameters of hydroturbine generators.

Multi-Machine System Simulation
Using this method to build a 4-machine 2-area system in BPA for simulation testing, the model diagram is shown in Fig. 10. Since the ultra-low frequency oscillation phenomenon mostly occurs in hydropower-dominant units, in order to more easily analyze the mechanism of the ultra-low frequency oscillation phenomenon in the hydropower unit, the generators in the four-machine system are all hydraulic generator units, and all generators The M card considering the damping winding is adopted, the excitation regulation system uses the new excitation system bus FV card, and the PSS uses the Three Gorges PSS model SI card. The hydraulic turbine model is shown in Eq. (15). The governor model is a PID governor, and its model is shown in Eq. (2). The initial parameters of the governor and the turbine are shown in Tab. 2. Among them, G1 and G2 are optimized by the beetle algorithm, G3 and G4 are optimized by the particle swarm algorithm, and the remaining parameters remain unchanged. Then use the BASPSO to optimize the PID parameters of the governors of each unit. Since the parameters of the four turbines are the same, the PID parameters of each unit are optimized using BASPSO in 3.1 to optimize the PID parameters of a single turbine speed control system. The governor PID parameters of a turbine: K p = 2.36, K i = 0.316, K d = 2.49. At t = 3 s, apply a frequency disturbance to the system to induce the ultra-low frequency oscillation of the system. It can be seen from Fig. 11 that the system oscillation frequency is about 0.14 Hz before optimization, 0.1 Hz after G1 and G2 optimization, and 0.08 Hz when all units are optimized. It can be seen that the ultra-low frequency oscillation of the system is effectively suppressed after the BASPSO, which shows the effectiveness of this method. Moreover, the optimization of all units has shorter regulation time, less oscillation times and smaller frequency deviation than only optimizing G1 and G2 units.

CONCLUSION
In order to better solve the problem of ultra-low frequency oscillation in hydropower-dominant power systems, this paper studies the ultra-low frequency oscillation mechanism and suppression methods of hydropower units, and draws the following conclusions: (1) Based on the generalized hydraulic turbine model, increasing the values of K p and K d can improve the damping level of the turbine governing system. When the oscillation frequency of K i is 0 ～ 0.05 Hz, the larger the value, the better the damping level of the turbine governing system. When 0.05 ～ 0.1 Hz, its effect is just opposite.
(2) Compared with the PSO and BAS, the BASPSO has the characteristics of small overshoot and good stability after tuning the PID parameters, which can effectively improve the dynamic performance of the hydraulic turbine adjustment system during the transition process. At the same time, the algorithm has fast convergence speed and high accuracy, which effectively overcomes the shortcomings of standard particle swarm algorithm, such as easy maturity, and improves the accuracy of the algorithm.
(3) The PID governor parameters obtained by the improved optimization algorithm are not only verified in a singlemachine system, but also applicable in a four-machine twozone system.