A method, device, medium and product for adaptive control of inertia flywheel parameters

Through adaptive control of inertia flywheel parameters, the second-order transfer function model and particle swarm optimization algorithm are used to optimize the virtual rotational moment of inertia and damping coefficient, which solves the problem of insufficient voltage source function in new energy units and achieves the improvement of grid frequency stability.

CN118214043BActive Publication Date: 2024-12-27NORTH CHINA ELECTRIC POWER UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410234785.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-01
Publication Date
2024-12-27
Estimated Expiration
2044-03-01

AI Technical Summary

Technical Problem

The prior art has failed to realize the voltage source function similar to that of traditional synchronous machines in new energy units, and the parameter selection and control quantity selection are simple, which has failed to effectively slow down the frequency change rate, affecting the frequency stability of the power grid.

Method used

Through the adaptive control method of inertia flywheel parameters, the angular frequency deviation is obtained, the grid stability is judged, and the second-order transfer function model and particle swarm optimization algorithm are used to determine the optimal values ​​of the virtual rotational moment of inertia and the virtual damping coefficients are realized to realize the dynamic characteristics of the inertia flywheel. Optimized to provide voltage source function consistent with traditional synchronous machines.

Benefits of technology

The inertia flywheel provides voltage source function in the power grid, reduces the impact of fan frequency fluctuations on the frequency stability of the power grid, and improves the frequency stability and safety of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118214043B_ABST
    Figure CN118214043B_ABST
Patent Text Reader

Abstract

The present invention discloses an inertia flywheel parameter adaptive control method, equipment, medium and product, and relates to the field of wind farm grid connection control. The method comprises: determining whether the power grid is stable according to the angular frequency deviation; when the power grid is stable, controlling the inertia flywheel according to the virtual rotation inertia setting value and the virtual damping coefficient setting value; when the power grid is unstable, based on the second-order transfer function model, using the particle swarm optimization algorithm to determine the virtual rotation inertia optimal value and the virtual damping coefficient optimal value that optimize the dynamic characteristics of the inertia flywheel, and controlling the inertia flywheel, realizing the voltage source function consistent with the traditional synchronous machine, and reducing the influence of the wind turbine frequency fluctuation on the power grid frequency stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wind farm grid-connected control, and in particular to an inertia flywheel parameter adaptive control method, equipment, medium and product. Background Art

[0002] Traditional power systems contain a large number of synchronous generators. Since the rotors of synchronous generators have mechanical virtual rotational inertia and contain a large amount of kinetic energy, when the power grid is disturbed or fails, the kinetic energy of the rotors can be used to exchange energy with the power grid to maintain the stability of the power grid. Therefore, when unstable factors such as frequency jitter occur, synchronous generators can improve the anti-interference ability of the power system. However, with the access of more and more wind farms, the penetration rate of new energy in the power grid continues to increase, and synchronous generators are replaced by power electronic devices. This type of power generation system lacks the necessary inertia and damping characteristics, which brings a series of challenges to the safe and stable operation of the power system, including frequency stability.

[0003] Flywheel energy storage system (FESS) has the advantages of high power density, fast response speed, easy detection of discharge depth and long service life. Flywheel energy storage stores energy through high-speed rotating flywheel mass. When the control action is taken to respond to the frequency change rate, the flywheel energy storage is quickly charged and discharged for inertia support, optimizing the virtual inertia output of the system. This type of flywheel that can provide inertia for the system through the control algorithm is called an inertia flywheel.

[0004] The virtual synchronous generator (VSG) technology controls energy storage to provide voltage source type virtual inertia for the system. The virtual synchronous machine, also known as the synchronous converter, introduces the synchronous machine rotor motion and electromagnetic transient equations in the converter control link to make it have external characteristics similar to the synchronous machine. It has inertial support capabilities, which can equivalently increase the inertia of the system and slow down the rate of change of frequency under disturbance. Based on the virtual synchronous machine technology, the flywheel can simulate the inertia characteristics of the traditional synchronous motor through power electronic device conversion and obtain a certain inertia support capacity. The participation of inertia flywheel in the new energy grid connection technology has received widespread attention from scholars, but the current research and field application have the following deficiencies:

