Method for controlling frequency of low-inertia micro-grid system under influence of time lag
By introducing virtual generators and robust performance indicator evaluation methods in the microgrid frequency control system, and combining with the Gray Wolf algorithm to optimize the controller gain, the problem of insufficient robustness of the microgrid frequency control system under the influence of time lag is solved, and the more Stable frequency control effect.
Patent Information
- Application Number
- CN202411299967.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-02-25
AI Technical Summary
The existing microgrid frequency control system cannot coordinately design secondary frequency control and virtual inertia control while taking into account the impact of time lag, resulting in insufficient robustness of the system and difficulty in resisting time lag, renewable energy disturbances and parameter uncertainty. Influence.
Build a microgrid frequency control system with virtual generators participating in frequency regulation, design a robust performance index evaluation method, optimize the controller gain through the Gray Wolf algorithm, and realize frequency control of the low-inertia microgrid system under the influence of time lag.
It effectively improves the robustness of the microgrid frequency control system, can maintain the system stability in the presence of time delay, load disturbance and parameter uncertainty, and enhances the anti-interference ability of frequency control.
Smart Images

Figure CN119518827A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power grid control, and in particular to a method for frequency control of a low-inertia microgrid system under the influence of time lag. Background Art
[0002] Microgrids that use distributed renewable energy to provide power are widely used because of their safety, reliability and environmental friendliness. However, the inherent intermittent and volatile nature of renewable energy and the impact of fluctuations in load-side disturbances make the frequency of microgrids prone to deviation and oscillation. The use of electronic components will also increase the uncertainty of system parameters, which will affect the stability of the microgrid frequency. In addition, unlike traditional power systems where synchronous generators provide inertia and damping for the system, the widespread use of inverter-based distributed power sources in microgrids greatly reduces the total inertia and damping of the system. The reduction in system inertia and damping will increase the rate of change of frequency, making the frequency of the microgrid frequency control system more sensitive to faults / disturbances. These problems pose huge challenges to the frequency control of microgrids.
[0003] Given that synchronous generators can provide inertia and damping for the system, scholars introduced virtual generators to increase inertia for the system, thereby improving the stability of the microgrid. In recent years, some robust control methods have been used for virtual inertia control of microgrids. However, first of all, the transmission time delay in microgrid frequency control has not been considered by these studies. Accordingly, the secondary frequency control process simulated in virtual inertia control should also consider the influence of time delay. Secondly, the current microgrid frequency control faces the problems of time delay, disturbance of renewable energy and parameter uncertainty. The existing robust control methods for virtual inertia control are not globally considered during design. There is a lack of robust performance analysis conditions for the coordinated design of secondary frequency control and virtual inertia control under the influence of time delay. Finally, although many scholars have also considered combining intelligent optimization algorithms with theoretical analysis to design controllers. However, their optimization objectives are determined based on transfer functions. It is not possible to coordinate the design of secondary frequency control and virtual inertia control while considering the influence of time delay. These problems need to be solved urgently. Summary of the invention
[0004] The purpose of the present invention is to provide a method for frequency control of a low-inertia microgrid system under the influence of time lag in order to solve the problem that the existing microgrid frequency control system control method cannot collaboratively design secondary frequency control and virtual inertia control while considering the influence of time lag.
[0005] The above-mentioned purpose of the present application is achieved through the following technical solutions: S1: Build a microgrid frequency control system with virtual generators participating in frequency regulation; S2: Design a robust performance index evaluation method to evaluate the robust performance of the microgrid frequency control system and obtain a robust performance index; S3: Based on the robust performance index, the Grey Wolf Algorithm is used to find the optimal solution and obtain the optimized microgrid frequency control system; S4: Through the simulation test of the optimized microgrid frequency control system, the frequency control of the low inertia microgrid frequency control system under the influence of time lag is realized.
[0006] Optionally, step S1 includes: Photovoltaic power generation , Wind power generation and the disturbance caused by the load Set to the external disturbance of the microgrid frequency control system , ; A diesel generator set, a battery energy storage system, a flywheel energy storage system and a fuel cell system are set to participate in the primary frequency modulation process of the microgrid frequency control system; set up , and Represent the time constants of the battery energy storage system, flywheel energy storage system and fuel cell system respectively; , , , , and They represent the generator moment of inertia, diesel generator damping coefficient, steam turbine time constant, governor time constant, fuel cell gain and droop characteristics respectively; , as well as Represent the output power changes of the battery energy storage system, flywheel energy storage system and fuel cell system respectively.
[0007] Optionally, step S1 further includes: The secondary control loop of the microgrid uses the PI controller as the microgrid central controller for frequency regulation; Assume that the frequency control system of the microgrid has time-varying delay The impact of satisfy ,in and are constants, representing the upper and lower bounds of the time lag respectively; The frequency deviation of the secondary control loop of the microgrid frequency control system is used as a feedback signal, and the frequency deviation is added to the primary frequency modulation loop through the microgrid central controller.
[0008] Optionally, step S1 further includes: The relationship between the frequency deviation, active power generated and load of the microgrid frequency control system is expressed by the swing equation as follows:
[0009] in, Indicates the change in mechanical power of the generator; Indicates the load power change; represents a complex variable; Indicates the system frequency deviation.
[0010] Optionally, step S1 further includes: Power reference of inverter for microgrid frequency control system based on swing equation It is expressed as:
[0011] Among them and The virtual moment of inertia and virtual damping coefficient provided by the virtual generator are considered; Indicates system frequency deviation; Select state variables , Indicates the change in mechanical power of the generator; Indicates the action amount of the speed regulator; represents the power change brought by the fuel cell; Indicates the power change brought by the virtual generator; controlled variable , the disturbance variable ; The state space expression of the microgrid frequency control system with the participation of virtual generators is as follows:
[0012] in , , represents the time-delay dependent system input matrix; represents the time constant of the energy storage system; Represents the proportional adjustment parameter in the PI controller; Represents the integral adjustment parameter in the PI controller; , represents the control output matrix of the system; represents the disturbance input matrix of the system; ; ; .
[0013] Optionally, step S2 includes: S21: Construct a robust performance indicator evaluation method as follows: Setting the controller gain , , , , , , for a given and , and the known , It represents the disturbance suppression level of the microgrid frequency control system; Assume there exists a positive definite matrix , , , , , , and a matrix of appropriate dimension , , so that the following linear matrix inequality holds true, then the microgrid frequency control system is asymptotically stable;
[0014] in Represents symmetric terms in a matrix; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; S22: According to the robust performance index evaluation method, the robust performance index of the microgrid frequency control system under the influence of a given time delay is solved by calling the LMI toolbox in MATLAB using the bisection calculation method.
[0015] Optionally, step S22 includes: The binary calculation method solution process is expressed as Algorithm 1, as follows: S221: Preset the initial parameters of the microgrid frequency control system, which include: given time lag range, controller gain, initial search interval , and accuracy ; S222: Confirm the robust performance index by calculating whether the linear matrix inequality (4) and (5) have feasible solutions under the current initial parameters Eligibility: If equations (4) and (5) are satisfied, then , otherwise let ; if , output the final result Otherwise, repeat step S222 and output the result .
[0016] Optionally, step S3 includes: S31: Use the Grey Wolf optimization algorithm to find the minimum frequency control system of the microgrid The controller gain of S32: Preset initial parameters of the microgrid frequency control system, the initial parameters including: a given time lag range, individual positions of the wolf pack, and a maximum number of iterations; S33: Use Algorithm 1 as the objective function, introduce the individual positions of the wolves, and calculate value; S34: According to Value, update the individual positions of the three wolf pack leaders; S35: updating the individual positions of the wolves according to the individual position of the wolf pack leader; S36: Output controller gain; bring the controller gain into the controller of the microgrid frequency control system to obtain an optimized microgrid frequency control system.
[0017] The beneficial effects of the technical solution provided by this application are: The proposed multi-controller robust cooperative control strategy realizes the cooperative control of secondary frequency control and virtual inertia control. Firstly, a microgrid frequency control system considering the virtual generator participating in frequency regulation is established; then, the frequency control system of the system is constructed. The performance is analyzed and a method based on Lyapunov theory is proposed. Performance analysis method, that is, robust performance index evaluation method. Finally, the proposed method obtains The performance index is the optimization target, and the gray wolf optimization algorithm is used to simultaneously obtain the gains of multiple controllers, which effectively improves the robustness of the system. It effectively solves the problem of coordinated control of multiple controllers in the microgrid frequency control system under the influence of time delay. Compared with a single intelligent optimization algorithm, the controller collaborative design method combining algorithm and theory effectively improves the anti-interference ability of the system. The addition of virtual generators effectively provides inertia for the system, which helps to ensure the stability of the microgrid frequency. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The present application will be further described below with reference to the accompanying drawings and embodiments, in which: Figure 1 is a step diagram in an embodiment of the present application; Figure 2 is a diagram of a microgrid frequency control system with the participation of a virtual generator in an embodiment of the present application; Figure 3 It is a simulation result diagram in the embodiment of the present application. DETAILED DESCRIPTION
[0019] In order to have a clearer understanding of the technical features, purposes and effects of the present application, the specific implementation methods of the present application are now described in detail with reference to the accompanying drawings.
[0020] An embodiment of the present application provides a method for frequency control of a low-inertia microgrid system under the influence of time lag.
[0021] Please refer to Figure 1 , Figure 1 1 is a step diagram of a method for frequency control of a low inertia microgrid system under the influence of time lag in an embodiment of the present application, comprising: S1: Build a microgrid frequency control system with virtual generators participating in frequency regulation; Specifically, the frequency control system of the microgrid in which the virtual generator participates in frequency regulation is as follows: Figure 2 shown.
[0022] S2: Design a robust performance index evaluation method to evaluate the robust performance of the microgrid frequency control system and obtain a robust performance index; S3: Based on the robust performance index, the Grey Wolf Algorithm is used to find the optimal solution and obtain the optimized microgrid frequency control system; S4: Through the simulation test of the optimized microgrid frequency control system, the frequency control of the low inertia microgrid frequency control system under the influence of time lag is realized.
[0023] Step S1 includes: Photovoltaic power generation , Wind power generation and the disturbance caused by the load Set to the external disturbance of the microgrid frequency control system , ; A diesel generator set, a battery energy storage system, a flywheel energy storage system and a fuel cell system are set to participate in the primary frequency modulation process of the microgrid frequency control system; set up , and Represent the time constants of the battery energy storage system, flywheel energy storage system and fuel cell system respectively; , , , , and They represent the generator moment of inertia, diesel generator damping coefficient, steam turbine time constant, governor time constant, fuel cell gain and droop characteristics respectively; , as well as Represent the output power changes of the battery energy storage system, flywheel energy storage system and fuel cell system respectively.
[0024] Specifically, diesel generator sets, battery energy storage systems, flywheel energy storage systems and fuel cell systems are not affected by time lags and can quickly adjust smaller frequency errors. Since the present application is aimed at the low-frequency behavior of distributed generators and the designed controller has strong robustness, these systems are modeled as first-order models. The secondary control loop uses the PI controller as the central controller of the microgrid to adjust the frequency, and this process is completed through an open communication network. However, the limited bandwidth of the open communication network will produce a large communication time lag, and the existence of time lag will prevent the central controller of the microgrid from receiving signals and issuing various control instructions in a timely manner. This will cause fluctuations in the frequency of the microgrid and lead to a decrease in system performance, which may prevent the controller from achieving the expected frequency control target, and may even cause the system performance to deteriorate and become unstable, seriously affecting the safe and stable operation of the microgrid. Therefore, the secondary frequency regulation of the microgrid needs to consider the adverse effects of time lag.
[0025] Step S1 also includes: The secondary control loop of the microgrid uses the PI controller as the microgrid central controller for frequency regulation; Assume that the frequency control system of the microgrid has time-varying delay The impact of satisfy ,in and are constants, representing the upper and lower bounds of the time lag respectively; The frequency deviation of the secondary control loop of the microgrid frequency control system is used as a feedback signal, and the frequency deviation is added to the primary frequency modulation loop through the microgrid central controller.
[0026] Step S1 also includes: The relationship between the frequency deviation, active power generated and load of the microgrid frequency control system is expressed by the swing equation as follows:
[0027] in, Indicates the change in mechanical power of the generator; Indicates the load power change; represents a complex variable; Indicates the system frequency deviation.
[0028] Specifically, unlike traditional power systems, the inertia constant and damping coefficient of microgrids are relatively small. Here, the problem of inertia reduction is solved by building a virtual generator that acts like a synchronous motor. According to the swing equation, the impact of frequency deviation needs to be compensated by the power of the power supply compensation.
[0029] Step S1 also includes: Power reference of inverter for microgrid frequency control system based on swing equation It is expressed as:
[0030] Among them and The virtual moment of inertia and virtual damping coefficient provided by the virtual generator are considered; Indicates system frequency deviation; Specifically, by simulating the frequency regulation process of the primary and secondary loops, the virtual generator is also modeled as a model including virtual primary control and virtual secondary control, such as Figure 2 The virtual secondary control is considered to be affected by the same time lag as the secondary frequency modulation process. and They represent the virtual droop characteristic and the gain of the virtual quadratic integrator respectively.
[0031] Select state variables , Indicates the change in mechanical power of the generator; Indicates the action amount of the speed regulator; represents the power change brought by the fuel cell; Indicates the power change brought by the virtual generator; controlled variable , the disturbance variable ; The state space expression of the microgrid frequency control system with the participation of virtual generators is as follows:
[0032] in , , represents the time-delay dependent system input matrix; represents the time constant of the energy storage system; Represents the proportional adjustment parameter in the PI controller; Represents the integral adjustment parameter in the PI controller; , represents the control output matrix of the system; represents the disturbance input matrix of the system; ; ; .
[0033] Specifically, the purpose of this patent is to collaboratively design multiple controllers in the secondary frequency control loop and virtual inertia control for a microgrid frequency control system under the influence of time lag. This includes the evaluation of the robustness of the system and the optimization of the controller gain. It is described as the following problem: for a preset time lag upper bound, find a suitable controller gain to ensure that the closed-loop system remains stable under any time lag less than the given time lag upper bound and minimizes interference For controlled output The impact of Indicates that .
[0034] Step S2 includes: S21: Construct a robust performance indicator evaluation method as follows: Setting the controller gain , , , , , , for a given and , and the known , It represents the disturbance suppression level of the microgrid frequency control system; Assume there exists a positive definite matrix , , , , , , and a matrix of appropriate dimension , , so that the following linear matrix inequality holds true, then the microgrid frequency control system is asymptotically stable;
[0035] in Represents symmetric terms in a matrix; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; S22: According to the robust performance index evaluation method, the robust performance index of the microgrid frequency control system under the influence of a given time delay is solved by calling the LMI toolbox in MATLAB using the bisection calculation method.
[0036] Step S22 includes: The binary calculation method solution process is expressed as Algorithm 1, as follows: S221: Preset the initial parameters of the microgrid frequency control system, which include: given time lag range, controller gain, initial search interval , and accuracy ; S222: Confirm the robust performance index by calculating whether the linear matrix inequality (4) and (5) have feasible solutions under the current initial parameters Eligibility: If equations (4) and (5) are satisfied, then , otherwise let ; if , output the final result Otherwise, repeat step S222 and output the result .
[0037] Specifically, the robust performance index can reflect the robust performance of the system under the current controller gain. Taking it as the optimization target, the gray wolf optimization algorithm is used to search for the controller gain to make it as small as possible, thereby making the system more robust. The optimization of the gray wolf optimization algorithm includes the following process.
[0038] Step S3 includes: S31: Use the Grey Wolf optimization algorithm to find the minimum frequency control system of the microgrid The controller gain of S32: Preset initial parameters of the microgrid frequency control system, the initial parameters including: a given time lag range, individual positions of the wolf pack, and a maximum number of iterations; S33: Use Algorithm 1 as the objective function, introduce the individual positions of the wolves, and calculate value; S34: According to Value, update the individual positions of the three wolf pack leaders; S35: updating the individual positions of the wolves according to the individual position of the wolf pack leader; S36: Output controller gain; bring the controller gain into the controller of the microgrid frequency control system to obtain an optimized microgrid frequency control system.
[0039] Specifically, the distance between the gray wolf and the prey is determined; the distance between the individual and the prey is described as:
[0040] in represents the distance between the prey and the gray wolf, is the coefficient used to calculate the position, and They are The position vector of the prey and the position vector of the gray wolf at the iteration, is a random vector.
[0041] After confirming the distance, the location is updated:
[0042] in It's the Gray Wolf. The position at the iteration, is the coefficient used to calculate the position, is the attenuation factor, is a random vector.
[0043] In actual engineering, the controller gain that minimizes the robust performance index is unknown. Therefore, the controller gain that obtains the minimum robust performance index value after each round of search represents the direction of subsequent optimization. The optimization process is described as:
[0044] in, , , There are three different leaders. , , The positions of the three sets of controller gains representing the optimal results; , , Represents the gap between other search results in each group and the current three groups of best results; , , Represents the results that need to be optimized according to the gaps between individuals. It is the average of the three optimization results.
[0045] For a given allowable time delay range , Algorithm 2 is described to design a controller with the required robustness. The Grey Wolf Optimization Algorithm is used to find more appropriate controller gains and to Optimize the system to improve the robustness.
[0046] Specifically, after calculating the gains of multiple controllers in the frequency control system of the microgrid with the participation of virtual generators, the control effect is verified through simulation to ensure that the system can operate stably and has high robustness under the influence of given time delay. The simulation is built through Simulink of MATLAB.
[0047] In order to verify the effectiveness of the method proposed in the patent, a simulation verification is carried out to illustrate the system parameters required, as shown in Table 1 in the Appendix.
[0048] Table 1
[0049] Assuming that the system is affected by a time delay of 2s, Algorithm 2 is used to find the controller gains. The number of search agents is set to 20, the maximum number of iterations is set to 10, and the search interval of the 6 controller gains is set to , , , , , , respectively [0.01,20], [0.01,20], [0.01,50], [0.01,50], [1,50], [0.01,50]. The six controller gains are , , , , , Based on these parameters, the RPI of the system is evaluated using Algorithm 1, and we get This means that the system is more robust and can resist external interference well.
[0050] Considering the initial frequency deviation is 0, assuming the microgrid is Subject to step load change The system is affected by the 2s transmission delay, and the inertia and damping of the system are reduced. Considering the uncertainty of system parameters, , , , , reduce After the simulation test, the results are as follows Figure 3 As shown, Figure 3 The system is affected by step disturbance and some system parameters are reduced , inertia and damping reduction The comparison diagram of system frequency response under different control methods. Figure 3 It can be seen that in the time lag Under the influence of time lag, the previous control method is difficult to keep the system stable. The control strategy proposed in this patent takes the influence of time lag into consideration when designing the controller, and still has good control effect under the influence of time lag, load disturbance, parameter uncertainty, inertia reduction and other problems.
[0051] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0052] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for frequency control of a low inertia microgrid system under the influence of time lag, characterized in that: The method comprises the following steps: S1: Build a microgrid frequency control system with virtual generators participating in frequency regulation; S2: Design a robust performance index evaluation method to evaluate the robust performance of the microgrid frequency control system and obtain a robust performance index; S3: Based on the robust performance index, the Grey Wolf Algorithm is used to find the optimal solution and obtain the optimized microgrid frequency control system; S4: Through the simulation test of the optimized microgrid frequency control system, the frequency control of the low inertia microgrid frequency control system under the influence of time lag is realized.
2. A method for frequency control of a low inertia microgrid system under the influence of time lag as claimed in claim 1, characterized in that: Step S1 includes: Photovoltaic power generation , Wind power generation and the disturbance caused by the load Set to the external disturbance of the microgrid frequency control system , ; A diesel generator set, a battery energy storage system, a flywheel energy storage system and a fuel cell system are set to participate in the primary frequency modulation process of the microgrid frequency control system; set up , and Represent the time constants of the battery energy storage system, flywheel energy storage system and fuel cell system respectively; , , , , and They represent the generator moment of inertia, diesel generator damping coefficient, steam turbine time constant, governor time constant, fuel cell gain and droop characteristics respectively; , as well as Represent the output power changes of the battery energy storage system, flywheel energy storage system and fuel cell system respectively.
3. A method for frequency control of a low inertia microgrid system under the influence of time lag as claimed in claim 2, characterized in that: Step S1 also includes: The secondary control loop of the microgrid uses the PI controller as the microgrid central controller for frequency regulation; Assume that the frequency control system of the microgrid has time-varying delay The impact of satisfy ,in and are constants, representing the upper and lower bounds of the time lag respectively; The frequency deviation of the secondary control loop of the microgrid frequency control system is used as a feedback signal, and the frequency deviation is added to the primary frequency modulation loop through the microgrid central controller.
4. A method for frequency control of a low inertia microgrid system under the influence of time lag as claimed in claim 3, characterized in that: Step S1 also includes: The relationship between the frequency deviation, active power generated and load of the microgrid frequency control system is expressed by the swing equation as follows: in, Indicates the change in mechanical power of the generator; Indicates the load power change; represents a complex variable; Indicates the system frequency deviation.
5. A method for frequency control of a low inertia microgrid system under the influence of time lag as claimed in claim 4, characterized in that: Step S1 also includes: Power reference of inverter for microgrid frequency control system based on swing equation It is expressed as: Among them and The virtual moment of inertia and virtual damping coefficient provided by the virtual generator are considered; Indicates the system frequency deviation; Select state variables , Indicates the change in mechanical power of the generator; Indicates the action amount of the speed regulator; represents the power change brought by the fuel cell; Indicates the power change brought by the virtual generator; controlled variable , the disturbance variable ; The state space expression of the microgrid frequency control system with the participation of virtual generators is as follows: in , , represents the time-delay dependent system input matrix; represents the time constant of the energy storage system; Represents the proportional adjustment parameter in the PI controller; Represents the integral adjustment parameter in the PI controller; , represents the control output matrix of the system; represents the disturbance input matrix of the system; ; ; 。 6. A method for frequency control of a low inertia microgrid system under the influence of time lag as claimed in claim 5, characterized in that: Step S2 includes: S21: Construct a robust performance indicator evaluation method as follows: Setting the controller gain , , , , , , for a given and , and the known , It represents the disturbance suppression level of the microgrid frequency control system; Assume there exists a positive definite matrix , , , , , , and a matrix of appropriate dimension , , so that the following linear matrix inequality holds true, then the microgrid frequency control system is asymptotically stable; in Represents symmetric terms in a matrix; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; S22: According to the robust performance index evaluation method, the robust performance index of the microgrid frequency control system under the influence of a given time delay is solved by calling the LMI toolbox in MATLAB using the bisection calculation method.
7. A method for frequency control of a low inertia microgrid system under the influence of time lag as claimed in claim 6, characterized in that: Step S22 includes: The binary calculation method solution process is expressed as Algorithm 1, as follows: S221: Preset the initial parameters of the microgrid frequency control system, which include: given time lag range, controller gain, initial search interval , and accuracy ; S222: Confirm the robust performance index by calculating whether the linear matrix inequality (4) and (5) have feasible solutions under the current initial parameters Eligibility: If equations (4) and (5) are satisfied, then , otherwise let ; if , output the final result Otherwise, repeat step S222 and output the result .
8. A method for frequency control of a low inertia microgrid system under the influence of time lag as claimed in claim 7, characterized in that: Step S3 includes: S31: Use the Grey Wolf optimization algorithm to find the minimum frequency control system of the microgrid The controller gain of S32: Preset initial parameters of the microgrid frequency control system, the initial parameters including: a given time lag range, individual positions of the wolf pack, and a maximum number of iterations; S33: Use Algorithm 1 as the objective function, introduce the individual positions of the wolves, and calculate value; S34: According to Value, update the individual positions of the three wolf pack leaders; S35: updating the individual positions of the wolves according to the individual position of the wolf pack leader; S36: Output controller gain; bring the controller gain into the controller of the microgrid frequency control system to obtain an optimized microgrid frequency control system.