Virtual power plant inertia estimation algorithm based on two-stage distributed denoising
By using a two-stage distributed denoising and diffusion model to deal with nonlinear frequency response and non-Gaussian noise in virtual power plants, the problems of inertia estimation accuracy and inefficiency in power systems are solved, and higher frequency stability and accuracy inertia estimation are achieved sex.
Patent Information
- Application Number
- CN202410594161.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-11-19
AI Technical Summary
In the future power system, especially in virtual power plants containing a large number of distributed renewable energy, inertia estimation is expected to face complex frequency processes and significant non-Gaussian noise impacts under large disturbances, resulting in the problems of frequency stability and low signal-to-noise ratio. The algorithm has shortcomings in accuracy and efficiency.
The two-stage distributed denoising diffusion model (DDPM) is used. The first stage uses adaptive traceless Kalman filtering to process the nonlinear frequency response model, and the second stage uses the distributed DDPM algorithm to process distributed non-Gaussian noise. Inertia evaluation is performed in combination with multi-source data to enhance frequency stability.
It significantly improves the accuracy of inertia estimation and the reliability of sampled data, suppresses the influence of non-Gaussian noise, enhances the frequency stability of the power system, and provides theoretical support for the stable operation and optimization control of virtual power plants.
Smart Images

Figure CN118983768A_ABST
Abstract
Description
Technical Field The present invention belongs to the field of electric power systems, and in particular relates to a virtual power plant inertia estimation algorithm based on two-stage distributed denoising. Background Art
[0001] The goal of "building a new power system with new energy as the main body" in my country has promoted the rapid evolution of the power system to adapt to large-scale and high-proportion renewable energy sources (Renewable Energy Sources, RESs). In the future, the power system with large-scale grid-connected distributed resources (Distributed Energy Resources, DERs) such as distributed wind power, photovoltaics, and energy storage on the demand side will be characterized by complex structure, diverse equipment, and complex technology. However, large-scale intermittent renewable energy is connected to the grid from the demand side, transferring uncertainty to the main grid, increasing the difficulty of the power system to maintain supply balance. Therefore, researchers have created virtual power plant (Virtual Power Plant, VPP) technology based on existing research such as DSE and microgrids to balance the intermittency and volatility of the power generation side and the power consumption side.
[0002] VPP is an energy management system built through technology. It can aggregate and regulate massive and diverse DERs such as distributed power sources, controllable loads, and energy storage equipment. Its basic functions are aggregation, optimization, and control. This integration can not only reduce the impact of DERs on the power grid when they are connected to the power grid, but also promote the complementarity of multiple energy sources, thereby meeting the needs of the rapid development of the electricity market. However, the large number of non-synchronous units in the VPP will reduce the inertia of the overall system, which may lead to large frequency changes and threaten the dynamic performance and stability of the power grid. Therefore, the present invention aims to provide an accurate and effective inertia estimation method suitable for VPP, so as to help system operators better plan, monitor and control their networks.
[0003] In the field of power system research, inertia estimation, as a key means of analyzing the dynamic characteristics of the system, is receiving more and more attention. Inertia estimation mainly includes two major links: parameter measurement and algorithm processing. First, in terms of parameter measurement, with the rapid development of sensor technology, the measurement accuracy and real-time performance of key parameters such as voltage, current, and power have been significantly improved. This provides a more accurate and comprehensive data source for inertia estimation, making the estimation results closer to the actual system state; in terms of algorithm processing, the existing inertia estimation algorithms cover a variety of mathematical tools and theoretical methods. For example, the particle filter is suitable for state estimation of nonlinear and non-Gaussian systems through random sampling and weight update; the Kalman filter can realize dynamic estimation of the system state through recursive prediction and update steps. However, although these algorithms have achieved certain results in specific scenarios, there are still many challenges. Future power systems, especially VPPs containing a large number of DERs, are intermittent and volatile, and their operating condition selection faces multiple contradictions. Under large disturbances, the frequency process is affected by the physical dynamics of the prime mover, frequency modulation measures and voltage characteristics, and it is difficult to retain the inertia-dominated dynamic process alone. However, under non-large disturbance conditions, problems such as low signal-to-noise ratio make it difficult to extract real dynamic process signals, and the modal analysis method has limited accuracy; the data association rule faces problems of insufficient samples and sample inertia calculation. In summary, it is an idea worth exploring to combine the inertia characterization model and make full use of the system's multi-source data to evaluate inertia. Therefore, the present invention adopts a two-stage distributed denoising diffusion model (Denoising Diffusion Probabilistic Models, DDPMs) to perform layered processing on the VPP process. In the first stage, the overall nonlinear VPP model is processed, and in the second stage, only local measurements and data from adjacent nodes are processed. In addition, the connection between different stations and the impact of the non-Gaussian noise brought by them on the system inertia estimation are also considered. Summary of the invention
[0004] The present invention provides a virtual power plant inertia estimation algorithm based on two-stage distributed denoising, which belongs to the field of power system. First, for new energy systems such as photovoltaic power plants, wind farms, energy storage aggregation areas and conventional power plants, the concept of virtual power plant (Virtual Power Plant, VPP) is introduced. Then, the power system frequency response model is introduced for VPP, and a regression equation that accurately describes the dynamic characteristics of the power system is constructed; secondly, in view of the problems of insufficient accuracy and low computational efficiency, the present invention proposes a parameter estimation algorithm for the virtual power plant inertia estimation algorithm based on two-stage distributed denoising, wherein the first stage uses an adaptive unscented Kalman filter to process the nonlinear frequency response model of VPP, and the second stage uses a distributed DDPM algorithm to process the distributed non-Gaussian noise of VPP, thereby realizing an accurate evaluation of the inertia of the virtual power plant. The algorithm not only improves the reliability of sampling data, the accuracy of inertia estimation, suppresses the influence of distributed non-Gaussian noise commonly present in VPP, but also effectively enhances the frequency stability of the power system. The present invention provides theoretical and technical support for the stable operation and optimization control of virtual power plants.
[0005] In order to achieve the above objectives, a virtual power plant inertia estimation method based on a two-stage distributed denoising virtual power plant inertia estimation algorithm is proposed. The specific steps are as follows:
[0006] Step (1): Based on the swing equation, a dynamic frequency response model with inertia characteristics is established for the virtual power plant, where the virtual power plant includes a wind farm, a photovoltaic farm, an energy storage aggregation area, a conventional power plant, and a load;
[0007] Step (2): the model derived in step (1) is subjected to first-stage filtering based on an adaptive unscented Kalman filter algorithm, thereby processing the absolute measurement value;
[0008] Step (3): The model obtained in step (2) is directly combined with the sensor and the distributed DDPM is used for the second stage filtering to process the relative measurement values.
[0009] Furthermore, in step (1), a dynamic frequency model with inertia characteristics is established based on the swing equation for the virtual power plant including the wind farm, the photovoltaic farm, the energy storage aggregation area, the traditional power system and the load: Where H is the inertia time constant, Δf is the frequency change, ΔP is the power change, and ΔP = P PFC +P W +P PV +P BESS -ΔP tie -ΔP L , P PFC is the primary frequency regulation active power of the conventional power system, P Wis the wind farm power, P PV is the power of the photovoltaic power plant, P BESS is the power of the energy storage aggregation area, ΔP L is the load change, ΔP tie represents the change in the total power of the tie line connecting area i to the adjacent area and has
[0010] Furthermore, step (2) performs first-stage filtering on step (1) and the derived model using an adaptive unscented Kalman filter algorithm to process the absolute measurement value. Assuming that the absolute measurement information is only affected by Gaussian white noise, since the system dynamic frequency model obtained in step (1) is a nonlinear model, the system dynamic frequency model is converted into a discrete nonlinear state space equation: And the adaptive unscented Kalman filter algorithm is used for processing: Where f(*) is the state function of the nonlinear system, is the system process noise, y i k is the observed value, h(*) is the nonlinear system observation function, Observe the noise of the system.
[0011] Step (2.1): Initialization: Where E[*] is the initialization equation,
[0012] Step (2.2): Calculate 2n+1 sigma points:
[0013] Step (2.3): Calculate the sigma point mean weighting and variance weighting: Among them, κ is an adjustable parameter used to improve the accuracy of nonlinear approximation; α is used to control the distribution state of sampling points, and β is a non-negative weight coefficient used to reduce the error of high-order terms.
[0014] Step (2.4): Time update: Update the nonlinear transformation sigma point:
[0015] Step (2.5): Forecast estimation: in is the state variable updated by time, is the error covariance matrix of the time update.
[0016] Step (2.6): Calculation of new information:
[0017] Step (2.7): Innovation covariance matrix:
[0018] Step (2.8): Calculation of attenuation factor:
[0019] Step (2.9): Kalman optimal gain: Where P xz is the covariance of state and observation errors, P zz is the observation error covariance.
[0020] Step (2.10): Measurement update: in and They represent the updated values of the state variables and the updated values of the error covariance of the measurement update respectively.
[0021] Furthermore, step (3) directly combines the sensors with the state variable update values and error covariance update values obtained in step (2) and uses distributed DDPM to perform second-stage filtering to process the relative measurement values. Different from the traditional two-stage algorithm, the present invention directly combines the information obtained from the sensors, eliminates the dependence on the estimated values in the first stage, and thus enhances the system's robustness; since the VPP is inevitably affected by non-Gaussian noise, the present invention uses DDPM to process the noise data; in addition, the present invention not only considers the mutual influence of each unit in each cluster of the VPP, but also considers the mutual influence between different clusters. In the second stage, the sensors are combined to collect relative measurement information related to the positioning target and its adjacent nodes, reducing the impact of heavy-tailed Gaussian noise. Establish a state space model of the relative measurement information provided by the sensor: And process it, the specific steps are as follows: represents the relative measurement value between the positioning target i and the adjacent target j at time k, represents the relative measurement matrix, is the covariance Non-Gaussian white noise. Noise.
[0022] Step (3.1): The relative measurement value can be simplified to: in for noise;
[0023] Step (3.2): For ease of processing, we will Rephrased as:
[0024] Step (3.3): The actual noise distribution of VPP is Since VPP not only affects each unit in each cluster, but also affects different clusters, it is necessary to calculate the joint posterior likelihood probability density function (PDF) To solve but The analytical solution of is too complicated, so the present invention adopts the variational Bayesian method for approximation: in They represent the ith photovoltaic unit, the ith conventional generator unit, the ith energy storage device and the ith wind turbine unit respectively. q(*) is the approximate posterior PDF.
[0025] Step (3.4): Approximate the posterior PDF of the photovoltaic field in the VPP using DDPM The solution process includes the forward process and the reverse process. First, the forward process of DDPM is performed, that is, the noise addition and diffusion process of the data is performed:
[0026] Step (3.4.1): The data distribution from the photovoltaic field is A forward Markov process generates a sequence of random variables and transfer nuclei Using the probability chain rule and Markov property, we can decompose the joint distribution conditional on x0 Recorded as and
[0027] Step (3.4.2): Convert the original data distribution to Gaussian distribution and design Gaussian transfer kernel have where β t ∈(0,1) is a hyperparameter chosen before model training.
[0028] Step (3.4.3): Definition Since the Gaussian transfer kernel allows marginalization of the joint distribution, we have
[0029] Step (3.4.4): Given By sampling the data with a Gaussian vector ∈ ~N(0,I) and applying the transformation A sample of:
[0030] Step (3.4.5): When When x PVe is almost Gaussian, so we have
[0031] Step (3.4.6): The reverse process of DDPM, that is, gradually removing the noise by running the learnable Markov chain in the opposite time direction;
[0032] Step (3.4.7): Because in the forward process Choosing a prior distribution Learnable transfer kernel The form is: where θ PV is the model parameter, the mean and variance Parameterized and learned by a deep neural network.
[0033] Step (3.4.8): According to step (3.4.7), the reverse Markov chain can be expressed as:
[0034] Step (3.4.9): There are sampling conditions, in order to train the reverse Markov chain to match the actual time reversal of the forward Markov chain, that is, adjust the parameter θ so that the reverse Markov chain The joint distribution and forward process of The joint distribution of is as close as possible, which is achieved by minimizing the Kullback-Leibler (KL) divergence between the two: Where (i) is the definition of KL divergence, (ii) is and The product of the distributions, (iii) can be obtained from Jensen's inequality.
[0035] Step (3.4.10): Since the goal of DDPM training is to maximize the variational lower bound (VLB) of the log-likelihood, -L VBL (x PV0 ) can be rewritten as: In the forward process, the approximate posterior q has no learnable parameters, so L E It is a constant during the training process and can be ignored.
[0036] Step (3.4.11): Design a specific parameterization:
[0037] Step (3.4.12): According to step (2.2.5), we can get: Select parameterization θ is a function approximator.
[0038] Step (3.4.13): Step (2.2.6) can be simplified to:
[0039] Step (3.4.14): To improve the sample quality, according to the gradient descent method:
[0040] Step (3.4.15): Return the final data value: in Come for sampling
[0041] Step (3.5): Thus, for the photovoltaic field posterior The posterior PDFs of other clusters in VPP can be obtained through the algorithm in step (3.4), which is: Therefore, the present invention uses Gaussian distribution to restore the non-Gaussian distribution existing in the real system noise;
[0042] Step (3.6): Use Gamma-PDF to correct the measurement noise covariance matrix. Residual calculation:
[0043] Step (3.7): Update Gamma-PDF parameters:
[0044] Step (3.8): Noise parameters:
[0045] Step (3.9): Corrected measurement noise covariance matrix:
[0046] Step (3.10): Relative Kalman gain:
[0047] Step (3.11): Updated values of state variables and covariance matrix at time k:
[0048] Aiming at distributed resources such as decentralized hydropower, wind power, photovoltaic power, and energy storage on the demand side, the present invention constructs a dynamic performance model of primary frequency modulation of the system based on the swing equation according to the primary frequency response model of the power system; Aiming at the accuracy and efficiency of inertia estimation of virtual power plants, the present invention proposes a virtual power plant inertia estimation algorithm based on two-stage distributed denoising, wherein the first stage uses an adaptive unscented Kalman filter to process the nonlinear frequency response model of the VPP, and the second stage uses a distributed DDPM algorithm to process the distributed non-Gaussian noise of the VPP. The distributed DDPM algorithm can effectively approximate the posterior probability distribution, thereby enhancing the stability and accuracy of the estimation. In summary, the algorithm not only significantly improves the reliability of the sampled data and the accuracy of the inertia estimation, but also effectively enhances the frequency stability of the power system. This study provides solid theoretical and technical support for the stable operation and optimization control of the new energy power system, and provides a useful reference for the future development of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the specific implementation of the present invention or the method of the prior art, the drawings required for use in the specific implementation or the prior art are briefly introduced below.
[0050] Figure 1 frequency control strategy framework for virtual power plants;
[0051] Figure 2 This is a flow chart of an inertia estimation algorithm for a virtual power plant based on two-stage distributed denoising;
[0052] Figure 3 A schematic diagram of a measurement device positioning target for a virtual power plant inertia estimation algorithm based on two-stage distributed denoising;
[0053] Figure 4 A diagram showing photovoltaic field data processing using a DDPM-based algorithm. DETAILED DESCRIPTION
[0055] The implementation of the present invention is described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only some cases of the present invention, not all cases. Other cases in which ordinary technicians in the field apply the design method of the present invention without creative work are within the scope of protection of the present invention.
[0056] Figure 1 The frequency control strategy framework of the virtual power plant is proposed. A dynamic frequency model with inertia characteristics is established for the virtual power plant based on the swing equation. The virtual power plant includes wind farms, photovoltaic farms, energy storage aggregation areas, conventional power plants and loads. The specific steps are as follows:
[0057] For virtual power plants including wind farms, photovoltaic farms, energy storage aggregation areas, traditional power systems and loads, a dynamic frequency response model with inertia characteristics is established based on the swing equation: Where H is the inertia time constant, Δf is the frequency change, ΔP is the power change, and ΔP = P PFC +P W +P PV +P BESS -ΔP tie -ΔP L , P PFC is the primary frequency regulation active power of the conventional power system, P W is the wind farm power, P PV is the power of the photovoltaic power plant, P BESS is the power of the energy storage aggregation area, ΔP L is the load change, ΔP tie represents the change in the total power of the tie line connecting area i to the adjacent area and has
[0058] like Figure 2 The figure shows a schematic diagram of the measuring device positioning target of a virtual power plant inertia estimation algorithm based on two-stage distributed denoising. The value of each cluster positioning target is selected according to the required measurement accuracy and measurement time.
[0059] like Figure 3 The figure shows a flow chart of a virtual power plant inertia estimation algorithm based on two-stage distributed denoising, including the first stage and the second stage. The green part is the first stage, and its steps are to filter the VPP dynamic frequency response model using an adaptive unscented Kalman filter algorithm to process the absolute measurement value. Assuming that the absolute measurement information is only affected by Gaussian white noise, since the VPP dynamic frequency response model is a nonlinear model, the system dynamic frequency model is converted into a discrete nonlinear state space equation: And the adaptive unscented Kalman filter algorithm is used for processing: where f(*) is the nonlinear system state function, ω i k is the system process noise, y i k is the observed value, h(*) is the nonlinear system observation function, Observe the noise of the system.
[0060] Step (2.1): Initialization: Where E[*] is the initialization equation,
[0061] Step (2.2): Calculate 2n+1 sigma points:
[0062] Step (2.3): Calculate the sigma point mean weighting and variance weighting: Among them, κ is an adjustable parameter used to improve the accuracy of nonlinear approximation; α is used to control the distribution state of sampling points, and β is a non-negative weight coefficient used to reduce the error of high-order terms.
[0063] Step (2.4): Time update: Update the nonlinear transformation sigma point:
[0064] Step (2.5): Forecast estimation: in is the state variable updated by time, is the error covariance matrix of the time update.
[0065] Step (2.6): Calculation of new information:
[0066] Step (2.7): Innovation covariance matrix:
[0067] Step (2.8): Calculation of attenuation factor:
[0068] Step (2.9): Kalman optimal gain: Where P xz is the covariance of state and observation errors, P zz is the observation error covariance.
[0069] Step (2.10): Measurement update: in and They represent the updated values of the state variables and the updated values of the error covariance of the measurement update respectively.
[0070] The blue part is the second stage, which is to directly combine the model obtained in step (2) with the sensor and use the distributed robust DDPM to perform the second stage filtering to process the relative measurement value. Establish a state space model containing the relative measurement information provided by the sensor: And process it, the specific steps are as follows: in represents the relative measurement value between the positioning target i and the adjacent target j at time k, represents the relative measurement matrix, is the covariance Non-Gaussian white noise. Noise.
[0071] Step (3.1): The relative measurement value can be simplified to: in for noise;
[0072] Step (3.2): For ease of processing, we will Rephrased as:
[0073] Step (3.3): The actual noise distribution of VPP is Since VPP not only affects each unit in each cluster, but also affects different clusters, it is necessary to calculate the joint posterior likelihood probability density function (PDF) To solve but The analytical solution of is too complicated, so the present invention adopts the variational Bayesian method for approximation: in They represent the ith photovoltaic unit, the ith conventional generator unit, the ith energy storage device and the ith wind turbine unit respectively. q(*) is the approximate posterior PDF.
[0074] Step (3.4): If Figure 4 The figure shows the process flow of DDPM for processing photovoltaic field data. The specific steps are shown in step (3.4). The solution process includes the forward process and the reverse process. First, the forward process of DDPM is performed, that is, the noise addition and diffusion process of the data is performed:
[0075] Step (3.4.1): The data distribution from the photovoltaic field is A forward Markov process generates a sequence of random variables and transfer nuclei Using the probability chain rule and Markov property, we can decompose the joint distribution conditional on x0 Recorded as and
[0076] Step (3.4.2): Convert the original data distribution to Gaussian distribution and design Gaussian transfer kernel have where β t ∈(0,1) is a hyperparameter chosen before model training.
[0077] Step (3.4.3): Define α t :=1-β t , Since the Gaussian transfer kernel allows marginalization of the joint distribution, we have
[0078] Step (3.4.4): Given By sampling the data with a Gaussian vector ∈ ~N(0,I) and applying the transformation A sample of:
[0079] Step (3.4.5): When hour, is almost Gaussian, so we have
[0080] Step (3.4.6): The reverse process of DDPM, that is, gradually removing the noise by running the learnable Markov chain in the opposite time direction;
[0081] Step (3.4.7): Because in the forward process Choosing a prior distribution Learnable transfer kernel The form is: where θ PV is the model parameter, the mean and variance Parameterized and learned by a deep neural network.
[0082] Step (3.4.8): According to step (3.4.7), the reverse Markov chain can be expressed as:
[0083] Step (3.4.9): There are sampling conditions, in order to train the reverse Markov chain to match the actual time reversal of the forward Markov chain, that is, adjust the parameter θ so that the reverse Markov chain The joint distribution and forward process of The joint distribution of is as close as possible, which is achieved by minimizing the Kullback-Leibler (KL) divergence between the two: Where (i) is the definition of KL divergence, (ii) is and The product of the distributions, (iii) can be obtained from Jensen's inequality.
[0084] Step (3.4.10): Since the goal of DDPM training is to maximize the variational lower bound (VLB) of the log-likelihood, -L VBL (x PV0 ) can be rewritten as: In the forward process, the approximate posterior q has no learnable parameters, so L E It is a constant during the training process and can be ignored.
[0085] Step (3.4.11): Design a specific parameterization:
[0086] Step (3.4.12): According to step (2.2.5), we can get: Select parameterization θ is a function approximator.
[0087] Step (3.4.13): Step (2.2.6) can be simplified to:
[0088] Step (3.4.14): To improve the sample quality, according to the gradient descent method:
[0089] Step (3.4.15): Return the final data value: in Come for sampling
[0090] Step (3.5): Thus, for the photovoltaic field posterior The posterior PDFs of other clusters in VPP can be obtained through the algorithm in step (3.4), which is: Therefore, the present invention uses Gaussian distribution to restore the non-Gaussian distribution existing in the real system noise;
[0091] Step (3.6): Use Gamma-PDF to correct the measurement noise covariance matrix. Residual calculation:
[0092] Step (3.7): Update Gamma-PDF parameters:
[0093] Step (3.8): Noise parameters:
[0094] Step (3.9): Corrected measurement noise covariance matrix:
[0095] Step (3.10): Relative Kalman gain:
[0096] Step (3.11): Updated values of state variables and covariance matrix at time k:
[0097] Aiming at distributed resources such as decentralized hydropower, wind power, photovoltaic power, and energy storage on the demand side, the present invention constructs a dynamic performance model of primary frequency modulation of the system based on the swing equation according to the primary frequency response model of the power system; Aiming at the accuracy and efficiency of inertia estimation of virtual power plants, the present invention proposes a virtual power plant inertia estimation algorithm based on two-stage distributed denoising, wherein the first stage uses an adaptive unscented Kalman filter to process the nonlinear frequency response model of the VPP, and the second stage uses a distributed DDPM algorithm to process the distributed non-Gaussian noise of the VPP. The distributed DDPM algorithm can effectively approximate the posterior probability distribution, thereby enhancing the stability and accuracy of the estimation. In summary, the algorithm not only significantly improves the reliability of the sampling data and the accuracy of the inertia estimation, but also effectively enhances the frequency stability of the power system. The present invention provides solid theoretical and technical support for the stable operation and optimal control of the new energy power system, provides a useful reference for the future development of the power system, and provides theoretical and technical support for the stable operation and optimal control of the virtual power plant.
[0098] The applicant of the present invention has described the specific implementation of the present invention in conjunction with the drawings of the specification. The technicians in the industry should understand that the above specific implementation and description are only to illustrate the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A virtual power plant inertia estimation algorithm based on two-stage distributed denoising, comprising the following steps: Step (1): Based on the swing equation, a dynamic frequency response model with inertia characteristics is established for the virtual power plant, where the virtual power plant includes a wind farm, a photovoltaic farm, an energy storage aggregation area, a conventional power plant, and a load; Step (2): the model derived in step (1) is subjected to first-stage filtering based on an adaptive unscented Kalman filter algorithm, thereby processing the absolute measurement value; Step (3): The model obtained in step (2) is directly combined with the sensor and the distributed DDPM is used for the second stage filtering to process the relative measurement values.
2. The virtual power plant inertia estimation algorithm based on two-stage distributed denoising according to claim 1 is characterized in that: Step (1) For a virtual power plant including a wind farm, a photovoltaic farm, an energy storage aggregation area, a traditional power system and a load, a dynamic frequency response model with inertia characteristics is established based on the swing equation: Where H is the inertia time constant, Δf is the frequency change, ΔP is the power change, and ΔP = P PFC +P W +P PV +P BESS -ΔP tie -ΔP L , P PFC is the primary frequency regulation active power of the conventional power system, P W is the wind farm power, P PV is the power of the photovoltaic power plant, P BESS is the power of the energy storage aggregation area, ΔP L is the load change, ΔP tie represents the change in the total power of the tie line connecting area i to the adjacent area and has 3. The virtual power plant inertia estimation algorithm based on two-stage distributed denoising according to claim 1 is characterized in that: Step (2) performs the first stage filtering based on the adaptive unscented Kalman filter algorithm on step (1) and the derived model, thereby processing the absolute measurement value. Assuming that the absolute measurement information is only affected by Gaussian white noise, since the system dynamic frequency model obtained in step (1) is a nonlinear model, the system dynamic frequency model is converted into a discrete nonlinear state space equation: And the adaptive unscented Kalman filter algorithm is used for processing: Where f(*) is the state function of the nonlinear system, ω i k is the system process noise, y i k is the observed value, h(*) is the nonlinear system observation function, Observe the noise of the system. Step (2.1): Initialization: Where E[*] is the initialization equation, Step (2.2): Calculate 2n+1 sigma points: Step (2.3): Calculate the sigma point mean weighting and variance weighting: Among them, κ is an adjustable parameter used to improve the accuracy of nonlinear approximation; α is used to control the distribution state of sampling points, and β is a non-negative weight coefficient used to reduce the error of high-order terms. Step (2.4): Time update: Update the nonlinear transformation sigma point: Step (2.5): Forecast estimation: in is the state variable updated by time, is the error covariance matrix of the time update. Step (2.6): Calculation of new information: Step (2.7): Innovation covariance matrix: Step (2.8): Calculation of attenuation factor: Step (2.9): Kalman optimal gain: Where P xz is the covariance of state and observation errors, P zz is the observation error covariance. Step (2.10): Measurement update: in and They represent the updated values of the measured state variables and error covariance, respectively.
4. The virtual power plant inertia estimation algorithm based on two-stage distributed denoising according to claim 1 is characterized in that: Step (3) directly combines the model obtained in step (2) with the sensor, and uses the distributed robust DDPM to perform the second stage filtering, thereby processing the relative measurement values. Different from the traditional two-stage algorithm, the present invention directly combines the information obtained from the sensor, eliminates the dependence on the estimated value of the first stage, and thus enhances the robustness of the system; since the VPP is inevitably affected by non-Gaussian noise, the present invention uses DDPM to process the noise data; in addition, the present invention not only considers the mutual influence of each unit in each cluster of the VPP, but also considers the mutual influence between different clusters. In the second stage, the relative measurement information related to the positioning target and its adjacent nodes is collected in combination with the sensor, reducing the influence of heavy-tailed Gaussian noise. Establish a state space model containing the relative measurement information provided by the sensor: And process it, the specific steps are as follows: in represents the relative measurement value between the positioning target i and the adjacent target j at time k, represents the relative measurement matrix, is the covariance Non-Gaussian white noise. Noise. Step (3.1): The relative measurement value can be simplified to: in for noise; Step (3.2): For ease of processing, we will Rephrased as: Step (3.3): The actual noise distribution of VPP is Since VPP not only affects each unit in each cluster, but also affects different clusters, it is necessary to calculate the joint posterior likelihood probability density function (DF). To solve but The analytical solution of is too complicated, so the present invention uses the variational Bayesian algorithm for approximation: in They represent the ith photovoltaic unit, the ith conventional generator unit, the ith energy storage device and the ith wind turbine unit respectively. q(*) is the approximate posterior PDF. Step (3.4): Approximate the posterior PDF of the photovoltaic field in the VPP using DDPM The solution process includes the forward process and the reverse process. First, the forward process of DDPM is performed, that is, the noise addition and diffusion process of the data is performed: Step (3.4.1): The data distribution obtained from the photovoltaic field mathematical model is A forward Markov process generates a sequence of random variables and transfer nuclei Using the probability chain rule and Markov property, we can decompose the joint distribution conditional on x0 Recorded as and Step (3.4.2): Convert the original data distribution to Gaussian distribution and design Gaussian transfer kernel have where β t ∈(0,1) is a hyperparameter chosen before model training. Step (3.4.3): Define α t :=1-β t , Since the Gaussian transfer kernel allows marginalization of the joint distribution, we have Step (3.4.4): Given By sampling the data with a Gaussian vector ∈ ~N(0,I) and applying the transformation A sample of: Step (3.4.5): When hour, is almost Gaussian, so we have Step (3.4.6): The reverse process of DDPM, that is, gradually removing the noise by running the learnable Markov chain in the opposite time direction; Step (3.4.7): Because in the forward process Choosing a prior distribution Learnable transfer kernel The form is: where θ PV is the model parameter, the mean and variance Parameterized and learned by a deep neural network. Step (3.4.8): According to step (2.1.7), the reverse Markov chain can be expressed as: Step (3.4.9): There are sampling conditions, in order to train the reverse Markov chain to match the actual time reversal of the forward Markov chain, that is, adjust the parameter θ so that the reverse Markov chain The joint distribution and forward process of The joint distribution of is as close as possible, which is achieved by minimizing the Kullback-Leibler (KL) divergence between the two: Where (i) is the definition of KL divergence, (ii) is and The product of the distributions, (iii) can be obtained from Jensen's inequality. Step (3.4.10): Since the goal of DDPM training is to maximize the variational lower bound (VLB) of the log-likelihood, Rewritten as: In the forward process, the approximate posterior q has no learnable parameters, so L E It is a constant during the training process and can be ignored. Step (3.4.11): Design a specific parameterization: where C is a constant that does not depend on θ. Step (3.4.12): According to step (2.2.5), we can get: Select parameterization ∈ θ is a function approximator. Step (3.4.13): Step (2.2.6) can be simplified to: Step (3.4.14): To improve the sample quality, according to the gradient descent method: Step (3.4.15): Return the final data value: in Come for sampling Step (3.5): Thus, for the photovoltaic field, its posterior PDF is The posterior PDFs of other clusters in VPP can be obtained through the algorithm in step (3.4), which is: Therefore, the present invention uses Gaussian distribution to restore the non-Gaussian distribution existing in the real system noise; Step (3.6): Use Gamma-PDF to correct the measurement noise covariance matrix. Residual calculation: Step (3.7): Update Gamma-PDF parameters: Step (3.8): Noise parameters: Step (3.9): Corrected measurement noise covariance matrix: Step (3.10): Relative Kalman gain: Step (3.11): Updated values of state variables and covariance matrix at time k:
