CN115618204A - Electric energy data denoising method based on optimal wavelet basis and improved wavelet threshold function - Google Patents

Electric energy data denoising method based on optimal wavelet basis and improved wavelet threshold function Download PDF

Info

Publication number
CN115618204A
CN115618204A CN202211299583.3A CN202211299583A CN115618204A CN 115618204 A CN115618204 A CN 115618204A CN 202211299583 A CN202211299583 A CN 202211299583A CN 115618204 A CN115618204 A CN 115618204A
Authority
CN
China
Prior art keywords
wavelet
optimal
threshold
coefficient
noise
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211299583.3A
Other languages
Chinese (zh)
Inventor
南余荣
徐勇
王满意
潘聪
南方瑶
赵士超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN202211299583.3A priority Critical patent/CN115618204A/en
Publication of CN115618204A publication Critical patent/CN115618204A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Indication And Recording Devices For Special Purposes And Tariff Metering Devices (AREA)

Abstract

The invention provides a direct current electric energy data denoising method based on an optimal wavelet basis and an improved wavelet threshold function. Firstly, determining the optimal decomposition layer number of a sampling signal under different wavelet bases according to the noise power and the noise power difference, and determining the optimal wavelet base by using the signal-to-noise ratio, the root-mean-square error and the cross correlation as evaluation indexes on the basis. Then, the optimal wavelet basis is selected to carry out optimal layer number decomposition on the sampling signal, and a group of wavelet coefficients is obtained. The improved threshold function and the threshold selection criterion in the invention are used for carrying out threshold quantization processing on detail coefficients of each layer and the last layer of approximate coefficients. And finally, performing inverse wavelet transform on the residual coefficients to obtain a noise reduction signal. Experiments prove that the optimal wavelet basis and decomposition layer number selection method has feasibility, and compared with the traditional threshold function, the method has better noise reduction effect, is more favorable for retaining signal characteristics, can better filter noise components in direct current electric energy signals, and improves the electric energy metering accuracy.

Description

