A method for optimizing speed regulator control parameters for primary frequency regulation of hydropower units
By constructing a primary frequency modulation simulation model of hydropower units and optimizing the PID speed regulator parameters using Tent chaotic mapping, the problems of difficult adjustment of PID parameters of the hydropower unit speed regulator are solved, and more efficient primary frequency modulation control of hydropower units is achieved.
Patent Information
- Application Number
- CN202410975477.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2044-07-19
AI Technical Summary
During the frequency regulation of existing water-power units, it is difficult to adjust the PID parameters of the speed regulator, and the adjustment flexibility is insufficient, which cannot meet the adjustment requirements under various load conditions. In addition, traditional PID control is insufficient in terms of speed and accuracy.
A primary frequency regulation simulation model of hydroelectric unit was constructed, and the control parameters of the parallel PID speed regulator were optimized using an adaptive particle swarm algorithm based on Tent chaotic mapping. By optimizing the gains of Kp, Ki, and Kd, the adjustment effect was improved.
Under different load conditions, the frequency regulation effect of the hydroelectric unit is significantly improved, the rise time and adjustment time are shortened, the accuracy and flexibility of frequency regulation are improved, and the overall benefits of the power plant are enhanced.
Smart Images

Figure CN119010069B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power systems and automatic control technology, in particular to a primary frequency regulation technology for hydropower units, and specifically to a method for optimizing speed regulator control parameters for primary frequency regulation of hydropower units. Background Art
[0002] When a generator set is connected to the grid, the difference between the power supply side and the load side causes the grid frequency to fluctuate, deviating from a stable operating state. At this point, the generator set is required to perform primary frequency regulation. This involves adjusting the generator set's processing based on the direction and value of the frequency deviation from 50Hz, using the inherent characteristics of the generator set control system to adapt to real-time changes on the load side. For hydropower units, primary frequency regulation is currently achieved by utilizing the functional characteristics of a parallel PID speed regulator to maintain a relatively stable grid frequency.
[0003] At present, the control law of the hydropower set speed governor is basically based on PID. Due to the disadvantages that the PID control parameters are difficult to adjust and the dynamic stability is poor, for example, the patent application publication number CN110374789A discloses a method and device for switching PID parameters of a hydro turbine set speed governor, comprising: optimizing and adjusting the PID parameters of all hydro turbine set speed governors using a preset PID parameter tuning algorithm to obtain a first PID parameter and a second PID parameter; grouping the hydro turbine set speed governors according to the active power amplitude corresponding to the oscillation of the hydro turbine set speed governor, and determining the hydro turbine set speed governor of each group; PID parameter operation mode of the speed governor; according to the PID parameter operation mode of each group of turbine speed governors, a PID parameter fuzzy switching model of the turbine speed governor is constructed respectively; the real-time frequency deviation value obtained in real time is input into the PID parameter fuzzy switching model, and the PID parameter operation mode of the turbine speed governor is switched according to the output result of the PID parameter fuzzy switching model, so that the turbine speed governor can take into account both the one-time frequency regulation performance and the damping level, thereby suppressing the ultra-low frequency oscillation of the system from the power plant side; this type of existing technology has the following shortcomings in the process of one-time frequency regulation of hydropower units:
[0004] 1. The PID parameter tuning of the hydropower unit speed regulator is difficult. In industrial applications, it is necessary to go through multiple simulation analyses and field tests before obtaining a good parameter combination, and further optimization is still needed.
[0005] 2. The hydraulic transition process of the primary frequency modulation of a hydropower unit is relatively complex and is affected by multiple factors such as hydraulic, mechanical, and electrical factors. It exhibits strong nonlinear characteristics. Therefore, in actual operation, PID control with fixed parameters cannot achieve good control effects.
[0006] 3. Only two sets of PID parameters are provided for speed regulator parameter switching, which cannot meet the adjustment requirements of primary frequency regulation of hydropower units under various load conditions;
[0007] 4. Only reducing the active power amplitude when the hydropower unit oscillates is used as the optimization goal, which improves the stability of the system response, but lacks consideration for speed and accuracy. Summary of the Invention
[0008] The purpose of the present invention is to solve the technical problem that the traditional PID control technology has insufficient adjustment flexibility, poor adjustment efficiency and effect, and proposes a method for optimizing the control parameters of the speed regulator of the hydropower unit primary frequency regulation to solve the problem that the PID parameters of the hydropower unit speed regulator cannot be flexibly adjusted during the primary frequency regulation of the existing hydropower unit.
[0009] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0010] A method for optimizing control parameters of a speed regulator for primary frequency regulation of a hydropower unit comprises the following steps:
[0011] Step 1: Construct a primary frequency regulation simulation model of a hydropower unit, which includes a parallel PID speed regulator simulation model, a servo system simulation model, a water diversion system simulation model, and a turbine simulation model;
[0012] Step 2: Maintain the given frequency f of the parallel PID speed regulator * The measurement frequency f is set to change stepwise at the beginning of the simulation to form a frequency disturbance Δf. The hydropower unit primary frequency modulation simulation model is run to measure the output power sequence P at the turbine simulation model end. sim ;
[0013] Step 3: Calculate the output power sequence P sim With the target power sequence P tar The residual square value of , and the mean of the residual square value is obtained to get the mean square error
[0014] Step 4: Convert the mean square error As the objective function of the primary frequency regulation optimization of the hydropower unit, the control parameter K p , K i , K d As an optimization variable, the adaptive particle swarm optimization algorithm based on Tent chaos map is used to optimize the primary frequency regulation simulation model of the hydropower unit.
[0015] Step 5: Substitute the optimized control parameters into the parallel PID speed regulator simulation model and reapply the same frequency disturbance Δf as in step 2; run the hydropower primary frequency regulation simulation model and measure the output power P at the turbine simulation model end. sim2 ;
[0016] Step 6: Compare the output power P before and after optimization sim and P sim2 Response situation; if the output power P sim2 The response performance is not as good as P sim , then repeat steps 3, 4, and 5 until the output power P sim2 Response performance is better than P sim ; If the output power P sim2 Response performance is better than P sim , then the optimization ends.
[0017] In step 1, when establishing the primary frequency regulation simulation model of the hydropower unit, Figure 1 As shown, the following steps are taken:
[0018] Step 1-1: Establish a parallel PID speed regulator simulation model;
[0019] Step 1-2: Establish a simulation model of the servo system;
[0020] Step 1-3: Establish a water diversion system simulation model;
[0021] Step 1-4: Build a turbine simulation model.
[0022] In step 1-1, if Figure 2 As shown in the figure, the established parallel PID speed regulator simulation model is as follows:
[0023]
[0024] Among them, Y pid (s), f(s) and f(s) are the speed regulator output signals Y pid , given frequency f * and the Laplace transform of the measurement frequency f(s), b p is the permanent slip coefficient; K p , K i , K d are proportional gain, integral gain, and differential gain, respectively. In the present invention, they are set as optimization variables; s is the Laplace operator.
[0025] In steps 1-2, if Figure 3As shown in the figure, the established servo system simulation model includes an integrated amplifier, an electro-hydraulic converter, an auxiliary servo, a main pressure regulating valve, a main servo, and internal feedback; the model is specifically as follows:
[0026]
[0027] Where Y(s) is the Laplace transform of the output signal Y of the servo system, K1 is the gain coefficient of the integrated amplifier, K2 is the gain coefficient of the electro-hydraulic converter, T1 is the reaction time constant of the auxiliary relay, T2 is the reaction time constant of the main relay, K F is the internal feedback gain.
[0028] In steps 1-3, the constructed water diversion system simulation model is as follows:
[0029]
[0030] Where h(s) is the water head signal, q(s) is the flow signal, T w is the water flow inertia time constant.
[0031] In steps 1-4, when establishing the turbine simulation model, the details are as follows:
[0032] (1) With turbine torque M and flow rate Q as dependent variables, and head h, unit speed n, and guide vane opening y as independent variables, the turbine characteristics can be expressed using formula (4):
[0033]
[0034] Where M(n, h, y) refers to the turbine torque characteristic function, and Q(n, h, y) refers to the turbine flow characteristic function;
[0035] (2) Performing Taylor series expansion on Equation (4) and ignoring higher-order terms, it can be further expressed as:
[0036]
[0037] Where: m t Indicates the relative deviation value of turbine torque, q t Indicates the relative deviation of turbine flow, h t Indicates the relative deviation value of the turbine head, n t Indicates the relative deviation value of the speed, y t Indicates the relative deviation value of the guide vane opening; They represent the transfer coefficients of turbine torque to water head, speed and guide vane opening respectively; They represent the transfer coefficients of turbine flow to water head, speed and guide vane opening respectively;
[0038] (3) Perform Laplace transform on equation (5) as shown in equation (6):
[0039]
[0040] Where: m t (s), q t (s), h t (s), n t (s) and yt(S) are m t ,q t 、h t 、n t and y t Laplace transform of
[0041] (4) Considering that the primary frequency modulation belongs to the small fluctuation working condition, its frequency variation range is small, so the speed-related variables are ignored, and the final model can be obtained from formula (6) as shown in formula (7):
[0042]
[0043] In step 4, when obtaining the objective function, the following steps are taken:
[0044] Step s1: Set the target power sequence as follows:
[0045]
[0046] Among them, P tar represents the target power sequence, Respectively represent the n power values in the target power sequence;
[0047] Step s2: Run the primary frequency regulation simulation model of the hydropower unit. The output power sequence obtained by simulation is as follows:
[0048] P sim =(p1, p2, p3…p n ) (9)
[0049] Among them, P sim Represents the simulation power sequence, p1, p2, p3…p n Respectively represent the n power values in the simulation power sequence;
[0050] Step s3: Calculate P tar With P sim The squared residual value between the target power and the simulated power corresponding to the sequence;
[0051]
[0052] Among them, AP represents the residual square sequence;
[0053] Step s4: Calculate the average value of the sum of the residual square sequence AP to obtain the average mean square error between the target power sequence and the simulated power sequence, and use it as the objective function for optimizing the control parameters of the speed regulator of the primary frequency regulation of the hydropower unit, as shown below;
[0054]
[0055] in, Mean squared error.
[0056] In step 4,
[0057] An adaptive particle swarm optimization algorithm based on Tent chaos mapping is introduced to optimize the control of primary frequency regulation of hydropower units. The specific steps are as follows:
[0058] Step s1) setting basic parameters: setting initial parameters for the inertia weight system w, individual learning factor c1, social learning factor c2, number of iterations m, and particle swarm size N;
[0059] Step s2) introduces the Tent chaos mapping method to initialize the particle swarm position; first, the position X(1) of the first particle is generated according to the following formula:
[0060] X(1)=l b +rand*(u b -l b ) (12)
[0061] Where u b 、l b Represent the upper and lower position boundaries of the particle respectively, and rand represents a random number. Then, based on the idea of chaotic mapping, the positions of the remaining N-1 particles are generated:
[0062]
[0063] Where X(i) represents the position of the i-th particle, X(i+1) represents the position of the i+1-th particle, and d is the chaos coefficient;
[0064] Step s3) Initialize the movement speed of N particles in the particle swarm:
[0065] V j =V min +rand*(V max -V min )j=1,2,3…N (14)
[0066] V j represents the velocity of the jth particle, V max 、V min Represent the upper and lower boundaries of particle motion speed respectively;
[0067] Step s4) Calculate the fitness value of each particle; the fitness calculation method of each particle is the same, and the steps are as follows:
[0068] (1) Convert the particle position X(i) into the optimization variable K p , K i , K d Substitute into the parallel PID speed regulator simulation model and keep the given frequency f of the parallel PID speed regulator * The measurement frequency f is set to change stepwise at the beginning of the simulation to form a frequency disturbance Δf;
[0069] (2) Run the primary frequency modulation simulation model of the hydropower unit and measure the output power sequence P at the turbine simulation model end. sim ;
[0070] (3) Set the target power sequence P tar , and obtain the mean square error Get the objective function value;
[0071] (4) Taking the objective function value as the fitness value of the particle;
[0072] Step s5) Update the individual optimal position and the group optimal position; according to the fitness value of each particle, the optimal fitness value of each particle so far is used as the individual extreme value P best , the optimal fitness value of the entire group so far is taken as the group mechanism P gbest ;
[0073] Step s6) determining whether the number of iterations has been reached;
[0074] Step s7) adaptively updates particle position and velocity; the specific steps are as follows:
[0075] (1) Adaptively adjust the inertia weight coefficient w according to the following formula:
[0076]
[0077] Where w max 、w min are the upper and lower bounds of the inertia weight coefficient, respectively, and t is the current number of iterations;
[0078] (2) Update particle movement speed:
[0079] V t+1 =wV t +c1*(P best -X t )+c2*(P gbest -X t )
[0080] Among them, X t 、V t Particle position and speed before update, V t+1 Represents the particle movement speed after the update iteration
[0081] (3) Update particle position:
[0082] X t+1 =X t +V t+1
[0083] Represents the updated particle position;
[0084] Step s8) The number of iterations t is increased by one, and step s4 is repeated to recalculate the fitness value of each particle.
[0085] A particle swarm optimization algorithm for optimizing primary frequency regulation control of a hydropower unit includes the following steps:
[0086] Step S1: Set basic parameters and initialize particle position and movement speed;
[0087] Step S2: Convert the particle position X(i) into the optimization variable K p , K i , K d Substitute into the parallel PID speed regulator simulation model;
[0088] Step S3: Run the frequency modulation simulation model once, calculate the objective function value, and use it as the particle fitness value;
[0089] Step S4: Update the individual optimal position and the group optimal position;
[0090] Step S5: Determine whether the current number of iterations has been reached;
[0091] Step S6: Adaptively update particle position and velocity;
[0092] Step S7: Compare the response before and after optimization. If the response performance after optimization does not reach the target value, the number of iterations is increased by one, and the process returns to step S2 for iterative optimization; otherwise, the optimization ends.
[0093] In step S1, the following sub-steps are included:
[0094] Step S1-1) setting basic parameters, including initial parameters for the inertia weight system w, individual learning factor c1, social learning factor c2, number of iterations m, and particle swarm size N;
[0095] Step S1-2) Introduce the Tent chaos mapping method to initialize the particle swarm position; first generate the position X(1) of the first particle according to the following formula:
[0096] X(1)=l b +rand*(u b -l b )
[0097] Where u b 、l b Represent the upper and lower position boundaries of the particle respectively, and rand represents a random number. Then, based on the idea of chaotic mapping, the positions of the remaining N-1 particles are generated:
[0098]
[0099] Where X(i) represents the position of the i-th particle, X(i+1) represents the position of the i+1-th particle, and d is the chaos coefficient;
[0100] Step S1-3) Initialize the movement speed of N particles in the particle swarm:
[0101] V j =V min +rand*(V max -V min )j=1,2,3…N
[0102] V j represents the velocity of the jth particle, V max 、V min They represent the upper and lower boundaries of the particle motion speed respectively.
[0103] In step S2, the particle position X(i) is converted into the optimization variable K p , K i , K d Substitute into the parallel PID speed regulator simulation model and keep the given frequency f of the parallel PID speed regulator * The measurement frequency f is set to change in a step at the beginning of the simulation to form a frequency disturbance Δf.
[0104] In step S3, the following sub-steps are included:
[0105] Step S3-1) Run the primary frequency modulation simulation model of the hydropower unit and measure the output power sequence P of the turbine simulation model end. sim ;
[0106] Step S3-2) Set the target power sequence P tar , and obtain the mean square error Get the objective function value;
[0107] Step S3-3) takes the objective function value as the fitness value of the particle.
[0108] In step S4, the individual optimal position and the group optimal position are updated; specifically, according to the fitness value of each particle, the optimal fitness value of each particle so far is used as the individual extreme value P best , the optimal fitness value of the entire group so far is taken as the group mechanism P gbest ;
[0109] In step S6, the particle position and velocity are adaptively updated; the specific steps are as follows:
[0110] (1) Adaptively adjust the inertia weight coefficient w according to the following formula:
[0111]
[0112] Where w max 、w min are the upper and lower bounds of the inertia weight coefficient, respectively, and t is the current number of iterations;
[0113] (2) Update particle movement speed:
[0114] V t+1 =wV t +cl*(P best -X t )+c2*(P gbest -X t )
[0115] Among them, X t 、V t Particle position and speed before update, V t+1 Represents the particle movement speed after the update iteration
[0116] (3) Update particle position:
[0117] X t+1 =X t +V t+1
[0118] Represents the updated particle position.
[0119] An electronic device includes a memory and a processor, wherein the processor and the memory are connected via a communication bus. The memory is used to store a computer program. When the computer program is executed by the processor, the method for optimizing the control parameters of a speed regulator for primary frequency regulation of a hydropower unit and / or the particle swarm optimization algorithm for optimizing the primary frequency regulation control of a hydropower unit are implemented.
[0120] Compared with the prior art, the present invention has the following technical effects:
[0121] 1) Compared with the conventional PID control method, the present invention realizes intelligent optimization of the PID parameters of the speed regulator through the adaptive particle swarm optimization method, which has a certain improvement on the primary frequency regulation effect of the hydropower unit under various loads;
[0122] 2) Under different load conditions, the present invention optimizes the PID parameters of the hydropower generator speed regulator through an intelligent algorithm, improving the response of the hydropower generator's primary frequency regulation. Taking a 60% load condition as an example, the rise time is shortened from 8.554 seconds to 3.921 seconds, and the regulation time is shortened from 15.041 seconds to 7.056 seconds.
[0123] 3) The present invention greatly improves the accuracy of primary frequency regulation assessment, increases the primary frequency regulation contribution rate of the power plant, and ensures the overall efficiency of the power plant; the present invention adopts a parallel PID speed regulator simulation model, and each control parameter is independent of each other, with a clearer structure and greater flexibility.
[0124] 4) The present invention adopts a nonlinear servo system simulation model. The addition of dead zone and limiting links makes the simulation effect of the servo system closer to the actual results on site; the water diversion system simulation model and turbine simulation model adopted by the present invention significantly improve the simulation speed and reduce the consumption of computer performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0125] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0126] Figure 1 Schematic diagram of the primary frequency regulation simulation model of the hydropower unit in the present invention;
[0127] Figure 2 for Figure 1 Schematic diagram of the parallel PID speed regulator simulation model;
[0128] Figure 3 for Figure 1 Schematic diagram of the servo system simulation model;
[0129] Figure 4 for Figure 1 Schematic diagram of the water diversion system simulation model and the turbine simulation model;
[0130] Figure 5 This is a flowchart of the adaptive particle swarm optimization algorithm based on Tent chaos mapping in the present invention;
[0131] Figure 6 Schematic diagram of a frequency modulation response optimization result (power increase) under a 60% load condition in an embodiment of the present invention;
[0132] Figure 7 Schematic diagram of a frequency modulation response optimization result (power drop) under a 60% load condition in an embodiment of the present invention;
[0133] Figure 8 This is a schematic diagram of the physical structure of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0134] A method for optimizing control parameters of a speed regulator for primary frequency regulation of a hydropower unit comprises the following steps:
[0135] Step 1: Construct a primary frequency regulation simulation model of a hydropower unit, which includes a parallel PID speed regulator simulation model, a servo system simulation model, a water diversion system simulation model, and a turbine simulation model;
[0136] Step 2: Maintain the given frequency f of the parallel PID speed regulator * The measurement frequency f is set to change stepwise at the beginning of the simulation to form a frequency disturbance Δf; the hydropower unit primary frequency modulation simulation model is run to measure the output power sequence P at the turbine simulation model end. sim ;
[0137] Step 3: Calculate the output power sequence P sim With the target power sequence P tar The residual square value of , and the mean of the residual square value is obtained to get the mean square error
[0138] Step 4: Convert the mean square error As the objective function of the primary frequency regulation optimization of the hydropower unit, the control parameter K p , K i , K d As an optimization variable, the adaptive particle swarm optimization algorithm based on Tent chaos map is used to optimize the primary frequency regulation simulation model of the hydropower unit.
[0139] Step 5: Substitute the optimized control parameters into the parallel PID speed regulator simulation model and reapply the same frequency disturbance Δf as in step 2; run the hydropower primary frequency regulation simulation model and measure the output power P at the turbine simulation model end. sim2 ;
[0140] Step 6: Compare the output power P before and after optimization sim and P sim2 Response situation; if the output power P sim2 The response performance is not as good as P sim , then repeat steps 3, 4, and 5 until the output power P sim2 Response performance is better than P sim ; If the output power P sim2 Response performance is better than P sim , then the optimization ends.
[0141] In step 1, when establishing the primary frequency regulation simulation model of the hydropower unit, Figure 1 As shown, the following steps are taken:
[0142] Step 1-1: Establish a parallel PID speed regulator simulation model;
[0143] Step 1-2: Establish a simulation model of the servo system;
[0144] Step 1-3: Establish a water diversion system simulation model;
[0145] Step 1-4: Build a turbine simulation model.
[0146] In step 1-1, if Figure 2 As shown in the figure, the established parallel PID speed regulator simulation model is as follows:
[0147]
[0148] Among them, Y pid (s), f * (s) and f(s) are the speed regulator output signals Y pid , given frequency f * and the Laplace transform of the measurement frequency f(s), b p is the permanent slip coefficient; K p , K i , K d are proportional gain, integral gain, and differential gain, respectively. In the present invention, they are set as optimization variables; s is the Laplace operator.
[0149] In steps 1-2, if Figure 3 As shown in the figure, the established servo system simulation model includes an integrated amplifier, an electro-hydraulic converter, an auxiliary servo, a main pressure regulating valve, a main servo, and internal feedback; the model is specifically as follows:
[0150]
[0151] Where Y(s) is the Laplace transform of the output signal Y of the servo system, K1 is the gain coefficient of the integrated amplifier, K2 is the gain coefficient of the electro-hydraulic converter, T1 is the reaction time constant of the auxiliary relay, T2 is the reaction time constant of the main relay, K F is the internal feedback gain.
[0152] In steps 1-3, if Figure 4 As shown in the figure, the constructed water diversion system simulation model is as follows:
[0153]
[0154] Where h(s) is the water head signal, q(s) is the flow signal, T w is the water flow inertia time constant.
[0155] In steps 1-4, if Figure 4 As shown in Figure 2, when establishing a turbine simulation model, the details are as follows:
[0156] (1) With turbine torque M and flow rate Q as dependent variables, and head h, unit speed n, and guide vane opening y as independent variables, the turbine characteristics can be expressed using formula (4):
[0157]
[0158] Where M(n, h, y) refers to the turbine torque characteristic function, and Q(n, h, y) refers to the turbine flow characteristic function;
[0159] (2) Performing Taylor series expansion on Equation (4) and ignoring higher-order terms, it can be further expressed as:
[0160]
[0161] Where: m t Indicates the relative deviation value of turbine torque, q t Indicates the relative deviation of turbine flow, h t Indicates the relative deviation value of the turbine head, n t Indicates the relative deviation value of the speed, y t Indicates the relative deviation value of the guide vane opening; They represent the transfer coefficients of turbine torque to water head, speed and guide vane opening respectively; They represent the transfer coefficients of turbine flow to water head, speed and guide vane opening respectively;
[0162] (3) Perform Laplace transform on equation (5) as shown in equation (6):
[0163]
[0164] Where: m t (s), q t (s), h t (s), n t (s) and y t (S) are m t ,q t 、h t 、n t and y t Laplace transform of
[0165] (4) Considering that the primary frequency modulation belongs to the small fluctuation working condition, its frequency variation range is small, so the speed-related variables are ignored, and the final model can be obtained from formula (6) as shown in formula (7):
[0166]
[0167] In step 4, when obtaining the objective function, the following steps are taken:
[0168] Step s1: Set the target power sequence as follows:
[0169]
[0170] Among them, P tar represents the target power sequence, Respectively represent the n power values in the target power sequence;
[0171] Step s2: Run the primary frequency regulation simulation model of the hydropower unit. The output power sequence obtained by simulation is as follows:
[0172] P sim =(p1, p2, p3…p n ) (9)
[0173] Among them, P sim Represents the simulation power sequence, p1, p2, p3…p n Respectively represent the n power values in the simulation power sequence;
[0174] Step s3: Calculate P tar With P sim The squared residual value between the target power and the simulated power corresponding to the sequence;
[0175]
[0176] Among them, AP represents the residual square sequence;
[0177] Step s4: Calculate the average value of the sum of the residual square sequence AP to obtain the average mean square error between the target power sequence and the simulated power sequence, and use it as the objective function for optimizing the control parameters of the speed regulator of the primary frequency regulation of the hydropower unit, as shown below;
[0178]
[0179] in, Mean squared error.
[0180] In step 4,
[0181] The adaptive particle swarm optimization algorithm based on Tent chaos map is introduced to realize the control optimization of primary frequency regulation of hydropower units. Figure 5The specific steps are as follows:
[0182] Step s1) setting basic parameters: setting initial parameters for the inertia weight system w, individual learning factor c1, social learning factor c2, number of iterations m, and particle swarm size N;
[0183] Step s2) introduces the Tent chaos mapping method to initialize the particle swarm position; first, the position X(1) of the first particle is generated according to the following formula:
[0184] X(1)=l b +rand*(u b -l b ) (12)
[0185] Where u b 、l b Represent the upper and lower position boundaries of the particle respectively, and rand represents a random number. Then, based on the idea of chaotic mapping, the positions of the remaining N-1 particles are generated:
[0186]
[0187] Where X(i) represents the position of the i-th particle, X(i+1) represents the position of the i+1-th particle, and d is the chaos coefficient, which is 0.499.
[0188] Step s3) Initialize the movement speed of N particles in the particle swarm:
[0189] V j =V min +rand*(V max -V min )j=1,2,3…N (14)
[0190] V j represents the velocity of the jth particle, V max 、V min Represent the upper and lower boundaries of particle motion speed respectively;
[0191] Step s4) Calculate the fitness value of each particle; the fitness calculation method of each particle is the same, and the steps are as follows:
[0192] (1) Convert the particle position X(i) into the optimization variable K p , K i , K d Substitute into the parallel PID speed regulator simulation model and keep the given frequency f of the parallel PID speed regulator * The measurement frequency f is set to change stepwise at the beginning of the simulation to form a frequency disturbance Δf;
[0193] (2) Run the primary frequency modulation simulation model of the hydropower unit and measure the output power sequence P at the turbine simulation model end. sim ;
[0194] (3) Set the target power sequence P tar , and obtain the mean square error Get the objective function value;
[0195] (4) Taking the objective function value as the fitness value of the particle;
[0196] Step s5) Update the individual optimal position and the group optimal position; according to the fitness value of each particle, the optimal fitness value of each particle so far is used as the individual extreme value Pbest, and the optimal fitness value of the entire group so far is used as the group mechanism Pgbest;
[0197] Step s6) determining whether the number of iterations has been reached;
[0198] Step s7) adaptively updates particle position and velocity; the specific steps are as follows:
[0199] (1) Adaptively adjust the inertia weight coefficient w according to the following formula:
[0200]
[0201] Where w max 、w min are the upper and lower bounds of the inertia weight coefficient, respectively, and t is the current number of iterations;
[0202] (2) Update particle movement speed:
[0203] V t+1 =wV t +c1*(P best -X t )+c2*(P gbest -X t )
[0204] Among them, X t 、V t Particle position and speed before update, V t+1 Represents the particle movement speed after the update iteration
[0205] (3) Update particle position:
[0206] X t+1 =X t +V t+1
[0207] Represents the updated particle position;
[0208] Step s8) The number of iterations t is increased by one, and step s4 is repeated to recalculate the fitness value of each particle.
[0209] A particle swarm optimization algorithm for optimizing primary frequency regulation control of a hydropower unit includes the following steps:
[0210] Step S1: Set basic parameters and initialize particle position and movement speed;
[0211] Step S2: Convert the particle position X(i) into the optimization variable K p , K i , K d Substitute into the parallel PID speed regulator simulation model;
[0212] Step S3: Run the frequency modulation simulation model once, calculate the objective function value, and use it as the particle fitness value;
[0213] Step S4: Update the individual optimal position and the group optimal position;
[0214] Step S5: Determine whether the current number of iterations has been reached;
[0215] Step S6: Adaptively update particle position and velocity;
[0216] Step S7: Compare the response before and after optimization. If the response performance after optimization does not reach the target value, the number of iterations is increased by one, and the process returns to step S2 for iterative optimization; otherwise, the optimization ends.
[0217] In step S1, the following sub-steps are included:
[0218] Step S1-1) setting basic parameters, including initial parameters for the inertia weight system w, individual learning factor c1, social learning factor c2, number of iterations m, and particle swarm size N;
[0219] Step S1-2) Introduce the Tent chaos mapping method to initialize the particle swarm position; first generate the position X(1) of the first particle according to the following formula:
[0220] X(1)=l b +rand*(u b -l b )
[0221] Where u b 、l b Represent the upper and lower position boundaries of the particle respectively, and rand represents a random number. Then, based on the idea of chaotic mapping, the positions of the remaining N-1 particles are generated:
[0222]
[0223] Where X(i) represents the position of the i-th particle, X(i+1) represents the position of the i+1-th particle, and d is the chaos coefficient, which is 0.499.
[0224] Step S1-3) Initialize the movement speed of N particles in the particle swarm:
[0225] V j =V min +rand*(V max -V min )j=1,2,3…N
[0226] V j represents the velocity of the jth particle, V max 、V min They represent the upper and lower boundaries of the particle motion speed respectively.
[0227] In step S2, the particle position X(i) is converted into the optimization variable K p , K i , K d Substitute into the parallel PID speed regulator simulation model and keep the given frequency f of the parallel PID speed regulator * The measurement frequency f is set to change in a step at the beginning of the simulation to form a frequency disturbance Δf.
[0228] In step S3, the following sub-steps are included:
[0229] Step S3-1) Run the primary frequency modulation simulation model of the hydropower unit and measure the output power sequence P of the turbine simulation model end. sim ;
[0230] Step S3-2) Set the target power sequence P tar , and obtain the mean square error Get the objective function value;
[0231] Step S3-3) takes the objective function value as the fitness value of the particle.
[0232] In step S4, the individual optimal position and the group optimal position are updated; specifically, according to the fitness value of each particle, the optimal fitness value of each particle so far is used as the individual extreme value P best , the optimal fitness value of the entire group so far is taken as the group mechanism P gbest ;
[0233] In step S6, the particle position and velocity are adaptively updated; the specific steps are as follows:
[0234] (1) Adaptively adjust the inertia weight coefficient w according to the following formula:
[0235]
[0236] Where w max 、w min are the upper and lower bounds of the inertia weight coefficient, respectively, and t is the current number of iterations;
[0237] (2) Update particle movement speed:
[0238] V t+1 =wV t +c1*(P best -X t )+c2*(P gbest -X t )
[0239] Among them, X t 、V t Particle position and speed before update, V t+1 Represents the particle movement speed after the update iteration
[0240] (3) Update particle position:
[0241] X t+1 =X t +V t+1
[0242] Represents the updated particle position.
[0243] An electronic device includes a memory 1 and a processor 2. The processor 2 and the memory 1 are connected via a communication bus 3. The memory 1 is used to store a computer program. When the computer program is executed by the processor 2, a method for optimizing control parameters of a speed regulator for primary frequency regulation of a hydropower unit and / or a particle swarm optimization algorithm for optimizing primary frequency regulation control of a hydropower unit are implemented.
[0244] Figure 8 The present invention illustrates a schematic diagram of the physical structure of an electronic device, which includes a processor 2, a communication interface 4, a memory 1, and a communication bus 3. The processor 2, the communication interface 4, and the memory 1 communicate with each other via the communication bus 3. The processor 2 can call logic instructions in the memory 1 to execute a method for optimizing speed regulator control parameters for primary frequency regulation of a hydropower unit and a particle swarm optimization algorithm for optimizing primary frequency regulation control of a hydropower unit.
[0245] In addition, the logical instructions in the memory 1 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in the present invention. The storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0246] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the speed regulator control parameter optimization method for primary frequency regulation of a hydropower unit and the particle swarm optimization algorithm for secondary frequency regulation control optimization of a hydropower unit.
[0247] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the speed regulator control parameter optimization method for primary frequency regulation of a hydropower unit and the particle swarm optimization algorithm for primary frequency regulation control optimization of a hydropower unit.
[0248] Example:
[0249] The present invention is verified and tested based on a domestic hydropower unit simulation model. The simulation model includes a parallel PID governor simulation model, a servo system simulation model, a water diversion system simulation model, and a turbine simulation model. Its basic parameters are as follows:
[0250]
[0251]
[0252] Based on the above hydropower unit simulation model, a primary frequency regulation optimization test of the hydropower unit was carried out under 60% load conditions, and the power response results were evaluated using the two indicators of regulation time and rise time.
[0253] Rise time t r Refers to the time required for the power response curve to transition from 10% to 90% of the steady-state value for the first time, the adjustment time t s Refers to the time when the output power response curve finally enters the range of ±5% deviation from the steady-state value and no longer exceeds this range.
[0254] Rise time t of primary frequency regulation power response of hydropower unit before optimizationr1 is 8.554 seconds, adjust the time t s1 Based on the present invention, five tests of primary frequency regulation optimization of hydropower units were carried out, with test numbers 1, 2, 3, 4, and 5, and the results of each test are as follows:
[0255]
[0256] Taking a 60% load condition as an example, according to the results of five hydropower unit primary frequency regulation optimization tests, the rise time was shortened from 8.554 seconds to 3.921 seconds, and the regulation time was shortened from 15.041 seconds to 7.056 seconds. Therefore, the present invention has a good optimization effect on the primary frequency regulation process of hydropower units.
Claims
1. A method for optimizing the control parameters of a speed regulator for primary frequency regulation of a hydropower unit, characterized in that: The following steps are involved: Step 1: Construct a primary frequency regulation simulation model of a hydropower unit, which includes a parallel PID speed regulator simulation model, a servo system simulation model, a water diversion system simulation model, and a turbine simulation model; Step 2: Maintain the given frequency f of the parallel PID speed regulator * The measurement frequency f is set to change stepwise at the beginning of the simulation to form a frequency disturbance Δf. The hydropower unit primary frequency modulation simulation model is run to measure the output power sequence P at the turbine simulation model end. sim ; Step 3: Calculate the output power sequence P sim With the target power sequence P tar The residual square value of , and the mean of the residual square value is obtained to get the mean square error Step 4: Convert the mean square error As the objective function of the primary frequency regulation optimization of the hydropower unit, the control parameter K p , K i , K d As an optimization variable, the adaptive particle swarm optimization algorithm based on Tent chaos map is used to optimize the primary frequency regulation simulation model of the hydropower unit. Step 5: Substitute the optimized control parameters into the parallel PID speed regulator simulation model, and reapply the same frequency disturbance Δf as in step 2, run the hydropower primary frequency regulation simulation model, and measure the output power P at the turbine simulation model end. sim2 ; Step 6: Compare the output power P before and after optimization sim and P sim2 Response situation; if the output power P sim2 The response performance is not as good as P sim , then repeat steps 3, 4, and 5 until the output power P sim2 Response performance is better than P sim ; If the output power P sim2 Response performance is better than P sim , then the optimization ends.
2. The method according to claim 1, characterized in that In step 1, when establishing the primary frequency regulation simulation model of the hydropower unit, the following steps are adopted: Step 1-1: Establish a parallel PID speed regulator simulation model; Step 1-2: Establish a simulation model of the servo system; Step 1-3: Establish a water diversion system simulation model; Step 1-4: Build a turbine simulation model.
3. The method according to claim 2, characterized in that In step 1-1, the established parallel PID speed regulator simulation model is as follows: Among them, Y pid (s), f * (s) and f(s) are the speed regulator output signals Y pid , given frequency f * and the Laplace transform of the measurement frequency f(s), b p is the permanent slip coefficient; K p , K i , K d are proportional gain, integral gain, and differential gain respectively; s is the Laplace operator.
4. The method according to claim 3, characterized in that In step 1-2, the established servo system simulation model includes an integrated amplifier, an electro-hydraulic converter, an auxiliary servo, a main pressure regulating valve, a main servo, and internal feedback. The specific model is as follows: Where Y(s) is the Laplace transform of the output signal Y of the servo system, K1 is the gain coefficient of the integrated amplifier, K2 is the gain coefficient of the electro-hydraulic converter, T1 is the reaction time constant of the auxiliary relay, T2 is the reaction time constant of the main relay, K F is the internal feedback gain.
5. The method according to claim 2, characterized in that In steps 1-3, the constructed water diversion system simulation model is as follows: Where h(s) is the water head signal, q(s) is the flow signal, T w is the water flow inertia time constant.
6. The method according to claim 2 or 5, characterized in that In steps 1-4, when establishing the turbine simulation model, the details are as follows: (1) With turbine torque M and flow rate Q as dependent variables, and head h, unit speed n, and guide vane opening y as independent variables, the turbine characteristics can be expressed using formula (4): Where M(n,h,y) refers to the turbine torque characteristic function, and Q(n,h,y) refers to the turbine flow characteristic function; (2) Performing Taylor series expansion on Equation (4) and ignoring higher-order terms, it can be further expressed as: Where: m t Indicates the relative deviation value of turbine torque, q t Indicates the relative deviation of turbine flow, h t Indicates the relative deviation value of the turbine head, n t Indicates the relative deviation value of the speed, y t Indicates the relative deviation value of the guide vane opening; They represent the transfer coefficients of turbine torque to water head, speed and guide vane opening respectively; They represent the transfer coefficients of turbine flow to water head, speed and guide vane opening respectively; (3) Perform Laplace transform on equation (5) as shown in equation (6): Where: m t (s), q t (s), h t (s), n t (s) and y t (s) are m t ,q t 、h t 、n t and y t Laplace transform of (4) Considering that the primary frequency modulation belongs to the small fluctuation working condition, its frequency variation range is small, so the speed-related variables are ignored, and the final model can be obtained from formula (6) as shown in formula (7):
7. The method according to claim 1, characterized in that In step 4, when obtaining the objective function, the following steps are taken: Step s1: Set the target power sequence as follows: Among them, P tar represents the target power sequence, Respectively represent the n power values in the target power sequence; Step s2: Run the primary frequency regulation simulation model of the hydropower unit. The output power sequence obtained by simulation is as follows: P sim =(p1,p2,p3…p n ) (9); Among them, P sim Represents the simulation power sequence, p1, p2, p3…p n Respectively represent the n power values in the simulation power sequence; Step s3: Calculate P tar With P sim The squared residual value between the target power and the simulated power corresponding to the sequence; Where ΔP represents the residual square sequence; Step s4: Calculate the average value of the sum of the residual square sequence ΔP to obtain the average mean square error between the target power sequence and the simulated power sequence, and use it as the objective function for optimizing the control parameters of the speed regulator of the primary frequency regulation of the hydropower unit, as shown below; in, represents the mean square error.
8. The method according to claim 1, characterized in that In step 4, An adaptive particle swarm optimization algorithm based on Tent chaos mapping is introduced to optimize the control of primary frequency regulation of hydropower units. The specific steps are as follows: Step s1) setting basic parameters: setting initial parameters for the inertia weight system w, individual learning factor c1, social learning factor c2, number of iterations m, and particle swarm size N; Step s2) introduces the Tent chaos mapping method to initialize the particle swarm position; first, the position X(1) of the first particle is generated according to the following formula: X(1)=l b +rand*(u b -l b ) (12); Where u b 、l b Represent the upper and lower position boundaries of the particle respectively, and rand represents a random number. Then, based on the idea of chaotic mapping, the positions of the remaining N-1 particles are generated: Where X(i) represents the position of the i-th particle, X(i+1) represents the position of the i+1-th particle, and d is the chaos coefficient; Step s3) Initialize the movement speed of N particles in the particle swarm: V j =V min +rand*(V max -V min )j=1,2,3…N (14); V j represents the velocity of the jth particle, V max 、V min Represent the upper and lower boundaries of particle motion speed respectively; Step s4) Calculate the fitness value of each particle; the fitness calculation method of each particle is the same, and the steps are as follows: (1) Convert the particle position X(i) into the optimization variable K p , K i , K d Substitute into the parallel PID speed regulator simulation model and keep the given frequency f of the parallel PID speed regulator * The measurement frequency f is set to change stepwise at the beginning of the simulation to form a frequency disturbance Δf; (2) Run the primary frequency modulation simulation model of the hydropower unit and measure the output power sequence P at the turbine simulation model end. sim ; (3) Set the target power sequence P tar , and obtain the mean square error Get the objective function value; (4) Taking the objective function value as the fitness value of the particle; Step s5) Update the individual optimal position and the group optimal position; according to the fitness value of each particle, the optimal fitness value of each particle so far is used as the individual extreme value P best , the optimal fitness value of the entire group so far is taken as the group mechanism P gbest ; Step s6) determining whether the number of iterations has been reached; Step s7) adaptively updates particle position and velocity; the specific steps are as follows: (1) Adaptively adjust the inertia weight coefficient w according to the following formula: Where w max 、w min are the upper and lower bounds of the inertia weight coefficient, respectively, and t is the current number of iterations; (2) Update particle movement speed: V t+1 =wV t +c1*(P best -X t )+c2*(P gbest -X t ); Among them, X t 、V t Particle position and speed before update, V t+1 Represents the particle movement speed after the update iteration; (3) Update particle position: X t+1 =X t +V t+1 ; Represents the updated particle position; Step s8) The number of iterations t is increased by one, and step s4 is repeated to recalculate the fitness value of each particle.
Citation Information
Patent Citations
PID parameter switching method and device for a water turbine set speed regulator
CN110374789A
Method for intelligently starting water turbine of pump storage unit under working condition
CN106485064A
Thermal power generating unit primary frequency modulation parameter optimization method considering variable working condition correction
CN117638993A