Smart grid data compression and reconstruction by wavelet packet transform

Highlights • The proposed design has a better compression ratio.• Low reconstruction error.• This design is easy to access, systematic, profitable, and not time-consuming.

share details.Hence it needs low data storage and adequate bandwidth for transmission.There are lossless and lossy techniques used in compression.It distorts the reconstructed signal in the lossy compression method.The Wavelet transforms under lossy methods are well with time and frequency localization.It is renowned for compressing variable frequency signals, non-periodic and transients, and describing the data with few coefficients [2][3][4].The electrical signal disturbances are voltage fluctuations, sag, swell, harmonics, impulse, etc., employing wavelet transform to segment [ 5 ].Wavelet Transform and the flexible threshold separate the disturbances like variable voltage, transients with impulse and oscillations, and distortions in the harmonic [ 6,7 ].Phasor Measurement Unit (PMU) signal compression using wavelet transform with Daubechies 2 is better than Coiflet 1 wavelet [ 8 ].Discrete wavelet transform(DWT) and wavelet packet transform (WPT) compress and reconstruct the data by threshold.The minimum description length (MDL) decides the suitable wavelet and most coefficients for signal reconstruction [ 9,10 ].Compressing and reconstructing actual and simulated oscillations decide a suitable scale and wavelet for decomposing data [ 11 ].Wavelet Transform effectively compresses the voltage sag signal in the smart grid [ 12 ].It compresses and analyzes data using wavelet transform [13][14][15][16].
It compresses and denoises smart grid system data by embedded zero tree wavelet transform(EZWT) [17][18][19].Wavelet packet decomposition (WPD) analyses, compresses, denoises, and reconstructs data by calculating a level-wise threshold [ 20 ].WPT compresses and reduces noise in the smart grid data.A threshold operates on the basis decided by the modified Shannon entropy i.e. weighted Entropy [ 21,22 ].Different wavelets are applied to reduce data storage and complexity using discrete wavelet transform [ 23 ].There can be better compression and reconstruction with a reduction of noise and complexity for smart grid signals using wavelet transform [ 24 ].It operates different wavelets, improves compression, and reduces noise by wavelet packet transform [ 25 ].It decides the wavelet function and the appropriate decomposition level for high compression of power quality disturbance signals [ 26 ].
The compressed sensing (CS) method detects frequencies causing harmonic distortion in voltage and current signals.It measures a matrix from a few random samples.It compresses the signal by converting the time domain signal to the frequency domain using a linear transformation.Then it reconstructs the signal with a few samples of the power signal by the inverse linear transformation [ 27 ].It researches regenerated signals after supply failures, pursuing the compressed sensing methods of basis, matching, and orthogonal matching search.It uses a heuristic, i.e., brute force, to get the quasi-optimal number of atoms in the instantaneous current and voltage signals.The minimum number of samples reconstruct the original signal from inadequate and random samples.The matching pursuit (MP) takes the least time and more samples than orthogonal matching pursuit (OMP).Basis pursuit (BP) and orthogonal matching need a long time to process a few scanty and arbitrary samples to recover the signal [ 28 ].In the smart grid, compressed sensing reconstructs and examines the wireless sensor networks' power quality.Up to 50 % of Nyquist's, voltage and current data from smart grids are evaluated and sampled using the Similarity and Threshold Regularized Orthogonal Matching Pursuit (STROMP) method [ 30 ].
The wavelet transform with multiresolution analysis (MRA) uses Daubechies wavelet of order two at decomposition level five to compress and denoise power system signals in Smart Grid [ 29 ].Electrical disturbance signal is compressed by wavelet packetenhanced arithmetic coding, which divides the signal into high and low frequency components for the optimal basis [ 31 ].Wavelets are appropriate for transient and discontinuous signals since they offer basis functions with a time-frequency.Wavelets are basic, fixed structures that express signals at the right levels and locations.Disturbance signals are compressed by the wavelet packet and discrete wavelet transforms.It displays a Wavelet Transform (WT) and Discrete Cosine Transform (DCT)-based comparative compression of an actual disturbance from a digital fault recorder.It effectively retrieves data about faults and disturbances from remote fault recorders and relays.Better CR and SNR necessitate appropriate selection of WT's order and scale [ 32 ].Because of the segments in the power quality meters in the Smart Grids, determining the beginning and end of disruptions is difficult.Wavelet transform is used by electrocardiograms to compress large amounts of data by breaking it down, applying threshold, encoding it with various wavelets, and then reconstructing it.The signal is more effectively compressed by the HAAR wavelet and local threshold [ 33 ].
Fuzzy transform is used in smart grids to minimize electrical signals.This creates and applies a matrix-based fuzzy transform for 2-D smart grid data compression using the least squares (LS) approximation.The 2-D data reduction matrix is created by adding up the 1-D power signals.From the data matrix division, create sub-matrices, and then compress each one using the discrete F transform with fuzzy partitions.In the LS approximation, the unknown variables are substituted for the discrete F-transform's variables, and the discrete inverse F-transform is generated by reducing the variation with respect to these unknown factors [ 22 , 34 ].
The enhanced disturbance compression method (EDCM) for voltage and current signals is based on the fundamental, harmonic, and transient coding method (FHTCM).It determines the amplitude, frequency, and phase of the fundamental and harmonic parts using notch filtering -warped discrete Fourier transform.It uses the minimal description length wavelet transform to compress only the transient coefficients.FHTCM outperforms WT-based and EDCM compression techniques [ 35 ].In order to estimate the fundamental sinusoidal component, it suggests an enhanced data compression method, which outperforms the standard disturbance compression method (SDCM) in terms of CR and SNR [ 36 ].
It is possible to reduce the complexity further and improve the compression ratio and reconstruction error.Therefore, the new method utilizes wavelet packet transform, integrating various low-order wavelets with a level wise appropriate threshold.The designed process will reduce complexity with better compression and minimum distortion at level 3 of decomposition.It compares the results with [ 19 , 23 , 25,26 ] and [ 28 ].
The present design depends on wavelet packet transform to compress and reconstruct data in a smart grid.The discrete wavelet transform develops into a wavelet packet tree DWT transmits a signal across a low-pass filter (LPF) and a high-pass filter (HPF) and down samples it by two employing the Pyramid Algorithm.The detail coefficients contain noise due to their high frequency; hence they are applied to threshold.It regenerates a signal by inverse discrete wavelet transform (IDWT).WPT represents the signal better with a proper subtree [ 10 , 12 ].It applies a threshold to the wavelet coefficients to compress and reduce noise and regenerate the signal.A hard threshold equals the component zero, having absolute values lower than a threshold.Soft-threshold equals zero; the components having absolute values lower than a threshold then reduce the non-zero components to zero [ 20 ].
The compression maintains the coefficients with disturbances and neglects the coefficients free from disturbances.It distorts the data due to the suppression of the noise.It applies the threshold t m k to the absolute maximum value of the original detail coefficients-C m k , as displayed below at the kth node of level m.
It selects 0 ≤  ≤ 1 .If  = 0.1 then threshold is 0.9 i.e. 90 % in Eq. ( 1) .It compresses the data better as it applies threshold to detail coefficients, but the reconstruction error is significant.The hard threshold operates as shown below [ 12 ] in Eq. (2) .
The coefficients C mm k can have soft or hard-threshold.In Fig. 1 , DWT further decomposes approximations and detail coefficients to obtain the complete wavelet packet tree.In the compression, it selects Daubechies filters db3 at level 1, db2 at level 2, and db1 at level 3, and for reconstruction, db1 at level 3, db2 at level 2, and db3 at level 1, as indicated in Fig. 2 .It decomposes the signal a 0 using a db3 wavelet at level 1 by DWT into approximation coefficients  1  1 and detail coefficients d 1 2 .It further disintegrates the approximation  1 1 into approximation coefficients  2   3   and detail coefficients d 2 4 using db2 wavelet by DWT at level 2. The detail coefficients d 1 2 decomposes from level 1 into approximation  2  5 and detail coefficients d 2 6 using the db2 wavelet by DWT at level 2. It further decays the approximation coefficients  2 3 into  3 7 and  3  8 , and detail coefficients d 2 4 into  3  9 and  3 10 from level 2 using db1 wavelets by DWT at level 3. Similarly,  2 5 and  2  6 are decomposed further from level 2 to level 3 by DWT using db1.
The optimal tree determines the coefficients for the compression and then reconstructs the signal by inverse discrete wavelet transform from the compressed signal.In the compression, the coefficients a 3  7 are pure approximation coefficients, and therefore it does not apply threshold to them.The detail coefficients d 3  8 ,  3  9 , and d 3 10 , a 3 11 ,  3  12 , a 3 13 , and d 3 14 are applied to hard threshold using Eq. ( 2) into coefficients d 33  8 ,  33  9 and d 33  10 and a 33  11 ,  33  12 , a 33  13 , and d 33  14 respectively.The coefficient a 22  3 is reconstructed by IDWT using db1 for the coefficients a 3  7 and d 33  8 at level 3.The coefficient d 22  4 is recreated by IDWT using db1 for the coefficients a 33 9 and d 33 10 at level 3. Similarly, the coefficients a 22  5 and d 22  6 are regenerated at level three by IDWT using db1 wavelet.The coefficient a 11  1 is reconstructed by IDWT using db2 for the coefficients a 22  3 and d 22  4 at level 2. The coefficient d 11  2 is recreated by IDWT using db2 for the coefficients a 22  5 and d 22  6 at level 2. Finally, the coefficient a 00 is regenerated by IDWT using db3 for the coefficients a 11 1 and d 11  2 at level 1.The non-zero coefficients are the summation of pure approximation coefficients at level 3, a 3  7 , other coefficients d 33  8 ,  33  9 and d 33  10 and a 33  11 ,  33  12 , a 33  13 , and d 33  14 at level 3 after applying threshold.