Electric energy data denoising method based on optimal wavelet basis and improved wavelet threshold function
Technical Field
The invention belongs to the field of electric energy metering and signal processing, and particularly relates to an electric energy data denoising method based on an optimal wavelet basis and an improved wavelet threshold function.
Background
The electric energy metering is used as a core function of the electric energy meter, and the electric energy metering precision is always the key point of attention of engineers. At present, domestic direct current electric meters are often used in direct current charging piles (quick charging), the direct current charging piles mostly obtain direct current from alternating current through rectification and filtering, but harmonic waves cannot be completely filtered under the current technical conditions, so that output direct current signals are mostly pulsating direct current, unconverted alternating current components superposed on electric energy data are called ripples, and the existence of the ripples and other pulsating noise causes distortion of direct current voltage or current waveforms, thereby affecting the accuracy of electric energy metering.
In terms of hardware, an LC filter circuit is generally used for reducing ripple and ripple noise interference in the electric energy data signal, but leakage current is introduced, and the accuracy of electric energy metering is reduced. In digital filtering, wavelet transform is often used to denoise dc noisy signals.
As disclosed in publication No.: CN112380934A, publication date is: the Chinese patent of invention No. 2/19 in 2021 discloses a cable partial discharge signal adaptive wavelet denoising method based on wavelet entropy and sparsity, which comprises the following steps: collecting a cable partial discharge signal s (n) to be denoised, and establishing a wavelet library; according to the wavelet entropy and sparsity of s (n), selecting an optimal base wavelet and an optimal decomposition scale for performing wavelet decomposition on s (n); performing wavelet decomposition on s (n) to obtain an approximation coefficient alpha J and a detail coefficient dj at each decomposition scale J; calculating a wavelet threshold thrj of a jth layer wavelet coefficient; carrying out threshold quantization processing on the detail coefficient dj of the j-th layer, filtering out the wavelet coefficient with the absolute value smaller than the wavelet threshold thrj, and weakening the wavelet coefficient with the absolute value larger than the wavelet threshold thrj to obtain a thresholded detail coefficient dj' of the j-th layer; the method comprises the steps of utilizing inverse discrete wavelet transform to reconstruct the approximation coefficient alpha J and the thresholding detail coefficient dj 'to obtain a denoised cable partial discharge signal s (n)'.
If the publication number is: CN107274908A, publication date: the Chinese patent invention of 10 and 20 in 2017 discloses a wavelet voice denoising method based on a new threshold function, which mainly comprises the following steps: 1) Generating voice with noise; 2) Carrying out wavelet decomposition on the voice with noise; 3) Carrying out wavelet threshold processing on the voice with noise; 4) Performing wavelet reconstruction on the processed voice; 5) Obtaining a denoised voice signal; wherein, the step 3) is mainly processed, and the step 3) directly determines the denoising effect. And step 3) performing threshold processing on the wavelet coefficient after wavelet decomposition on the noisy speech, wherein the threshold processing mainly relates to determination of a threshold and selection of a threshold function. The new threshold function adopted by the invention solves the problems that the processed signal is oscillated due to the discontinuity of the traditional hard threshold function and the distortion is larger after the soft threshold function processes the signal, but the threshold value in the new threshold function is a fixed value, the sparsity of small coefficient noise of different detail coefficients in the signal to be denoised is different, the denoising is not thorough due to the excessively small setting of the fixed threshold value, and the information of the signal is lost due to the excessively large setting.
Disclosure of Invention
In order to solve the problems, the invention discloses an electric energy data denoising method based on an optimal wavelet basis and an improved wavelet threshold function.
In order to achieve the above effects, the technical scheme of the invention is as follows:
the electric energy data denoising method based on the optimal wavelet basis and the improved wavelet threshold function comprises the following steps:
step 1: at a sampling frequency f s Sampling electric energy data, and recording the electric energy data as a source signal s (n), wherein the source signal s (n) = x (n) + noise (n), wherein x (n) is a pure signal, and noise (n) is a noise signal;
and 2, step: calculating according to the evaluation indexA plurality ofThe optimal decomposition layer number of the wavelet base;
and step 3: calculating the denoising performance of the wavelet bases under the optimal decomposition layer number to obtain the optimal wavelet base with the optimal denoising performance;
and 4, step 4: selecting the optimal wavelet basis layered according to the optimal decomposition layer to decompose the source signal to obtain the detail coefficient cD of each decomposition layer j And approximation coefficient cA of maximum decomposition layer j
And 5: calculating local threshold thr of detail coefficient of each decomposition layer j And estimating an approximate coefficient threshold of the maximum decomposition layer;
step 6: generating a wavelet threshold function based on the local threshold and the approximation coefficient threshold, based onGeneratingThe wavelet threshold function of (3) compresses wavelet coefficients of the source signal;
and 7: and performing inverse wavelet transform on the source signal processed by the wavelet threshold function to obtain a reconstructed source signal, and completing the noise reduction processing of the electric energy data.
Preferably, in step 2, the evaluation indicator includes noise power P noise Sum noise power difference Δ P i The noise power P noise Sum noise power difference Δ P i Are respectively expressed as:
Figure BDA0003901271870000031
Figure BDA0003901271870000032
where N is the signal sample point length, y i (n) is a denoised signal, i is a wavelet basis number, x (n) = y 0 And (n) is a clean signal.
Preferably, the step 2 comprises the steps of;
step 21: calculating the noise power of the same wavelet base under a plurality of decomposition layers;
step 22: after the noise power is sequenced, the noise power difference of adjacent noise power is calculated;
step 23: selecting a minimum noise power difference min (Δ p) i ) And to less noise in corresponding calculationsAcoustic power;
and step 24: taking the decomposition layer with the lower noise power as an optimal decomposition layer;
step 25: and repeating the steps 21 to 24 to determine the optimal decomposition layers of the rest wavelet bases.
Preferably, the step 3 comprises the steps of:
step 31: evaluating performance evaluation indexes of a plurality of wavelet bases under the optimal decomposition layer number to obtain performance index data;
step 32: performing forward and standardized processing on the performance index data to obtain adjusted performance index data;
step 33: calculating the information entropy of the adjusted performance index data;
step 34: calculating the weight of each performance evaluation index according to the information entropy;
step 35: and evaluating the denoising performance according to the weight to determine an optimal wavelet basis.
Preferably, the performance evaluation index includes a root mean square error and a signal-to-noise ratio of the noise reduction data in the noise reduction process, and a cross-correlation of the noise reduction data and the original data.
Preferably, the local threshold function of step 5 represents thr j Comprises the following steps:
Figure BDA0003901271870000033
wherein j is belonged to Z, N j Is the data length of each decomposition layer coefficient, m is a threshold adjustment coefficient,
Figure BDA0003901271870000034
is the variance of the noise, where w j,k ={cD 1,k cD 2,k …cD j,k cA j,k And is the kth wavelet coefficient of the largest wavelet entropy subband in the jth layer.
Preferably, the formula of the threshold adjustment coefficient m is:
Figure BDA0003901271870000041
wherein the content of the first and second substances,
Figure BDA0003901271870000042
w j,k the kth wavelet coefficient of the largest wavelet entropy subband in the jth layer.
Preferably, in step 5, the peak-to-ratio of the approximation coefficient of the largest decomposition layer is calculated, the peak-to-ratio of the detail coefficient whose peak-to-ratio of the approximation coefficient is closest to the peak-to-ratio of the detail coefficient is determined, and the threshold of the detail coefficient at which the peak-to-ratio of the detail coefficient which is closest to the peak-to-ratio of the detail coefficient is located is used as the approximation coefficient threshold.
Preferably, the wavelet threshold function expression generated in step 6 is:
Figure BDA0003901271870000043
in the formula
Figure BDA0003901271870000044
For the wavelet coefficient processed by the threshold function, sgn (-) is a sign function, alpha and tau are both regulating factors, and alpha satisfies the first-order continuous conductibility.
Preferably, the expression of the adjustment factor α is:
Figure BDA0003901271870000045
where α and τ are both adjustment factors, and the local threshold function represents thr j
The invention has the beneficial effects that:
1. the optimal decomposition layers of the wavelet bases are determined by using the noise power and the noise power difference, and the optimal wavelet bases are obtained according to the performance index evaluation and the weight calculation of each wavelet base, so that the method for selecting the optimal wavelet bases and the optimal decomposition layer number is provided.
2. Compared with a general threshold (Sqtwolog criterion), the threshold in the invention can effectively avoid a killing phenomenon and improve the noise reduction performance.
3. And setting a threshold value for the approximation coefficient for reducing low-frequency noise in the approximation coefficient, wherein the threshold value of the approximation coefficient is determined as a function threshold value corresponding to a peak sum ratio of the detail coefficient which is closest to the peak sum ratio of the approximation coefficient.
4. Aiming at the problems that the constant error of the soft threshold value in the traditional threshold value function and the oscillation of the reconstructed signal at the threshold value caused by the hard threshold value, the wavelet threshold value function generated by the invention is continuously derivable and can be used for solving the problems that the soft threshold value has constant error and the reconstructed signal has oscillation at the threshold value
Figure BDA0003901271870000051
The method is a sloping asymptote, avoids the existence of constant errors and break points, further suppresses useless components in the signal and enhances the useful part in the signal, and can change the compression degree of the wavelet threshold function on the coefficient by changing the size of the regulating factor tau, thereby effectively retaining the effective components in the detail components.
Drawings
FIG. 1 is a flow chart illustrating the determination of an optimal wavelet basis and an optimal number of decomposition levels in the present invention;
fig. 2 shows a noise power diagram of the noisy Heavy Sine signal at each decomposition level of wavelet basis sym 3;
FIG. 3 shows a noise reduction signal obtained when the Heavy Sine noisy signal is decomposed with wavelet basis sym3 as 1 layer;
fig. 4 is a graph showing the power difference between adjacent noise of the noise-containing signal of the Heavy Sine in each decomposition layer number of the wavelet basis sym 3;
FIG. 5 is a graph showing the noise reduction performance scores of multiple wavelet bases at respective optimal decomposition levels (Heavy Sine noisy signal);
FIG. 6 is a graph comparing the processing results of wavelet coefficients under the soft threshold, hard threshold, modified wavelet threshold functions;
FIG. 7 is a graph showing the comparison of the noise reduction results of the Heavy Sine noisy signal with soft threshold, semi-soft threshold, hard threshold, garret threshold, and modified wavelet threshold functions;
FIG. 8 is a graph showing a comparison of noise reduction results of a DC voltage signal using soft threshold, semi-soft threshold, hard threshold, garride threshold, modified wavelet threshold function;
fig. 9 shows a comparison graph of noise reduction results of the dc current signal using soft threshold, semi-soft threshold, hard threshold, garret threshold, modified wavelet threshold function.
Detailed Description
The invention is further illustrated with reference to the accompanying drawings and the detailed description.
The invention relates to an electric energy data denoising method based on an optimal wavelet basis and an improved wavelet threshold function, which comprises the following steps:
step 1: at a sampling frequency f s Sampling an electric energy data signal, and recording the electric energy data signal as a source signal s (n), wherein the source signal s (n) = x (n) + noise (n), wherein x (n) is a pure signal, and noise (n) is a noise signal;
step 2: calculating the denoising performance of a plurality of wavelet bases under the optimal decomposition layer number to obtain the optimal wavelet base with the optimal denoising performance, wherein the step 2 comprises the following steps of:
step 21: calculating the noise power of the same wavelet base under a plurality of decomposition layers;
step 22: after the noise power is sequenced, the noise power difference of adjacent noise power is calculated;
step 23: selecting a minimum noise power difference min (Δ p) i ) And to a lower noise power in the corresponding calculation;
step 24: taking the decomposition layer with the smaller noise power as an optimal decomposition layer;
step 25: and repeating the steps 21 to 24 to determine the optimal decomposition layers of the rest wavelet bases.
In step 21, the noise power is used as the first layer judgment index, and a larger value of the noise power indicates a better noise reduction effect, as shown in fig. 2.
Considering the distortion condition, taking the noise power difference as a second layer judgment index, and after the noise power is sequenced, the method provided by the inventionIn the embodiment, the wavelet base is sorted from small to large, the adjacent noise power difference is calculated according to the noise power difference formula, and the optimal decomposition layer number of the wavelet base is the minimum noise power difference min (delta p) i ) The number of decomposition layers represented by the smaller power in the correlation calculation of (a).
Noise power P noise Sum noise power difference Δ P i The formula is as follows:
Figure BDA0003901271870000061
Figure BDA0003901271870000062
where N is the signal sampling point length, y i (n) is the noise-reduced signal, y 0 (n) = x (n) is a clean signal, i is a wavelet basis number, and i belongs to Z.
And step 3: and calculating the denoising performance of the wavelet bases under the optimal decomposition layer number to obtain the optimal wavelet base with the optimal denoising performance.
The step 3 comprises the steps of:
step 31: evaluating performance evaluation indexes of a plurality of wavelet bases under the optimal decomposition layer number to obtain performance index data;
step 32: forward and standard processing is carried out on the performance index data to obtain the adjusted performance index data;
step 33: calculating the information entropy of the adjusted performance index data;
step 34: calculating the weight of each performance evaluation index according to the information entropy;
step 35: and evaluating the denoising performance according to the weight to determine an optimal wavelet basis.
The performance evaluation index comprises the root mean square error and the signal-to-noise ratio of the noise reduction data in the noise reduction process and the cross correlation of the noise reduction data and the original data.
The SNR is formulated as:
Figure BDA0003901271870000071
wherein y is i (n) is the reconstructed (denoised) signal, x (n) is the clean signal,
Figure BDA0003901271870000072
in order to be the power of the clean signal,
Figure BDA0003901271870000073
for the noise power, a larger SNR value indicates a better noise reduction effect.
The formula for the root mean square error RMSE is:
Figure BDA0003901271870000074
n is the number of the sampling points,
Figure BDA0003901271870000075
is the noise power. A smaller RMSE indicates a better noise reduction effect.
Forward processing formula in performance index data processing process
Figure BDA0003901271870000076
Formula of range method r i,j And information entropy E j Weight ω, weight ω i,j And Score i The formula is as follows:
Figure BDA0003901271870000077
Figure BDA0003901271870000078
Figure BDA0003901271870000079
wherein
Figure BDA0003901271870000081
Figure BDA0003901271870000082
Figure BDA0003901271870000083
And 4, step 4: selecting the optimal wavelet basis layered according to the optimal decomposition layer to carry out Malla = t decomposition on the source signal, and extracting an approximate coefficient cA by utilizing an appcoef function j Extracting detail coefficient cD by using detcoef function j Wherein j ∈ Z.
And 5: calculating local threshold thr of detail coefficient of each decomposition layer j The formula is as follows:
Figure BDA0003901271870000084
wherein j is the number of layers, and j belongs to Z. N is a radical of j Is the data length of the detail coefficient of the j-th layer,
Figure BDA0003901271870000085
is the variance of the noise, where w j,k ={cD 1,k ;cD 2,k ;…cD j,k ;cA j,k Is the kth wavelet coefficient of the largest wavelet entropy subband in the jth layer.
Threshold adjustment coefficient m = lg (S) j -1 ) (j 2) peak-to-peak ratio of layer j
Figure BDA0003901271870000086
The threshold adjusting coefficient m is used for judging the sparsity of the detail coefficient, and the smaller value indicates that more small-coefficient noise exists in the detail coefficient, and conversely, the smaller value indicates that only a small number of signals with large coefficient values exist. According to the characteristics, the threshold value adjusting coefficient m can dynamically adjust the local threshold value to ensure that a large number of small-coefficient noise packetsAnd when the noise is within the threshold range, coefficient compression is carried out by combining the wavelet threshold function generated by the invention, and the noise reduction effect is further improved.
Low frequency noise may also be present in consideration of the approximation coefficient, and the approximation portion therefore needs to be subjected to noise reduction processing. Since wavelet threshold denoising relies on the sparsity of wavelet coefficients and the selection of thresholds, while detail coefficients of low-frequency noise are non-sparse, the effectiveness of noise thresholds is limited. Therefore, in order to better remove low-frequency noise in the approximation coefficient, the invention calculates the peak-to-sum ratio of the approximation component of the last layer, according to the selection of signal characteristics and wavelets, the approximation component of the j-th layer can represent the degree of low-frequency noise-to-signal coefficient ratio in a relatively sparse manner, and the value of the signal coefficient is generally greater than that of the noise coefficient, so in the present embodiment, by comparing the peak-to-sum ratio of the approximation coefficient with the detail coefficient, the local threshold of the peak-to-sum ratio of the detail coefficient closest to the peak-to-sum ratio of the approximation coefficient is used as the threshold of the approximation coefficient.
Step 6: and generating a wavelet threshold function according to the local threshold and the approximate coefficient threshold, compressing the wavelet coefficient of the source signal according to the generated wavelet threshold function, reducing the noise signal and keeping the useful signal. The wavelet threshold function generated by the invention is expressed as an improved threshold function as follows:
Figure BDA0003901271870000091
in the formula
Figure BDA0003901271870000098
For wavelet coefficients compressed by a threshold function, w j,k For wavelet coefficients before compression, sgn (-) is a sign function, α, τ are adjustment factors, thr j Is a local threshold. To simplify the number of parameters to meet the first-order continuous guidance, it exists
Figure BDA0003901271870000092
The wavelet threshold function generated by the invention has the following properties:
Figure BDA0003901271870000093
Figure BDA0003901271870000094
Figure BDA0003901271870000095
the wavelet threshold function generated by the invention is w i,j About → infinity
Figure BDA0003901271870000096
The improved threshold function is continuous on the positive half shaft, and can be proved to be continuous on the negative half shaft in the same way, thereby effectively avoiding oscillation near the break point during signal reconstruction.
The effect of the soft threshold, the hard threshold, and the modified threshold function on the wavelet coefficient processing is schematically shown in fig. 6. By changing the value of the adjustment coefficient tau, the shape of the threshold function on both sides of the threshold can be dynamically adjusted. As τ is smaller, coefficients above the threshold converge less, while coefficients below the threshold are not directly zeroed out, which is advantageous in preserving the high frequency characteristics of the signal. Curves below the threshold converge to 0 more quickly and curves above the threshold converge to 0 slowly as τ is larger
Figure BDA0003901271870000097
And is beneficial to filtering noise signals.
And 7: and performing inverse wavelet transformation on the source signal processed by the wavelet threshold function to obtain a reconstructed source signal, and completing denoising processing on the electric energy data.
Referring to fig. 1 to 9, the improved threshold function was verified using Matlab software, and wavelet threshold denoising was performed on the Heavy Sine signal with different intensity of white gaussian noise added. Selected forThe threshold function for comparison is: soft threshold
Figure BDA0003901271870000101
Semi-soft threshold
Figure BDA0003901271870000102
Hard threshold
Figure BDA0003901271870000103
And garrot threshold function
Figure BDA0003901271870000104
The formula is expressed as:
Figure BDA0003901271870000105
Figure BDA0003901271870000106
Figure BDA0003901271870000107
Figure BDA0003901271870000108
the first embodiment is as follows: the implementation conditions comprise that the clean signal is a Heavy Sine signal, the noise is a white noise signal, the signal-to-noise ratio is 20.39dB, and the threshold rule is the local threshold thr of the invention j The threshold function selects the threshold function generated by the present invention.
Table 1: noise reduction results of the noisy Sine signals on different layers of the wavelet base sym3 are compared
Figure BDA0003901271870000109
As can be seen from table 1 and fig. 4 and 5, the number of optimal decomposition layers of the noisy signal in the wavelet basis sym3 is 6.
Table 2: denoising result contrast of Heavy Sine noise-containing signals under the optimal layer number of multiple wavelet bases
Figure BDA0003901271870000111
According to table 2 and fig. 5, it can be seen that the noisy signal of the Heavy Sine has the largest noise reduction performance score at the wavelet basis sym3, db 3. In this case, db3 corresponds to the optimal decomposition level number of 6, and the SNR, RMSE, and NCC values are the same as sym3, which indicates that there are two sets of the optimal wavelet bases and the optimal decomposition level numbers for the noisy signal.
Example two: the noise-containing signal in experiment 1 was denoised using five threshold functions, the threshold rule being: sqtwolog threshold, heursure threshold, miniMaxi threshold, local threshold thr of the invention j The regulating coefficient tau is sequentially selected from 20, 10,5,3,2,1 with the number of layers increasing.
Table 3: noise reduction performance index of five threshold functions under multiple threshold rules
Figure BDA0003901271870000121
It can be seen from the above table that the wavelet threshold function generated by the method of the present invention is used as an improved threshold function, which has a larger improvement in the noise reduction effect of the Heavy Sine noisy signal, and compared with the other four threshold functions, the wavelet threshold function generated by the method of the present invention has a larger SNR and a smaller RMSE.
Fig. 7 is a comparison graph of soft threshold, half soft threshold, hard threshold, garret threshold, and improved threshold functions for noise reduction of noisy signals in the first embodiment, where the threshold rules are: local threshold thr of the invention j
It can be seen from the figure that the waveform after the noise reduction of the hard threshold function is not smooth, and especially the noise cannot be filtered well at the turning point. The soft threshold function reduces noise and the signal is quite smooth, but over-chokes exist at signal details. The semi-soft threshold and the Garrote threshold function keep the detail characteristics of the signal to a certain extent, the smoothness of the noise reduction signal is better than that of the hard threshold function, but the comparison shows that a certain difference still exists between the noise reduction signal and the pure signal. The generated wavelet threshold function well inhibits overkill phenomenon and signal oscillation of detail coefficients, retains the characteristics of signals to the maximum extent and has obvious noise reduction effect.
Example three: five threshold functions are used for denoising the direct current signal, and the threshold rules are all the local threshold thr of the invention j The adjustment coefficients tau are sequentially selected from 20, 10,5,3,2,1 with increasing number of layers.
Fig. 8 and 9 are comparison of noise reduction results of dc voltage and current signals by using a plurality of threshold functions, respectively.
It can be seen from the figure that the hard threshold function has a general noise reduction effect on the pulsating noise and the ripple signal in the dc signal, and the waveform contrast before and after the dc voltage noise reduction is not obvious. The soft threshold function has a significant noise reduction effect on the voltage signal, but sacrifices detailed information. The semi-soft threshold and the Garrot threshold function have similar noise reduction effects, and are between the hard threshold and the soft threshold function. The wavelet threshold function generated by the invention effectively filters noise components in direct current voltage and current signals, and simultaneously well retains the characteristics of source signals, thereby being beneficial to the measurement of electric energy data.
The above provides the concrete implementation method and simulation verification of the invention. According to the results of the first embodiment and the second embodiment, the feasibility of selecting the optimal wavelet basis and the decomposition layer number method is shown; according to the second embodiment and the third embodiment, the improved threshold function is shown to be capable of effectively preserving signal characteristics while reducing noise to the maximum extent, and effectively improving the metering accuracy of the electric energy data.