[0005] 1) When providing inertia support for new energy units, only the power support part is considered, and the internal potential phase is not kept unchanged, and the voltage source function similar to that of traditional synchronous machines cannot be achieved.

[0006] 2) The parameter selection is relatively simple, and the factors that affect the active part in the small signal model are not found from a theoretical perspective. The selection of the control quantity is also relatively simple, generally only controlling the virtual inertia. Summary of the invention

[0007] The purpose of the present invention is to provide an inertia flywheel parameter adaptive control method, equipment, medium and product, which can realize the voltage source function consistent with the traditional synchronous machine based on the inertia flywheel and reduce the influence of wind turbine frequency fluctuation on the frequency stability of the power grid.

[0008] To achieve the above object, the present invention provides the following solutions:

[0009] An inertia flywheel parameter adaptive control method, the method comprising:

[0010] Obtain the angular frequency deviation of the inertia flywheel;

[0011] determining whether the power grid is stable according to the angular frequency deviation;

[0012] When the power grid is stable, the inertia flywheel is controlled according to the virtual rotation inertia setting value and the virtual damping coefficient setting value;

[0013] When the power grid is unstable, based on a second-order transfer function model, a particle swarm optimization algorithm is used to determine the optimal value of the virtual moment of inertia and the optimal value of the virtual damping coefficient that optimize the dynamic characteristics of the inertia flywheel, and the inertia flywheel is controlled according to the optimal value of the virtual moment of inertia and the optimal value of the virtual damping coefficient; the second-order transfer function model is a closed-loop transfer function that characterizes the relationship between the output of the inverter in the inertia flywheel and the input active power.

[0014] Optionally, determining whether the power grid is stable according to the angular frequency deviation specifically includes:

[0015] Determine whether the absolute value of the angular frequency deviation is less than or equal to the angular frequency variation allowable value, and obtain a determination result;

[0016] If the judgment result indicates yes, then it is determined that the power grid is stable;

[0017] If the judgment result indicates no, it is determined that the power grid is unstable.

[0018] Optionally, based on the second-order transfer function model, a particle swarm optimization algorithm is used to determine the optimal value of the virtual moment of inertia and the optimal value of the virtual damping coefficient that optimizes the dynamic characteristics of the inertia flywheel, specifically including:

[0019] Constructing an objective function and constraints based on the second-order transfer function model; the objective function includes the overshoot and adjustment time of the inertia flywheel;

[0020] According to the constraints, the optimal value of the virtual moment of inertia and the optimal value of the virtual damping coefficient are determined by using a particle swarm optimization algorithm with the minimization of the objective function as the optimization goal.

[0021] Optionally, the objective function is:

[0022] min F(J,D)=at s +bσ%;

[0023]

[0024]

[0025]

[0026] Where F(J,D) represents the objective function, J represents the virtual moment of inertia, D represents the virtual damping coefficient, σ% represents the overshoot, t s represents the adjustment time, a and b are the weight coefficients in the objective function, ω n is the natural oscillation frequency, ζ is the system damping ratio, X f is the inductance value of the converter output side, ω is the virtual angular velocity signal, E is the output voltage amplitude, U l is the grid voltage.

[0027] Optionally, the constraint condition is:

[0028]

[0029]

[0030] Where J represents the virtual moment of inertia, D represents the virtual damping coefficient, P max is the upper limit of the active power output of the grid-side converter, ω is the virtual angular velocity signal, t is the time, E is the output voltage amplitude, U l is the grid voltage, X f is the inductance value of the converter output side.

[0031] A computer device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above method.