Datasets
To create the simulated faulty data of PMU current and voltage sag signals, MATLAB 2021a SIMULINK is utilized.A three phase to ground fault provides PMU current.To assess the proposed design in Table 1 , 2000 samples of the PMU fault current are taken.Furthermore, in order to run the suggested design in Table 2 , the voltage sag signal is investigated for 2816 samples.For comparison in Table 3 , different numbers of 357, 379,412, 501, and 512 samples are created for the voltage sag signal.
The proposed design tests wavelet packet transform on MATLAB 2021a algorithm for data compression and reconstruction.It operates two thousand samples of simulated PMU current magnitude signal [ 19 ] and compares the results with [ 19 , 23 , 25 ] as shown in Figs. 3 and 4 and Table 1 .It also operates 2816 samples of simulated voltage sag signal [26] and compares the results with [ 25,26 ] as shown in Fig. 5 and Table 2 .It also tests different number of samples of simulated voltage sag signal and compares the results with [ 25 ] and [28] in Table 3 .The performance parameters of proposed design are% compression ratio(%CR) and the reconstruction error as normalized root mean square error (NRMSE) as in [19][20].The performance of proposed design is also tested for% compression ratio(CR), and reconstruction error as normalized mean squared error(NMSE) as in [ 26 ].It calculates the absolute error between the original and the reconstructed signal.Then it obtains the percentage relative error e.It checks the performance of the present design by% reconstruction, as in [ 27,28 ].

