Vous êtes sur la page 1sur 4

Data Compression of Power Quality Disturbances Using Wavelet Transform and Spline Interpolation Method

Gabriel Gpresc
Departament of Electronic and Optical Measurements Politehnica University of Timioara Timioara, Romania gabriel.gasparesc@etc.upt.ro
AbstractIn this paper is described a data compression technique based on wavelet decomposition and spline interpolation for power quality disturbance. The technique consist in signal decomposition, thresholding of wavelet transform coefficients, decimation of the last coefficient and signal reconstruction using spline interpolation for the last coefficient. The optimal order of Daubechies scaling function recommended in order to achieve the best compression ratio and comparative compression results using different types of power quality disturbances are also presented. This technique is suitable mainly for data acquired at high sample rates. Keywords-data compression; Wavelet transform; interpolation power quality disturbance;

disturbances presence, consist in reduction of the number of samples. One of the methods to chose the threshold level is based on calculation of the absolute maximum value of the wavelet transform coefficients

S = (1 u ) max{ Di (n) }

(1)

where u take values in the range 0 u 1 and s is the associated scale. The coefficient samples that are smaller than the chosed threshold are discarded and those that are larger are stored together along with their temporal positions

I.

INTRODUCTION

Di (n), D i (n) s DiS (n) = . 0, D i (n) < s


S fi S fc

(2)

In the last decades devices and equipments more sensitive to electromagnetic disturbances have appeared, also the expansion of the suppliers, the competition on the market, the increase of the studies in this field, the better informed customers have led nowdays to higher requirements for power quality. The classification of power quality disturbances phenomena include a significant number of types, which cover a broad frequency spectrum, starting from a few Hz (flicker) to a few MHz (transient phenomenas). The signal acquisition process require high sampling frequencies of the order of MHz. A single captured event recorded using a monitoring system produce megabytes of data. As result are aquired large volume of data which leads to large volume of storing data and proportional costs. The aim of data compression techniques is to reduce these costs. II. DATA COMPRESSION USING WAVELET TRANSFORM

The data compression ratio is defined as the ratio of a given data file before (Sfi) and after (SfC) compression.

CR =

(3)

The evaluation of the signal quality after compression is calculated using the normalized mean-square error, a low value of NMSE correspond to a small error between the reconstructed and initial signal

NMSE =

X ( n) X C ( n ) X ( n)
2

(4)

The wavelet transform allow compression of a given signal using certain steps [2], [3], [4], [5], [6], [7]: signal decomposition, thresholding of wavelet transform coefficients and than signal reconstruction from decomposition coefficients. The thresholding of wavelet transform coefficients for a signal X (D1, D2, ..., DN), which present peaks asociated with
Figure 1. Compression and reconstruction scheme

Next it is analyzed the influence of the order of Daubechies scaling function and of the number of decomposition levels for three sinusoidal signals disturbed with three types of disturbances (noted S1, S2 and S3 in the next tables) and white noise: impulsive transient, oscillatory transient and voltage sag [1]. First signal, S1, is a sinusoidal signal with a frequency of 50 Hz and a amplitude of 220 V, disturbed with a biexponential impulse with a amplitude of 1000 V and white noise (figura 2). The sampling rate is 20 kHz. The signal is decomposed using a Daubechies scaling function of order 3, 4 and 5 and respectively 3 and 4 levels of decomposition. Than the signal it is compressed using the threshold values 5 and 10 (table 1). The size of the wavelet transform coefficients after compression using the relations (1) and (2) is reduced as follows (first line from table 1): the coefficient D1 at scale 1 has 2*6=12 samples (6 samples nonzero and their temporal positions), the coefficient D2 at scale 2 has 2*7=14 samples, the coefficient D3 has 2*13=26 samples and the coefficient A3 has 254 samples. The compressed signal has 330 samples and the initial signal S1 2000. The compression ratio is 2000/306=6.54 (figure 2).

