Electric energy quality signal denoising method and system, terminal and storage medium
Through wavelet decomposition and threshold quantization processing technology, the power quality signal is denoised, which solves the problem of noise interference, improves the denoising performance and signal-to-noise ratio, and retains the local characteristics of the signal.
Patent Information
- Application Number
- CN202411335707.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-02-14
AI Technical Summary
Power quality signals are easily disturbed by noise during the acquisition process, resulting in the inability to directly extract and analyze feature, which in turn affects the management of disturbed signals.
Wavelet decomposition technology is used to perform multi-layer decomposition of the power quality signal to obtain approximate coefficients and detail coefficients, and then the details coefficients are quantized by threshold value, and then wavelet inverse transformation is performed to remove noise.
It effectively improves the denoising performance of the power quality signal, improves the signal-to-noise ratio, and retains the local characteristic information of the original signal while denoising.
Smart Images

Figure CN119441713A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal denoising, and in particular to a method, system, terminal and storage medium for denoising a power quality signal. Background Art
[0002] In recent years, with the widespread use of various power electronic devices and the continuous increase of nonlinear, impact and fluctuating loads, the power quality problems in power systems have become increasingly prominent. Therefore, it is particularly important to accurately, quickly and effectively detect various types of power quality events. In order to control power quality disturbances, it is necessary to first collect disturbance signals. However, in practical applications, the power quality signals obtained by monitoring and data acquisition equipment will introduce random noise due to changes in internal and external conditions of equipment operation. The power quality signals collected in real time by the power system have certain noise interference, and it is impossible to directly extract and analyze the features of the collected power quality disturbance signals, and thus it is impossible to control the disturbance signals. In addition, the power quality signals will also be contaminated by noise when measuring and transmitting data through channels. The presence of noise will deteriorate the effectiveness of disturbance detection and identification methods, and sometimes even make them invalid. Therefore, in recent years, research on power quality signal denoising has also attracted great attention.
[0003] Therefore, it is necessary to use a suitable method to denoise the collected power quality signal. In addition, the difficulty of power quality signal denoising is to retain the local characteristic information of the original signal while effectively removing the noise.
[0004] To this end, the present application provides a power quality signal denoising method, system, terminal and storage medium to solve the above technical problems. Summary of the invention
[0005] The object of the present invention is to provide a power quality signal denoising method, system, terminal and storage medium to solve the above technical problems.
[0006] In order to achieve the above object, the present invention provides the following technical solutions: In a first aspect, a method for denoising a power quality signal is provided, the method comprising: Step S1: collecting the power quality signal to be denoised; Step S2: selecting a wavelet basis function for the power quality signal to be denoised; Step S3: performing several layers of wavelet decomposition on the power quality signal to be denoised by using the selected wavelet basis function to obtain approximate coefficients and detail coefficients of each layer of the signal after the wavelet decomposition; Step S4: performing threshold quantization processing on the detail coefficients of each layer after wavelet decomposition to obtain the detail coefficients of each layer after threshold quantization processing; Step S5: performing inverse wavelet transform on the approximate coefficients of each layer obtained in step S3 and the detail coefficients of each layer after threshold quantization processing obtained in step S4 to obtain a denoised power quality signal of the power quality signal to be denoised.
[0007] Furthermore, in step S2, the wavelet basis function selected is the db4 wavelet.
[0008] Furthermore, in step S3, a three-layer wavelet decomposition is performed on the power quality signal to be denoised.
[0009] Furthermore, in step S4, threshold quantization processing is performed on the detail coefficients of each layer after wavelet decomposition to obtain the detail coefficients of each layer after threshold quantization processing, including: Determine the threshold value; constructing a threshold function according to the determined threshold; The detail coefficients of each layer after wavelet decomposition are subjected to threshold quantization processing according to the constructed threshold function, so as to obtain the detail coefficients of each layer after threshold quantization processing.
[0010] Furthermore, the threshold value is determined as follows: , In the formula, Represents the first The threshold corresponding to the layer, After wavelet decomposition, Noise estimate of the detail coefficients of the layer, represents the length of the power quality signal to be denoised, is the first layer, .
[0011] Further, The calculation formula is: , In the formula, , Indicates the Layer The detail coefficient, , Indicates The total number of layer detail coefficients, Indicated by the The sequence of all detail coefficients of the layer, represents the first The median of the absolute values of the layer's detail coefficients.
[0012] Furthermore, the calculation formula of the threshold function is: , In the formula, Represents the first Layer The detail coefficient, that is, the first Layer A detail factor.
[0013] In a second aspect, a power quality signal denoising system is provided, the system comprising: A signal acquisition module, used for collecting power quality signals to be denoised; A wavelet basis function selection module, used for selecting a wavelet basis function for the power quality signal to be denoised; A wavelet decomposition module, used to perform several layers of wavelet decomposition on the power quality signal to be denoised by using a selected wavelet basis function, and obtain approximate coefficients and detail coefficients of each layer of the signal after the wavelet decomposition; A threshold quantization processing module is used to perform threshold quantization processing on the detail coefficients of each layer after wavelet decomposition to obtain the detail coefficients of each layer after threshold quantization processing; The signal reconstruction module is used to perform inverse wavelet transform on the approximate coefficients of each layer obtained in the wavelet decomposition module and the detail coefficients of each layer after threshold quantization processing obtained by the threshold quantization processing module, so as to obtain the denoised power quality signal of the power quality signal to be denoised.
[0014] In a third aspect, a terminal includes: processor; A memory for storing execution instructions of the processor; The processor is configured to execute the methods described in the above aspects. In a fourth aspect, a computer-readable storage medium storing a computer program is provided, wherein when the program is executed by a processor, the methods described in the above aspects are implemented.
[0015] Beneficial effects of the present invention: The present invention performs wavelet decomposition on a noisy power quality signal to obtain detail coefficients of each layer and approximate coefficients of each layer after wavelet decomposition, performs threshold quantization processing on the detail coefficients obtained after wavelet decomposition to obtain detail coefficients of each layer after denoising, and performs wavelet inverse transform on the approximate coefficients obtained after wavelet decomposition and the detail coefficients after threshold quantization processing to obtain a denoised power quality signal of the power quality signal to be denoised, thereby effectively improving the denoising performance of the denoising processing of the power quality signal, improving the signal-to-noise ratio of the denoised signal, and retaining the local characteristic information of the original signal while effectively denoising.
[0016] These and other objects, features and advantages of the present invention will be fully reflected in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic flow chart of the power quality signal denoising method of the present invention is shown. DETAILED DESCRIPTION
[0018] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art can think of other obvious variations. The basic principles of the present invention defined in the following description can be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not deviate from the spirit and scope of the present invention.
[0019] It should be understood by those skilled in the art that, in the disclosure of the specification, the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device including a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. Therefore, the above terms should not be understood as limiting the present invention.
[0020] It is to be understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the element may be multiple, and the term "one" should not be understood as a limitation on the quantity.
[0021] Embodiment 1, refer to Figure 1 A method for denoising a power quality signal according to a preferred embodiment of the present invention will be described in detail below, wherein the method comprises steps S1 to S5: Step S1: Collect the power quality signal to be denoised. It is understandable that when actually measuring electric energy, since the load is constantly changing, the voltage, current and their phase difference will also change in real time, so real-time sampling and processing are required. In order to make the data more stable and accurate, the power quality signal to be denoised is obtained by sampling the DC voltage and current signals at a fixed frequency.
[0022] Step S2: Selecting a wavelet basis function for the power quality signal to be denoised.
[0023] Step S3: performing several layers of wavelet decomposition on the power quality signal to be denoised by using the selected wavelet basis function to obtain approximate coefficients and detail coefficients of each layer of the signal after the wavelet decomposition.
[0024] Step S4: performing threshold quantization processing on the detail coefficients of each layer after wavelet decomposition to obtain the detail coefficients of each layer after threshold quantization processing.
[0025] Step S5: performing inverse wavelet transform on the approximate coefficients of each layer obtained in step S3 and the detail coefficients of each layer after threshold quantization processing obtained in step S4 to obtain a denoised power quality signal of the power quality signal to be denoised.
[0026] The present invention performs wavelet decomposition on a noisy power quality signal to obtain detail coefficients of each layer and approximate coefficients of each layer after wavelet decomposition, performs threshold quantization processing on the detail coefficients obtained after wavelet decomposition to obtain detail coefficients of each layer after denoising, and performs inverse wavelet transform on the approximate coefficients obtained after wavelet decomposition and the detail coefficients after threshold quantization processing to obtain a denoised power quality signal of the power quality signal to be denoised, thereby effectively improving the denoising performance of the denoising processing of the power quality signal, improving the signal-to-noise ratio of the denoised signal, and retaining the local characteristic information of the original signal while effectively denoising.
[0027] In this embodiment, when selecting the corresponding wavelet basis function, because the power quality signal is usually periodic, and when the power quality signal fails or is abnormal, a transient signal will appear. Therefore, it is considered to select a wavelet basis function with good transient performance and periodic performance.
[0028] The db4 wavelet basis function has good transient performance and can capture transient signals in power quality signals, such as sudden voltage changes, harmonic generation, etc.
[0029] The db4 wavelet basis function is suitable for processing periodic signals. Since power quality signals are usually periodic, the periodic performance of the db4 wavelet basis function can better adapt to and process this periodic feature.
[0030] The db4 wavelet basis function has energy concentration and good energy concentration characteristics in time and frequency, which helps to effectively decompose and analyze power quality signals.
[0031] The db4 wavelet basis function has multi-resolution analysis capability and can decompose and analyze signals at different resolution levels.
[0032] In summary, the present invention selects the db4 wavelet basis function.
[0033] Exemplarily, a three-layer wavelet decomposition is performed on the power quality signal to be denoised.
[0034] In step S4, threshold quantization processing is performed on the detail coefficients of each layer after wavelet decomposition to obtain the detail coefficients of each layer after threshold quantization processing, including: S41: Determine a threshold. In this embodiment, the threshold is determined by: , In the formula, Represents the first The threshold corresponding to the layer, After wavelet decomposition, Noise estimate of the detail coefficients of the layer, represents the length of the power quality signal to be denoised, is the first layer, .
[0035] The calculation formula is: , In the formula, , Indicates the Layer The detail coefficient, , Indicates The total number of layer detail coefficients, Indicated by the The sequence of all detail coefficients of the layer, represents the first The median of the absolute values of the layer's detail coefficients.
[0036] S42: constructing a threshold function according to the determined threshold, the calculation formula of the threshold function is: , In the formula, Represents the first Layer The detail coefficient, that is, the first Layer A detail factor.
[0037] S43: performing threshold quantization processing on the detail coefficients of each layer after wavelet decomposition according to the constructed threshold function, to obtain the detail coefficients of each layer after the threshold quantization processing.
[0038] Embodiment 2, The present invention also provides a power quality signal denoising system, the system comprising: The signal acquisition module is used to collect the power quality signal to be denoised.
[0039] The wavelet basis function selection module is used to select a wavelet basis function for the power quality signal to be denoised.
[0040] The wavelet decomposition module is used to perform several layers of wavelet decomposition on the power quality signal to be denoised through the selected wavelet basis function to obtain the approximate coefficients and detail coefficients of each layer of the signal after the wavelet decomposition.
[0041] The threshold quantization processing module is used to perform threshold quantization processing on the detail coefficients of each layer after wavelet decomposition to obtain the detail coefficients of each layer after threshold quantization processing.
[0042] The signal reconstruction module is used to perform inverse wavelet transform on the approximate coefficients of each layer obtained in the wavelet decomposition module and the detail coefficients of each layer after threshold quantization processing obtained in the threshold quantization processing module, so as to obtain the denoised power quality signal of the power quality signal to be denoised.
[0043] Embodiment 3, The present invention also provides a terminal, comprising: processor; A memory for storing execution instructions of the processor; The processor is configured to execute the methods described in the above embodiments. Embodiment 4, The present invention also provides a computer-readable storage medium storing a computer program, which implements the methods described in the above embodiments when executed by a processor.
[0044] It should be understood by those skilled in the art that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The advantages of the present invention have been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments, and the embodiments of the present invention may be deformed or modified in any way without departing from the principles.
Claims
1. A method for denoising a power quality signal, characterized in that: The method comprises: Step S1: collecting the power quality signal to be denoised; Step S2: selecting a wavelet basis function for the power quality signal to be denoised; Step S3: performing several layers of wavelet decomposition on the power quality signal to be denoised by using the selected wavelet basis function to obtain approximate coefficients and detail coefficients of each layer of the signal after the wavelet decomposition; Step S4: performing threshold quantization processing on the detail coefficients of each layer after wavelet decomposition to obtain the detail coefficients of each layer after threshold quantization processing; Step S5: performing inverse wavelet transform on the approximate coefficients of each layer obtained in step S3 and the detail coefficients of each layer after threshold quantization processing obtained in step S4 to obtain a denoised power quality signal of the power quality signal to be denoised.
2. The method according to claim 1, characterized in that In step S2, the wavelet basis function selected is the db4 wavelet.
3. The method according to claim 1, characterized in that In step S3, a three-layer wavelet decomposition is performed on the power quality signal to be denoised.
4. The method according to claim 3, characterized in that In step S4, threshold quantization processing is performed on the detail coefficients of each layer after wavelet decomposition to obtain the detail coefficients of each layer after threshold quantization processing, including: Determine the threshold value; constructing a threshold function according to the determined threshold; The detail coefficients of each layer after wavelet decomposition are subjected to threshold quantization processing according to the constructed threshold function, so as to obtain the detail coefficients of each layer after threshold quantization processing.
5. The method according to claim 4, characterized in that The formula for determining the threshold is: , In the formula, Represents the first The threshold corresponding to the layer, After wavelet decomposition, Noise estimate of the detail coefficients of the layer, represents the length of the power quality signal to be denoised, is the first layer, .
6. The method according to claim 5, characterized in that The calculation formula is: , In the formula, , Indicates the Layer The detail coefficient, , Indicates The total number of layer detail coefficients, Indicated by the The sequence of all detail coefficients of the layer, represents the first The median of the absolute values of the layer's detail coefficients.
7. The method according to claim 5, characterized in that The calculation formula of the threshold function is: , In the formula, Represents the first Layer The detail coefficient, that is, the first Layer A detail factor.
8. A power quality signal denoising system, characterized in that: The system comprises: A signal acquisition module, used for collecting power quality signals to be denoised; A wavelet basis function selection module, used for selecting a wavelet basis function for the power quality signal to be denoised; A wavelet decomposition module, used to perform several layers of wavelet decomposition on the power quality signal to be denoised by using a selected wavelet basis function, and obtain approximate coefficients and detail coefficients of each layer of the signal after the wavelet decomposition; A threshold quantization processing module is used to perform threshold quantization processing on the detail coefficients of each layer after wavelet decomposition to obtain the detail coefficients of each layer after threshold quantization processing; The signal reconstruction module is used to perform inverse wavelet transform on the approximate coefficients of each layer obtained in the wavelet decomposition module and the detail coefficients of each layer after threshold quantization processing obtained by the threshold quantization processing module, so as to obtain the denoised power quality signal of the power quality signal to be denoised.
9. A terminal, characterized in that: include: processor; A memory for storing execution instructions of the processor; The processor is configured to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.