Dynamic harmonic estimation method based on particle filter
Through the dynamic harmonic estimation method based on particle filter, the error problem of the prior art when dealing with nonlinear and non-Gaussian noise in the power system is solved, and more accurate and real-time dynamic harmonic estimation is achieved.
Patent Information
- Application Number
- CN202411440859.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-25
AI Technical Summary
The existing dynamic harmonic estimation method has large errors when dealing with nonlinear and non-Gaussian noise in power systems and cannot effectively process time-varying noise and abnormal data, resulting in poor estimation accuracy.
Using a dynamic harmonic estimation method based on particle filter, nonlinear model state tracking of particle filter is designed, and the particle filtering algorithm is used to perform approximate Bayesian filtering in Monte Carlo simulation to adapt to nonlinear and non-Gaussian systems.
More real-time and accurate dynamic harmonic estimation is achieved, and time-varying noise and anomaly data can be effectively processed in nonlinear and non-Gaussian systems, improving the accuracy of the estimation.
Smart Images

Figure CN119510887A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of electric power technology, and in particular relates to a dynamic harmonic estimation method based on a particle filter. Background Art
[0002] Existing dynamic harmonic estimation methods mainly include Fourier transform, wavelet transform, Kalman filter and its variants such as unscented Kalman filter (UKF). These methods have their own advantages when dealing with harmonic problems in power systems, but they also have some common defects. First, the traditional Fourier transform cannot detect dynamic harmonics, and a time-varying detection method needs to be adopted. The Kalman filter is based on Gaussian distribution, and the error is large when detecting harmonics polluted by non-Gaussian noise. Secondly, for the interference of time-varying noise and abnormal data, the estimation accuracy of traditional methods such as UKF is poor, because they usually assume that the noise covariance is a constant and cannot adapt to the changes in noise characteristics in the actual environment. In addition, the power system is a time-varying nonlinear system, and the harmonics are also dynamically changing. The process noise variance and observation noise variance of the system are usually unknown and have strong uncertainty, which makes the filtering results easy to diverge and cannot obtain accurate estimation results. In order to solve the limitations of traditional power system state estimation methods in the face of complex, nonlinear and non-Gaussian characteristics, the present invention provides a dynamic harmonic estimation method based on particle filters. Summary of the invention
[0003] To solve the above problems, the purpose of the present invention is to disclose a dynamic harmonic estimation method based on a particle filter, which is implemented by adopting the following technical solutions.
[0004] The main parameters in this application are defined as follows: φ is the phase sequence, α is the harmonic amplitude, ω is the system angular frequency, θ is the phase angle, k is the sampling index, fs is the sampling frequency, m is the harmonic order, DC component m=0, fundamental component M=1, x k , is the state quantity of the system at time k, v k is the process noise of the system at time k, y k is the observed value of the system at time k, w k The measurement noise of the system at time k, x1,x2···x N is the sample particle, w k is the particle weight, and p is the probability density. A dynamic harmonic estimation method based on a particle filter, characterized by comprising the following steps: S1. Use voltage transformer and current transformer to collect voltage and current signals of distribution network; S2. Establish a nonlinear model of power grid harmonic signals taking into account frequency offset; S3. Design a nonlinear model state tracking based on particle filtering; S4. Dynamic harmonic estimation based on nonlinear model state tracking.
[0005] The above-mentioned dynamic harmonic estimation method based on particle filter is characterized in that step S1 specifically includes: connecting a current transformer in series in the distribution network, and connecting a voltage transformer in parallel to collect voltage and current signals, the voltage transformer reduces the voltage of the high-voltage power grid to a low voltage level suitable for measurement, and the current transformer is used to convert the large current in the high-voltage power grid into a small current signal, and then the signal conditioning circuit performs appropriate filtering and amplification processing to facilitate subsequent identification and analysis of the harmonic components therein.
[0006] The present invention makes full use of the characteristics of particle filtering, solves the limitations of traditional filtering methods when processing nonlinear and non-Gaussian systems, and provides more real-time and accurate dynamic harmonic estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 Flowchart of the dynamic harmonic estimation method based on particle filtering.
[0008] Figure 2 Particle filter tracking steady-state harmonic voltage signal amplitude and phase effect diagram.
[0009] Figure 3 Particle filter tracking dynamic harmonic voltage signal amplitude and phase effect diagram.
[0010] Figure 4 Particle filter tracking dynamic harmonic amplitude and phase effect during frequency offset. DETAILED DESCRIPTION
[0011] In order to enable those skilled in the art to better understand and implement this patent, the specific implementation methods of this application are now described in detail in conjunction with the drawings in the specification.
[0012] Please see Figures 1 to 4 , a dynamic harmonic estimation method based on particle filter, characterized by comprising the following steps: S1. Use voltage transformer and current transformer to collect voltage and current signals of distribution network; S2. Establish a nonlinear model of power grid harmonic signals taking into account frequency offset; S3. Design a nonlinear model state tracking based on particle filtering; S4. Dynamic harmonic estimation based on nonlinear model state tracking.
[0013] The above-mentioned dynamic harmonic estimation method based on particle filter is characterized in that step S1 specifically includes: connecting a current transformer in series in the distribution network, and connecting a voltage transformer in parallel to collect voltage and current signals, the voltage transformer reduces the voltage of the high-voltage power grid to a low voltage level suitable for measurement, and the current transformer is used to convert the large current in the high-voltage power grid into a small current signal, and then the signal conditioning circuit performs appropriate filtering and amplification processing to facilitate subsequent identification and analysis of the harmonic components therein.
[0014] The above-mentioned dynamic harmonic estimation method based on particle filter is characterized in that step S2 specifically includes: establishing a nonlinear model of power grid harmonic signals considering frequency offset, and the time domain expression of three-phase current is written as: Where α is the harmonic amplitude, ω is the system angular frequency, θ is the phase angle, k is the sampling index, fs is the sampling frequency, m is the harmonic order, the DC component m=0, and the fundamental component m=1; in order to estimate the amplitude and frequency of the harmonics, the following state variables are established: From this we can get: The sampling frequency is generally several thousand Hz, so the state transfer matrix F is approximately: The harmonic signal state equation is expressed as: The observation matrix H is: The state subspace expression of the particle filter of three-phase current can be formed by state variables, state transfer matrix and observation matrix: In the formula, x k ,v k ,y k ,w k They are the state quantity, process noise, observation value and measurement noise of the system at time k.
[0015] m is the order of the sine wave, and the 0th order of the sine wave is a constant, that is, direct current, which is a practice uniformly recognized in the industry.
[0016] The above-mentioned method for dynamic harmonic estimation based on particle filter is characterized in that step S3 specifically includes: designing a nonlinear model state tracking based on particle filter, particle filter is an approximate Bayesian filtering algorithm based on Monte Carlo simulation, and its main idea is to find a group of random sample particles propagating in the state space according to the empirical conditional distribution of the system state quantity, and then continuously change the weight and position of the particles according to the measurement to correct the initial empirical conditional distribution, which is essentially to approximate the probability density function of the system random variable with a discrete random measure composed of particles and their weights, so as to obtain the minimum variance estimate; The Monte Carlo method is also called random sampling or statistical empirical method. The idea of Monte Carlo sampling is to use the average value instead of the integral to find the expectation: Sampling a series of sample particles x1, x2···x from a target probability distribution p(x) N , the expected value of the function of the distribution can be estimated by using the Monte Carlo method; The basic principle of Bayesian filtering is to calculate the posterior probability based on the prior probability and the new observation data (likelihood function) to obtain the optimal state estimation. The Bayesian formula for a two-dimensional discrete random variable (X, Y) is: Where f X (x) is called the prior probability density, which means the probability density of the random variable X that can be obtained before this experiment or sampling based on previous experience and analysis; f Y|X (y|x) is called the likelihood probability density, which represents the probability density of the observed random variable Y taking the value of y under the condition that the state random variable X takes the value of x. The state is the cause and the observation is the effect, that is, the effect is inferred from the cause; f X|Y (x|y) is called the posterior probability density, which indicates the probability density of the state random variable X taking the value of x under the condition that the observed random variable Y takes the value of y. The state is the cause and the observation is the effect, that is, the cause is inferred from the effect. Bayesian filtering is actually a recursive Bayesian estimation. Each estimation must recursively obtain the probability density function through two steps of state prediction and update, and repeat the cycle. The specific implementation steps are as follows: (1) State prediction: First, the initial probability density function of the state is given as p(x0|y0)=p(x0), and the prior probability density function of the state at time k is predicted by the Bayesian formula as follows: p(x k |y 1:k-1 )=∫p(x k |x k-1 )p(x k-1 |y 1:k-1 )dx k-1(10) (2) Measurement update: After obtaining p(x k |y 1:k-1 ), the prior probability density is corrected using the new measurement value obtained at time k, and the posterior probability density function of the state at time k is obtained as follows: The normalization constant is obtained from the total probability formula p(y k |y 1:k-1 )=∫p(y k |x k )p(x k |y 1:k-1 )dx k (12) The posterior probability here will also be brought into the next prediction, forming a recursive process; The steps of the particle filter algorithm are as follows: (1) Initialization: Generate a set of random particles according to the probability density function p(x k-1 |y 1:k-1 ) is sampled and an initial weight is assigned to each particle; (2) Predict and update the state of each particle according to equations (10) and (11); (3) Select the importance density function as: (4) When new observation data arrives, calculate the weight for each particle: (5) Resample the particles based on the weights. Larger particles are more likely to be selected and replicated, while particles with smaller weights may be discarded. After resampling, the distribution of particles will be closer to the posterior probability distribution, and the effective number of particles Z can be approximately calculated. eff for: If Z eff >Z th (Z th is the effective sample number threshold, which is generally 2Z / 3, where Z is the number of sampled particles), then proceed to the next step, otherwise resample. This step does not directly update the probability density, but indirectly reflects the update of the probability density by selecting particles with larger weights. The probability density update formula is: From p(x k-1 |y 1:k-1 )Resample Z sample points Then the probability density is: Where, δ(·) is the Dirac function; (6) Using the resampled particle set to estimate the posterior distribution of the system state, the optimal estimate of the state quantity is: The variance is estimated as: (7) Take the updated particle set as the new input and repeat the prediction, update, resampling and state estimation steps until the state estimation of the system converges or reaches the predetermined number of iterations.
[0017] The above-mentioned dynamic harmonic estimation method based on particle filter is characterized in that step S4 specifically includes: using equation (2) and equation (5) to calculate the amplitude and phase of the mth harmonic: Specifically implement verification: Fundamental frequency f n =50Hz,ω n =2πf n , sampling frequency f s =6400, sampling time t = 0.1s, angular frequency of Nth harmonic ω N =Nω n ,The number of particle filter particles is 500.
[0018] (1) The expression of the steady-state harmonic voltage signal containing 1% noise is: Where μ(t) is 1% random noise, the amplitudes of the 5th, 7th, and 11th harmonics are 0.1pu, 0.05pu, and 0.02pu, respectively, and the phases are The particle filter tracks the amplitude and phase of the steady-state harmonic voltage signal. Figure 2 As shown, it can be seen that the particle filter can track the amplitude and phase of each harmonic more accurately, with estimated errors of 0.3% and 0.5% respectively.
[0019] (2) When the voltage amplitude is disturbed, a voltage sag occurs at 0.03s and lasts for about 0.03s. The dynamic harmonic voltage signal containing noise during the sag is expressed as follows: The particle filter tracks the amplitude and phase of the dynamic harmonic voltage signal. Figure 3As shown, it can be seen that when the fundamental amplitude is reduced to 0.5pu and the phase remains unchanged, the harmonic amplitude estimated by the particle filter also decreases accordingly. The particle filter can still accurately track the amplitude and phase of each harmonic, with estimation errors of 0.6% and 0.4% respectively.
[0020] (3) When the fundamental frequency f n When it changes to 49.5Hz, the harmonic frequencies ω n The particle filter tracks the amplitude and phase of the dynamic harmonic voltage signal. Figure 4 As shown, it can be seen that the particle filter can still track the amplitude and phase of each harmonic more accurately, with estimated errors of 0.3% and 0.8% respectively.
[0021] The present invention makes full use of the characteristics of particle filtering, solves the limitations of traditional filtering methods when processing nonlinear and non-Gaussian systems, and provides more real-time and accurate dynamic harmonic estimation. The above embodiments are only preferred technical solutions of the present invention and should not be regarded as limiting the present invention. The protection scope of the present invention shall be the technical solutions recorded in the claims, including the equivalent replacement solutions of the technical features in the technical solutions recorded in the claims. That is, equivalent replacement improvements within this scope are also within the protection scope of the present invention.
Claims
1. A dynamic harmonic estimation method based on particle filter, characterized in that The steps include: S1. Use voltage transformer and current transformer to collect voltage and current signals of distribution network; S2. Establish a nonlinear model of power grid harmonic signals taking into account frequency offset; S3. Design a nonlinear model state tracking based on particle filtering; S4. Dynamic harmonic estimation based on nonlinear model state tracking.
2. A dynamic harmonic estimation method based on particle filter according to claim 1, characterized in that Step S1 specifically includes: connecting a current transformer in series in the distribution network and a voltage transformer in parallel to collect voltage and current signals. The voltage transformer reduces the voltage of the high-voltage power grid to a low voltage level suitable for measurement. The current transformer is used to convert the large current in the high-voltage power grid into a small current signal, which is then properly filtered and amplified by a signal conditioning circuit to facilitate subsequent identification and analysis of the harmonic components therein.
3. A dynamic harmonic estimation method based on particle filter according to claim 1, characterized in that Step S2 specifically includes: establishing a nonlinear model of power grid harmonic signals taking into account frequency offset, and the time domain expression of the three-phase current is written as: Where φ is the phase sequence, α is the harmonic amplitude, ω is the system angular frequency, θ is the phase angle, k is the sampling index, fs is the sampling frequency, m is the harmonic order, the DC component m=0, and the fundamental component m=1; in order to estimate the amplitude and frequency of the harmonics, the following state variables are established: From this we can get: The sampling frequency is several thousand Hz, and the state transfer matrix F is approximately: The harmonic signal state equation is expressed as: The observation matrix H is: The state subspace expression of the particle filter for three-phase current can be formed by the state variables, state transfer matrix and observation matrix: In the formula, x k ,v k ,y k ,w k They are the state quantity, process noise, observation value and measurement noise of the system at time k.
4. A dynamic harmonic estimation method based on particle filter according to claim 1, characterized in that Step S3 specifically includes: designing a nonlinear model state tracking based on particle filtering. Particle filtering is an approximate Bayesian filtering algorithm based on Monte Carlo simulation. Its main idea is to find a group of random sample particles propagating in the state space according to the empirical conditional distribution of the system state quantity, and then continuously change the weight and position of the particles according to the measurement to correct the initial empirical conditional distribution. In essence, it is to use discrete random measures composed of particles and their weights to approximate the probability density function of the system random variables, so as to obtain the minimum variance estimate; The Monte Carlo method is also called random sampling or statistical empirical method. The idea of Monte Carlo sampling is to use the average value instead of the integral to find the expectation E: Sampling a series of sample particles x1, x2···x from a target probability distribution p(x) N , the expected value of the function of the distribution is estimated by using the Monte Carlo method; The basic principle of Bayesian filtering is to calculate the posterior probability based on the prior probability and the new observation data to obtain the optimal state estimation. The Bayesian formula for a two-dimensional discrete random variable (X, Y) is: Where f X (x) is called the prior probability density, which means the probability density of the random variable X obtained before this experiment or sampling based on previous experience and analysis; f Y|X (y|x) is called the likelihood probability density, which represents the probability density of the observed random variable Y taking the value of y under the condition that the state random variable X takes the value of x. The state is the cause and the observation is the effect, that is, the effect is inferred from the cause; f X|Y (x|y) is called the posterior probability density, which indicates the probability density of the state random variable X taking the value of x under the condition that the observed random variable Y takes the value of y. The state is the cause and the observation is the effect, that is, the cause is inferred from the effect. Bayesian filtering is actually a recursive Bayesian estimation. Each estimation must recursively obtain the probability density function through two steps of state prediction and update, and repeat the cycle. The specific implementation steps are as follows: (1) State prediction: First, the initial probability density function of the state is given as p(x0|y0)=p(x0), and the prior probability density function of the state at time k is predicted by the Bayesian formula as follows: p(x k |y 1:k-1 )=∫p(x k |x k-1 )p(x k-1 |y 1:k-1 )dx k-1 (10) (2) Measurement update: After obtaining p(x k |y 1:k-1 ), the prior probability density is corrected using the new measurement value obtained at time k, and the posterior probability density function of the state at time k is obtained as follows: The normalization constant is obtained from the total probability formula p(y k |y 1:k-1 )=∫p(y k |x k )p(x k |y 1:k-1 )dx k (12) The posterior probability here will also be brought into the next prediction, forming a recursive process; The steps of the particle filter algorithm are as follows: (1) Initialization: Generate a set of random particles according to the probability density function p(x k-1 |y 1:k-1 ) is sampled and an initial weight is assigned to each particle; (2) Predict and update the state of each particle according to equations (10) and (11); (3) Select the importance density function as: (4) When new observation data arrives, calculate the weight for each particle: (5) Resample the particles based on the weights. Larger particles are more likely to be selected and replicated, while particles with smaller weights may be discarded. After resampling, the distribution of particles will be closer to the posterior probability distribution, and the effective number of particles Z can be approximately calculated. eff for: If Z eff >Z th ,Z th is the effective sample number threshold, which is 2Z / 3, and Z is the number of sampled particles. Then proceed to the next step, otherwise resample. This step does not directly update the probability density, but indirectly reflects the update of the probability density by selecting particles with larger weights. The probability density update formula is: From p(x k-1 |y 1:k-1 )Resample Z sample points Then the probability density is: Where, δ(·) is the Dirac function; (6) Using the resampled particle set to estimate the posterior distribution of the system state, the optimal estimate of the state quantity is: The variance is estimated as: (7) Take the updated particle set as the new input and repeat the prediction, update, resampling and state estimation steps until the state estimation of the system converges or reaches the predetermined number of iterations.
5. A particle filter-based dynamic harmonic estimation method according to claim 3, characterized in that Step S4 specifically includes: using equation (2) and equation (5) to calculate the amplitude and phase of the mth harmonic:
Citation Information
Cited By
Data processing method for intelligent mutual inductor
CN120703453A