c) the wavelet transform coefficients after applying the thresshold Figure 2. Wavelet decomposition and reconstruction for the first signal

From table 1 can be observed that the highest compression rate of the signal S1, 11.43, is obtained for Daubechies scaling function of order 4 (Db4), 4 levels of decomposition and the threshold value of 10. The scaling function Db5 has a superior order but cannot improve the compression ratio. The order of NMSE error is 10-6. Once the threshold value is greater than 5 (figure 2) the signal distortions start to rise especially in the area of the overlapped biexponential impulse. The enlargement of threshold leads to more and more eliminated details of the wavelet transform coefficients and the NMSE error between the reconstructed and initial signal grow up.
TABLE I. Signal S1 S1 S1 S1 S1 S1 S1 S1 S2 S2 S2 S2 S2 S2 S2 S2 S3 S3 S3 S3 S3 S3 S3 S3 COMPRESSION RESULTS FOR THE SIGNALS S1, S2 AND S3 (t) Db3 Db3 Db3 Db4 Db4 Db4 Db5 Db5 Db3 Db3 Db3 Db4 Db4 Db4 Db5 Db5 Db3 Db3 Db3 Db4 Db4 Db4 Db5 Db5 Levels 3 4 5 3 4 4 4 4 3 4 5 3 4 4 4 4 3 4 5 3 4 4 4 4 S 5 5 5 5 5 10 5 10 5 5 5 5 5 10 5 10 5 5 5 5 5 10 5 10 NMSE [%] 3.5169e-006 4.3958e-006 8.4191e-006 3.9161e-006 4.3544e-006 8.5693e-006 3.4653e-006 7.2598e-006 6.5222e-006 7.3752e-006 1.0764e-005 6.3928e-006 6.7851e-006 1.7938e-005 6.8202e-006 3.1692e-005 3.4785e-006 4.2332e-006 1.0764e-005 3.9657e-006 3.8236e-006 7.6169e-006 4.8880e-006 1.6714e-005 CR 6.54 10.87 9.95 6.849 10.36 11.43 10.15 10.69 4.81 6.35 6 4.975 6.56 7.27 6.69 8.1 6.76 10.45 6 6.67 9.76 10.81 9.05 11.05

a) the initial signal, the reconstructed signal and the error between them

b) the wavelet transform coefficients

an

The second signal, S2, is a sinusoidal signal disturbed with oscillatory transient obtained by multiplying the

biexponetial impulse, overlapped on signal S1 before, with a sinusoidal signal with a frequency of 1500 Hz. The dates from table 1 about the second signal S2 shows in this case that the highest compression ratio of the signal S2 is 8.1. It is obtained for the same order of Daubechies scaling function and levels of decomposition like the signal S1. The order of NMSE error has increased to 10-5. The third signal, S3, is a sinusoidal signal disturbed with a voltage sag of 375 V with a duration of 40 ms. The dates from table 1 associated with the third signal S3 show a maximum compression ratio of 11.05, as result of using the Daubechies scaling function of order 5 (Db5) and the same levels of decomposition. The order of NMSE error is 10-6 like for the first signal S1. A few observations about signal compression base on the dates from table 1 are: - in order to obtain the highest compression ratio are necessary 4 levels of decomposition; - the incrise of threshold value leads to the increas of the compression ratio but also of NMSE error; - the highest compression ratios are obtained for Daubechies scaling function of order 4 (Db4) and 5 (Db5); - for different types of disturbances overlapped on a sinusoidal signal using a certain Daubechies scaling function and number of decomposition levels the compression ratio is different; - if the threshold values do not exceed 10 the order of NMSE order is 10-6 or 10-5. III. INTERPOLATION METHODS

IV.

PROPOSED ALGORITHM

