Electric energy quality disturbance detection algorithm based on IGWO-VMD-DWT
By combining the improved gray wolf optimization algorithm, variational mode decomposition and discrete wavelet algorithm, a new intelligent algorithm for power quality disturbance detection is proposed, which solves the problems of low detection accuracy and high noise impact in the existing technology, and realizes high-precision and fast power quality disturbance detection.
Patent Information
- Application Number
- CN202411951511.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art is difficult to quickly, accurately and effectively detect complex power quality disturbances in the power grid, especially due to the non-stationarity of the power grid information, which leads to spectrum leakage and fence effect, which affects the detection accuracy.
A power quality perturbation detection algorithm based on improved gray wolf optimization algorithm (IGWO) and variational modal decomposition (VMD) combined with discrete wavelet algorithm (DWT) is proposed. The components of the inherent modal function are extracted through IGWO optimization VMD algorithm, and the components are time-frequency analysis is used to reduce noise, extract frequency and amplitude characteristics.
This algorithm can adapt to various disturbance harmonic combinations, extract key components of the signal, realize high-precision power quality disturbance detection, reduce noise, and improve detection speed.
Smart Images

Figure CN119884720A_ABST
Abstract
Description
Background Art
[0002] In recent years, with the gradual popularization of renewable energy, power quality disturbances have become more prominent with the penetration of renewable energy. Power quality disturbances mainly come from the extensive use of high-power, nonlinear, and unbalanced loads. The high proportion of power electronic equipment contained in renewable energy also causes a certain degree of pollution to the power grid. These disturbance sources can cause a series of power quality problems such as harmonics, interharmonics, three-phase imbalance, voltage fluctuations and flickers, voltage drops and short-term interruptions. As power quality problems become more and more complex, traditional comprehensive power quality assessment methods cannot be applied to increasingly complex power systems. Fast, accurate, and effective new detection methods for power quality disturbances are increasingly valued in the industry.
[0003] Harmonics are an important source of disturbance in power quality. With the application of high-power power devices, especially converters, the harmonics flowing into the power grid system have increased dramatically, becoming a research hotspot in the field of power quality disturbance detection at home and abroad. The general harmonic detection algorithm is fast Fourier transform, which is simple to implement, stable and practical. However, due to the non-stationarity of power grid information, it is difficult to achieve full-cycle sampling and strict synchronous sampling cannot be performed. Therefore, the algorithm will have problems of spectrum leakage and fence effect, which seriously affects the detection accuracy. Therefore, it is necessary to propose a power quality disturbance detection algorithm based on IGWO-VMD-DWT to solve the problems in the background technology. Summary of the invention
[0004] The main purpose of the present invention is to provide a power quality disturbance detection algorithm based on IGWO-VMD-DWT to effectively solve the above problems mentioned in the background technology.
[0005] The technical solution of the present invention is as follows:
[0006] A power quality disturbance detection algorithm based on IGWO-VMD-DWT is proposed. The method includes the following steps:
[0007] S1. Decomposing the intrinsic mode function in the variational mode decomposition algorithm;
[0008] S2, using the improved grey wolf optimization algorithm to optimize the decomposition number k and penalty factor a of the intrinsic mode function;
[0009] S3. Decompose the characteristic signal containing harmonics into k intrinsic mode function components and use discrete wavelet algorithm to perform time-frequency analysis on the k intrinsic mode function components.
[0010] A further improvement of the present invention is that S1 comprises the following specific steps:
[0011] S11, define the expression of the intrinsic mode function in the variational mode decomposition algorithm, the expression is specifically: k (t) = A k (t)cos(φ k (t)); where k is the number of intrinsic mode functions, k = {1, 2, ···, k}; u k (t) is the kth intrinsic mode function; A k (t) is the instantaneous full amplitude of the kth intrinsic mode function; φ k (t) is the instantaneous phase of the kth intrinsic mode function;
[0012] S12. Construct a constrained variational problem, wherein the specific expression of the constrained variational problem is:
[0013]
[0014] In the formula, is the partial derivative with respect to time; ω k for u k The center frequency of ; δ(t) is the Dirac delta function; (δ(t)+j / (πt)) is the Hilbert transform;
[0015] S13, introduce the penalty factor a and the Lagrange multiplication operator λ, and use the Lagrange multiplier method to transform the expression in S12 into an equivalent unconstrained variational problem. The specific expression is:
[0016]
[0017] S14. Use the alternating direction multiplier method to solve the function equation, iterate and update each parameter, and obtain the optimal solution of the variational problem, which is expressed as:
[0018]
[0019] Where ω is the given frequency; step length τ>0; is the Fourier transform of the corresponding function.
[0020] A further improvement of the present invention is that the improved grey wolf optimization algorithm in S2 includes three stages: initialization, movement and selection update.
[0021] A further improvement of the present invention is that the initialization phase is consistent with the initial algorithm, and N wolves are randomly distributed in a given range of the search space [l i ,l j ]Inside.
[0022] A further improvement of the present invention is that the moving stage is divided into two parts. The first part is to calculate the new position vector X of the gray wolf according to the initial algorithm. IGWO(t+1); The second part is the DLH search strategy position vector. First, according to the expression R i (t)=||X i (t)-X IGWO (t+1)||, calculate the current position vector X i (t) and X IGWO The Euclidean distance R between (t+1) i (t), and then by the expression N i (t) = D i (X i (t),X j (t))≤R i (t) Construct a i (t) is the radius of the neighborhood, and then through the expression X IDLH (t+1)=X i (t)+rand(X n (t)-X r (t)) Carry out DLH strategy.
[0023] A further improvement of the present invention is that the update selection phase compares two candidates X IGWO (t+1) and X IDLH (t+1) The fitness value is used to select a candidate new position vector with a smaller fitness. If there is none, continue to use X i (t) is used as the new position vector; finally, the process is executed for all individual gray wolves in the population, and the number of iterations is increased by one until the maximum number of iterations is reached.
[0024] A further improvement of the present invention is that the discrete wavelet algorithm in S3 introduces f c and f b Two parameters control the waveform; the specific expression is: where f c Indicates the main frequency of the wavelet, which is the reciprocal of the distance between the main peak and the adjacent peak; f b Indicates the width of the time domain extension.
[0025] The technical effects of the present invention are as follows:
[0026] The power quality disturbance detection algorithm based on IGWO-VMD-DWT is constructed. The invention combines the improved gray wolf optimization algorithm IGWO, variational mode decomposition VMD and discrete wavelet algorithm DWT to form a new intelligent harmonic detection algorithm IGWO-VMD-DWT. The VMD algorithm optimized by IGWO can adapt to various disturbance harmonic combinations and extract the IMF components therein; the DWT algorithm further reduces the noise of the IMF components, extracts the frequency and amplitude characteristic values, and realizes signal analysis. It has excellent performance in accuracy, noise reduction and speed, and provides a new tool for detecting power quality disturbances. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0028] Figure 1 It is a flow chart of a power quality disturbance detection algorithm based on IGWO-VMD-DWT according to Embodiment 1 of the present invention;
[0029] Figure 2 This is a harmonic model parameter setting diagram of embodiment 2 of the present invention;
[0030] Figure 3 It is a curve diagram of envelope entropy fitness values of four swarm intelligence algorithms in Example 2 of the present invention;
[0031] Figure 4 This is a diagram showing the results of the IGWO-VMD decomposition steady-state harmonic model of Example 2 of the present invention;
[0032] Figure 5 This is an IMF component spectrum diagram of embodiment 2 of the present invention;
[0033] Figure 6 This is a diagram of the detection result of the DWT algorithm of Example 2 of the present invention;
[0034] Figure 7 This is a comparison diagram of noise reduction parameters of Example 2 of the present invention. DETAILED DESCRIPTION
[0035] The present invention aims to propose a power quality disturbance detection algorithm based on IGWO-VMD-DWT. The present invention combines the improved gray wolf optimization algorithm IGWO, variational mode decomposition VMD and discrete wavelet algorithm DWT to form a new intelligent harmonic detection algorithm IGWO-VMD-DWT. The VMD algorithm optimized by IGWO can adapt to various disturbance harmonic combinations and extract the IMF components therein; the DWT algorithm further reduces the noise of the IMF components, extracts the frequency and amplitude characteristic values, and realizes signal analysis. It has excellent performance in accuracy, noise reduction and speed, and provides a new tool for detecting power quality disturbances.
[0036] Embodiment 1:
[0037] This embodiment proposes a power quality disturbance detection algorithm based on IGWO-VMD-DWT, such as Figure 1 As shown, the following specific steps are included:
[0038] S1. Decomposing the intrinsic mode function in the variational mode decomposition algorithm;
[0039] S2, using the improved grey wolf optimization algorithm to optimize the decomposition number k and penalty factor a of the intrinsic mode function;
[0040] S3. Decompose the characteristic signal containing harmonics into k intrinsic mode function components and use discrete wavelet algorithm to perform time-frequency analysis on the k intrinsic mode function components.
[0041] In this embodiment, S1 includes the following specific steps:
[0042] S11, define the expression of the intrinsic mode function in the variational mode decomposition algorithm, the expression is specifically: k (t) = A k (t)cos(φ k (t)); where k is the number of intrinsic mode functions, k = {1, 2, ···, k}; u k (t) is the kth intrinsic mode function; A k (t) is the instantaneous full amplitude of the kth intrinsic mode function; φ k (t) is the instantaneous phase of the kth intrinsic mode function;
[0043] S12. Construct a constrained variational problem, wherein the specific expression of the constrained variational problem is:
[0044]
[0045] In the formula, is the partial derivative with respect to time; ω k for u k The center frequency of ; δ(t) is the Dirac delta function; (δ(t)+j / (πt)) is the Hilbert transform;
[0046] S13, introduce the penalty factor a and the Lagrange multiplication operator λ, and use the Lagrange multiplier method to transform the expression in S12 into an equivalent unconstrained variational problem. The specific expression is:
[0047]
[0048] S14. Use the alternating direction multiplier method to solve the function equation, iterate and update each parameter, and obtain the optimal solution of the variational problem, which is expressed as:
[0049]
[0050] Where ω is the given frequency; step length τ>0; is the Fourier transform of the corresponding function.
[0051] In this embodiment, the improved grey wolf optimization algorithm in S2 includes three stages: initialization, movement, and selection update.
[0052] In this embodiment, the initialization phase is consistent with the initial algorithm, and N wolves are randomly distributed in a given range of the search space [l i ,l j ]Inside.
[0053] In this embodiment, the moving phase is divided into two parts. The first part is to calculate the new position vector X of the gray wolf according to the initial algorithm. IGWO (t+1); The second part is the DLH search strategy position vector. First, according to the expression R i (t)=||X i (t)-X IGWO (t+1)‖, calculate the current position vector X i (t) and X IGWO The Euclidean distance R between (t+1) i (t), and then by the expression N i (t) = D i (X i (t),X j (t))≤R i (t) Construct a i (t) is the radius of the neighborhood, and then through the expression X IDLH (t+1)=X i (t)+rand(X n (t)-X r (t)) Carry out DLH strategy.
[0054] In this embodiment, the update selection phase compares two candidates X IGWO (t+1) and X IDLH (t+1) The fitness value is used to select a candidate new position vector with a smaller fitness. If there is none, continue to use X i (t) is used as the new position vector; finally, the process is executed for all individual gray wolves in the population, and the number of iterations is increased by one until the maximum number of iterations is reached.
[0055] In this embodiment, the discrete wavelet algorithm in S3 introduces f c and f b Two parameters control the waveform; the specific expression is: where f c Indicates the main frequency of the wavelet, which is the reciprocal of the distance between the main peak and the adjacent peak; f b Indicates the width of the time domain extension.
[0056] Embodiment 2:
[0057] like Figure 2-Figure 7 As shown, the difference from Example 1 is that this embodiment will be combined with a specific harmonic calculation example. In this embodiment, a steady-state harmonic model is adopted, and the expression is In the formula, η(t) is 20dB Gaussian white noise; on the basis of the power frequency of 50Hz, the 3rd and 5th odd harmonics are added to the signal. According to the characteristics of odd harmonics, their frequencies are odd times of the fundamental frequency, and their amplitudes are odd fractions of the fundamental amplitude. The specific parameters are as follows: Figure 2 shown.
[0058] In this embodiment, the sampling frequency is set to 4000 Hz, the sampling time is set to 0.25 s, and the sampling points are set to 1024 points. Figure 3 The envelope entropy fitness curves of the number of VMD decompositions k and the penalty factor a of the above steady-state harmonic model are optimized for the four swarm intelligence optimization algorithms. If the envelope entropy fitness is smaller, the VMD decomposition effect is better and the fitness is better. The fitness of the particle swarm optimization (PSO) and simulated annealing (SA) algorithms at the initial position of the iteration is significantly worse than that of the GWO and IGWO algorithms. The initial convergence speed of the PSO algorithm is fast, but it quickly falls into local convergence. The SA algorithm did not converge too much as a whole, and the optimization fitness for the target parameters was poor. The convergence speed of IGWO was significantly better than that of GWO, and it did not converge locally too early, and the optimization effect was the best.
[0059] In this embodiment, after IGWO optimization, the optimal VMD decomposition number k=4 and the penalty factor a=2986 are obtained. The steady-state harmonic model simulation data is imported into the VMD decomposition module, and the following can be obtained: Figure 4 The IMF components shown. Figure 4 The frequencies corresponding to the IMFs increase from top to bottom. IMF1 represents the 50Hz fundamental wave; IMF2 represents the third harmonic; IMF3 represents the fifth harmonic; and IMF4 represents the signal background noise. It can be seen that the VMD algorithm still has a strong signal decomposition capability in the presence of noise. When the appropriate k and a values are set, the algorithm can better extract the various components of the signal without modal aliasing.
[0060] In this embodiment, the first three IMF components are analyzed using the DWT algorithm to obtain Figure 5 DWT also has a certain noise reduction capability. After two layers of noise reduction processing by VMD and DWT, the background noise in the harmonics analyzed is almost completely eliminated. Figure 6 The final detection results of the DWT algorithm for harmonic amplitude, frequency and phase have a small error with the true value, which meets the requirements of GB / T 12325-2008. In order to compare the denoising effects of the algorithms, three indicators, namely root mean square error (RMSE), signal-to-noise ratio (SNR) and signal correlation coefficient (R), are introduced for evaluation. Different denoising algorithms are compared. If the RMSE value of the signal after algorithm processing is smaller and the SNR value is larger, the corresponding denoising algorithm has better denoising effect. The similarity between the denoised signal and the original signal is reflected by the correlation coefficient R. If the two are more similar, the R value is larger. Figure 7 It can be seen that the denoising effect of the VMD-DWT algorithm in this scheme is significantly better.
[0061] Embodiment 3:
[0062] This embodiment provides an electronic device, including: a processor and a memory, wherein the memory stores a computer program that can be called by the processor; the processor executes the above-mentioned IGWO-VMD-DWT-based power quality disturbance detection algorithm by calling the computer program stored in the memory.
[0063] The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) and one or more memories, wherein the memory stores at least one computer program, and the computer program is loaded and executed by the processor to implement the power quality disturbance detection algorithm based on IGWO-VMD-DWT provided in the above method embodiment. The electronic device may also include other components for realizing the functions of the device, for example, the electronic device may also have components such as a wired or wireless network interface and an input and output interface for data input and output. This embodiment will not be described in detail here.
[0064] Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), and it can also be a combination of hardware and software, which is generally referred to as "circuit", "module" or "system" herein. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code.
[0065] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0066] The present invention is described with reference to flowcharts and block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process or block in the flowchart and block diagram, as well as the combination of processes and blocks in the flowchart or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts. Figure 1 Process or multiple processes and boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0067] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 Process or multiple processes and boxes Figure 1 The steps for the functions specified in one or more boxes.
[0068] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.
Claims
1. The power quality disturbance detection algorithm based on IGWO-VMD-DWT is characterized by: The specific steps include: S1. Decomposing the intrinsic mode function in the variational mode decomposition algorithm; S2, using the improved grey wolf optimization algorithm to optimize the decomposition number k and penalty factor a of the intrinsic mode function; S3. Decompose the characteristic signal containing harmonics into k intrinsic mode function components and use discrete wavelet algorithm to perform time-frequency analysis on the k intrinsic mode function components.
2. The IGWO-VMD-DWT-based power quality disturbance detection algorithm according to claim 1, characterized in that: The S1 comprises the following specific steps: S11, define the expression of the intrinsic mode function in the variational mode decomposition algorithm, the expression is specifically: k (t) = A k (t)cos(φ k (t)); where k is the number of intrinsic mode functions, k = {1, 2, ···, k}; u k (t) is the kth intrinsic mode function; A k (t) is the instantaneous full amplitude of the kth intrinsic mode function; φ k (t) is the instantaneous phase of the kth intrinsic mode function; S12. Construct a constrained variational problem, wherein the specific expression of the constrained variational problem is: In the formula, is the partial derivative with respect to time; ω k for u k The center frequency of ; δ(t) is the Dirac delta function; (δ(t)+j / (πt)) is the Hilbert transform; S13, introduce the penalty factor a and the Lagrange multiplication operator λ, and use the Lagrange multiplier method to transform the expression in S12 into an equivalent unconstrained variational problem. The specific expression is: S14. Use the alternating direction multiplier method to solve the function equation, iterate and update each parameter, and obtain the optimal solution of the variational problem, which is expressed as: Where ω is the given frequency; step length τ>0; is the Fourier transform of the corresponding function.
3. The IGWO-VMD-DWT-based power quality disturbance detection algorithm according to claim 2 is characterized in that: The improved grey wolf optimization algorithm in S2 includes three stages: initialization, movement and selection update.
4. The IGWO-VMD-DWT-based power quality disturbance detection algorithm according to claim 3 is characterized in that: The initialization phase is consistent with the initial algorithm, where N wolves are randomly distributed in a given range of the search space [l i ,l j ]Inside.
5. The IGWO-VMD-DWT-based power quality disturbance detection algorithm according to claim 4 is characterized in that: The moving phase is divided into two parts. The first part is to calculate the new position vector X of the gray wolf according to the initial algorithm. IGWO (t+1); The second part is the DLH search strategy position vector. First, according to the expression R i (t) = ||X i (t)-X IGWO (t+1)||, calculate the current position vector X i (t) and X IGWO The Euclidean distance R between (t+1) i (t), and then by the expression N i (t) = D i (X i (t),X j (t))≤R i (t) Construct a i (t) is the radius of the neighborhood, and then through the expression X IDLH (t+1)=X i (t)+rand(X n (t)-X r (t)) Carry out DLH strategy.
6. The IGWO-VMD-DWT-based power quality disturbance detection algorithm according to claim 5, characterized in that: The update selection phase compares two candidates X IGWO (t+1) and X IDLH (t+1) The fitness value is used to select a candidate new position vector with a smaller fitness. If there is none, continue to use X i (t) is used as the new position vector; finally, the process is executed for all individual gray wolves in the population, and the number of iterations is increased by one until the maximum number of iterations is reached.
7. The IGWO-VMD-DWT-based power quality disturbance detection algorithm according to claim 6, characterized in that: The discrete wavelet algorithm in S3 introduces f c and f b Two parameters control the waveform; the specific expression is: where f c Indicates the main frequency of the wavelet, which is the reciprocal of the distance between the main peak and the adjacent peak; f b Indicates the width of the time domain extension.