[0032] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0033] A computer program product comprises a computer program, which implements the steps of the above method when executed by a processor.

[0034] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0035] The present invention provides an inertia flywheel parameter adaptive control method, device, medium and product. The method comprises: obtaining an angular frequency deviation of an inertia flywheel; determining whether a power grid is stable according to the angular frequency deviation; when the power grid is stable, controlling the inertia flywheel according to a virtual rotational inertia setting value and a virtual damping coefficient setting value; when the power grid is unstable, based on a second-order transfer function model, using a particle swarm optimization algorithm to determine an optimal virtual rotational inertia value and an optimal virtual damping coefficient value that optimize the dynamic characteristics of the inertia flywheel, and controlling the inertia flywheel according to the optimal virtual rotational inertia value and the optimal virtual damping coefficient value; the second-order transfer function model is a closed-loop transfer function that characterizes the relationship between the output of an inverter in the inertia flywheel and the input active power. The present invention is based on an inertia flywheel composed of a flywheel rotor energy storage part and a virtual synchronous machine algorithm part, establishes a second-order transfer function model that reflects the output and input active power conversion of the inverter part in the inertia flywheel, performs dynamic analysis on the system, and optimizes the dynamic characteristics of the second-order system by real-time detection of frequency deviation. When the frequency deviation exceeds the limit, adaptive adjustment of the inertia flywheel parameters is achieved, the voltage source function consistent with the traditional synchronous machine is achieved, and the influence of the fan frequency fluctuation on the grid frequency stability is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0037] Figure 1 A flow chart of an inertia flywheel parameter adaptive control method provided by an embodiment of the present invention;

[0038] Figure 2 A schematic diagram of an inertia flywheel parameter adaptive control method provided by an embodiment of the present invention;

[0039] Figure 3 A main circuit topology diagram of an inertia flywheel model provided in an embodiment of the present invention;

[0040] Figure 4 A control block diagram of the VSG algorithm provided in an embodiment of the present invention;

[0041] Figure 5 This is a diagram of the internal structure of a computer device. DETAILED DESCRIPTION

[0042] 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 only 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.

[0043] The purpose of the present invention is to provide an inertia flywheel parameter adaptive control method, equipment, medium and product, which can realize the voltage source function consistent with the traditional synchronous machine based on the inertia flywheel and reduce the influence of wind turbine frequency fluctuation on the frequency stability of the power grid.

[0044] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0045] In order to facilitate the understanding of the solution, the embodiment of the present invention first describes the parameters involved in the present invention, which are as follows:

[0046] U dc DC side voltage V;

[0047] e x (x=a,b,c) inverter output voltage V;

[0048] i x (x=a,b,c) Inverter output current A;

[0049] U x (x=a,b,c) grid side voltage V;

[0050] L filter inductor H;

[0051] R filter resistor R;

[0052] T m Virtual torque N·m;

[0053] K w Frequency feedback factor;

[0054] ω virtual angular velocity signal, that is, VSG output angular frequency rad / s;

[0055] ω n Natural oscillation frequency, i.e., VSG rated angular frequency rad / s;

[0056] U VSG terminal voltage measurement value;

[0057] U ref VSG terminal voltage reference value;

[0058] P is the measured value of active power w;

[0059] P ref Active power reference value w;

[0060] Q reactive power measurement value Var;

[0061] Q ref Reactive power reference value Var;

[0062] φ Output voltage phase;

[0063] E output voltage amplitude V;

[0064] E 0 No-load voltage amplitude V;

[0065] J virtual moment of inertia N·m;

[0066] D virtual damping coefficient;

[0067] ζ Damping ratio;

[0068] σ% overshoot;

[0069] t s Adjust the time.

[0070] In one embodiment, a method for adaptively controlling inertia flywheel parameters is provided. Figure 1 and Figure 2 As shown, the method includes:

[0071] Step 101, obtaining the angular frequency deviation of the inertia flywheel.