The algorithm proposed (figure 3) for signal compression using wavelet decomposition and spline interpolation method, described below, follows to obtain a higher compression ratio like in the examples presented before, where was used the classical wavelet compression method: for a given signal it is applied a signal decomposition and than thresholding of wavelet transform coefficients Di, i=1,...,N. Using this method the coefficient AN is not thresholded and it has the largest number of samples from all the coefficients of signal decomposition. In order to obtain a higher sample rate this coefficient is decimated with a decimation factor Fd and at signal reconstruction will be interpolated. The cost is the increase of NMSE error. The spline interpolation method was selected after the results comparison with the Hermite cubic interpolation methode base on the obtained values of NMSE error for the signals S1, S2 and S3 using the decimation factor value of 2 and the threshold value of 1 (table 2, where NMSE1 correspond to spline interpolatin and NMSE2 to Hermite cubic interpolation). The dates from table 2 show for the signal S1 that the second digit of NMSE1or first are a little bit greater than at NMSE2, as the signal duration decrease under the value of 0.8 ms and in the rest of the situations the both errors are equal. In the case of the signal S2 the fourth digit of NMSE1or the third is lower than at NMSE2 in all considered cases. Finally, for the signal S3 the second digit of NMSE1 or the third are lower than at NMSE2. Overall first interpolation methode leads in the majority of situations to a smaller NMSE error.
TABLE II. Signal S1 S1 S1 S1 S1 S1 S1 S1 S2 S2 S2 S2 S3 S3 S3 S3 (t) Db5 Db5 Db5 Db5 Db5 Db5 Db5 Db5 Db5 Db5 Db5 Db5 Db5 Db5 Db5 Db5 RESULTS OF THE SPLINE AND HERMITE CUBIC INTERPOLATION METHODS D[ms] 0.05 0.1 0.2 0.8 3 5 7 17 3 5 7 17 10 20 30 40 NMSE1 [%] 4.1020e-004 2.7158e-004 2.2901e-004 1.4098e-004 1.3885e-004 1.3818e-004 1.4999e-004 1.7337e-004 3.2428e-004 4.4387e-004 6.4131e-004 7.7989e-004 1.5087e-004 1.5485e-004 1.5273e-004 1.5046e-004 NMSE2 [%] 4.0699e-004 2.7087e-004 2.2876e-004 1.4098e-004 1.3885e-004 1.3817e-004 1.4999e-004 1.7337e-004 3.2429e-004 4.4388e-004 6.4132e-004 7.7990e-004 1.5114e-004 1.5517e-004 1.5246e-004 1.5070e-004

The fourth section of the paper describes a data compression algorithm base on interpolation using spline and Hermite cubic interpolation method and the results comparison for three types of signals. Additional theoretical details of the two interpolation methods are presented below [8]. Given an interval [a,b] and a divizion :a=x0<x1<...<xn=b, a function S : [a,b] R is called cubic spline interpolation function if this function meets the next conditions: -

S is a polynomial of degree at most 3 on any interval (xk,xk+1), k=1,,N (relation 5);

S C 2 ([a, b]) ; S ( xi ) = f ( xi ), i 0, n
interpolated function;
,

where f(x) is the

S ( x) = a i + bi x + ci x 2 + d i x 3 , x [ xi 1 , xi ] . (5)
A Hermite cubic polynomial P(x) must satisfy the next supplementary condition

First step of the algorithm implementation consists in choosing the parameters values: the order of Daubechies scaling function, the number of decomposition levels, the threshold and the decimation factor. The second step is the signal decomposition and thresholding of wavelet transform coefficients Di, i=1,..,N using the relations (1), (2) and the parameters values specificated before. Next the coefficient AN is decimated. Than this coefficient is reconstructed by spline interpolation method and together

P ' ( xi ) = y ' ( xi ), i = 0, n .

(6)

with the rest of the thresholded coefficients is used for signal reconstruction. Finally is calculated the compression ratio CRa (relation 3) and the NMSEa error (relation 4).

TABLE III. Signal S1 S1 S1 S1 S2 S2 S2 S2 S3 S3 S3 S3 (t) Db4 Db5 Db4 Db5 Db4 Db5 Db4 Db5 Db4 Db5 Db4 Db5

