New virtual power plant inertia estimation method for relay and sensor safety communication

Through a two-stage distributed denoising diffusion model and an adaptive trackless Kalman filtering non-linear frequency response model of virtual power plants, combined with the improved ElGamal encryption algorithm, the problems of insufficient inertia estimation accuracy and sensor data security in virtual power plants are solved. Improves frequency stability and data security of the power system.

CN118920438APending Publication Date: 2024-11-08NORTH CHINA ELECTRIC POWER UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410594239.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-14
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In virtual power plants, the intermittent and volatility of distributed energy resources lead to fluctuations in the power grid frequency, affecting dynamic performance and stability. The existing inertia estimation methods have problems of insufficient accuracy and low computing efficiency, and the secure communication of sensor data is not in place. Risk of authorized access and tampering.

Method used

Using two-stage distributed denoising and diffusion model (DDPM) combined with adaptive traceless Kalman filtering, the nonlinear frequency response model and distributed non-Gaussian noise are processed, and an improved ElGamal encryption algorithm is added to enhance the security of virtual power grid information interaction. With privacy, the covariance matrix of estimation errors between sensors is assisted by fusion weights.

Benefits of technology

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 the safety of sensor communication, and provides the theory of stable operation and optimization control of virtual power plants. support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118920438A_ABST
    Figure CN118920438A_ABST
Patent Text Reader

Abstract

The invention relates to a novel virtual power plant inertia estimation method for relay and sensor safety communication. The invention provides a new method for estimating the inertia of a virtual power plant (VPP), and belongs to the field of power systems. Firstly, a VPP concept is introduced, and a power system frequency response model is established. The method comprises two stages: in the first stage, the nonlinearity of a VPP frequency response model is processed by using adaptive unscented Kalman filtering; in the second stage, a distributed de-noising diffusion model (DDPM) is utilized to process non-Gaussian noise, so that the estimation accuracy is improved. In order to guarantee the security of communication between the sensors, an improved ElGamal encryption algorithm is also introduced, and a covariance matrix of an estimation error between the sensors is calculated by fusing weights, so that the security, privacy and fusion of communication are ensured. The research provides theoretical and technical support for stable operation and optimal control of the VPP.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field The invention belongs to the field of electric power systems, and in particular relates to a new method for estimating inertia of a virtual power plant based on secure sensor communication. Background Art

[0001] my country is promoting the rapid evolution of the power system to adapt to large-scale and high-proportion renewable energy sources (RESs). In the future, the power system will face the challenge of large-scale grid connection of distributed resources (DERs) such as distributed wind power, photovoltaics, and energy storage on the demand side, which will lead to complex power system structure, diversified equipment, and complex technology. However, the access of large-scale intermittent renewable energy will increase the difficulty of the power system to maintain supply balance because uncertainty will be transmitted to the main power grid. Therefore, based on the existing research on distributed energy and microgrids, researchers proposed the virtual power plant (VPP) technology to balance the intermittency and volatility of the power generation side and the power consumption side.

[0002] In the context of virtual power plants (VPPs), the present invention aims to explore an innovative energy management system that achieves effective integration and management of distributed energy resources (DERs) through technical means. The core function of VPPs is to optimize and regulate DERs, such as distributed generation sources, adjustable loads, and energy storage devices, in an integrated manner. Through this integrated management, the impact of direct access of DERs to the grid can be mitigated, while promoting the complementarity between different energy sources to adapt to the rapid changes in the electricity market. However, the large number of asynchronous power generation units included in VPPs may reduce the overall inertia of the system, which may lead to large fluctuations in the grid frequency, thereby threatening the dynamic performance and stability of the grid. To address this problem, the present invention proposes an accurate and effective inertia estimation method, which is designed specifically for VPPs to assist system operators in achieving better results in planning, monitoring, and control.