[0072] Step 102: Determine whether the power grid is stable according to the angular frequency deviation.

[0073] Step 103: When the power grid is stable, the inertia flywheel is controlled according to the virtual rotation inertia setting value and the virtual damping coefficient setting value.

[0074] like Figure 2 As shown in the figure, k is the allowable value of angular frequency change to prevent frequent parameter changes from burdening the system. When the power grid becomes unstable and the inertia support effect needs to be changed, the output angular frequency is judged by the deviation from the rated angular frequency. When the angular frequency deviation |Δω|≤k, the fluctuation is within the allowable range, and the inertia and virtual damping coefficients can use the set values.

[0075] Step 104, when the power grid is unstable, based on the second-order transfer function model, a particle swarm optimization algorithm is used to determine the optimal value of the virtual moment of inertia and the optimal value of the virtual damping coefficient that optimize the dynamic characteristics of the inertia flywheel, and the inertia flywheel is controlled according to the optimal value of the virtual moment of inertia and the optimal value of the virtual damping coefficient; the second-order transfer function model is a closed-loop transfer function that characterizes the relationship between the output of the inverter in the inertia flywheel and the input active power.

[0076] The second-order transfer function model in the embodiment of the present invention is constructed using the following steps.

[0077] A1. Analysis of Inertia Flywheel Model

[0078] like Figure 3 As shown in the figure, the inertia flywheel model includes the prime mover part composed of energy storage and wind turbine, and the virtual synchronous machine part that controls the inverter output, which together form the inertia flywheel. In order to simplify the control process and actual effect of VSG, the pulse width modulation part of the inverter is completed by analogy with the second-order model of the traditional synchronous generator.

[0079] Figure 3 Middle,U dc is the DC side voltage, e x (x=a,b,c) is the inverter output voltage, i x (x=a,b,c) is the inverter output current, U x (x=a, b, c) is the grid side voltage.

[0080] Figure 3 The virtual torque T output by the prime mover in m Given the active power reference value P ref Feedback with frequency deviation (ww n ) jointly decide, the specific formula is as follows, where k w is the frequency feedback factor.

[0081]

[0082] In the process of implementing the VSG control algorithm, it is divided into two parts: active and reactive. The modeling process of these two parts has been relatively complete. The active part simulates the synchronous generator speed regulator through frequency control, virtualizes the mechanical torque, and obtains the virtual angular velocity signal ω; the reactive part simulates the synchronous generator exciter through voltage control to obtain the voltage amplitude E. The two parts are superimposed to obtain the output voltage e of the inverter i (i=a,b,c). Algorithm control block diagram, such as Figure 4 shown.

[0083] Figure 4 In: P is the measured value of active power, P refis the active power reference value, Q is the reactive power measurement value, Q ref is the reactive power reference value, is the output voltage phase, E is the output voltage amplitude, E 0 is the no-load voltage amplitude, U is the VSG terminal voltage measurement value, and U ref It is the VSG terminal voltage reference value.

[0084] A2. Establishing the equivalent transfer function

[0085] For the adoption Figure 4 The VSG-controlled grid-connected inverter shown in the figure outputs active power P e And the reactive power Q can be expressed as:

[0086]

[0087] Where: E e is the effective value of VSG line voltage; U g is the actual value of the machine-end voltage; Z and θ are the filter impedance and impedance angle at the output side of the converter, and the calculation formula is:

[0088]

[0089] Where: R is the filter resistor; L is the filter inductor.

[0090] Because the line impedance is generally small, and the inductance of the line is generally much larger than the resistance, it can be considered that Z≈X f , cosδ=1 and sinδ=δ, X f is the inductance value of the converter output side. According to the previous assumption, the inductance resistance value can be used to replace the modulus value of the resistance of the entire circuit. The closed-loop transfer function expression G(s) of the inverter output and input active power can be obtained, that is, the above-mentioned second-order transfer function model is shown in the following formula.

[0091]

[0092]

[0093]

[0094] ω n is the natural oscillation frequency; ζ is the system damping ratio.

[0095] Based on the second-order transfer function model established in the above steps, the specific implementation steps of step 104 include:

[0096] An objective function and constraint conditions are constructed based on the second-order transfer function model; the objective function includes the overshoot and adjustment time of the inertia flywheel.

[0097] According to the constraints, the optimal value of the virtual moment of inertia and the optimal value of the virtual damping coefficient are determined by using a particle swarm optimization algorithm with the minimization of the objective function as the optimization goal.

[0098] Among them, constructing the objective function and constraint conditions based on the second-order transfer function model specifically includes:

[0099] B1. Establishment of evaluation indicators

[0100] From the second-order transfer function model, it can be seen that the closed-loop transfer function of the inverter output and input active power is a typical second-order transfer function, and the system can be evaluated using typical dynamic response indicators of the second-order system. Overshoot and adjustment time are commonly used indicators to measure the dynamic performance of the second-order system. Overshoot refers to the percentage of the peak value exceeding the steady-state value in the dynamic response. Adjustment time refers to the time it takes for the system to reach and remain within the allowable error band after a step response. The overshoot σ% and adjustment time t s The expression is:

[0101]

[0102] It can be seen from the expression that the overshoot is related to the damping ratio, and the adjustment time is related to the damping ratio and the natural oscillation frequency. By adjusting J and D, the dynamic performance of the second-order system, such as stability and rapidity, can be effectively improved.

[0103] B2. Parameter constraints

[0104] In traditional synchronous machines, the size of inertia is related to its physical structure, so the size of inertia cannot be changed. However, the inertia size of the virtual synchronous machine is determined by the algorithm part and is not restricted by physical conditions. In the model, it is equivalent to a controllable parameter, and the appropriate value can be selected according to the needs.

[0105] Two characteristic roots p of the second-order system 1,2 for:

[0106]

[0107] In the automatic control principle, it is usually expected that the system is in an underdamped state to ensure system stability, that is, to avoid the negative value of J causing the characteristic root to appear in the right half plane, the minimum value of J is taken as 0. Consider the upper limit P of the active power output of the grid-side converter max It can be concluded that the value range of J is:

[0108]

[0109] The range of the virtual damping coefficient D can be selected through the concept of the optimal second-order system. The damping ratio ξ = 0.707 is taken to keep the system in the optimal state, while ensuring that J does not exceed the constraint. The range of D is:

[0110]

[0111] B3. Constructing the objective function

[0112] The overshoot and adjustment time in step B1 are used as the objective function F(J,D) of the particle swarm optimization algorithm. In actual power grids, it is usually hoped that the overshoot and adjustment time are as small as possible. Based on this, the objective function is constructed as follows:

[0113] minF(J,D)=at s +bσ%;

[0114] Wherein: a, b are weight coefficients in the objective function, satisfying a+b=1, and can be adjusted according to the requirements of overshoot and adjustment time in the actual application process.

[0115] It can be seen that the embodiment of the present invention simulates the same rotor characteristics as the traditional synchronous motor by superimposing the VSG algorithm, effectively suppressing the instability of the grid frequency during the grid connection process caused by the excessive proportion of new energy. On this basis, the adjustable characteristics of virtual inertia and virtual damping are used to first determine the parameter change range through stable conditions, and then the optimal parameter value is found when the frequency exceeds the limit through the optimization algorithm, so that the parameters change with the frequency change amount, achieving the effect of optimal control. The stability and safety of the grid frequency are improved.

[0116] The inertia flywheel parameter adaptive control method proposed in the embodiment of the present invention has the following advantages:

[0117] 1) By introducing the rotor equation and stator equation into the flywheel energy storage, the system can simultaneously provide power support and voltage support, similar to a voltage source, which can effectively solve safety issues such as the rapid drop in frequency caused by a high proportion of new energy during the grid connection process.

