Wind power plant AGC parameter optimization method and system based on GWO-LSTM neural network, medium and processor
By applying the AGC parameter optimization method based on GWO-LSTM neural network on wind farms, the problems of AGC control accuracy and robustness in the new power system are solved, and more efficient frequency adjustment and stability are achieved.
Patent Information
- Application Number
- CN202411193283.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-02-11
AI Technical Summary
The traditional AGC scheduling mode and the AGC system of thermal power units cannot effectively meet the needs of new power system frequency regulation, especially when the randomness and volatility of the power system are increasing.
The GWO-LSTM neural network optimization method is adopted to obtain the GWO-LSTM neural network model by establishing a regional power grid frequency model, and the GWO-LSTM neural network model is obtained by optimizing the hyperparameters of LSTM by using the Gray Wolf Optimization Algorithm. Optimization of time domain parameters in model prediction control.
It effectively reduces errors during the control process, improves the accuracy of AGC control and the robustness of the system, and ensures the frequency stability of the wind farm under different disturbance conditions.
Smart Images

Figure CN119419837A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system frequency regulation, and in particular to a wind farm AGC parameter optimization method, system, medium and processor based on a GWO-LSTM neural network. Background Art
[0002] Maintaining the frequency stability of the system is one of the important goals of the power system. To achieve this goal, automatic generation control (AGC) plays an indispensable role. AGC maintains the frequency stability of the power system by adjusting the power generation of the frequency regulation unit. Normally, thermal power units and traditional hydropower units provide the main AGC output; however, in the new power system, due to the substantial increase in power electronics and renewable energy, the dominant position of traditional synchronous machines has been overturned. The rotational inertia of the new power system is reduced, and the randomness and volatility of the power system are also increasing, which leads to huge challenges for the power system. Therefore, the traditional AGC dispatching mode and the AGC system that relies solely on traditional thermal power units can no longer effectively meet the frequency regulation needs of the new power system, and it is urgent to further optimize the control effect of AGC.
[0003] In view of this, a wind farm AGC parameter optimization method, system, medium and processor based on GWO-LSTM neural network are needed. Summary of the invention
[0004] In view of the problem that the existing technology cannot effectively meet the frequency regulation requirements of the new power system, the present invention provides a wind farm station AGC parameter optimization method, system, medium and processor based on GWO-LSTM neural network, which can effectively reduce the error in the control process and improve the accuracy of AGC control and the robustness of the system by updating the model parameters online. The specific technical solution is as follows:
[0005] A wind farm AGC parameter optimization method based on GWO-LSTM neural network, comprising:
[0006] S1: Establish a regional power grid frequency model including wind farms, so as to use model predictive control to adjust the frequency error of wind farms and issue instructions to generator sets;
[0007] S2: Build an LSTM neural network model, obtain the power grid system status data according to the regional power grid frequency model and initialize the LSTM neural network model;
[0008] S3: Use the GWO algorithm to optimize and adjust the hyperparameters of the LSTM neural network model to obtain the GWO-LSTM neural network model, and train the GWO-LSTM neural network model offline;
[0009] S4: Obtain the state vector and control vector of the power system, use the GWO-LSTM neural network model to calculate the predicted time domain parameters of the model predictive control, obtain the optimal parameter combination under different working conditions, and adaptively adjust the parameters of the model predictive control to output the optimal frequency control command.
[0010] Furthermore, the establishment of a regional power grid frequency model including wind farms comprises the following steps:
[0011] S11: The frequency response model of the thermal power unit is constructed as follows:
[0012]
[0013] S12: Construct the frequency response model of wind turbine as follows:
[0014]
[0015] S13: The frequency response model of the tie line between two stations is constructed as follows:
[0016]
[0017] S14: Based on the above model analysis, the regional power grid frequency model including wind farms is constructed as follows:
[0018] (M2s+D2)△f=△P tie +ΔP W -ΔP L ;
[0019] S15: The transfer function of the controlled system of the wind farm is:
[0020]
[0021] In the above formula, R G is the regulation coefficient of the synchronous unit in the power grid; T R 、F H They are respectively the turbine time constant and the prime mover high pressure cylinder work proportionality coefficient; ΔP M is the change in active power output of the thermal power unit; T w is the rotor inertia response time constant; k df is the inertial response coefficient; T β k is the pitch response time constant; pf is the primary frequency modulation coefficient; T 12 is the inertia constant of the tie line; ΔP tie is the power change of the interconnection line; M2 is the inertia constant of the system; D2 is the damping coefficient; ΔP W is the change in active power output of the wind turbine; ΔPL is the load power disturbance; Δf is the frequency change; s represents time.
[0022] Furthermore, the step S3 includes the following steps:
[0023] S31: The number of neurons in the hidden layer, the learning rate and the L2 regularization parameter in the LSTM neural network model are used as the hyperparameters of the model, and the hyperparameters are optimized and adjusted using the Gray Wolf Optimization Algorithm to obtain the GWO-LSTM neural network model;
[0024] S32: Obtain the values of the state vector, control vector and output time domain parameters of the regional power grid system to construct a training data set, and perform offline training on the GWO-LSTM neural network model so that it can output the optimal predicted time domain parameters of the model predictive control through the state vector and control vector.
[0025] Furthermore, in step S31, the number of neurons in the hidden layer, the learning rate and the L2 regularization parameter in the LSTM neural network model are used as the hyperparameters of the model, and the hyperparameters are optimized and adjusted using the gray wolf optimization algorithm to obtain the GWO-LSTM neural network model. This means that the three hyperparameters in the LSTM neural network model are used as prey for the gray wolf pack, and the actual effect predicted by the LSTM neural network model data is used as the standard for evaluating the position of each hyperparameter. By calculating the population fitness function, the position of the wolf pack is updated, and the optimal solution of the hyperparameters of the LSTM neural network model is obtained, thereby obtaining the GWO-LSTM neural network model with the optimal hyperparameters.
[0026] Furthermore, the gray wolf optimization algorithm divides the gray wolf pack into a leadership level of α wolves, β wolves, and δ wolves according to the proximity of the gray wolves to their prey, and the remaining gray wolves are called w wolves; α wolves, β wolves, and δ wolves are rated by the algorithm as the three groups with the best fitness; in the process of continuous evolution and renewal of the wolf pack, the gray wolves in the leadership level will also be replaced by wolves from the w wolf pack through changes in fitness, thereby ensuring that the head wolf is the optimal solution.
[0027] Furthermore, the population fitness function is expressed as:
[0028]
[0029] In the above formula, P and Q are the number of training data and the number of verification data respectively; y p , are the true value of the training data time series and the predicted value of LSTM; y q , are the true value of the validation data time series and the predicted value of LSTM respectively.
[0030] Furthermore, the model predictive control adopts a prediction model based on dynamic matrix theory, and the construction of the prediction model includes the following steps:
[0031] S41: The state space dynamic frequency model of the power system is constructed as follows:
[0032]
[0033] S42: Discretize the state space dynamic frequency model of the power system to obtain a state space model based on a linear discrete system as follows:
[0034]
[0035] in,
[0036] S43: Based on the state space model of the linear discrete system, the prediction model of the model predictive control at time k is derived as follows:
[0037]
[0038] in,
[0039] X(k)=[x(k+1∣k)x(k+2∣k)…x(k+N p |k)];
[0040] ΔU(k)=[Δu(k|k)Δu(k+1|k)…Δu(k+N c -1|k)] T ;
[0041] W(k)=[w(k|k) T w(k+1|k) T …w(k+N p -1|k)] T ;
[0042]
[0043]
[0044]
[0045]
[0046] Nc≤Np;
[0047] In the above formula, A, B, C, and F are the control matrix, input control matrix, output control matrix, and interference control matrix respectively; x(t), u(t), y(t), and w(t) are the state vector, control vector, system output vector, and interference vector respectively; T represents the sampling period; x(k), u(k), y(k), and w(k) are the state vector, control vector, system output vector, and interference vector respectively; k represents time; x(k+N|k) is the state vector of the future N time nodes corresponding to the k moment; Δu(k+N|k) is the increment of the control vector u(k) of the future N time nodes corresponding to the k moment; w(k+N|k) is the interference vector of the future N time nodes corresponding to the k moment; Np is the prediction range of the predicted time domain parameters; Nc is the control range of the predicted time domain parameters, where the parameter Np is obtained by real-time dynamic optimization of the GWO-LSTM neural network model.
[0048] A wind farm AGC parameter optimization system based on a GWO-LSTM neural network is applied to the above method, comprising:
[0049] The first building module is used to establish a regional power grid frequency model including a wind farm station, so as to realize frequency error adjustment of the wind farm station by using model predictive control, and issue instructions to the generator set;
[0050] The second building module is used to build an LSTM neural network model, obtain power grid system status data according to the regional power grid frequency model and initialize the LSTM neural network model;
[0051] An optimization module, which is used to optimize and adjust the hyperparameters of the LSTM neural network model using the GWO algorithm to obtain a GWO-LSTM neural network model, and to train the GWO-LSTM neural network model offline;
[0052] The adjustment module is used to obtain the state vector and control vector of the power system, use the GWO-LSTM neural network model to calculate the predicted time domain parameters of the model predictive control, obtain the optimal parameter combination under different working conditions, and adaptively adjust the parameters of the model predictive control to output the optimal frequency control command.
[0053] A computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned wind farm station AGC parameter optimization method based on GWO-LSTM neural network.
[0054] A processor is used to run a program, wherein the program executes the above-mentioned wind farm AGC parameter optimization method based on GWO-LSTM neural network when running.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] 1. Adaptively and dynamically modify the MPC parameters through the Grey Wolf Optimization Algorithm-Long Short-Term Memory Neural Network (GWO-LSTM) to ensure the frequency stability of the wind farm under different disturbances.
[0057] 2. In order to solve the problem that the prediction model parameters in traditional MPC need to be manually adjusted, this scheme proposes a wind farm AGC parameter optimization method based on the GWO-LSTM neural network. The number of neurons, learning rate, and L2 regularization parameters of LSTM are optimized through the Grey Wolf optimization algorithm. At the same time, LSTM corrects the fitness function of the Grey Wolf optimization, and the established GWO-LSTM neural network is used to optimize the time domain parameters in model predictive control to ensure the frequency stability of the wind farm under different disturbances. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0059] Figure 1 It is a flow chart of a wind farm AGC parameter optimization method based on GWO-LSTM neural network;
[0060] Figure 2 It is a schematic diagram of the frequency response model of the two-region interconnected power grid including wind farm stations;
[0061] Figure 3 It is a schematic diagram of the MPC principle;
[0062] Figure 4 Schematic diagram of the frequency response change process of a wind farm. DETAILED DESCRIPTION
[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0065] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0066] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0067] Embodiment 1
[0068] like Figure 1 The figure shows a flow chart of a wind farm AGC parameter optimization method based on a GWO-LSTM neural network, which includes the following specific steps:
[0069] S1: Establish a regional power grid frequency model containing wind farms (in this example, it is a region consisting of thermal power plants and wind farms interconnected), such as Figure 3 As shown, Model Predictive Control (MPC) is used to implement frequency error regulation of wind farms and send instructions to generator sets.
[0070] In the specific implementation of this step, the establishment of a regional power grid frequency model containing wind farms includes the following steps:
[0071] S11: For thermal power plants, considering the relationship between the system frequency response and the inertia and damping characteristics of the generator rotor, the frequency response model of the thermal power unit is constructed as follows:
[0072]
[0073] In the above formula, R G is the regulation coefficient of the synchronous unit in the power grid; T R 、F H They are respectively the turbine time constant and the prime mover high pressure cylinder work proportionality coefficient; ΔP M It is the change of active power output of thermal power unit.
[0074] S12: For wind farms, considering that wind turbines participate in frequency regulation in the form of inertial control and pitch angle control, the frequency response model of wind turbines is constructed as follows:
[0075]
[0076] Where: T w is the rotor inertia response time constant; k df is the inertial response coefficient; T β k is the pitch response time constant; pf is the primary frequency modulation coefficient; ΔP β Provides power variation for pitch control; ΔP W is the change in active power output of the wind turbine.
[0077] S13: The frequency response model of the tie line between two stations is constructed as follows:
[0078]
[0079] Where: T 12 is the inertia constant of the tie line; ΔP tie is the change in interconnection line power.
[0080] S14: Establish Figure 2 The two-region interconnected power grid model with wind farms shown in the figure is based on the above theoretical analysis, and the final regional power grid frequency model with wind farms is constructed as follows:
[0081] (M2s+D2)Δf=ΔP tie +ΔAP W -ΔP L ;
[0082] Where: M2 is the inertia constant of the system; D2 is the damping coefficient; ΔP W is the change in active power output of the wind turbine; ΔP L is the load power disturbance; ΔP tie is the change in interconnection line power; Δf is the change in frequency; s represents time.
[0083] Therefore, the transfer function of the wind farm controlled system is:
[0084]
[0085] S2: Build an LSTM neural network model, obtain the power grid system status data according to the regional power grid frequency model and initialize the LSTM neural network model.
[0086] Since the LSTM (Long Short-Term Memory) neural network model can simulate almost any nonlinear mapping relationship, the LSTM network is widely used in parameter optimization problems in academic and industrial fields. Furthermore, the performance of the LSTM neural network model depends on the selection of hyperparameters, but there is a lack of precise mathematical relationship between hyperparameters and results, and there is no clear criterion for the selection of hyperparameters. Therefore, there are problems such as long time to adjust the model parameters and easy convergence to the local optimal solution.
[0087] S3: Use the GWO algorithm to optimize and adjust the hyperparameters of the LSTM neural network model to obtain the GWO-LSTM neural network model, and train the GWO-LSTM neural network model offline.
[0088] S31: The number of neurons in the hidden layer, the learning rate and the L2 regularization parameter in the LSTM neural network model are used as the hyperparameters of the model. The Grey Wolf Optimization (GWO) algorithm is used to optimize and adjust the hyperparameters to obtain the GWO-LSTM neural network model.
[0089] The three hyperparameters in the LSTM neural network model are used as the prey of the gray wolf pack, and the actual effect of the LSTM neural network model data prediction is used as the standard for evaluating the position of each hyperparameter. By calculating the population fitness function and updating the wolf pack position, the optimal solution of the LSTM neural network model hyperparameters is obtained, and then the GWO-LSTM neural network model with the optimal hyperparameters is obtained.
[0090] Furthermore, the Gray Wolf Optimization Algorithm (GWO) divides the wolf pack into leadership groups of α, β, and δ according to the proximity of the gray wolves to their prey, and the remaining gray wolves are called w wolves. α, β, and δ are the three groups rated as having the best fitness by the algorithm. In the process of continuous evolution and renewal of the wolf pack, the leadership gray wolves will also be replaced by wolves from the w wolf pack through changes in fitness, thus ensuring that the head wolf is the optimal solution.
[0091] Furthermore, the gray wolf in the leadership will also be replaced by wolves from w wolf packs through changes in fitness, where the update formulas for α wolf, β wolf, and δ wolf pack are as follows:
[0092] D=|C·X p (t)-X(t)|
[0093] X(t+1)=X p (t)-A·D;
[0094] in:
[0095] C = 2·r1;
[0096] A = 2a·r2-a;
[0097]
[0098] In the above formula, D represents the distance vector between the gray wolf and its prey; X(t) is the position vector of the gray wolf; X p is the position vector of the prey; t represents the current iteration number; max is the maximum number of iterations; r1 and r2 are random numbers; a is the convergence factor; A is a random variable.
[0099] It can be seen that the random variable A controls the expansion and contraction of the gray wolf's hunting range in the algorithm. When |A|>1, X(t+1) is smaller than X(t), which means that the wolf pack will expand the search range globally and search for more possible solutions; when |A|<1, X(t+1) is larger than X(t), which means that the wolf pack's hunting range will shrink and search more carefully for the optimal solution within the current range.
[0100] Furthermore, the mathematical model of the w wolf pack position adjustment is as follows:
[0101]
[0102] in:
[0103] X 1,2,3 =X α,β,δ -A 1,2,3 ·D α,β,δ
[0104] D α,β,δ =|C 1,2,3 ·X α,β,δ -X
[0105] Where: X α represents the position of gray wolf α; X β represents the position of β gray wolf; X δ represents the position of the gray wolf δ; C1 represents the random perturbation of α, C2 represents the random perturbation of β, and C3 represents the random perturbation of δ; X represents the current solution position; A1 is the random variable corresponding to α; A2 is the random variable corresponding to β; A3 is the random variable corresponding to δ; D α represents the distance vector between individual α gray wolf and prey; D β represents the distance vector between the β gray wolf individual and the prey; D δ represents the distance vector between the gray wolf individual and its prey.
[0106] Furthermore, the actual effect of the LSTM neural network model data prediction is used as a standard for evaluating the position of each hyperparameter, and the wolf pack position is updated by calculating the population fitness function, including the following steps:
[0107] The population fitness function of the gray wolf optimization algorithm is defined according to the data of the LSTM neural network model. The population fitness function is expressed as:
[0108]
[0109] Where: P and Q are the number of training data and the number of verification data respectively; y p , are the true value of the training data time series and the predicted value of LSTM; y q , are the true value of the validation data time series and the predicted value of LSTM respectively. The fitness of individual wolves is calculated and updated according to the evaluation function of the gray wolf optimization algorithm. When the search reaches the maximum number of iterations or the global optimal position meets the minimum limit, the fitness is obtained to determine the gray wolf optimization coefficient.
[0110] S32: Obtain the values of the state vector, control vector and output time domain parameters of the regional power grid system to construct a training data set, and perform offline training on the GWO-LSTM neural network model so that it can output the optimal predicted time domain parameters of the model predictive control through the measurable state vector and control vector.
[0111] S4: Obtain the state vector and control vector of the power system, and use the GWO-LSTM neural network model to calculate the predicted time domain parameters of the model predictive control to obtain the optimal parameter combination under different working conditions to adaptively adjust the parameters in the model predictive control (MPC), thereby outputting the optimal frequency control command.
[0112] like Figure 3 As shown, the optimal parameter combination under different working conditions is obtained according to the output of the GWO-LSTM neural network model, and the prediction time domain parameters in the model predictive control (MPC) are adaptively adjusted. At the same time, MPC adopts the prediction model based on dynamic matrix theory to improve the traditional MPC, so as to output the optimal frequency control command.
[0113] Since the parameters of the controlled system change due to changes in working conditions and environment, the parameter variables of the system that can be measured (mainly the state vector and control vector of the system) are used to predict and correct the parameters of the model predictive control in the controller in real time (mainly the predicted time domain parameters of the model predictive control) through the GWO-LSTM neural network model.
[0114] Furthermore, the model predictive control adopts a prediction model based on dynamic matrix theory, including the following steps:
[0115] S41: Construct the state space dynamic frequency model of the power system. The model formula is as follows:
[0116]
[0117] In the above formula, A, B, C, and F are the control matrix, input control matrix, output control matrix, and interference control matrix respectively; x(t)u(t)y(t)w(t) are the state vector, control vector, system output vector, and interference vector respectively.
[0118] S42: Discretize the state space dynamic frequency model of the power system to obtain a state space model based on a linear discrete system as follows:
[0119]
[0120] in,
[0121]
[0122] In the above formula, T represents the sampling period; x(k), u(k), y(k), and w(k) are the state vector, control vector, system output vector, and interference vector, respectively; and k represents time.
[0123] S43: Based on the state space model of the linear discrete system, the prediction model of model predictive control is derived at time k:
[0124]
[0125] in,
[0126] X(k)=[x(k+1∣k) x(k+2∣k) … x(k+N p |k)];
[0127] ΔU(k)=[Δu(k|k) Δu(k+1|k) … Δu(k+N c -1|k)] T ;
[0128] W(k)=[w(k|k) T w(k+1|k) T … w(k+N p -1|k)] T ;
[0129]
[0130]
[0131]
[0132]
[0133] Nc≤Np;
[0134] Wherein: x(k+N|k) is the state vector of N future time nodes corresponding to time k; Δu(k+N|k) is the increment of the control vector u(k) corresponding to N future time nodes at time k; w(k+N|k) is the interference vector of N future time nodes corresponding to time k; Np is the prediction range of the predicted time domain parameters; Nc is the control range of the predicted time domain parameters, where the parameter Np is obtained by real-time dynamic optimization of the above-mentioned GWO-LSTM strategy.
[0135] In order to verify the effect of the present invention, the following specific parameters are input to illustrate the advancement of the proposed wind farm AGC parameter optimization method based on GWO-LSTM neural network.
[0136] This solution analyzes the simplified model to show the trend and key factors of frequency change. The specific numerical conclusion is related to the parameter value. The frequency characteristics in the actual power grid should still be based on the power system time domain simulation of the detailed model. Figure 2 The system shown in the figure is simulated. The system has been converted to the per-unit system, where the total load is 2.0 pu. The synchronous machine adopts the classical model and ignores the dynamic process of the converter control. The values of the parameters in the simulation system are shown in Table 1:
[0137] Table 1 Simulation system parameters
[0138]
[0139]
[0140] In order to verify the superiority of the optimized results of the designed GWO-LSTM neural network model, it is compared with the conventional model predictive control method. The load disturbance is set to 0.2pu, and the frequency response of the wind farm is as follows: Figure 4 shown.
[0141] Depend on Figure 4 It can be seen that the method proposed in this scheme can significantly improve the system control performance when load power disturbance occurs, the maximum frequency deviation and adjustment time are reduced, the system's frequency regulation response is faster, and the frequency fluctuation of the wind farm station can be restored to the normal state more quickly, reducing the possible risk of system frequency deviation.
[0142] Compared with traditional model predictive control, the wind farm AGC parameter optimization method based on GWO-LSTM neural network proposed in the present invention fully considers the dynamic characteristics of the wind farm model, adopts GWO-LSTM neural network algorithm for nonlinear function fitting, and corrects control time domain parameters in real time, thereby improving the accuracy of AGC control.
[0143] Embodiment 2
[0144] A wind farm AGC parameter optimization system based on a GWO-LSTM neural network is applied to the above method, comprising:
[0145] The first building module is used to establish a regional power grid frequency model including a wind farm station, so as to realize frequency error adjustment of the wind farm station by using model predictive control, and issue instructions to the generator set;
[0146] The second building module is used to build an LSTM neural network model, obtain power grid system status data according to the regional power grid frequency model and initialize the LSTM neural network model;
[0147] An optimization module, which is used to optimize and adjust the hyperparameters of the LSTM neural network model using the GWO algorithm to obtain a GWO-LSTM neural network model, and to train the GWO-LSTM neural network model offline;
[0148] The adjustment module is used to obtain the state vector and control vector of the power system, use the GWO-LSTM neural network model to calculate the predicted time domain parameters of the model predictive control, obtain the optimal parameter combination under different working conditions, and adaptively adjust the parameters of the model predictive control to output the optimal frequency control command.
[0149] Embodiment 3
[0150] A computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned wind farm station AGC parameter optimization method based on GWO-LSTM neural network.
[0151] Embodiment 4
[0152] A processor is used to run a program, wherein the program executes the above-mentioned wind farm AGC parameter optimization method based on GWO-LSTM neural network when running.
[0153] The present application discloses a method for optimizing AGC parameters of a wind farm station based on a GWO-LSTM neural network, comprising: S1: establishing a regional power grid frequency model including the wind farm station, so as to realize frequency error adjustment of the wind farm station by adopting model predictive control, and issuing instructions to the generator set; S2: constructing an LSTM neural network model, obtaining power grid system state data according to the regional power grid frequency model and initializing the LSTM neural network model; S3: optimizing and adjusting the hyperparameters of the LSTM neural network model by using a GWO algorithm to obtain a GWO-LSTM neural network model, and training the GWO-LSTM neural network model offline; S4: obtaining a state vector and a control vector of the power system, using a GWO-LSTM neural network model to calculate the predicted time domain parameters of the model predictive control, and obtaining the optimal parameter combination under different working conditions, thereby adaptively adjusting the parameters of the model predictive control to output the optimal frequency control instruction. In order to solve the problem that the prediction model parameters in traditional MPC need to be manually adjusted, this scheme proposes a wind farm AGC parameter optimization method based on the GWO-LSTM neural network. The number of neurons, learning rate, and L2 regularization parameters of LSTM are optimized through the Grey Wolf Optimization Algorithm. At the same time, LSTM corrects the fitness function of the Grey Wolf Optimization. The established GWO-LSTM neural network is used to optimize the time domain parameters in model predictive control to ensure the frequency stability of the wind farm under different disturbances.
[0154] Those of ordinary skill in the art will appreciate that the units of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition of each example has been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0155] In the embodiments provided by the present invention, it should be understood that the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored, etc.
[0156] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0157] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several 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 each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-0nlyMemory), random access memory (RAM, RandomAccessMemory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.
[0158] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. A wind farm AGC parameter optimization method based on GWO-LSTM neural network, characterized in that: include: S1: Establish a regional power grid frequency model including wind farms, so as to use model predictive control to adjust the frequency error of wind farms and issue instructions to generator sets; S2: Build an LSTM neural network model, obtain the power grid system status data according to the regional power grid frequency model and initialize the LSTM neural network model; S3: Use the GWO algorithm to optimize and adjust the hyperparameters of the LSTM neural network model to obtain the GWO-LSTM neural network model, and train the GWO-LSTM neural network model offline; S4: Obtain the state vector and control vector of the power system, use the GWO-LSTM neural network model to calculate the predicted time domain parameters of the model predictive control, obtain the optimal parameter combination under different working conditions, and adaptively adjust the parameters of the model predictive control to output the optimal frequency control command.
2. The wind farm AGC parameter optimization method based on GWO-LSTM neural network according to claim 1 is characterized in that: The establishment of a regional power grid frequency model containing wind farms comprises the following steps: S11: The frequency response model of the thermal power unit is constructed as follows: S12: Construct the frequency response model of wind turbine as follows: S13: The frequency response model of the tie line between two stations is constructed as follows: S14: Based on the above model analysis, the regional power grid frequency model including wind farms is constructed as follows: (M2s+D2)△f=AP tie +ΔP W -ΔP L ; S15: The transfer function of the controlled system of the wind farm is: In the above formula, R G is the regulation coefficient of the synchronous unit in the power grid; T R 、F H They are respectively the turbine time constant and the prime mover high pressure cylinder work proportionality coefficient; ΔP M is the change in active power output of the thermal power unit; T w is the rotor inertia response time constant; k df is the inertial response coefficient; T β k is the pitch response time constant; pf is the primary frequency modulation coefficient; T 12 is the inertia constant of the tie line; ΔP tie is the power change of the interconnection line; M2 is the inertia constant of the system; D2 is the damping coefficient; ΔP W is the change in active power output of the wind turbine; ΔP L is the load power disturbance; Δf is the frequency change; s represents time.
3. The wind farm AGC parameter optimization method based on GWO-LSTM neural network according to claim 1 is characterized in that: The step S3 includes the following steps: S31: The number of neurons in the hidden layer, the learning rate and the L2 regularization parameter in the LSTM neural network model are used as the hyperparameters of the model, and the hyperparameters are optimized and adjusted using the Gray Wolf Optimization Algorithm to obtain the GWO-LSTM neural network model; S32: Obtain the values of the state vector, control vector and output time domain parameters of the regional power grid system to construct a training data set, and perform offline training on the GWO-LSTM neural network model so that it can output the optimal predicted time domain parameters of the model predictive control through the state vector and control vector.
4. The wind farm AGC parameter optimization method based on GWO-LSTM neural network according to claim 3 is characterized in that: In step S31, the number of neurons in the hidden layer, the learning rate and the L2 regularization parameter in the LSTM neural network model are used as the hyperparameters of the model, and the hyperparameters are optimized and adjusted by using the gray wolf optimization algorithm to obtain the GWO-LSTM neural network model. This means that the three hyperparameters in the LSTM neural network model are used as prey for the gray wolf pack, and the actual effect of the LSTM neural network model data prediction is used as the standard for evaluating the position of each hyperparameter. By calculating the population fitness function, the position of the wolf pack is updated, and the optimal solution of the hyperparameters of the LSTM neural network model is obtained, thereby obtaining the GWO-LSTM neural network model with the optimal hyperparameters.
5. The wind farm AGC parameter optimization method based on GWO-LSTM neural network according to claim 4 is characterized in that: The gray wolf optimization algorithm divides the gray wolves into leadership groups α wolves, β wolves, and δ wolves according to their proximity to prey, and the remaining gray wolves are called w wolves; α wolves, β wolves, and δ wolves are rated by the algorithm as the three groups with the best fitness; in the process of continuous evolution and renewal of the wolf pack, the gray wolves in the leadership group will also be replaced by wolves from the w wolf pack through changes in fitness, thereby ensuring that the head wolf is the optimal solution.
6. The wind farm AGC parameter optimization method based on GWO-LSTM neural network according to claim 4 is characterized in that: The population fitness function is expressed as: In the above formula, P and Q are the number of training data and the number of verification data respectively; y p , are the true value of the training data time series and the predicted value of LSTM; y q , are the true value of the validation data time series and the predicted value of LSTM respectively.
7. The wind farm AGC parameter optimization method based on GWO-LSTM neural network according to claim 1 is characterized in that: The model predictive control adopts a prediction model based on dynamic matrix theory, and the construction of the prediction model includes the following steps: S41: The state space dynamic frequency model of the power system is constructed as follows: S42: Discretize the state space dynamic frequency model of the power system to obtain a state space model based on a linear discrete system as follows: in, S43: Based on the state space model of the linear discrete system, the prediction model of the model predictive control at time k is derived as follows: in, X(k)=[x(k+1∣k)x(k+2∣k)…x(k+N p |k)]; ΔU(k)=[Δu(k|k)Δu(k+1|k)…Δu(k+N c -1|k)] T ; W(k)=[w(k∣k) T w(k+1∣k) T …w(k+N p -1|k)] T ; Nc≤Np; In the above formula, A, B, C, and F are the control matrix, input control matrix, output control matrix, and interference control matrix, respectively; x(t), u(t), y(t), and w(t) are the state vector, control vector, system output vector, and interference vector, respectively; T represents the sampling period; x(k), u(k), y(k), and w(k) are the state vector, control vector, system output vector, and interference vector, respectively; k represents time; x(k+N|k) is the state vector of the future N time nodes corresponding to the k moment; Δu(k+N|k) is the increment of the control vector u(k) of the future N time nodes corresponding to the k moment; w(k+N|k) is the interference vector of the future N time nodes corresponding to the k moment; Np is the prediction range of the predicted time domain parameters; Nc is the control range of the predicted time domain parameters, where the parameter Np is obtained by real-time dynamic optimization of the GWO-LSTM neural network model.
8. A wind farm AGC parameter optimization system based on GWO-LSTM neural network, characterized in that: The method applied to any one of claims 1 to 7, comprising: The first building module is used to establish a regional power grid frequency model including a wind farm station, so as to realize frequency error adjustment of the wind farm station by using model predictive control, and issue instructions to the generator set; The second building module is used to build an LSTM neural network model, obtain power grid system status data according to the regional power grid frequency model and initialize the LSTM neural network model; An optimization module, which is used to optimize and adjust the hyperparameters of the LSTM neural network model using the GWO algorithm to obtain a GWO-LSTM neural network model, and to train the GWO-LSTM neural network model offline; The adjustment module is used to obtain the state vector and control vector of the power system, use the GWO-LSTM neural network model to calculate the predicted time domain parameters of the model predictive control, obtain the optimal parameter combination under different working conditions, and adaptively adjust the parameters of the model predictive control to output the optimal frequency control command.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the wind farm AGC parameter optimization method based on the GWO-LSTM neural network as described in any one of claims 1 to 7.
10. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes the wind farm AGC parameter optimization method based on the GWO-LSTM neural network as described in any one of claims 1 to 7.
Citation Information
Cited By
Heterogeneous wind power plant power control method and system based on hierarchical neural network
CN120749921A
Hierarchical neural network-based power control method and system for heterogeneous wind farm
CN120749921B
Control communication interface optimization method in semi-physical simulation
CN120891782A
A control communication interface optimization method in a semi-physical simulation
CN120891782B
Motor system adaptive operation optimization method, system, device and program product
CN120915186A