[0003] In the field of power system research, inertia estimation has attracted much attention as an important means to analyze the dynamic characteristics of the system. Inertia estimation mainly includes two key 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, particle filters are suitable for state estimation of nonlinear and non-Gaussian systems through random sampling and weight update; while Kalman filters can achieve dynamic estimation of system states through recursive prediction and update steps. However, although these algorithms have achieved certain results in specific scenarios, they still face multiple challenges. Future power systems, especially virtual power plants (VPPs) containing a large number of distributed energy resources (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 method faces problems such as insufficient samples and sample inertia calculation. In summary, combining the inertia characterization model and making full use of the system's multi-source data to evaluate inertia is an idea worth exploring.

[0004] In VPP, sensor networks play a key role in monitoring and collecting data from distributed energy resources (DERs). Security algorithms between sensors are designed to ensure that sensor data is not subject to unauthorized access or tampering during transmission and storage, while protecting the privacy of users. Using security algorithms to encrypt and authenticate communication and data transmission between sensors can effectively protect the data privacy of DERs and prevent malicious attackers from obtaining sensitive information or tampering with the data. In addition, security algorithms can also ensure the stability and reliability of the VPP system and prevent system failures or instability caused by data leakage or tampering. Therefore, it is very necessary to use security algorithms between VPP sensors, which can protect the data privacy of DERs, prevent unauthorized access and tampering, and ensure the safe operation of the VPP system. This is of great significance for maintaining the stability of the energy system and user privacy.

[0005] The present invention adopts a two-stage distributed denoising diffusion model (Denoising Diffusion Probabilistic Models, DDPMs) to perform hierarchical processing on VPP processing. In the first stage, data processing is performed on the overall nonlinear VPP model, and in the second stage, processing is performed only on local measurements and data from adjacent nodes. In addition, not only the connection between different sites and the impact of the non-Gaussian noise on the system inertia estimation are considered, but also the secure communication and data fusion issues between VPP sensors are considered. An improved ElGamal encryption algorithm is added to enhance the security and privacy of virtual power grid information interaction, and the covariance matrix of the estimation error between sensors is assisted by the fusion weights. Summary of the invention

[0006] The present invention provides a new method for estimating the inertia of a virtual power plant following sensor secure communication, and belongs to the field of power systems. First, the concept of a virtual power plant (VPP) is introduced for new energy systems such as photovoltaic power plants, wind farms, energy storage aggregation areas and conventional power plants. Then, a 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 existing problems of insufficient accuracy and low computational efficiency, the present invention proposes a parameter estimation algorithm for a new method for estimating the inertia of a virtual power plant following sensor secure communication, wherein an adaptive unscented Kalman filter is used in the first stage to process the nonlinear frequency response model of the VPP, and a distributed DDPM algorithm is used in the second stage to process the distributed non-Gaussian noise of the VPP, which not only realizes the accurate evaluation of the inertia of the virtual power plant; an improved ElGamal encryption algorithm is added to the communication of the sensor, which enhances the security and privacy of the virtual power grid information interaction. The algorithm not only improves the reliability of the sampled data, the accuracy of the inertia estimation, and suppresses the influence of the distributed non-Gaussian noise that is ubiquitous in the VPP, but also effectively enhances the frequency stability of the power system. This study provides theoretical and technical support for the stable operation and optimal control of virtual power plants.

[0007] In order to achieve the above purpose, a virtual power plant safety inertia estimation method based on sensor safety communication is proposed. The specific steps are as follows:

[0008] 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;

[0009] 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;

[0010] 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. The improved ElGamal encryption algorithm is added between the sensor communications, and the covariance matrix of the estimation error between the sensors is assisted by the fusion weights, so as to process the relative measurement values.

[0011] 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 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

[0012] 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.

[0013] Step (2.1): Initialization: Where E[*] is the initialization equation,

[0014] Step (2.2): Calculate 2n+1 sigma points:

[0015] 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.

[0016] Step (2.4): Time update: Update the nonlinear transformation sigma point:

[0017] Step (2.5): Forecast estimation: in is the state variable updated by time, is the error covariance matrix of the time update.

[0018] Step (2.6): Calculation of new information:

[0019] Step (2.7): Innovation covariance matrix:

[0020] Step (2.8): Calculation of attenuation factor:

[0021] Step (2.9): Kalman optimal gain: Where P xz is the covariance of state and observation errors, P zz is the observation error covariance.

[0022] 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.

[0023] Furthermore, step (3) directly combines the state variable update value and the error covariance update value obtained in step (2) with the sensor, and uses the distributed DDPM to perform the second stage filtering, thereby processing the relative measurement value. 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 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 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. Since malicious eavesdroppers can steal the transmitted data to obtain private data during the communication interaction between different sensors, the improved ElGamal encryption algorithm is added to enhance the security and privacy of the virtual power grid information interaction, and the covariance matrix of the estimated error between sensors is assisted by the fusion weight to process the relative measurement value. Establish a state space model of 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.

[0024] Step (3.1): The relative measurement value can be simplified to: in for noise;

[0025] Step (3.2): In order to enhance the security of communication between sensors, the improved ElGamal encryption algorithm is added. First, generate a key, select a prime number q and its prime root g in a finite field, and then select a random integer S, and and make in is the public key and S is the private key.

[0026] Step (3.2.1): Encryption process: First, the sender obtains the public key Choose a suitable positive integer G so that Divide the message C into several integers: {C1,C2,...,C l ,...}; in is plain text, 1≤C l <q.

[0027] Step (3.2.2): Choose a random integer R l , and also 1≤R l <q, let

[0028] Step (3.2.3): For each C l Encrypted to ciphertext in

[0029] Step (3.2.4): Decryption process: The receiver receives the ciphertext Using private key S, Decryption Then through Decryption C l ; in and

[0030] Step (3.2.5): Then integrate the sequence {C1, C2, ..., C l ,...}decode C;

[0031] Step (3.2.6): By calculating Get the output;

[0032] Step (3.2.7): Get the encrypted measurement information and Rephrased as:

[0033] 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.

[0034] 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:

[0035] 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

[0036] 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.

[0037] Step (3.4.3): Define α t :=1-β t , Since the Gaussian transfer kernel allows marginalization of the joint distribution, we have

[0038] Step (3.4.4): Given x PV0 , obtained by sampling the data with a Gaussian vector ∈~N(0,I) and applying the transformation A sample of:

[0039] Step (3.4.5): When hour, is almost Gaussian, so we have

[0040] 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;

[0041] 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.

[0042] Step (3.4.8): According to step (3.4.7), the reverse Markov chain can be expressed as:

[0043] 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.

[0044] 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.

[0045] Step (3.4.11): Design a specific parameterization:

[0046] Step (3.4.12): According to step (3.4.11), we can get: Select parameterization ∈ θ is a function approximator.

[0047] Step (3.4.13): Step (3.4.12) can be simplified to:

[0048] Step (3.4.14): To improve the sample quality, according to the gradient descent method:

[0049] Step (3.4.15): Return the final data value: in Come for sampling

[0050] 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;

[0051] Step (3.6): Use Gamma-PDF to correct the measurement noise covariance matrix. Residual calculation:

[0052] Step (3.7): Update Gamma-PDF parameters:

[0053] Step (3.8): Noise parameters:

[0054] Step (3.9): Corrected measurement noise covariance matrix:

[0055] Step (3.10): Relative Kalman gain:

[0056] Step (3.11): Updated values ​​of state variables and covariance matrix at time k:

[0057] Step (3.12): In the distributed algorithm, the data communication between the sensor and the neighboring sensors is preferably secure communication and the covariance matrix of the estimation error between them can be assisted by the fusion weight. Let the sensor number be j, and j≠i, and let the adaptive fusion weight be: The binary variable Used to model packet loss.

[0058] Step (3.13): Sensor j sends Data to sensor i, where Safely transferred via step (3.2).

[0059] Step (3.14): Data fusion: in and hour Indicates packet loss. hour This ensures the stability of each filter in the distributed Kalman filter under network connectivity and global observability.

[0060] Aiming at distributed resources such as distributed hydropower, wind power, photovoltaic, 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 the safety inertia estimation of the virtual power plant, the present invention proposes a new method for inertia estimation of the virtual power plant following the sensor safety communication, 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. The improved ElGamal encryption algorithm is added between the VPP sensor communications to enhance the security and privacy of the communications. In summary, the algorithm not only significantly improves the reliability of the sampled data and the accuracy of the inertia estimation, effectively enhances the frequency stability of the power system, but also ensures the safe communication of the VPP. 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

[0061] 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.

[0062] Figure 1 This is the framework diagram of the virtual power plant;

[0063] Figure 2 A schematic diagram of a measuring device positioning target for a new method of virtual power plant inertia estimation following sensor secure communication;

[0064] Figure 3 A flow chart of a new method for estimating inertia of a virtual power plant with sensor secure communication;

[0065] Figure 4 A diagram showing photovoltaic field data processing using a DDPM-based algorithm. DETAILED DESCRIPTION

[0067] The following is a detailed description of the implementation of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only some of the cases of the present invention, not all of them. 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.

[0068] Figure 1 This is a framework diagram of a virtual power plant. Based on the swing equation, a dynamic frequency model with inertia characteristics is established for the virtual power plant. The virtual power plant includes wind farms, photovoltaic farms, energy storage aggregation areas, conventional power plants, and loads. The specific steps are as follows:

[0069] 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

[0070] like Figure 2 Shown is a schematic diagram of a measuring device positioning target of a new method for inertia estimation of a virtual power plant based on secure sensor communication. The value of each cluster positioning target is selected based on the required measurement accuracy and measurement time.

[0071] like Figure 3 The figure shows a new method for estimating the inertia of a virtual power plant with sensor safety communication, which includes the first stage and the second stage. The left part is the first stage, and the 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.

[0072] Step (2.1): Initialization: Where E[*] is the initialization equation,

[0073] Step (2.2): Calculate 2n+1 sigma points:

[0074] 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.

[0075] Step (2.4): Time update: Update the nonlinear transformation sigma point:

[0076] Step (2.5): Forecast estimation: in is the state variable updated by time, is the error covariance matrix of the time update.

[0077] Step (2.6): Calculation of new information:

[0078] Step (2.7): Innovation covariance matrix:

[0079] Step (2.8): Calculation of attenuation factor:

[0080] Step (2.9): Kalman optimal gain: Where P xz is the covariance of state and observation errors, P zz is the observation error covariance.

[0081] 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.

[0082] The right part is the second stage, which is to directly combine the model obtained in step (2) with the sensor, use the distributed robust DDPM for the second stage filtering, and add the improved ElGamal encryption algorithm to the sensor communication, and use the fusion weights to assist in calculating the covariance matrix of the estimation error between sensors, so as 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.

[0083] Step (3.1): The relative measurement value can be simplified to: in for noise;

[0084] Step (3.2): In order to enhance the security of communication between sensors, the improved ElGamal encryption algorithm is added. First, generate a key, select a prime number q and its prime root g in a finite field, and then select a random integer S, and and make in is the public key and S is the private key.

[0085] Step (3.2.1): Encryption process: First, the sender obtains the public key Choose a suitable positive integer G so that Divide the message C into several integers: {C1,C2,…,C l ,…}; in is plain text, 1≤C l <q.

[0086] Step (3.2.2): Choose a random integer R l , and also 1≤R l <q, let

[0087] Step (3.2.3): For each C l Encrypted to ciphertext in

[0088] Step (3.2.4): Decryption process: The receiver receives the ciphertext Using private key S, Decryption Then through Decryption C l ; in and

[0089] Step (3.2.5): Then integrate the sequence {C1, C2, ..., C l ,...}decode C;

[0090] Step (3.2.6): By calculating Get the output;

[0091] Step (3.2.7): Get the encrypted measurement information and Rephrased as:

[0092] 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.

[0093] 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:

[0094] 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

[0095] 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.

[0096] Step (3.4.3): Define α t :=1-β t , Since the Gaussian transfer kernel allows marginalization of the joint distribution, we have

[0097] Step (3.4.4): Given By sampling the data with a Gaussian vector ∈ ~N(0,I) and applying the transformation A sample of:

[0098] Step (3.4.5): When hour, is almost Gaussian, so we have

[0099] 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;

[0100] 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.

[0101] Step (3.4.8): According to step (3.4.7), the reverse Markov chain can be expressed as:

[0102] 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.

[0103] 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.

[0104] Step (3.4.11): Design a specific parameterization:

[0105] Step (3.4.12): According to step (3.4.11), we can get: Select parameterization ∈ θ is a function approximator.

[0106] Step (3.4.13): Step (3.4.12) can be simplified to:

[0107] Step (3.4.14): To improve the sample quality, according to the gradient descent method:

[0108] Step (3.4.15): Return the final data value: in Come for sampling

[0109] 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;

[0110] Step (3.6): Use Gamma-PDF to correct the measurement noise covariance matrix. Residual calculation:

[0111] Step (3.7): Update Gamma-PDF parameters:

[0112] Step (3.8): Noise parameters:

[0113] Step (3.9): Corrected measurement noise covariance matrix:

[0114] Step (3.10): Relative Kalman gain:

[0115] Step (3.11): Updated values ​​of state variables and covariance matrix at time k:

[0116] Step (3.12): In the distributed algorithm, the data communication between the sensor and the neighboring sensors is preferably secure communication and the covariance matrix of the estimation error between them can be assisted by the fusion weight. Let the sensor number be j, and j≠i, and let the adaptive fusion weight be: The binary variable Used to model packet loss.

[0117] Step (3.13): Sensor j sends Data to sensor i, where Safely transferred via step (3.2).

[0118] Step (3.14): Data fusion: in and hour Indicates packet loss. hour This ensures the stability of each filter in the distributed Kalman filter under network connectivity and global observability.

[0119] like Figure 4 The figure shows the flow chart of DDPM processing photovoltaic field data, and the specific steps are shown in step (3.4).

[0120] Aiming at distributed resources such as distributed hydropower, wind power, photovoltaic, 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 the virtual power plant safety inertia estimation, the present invention proposes a new method for virtual power plant inertia estimation following sensor safety communication, 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, and the improved ElGamal encryption algorithm can ensure secure communication between sensors. In summary, the algorithm not only significantly improves the reliability of sampled data, the accuracy of inertia estimation, the security, privacy and integration of sensor communication, 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 new energy power systems, provides a useful reference for the future development of power systems, and provides theoretical and technical support for the stable operation and optimal control of virtual power plants.

[0121] 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 new method for estimating inertia of a virtual power plant based on secure sensor communication, comprising the following steps: Step (1): Based on the swing equation, a dynamic frequency model with inertia characteristics is established for the virtual power plant, which 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): 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. The improved ElGamal encryption algorithm is added between the sensor communications, and the covariance matrix of the estimation error between the sensors is assisted by the fusion weights, so as to process the relative measurement values.

