A new energy power system inertia and virtual inertia analysis method

CN117807879BActive Publication Date: 2026-08-11SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

但这些方法仍然存在收敛性差和过程的高斯假设等问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117807879B_ABST
    Figure CN117807879B_ABST
Patent Text Reader

Abstract

This invention discloses a method for analyzing the inertia and virtual inertia of a new energy power system, belonging to the field of power system analysis technology. The method includes: S1, establishing a dynamic simulation model of the new energy power system after a disturbance; S2, calculating the likelihood functions of the inertia and virtual inertia parameters in the new energy power system model; S3, calculating the Bayesian posterior distribution of the inertia and virtual inertia parameters and establishing a Bayesian inference framework; S4, obtaining the Bayesian non-Gaussian posterior distribution using a hierarchical adaptive importance sampling algorithm; S5, estimating the inertia and virtual inertia parameters based on the maximum a posteriori estimate in the Bayesian non-Gaussian posterior distribution. This invention combines the hierarchical adaptive importance sampling algorithm and Bayesian inference for analyzing the inertia and virtual inertia of a new energy power system, which can efficiently and accurately estimate the system inertia and virtual inertia parameters, avoid the influence of the Gaussian assumption on the accuracy of the estimation results, and improve analysis efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system stability analysis and inertia estimation, and in particular to a method for analyzing the inertia and virtual inertia of new energy power systems under a Bayesian inference framework based on a hierarchical adaptive importance sampling algorithm. Background Technology

[0002] In new energy power systems, the proportion of renewable energy is gradually increasing, gradually replacing traditional synchronous generators, which significantly reduces the inertia provided by synchronous generators. Virtual inertia control technology enables virtual synchronous machines to also provide a certain amount of virtual inertia, helping to maintain the stability of the power system. Therefore, accurately estimating the power system's inertia and virtual inertia can provide a better understanding of the power system's operating status.

[0003] As crucial parameters for maintaining system stability, inertia and virtual inertia parameters have been widely estimated by power system researchers using various methods. With the widespread application of PMUs in power systems, methods based on Kalman filtering and unscented Kalman filtering have been applied to inertia estimation. However, these methods still suffer from poor convergence and the Gaussian assumption of the process. A method using neural networks can also estimate power system inertia, but its computational process lacks transparency, and the data preprocessing of neural networks is time-consuming. Furthermore, most of the aforementioned methods do not address the estimation problem of virtual inertia provided by virtual synchronous machines, neglecting the role and impact of widely applied virtual inertia control technology. Consequently, the estimation results cannot accurately reflect the true operating state of the power system. Summary of the Invention

[0004] The purpose of this invention is to provide an analysis method for the inertia and virtual inertia of a new energy power system under a Bayesian inference framework based on a hierarchical adaptive importance sampling algorithm. This method can efficiently and accurately estimate the system inertia and virtual inertia parameters, avoid the influence of the Gaussian assumption on the accuracy of the estimation results, and improve the analysis efficiency.

[0005] The technical solution adopted in this invention is as follows.

[0006] On the one hand, this invention provides a method for analyzing the inertia and virtual inertia of a new energy power system, including:

[0007] S1, Establish a dynamic simulation model of the new energy power system after the disturbance occurs;

[0008] S2, calculate the likelihood function of inertia and virtual inertia parameters in the new energy power system model;

[0009] S3, calculate the Bayesian posterior distribution of inertia and virtual inertia parameters, and establish a Bayesian inference framework.

[0010] S4. The Bayesian non-Gaussian posterior distribution is obtained using a hierarchical adaptive importance sampling algorithm.

[0011] S5. Estimate the inertia and virtual inertia parameters based on the maximum a posteriori estimate in the Bayesian non-Gaussian posterior distribution.

[0012] Optionally, step S1 integrates three generator models—the traditional second-order dynamic model of a synchronous generator, the grid-following virtual synchronous machine model, and the grid-connected virtual synchronous machine model—to establish a dynamic simulation model of the new energy power system after a disturbance; among which,