% CR =
No of non zero coef f icients No . of coef f icients in the original signal x100% (4) % Reconst ruct ion = 100 −  (9) x(i), x n (i) and x r (i) are the original, noisy and regenerated signals respectively, for i ranging from 0 to N-1 samples.NRMSE/NMSE decides how accurately the regenerated signal describes the changes in the original signal.Fig. 3 represents the original PMU current signal of 2000 samples and its reconstructed signals are represented by Figs. 4 (a) to 4(d) .The original signal is noisy; hence it is applied to soft threshold by Eq. ( 3) for reducing noise by the appropriate percentage of the discrepancy between the noisy and the original signal.Then it is at hard threshold in Eq. (2) for compression.It suppresses the noise and almost reconstructs the quality signal.
In Fig. 4(a) , it reconstructs the signal with CR 30.40 % and poor NRMSE 2 of 0.14 in [ 23 ] using DWT .In Fig. 4(b) , it reconstructs the signal with CR 30.25 % and poor NRMSE 2 of 0.10 by WPT in [ 25 ].In Fig. 4(c) , it has reconstruction with CR 28.90 % and NRMSE 2 of 7.36x 10 −4 by the proposed design with level three WPT.In Fig. 4(d) , it has reconstructed with CR 16.15 % and NRMSE 2 of 1.2x 10 −3 by the proposed design using WPT at level three.It compares the reconstructed signals by the proposed design in Table 1 with results in [ 19 , 23 ] and [ 25 ].
Table 1 observes that proposed design compresses and reconstructs better than [ 19 , 23 , 25 ] for the PMU current magnitude signal.The algorithm in [ 23 ] has better compression 30.40 % but a poor reconstruction error 0.14 compared to [ 19 ].The algorithm in [ 25 ] has better compression 30.25 % but a poor reconstruction error 0.10 compared to [ 19 ].The proposed design has compressed the PMU signal 16.15 % and achieved NRMSE 2 of 1.2x 10 −3 which is still better than [ 19 , 23 ] and [ 25 ].The proposed design is simple as it achieves the better results at level 3 using lower order wavelets as compared to [ 19 , 23 ] and [ 25 ].
Fig. 5 displays the original voltage sag signal of 2816 samples in Fig. 5(a) .It is at hard threshold for compression and reconstruction as in Eq. ( 2) .In Fig. 5(b) , it describes the reconstructed signal with CR 25.96 % and NMSE 4.60x 10 −3 using the algorithm [ 25 ].In Fig. 5(c) , it has reconstruction with CR 26.17 % and NMSE 3.82x 10 −5 by proposed design using WPT.In Fig. 5(d) , it reconstructs the signal with CR 25.46 % and NMSE 5.14x 10 −5 by the proposed design using WPT.It compares the reconstructed signals by the proposed design in Table 2 with results in [ 25,26 ].
Table 2 notices that the proposed design has better reduction and reconstruction than [ 25,26 ] for the voltage sag signal.The proposed design has achieved compression ratio 25.46 % and NMSE 5.14x 10 −5 which is better than [ 25,26 ].
Fig. 6 represents the original voltage sag signal with 412 samples and the proposed design using WPT reconstructs it 99.97 % as shown in Fig. 7(a) with 81 samples and algorithm in [ 25 ] regenerates it 99.91 % with 81 samples as displayed in Fig. 7    The original voltage sag signal with 357 samples is given in Fig. 8 .The proposed design using WPT recreates it 99.97 % with 69 samples, as shown in Fig. 9(a) , and with 69 samples, as shown in Fig. 9(b) .The algorithm in [ 25 ] regenerates it with 99.91 %.The original voltage sag signal is presented in Fig. 10 with 379 samples.The proposed design using WPT regenerates it with 72 samples and 99.98 % accuracy, as shown in Fig. 11(a) .The algorithm in [ 25 ] regenerates it with 72 samples and 99.79 % accuracy, as shown in Fig. 11(b) .The original voltage sag signal with 501 samples is shown in Fig. 12 .The proposed design utilizing WPT recreates it 99.90 % with 94 samples, as shown in Fig. 13(a) , and with 94 samples, as shown in Fig. 13(b) .The approach in [ 25 ] regenerates it with 99.33 %.The original voltage sag signal with 512 samples is shown in Fig. 14 .The proposed design using WPT reconstructs it 99.88 % from 93 samples, as shown in Fig. 15(a) , and the algorithm in [ 25 ] regenerates it 99.66 % with 93 samples, as shown in Fig. 15(b) .The proposed design regenerates the signal more effectively than [ 25 ] utilizing WPT.It compares regenerated signals by proposed design in Table 3 with results in [ 25 ] and [ 28 ].
Table 3 compares results of voltage sag signal with [ 25 ] and [ 28 ] and obtains 19.33 % compression, 99.97 % reconstruction and NRMSE 1 of 5.  [ 25 ] and [ 28 ].Compared to [ 28 ], the suggested design has produced a higher percentage of the signal being reconstructed.With the same percentage of signal compression, the suggested design has a superior NRMSE 1 than [ 25 ].The algorithms in [ 25 ] and [ 28 ] are complex as in [ 25 ], it uses db3, db2, db2, db2 and db1 wavelets to decompose the signal at level 5 and [ 28 ] operates matrices.The proposed design utilizes db3, db2 and db1 with level 3, hence it is less complex as compared to [ 25 ] and [ 28 ].