2. According to claim 1, a new method for estimating inertia of a virtual power plant relayed with sensor secure communication 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. According to claim 1, a new method for estimating inertia of a virtual power plant relayed with sensor secure communication 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. According to a new method for estimating inertia of a virtual power plant with relay sensor secure communication according to claim 1, it is characterized in that: Step (3) directly combines the state variable update value and the error covariance update value obtained in step (2) with the sensor, and uses the distributed DDPM to perform the second stage filtering, so as to process the relative measurement value. 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 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 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. Since malicious eavesdroppers can steal the transmitted data to obtain privacy data during the communication interaction between different sensors, an improved ElGamal encryption algorithm is added to enhance the security and privacy of virtual power grid information interaction. Establish a state space model of 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. Step (3.1): The relative measurement value can be simplified to: in for noise; Step (3.2): In order to enhance the security of communication between sensors, the improved ElGamal encryption algorithm is added. First, generate a key, select a prime number q and its prime root g in a finite field, and then select a random integer S, and and make in is the public key and S is the private key. Step (3.2.1): Encryption process: First, the sender obtains the public key Choose a suitable positive integer G so that Divide the message C into several integers: {C1,C2,...,C l ,...}; in is plain text, 1≤C l <q. Step (3.2.2): Choose a random integer R l , and also 1≤R l <q, let (modq); Step (3.2.3): For each C l Encrypted to ciphertext in Step (3.2.4): Decryption process: The receiver receives the ciphertext Using private key S, Decryption Then through Decryption C l ;in and Step (3.2.5): Then integrate the sequence {C1, C2, ..., C l ,...}decode C; Step (3.2.6): By calculating Get the output; Step (3.2.7): Get the encrypted measurement information and 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 (3.4.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 (3.4.11), we can get: Select parameterization ∈ θ is a function approximator. Step (3.4.13): Step (3.4.12) 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, the 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; 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: Step (3.12): In the distributed algorithm, the data communication between the sensor and the neighboring sensors is preferably secure communication and the covariance matrix of the estimation error between them can be assisted by the fusion weight. Let the sensor number be j, and j≠i, and let the adaptive fusion weight be: The binary variable Used to model packet loss. Step (3.13): Sensor j sends Data to sensor i, where Safely transferred via step (3.2). Step (3.14): Data fusion: in and hour Indicates packet loss. hour This ensures the stability of each filter in the distributed Kalman filter under network connectivity and global observability.

Citation Information

Cited By

  • Scheduling method for virtual power plant participating in inertia and standby market

    CN119154284A

  • A dispatching method for virtual power plants to participate in inertia and reserve markets

    CN119154284B

  • Virtual power plant frequency modulation information physical integrated design method under diversified communication problem

    CN119154521A