[0013] The traditional second-order dynamic model of the synchronous generator is expressed as follows:

[0014]

[0015]

[0016] Where δ is the rotor angle of the synchronous generator; ω and ω0 are the rotor angular frequency and rated angular frequency of the synchronous generator, respectively; H is the inertia time constant; D is the damping ratio; T M It is the mechanical torque of the synchronous generator; P e This is the active power output of the synchronous generator;

[0017] The network-based virtual synchronizer model is represented as follows:

[0018]

[0019]

[0020]

[0021] Among them, P v and P vs These are the output active power and the reference value, respectively; K v Used to introduce virtual inertia H v And K v =2H v ;T v and T p These are the inertia time constant and the power control dynamic equivalent time constant, respectively; x v and x PLL These are all intermediate variables; ω PLL θ is the difference between the virtual synchronous machine connection point frequency and ω0; θ is the phase angle of the mains voltage; θ PLL It is the output angle of the virtual synchronizer;

[0022] The network-type virtual synchronizer model is represented as follows:

[0023]

[0024]

[0025] Where ω VSG It is the angular frequency of the network-type virtual synchronizer; T0 and T em These are the reference torque and the output torque, respectively; J is the inertia of the network-type virtual synchronous machine, and its inertia time constant H. m The relationship is H m =Jω 2 / (2S base );S base This is the rated power of the network-type virtual synchronizer; D q and D e These are the droop coefficient and equivalent damping of QV, respectively; K is the voltage integral gain; E and E0 are the internal voltage and reference voltage of the network-type virtual synchronous machine, respectively; Q0 ​​and Q... em These are the reference reactive power and the output reactive power, respectively.

[0026] Optionally, establishing a dynamic simulation model of the new energy power system after the disturbance includes:

[0027] S141. Set the simulation time and iteration step size of the dynamic simulation model;

[0028] S142. Standardize and reduce all generator parameters and state variables;

[0029] S143. Set the disturbance occurrence time, fault type, and fault location;

[0030] S144. Calculate the initial values ​​of the ordinary differential equations for the three generator models based on steady-state power flow.

[0031] S145. Iteratively solve the ordinary differential equation variables for three generator models;

[0032] S146. Determine the calculation models for the active and reactive power outputs of the three generators corresponding to the three generator models in each iteration.

[0033] Optionally, the active and reactive power outputs of the three types of generators include:

[0034] The active and reactive power output models of traditional synchronous generators and grid-type virtual synchronous generators are expressed as follows:

[0035]

[0036]

[0037] The active and reactive power output models of the grid-type virtual synchronous generator are represented as follows:

[0038] P ei =P vi +e Pi

[0039] Q ei =0;

[0040] Among them, V i E i θ represents the bus voltage amplitude and the internal voltage amplitude of the i-th synchronous generator or grid-type virtual synchronous machine, respectively; i and δ i X' represents the bus voltage phase angle and the generator internal voltage phase angle of the i-th synchronous generator or grid-type virtual synchronous machine, respectively; di P represents the transient reactance of the i-th synchronous generator or grid-type virtual synchronous machine; ei and Q ei These are the active and reactive power outputs of the i-th generator, respectively; e Pi and e Qi For measuring noise.

[0041] Optionally, step S2 includes:

[0042] S21. Based on the measurement and simulation results, establish the Bayesian likelihood function, expressed as:

[0043]