Conclusions and future scope
The proposed design is based on the wavelet packet transform, which compresses and reconstructs data.The proposed design obtained better compression and reconstruction at level 3 with lower order wavelets as per Table 1 , 2 and 3 .The proposed design has compressed pmu current magnitude signal to 16.15 % with NRMSE 2 of 1.2 x 10 −3 in Table 1 .The proposed design has compressed a voltage sag signal with CR 25.46 % and NMSE of 5.14 x 10 −5 in Table 2 .Also, Table 3 presents a comparison of the proposed design for various voltage sag signal samples.From 357 original samples, the suggested approach achieves 19.33 % compression and NRMSE 1 of 5.20 x 10 −4 .It has an NRMSE 1 of 4.98 x 10 −4 from 379 original samples and compresses 19.00 %.From 412 original samples, it compresses 19.66 % with an NRMSE 1 of 4.69 x 10 −4 .It has an NRMSE 1 of 3.69x 10 −4 from 501 original samples and compresses 18.76 %.From 512 original samples, it decreases the signal by 19.53 % and the NRMSE 1 of 2.86 x 10 −4 .Better signal compression, a higher percentage of the signal being reconstructed, and an improved NRMSE 1, NRMSE 2 and NMSE have all been achieved with the proposed design.Compression and data storage by proposed design are economical, and it sends the data immediately.The present design is computationally not complex as it employs fewer lower-order wavelet filters at level 3.There is no need to decide appropriate subtree.There is flexibility to use different available filters.It has future scope for further improving data compression and reconstruction.

Table 1
Comparison of proposed design for PMU current signal.

Table 2
Comparison of proposed design for Voltage sag signal.

Table 3
Comparison of proposed design for Voltage sag signal.