Power grid disturbance signal denoising method based on improved BM3D
By improving the BM3D algorithm combined with the OMP algorithm, the signal-to-noise ratio improvement and signal detail retention problems in the power grid disturbed signal denoising are solved, efficient noise reduction and mean square error are achieved, and the accuracy of signal analysis of the power system is improved.
Patent Information
- Application Number
- CN202510835131.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-06-20
AI Technical Summary
The existing power grid disturbed signal denoising technology has shortcomings in terms of limited signal-to-noise ratio improvement, serious signal details loss, and high mean square error, which is difficult to meet the high-precision power system analysis needs.
The improved BM3D algorithm is used in combination with the OMP algorithm, and through block matching, sparseness analysis and weighted averaging technology, the noise is effectively removed and signal details are preserved. The specific steps include signal segmentation, block matching, sparse coefficient matrix calculation and overlapping block estimation.
It significantly improves the noise removal effect of the power grid disturbance signal, reduces mean square error, retains more signal details, and improves the signal-to-noise ratio and signal accuracy.
Smart Images

Figure CN120336727A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power system analysis, and specifically relates to a method for denoising grid disturbance signals based on improved BM3D. Background Art
[0002] With the rapid development of the new power system, a large number of nonlinear and impulsive loads are connected to the power grid, resulting in increasingly prominent power quality problems. These problems not only affect the stable operation of the power system, but may also cause significant economic losses to industrial production and daily life. Therefore, improving the stability and reliability of power quality has become an important goal in the current development of the power system. In the actual operation of the power grid, due to the influence of uncontrollable factors such as load mutations, line switching, and equipment failures, grid disturbance signals are often accompanied by a large amount of noise. These noises not only interfere with the normal operation of sensitive power equipment, but also greatly reduce the accurate identification and analysis of grid disturbance signals. Therefore, effectively denoising the noisy grid disturbance signal is the primary prerequisite for its accurate detection and analysis, and is of great significance for ensuring the safe and stable operation of the power system and improving the power supply quality.
[0003] In recent years, with the rapid development of electronic technology and digital signal processing, many denoising algorithms for grid disturbance signals have been proposed. These methods mainly include wavelet denoising algorithms, denoising algorithms based on mathematical morphology, and kernel regression denoising algorithms, etc. However, these methods still have some limitations in practical applications, which are specifically manifested as follows:
[0004] 1. Wavelet denoising algorithm: Due to its excellent time-frequency analysis ability, wavelet transform has been widely used in the field of signal denoising, and many improved wavelet denoising algorithms have been derived. However, the performance of the denoising algorithm based on wavelet transform depends to a large extent on the selection of the wavelet basis and the determination of the decomposition level. There are significant differences in the denoising effects of different wavelet bases, and in the processing of grid disturbance signals containing complex noises, the performance of traditional wavelet denoising algorithms is relatively low and it is difficult to meet the high-precision requirements.
[0005] 2. Mathematical morphology denoising algorithm: Mathematical morphology is a non-linear time-domain signal processing method based on set theory, which has the advantages of small computational amount and strong real-time performance. However, its denoising effect highly depends on the selection of the structural element in the morphological filter, including parameters such as shape and size. If the structural element is not selected reasonably, it will seriously affect the denoising effect of the signal, thereby weakening the identification ability of grid disturbance signals.
[0006] 3. Kernel regression denoising algorithm: Kernel regression is a non-parametric regression method that uses a kernel function (such as a Gaussian kernel function) to smooth the signal for denoising. Its advantage is that it does not require estimating the noise variance and setting the filtering threshold, and has strong adaptability. However, when dealing with strong noise or complex perturbation signals, the denoising performance of this algorithm is limited, and the reconstructed signal is prone to distortion, making it difficult to meet the actual application requirements. Summary of the Invention
[0007] Technical problems to be solved by this application: Aiming at the problems existing in the existing denoising technologies, such as limited improvement in signal-to-noise ratio, serious loss of signal details, and high mean square error, this application proposes a denoising method for power grid disturbance signals based on improved BM3D. This method combines the advantages of BM3D and OMP, and makes full use of the block-level correlation and sparsity characteristics of the signal, so as to achieve efficient denoising, while significantly reducing the mean square error and retaining more signal detail information.
[0008] To solve the above technical problems, this application adopts the following technical solutions:
[0009] A denoising method for power grid disturbance signals based on improved BM3D, including:
[0010] S101, collect the original power grid disturbance signal to obtain a one-dimensional sampling signal X with a length of N;
[0011] S102, for the sampling signal X, use segmentation blocks to divide the signal into equal-sized preliminary blocks, and these preliminary blocks are arranged in sequence to form a noisy two-dimensional matrix of M×L ;
[0012] S103, perform block matching operations on the preliminary blocks within to in sequence, and obtain a set of similar matching blocks for this preliminary block ; ;
[0013] S104, perform inverse one-dimensional DCT calculation on the set of similar matching blocks to obtain a two-dimensional coefficient matrix , and then perform two-dimensional DCT calculation on to obtain a sparse coefficient matrix in the two-dimensional DCT domain ;
[0014] S105, use the OMP algorithm to retain the best coefficients, complete filtering and obtain a coefficient matrix ;
[0015] S106, re-evaluate and perform weighted averaging by integrating overlapping blocks to obtain the finally denoised signal.
[0016] Optionally, the detailed steps of S102 include:
[0017] For the test signal X, perform segmentation and combination processing on the signal using segmentation blocks to obtain : Use a sliding block Q with a length of L, where L < N and the sliding step size is , segment the signal from left to right, and divide the signal into a total of equal-sized preliminary blocks. Arrange these preliminary blocks in order to form a noisy two-dimensional matrix of M × L . The specific expression of
[0018]
[0019] Optionally, the detailed steps of S103 include:
[0020] Perform a block matching operation on each preliminary block of the segmented two-dimensional matrix within a specified search range. Select the current block as the execution block, and with as the center, select a region with a diameter of R as the search region. All blocks within the search region are regarded as candidate matching blocks. Taking as an example, for each candidate matching block within the search region, where m is selected within the search range, calculate the distance between them and the execution block . The specific formula is:
[0021]
[0022] where ; is the one-dimensional DCT filtering operation performed on the preliminary blocks within the search range;
[0023] Arrange the calculated distances from smallest to largest and sequentially select the blocks that are most similar to the execution block in terms of distance. When determining whether two blocks are similar, in this application, the threshold is directly set to a fixed value . The blocks with the closest distance to the execution block are grouped into the similar matching block set ;
[0024] When performing one-dimensional DCT filtering on the execution block and the matching blocks, assume that the one-dimensional DCT coefficients of are represented by
[0025]
[0026] After the above processing, for all the preliminary blocks within , perform filtering to achieve the initial denoising of the noisy two-dimensional matrix and obtain the two-dimensional matrix after preliminary denoising; by comparing the average amplitude difference between the matrices and before and after preliminary denoising, the noise intensity of the original noisy signal can be initially estimated. Using this information, when selecting coefficients in the subsequent steps, the OMP algorithm can be used to select an appropriate residual threshold as the termination condition for iteration.
[0027] Optionally, the detailed steps of S104 include:
[0028] After determining the similar matching blocks of the execution blocks, two-dimensional collaborative transformation and final filtering processing need to be performed on the similar matching blocks, which specifically include the following steps:
[0029] S201, perform one-dimensional inverse DCT on the similar matching block to obtain the block matrix ;
[0030] S202, perform two-dimensional DCT on it, that is, first perform one-dimensional DCT on each row of the matrix respectively, and then perform one-dimensional DCT on each column to obtain the two-dimensional DCT sparse coefficient matrix ;
[0031] S203, in the two-dimensional transform domain, the OMP algorithm can utilize the sparsity of the block matrix in the two-dimensional transform domain to effectively perform sparse representation of the signal and select appropriate coefficients.
[0032] Optionally, the detailed steps of S106 include:
[0033] After filtering in the two-dimensional transform domain, due to the overlap between blocks and the fact that different similar groups may also contain the same matching blocks, it is necessary to perform weighted averaging on the filtering results from these different combinations to obtain the estimated value of the block. The weighted estimation process includes the following steps:
[0034] S301, define the basic weight value of the current block as:
[0035]
[0036] where, is the number of non-zero elements in the matrix coefficients of the current block after filtering in the two-dimensional transform domain;
[0037] S302, since the two-dimensional DCT process may cause boundary effects, to reduce its influence, the present application introduces the Kaiser window function W for weighted processing on the filtered coefficient matrix Perform an inverse two-dimensional DCT to obtain a reconstruction estimate ;
[0038] S303, The final denoising result of the noisy signal is integrated as follows:
[0039]
[0040] where, is the estimated value of the perturbed signal after denoising; (i, j) is the reconstruction estimation matrix; M is the total number of matching blocks; S is the number of similar matching blocks; L is the length of the similar matching block; is the characteristic function of the similar matching block.
[0041] Compared with the traditional denoising method, this application combines the advantages of BM3D and OMP, significantly improving the denoising effect of the power grid perturbation signal, and mainly has the following advantages:
[0042] 1. The improved BM3D algorithm only uses 5 parameters, simplifies the complexity of parameter setting, reduces the computational overhead, and reduces the difficulty of parameter tuning, making the algorithm more convenient and efficient in actual use.
[0043] 2. The improved BM3D algorithm introduces the OMP algorithm to replace the traditional hard threshold filtering to control the optimization process of the sparse coefficients, can more effectively select appropriate coefficients, and reduces the loss of signal details during the filtering process. By adopting the grouping technology and sparse optimization method based on similar matching blocks, the correlation and sparsity of the signal are effectively enhanced, and the signal restoration accuracy is improved.
[0044] 3. The improved BM3D algorithm uses block matching and weighted estimation technology, can efficiently eliminate the influence of noise on the signal, and thus significantly reduces the mean square error. Brief Description of the Drawings
[0045] Figure 1 is the basic flowchart of the method of the embodiment of this application.
[0046] Figure 2 is the diagram for selecting parameters R and S in the embodiment of this application.
[0047] Figure 3 is the comparison diagram of the denoising waveforms of the oscillating signal in the embodiment of this application. Among them, 3(a) is the original noisy waveform diagram; 3(b) is the waveform diagram after denoising by the algorithm of this application; 3(c) is the waveform diagram after wavelet denoising.
[0048] Figure 4 is the comparison diagram of the denoising waveforms of the interrupted signal in the embodiment of this application. Among them, 4(a) is the original noisy waveform diagram; 4(b) is the waveform diagram after denoising by the algorithm of this application; 4(c) is the waveform diagram after wavelet denoising. Detailed Embodiment
[0049] Grid disturbance signal denoising method based on improved BM3D, and the specific implementation manner includes:
[0050] S101, collect the original grid disturbance signal to obtain a one-dimensional sampling signal X with a length of N;
[0051] S102, for the sampling signal X, use segmentation blocks to divide the signal into equal-sized preparatory blocks, and these preparatory blocks are arranged in order to form a noisy two-dimensional matrix of M×L ;
[0052] S103, for the inner preparatory blocks to perform block matching operations in sequence to obtain a set of similar matching blocks for this preparatory block ;
[0053] S104, perform one-dimensional inverse DCT calculation on the set of similar matching blocks to obtain a two-dimensional coefficient matrix , and then perform two-dimensional DCT calculation on to obtain a sparse coefficient matrix in the two-dimensional DCT domain ;
[0054] S105, use the OMP algorithm to retain the best coefficients, complete filtering and obtain the coefficient matrix ;
[0055] S106, obtain the finally denoised signal by integrating overlapping blocks for re-evaluation and weighted averaging.
[0056] In S102, S103 and S105, there are 5 parameters involved, including the length L of the block sliding block, the block sliding step size , the search area R of the similar matching blocks, the number S of the similar matching blocks, and the residual threshold and so on.
[0057] For the selection of , it can be referenced according to the average amplitude difference obtained under different noise intensities and the residual threshold, as shown in the following table.
[0058]
[0059] As can be seen from Table 1, under different noise intensities, the average amplitude difference shows obvious differences, and the amplitude difference is also larger when the noise is larger. With the help of this amplitude difference, an appropriate residual threshold can be selected targeted to ensure the efficiency of the OMP algorithm.
[0060] Regarding the selection of the parameters of L and : Since these two parameters affect the noisy two-dimensional matrix after segmentation Its size and the running speed of the algorithm have little impact on the actual denoising effect.
[0061] In this application, the signal-to-noise ratio (SNR) and mean square error (MSE) after signal denoising are used as the evaluation criteria for the denoising effect. The specific formulas are as follows:
[0062]
[0063]
[0064] In the improved algorithm proposed in this application, it is necessary to select an appropriate similar block search area R and the number S of similar block matches to find the best quantity and quality of similar blocks. The specific simulation test results are as Figure 2 shown.
[0065] As Figure 2 can be seen, the selection of R and S is crucial for the final signal denoising effect, and it is necessary to satisfy S < R, that is, to ensure that the number of matching blocks is less than the total number of blocks within the search range. When selecting the parameter S, it should be ensured that its value is between 50 and 400 to avoid too few similar blocks due to too small a value, while too large a value will result in too many low-similarity blocks in the similar matching blocks, thus causing greater interference to the result integration. For the parameter R, its value range should be kept within 200 - 913. An overly large search area R will increase the running time cost of the algorithm, while an overly small search range R will result in too few similar matching blocks within the search range.
[0066] To balance the efficiency and quality of denoising, in this application, the values of L, , S, and R are taken as 30, 4, 61, and 313 respectively.
[0067] This application also conducts a comparative test on the proposed method and the traditional db5 wavelet denoising algorithm for the noisy oscillating and interrupted signals. The specific waveform results after the two processes are shown in Figures 3 and 4 respectively.
[0068] As can be seen from FIGS. 3 and 4, there are significant differences in the denoising effects between the method proposed in this application and the traditional wavelet denoising method. The voltage waveform processed by the traditional wavelet denoising method still has a lot of residual noise during interruptions and oscillations, resulting in an uneven waveform. In addition, this method wrongly filters out some key information in the voltage oscillation signal, affecting the integrity of the signal. In contrast, the method proposed in this application shows excellent performance in processing these signals. Specifically, this application can not only effectively filter out most of the noise and improve the smoothness of the denoised signal waveform, but also better retain the key feature information of voltage interruptions and oscillations, thereby providing more accurate and reliable denoising results. Therefore, this application is significantly superior to the traditional wavelet denoising method in terms of denoising performance, especially when processing power grid disturbance signals with complex noise, and can better retain the key feature information of the signal.
[0069] To further verify the superiority of this application in denoising, a comparative experiment of evaluation indexes was carried out for different algorithms. It includes a total of three single-frequency disturbance signals such as voltage sags, interruptions and oscillations, as well as harmonic multi-frequency disturbance signals. The db5 and bior2.2 wavelet denoising algorithms were used to test the above signals. During the simulation process, Gaussian white noise of 10, 15, 20, 25 and 30 dB was superimposed on the signals respectively. Considering the randomness of the noise, all algorithms were tested 1000 times to ensure the reliability of the results. Finally, the average SNR value and MSE value of the denoised signals obtained by different algorithms were calculated, and the specific results are shown in the following table.
[0070]
[0071] It can be seen from the data analysis in Table 2 that the algorithm proposed in this application is superior to the db5 and bior2.2 wavelet denoising methods in terms of the two evaluation indexes of SNR and MSE under four different disturbance signals and different signal-to-noise ratios. The SNR value obtained after denoising the voltage sag signal by this application is 2 to 6 dB higher than that of the traditional wavelet denoising method, and the MSE value is significantly reduced; after denoising the voltage interruption signal, the SNR value is increased by 3 to 4 dB, and the MSE value is reduced, and the signal recovery is more accurate; in the voltage oscillation signal, although under the condition of high noise level, the SNR obtained by this application for denoising is slightly higher than that of the db5 wavelet denoising method, but when the original SNR is greater than 15 dB, the denoising effect is significantly improved, the SNR value after denoising increases greatly, and the MSE value is reduced; in the processing of harmonic signals, the SNR and MSE after denoising by this application are better than those of the db5 and bior2.2 wavelet denoising methods, showing stronger denoising ability and signal recovery performance.
[0072] Among the evaluation indexes of denoising results, the ability to retain mutation point information is an important index, which can reflect the ability of the algorithm to capture and retain signal mutation points. This index is based on the denoising error To show the degree of closeness between the amplitude of the denoised signal at the mutation point and the ideal amplitude. Denoising error The specific calculation formula is as follows:
[0073]
[0074] Among them, is the amplitude of the mutation point of the original signal; is the amplitude of the mutation point of the denoised signal.
[0075] Select a voltage sag signal with 30 dB of added noise, and assume that the sag mutation point occurs at 0.0925 s and ends at 0.1425 s. Comparative experiments are carried out using this application and db5 wavelet and bior2.2 wavelet. The test results obtained from the experiments are shown in the following table.
[0076]
[0077] As can be seen from Table 3, this application achieves a smaller denoising error when processing this voltage sag signal. This shows that this application performs best in terms of the restoration ability at the mutation point, can retain the original information of the signal to the greatest extent, and is superior in retaining the information at the signal mutation point.
[0078] In summary, based on the good denoising performance of the BM3D algorithm, this application improves it by utilizing the sparsity of similar matching blocks in the transform domain and efficiently retaining the effective coefficients using the OMP algorithm. The improved BM3D algorithm proposed in this application can not only effectively remove noise but also better retain the detailed information of the original signal. The test results under different power grid disturbance signals and different signal-to-noise ratio conditions show that this application significantly improves the signal-to-noise ratio of the denoised signal and greatly reduces the mean square error. In addition, this application performs more excellently in terms of the retention ability of the mutation point amplitude and can retain the key feature information of the signal in the denoising process of various power grid disturbance signals.
Claims
1. A denoising method for power grid disturbance signals based on improved BM3D, characterized in that Including: S101, collect the original power grid disturbance signal to obtain a one-dimensional sampling signal X of length N; S102. For the sampled signal X, use segmentation blocks to divide the signal into equal-sized preliminary blocks. These preliminary blocks are arranged in sequence to form a noisy two-dimensional matrix of M×L. ; S103, for the preliminary blocks within to perform block matching operations in sequence to obtain a set of similar matching blocks for the preliminary block ; S104, perform one-dimensional inverse DCT calculation on the set of similar matching blocks to obtain a two-dimensional coefficient matrix , and then perform two-dimensional DCT calculation on to obtain a sparse coefficient matrix in the two-dimensional DCT domain ; S105, use the OMP algorithm to retain the optimal coefficients, complete filtering, and obtain the coefficient matrix ; S106, perform re-evaluation and weighted averaging through integrating overlapping blocks to obtain the finally denoised signal.
2. The method for denoising grid disturbance signals based on improved BM3D according to claim 1, characterized in that In step S102, for the one-dimensional power grid disturbance signal X with length N, using a sliding block Q with length L, it is necessary to satisfy L < N and the sliding step size is , and the signal is segmented from left to right, and the signal is segmented into a total of equal-sized preliminary blocks. These preliminary blocks are arranged in order to form a noisy two-dimensional matrix of M×L .
3. The method for denoising power grid disturbance signals based on improved BM3D according to claim 1, wherein, In step S103, for each preliminary block of the segmented two-dimensional matrix , perform a block matching operation within the specified search range, and select the current block as the execution block. Taking as the center, select a region with a diameter of R as the search region. All blocks within the search region are regarded as candidate matching blocks. Taking as an example, for each candidate matching block within the search region, m needs to be selected within the search range, and calculate the distance between them and the execution block . The specific formula is as follows: Among them, ; Perform one-dimensional DCT filtering operation on the preparatory blocks within the search range; When performing one-dimensional DCT filtering on the execution block and the matching block, assume that the one-dimensional DCT coefficients of are represented by, then the selection of the threshold can be defined by the following formula: After the above processing, for all the preliminary blocks within filtering is performed to achieve the initial denoising of the noisy two-dimensional matrix and obtain the two-dimensional matrix after preliminary denoising; by comparing the average amplitude differences between the matrices and before and after preliminary denoising, the noise intensity of the original noisy signal can be preliminarily estimated. Using the average amplitude difference, when selecting subsequent coefficients, an appropriate residual threshold can be selected through the OMP algorithm as the termination condition for iteration.
4. The method for denoising power grid disturbance signals based on improved BM3D according to claim 3, wherein, Arrange the calculated distances in ascending order and sequentially select the blocks that are most similar to the execution block. When determining whether two blocks are similar, directly set the threshold to a fixed value , and for the blocks that are closest in distance to the execution block , classify them into the similar matching block set .
5. The method for denoising power grid disturbance signals based on improved BM3D according to claim 1, characterized in that, After determining the similar matching blocks of the execution blocks in step S104, two-dimensional collaborative transformation and final filtering processing need to be performed on the similar matching blocks, which specifically include the following steps: S201, perform one-dimensional inverse DCT on the similar matching blocks to obtain a block matrix ; S202, perform two-dimensional DCT on it, that is, first perform one-dimensional DCT on each row of the matrix respectively, and then perform one-dimensional DCT on each column to obtain a two-dimensional DCT sparse coefficient matrix ; S203. In the two-dimensional transform domain, the OMP algorithm can utilize the block matrix to sparsely represent the signal effectively based on the sparsity in the two-dimensional transform domain and select appropriate coefficients.
6. The method for denoising power grid disturbance signals based on improved BM3D according to claim 1, wherein In step S105, the specific process of the OMP algorithm is as follows: S301, Initialization: Set the sensing matrix as , the number of iterations as , , the number of iterations , , and the termination iteration threshold as ; S302, calculate the inner product and find the corresponding number of atoms to form a support set and calculate : , , ; S303, backtrack to select the best atoms, form a new support set and recalculate : , ; S304, Calculate the residual: ; S305, if , then let , and repeat step S302; otherwise, let stop iteration, and use the obtained atoms to get the reconstruction coefficient ; In the above process, is a measurement vector with a size of M×1; is the set of indices for the 0th iteration; is the current residual, initialized to , and updated in each round; is the sparse coefficient estimate calculated by the least squares method in the th iteration; is the set of candidate atom indices selected from the inner product in the th step; is the sparsity; is the support set of the previous iteration; is the submatrix on the current support set, that is, the corresponding columns are selected from A; is the submatrix corresponding to the currently updated support set; is the most relevant atom index selected from the projection of the current atom and the residual; is the residual after the current iteration, that is, the difference between the measurement vector and the current reconstructed signal.
7. The method for denoising grid disturbance signals based on improved BM3D according to claim 1, characterized in that After two-dimensional transform domain filtering in step S106, due to the overlap between blocks and different similar groups may also contain the same matching blocks, it is necessary to perform weighted averaging on the filtering results from different combinations to obtain the estimated value of the block. The weighted valuation process includes the following steps: S401, Define the base weight of the current block For Among them, is the number of non-zero elements in the matrix coefficients after two-dimensional transform domain filtering of the current block; In S402, since the two-dimensional DCT process may cause boundary effects, to reduce their impact, the Kaiser window function W is introduced for weighted processing on the coefficient matrix after filtering to perform an inverse two-dimensional DCT to obtain a reconstructed estimation matrix ; S403, the final denoising result of the noisy signal is integrated as follows: Among them, is the estimated value of the perturbed signal after denoising; (i, j) is the reconstruction estimation matrix; M is the total number of matching blocks; S is the number of similar matching blocks; L is the length of the similar matching block; is the characteristic function of the similar matching block.
Citation Information
Patent Citations
Compressed sensing based CCD (Charge Coupled Device) noise estimation method
CN102436646A
Natural image denoising method based on regionalism and dictionary learning
CN103093433A
Deblocking effect method and device based on pseudo-analog video transmission
CN112085667A
Disturbance signal denoising method based on adaptive estimation threshold method
CN114358040A
Quantitative phase imaging method based on Hilbert transform phase demodulation and BM3D denoising
CN114359097A