[0044] Where, π ei (d i -f i (H')) represents d i -f i The likelihood function satisfied by (H'); H' = [H; H v H m ] represents all inertia and virtual inertia; d1 and d2 represent the active power and reactive power PMU measurements, respectively; f(·) is a function that maps the inertia and virtual inertia parameters H' to active power and reactive power.

[0045] S22. Compare the calculated values ​​of the generator's active and reactive power over a certain period of time with the measured values ​​from the PMU, and calculate the likelihood function in logarithmic trajectory form:

[0046]

[0047] Among them, t end This indicates the end of the selected time period. The PMU measurement values ​​are the active and reactive power values ​​obtained based on the actual inertia and virtual inertia parameters.

[0048] Optionally, step S3 includes:

[0049] S31. Calculate the Bayesian prior probability density function for N inertia and virtual inertia parameters, expressed as:

[0050]

[0051] S32. Obtain the posterior probability density, expressed as: π post (H'|d)∝π like (d|H')π prior (H')

[0052] S33. Calculate the logarithmic posterior probability density using the likelihood function in logarithmic locus form, expressed as:

[0053]

[0054] S34. Based on the active power and reactive power measurements output by the new energy power system, as well as the prior information of inertia and virtual inertia parameters, establish a Bayesian inference framework, that is, the relationship between the posterior distribution established in the above process and the parameters that need to be estimated.

[0055] Where, π i H represents the prior distribution of the i-th inertia and the virtual inertia. i ' represents the i-th inertia and virtual inertia parameter.

[0056] Optionally, step S4 includes:

[0057] S41, Based on the Bayesian inference framework, the Bayesian posterior distribution is used as the target distribution of the hierarchical adaptive importance sampling algorithm;

[0058] S42. Use the Markov Chain Monte Carlo (MCMC) algorithm as the upper layer of the hierarchical adaptive importance sampling algorithm to adjust the prior distribution of inertia and virtual inertia parameters.

[0059] S43. Use the Multiple Importance Sampling (MIS) algorithm as the lower layer of the hierarchical adaptive importance sampling algorithm to estimate the maximum a posteriori results of inertia and virtual inertia parameters.

[0060] S44. Resample the samples by treating the importance weights as the probabilities of the corresponding samples, and use the sampling results as samples that follow a Bayesian non-Gaussian posterior distribution.

[0061] Optionally, step S42 includes:

[0062] S421, From the given N i A prior distribution Samples drawn from Where n = 1, ..., N i ;

[0063] S422, Calculate for the sample The acceptance probability of the sampling test is expressed as:

[0064]

[0065] S423, For the new sample μ n,t Then we have: The probability is α, μ n,t =μ n,t-1 The probability is 1-α; here, the acceptance rate obtained from S422 is used to determine the value of the new sample, so as to adjust the prior distribution of the inertia and virtual inertia parameters.

[0066] in, Let μ represent the prior distribution. n,t-1 This represents the mean of the prior distribution.

[0067] Optionally, step S43 includes:

[0068] S431, the result μ obtained by the MCMC algorithm n,t The proposed distribution q for the MIS algorithm n,t (μ n,t ) parameters;

[0069] S432, According to the proposed distribution q n,t (μ n,t Draw a set number of samples;

[0070] S433, Calculate each sample Importance weights, the formula is:

[0071]

[0072] S434. Normalize the importance weights of all samples:

[0073]

[0074] Where, N i q represents the number of prior distributions for each parameter. k,t Let M represent the proposal distributions required in importance sampling, and M represent the number of samples drawn from each proposal distribution.

[0075] Optionally, step S5 includes:

[0076] S51. Draw the Bayesian posterior distribution probability density image using the resampled sample.

[0077] S52. Find the maximum posterior point in the Bayesian posterior probability density image and use it as the estimation result of the inertia and virtual inertia parameters.

[0078] In a second aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for analyzing the inertia and virtual inertia of a new energy power system as described in the first aspect.

[0079] Beneficial effects

[0080] This invention considers the nonlinear characteristics of the dynamic model of the power system, calculates the Bayesian posterior distribution of inertia and virtual inertia in the new energy power system through Bayesian inference, and obtains samples that follow the Bayesian posterior distribution of inertia and virtual inertia by using a hierarchical adaptive importance sampling algorithm. This overcomes the problem that the nonlinearity of the power system leads to the lack of analytical solutions for Bayesian inference, and thus eliminates the need to make Gaussian assumptions.

[0081] Meanwhile, this invention also incorporates grid-connected virtual synchronous generator and grid-connected virtual synchronous generator models into the dynamic simulation model of the power system, fully considering the role of virtual inertia in maintaining system stability. Furthermore, by using statistical methods, it can accurately estimate inertia and virtual inertia parameters while also analyzing the correlation between various parameters.

[0082] Furthermore, by applying a hierarchical adaptive importance sampling algorithm, this invention enables the lower-level MIS algorithm to be computed in parallel, effectively solving the problems of traditional algorithms being unable to be parallelized and having slow convergence speed. This allows for efficient and rapid analysis and calculation of the inertia and virtual inertia parameters of new energy power systems. Attached Figure Description

[0083] Figure 1 The diagram shown is a schematic flowchart of a method according to an embodiment of the present invention;

[0084] Figure 2 The figure shows the parameter estimation error results of Embodiment 1 of the present invention;

[0085] Figure 3 The figure shows the parameter estimation error results of Embodiment 2 of the present invention;

[0086] Figure 4 The figure shows the parameter estimation error results of Embodiment 3 of the present invention;

[0087] Figures 2 to 4 In the diagram, the horizontal axis represents each generator, and the vertical axis represents the relative error between the estimated and actual values ​​of the generator's inertia or virtual inertia parameter. Detailed Implementation

[0088] The following description, in conjunction with the accompanying drawings and specific embodiments, provides further details.

[0089] Example 1

[0090] This embodiment introduces a method for estimating the inertia and virtual inertia parameters of a new energy power system based on a Bayesian inference framework using a hierarchical adaptive importance sampling algorithm. Figure 1 As shown, the method includes the following steps:

[0091] S1. Establish a dynamic simulation model of the new energy power system after the disturbance occurs. The specific steps are as follows.

[0092] S11. Determine the second-order dynamic model of a traditional synchronous generator:

[0093]

[0094]

[0095] Where δ is the rotor angle of the synchronous generator; ω and ω0 are the rotor angular frequency and rated angular frequency of the synchronous generator, respectively; H is the inertia time constant; D is the damping ratio; T M It is the mechanical torque of the synchronous generator; P e This is the active power output of the synchronous generator.

[0096] S12. Determine the network-type virtual synchronizer model:

[0097]

[0098]

[0099]

[0100]

[0101] Among them, P v and P vs These are the output active power and the reference value, respectively; K v Used to introduce virtual inertia H v And K v =2H v ;T v and T p These are the inertia time constant and the power control dynamic equivalent time constant, respectively; x v and x PLL These are all intermediate variables; ω PLL θ is the difference between the virtual synchronous machine connection point frequency and ω0; θ is the phase angle of the mains voltage; θ PLL It is the output angle of the virtual synchronizer;

[0102] S13. Determine the network-type virtual synchronous machine model:

[0103]

[0104]

[0105] Where ω VSG It is the angular frequency of the network-type virtual synchronizer; T0 and T em These are the reference torque and the output torque, respectively; J is the inertia of the network-type virtual synchronous machine, and its inertia time constant H. m The relationship is H m =Jω 2 / (2S base );S base This is the rated power of the network-type virtual synchronizer; D q and D e These are the droop coefficient and equivalent damping of QV, respectively; K is the voltage integral gain; E and E0 are the internal voltage and reference voltage of the network-type virtual synchronous machine, respectively; Q0 ​​and Q... em These are the reference reactive power and the output reactive power, respectively.

[0106] S14. Establish a dynamic simulation model of the new energy power system involving the above three generator models. The specific steps are as follows:

[0107] S141. Set the simulation time and iteration step size of the dynamic model simulation model of the new energy power system;

[0108] S142. Standardize and reduce all generator parameters and state variables;

[0109] S143. Set the disturbance occurrence time to 0.5 seconds, the fault type to tangent, and the fault location to the transmission lines of bus 15 and bus 16;

[0110] S144. Calculate the initial values ​​of the ordinary differential equations for the three generator models based on the steady-state power flow and dynamic simulation models.

[0111] S145. Iteratively solve the ordinary differential equation variables for three generator models;

[0112] S146. Determine the calculation models for the active and reactive power outputs of the three generator models corresponding to each iteration. These models are used to calculate the active and reactive power outputs of the three generators in each iteration. The calculation formulas for the active and reactive power outputs of the traditional synchronous generator and the grid-type virtual synchronous generator are as follows:

[0113]

[0114]

[0115] Unlike the other two types of generators, the grid-type virtual synchronous generator belongs to the PQ node. Therefore, the formulas for calculating the output active power and reactive power are as follows:

[0116] P ei =P vi +e Pi

[0117] Q ei =0;

[0118] In the above formula, V i E i θ represents the bus voltage amplitude and the internal voltage amplitude of the i-th synchronous generator or grid-type virtual synchronous machine, respectively; i and δ i X' represents the bus voltage phase angle and the generator internal voltage phase angle of the i-th synchronous generator or grid-type virtual synchronous machine, respectively; di P represents the transient reactance of the i-th synchronous generator or grid-type virtual synchronous machine; ei and Q ei These are the active and reactive power outputs of the i-th generator or the network-type virtual synchronous machine, respectively; e Pi and e Qi For measuring noise.

[0119] S2. Calculate the likelihood function of inertia and virtual inertia parameters in the power system model. The specific steps are as follows:

[0120] S21. Establish the Bayesian likelihood function π based on measurement and simulation results. like (d|H'):

[0121]

[0122] Where d1 represents active power measurement, d2 represents reactive power measurement; H' = [H; H v H m ] represents all inertia and virtual inertia; f(·) is a function that maps the inertia and virtual inertia parameters H' to active power and reactive power.

[0123] S22. Compare the calculated values ​​with the PMU measurements over a certain period of time, and calculate the likelihood function in the form of a logarithmic trajectory:

[0124]

[0125] Among them, t end This indicates the end of the selected time period.

[0126] S3. Calculate the Bayesian posterior distribution of inertia and virtual inertia parameters and establish a Bayesian inference framework. The specific steps are as follows:

[0127] S31. Calculate the Bayesian prior probability density function for N inertia and virtual inertia parameters:

[0128]

[0129] S32. Obtain the posterior probability density π post (H'|d)∝π like (d|H')π prior (H')

[0130] S33. Calculate the logarithmic posterior probability density using the likelihood function in logarithmic locus form:

[0131]

[0132] S34. Establish a Bayesian inference framework based on prior information of active power measurement, reactive power measurement, inertia and virtual inertia parameters of the input new energy power system.

[0133] S4. Use the hierarchical adaptive importance sampling algorithm to obtain the Bayesian non-Gaussian posterior distribution;

[0134] S41. Use the Bayesian posterior distribution as the target distribution for the hierarchical adaptive importance sampling algorithm;

[0135] S42. Use the MCMC algorithm as the upper layer of the hierarchical adaptive importance sampling algorithm to adjust the prior distribution of inertia and virtual inertia parameters. The specific steps include:

[0136] S421, From a given prior distribution Sample μ drawn from n,* ;

[0137] S422, Calculate the acceptance rate

[0138] S423, For the new sample μ n,t Then we have: The probability is α, μ n,t =μ n,t-1 The probability is 1-α;

[0139] S43. Using the MIS algorithm as the lower layer of the hierarchical adaptive importance sampling algorithm, the maximum a posteriori results of inertia and virtual inertia parameters are estimated. The specific steps include:

[0140] S431, the result μ obtained by the MCMC algorithm n,t The proposed distribution q for the MIS algorithm n,t (μ n,t ) parameters;

[0141] S432. Draw a sufficient number of samples according to the proposed distribution;

[0142] S433, Calculate each sample Importance weight:

[0143]

[0144] S434, Normalize all importance weights:

[0145]

[0146] S44. Resample the samples by treating the importance weights as the probabilities of the corresponding samples, and use the sampling results as samples that follow a Bayesian posterior distribution.

[0147] S5. Estimate the inertia and virtual inertia parameters using maximum a posteriori estimation. The specific steps are as follows:

[0148] S51. Draw the Bayesian posterior distribution probability density image using the resampled sample.

[0149] S52. Find the maximum posterior point in the image and use it as the estimation result of the inertia and virtual inertia parameters.

[0150] In summary, this embodiment, by constructing a Bayesian inference framework based on a hierarchical adaptive importance sampling algorithm, can quickly and accurately estimate the inertia result. Figures 2 to 4 The estimation error of the applied hierarchical adaptive importance sampling algorithm is shown. The advantages and progress of the present invention are verified with several application examples below.

[0151] Application Example 1

[0152] The analysis method for the inertia and virtual inertia of the new energy power system in this embodiment is applied in the following power system environment: the power system is a New England 39 bus system using a classic generator model, where the synchronous generators at buses 36 and 37 are replaced with grid-connected virtual synchronous generators, and the synchronous generators at buses 38 and 39 are replaced with grid-connected virtual synchronous generators. A set of PMUs is placed at the generator terminals to provide P... e and Q e The measured value.

[0153] To analyze the dynamics of the power system under disturbance, the transmission line between bus 15 and bus 16 was opened. The simulation duration was set to 5.5 seconds, and the sampling time was 0.01 seconds. The prior distribution of the given inertia and virtual inertia parameters follows a Gaussian distribution with a mean of [525; 29; 34; 27.5; 24.5; 36; 7; 5.3; 4.8; 5] and a standard deviation of 10% of the mean. The actual values ​​of the inertia and virtual inertia parameters are [500.0; 30.3; 35.8; 28.6; 26.0; 34.8; 7.5; 5; 5.0224; 5.3].

[0154] Application Example 2

[0155] The power system in this application example is the New England 39 bus system using the classic generator model. The synchronous generators at buses 36 and 37 have been replaced with grid-connected virtual synchronous generators, and the synchronous generators at buses 38 and 39 have been replaced with grid-connected virtual synchronous generators. A set of PMUs is placed at the generator terminals to provide P... e and Q e The measured values ​​were obtained. To analyze the dynamics of the power system under disturbance, the transmission line between bus 15 and bus 16 was opened, the simulation duration was set to 5.5 seconds, and the sampling time was 0.01 seconds. The prior distribution of the given inertia and virtual inertia parameters follows a Gaussian distribution with a mean of [550; 27.5; 32; 26.5; 23.5; 37.5; 6.8; 5.5; 4.5; 4.8] and a standard deviation of 10% of the mean. The actual values ​​of the inertia and virtual inertia parameters are [500.0; 30.3; 35.8; 28.6; 26.0; 34.8; 7.5; 5; 5.0224; 5.3].

[0156] The power system inertia and virtual inertia parameters are estimated according to the steps in Example 1. The estimation result using Bayesian inference with hierarchical adaptive importance sampling algorithm has the following error: Figure 3 As shown, when the accuracy of the given prior information decreases, the Bayesian inference algorithm based on the hierarchical adaptive importance sampling algorithm does not suffer a decrease in estimation accuracy and can still quickly and accurately estimate the inertia and virtual inertia parameters. The method of this invention does not depend on the accuracy of the prior information.

[0157] Application Example 3

[0158] The power system in this application example is the New England 39 bus system using the classic generator model. The synchronous generators at buses 36 and 37 have been replaced with grid-connected virtual synchronous generators, and the synchronous generators at buses 38 and 39 have been replaced with grid-connected virtual synchronous generators. A set of PMUs is placed at the generator terminals to provide P... e and Q e The measured values ​​were obtained. To analyze the dynamics of the power system under disturbance, the transmission line between bus 23 and bus 24 was opened, the simulation duration was set to 5.5 seconds, and the sampling time was 0.01 seconds. The prior distribution of the given inertia and virtual inertia parameters follows a Gaussian distribution with a mean of [550; 27.5; 32; 26.5; 23.5; 37.5; 6.8; 5.5; 4.5; 4.8] and a standard deviation of 10% of the mean. The actual values ​​of the inertia and virtual inertia parameters are [500.0; 30.3; 35.8; 28.6; 26.0; 34.8; 7.5; 5; 5.0224; 5.3].

[0159] According to the steps of this invention, the inertia and virtual inertia parameters of the power system are estimated. The estimation error of the Bayesian inference result using the hierarchical adaptive importance sampling algorithm is as follows: Figure 4 As shown.

[0160] As can be seen, although the location of the fault point changed—that is, the tangent position changed from busbars 15 and 16 in Application Example 2 to busbars 23 and 24 in Application Example 3—the accuracy of the Bayesian inference method based on the hierarchical adaptive importance sampling algorithm did not decrease. It can still quickly and accurately estimate the inertia and virtual inertia parameters. This method can be applied to different types of fault points.

[0161] Example 2

[0162] This embodiment introduces a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the analysis method for the inertia and virtual inertia of a new energy power system as described in Embodiment 1.

[0163] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0164] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0165] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0166] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0167] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A method for analyzing inertia and virtual inertia of a new energy power system, characterized in that, include: S1, Establish a dynamic simulation model of the new energy power system after the disturbance occurs; S2, calculate the likelihood function of inertia and virtual inertia parameters in the new energy power system model; S3, calculate the Bayesian posterior distribution of inertia and virtual inertia parameters, and establish a Bayesian inference framework. S4. The Bayesian non-Gaussian posterior distribution is obtained using a hierarchical adaptive importance sampling algorithm. S5. Estimate the inertia and virtual inertia parameters based on the maximum a posteriori estimate in the Bayesian non-Gaussian posterior distribution. Step S2 includes: S21. Based on the measurement and simulation results, establish the Bayesian likelihood function, expressed as: in, express The likelihood function it satisfies; Represents all inertia and virtual inertia, where H The inertia time constant of a traditional synchronous generator, H v To match the virtual inertia of the mesh-type virtual synchronizer, H m The inertia time constant of a network-type virtual synchronizer; , These represent the PMU measurements of active power and reactive power, respectively; subscripts Corresponding active power, subscript Corresponding reactive power; It combines inertia and virtual inertia parameters. Functions that map to active and reactive power; S22. Compare the calculated values ​​of the generator's active and reactive power during the time period to be analyzed with the PMU measurements, and calculate the likelihood function in logarithmic trajectory form: in, The superscript indicates the end of the time period to be analyzed. The corresponding time within the time period to be analyzed ; Step S3 includes: S31. Calculate the Bayesian prior probability density function for N inertia and virtual inertia parameters, expressed as: ,in, Indicates the first Prior distributions of individual inertia and virtual inertia Indicates the first Individual inertia and virtual inertia parameters; S32. Obtain the posterior probability density, expressed as: S33. Calculate the logarithmic posterior probability density using the likelihood function in logarithmic locus form, expressed as: S34. Based on the active power and reactive power measurements output by the new energy power system, as well as the prior information on inertia and virtual inertia parameters, a Bayesian inference framework is obtained.

2. The method according to claim 1, characterized in that, Step S1 integrates three generator models—the traditional second-order dynamic model of a synchronous generator, the grid-connected virtual synchronous machine model, and the network-structured virtual synchronous machine model—to establish a dynamic simulation model of the new energy power system after a disturbance; among which... The traditional second-order dynamic model of the synchronous generator is expressed as follows: in, It is the rotor angle of the synchronous generator; and These are the synchronous generator rotor angular frequency and rated angular frequency, respectively. It is the inertia time constant; The damping ratio; It is the mechanical torque of the synchronous generator; This is the active power output of the synchronous generator; The network-based virtual synchronizer model is represented as follows: in, and These are the output active power and the reference value, respectively. Used to introduce virtual inertia ,and ; and These are the inertia time constant and the power control dynamic equivalent time constant, respectively. and They are all intermediate variables; The virtual synchronizer connection point frequency and The difference; It is the phase angle of the power grid voltage; It is the output angle of the virtual synchronizer; The network-type virtual synchronizer model is represented as follows: in It is the angular frequency of the network-type virtual synchronizer; and These are the reference torque and the output torque, respectively. It is the inertia of a network-type virtual synchronizer and its inertia time constant. The relationship is ; This is the rated power of the network-type virtual synchronizer; and These are the QV sag coefficient and the equivalent damping, respectively. It is the voltage integral gain; and These are the internal voltage and reference voltage of the network-type virtual synchronous machine, respectively. and These are the reference reactive power and the output reactive power, respectively.

3. The method according to claim 2, characterized in that, The establishment of a dynamic simulation model of the new energy power system after the disturbance includes: S141. Set the simulation time and iteration step size of the dynamic simulation model; S142. Standardize and reduce all generator parameters and state variables; S143. Set the disturbance occurrence time, fault type, and fault location; S144. Calculate the initial values ​​of the ordinary differential equations for the three generator models based on steady-state power flow. S145. Iteratively solve the ordinary differential equation variables for three generator models; S146. Determine the calculation models for the active and reactive power outputs of the three generators corresponding to the three generator models in each iteration. The active and reactive power outputs of the three types of generators include: The active and reactive power output models of traditional synchronous generators and grid-type virtual synchronous generators are expressed as follows: The active and reactive power output models of the grid-type virtual synchronous generator are represented as follows: ; in, , They represent the first The bus voltage amplitude and generator internal voltage amplitude of a synchronous generator or a grid-type virtual synchronous machine; and They represent the first The bus voltage phase angle and the internal voltage phase angle of the generator; For the first The transient reactance of a synchronous generator or a grid-type virtual synchronous machine; and They are the first The active and reactive power outputs of the generator; and For measuring noise.

4. The method according to claim 1, characterized in that, Step S4 includes: S41, Based on the Bayesian inference framework, the Bayesian posterior distribution is used as the target distribution of the hierarchical adaptive importance sampling algorithm; S42. Use the Markov Chain Monte Carlo (MCMC) algorithm as the upper layer of the hierarchical adaptive importance sampling algorithm to adjust the prior distribution of inertia and virtual inertia parameters. ; S43. Use the Multiple Importance Sampling (MIS) algorithm as the lower layer of the hierarchical adaptive importance sampling algorithm to estimate the maximum a posteriori results of inertia and virtual inertia parameters. S44. Resample the samples by treating the importance weights as the probabilities of the corresponding samples, and use the sampling results as samples that follow a Bayesian non-Gaussian posterior distribution.

5. The method according to claim 4, characterized in that, Step S42 includes: S421, From the given A prior distribution Samples drawn from , where n=1,… ; S422, Calculate for the sample The acceptance probability of the sampling test is expressed as: ; S423, For new samples Then we have: = The probability is , = The probability is ; in, Describe the prior distribution, This represents the mean of the prior distribution.

6. The method according to claim 5, characterized in that, Step S43 includes: S431. Results obtained using the MCMC algorithm As a proposed distribution for the MIS algorithm Parameters; S432, Distribution according to the proposal Draw a set number of samples; S433, Calculate each sample Importance weights, the formula is: S434. Normalize the importance weights of all samples: in, This represents the number of prior distributions for each parameter. This represents the proposed distribution needed in importance sampling. This represents the number of samples drawn from each proposed distribution.

7. The method according to claim 6, characterized in that, step S5 includes: S51. Draw the Bayesian posterior distribution probability density image using the resampled sample. S52. Find the maximum posterior point in the Bayesian posterior probability density image and use it as the estimation result of the inertia and virtual inertia parameters.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for analyzing the inertia and virtual inertia of a new energy power system as described in any one of claims 1-7.