Claims (10)

1. The electric energy data denoising method based on the optimal wavelet basis and the improved wavelet threshold function is characterized by comprising the following steps of:
step 1, sampling frequency f s Sampling electric energy data, and recording the electric energy data as a source signal s (n), wherein the source signal s (n) = x (n) + noise (n), wherein x (n) is a pure signal, and noise (n) is a noise signal;
and 2, step: calculating the optimal decomposition layer number of a plurality of wavelet bases according to the evaluation index;
and step 3: calculating the denoising performance of the wavelet bases under the optimal decomposition layer number to obtain the optimal wavelet base with the optimal denoising performance;
and 4, step 4: selecting the optimal wavelet basis layered according to the optimal decomposition layer to decompose the source signal to obtain the detail coefficient cD of each decomposition layer j And approximation coefficient cA of maximum decomposition layer j
And 5: calculating local threshold thr of detail coefficient of each decomposition layer j And estimating an approximate coefficient threshold of the maximum decomposition layer;
and 6: generating a wavelet threshold function according to the local threshold and the approximate coefficient threshold, and compressing the wavelet coefficient of the source signal according to the generated wavelet threshold function;
and 7: and performing inverse wavelet transform on the source signal processed by the wavelet threshold function to obtain a reconstructed source signal, and completing denoising processing of the electric energy data.
2. The method for denoising electric energy data based on optimal wavelet basis and improved wavelet threshold function according to claim 1, wherein in the step 2, the evaluation index comprises noise power P noise Sum noise power difference Δ P i The noise power P noise Sum noise power difference Δ P i Are respectively expressed as:
Figure FDA0003901271860000011
Figure FDA0003901271860000012
where N is the signal sample point length, y i (n) is a denoised signal, i is a wavelet base number, and x (n) = y 0 And (n) is a clean signal.
3. The method for denoising electric energy data based on an optimal wavelet basis and an improved wavelet threshold function as claimed in claim 2, wherein the step 2 comprises the steps of;
step 21: calculating the noise power of the same wavelet base under a plurality of decomposition layers;
step 22: after the noise power is sequenced, the noise power difference of adjacent noise power is calculated;
step 23: selecting a minimum noise power difference min (Δ p) i ) And to a lower noise power in the corresponding calculation;
step 24: taking the decomposition layer with smaller noise power as an optimal decomposition layer;
step 25: and repeating the steps 21 to 24 to determine the optimal decomposition layers of the rest wavelet bases.
4. The method for denoising power data based on an optimal wavelet basis and an improved wavelet threshold function as claimed in claim 1, wherein said step 3 comprises the steps of:
step 31: evaluating performance evaluation indexes of a plurality of wavelet bases under the optimal decomposition layer number to obtain performance index data;
step 32: forward and standard processing is carried out on the performance index data to obtain the adjusted performance index data;
step 33: calculating the information entropy of the adjusted performance index data;
step 34: calculating the weight of each performance evaluation index according to the information entropy;
step 35: and evaluating the denoising performance according to the weight to determine an optimal wavelet basis.
5. The method for denoising power data based on an optimal wavelet basis and an improved wavelet threshold function according to claim 4, wherein the performance evaluation indexes comprise a root mean square error and a signal-to-noise ratio of denoised data during denoising, and a cross-correlation of denoised data with original data.
6. The method for denoising electrical energy data based on optimal wavelet basis and modified wavelet threshold function as claimed in claim 1, wherein the method comprisesIn that the local threshold function described in step 5 represents thr j Comprises the following steps:
Figure FDA0003901271860000021
wherein j is belonged to Z, N j Is the data length of each decomposition layer coefficient, m is a threshold adjustment coefficient,
Figure FDA0003901271860000022
is the variance of the noise, where w j,k ={cD 1,k cD 2,k …cD j,k cA j,k And is the kth wavelet coefficient of the largest wavelet entropy subband in the jth layer.
7. The method for denoising electric energy data based on an optimal wavelet basis and an improved wavelet threshold function according to claim 6, wherein the formula of the threshold adjustment coefficient m is:
Figure FDA0003901271860000023
wherein the content of the first and second substances,
Figure FDA0003901271860000031
w j,k the kth wavelet coefficient of the largest wavelet entropy subband in the jth layer.
8. The method for denoising electric energy data based on an optimal wavelet basis and an improved wavelet threshold function according to claim 7, wherein in step 5, a peak and ratio of an approximation coefficient of a maximum decomposition layer is calculated, a peak and ratio of a detail coefficient where the peak and ratio of the approximation coefficient is closest to the peak and ratio of the detail coefficient is determined, and a threshold of the detail coefficient where the peak and ratio of the closest detail coefficient is located is used as the approximation coefficient threshold.
9. The method for denoising electric energy data based on an optimal wavelet basis and an improved wavelet threshold function as claimed in claim 1, wherein the expression of the wavelet threshold function generated in step 6 is:
Figure FDA0003901271860000032
in the formula
Figure FDA0003901271860000033
For the wavelet coefficient processed by the threshold function, sgn (-) is a sign function, alpha and tau are both regulating factors, and alpha satisfies the first-order continuous conductibility.
10. The method for denoising power data based on an optimal wavelet basis and an improved wavelet threshold function according to claim 7, wherein the expression of the adjustment factor α is:
Figure FDA0003901271860000034
where α and τ are both adjustment factors, and the local threshold function represents thr j
CN202211299583.3A 2022-10-21 2022-10-21 Electric energy data denoising method based on optimal wavelet basis and improved wavelet threshold function Pending CN115618204A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211299583.3A CN115618204A (en) 2022-10-21 2022-10-21 Electric energy data denoising method based on optimal wavelet basis and improved wavelet threshold function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211299583.3A CN115618204A (en) 2022-10-21 2022-10-21 Electric energy data denoising method based on optimal wavelet basis and improved wavelet threshold function

Publications (1)

Publication Number Publication Date
CN115618204A true CN115618204A (en) 2023-01-17

Family

ID=84864353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211299583.3A Pending CN115618204A (en) 2022-10-21 2022-10-21 Electric energy data denoising method based on optimal wavelet basis and improved wavelet threshold function

Country Status (1)

Country Link
CN (1) CN115618204A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116108336A (en) * 2023-04-13 2023-05-12 吉林省百皓科技有限公司 Chlorine dioxide sensor signal denoising method based on wavelet transformation
CN117093833A (en) * 2023-10-19 2023-11-21 青岛理工大学 Method and system for automatically selecting optimal wavelet denoising parameters
CN117421561A (en) * 2023-12-18 2024-01-19 中国海洋大学 Turbulence denoising method and system based on parameter optimization VMD (virtual machine direction detector) combined wavelet

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116108336A (en) * 2023-04-13 2023-05-12 吉林省百皓科技有限公司 Chlorine dioxide sensor signal denoising method based on wavelet transformation
CN117093833A (en) * 2023-10-19 2023-11-21 青岛理工大学 Method and system for automatically selecting optimal wavelet denoising parameters
CN117421561A (en) * 2023-12-18 2024-01-19 中国海洋大学 Turbulence denoising method and system based on parameter optimization VMD (virtual machine direction detector) combined wavelet
CN117421561B (en) * 2023-12-18 2024-03-12 中国海洋大学 Turbulence denoising method and system based on parameter optimization VMD (virtual machine direction detector) combined wavelet

Similar Documents

Publication Publication Date Title
CN115618204A (en) Electric energy data denoising method based on optimal wavelet basis and improved wavelet threshold function
CN107274908B (en) Wavelet voice denoising method based on new threshold function
CN112395992A (en) Electric power harmonic signal denoising method based on improved wavelet threshold
CN110151175A (en) Surface electromyogram signal noise-eliminating method based on CEEMD and improvement wavelet threshold
CN112380934A (en) Cable partial discharge signal self-adaptive wavelet denoising method based on wavelet entropy and sparsity
Jangjit et al. A new wavelet denoising method for noise threshold
CN112861740B (en) Wavelet threshold denoising parameter selection method based on composite evaluation index and wavelet entropy
CN116502042A (en) Power quality disturbance denoising method based on variational modal decomposition and improved wavelet threshold
CN106023103B (en) A kind of adaptive orthogonal wavelet image de-noising method based on the modeling of accurate local variance priori
CN110931039A (en) Wireless voice noise reduction device and method based on wavelet
CN114581674A (en) Wavelet denoising method based on improved threshold function
CN117056675A (en) Magnetic flux leakage signal noise reduction method based on combination of wavelet transformation and particle filtering
Özaydın et al. Speech enhancement using maximal overlap discrete wavelet transform
CN115798494A (en) Method and device for speech enhancement based on improved CEEMDAN algorithm
Vanithalakshmi et al. Wavelet Based Speech Enhancement Algorithm for Hearing Aid Application
Issaoui et al. Comparison between soft and hard thresholding on selected intrinsic mode selection
CN113505688A (en) Improved self-adaptive wavelet threshold signal denoising method
Sheikh et al. Compression and denoising of speech transmission using Daubechies wavelet family
CN115310478A (en) Method for extracting effective Raman spectrum of natural gas based on wavelet optimal decomposition layer number
Wang et al. Speech enhancement based on the combination of spectral subtraction and wavelet thresholding
Ning et al. A Wavelet Packet Speech Enhancement Algorithm Based on Energy Entropy Improvement
Yang et al. De-Noising Using Dual Threshold Function For Speaker Recognition At Low SNR
CN114859419A (en) Doppler high-frequency signal noise reduction method and system
CN117724177A (en) Transient electromagnetic data processing method based on RLMD-ApEn
CN114842863A (en) Signal enhancement method based on multi-branch-dynamic merging network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination