Speed regulator control parameter optimization method for primary frequency modulation of hydroelectric generating set
Patent Information
- Application Number
- CN202410975477.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-07-19
AI Technical Summary
[0008]本发明的目的是为了解决现有水电机组一次调频过程中,无法灵活的对水电机组调速器PID参数进行调节,从而导致传统PID控制技术存在调节灵活性不足、调节的效率及效果不佳的技术问题,而提出的一种用于水电机组一次调频的调速器控制参数优化方法
[0121]1)与常规PID控制方法相比,本发明通过自适应粒子群优化方法实现对调速器PID参数的智能优化,对各种负荷下的水电机组一次调频效果均有一定的改善;
Smart Images

Figure CN119010069A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power system and automatic control technology, in particular to the primary frequency regulation technology of hydropower units, and specifically to a method for optimizing control parameters of a speed regulator used for primary frequency regulation of hydropower units. Background Art
[0002] When the generator set is connected to the grid, due to the difference between the power supply side and the load side, the grid frequency fluctuates to a certain extent and deviates from the stable operation state. At this time, the grid-connected generator set is required to perform a primary frequency adjustment, that is, according to the direction and value of the frequency deviation from 50Hz, the generator set processing is adjusted through the characteristics of the generator set control system to adapt to the real-time changes on the load side. For hydropower units, the current primary frequency adjustment is mainly achieved by using the functional characteristics of the parallel PID speed regulator to maintain the relative stability of the grid frequency.
[0003] At present, the control law of the hydropower unit 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 with application publication number CN110374789A discloses a method and device for switching PID parameters of a hydropower unit speed governor, including: using a preset PID parameter adjustment algorithm to optimize and adjust the PID parameters of all hydropower unit speed governors to obtain a first PID parameter and a second PID parameter; grouping the hydropower unit speed governors according to the active power amplitude corresponding to the oscillation of the hydropower unit speed governor, and determining the hydropower unit 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, the 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 the one-time frequency regulation performance and damping level at the same time, thereby realizing the suppression of ultra-low frequency oscillation of the system from the power plant side; this type of prior art has the following shortcomings in the process of one-time frequency regulation of hydropower units:
[0004] 1. It is difficult to adjust the PID parameters of the hydropower unit speed regulator. In industrial applications, it is necessary to go through multiple simulation analyses and field tests before a better parameter combination can be obtained, and further optimization is still needed;
[0005] 2. The hydraulic transition process of the primary frequency modulation of the hydropower unit is relatively complex, affected by multiple factors such as hydraulic, mechanical and electrical, and exhibits strong nonlinear characteristics. Therefore, in the actual working process, the PID control with fixed parameters cannot achieve a good control effect;
[0006] 3. Only two sets of PID parameters are provided for the speed regulator to switch parameters, which cannot meet the adjustment requirements of the primary frequency regulation of the hydropower unit 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 PID parameters of the speed regulator of the hydropower unit cannot be flexibly adjusted during the primary frequency regulation of the existing hydropower unit, resulting in insufficient adjustment flexibility, poor adjustment efficiency and effect of the traditional PID control technology, and a method for optimizing the control parameters of the speed regulator for the primary frequency regulation of the hydropower unit is proposed.
[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, wherein the primary frequency regulation simulation model of a hydropower unit includes a parallel PID governor 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 primary frequency modulation simulation model of the hydropower unit is run to measure the output power sequence P at the end of the turbine simulation model. 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 of the parallel PID speed regulator is p , K i , K d As an optimization variable, the adaptive particle swarm algorithm based on Tent chaotic mapping 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: Establish 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 specifically 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 They are proportional gain, integral gain and differential gain respectively, and are set as optimization variables in the present invention; s is the Laplace operator.
[0025] In step 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 servomotor, a main pressure regulating valve, a main servomotor and internal feedback; the specific model is 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 specifically as follows:
[0029]
[0030] Where h(s) is the water head signal, q(s) is the flow rate 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, water head h, unit speed n, and guide vane opening y as independent variables, the turbine characteristics can be expressed by formula (4):
[0033]
[0034] In the formula, 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) By performing Taylor series expansion on equation (4) and ignoring the 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 of the turbine head, n t Indicates the relative deviation of the speed, y t Indicates the relative deviation value of the guide vane opening; They represent the transfer coefficient 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) Performing Laplace transformation on equation (5) is 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 t The Laplace transform of
[0041] (4) Considering that the primary frequency modulation belongs to the small fluctuation 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, and 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 simulated power sequence, p1, p2, p3…p n Respectively represent n power values in the simulation power sequence;
[0050] Step s3: Calculate P tar With P sim The residual square value of the corresponding target power and simulation power in 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 simulation power sequence, and use it as the control parameter optimization objective function of the speed regulator of the primary frequency regulation of the hydropower unit, as shown below;
[0054]
[0055] in, Mean square error.
[0056] In step 4,
[0057] The adaptive particle swarm optimization algorithm based on Tent chaotic mapping is introduced to realize the control optimization 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] In the formula, u b , l b Represent the upper and lower position boundaries of the particle respectively, and rand represents a random number. Then, the positions of the remaining N-1 particles are generated based on the idea of chaotic mapping:
[0062]
[0063] Among them, 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 group:
[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 Respectively represent the upper and lower boundaries of the particle motion speed;
[0067] Step s4) calculates 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 end of the turbine simulation model sim ;
[0070] (3) Setting the target power sequence P tar , get 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] In the formula, 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 the 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 conditions 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 is terminated.
[0093] In step S1, the following sub-steps are included:
[0094] Step S1-1) setting basic parameters, including 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;
[0095] Step S1-2) 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:
[0096] X(1)=l b +rand*(u b -l b )
[0097] In the formula, u b , l b Represent the upper and lower position boundaries of the particle respectively, and rand represents a random number. Then, the positions of the remaining N-1 particles are generated based on the idea of chaotic mapping:
[0098]
[0099] Among them, 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 group:
[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 stepwise 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 to measure the output power sequence P of the turbine simulation model end. sim ;
[0106] Step S3-2) Setting the target power sequence P tar , get 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] In the formula, 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, and when the computer program is executed by the processor, the method for optimizing the speed regulator control parameters 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, and 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 unit speed regulator through an intelligent algorithm to improve the response effect of the primary frequency regulation of the hydropower unit. Taking the 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, improves 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, each control parameter is independent of each other, the structure is clearer, and the flexibility is stronger.
[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 the 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 in conjunction with the accompanying drawings and embodiments:
[0126] Figure 1 It is a schematic diagram of a primary frequency modulation simulation model of a 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 simulation model of the servo system;
[0129] Figure 4 for Figure 1 Schematic diagram of the water diversion system simulation model and the turbine simulation model;
[0130] Figure 5 It is a flow chart of optimization of the adaptive particle swarm algorithm based on Tent chaotic mapping in the present invention;
[0131] Figure 6 It is a 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 It is a schematic diagram of a frequency modulation response optimization result (power reduction) under a 60% load condition in an embodiment of the present invention;
[0133] Figure 8 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, wherein the primary frequency regulation simulation model of a hydropower unit includes a parallel PID governor 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 primary frequency modulation simulation model of the hydropower unit is run to measure the output power sequence P at the end of the turbine simulation model. 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 of the parallel PID speed regulator is p , K i , K d As an optimization variable, the adaptive particle swarm algorithm based on Tent chaotic mapping 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: Establish 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 specifically 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 They are proportional gain, integral gain and differential gain respectively, and are set as optimization variables in the present invention; s is the Laplace operator.
[0149] In step 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 servomotor, a main pressure regulating valve, a main servomotor and internal feedback; the specific model is 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 rate signal, T w is the water flow inertia time constant.
[0155] In steps 1-4, if Figure 4 As shown in the figure, when establishing the turbine simulation model, the details are as follows:
[0156] (1) With turbine torque M and flow rate Q as dependent variables, water head h, unit speed n, and guide vane opening y as independent variables, the turbine characteristics can be expressed by formula (4):
[0157]
[0158] In the formula, 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) By performing Taylor series expansion on equation (4) and ignoring the 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 of the turbine head, n t Indicates the relative deviation value of the speed, y t Indicates the relative deviation of the guide vane opening; They represent the transfer coefficient 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) Performing Laplace transformation on equation (5) is 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 t The Laplace transform of
[0165] (4) Considering that the primary frequency modulation belongs to the small fluctuation 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, and 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 simulated power sequence, p1, p2, p3…p n Respectively represent n power values in the simulation power sequence;
[0174] Step s3: Calculate P tar With P sim The residual square value of the corresponding target power and simulation power in 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 simulation power sequence, and use it as the control parameter optimization objective function of the speed regulator of the primary frequency regulation of the hydropower unit, as shown below;
[0178]
[0179] in, Mean square error.
[0180] In step 4,
[0181] The adaptive particle swarm optimization algorithm based on Tent chaotic mapping is introduced to realize the control optimization of primary frequency regulation of hydropower units. Figure 5As shown; the 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] In the formula, u b , l b Represent the upper and lower position boundaries of the particle respectively, and rand represents a random number. Then, the positions of the remaining N-1 particles are generated based on the idea of chaotic mapping:
[0186]
[0187] Among them, 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 group:
[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 Respectively represent the upper and lower boundaries of the particle motion speed;
[0191] Step s4) calculates 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 end of the turbine simulation model sim ;
[0194] (3) Setting the target power sequence P tar , get 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] In the formula, 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 The particle position and speed before updating, 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 the 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 conditions 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 is terminated.
[0217] In step S1, the following sub-steps are included:
[0218] Step S1-1) setting basic parameters, including 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;
[0219] Step S1-2) 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:
[0220] X(1)=l b +rand*(u b -l b )
[0221] In the formula, u b , l b Represent the upper and lower position boundaries of the particle respectively, and rand represents a random number. Then, the positions of the remaining N-1 particles are generated based on the idea of chaotic mapping:
[0222]
[0223] Among them, 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 group:
[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 stepwise 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 to measure the output power sequence P of the turbine simulation model end. sim ;
[0230] Step S3-2) Setting the target power sequence P tar , get 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] In the formula, 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 comprises 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 speed regulator control parameter optimization method 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 An example of a physical structure diagram of an electronic device is provided, the electronic device comprising: a processor 2, a communication interface 4, a memory 1 and a communication bus 3, wherein 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 the logic instructions in the memory 1 to execute a speed regulator control parameter optimization method for primary frequency regulation of a hydropower unit and a particle swarm optimization algorithm for primary frequency regulation control optimization of a hydropower unit.
[0245] In addition, the logic 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 it is 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 a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the present invention. The storage medium includes: various media that can store program codes, 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 optimizing primary frequency regulation control 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, etc. 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] The rise time t of the primary frequency modulation power response of the 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, respectively. The results of each test are as follows:
[0255]
[0256] Taking 60% load condition as an example, according to the results of 5 hydropower unit primary frequency modulation optimization tests, the rise time is shortened from 8.554 seconds to 3.921 seconds, and the adjustment time is shortened from 15.041 seconds to 7.056 seconds. Therefore, the present invention has a good optimization effect on the primary frequency modulation process of the hydropower unit.
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, wherein the primary frequency regulation simulation model of a hydropower unit includes a parallel PID governor simulation model, a servo system simulation model, a water diversion system simulation model, and a turbine simulation model; Step 2: Keep the given frequency f* of the parallel PID speed regulator unchanged, set the measurement frequency f to change in a step at the beginning of the simulation to form a frequency disturbance Δf, run the primary frequency modulation simulation model of the hydropower unit, and measure the output power sequence P at the end of the turbine simulation model. 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 of the parallel PID speed regulator is p , K i , K d As an optimization variable, the adaptive particle swarm algorithm based on Tent chaotic mapping 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: Establish 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 specifically as follows: Among them, Y pid (s), f*(s) and f(s) are the speed regulator output signals Y pid , the Laplace transform of the given frequency f* and the measured 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 2, characterized in that In step 1-2, the established servo system simulation model includes an integrated amplifier, an electro-hydraulic converter, an auxiliary servomotor, a main pressure regulating valve, a main servomotor, and internal feedback; the model is specifically 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 specifically as follows: Where h(s) is the water head signal, q(s) is the flow rate 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 turbine head h, unit speed n, and guide vane opening y as independent variables, the turbine characteristics can be expressed by formula (4): In the formula, M(n, h, y) refers to the turbine torque characteristic function, and Q(n, h, y) refers to the turbine flow characteristic function; (2) By performing Taylor series expansion on equation (4) and ignoring the 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 of the turbine head, n t Indicates the relative deviation of the speed, y t Indicates the relative deviation value of the guide vane opening; They represent the transfer coefficient 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) Performing Laplace transformation on equation (5) is 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 t The Laplace transform of (4) Considering that the primary frequency modulation belongs to the small fluctuation 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, and 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 n power values in the simulation power sequence; Step s3: Calculate P tar With P sim The residual square value of the corresponding target power and simulation power in the sequence; Among them, ΔP represents the residual square sequence; Step s 4: 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 simulation power sequence, and use it as the control parameter optimization objective function of the speed regulator of the primary frequency regulation of the hydropower unit, as shown below; in, Mean square error.
8. The method according to claim 1, characterized in that In step 4, The adaptive particle swarm optimization algorithm based on Tent chaotic mapping is introduced to realize the control optimization 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) In the formula, u b , l b Represent the upper and lower position boundaries of the particle respectively, and rand represents a random number. Then, the positions of the remaining N-1 particles are generated based on the idea of chaotic mapping: Among them, 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 group: 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 Respectively represent the upper and lower boundaries of the particle motion speed; Step s4) calculates 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, keep the given frequency f* of the parallel PID speed regulator unchanged, set the measurement frequency f to change in steps at the beginning of the simulation, and 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 end of the turbine simulation model sim ; (3) Setting 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: In the formula, 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 The particle position and speed before updating, 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.
9. A particle swarm optimization algorithm for optimizing primary frequency regulation control of hydropower units, characterized in that: The following steps are involved: Step S1: Set basic parameters and initialize the particle position and movement speed; 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; Step S3: Run the frequency modulation simulation model once, calculate the objective function value, and use it as the particle fitness value; Step S4: Update the individual optimal position and the group optimal position; Step S5: Determine whether the current number of iterations has been reached; Step S6: Adaptively update particle position and velocity; Step S7: Compare the response conditions 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 is terminated.
10. The algorithm according to claim 9, characterized in that In step S1, the following sub-steps are included: Step S1-1) setting basic parameters, including 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 S1-2) 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 ) In the formula, u b , l b Represent the upper and lower position boundaries of the particle respectively, and rand represents a random number. Then, the positions of the remaining N-1 particles are generated based on the idea of chaotic mapping: Among them, 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 S1-3) Initialize the movement speed of N particles in the particle group: V j =V min +rand*(V max -V min )j=1,2,3…N 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.
11. The algorithm according to claim 9, characterized in that In step S2, the particle position X(i) is converted into the optimization variable K p , K i , K d Substitute the parallel PID speed regulator into the simulation model, keep the given frequency f* of the parallel PID speed regulator unchanged, and set the measurement frequency f to change in a step at the beginning of the simulation to form a frequency disturbance Δf.
12. The algorithm according to claim 9, characterized in that In step S3, the following sub-steps are included: Step S3-1) Run the primary frequency modulation simulation model of the hydropower unit to measure the output power sequence P of the turbine simulation model end. sim ; Step S3-2) Setting the target power sequence P tar , and obtain the mean square error Get the objective function value; Step S3-3) takes the objective function value as the fitness value of the particle.
13. The algorithm according to claim 9, characterized in that 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 ; In step S6, the particle position and velocity are adaptively updated; the specific steps are as follows: (1) Adaptively adjust the inertia weight coefficient w according to the following formula: In the formula, 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 The particle position and speed before updating, 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.
14. An electronic device, characterized in that: The invention comprises a memory (1) and a processor (2), wherein the processor (2) and the memory (1) are connected via a communication bus (3), and the memory (1) is used to store a computer program, and when the computer program is executed by the processor (2), the method for optimizing the control parameters of a speed regulator for primary frequency regulation of a hydropower unit as claimed in claims 1 to 8 is implemented.
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
Intelligent optimization method of PID controller parameters
CN110888317A
Pumped storage unit frequency modulation parameter optimization method and frequency modulation method
CN111027177A
Design method of fractional order PID controller
CN115097719A
Cited By
PID (Proportion Integration Differentiation) parameter setting method for inhibiting conflict between primary frequency modulation and secondary frequency modulation of hydroelectric generating set
CN119602309A
PID parameter setting method for inhibiting conflict between primary frequency modulation and secondary frequency modulation of hydroelectric generator set
CN119602309B
Hydroelectric generating set adaptive PID controller design method based on whale optimization algorithm and BP neural network
CN119717484A
Intelligent control method and system for hydroelectric generating set speed regulator
CN119813259A
Hydroelectric generating set intelligent robust controller design method based on whale optimization algorithm and H infinity
CN120044787A