[0118] 2) An improved parameter adaptive control method is adopted to change the size of the parameters when the frequency changes beyond the limit, so as to meet the optimal dynamic characteristics and provide power support in an instant, thus proposing a practical and effective control strategy for improving system performance.

[0119] In one embodiment, a computer device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above method.

[0120] The computer device may be a database, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pending transactions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps of the above method are implemented.

[0121] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.

[0122] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiment when executed by a processor.

[0123] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties.

[0124] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present invention may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided by the present invention may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.

[0125] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0126] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. An inertia flywheel parameter adaptive control method, characterized in that: The method comprises: Obtain the angular frequency deviation of the inertia flywheel; determining whether the power grid is stable according to the angular frequency deviation; When the power grid is stable, the inertia flywheel is controlled according to the virtual rotation inertia setting value and the virtual damping coefficient setting value; When the power grid is unstable, based on the second-order transfer function model, a particle swarm optimization algorithm is used to determine the optimal value of the virtual moment of inertia and the optimal value of the virtual damping coefficient that optimize the dynamic characteristics of the inertia flywheel, and the inertia flywheel is controlled according to the optimal value of the virtual moment of inertia and the optimal value of the virtual damping coefficient; the second-order transfer function model is a closed-loop transfer function that characterizes the relationship between the output of the inverter in the inertia flywheel and the input active power; Based on the second-order transfer function model, the particle swarm optimization algorithm is used to determine the optimal value of the virtual moment of inertia and the optimal value of the virtual damping coefficient that optimizes the dynamic characteristics of the inertia flywheel, including: Constructing an objective function and constraints based on the second-order transfer function model; the objective function includes the overshoot and adjustment time of the inertia flywheel; According to the constraints, taking minimization of the objective function as the optimization goal, a particle swarm optimization algorithm is used to determine the optimal value of the virtual moment of inertia and the optimal value of the virtual damping coefficient; The objective function and constraint conditions are constructed based on the second-order transfer function model, specifically including: Establish a second-order transfer function model; Based on the second-order transfer function model being a typical second-order transfer function, the dynamic response index of the typical second-order transfer function is selected to evaluate the system and construct the objective function; the dynamic response index includes: overshoot and adjustment time; In order to avoid the negative value of J causing the characteristic root to appear in the right half plane, the minimum value of J is taken as 0, and the upper limit P of the active power output of the grid-side converter is considered. max Ensure system stability and determine the constraints of virtual moment of inertia; Through the concept of optimal second-order system, the damping ratio ξ=0.707 is taken to keep the system in the optimal state, and the value range of the virtual damping coefficient D is determined; The objective function is: minF(J,D)=at s +bσ%; Where F(J,D) represents the objective function, J represents the virtual moment of inertia, D represents the virtual damping coefficient, σ% represents the overshoot, t s represents the adjustment time, a and b are the weight coefficients in the objective function, ω n is the natural oscillation frequency, ζ is the system damping ratio, X f is the inductance value of the converter output side, ω is the virtual angular velocity signal, E is the output voltage amplitude, U l is the grid voltage; The constraints are: Where J represents the virtual moment of inertia, D represents the virtual damping coefficient, P max is the upper limit of the active power output of the grid-side converter, ω is the virtual angular velocity signal, t is the time, E is the output voltage amplitude, U l is the grid voltage, X f is the inductance value of the converter output side.

2. The inertia flywheel parameter adaptive control method according to claim 1, characterized in that: Determining whether the power grid is stable according to the angular frequency deviation specifically includes: Determine whether the absolute value of the angular frequency deviation is less than or equal to the angular frequency variation allowable value, and obtain a determination result; If the judgment result indicates yes, then it is determined that the power grid is stable; If the judgment result indicates no, it is determined that the power grid is unstable.

3. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 2.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.

5. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.