Wind power-containing multi-microgrid frequency control method based on learnable model predictive control
By constructing a multi-microgrid frequency control model based on learnable model predictive control and combining it with the SAC algorithm of deep reinforcement learning, the problem of poor frequency stability of the microgrid system is solved, and the frequency deviation is minimized and the system stability is improved.
Patent Information
- Application Number
- CN202410529304.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2025-09-30
AI Technical Summary
Existing microgrid control models cannot effectively cope with the uncertainty of renewable energy output and strong nonlinear systems. Traditional PID controllers and traditional MPC methods lack parameter adaptation capabilities, resulting in poor frequency stability and even causing instability in the closed-loop system.
A multi-microgrid load frequency control model is constructed by adopting a learnable model-based predictive control method combined with the SAC algorithm of deep reinforcement learning. The frequency deviation is minimized and the system stability is achieved by adaptively adjusting the weight matrix and the frequency deviation interval reward mechanism.
It improves the frequency stability and anti-interference capability of the multi-microgrid system, can quickly respond to load disturbances, ensures stable operation of the system in extreme scenarios, and has online learning and parameter adaptation capabilities.
Smart Images

Figure CN120728631A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of microgrids, and in particular relates to a frequency control method for multi-microgrids containing wind power based on learnable model predictive control. Background Art
[0002] In recent years, the application of new energy in the power sector has been increasing, thus meeting the needs of environmental protection and sustainable social development. However, the output uncertainty of renewable power sources has the problem of difficulty in application. Therefore, microgrids that can well solve this problem have been proposed and widely used. Therefore, maintaining the load frequency stability of microgrids is a major engineering task, which can effectively improve the power quality of microgrid systems. Nowadays, the capacity of a single isolated microgrid is very limited, so it does not have sufficient anti-interference ability. Therefore, a multi-microgrid system that can achieve mutual support between microgrids has been proposed, but its topology and composition structure are more complex, which brings new challenges to the design of control models and systems. Existing research models ignore The interaction of controller information, and the control algorithms adopted by these studies are still PID controllers in essence. This classic controller is difficult to cope with highly random operating scenarios, and cannot consider the random power increment boundary of energy storage units. In addition, the traditional MPC method does not have parameter adaptive capabilities and cannot update control parameters in real time according to the above-mentioned environmental changes. When facing today's strongly nonlinear systems, the control performance will also be greatly affected, and even cause instability in the closed-loop system. Therefore, it is very necessary to provide a multi-microgrid frequency control method containing wind power based on learnable model predictive control, which builds a load frequency control model, adopts a learnable model predictive control algorithm, and maintains the frequency stability of the multi-microgrid system. Summary of the Invention
[0003] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a frequency control method for multi-microgrids containing wind power based on learnable model predictive control, which builds a load frequency control model, adopts a learnable model predictive control algorithm, and maintains the frequency stability of the multi-microgrid system.
[0004] The object of the present invention is achieved by: a frequency control method for a multi-microgrid including wind power based on a learnable model predictive control, the method comprising the following steps:
[0005] Step 1: Construct a microgrid load frequency control model;
[0006] Step 2: Use a machine learning-based model predictive control algorithm;
[0007] Step 3: Construct a multi-microgrid load frequency control structure based on learnable model predictive control;
[0008] Step 4: Case analysis.
[0009] The microgrid load frequency control model constructed in step 1 includes: LFC component models and a multi-microgrid system frequency coordination control model.
[0010] The LFC models include: load frequency model, micro gas turbine model, energy storage system model and wind turbine model.
[0011] The load frequency model is specifically: the generator-load model of the power generation system is: Where Δf is the frequency deviation of the microgrid system; ΔP MT is the power increment of the micro gas turbine; ΔP W is the power output increment of the wind turbine; ΔP B is the output power increment of energy storage; ΔP tie is the power exchange amount of the tie line between the sub-microgrids; ΔP L1 is the load fluctuation in the sub-microgrid; H s is the inertia coefficient of the microgrid system; D is the load damping coefficient of the microgrid.
[0012] The frequency coordination control model of the multi-microgrid system is specifically as follows: each sub-microgrid in the system includes a micro gas turbine, an energy storage unit, a wind turbine unit, and a load. In addition, there are tie lines between the sub-microgrids to transmit power. Its dynamic physical model is: ΔP ti is the transmission power between the tie line and the microgrid i; Δf i , Δf j are the frequency deviations of sub-microgrids i and j respectively; T sij is the coupling link parameter; where i = 1, 2, ..., N; j = 1, 2, ..., N, and N is the number of sub-microgrids.
[0013] The construction of the multi-microgrid load frequency control structure based on learnable model predictive control in step 3 specifically includes the following steps:
[0014] Step 3.1: Algorithm principle and improvement;
[0015] Step 3.2: Construct the objective function;
[0016] Step 3.3: Select the SAC algorithm in deep reinforcement learning and use the agent of the algorithm to output the weight matrix Q to the MPC controller x Perform adaptive adjustments;
[0017] Step 3.4: Use the frequency deviation information as the state variable and divide the frequency deviation under control into different intervals;
[0018] Step 3.5: Construct a termination function to improve the quality of the joint action to ensure the overall stability of the multi-microgrid system.
[0019] The algorithm principle and improvement in step 3.1 are as follows: an MPC control model of multiple microgrids can be constructed. First, the state space equation of each system is: Where u i is the input of system i; x i is the state quantity of system i; x j is the state quantity of system j; y i is the output of system i; ω i is the disturbance input into the system; A ii 、A ij 、B ii 、C ii 、D ii is the coefficient matrix of the state space equation and is determined by the specific system; where x i Contains the following state quantities: x i =[Δf i ΔP ti ΔP MTi ΔP Bi ΔP Wi ] T (4), where Δf i is the frequency deviation in the microgrid system; ΔP ti is the power interaction between the interconnection lines of the sub-microgrids; ΔP MTi is the power increment of the micro gas turbine; ΔP Bi Power increment of energy storage unit; ΔP Wi is the power increment of the wind turbine; by combining the state quantities of multiple sub-microgrids, the state quantity of the interconnected multi-microgrid system can be obtained: x i =[x1 … x N ] T (5), where N is the number of sub-microgrids in the multi-microgrid system; based on this, the input, output and interference terms of the multi-microgrid system can be set as: u i =[Δu MTi Δu Bi Δu Wi ] T (6), u=[u1 … u N ] T (7), y=[y1 … y N ] T =[Δf1 … Δf N ] T (8), w i =ΔP Wi +ΔP loadi(9), where the input u is the LFC control signal to the frequency-regulating units such as micro gas turbines and energy storage units; the output y is the frequency deviation of each sub-microgrid in the multi-microgrid system; the disturbance w is the random disturbance ΔP in the wind turbine unit. Wi and load disturbance ΔP loadi .
[0020] The objective function constructed in step 3.2 is specifically: the control goal is to reduce the frequency deviation of the multi-microgrid system, so the objective function is set to: And the control goal is to minimize the upper limit of the objective function, that is, to minimize the system frequency deviation, such as: Where n is the predicted length; Q x , Q u is the weight matrix, and the former has a huge impact on the optimization effect; while Q x Q in f ,q t ,q mt ,q b ,q w is Δf, ΔP in the microgrid t , ΔP MT , ΔP B , ΔP W The weight of f ,q t It depends on the microgrid itself and is not greatly affected by the environmental conditions, so it can be set as a fixed parameter. mt ,q b ,q w It is an adaptive parameter that needs to change with the state.
[0021] In step 3.4, the frequency deviation information is used as the state variable and the frequency deviation under control is divided into different intervals. Specifically, the actual frequency f, the frequency deviation Δf, and the integral value of the frequency error ∫Δf are selected as state variables. At the same time, the control signals of other controllers and the real-time operation status of the energy storage are considered. That is, the state space is: Where, is the set of real-time upper and lower limits of energy storage; ΔU(t) is the control signal of other controllers; at the same time, the intelligent agent can output the action signal to the outside, which is the adaptive parameter of the MPC controller: ΔA=[q mt ,q b ,q w ](13), and then, the agent needs to judge the quality of the action based on the reward function, so the design of the reward function is very important and depends on the control target; and according to the maximum frequency deviation allowed during normal operation of the power system is ±0.2Hz, the frequency deviation under control is divided into different intervals, such as: Where r iis the reward value of the agent in sub-microgrid i; μ is the penalty coefficient corresponding to different intervals. The larger the frequency deviation, the greater the penalty. η is a positive reward value. When the frequency control effect is excellent, the agent can get a large positive reward, thereby encouraging the agent to optimize the action quality. ξ is the termination penalty value, which is the largest penalty term in the system training process.
[0022] The termination function constructed in step 3.5 improves the quality of the joint action to ensure the overall stability of the multi-microgrid system. Specifically, when the frequency deviation exceeds the specified allowable range, this penalty will be triggered and the termination function will be activated: When any agent in the multi-agent combination enters the termination state, the entire system will stop iterating and directly start a new round of training.
[0023] Beneficial effects of the present invention: The present invention is a load frequency control method for a wind power interconnected microgrid containing a variable speed constant frequency doubly fed wind turbine based on a learnable model predictive control. During use, first, a load frequency control model of an interconnected multi-microgrid including a wind turbine generator set, an energy storage unit, a micro gas turbine and a load is established; secondly, the model predictive control algorithm is improved based on deep reinforcement learning, and a learnable model predictive control algorithm is proposed; this controller can realize parameter adaptation of the model predictive controller based on the deep reinforcement learning controller; the present invention has the advantages of building a load frequency control model, adopting a learnable model predictive control algorithm, and maintaining the frequency stability of the multi-microgrid system. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 Schematic diagram of the frequency control model of the micro gas turbine of the present invention.
[0025] Figure 2 Schematic diagram of the energy storage frequency control model of the present invention.
[0026] Figure 3 Schematic diagram of the frequency control model of the variable speed constant frequency doubly fed wind turbine generator system of the present invention.
[0027] Figure 4 Schematic diagram of the multi-microgrid frequency control model of the present invention.
[0028] Figure 5 This is a diagram showing the principle of reinforcement learning of the present invention.
[0029] Figure 6 This is a schematic diagram of the model predictive control principle of the present invention.
[0030] Figure 7 This is a schematic diagram of the learnable model predictive control algorithm of the present invention.
[0031] Figure 8Schematic diagram of the control structure of the learning-based MPC controller of the present invention.
[0032] Figure 9 Schematic diagram of a load step disturbance experienced by the microgrid system of the present invention.
[0033] Figure 10 Schematic diagram of load frequency fluctuation of the microgrid 1 of the present invention.
[0034] Figure 11 Schematic diagram of the combined disturbances suffered by the microgrid system of the present invention.
[0035] Figure 12 This is the load frequency fluctuation when the machine learning agent of the present invention fails.
[0036] Figure 13 Schematic diagram of control instructions of different controllers of the present invention under extreme environments Figure 1 (Real-time control instructions).
[0037] Figure 14 Schematic diagram of control instructions of different controllers of the present invention under extreme environments Figure 2 (Real-time instruction deviation). DETAILED DESCRIPTION
[0038] The present invention will be further described below with reference to the accompanying drawings.
[0039] Example 1
[0040] like Figure 1-14 As shown, a frequency control method for a multi-microgrid including wind power based on a learnable model predictive control comprises the following steps:
[0041] Step 1: Construct a microgrid load frequency control model;
[0042] Step 2: Use a machine learning-based model predictive control algorithm;
[0043] Step 3: Construct a multi-microgrid load frequency control structure based on learnable model predictive control;
[0044] Step 4: Case analysis.
[0045] The microgrid load frequency control model constructed in step 1 includes: LFC component models and a multi-microgrid system frequency coordination control model.
[0046] The LFC models include: load frequency model, micro gas turbine model, energy storage system model and wind turbine model.
[0047] The load frequency model is specifically: the generator-load model of the power generation system is: Where Δf is the frequency deviation of the microgrid system; ΔP MT is the power increment of the micro gas turbine; ΔP W is the power output increment of the wind turbine; ΔP B is the output power increment of energy storage; ΔP tie is the power exchange amount of the tie line between the sub-microgrids; ΔP L1 is the load fluctuation in the sub-microgrid; H s is the inertia coefficient of the microgrid system; D is the load damping coefficient of the microgrid.
[0048] In this embodiment, ① Micro gas turbine model: Usually, the micro gas turbine plays the role of the main frequency regulating unit in the microgrid, and its load frequency control model is as follows: Figure 1 As shown in the figure, Δu MT Represents the control signal of the micro gas turbine, which is also the output of the control module; R represents the adjustment coefficient of the micro gas turbine unit; ΔX MT is the valve position change of the fuel system; T f 、T t are the time constants of the fuel system and the gas turbine respectively; δ p , δ d are the upper and lower limits of the micro gas turbine power ramp, respectively; mtp ,λ mtd are the upper and lower limits of power change respectively; s is the complex variable in Laplace transform;
[0049] ② Energy storage system model: At the same time, the present invention uses energy storage as a secondary frequency modulation unit to improve system flexibility, and adopts a first-order transfer function model such as Figure 2 As shown in the figure, T B is the time constant of the energy storage unit; Δu B uB is the regulation signal sent by the controller to the energy storage unit; λ ep ,λ ed It is the upper and lower limits of the output power increment of the energy storage unit, and will change with the change of the energy storage state of charge (SOC);
[0050] ③ Wind turbine model: The present invention adopts variable speed constant frequency doubly fed wind turbine, and its load frequency control model is as follows: Figure 3 As shown in the figure, this control model consists of three modules: low-pass filter module, washout filter module and generator module; in the figure, Δu W is the control signal sent to the wind turbine; and Δf m1 Represents the frequency deviation of the low-frequency filter; T L 、T Wis the time constant of the low-frequency filter and the washout filter; R f is the power-frequency static characteristic coefficient of the unit; T t3 is the time constant of the generator set.
[0051] The frequency coordination control model of the multi-microgrid system is specifically as follows: taking the interconnected microgrid system including multiple microgrids as an example, Figure 4 As shown in the figure, each sub-microgrid in the system contains a micro gas turbine, an energy storage unit, a wind turbine unit, and a load. In addition, there are tie lines to transmit power between the sub-microgrids in the figure. The dynamic physical model is: ΔP ti is the transmission power between the tie line and the microgrid i; Δf i , Δf j are the frequency deviations of sub-microgrids i and j respectively; T sij is the coupling link parameter; where i = 1, 2, ..., N; j = 1, 2, ..., N, and N is the number of sub-microgrids.
[0052] In this embodiment, the use of the model predictive control algorithm based on machine learning in step 2 specifically includes the following steps:
[0053] Step 2.1: Algorithm principle and improvement: Reinforcement learning has the ability to replay experience, which can break the correlation between data and reduce the difficulty of model training. Its principle is as follows Figure 5 However, it is clear that its control process can be regarded as a black box, which means that it is unacceptable for most engineering tasks with high safety requirements. At the same time, the principle of the model predictive control algorithm is as follows Figure 6 As shown in the figure, it can transform the control problem into an optimization problem, so it can deal well with strong random boundaries containing distributed power sources and energy storage units. However, it does not have evolutionary performance. When facing strong nonlinear systems, its control performance will be greatly affected, and even cause instability of the closed-loop system. In the figure, y d is the reference signal; y r (k+p) is the optimal reference value; y c (k+p) is the corrected output; η(k) is the control input; y m (k+p) is the predicted value; y(k) is the output of the system; k is the time, and p is the prediction step size;
[0054] Step 2.2: Learnable Model Predictive Control Algorithm Structure: Therefore, the learning-based MPC algorithm composed of deep reinforcement learning and MPC algorithm combines the advantages of both and effectively solves their respective shortcomings, such as Figure 7As shown, it can be seen that the deep reinforcement learning controller can output the optimal action set Δu for the MPC controller according to the real-time environment DRL , and the action signal is the control parameter of the MPC algorithm; therefore, the MPC controller can output the control signal Δu to the system based on the adaptive parameters and the environmental information. MPC ; In the present invention, Δu MPC It is a real-time LFC signal sent to each frequency regulation unit in the microgrid, thereby achieving power stability of the coordinated system.
[0055] The construction of the multi-microgrid load frequency control structure based on learnable model predictive control in step 3 specifically includes the following steps:
[0056] Step 3.1: Algorithm principle and improvement: The MPC control model of multiple microgrids can be constructed. First, the state space equation of each system is: Where u i is the input of system i; x i is the state quantity of system i; x j is the state quantity of system j; y i is the output of system i; ω i is the disturbance input into the system; A ii 、A ij 、B ii 、C ii 、D ii is the coefficient matrix of the state space equation and is determined by the specific system; where x i Contains the following state quantities: x i =[Δf i ΔP ti ΔP MTi ΔP Bi ΔP Wi ] T (4), where Δf i is the frequency deviation in the microgrid system; ΔP ti is the power interaction between the interconnection lines of the sub-microgrids; ΔP MTi is the power increment of the micro gas turbine; ΔP Bi Power increment of energy storage unit; ΔP Wi is the power increment of the wind turbine; by combining the state quantities of multiple sub-microgrids, the state quantity of the interconnected multi-microgrid system can be obtained: x i =[x1 … x N ] T (5), where N is the number of sub-microgrids in the multi-microgrid system; based on this, the input, output and interference terms of the multi-microgrid system can be set as: u i =[Δu MTi ΔuBi Δu Wi ] T (6), u=[u1 … u N ] T (7), y=[y1 … y N ] T =[Δf1 … Δf N ] T (8), w i =ΔP Wi +ΔP loadi (9), where the input u is the LFC control signal to the frequency-regulating units such as micro gas turbines and energy storage units; the output y is the frequency deviation of each sub-microgrid in the multi-microgrid system; the disturbance w is the random disturbance ΔP in the wind turbine unit. Wi and load disturbance ΔP loadi ;
[0057] Step 3.2: Construct the objective function: The control goal is to reduce the frequency deviation of the multi-microgrid system, so the objective function is set as: And the control goal is to minimize the upper limit of the objective function, that is, to minimize the system frequency deviation, such as: Where n is the predicted length; Q x , Q u is the weight matrix, and the former has a huge impact on the optimization effect; while Q x Q in f ,q t ,q mt ,q b ,q w is Δf, ΔP in the microgrid t , ΔP MT , ΔP B , ΔP W The weight of f ,q t It depends on the microgrid itself and is not greatly affected by the environmental conditions, so it can be set as a fixed parameter. mt ,q b ,q w It is an adaptive parameter that needs to change with the state; q f ,q t ,q mt ,q b ,q w It is the decision Q x The important parameter is not reflected in the formula, but only described in words. The present invention optimizes q in real time. f ,q t ,q mt ,q b ,q wThe value of Q is optimized x , thereby improving the control effect;
[0058] Step 3.3: Select the SAC algorithm in deep reinforcement learning and use the agent of the algorithm to output the weight matrix Q to the MPC controller x Perform adaptive adjustment: Figure 8 As shown, the intelligent agents in each sub-microgrid can monitor the real-time environmental information, which mainly includes the system frequency fluctuation set ΔF = [Δf1, Δf2, ..., Δf n ] and the control signal set of the remaining microgrid controllers ΔU=[Δu2,Δu3,...,Δu n ]; Based on the state information, the agent can output an action signal ΔU1=[q mt ,q b ,q w ], that is, the MPC control parameter; thus, the MPC controller can further send LFC instructions ΔA to each frequency modulation unit according to the system environment conditions. i =(Δu MTi ,Δu Bi ,Δu Wi ), emits frequency modulated power ΔP FM This achieves active power balance. Furthermore, the proposed control structure is clearly a two-layer coupling structure: when the machine learning controller fails and cannot output normal signals, the MPC controller can also apply pre-prepared parameters to complete the control process until the fault is recovered.
[0059] Step 3.4: Use the frequency deviation information as the state variable and divide the controlled frequency deviation into different intervals: Select the actual frequency f, the frequency deviation Δf, and the integral value of the frequency error ∫Δf as the state variables. At the same time, consider the control signals of other controllers and the real-time operating status of the energy storage. That is, the state space is: Where, is the set of real-time upper and lower limits of energy storage; ΔU(t) is the control signal of other controllers; at the same time, the intelligent agent can output the action signal to the outside, which is the adaptive parameter of the MPC controller: ΔA=[q mt ,q b ,q w ](13), and then, the agent needs to judge the quality of the action based on the reward function, so the design of the reward function is very important and depends on the control target; and according to the maximum frequency deviation allowed during normal operation of the power system is ±0.2Hz, the frequency deviation under control is divided into different intervals, such as: Where r iis the reward value of the agent in sub-microgrid i; μ is the penalty coefficient corresponding to different intervals. The larger the frequency deviation, the greater the penalty. η is a positive reward value. When the frequency control effect is excellent (less than 0.003Hz), the agent can get a large positive reward, thereby encouraging the agent to optimize the action quality. ξ is the termination penalty value, which is the largest penalty term in the system training process.
[0060] Step 3.5: Construct a termination function to improve the quality of the joint action to ensure the overall stability of the multi-microgrid system: When the frequency deviation exceeds the specified allowable range, this penalty will be triggered and the termination function will be activated: When any agent in the multi-agent combination enters the termination state, the entire system will stop iterating and directly start a new round of training. Since any agent activates this state, the entire agent system will receive a huge penalty and will not be able to continue to act and receive rewards. Therefore, in order to avoid triggering the termination function, the system will try its best to improve the quality of the joint action to ensure the overall stability of the multi-microgrid system.
[0061] The present invention is a load frequency control method for a wind power interconnected microgrid containing a variable speed constant frequency doubly fed wind turbine based on a learnable model predictive control. During use, first, a load frequency control model of an interconnected multi-microgrid including a wind turbine generator set, an energy storage unit, a micro gas turbine and a load is established; secondly, the model predictive control algorithm is improved based on deep reinforcement learning, and a learnable model predictive control algorithm is proposed; this controller can realize parameter adaptation of the model predictive controller based on the deep reinforcement learning controller; the present invention has the advantages of building a load frequency control model, adopting a learnable model predictive control algorithm, and maintaining the frequency stability of the multi-microgrid system.
[0062] Example 2
[0063] like Figure 1-14 As shown, a frequency control method for a multi-microgrid including wind power based on a learnable model predictive control comprises the following steps:
[0064] Step 1: Construct a microgrid load frequency control model;
[0065] Step 2: Use a machine learning-based model predictive control algorithm;
[0066] Step 3: Construct a multi-microgrid load frequency control structure based on learnable model predictive control;
[0067] Step 4: Case analysis.
[0068] The case analysis is as follows: ① Scenario 1: Load step disturbance response: The present invention sets a load step disturbance, such as Figure 9As shown, it will affect the frequency stability of the system; and the present invention introduces PI controller and fuzzy controller as a control group, and takes microgrid 1 as an example, the system frequency deviation under the control of different controllers is as follows Figure 10 As shown;
[0069] It can be seen that under the influence of disturbances, the frequency control strategy designed in this invention has superior performance in frequency stability for multi-microgrids compared to traditional control and MPC control. Under traditional PI and fuzzy control, the maximum system frequency deviation reaches 0.058Hz and 0.055Hz respectively. However, when faced with the common operating scenario of load step disturbances, the traditional MPC controller maintains a low system frequency deviation in most cases, with a maximum frequency deviation of 0.032Hz. However, the frequency fluctuation will suddenly increase at a certain stage. This is because the traditional MPC controller cannot adapt to the strong randomness of the system (such as the staged changes in the regulation capability of the energy storage unit). The load frequency control performance of the controller based on the learning-based MPC algorithm is superior, with the advantages of small frequency fluctuation amplitude and fast regulation speed.
[0070] ② Scenario 2: The frequency regulation capability of the microgrid decreases and encounters strong disturbances: Obviously, in Scenario 1, the gas turbines, energy storage, and wind power in the microgrid system jointly assume the task of maintaining frequency stability. However, wind turbines can only be used as frequency regulation power sources when the wind power is stable. When the wind power fluctuates violently, wind power will exit frequency regulation. At this time, wind power is no longer a frequency regulation source, but an interference source. At this time, the frequency regulation task can only be undertaken by the micro gas turbines and energy storage in the microgrid system. Based on this, in order to verify the control effect of the proposed controller under extreme conditions, the present invention uses wind turbines as a disturbance source, and analyzes its frequency control effect when the frequency regulation capability of the microgrid decreases. Based on this, the combined disturbance of the input system is as follows: Figure 11 As shown;
[0071] ③ Scenario 3: The machine learning agent encounters an extreme operating state: Therefore, as mentioned above, the traditional deep reinforcement learning controller needs to go through a "pre-learning" stage before it is put into use. During this stage, the deep reinforcement learning agent will receive a large amount of "training data", which is equivalent to the disturbance input into the system, simulating the fluctuation of load, wind power and other units. After training, the controller can output high-quality instruction actions according to the real-time operating environment; however, if an extreme operating state occurs, that is, when the operating state is not encountered during the training process, the deep reinforcement learning controller will not be able to output normally; therefore, in order to test the safety of the two-layer control structure proposed in this invention, a traditional deep reinforcement learning controller is added as a control group, and when the system runs for 50s, a new state that "the agent has not learned" is input to simulate an extreme operating scenario, which will cause the deep reinforcement learning agent to be unable to output actions normally. At this time, the Learning-based MPC controller can use the prepared parameters, and the machine learning controller will restore normal performance at 80s; in this scenario, the frequency control effect (average value) of the microgrid system under the control of Learning-based MPC and DRL is as follows Figure 12 As shown in Table 1, the actual output results of DRL and Learning-based MPC (i.e., the control instructions sent to the control unit) within 50s-80s are shown. Taking the excellent control decision of the Learning-based MPC controller as the standard, the command deviation of DRL under extreme conditions is calculated, as shown in the figure below. Figure 13-14 As shown;
[0072] Table 1 Microgrid system frequency control effect under scenario 3 (Hz)
[0073]
[0074] From Table 1 and Figure 12-14 It can also be seen that the control effect of the deep reinforcement learning controller is greatly reduced when the intelligent agent cannot correctly output the correct action. Its output instructions differ greatly from the output instructions of the learning-based MPC controller. This causes the frequency-regulating unit to be unable to normally adjust the power output, and the system frequency stability suffers a devastating blow. After the machine learning failure, the maximum frequency deviation almost exceeds 0.2Hz, and the average frequency fluctuation during the failure is as high as 0.0946Hz. Even after the intelligent agent recovers, it is difficult to restore system stability in a short time. The learning-based MPC controller not only has the ability of online learning and good adaptability, but also can ensure system safety through a two-layer controller structure. The average frequency deviation is only 0.000619Hz, which can well cope with various complex and extreme operating conditions.
[0075] In this embodiment, the present invention constructs an interconnected multi-microgrid model that includes wind turbines, energy storage units, micro gas turbines, and loads in model design. The role of wind turbines in different operating scenarios is discussed in the examples. In terms of algorithm design, by comparing with traditional PI, Fuzzy, and traditional MPC controls, it is demonstrated that the proposed controller has strong anti-interference capabilities when encountering both step and random disturbances, and has the advantages of small frequency fluctuation amplitude and fast adjustment speed. In terms of algorithm design, the proposed controller not only has the ability to learn online, but also has good adaptability and security. Compared with traditional deep reinforcement learning controllers, it can ensure safe and stable operation of the system while coping with complex working conditions such as changes in system parameters and structure. When encountering extreme scenarios, the frequency stability of the entire multi-microgrid system can be guaranteed.
[0076] The present invention is a load frequency control method for a wind power interconnected microgrid containing a variable speed constant frequency doubly fed wind turbine based on a learnable model predictive control. During use, first, a load frequency control model of an interconnected multi-microgrid including a wind turbine, an energy storage unit, a micro gas turbine and a load is established; secondly, the model predictive control algorithm is improved based on deep reinforcement learning, and a learnable model predictive control algorithm is proposed; this controller can realize parameter adaptation of the model predictive controller based on the deep reinforcement learning controller; finally, it is verified through simulation that in general scenarios, the controller can quickly achieve frequency stabilization under load step disturbance and load random disturbance operating conditions; and in extreme scenarios: when wind power fluctuates violently, the sub-microgrid wind turbine exits frequency regulation, and the sub-microgrid frequency regulation capability is reduced, the proposed controller still has a relatively high frequency control performance; when the machine learning controller fails, the double-layer protection structure of the proposed controller can ensure the control effect of the controller and maintain the frequency stability of the multi-microgrid system; the present invention has the advantages of building a load frequency control model, adopting a learnable model predictive control algorithm, and maintaining the frequency stability of the multi-microgrid system.
Claims
1. A frequency control method for multi-microgrids with wind power based on learnable model predictive control, characterized by: The method comprises the following steps: Step 1: Construct a microgrid load frequency control model; Step 2: Use a machine learning-based model predictive control algorithm; Step 3: Construct a multi-microgrid load frequency control structure based on learnable model predictive control; Step 4: Case analysis.
2. The frequency control method for multiple microgrids containing wind power based on learnable model predictive control according to claim 1, characterized in that: The microgrid load frequency control model constructed in step 1 includes: LFC component models and a multi-microgrid system frequency coordination control model.
3. The frequency control method for multiple microgrids containing wind power based on learnable model predictive control according to claim 2, characterized in that: The LFC models include: load frequency model, micro gas turbine model, energy storage system model and wind turbine model.
4. The frequency control method for multiple microgrids containing wind power based on learnable model predictive control according to claim 3, characterized in that: The load frequency model is specifically: the generator-load model of the power generation system is: Where Δf is the frequency deviation of the microgrid system; ΔP MT is the power increment of the micro gas turbine; ΔP W is the power output increment of the wind turbine; ΔP B is the output power increment of energy storage; ΔP tie is the power exchange amount of the tie line between the sub-microgrids; ΔP L1 is the load fluctuation in the sub-microgrid; H s is the inertia coefficient of the microgrid system; D is the load damping coefficient of the microgrid.
5. The frequency control method for multiple microgrids containing wind power based on learnable model predictive control according to claim 2, characterized in that: The frequency coordination control model of the multi-microgrid system is specifically as follows: each sub-microgrid in the system includes a micro gas turbine, an energy storage unit, a wind turbine unit, and a load. In addition, there are tie lines between the sub-microgrids to transmit power. Its dynamic physical model is: ΔP ti is the transmission power between the tie line and the microgrid i; Δf i , Δf j are the frequency deviations of sub-microgrids i and j respectively; T sij is the coupling link parameter; where i = 1, 2, ..., N; j = 1, 2, ..., N, and N is the number of sub-microgrids.
6. The frequency control method for multiple microgrids containing wind power based on learnable model predictive control according to claim 1, characterized in that: The construction of the multi-microgrid load frequency control structure based on learnable model predictive control in step 3 specifically includes the following steps: Step 3.1: Algorithm principle and improvement; Step 3.2: Construct the objective function; Step 3.3: Select the SAC algorithm in deep reinforcement learning and use the agent of the algorithm to output the weight matrix Q to the MPC controller x Perform adaptive adjustments; Step 3.4: Use the frequency deviation information as the state variable and divide the frequency deviation under control into different intervals; Step 3.5: Construct a termination function to improve the quality of the joint action to ensure the overall stability of the multi-microgrid system.
7. The frequency control method for multiple microgrids containing wind power based on learnable model predictive control according to claim 6, characterized in that: The algorithm principle and improvement in step 3.1 are as follows: an MPC control model of multiple microgrids can be constructed. First, the state space equation of each system is: Where u i is the input of system i; x i is the state quantity of system i; x j is the state quantity of system j; y i is the output of system i; ω i is the disturbance input into the system; A ii 、A ij 、B ii 、C ii 、D ii is the coefficient matrix of the state space equation and is determined by the specific system; where x i Contains the following state quantities: x i =[Δf i ΔP ti ΔP MTi ΔP Bi ΔP Wi ] T (4), where Δf i is the frequency deviation in the microgrid system; ΔP ti is the power interaction of the tie lines between the sub-microgrids; ΔP MTi is the power increment of the micro gas turbine; ΔP Bi Power increment of energy storage unit; ΔP Wi is the power increment of the wind turbine; by combining the state quantities of multiple sub-microgrids, the state quantity of the interconnected multi-microgrid system can be obtained: i =[x1…x N ] T (5), where N is the number of sub-microgrids in the multi-microgrid system; based on this, the input, output and interference terms of the multi-microgrid system can be set as: u i =[Δu MTi Δu Bi Δu Wi ] T (6), u=[u1…u N ] T (7), y=[y1…y N ] T =[Δf1…Δf N ] T (8), w i =ΔP Wi +ΔP loadi (9), where the input u is the LFC control signal to the frequency-regulating units such as micro gas turbines and energy storage units; the output y is the frequency deviation of each sub-microgrid in the multi-microgrid system; the disturbance w is the random disturbance ΔP in the wind turbine unit. Wi and load disturbance ΔP loadi .
8. The frequency control method for multiple microgrids containing wind power based on learnable model predictive control according to claim 6, characterized in that: The objective function constructed in step 3.2 is specifically: the control goal is to reduce the frequency deviation of the multi-microgrid system, so the objective function is set to: And the control goal is to minimize the upper limit of the objective function, that is, to minimize the system frequency deviation, such as: Where n is the predicted length; Q x , Q u is the weight matrix, and the former has a huge impact on the optimization effect, Q x , Q u yes The collective name of i and j represents the number of the sub-microgrid, that is, the Q in the sub-microgrid i and j. x , Q u .
9. The frequency control method for multiple microgrids containing wind power based on learnable model predictive control according to claim 6, characterized in that: In step 3.4, the frequency deviation information is used as the state variable and the frequency deviation under control is divided into different intervals. Specifically, the actual frequency f, the frequency deviation Δf, and the integral value of the frequency error ∫Δf are selected as state variables. At the same time, the control signals of other controllers and the real-time operation status of the energy storage are considered. That is, the state space is: Where, is the set of real-time upper and lower limits of energy storage; ΔU(t) is the control signal of other controllers; at the same time, the intelligent agent can output the action signal to the outside, which is the adaptive parameter of the MPC controller: ΔA=[q mt ,q b ,q w ](13), and then, the agent needs to judge the quality of the action based on the reward function, so the design of the reward function is very important and depends on the control target; and according to the maximum frequency deviation allowed during normal operation of the power system is ±0.2Hz, the frequency deviation under control is divided into different intervals, such as: Where r i is the reward value of the agent in sub-microgrid i; μ is the penalty coefficient corresponding to different intervals. The larger the frequency deviation, the greater the penalty. η is a positive reward value. When the frequency control effect is excellent, the agent can get a large positive reward, thereby encouraging the agent to optimize the action quality. ξ is the termination penalty value, which is the largest penalty term in the system training process.
10. The frequency control method for multiple microgrids containing wind power based on learnable model predictive control according to claim 6, characterized in that: The termination function constructed in step 3.5 improves the quality of the joint action to ensure the overall stability of the multi-microgrid system. Specifically, when the frequency deviation exceeds the specified allowable range, this penalty will be triggered and the termination function will be activated: When any agent in the multi-agent combination enters the termination state, the entire system will stop iterating and directly start a new round of training.