REZULTS OF THE PROPOSED ALGORITM S 3 3 3 3 3 3 3 3 3 3 3 3 Fd 2 2 4 4 2 2 4 4 2 2 4 4 NMSEa [%] 2.2901e-004 2.2901e-004 9.8005e-004 2.2830e-004 3.2428e-004 3.2429e-004 0.0019 3.1925e-004 1.5264e-004 1,5091e-004 2.1032e-004 1.5273e-004 CRa 32 32 63.99 63.98 31.99 31,99 63.99 63.98 31.88 31.85 63.52 63.43

Figure 3. Block scheme of the proposed algorithm

From table 3 can be observed that the highest compression ratio of the signals S1, S2 and S3 is 63.99. This value is obtained for Daubechies scaling function of order 4 (Db4), 4 levels of decomposition, the threshold value of 3 and the decimation factor value of 4. The order of NMSE error varying between 10-2 and 10-4. The resulted compresion ratio is 4 times higher than the values from the table 1, but the NMSE error is higher also. V. CONCLUSIONS

The algorithm is efficient especially for signals acquired at high sample rates, when are acquired a sufficient number of samples of the disturbance overlapped on the power supply signal. If this number is small after the decimation of coefficient AN are losed disturbance details which cannot be reconstructed by interpolation and the reconstructed signal will contain distortions on the disturbance area. The proposed algorithm is first tested with the signal S1 (figure 4). The sampling rate is 5 MHz in this case. The signal is decomposed using a Daubechies scaling function of order 4 and 5 and respectively 4 levels of decomposition. Than the signal it is compressed using the threshold values 3 (table III).

The research results show the optimal order of Daubechies scaling function recommended in order to achieve the best compression ratio for three types of power quality disturbances and the necessary number of decomposition levels. In this paper is presented a new compression algorithm base on spline interpolation method that allows compression ratio up to 4 times higher than the classical wavelet compression and the cost is the increase of NMSE error. REFERENCES
[1] G. Gpresc, Modeling Algorithms for Sags with Exponential Fronts and Other Types of Electromagnetic Disturbances from Power Supply Network, Proceedings of the IEEE Bucharest PowerTech, 28 June 2 July, Bucureti, 2009. E. Y. Hamid, Z. I. Kawasasaki, Wavelet-based data compression of power disturbances using the minimum description length criterion, IEEE Transactions on Power Delivery, vol. 17, no. 2, pp. 460466, 2002. T. B. Littler, D. J. Morrow, Wavelets for the analysis and compression of power system disturbances, IEEE Transactions on Power Delivery, vol. 14, no.2, pp.358364, 1999. M. V. Ribeiro, J. M. T. Romano, C. A. Duque, An improved method for signal processing and compression in power quality evaluation, IEEE Transactions on Power Delivery, vol. 19, no. 2, pp. 464471, 2004. S. Santoso, E. J. Powers, W. M. Graddy, Power quality disturbance data compression using wavelet transform methods, IEEE Transactions on Power Delivery, vol. 12, no. 3, pp. 12501257, 1997. N. P. Subramaniam, K. B. Bagan, Analysis of high impedance transients and improved data compression using wavelet transform, Serbian Journal of Electrical Engineering, vol. 3, no. 1, pp. 1931, 2006. C. J. Wu, T. H. Fu, Data compression applied to electric power quality tracking of arc furnance load, Journal of Marine Science and Technology, vol. 11, no. 1, pp. 3947, 2003. C. Moler, Numerical Computing with MATLAB, SIAM, 2004.

[2]

[3]

[4]

[5]

Figure 4. Wavelet decomposition and reconstruction for the first signal using the proposed algorithm

[6]

The table 3 contains the results of the proposed algorithm tested with the signals S1, S2 and S3 using the decimation factor value Fd of 2 and 4.

[7]

[8]

Vous aimerez peut-être aussi