0% found this document useful (0 votes)
55 views17 pages

PQ Algorithm

This document summarizes a research paper that proposes a novel algorithm for power quality (PQ) data compression using a modified Dual Tree Complex Wavelet Transform (DTCWT). The algorithm uses DTCWT for sub-band decomposition and designs a modified quantizer to reduce sub-band coefficient limits. It then applies Run Length Encoding and Huffman Coding to further compress the data. Evaluation shows the modified DTCWT improves peak signal-to-noise ratio by 3% and mean squared error by 16% over DTCWT-based compression. The algorithm aims to efficiently compress large volumes of PQ data collected by smart meters in smart grids.

Uploaded by

ramesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views17 pages

PQ Algorithm

This document summarizes a research paper that proposes a novel algorithm for power quality (PQ) data compression using a modified Dual Tree Complex Wavelet Transform (DTCWT). The algorithm uses DTCWT for sub-band decomposition and designs a modified quantizer to reduce sub-band coefficient limits. It then applies Run Length Encoding and Huffman Coding to further compress the data. Evaluation shows the modified DTCWT improves peak signal-to-noise ratio by 3% and mean squared error by 16% over DTCWT-based compression. The algorithm aims to efficiently compress large volumes of PQ data collected by smart meters in smart grids.

Uploaded by

ramesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

ARCHIVES OF ELECTRICAL ENGINEERING VOL. 67(1), pp.

207–223 (2018)

DOI 10.24425/119002

PQ data compression algorithm with modified quantizer


and adaptive band logic using DTCWT

EKANTHAIAH PRATHIBHA1 , ASHWATHNARAYAN MANJUNATHA1 , CYRIL PRASANNA RAJ2

1 Sri
krishna Institute of Technology
No 29, Chimney hills Chikkabanavara post, Bangalore-560090, Karnataka, India
2 MS Engineering College Navarathna Agrahara

Sadahalli Post, Bengaluru - 562 110, Karnataka, India


e-mail: prathibha.skit/manjuprinci/[email protected]

(Received: 13.08.2017, revised: 12.01.2018)

Abstract: With growing demand for energy, power generated in renewable sources at vari-
ous locations are distributed throughout the power grid. The power grid known as the smart
grid needs to monitor power generation and its smart distribution. Smart meters provide so-
lutions for monitoring power over smart grids. Smart meters need to continuously log data
and at every source there is a large amount of data generated that needs to be compressed
for both storage and transmission over the smart grid. In this paper, a novel algorithm for
PQ data compression is proposed that uses the Dual Tree Complex Wavelet Transform
(DTCWT) for sub-band computation and a modified quantizer is designed to reduce sub-
band coefficient limits to less than 4 bits. The Run Length Encoding (RLC) and Huffman
Coding algorithm encode the data further to achieve compression. The performance met-
rics such as a peak-signal-to-noise ratio (PSNR) and compression ratio (CR) are used for
evaluation and it is found that the modified DTCWT (MDTCWT) improves PSNR by a
factor of 3% and the mean squared error (MSE) by a factor of 16% as compared with the
DTCWT based PQ compression algorithm.
Key words: complex wavelets, data compression, power quality disturbances, smart grid

1. Introduction
Technological development have led to the use of Information and Communication Technol-
ogy (ICT) for power generation, distribution and monitoring. The smart grid is one such technol-
ogy where micro level monitoring of power generation and distribution is effectively managed.
With the smart grid technology going to become reality in the next ten years, the market for the
smart grid is predicted to be $ 50 billion [1]. One of the key components of the smart grid technol-
ogy is a smart meter. The smart meter will be installed to monitor the power flow from the mains
to individual entities in both directions. The data from individual entities can contain information
208 E. Prathibha, A. Manjunatha, C.P. Raj Arch. Elect. Eng.

on power consumption, power generated, harmonics, billing etc. Monitoring smart grid operation
and smart meters in real time involves large volumes of data. If the smart meter records contin-
uous data from every entity at a 15 minute time interval, there would be 96 million data records
for every million meters. The data gathered from the smart meters provides analysis in terms of
customer segmentation, behaviour, better management of energy use and allows them to cut their
energy consumption costs. One of the critical activities of the smart meter is to monitor power
line disturbances such as voltage sag, swell, harmonics and interrupts. Voltage fluctuations can
cause productivity losses [2] and hence it is required to be monitored. Real time monitoring of a
PQ signal is based on data logging from the smart meter and this data will be measured in Giga-
bytes [3] [4]. For data logging, monitoring and analytics of larger amounts of data it is required
to compress data and transmit data over the power line. In [5], compression of power quality
disturbance data based on wavelet transform combined with an adaptive arithmetic encoding
scheme is proposed, demonstrating a 7.09% compression ratio (CR) and 1.42×10−3 normalized
mean-square error (NMSE) compared with a wavelet coefficient threshold of 13.67% CR and
1.88×10−3 NMSE for voltage sag. In [6], in order to improve the compression ratio, difference
in input samples are taken as input to a compression algorithm based on Huffman coding. In
[7], input data is transformed into wavelet sub-bands to obtain multi-resolutions, from which the
PQ disturbances are selected and noise is eliminated in order to achieve higher compressions. In
[8], an adaptive quantization technique is proposed to select significant data from the PQ signals
after Park’s transform. The quantizers are designed based on predictive logic so that an inverse
process is carried out without loss during a reconstruction process. The process of transformation
from the time to wavelet domain has advantages helping to select info from sub-bands based on
significant information. In [10], the techniques are based on wavelet theory and multi-resolution
analysis. Any cases of distortion are decomposed into three resolution levels. By using a data
compression technique, power quality disturbances are reconstructed. In [11] the author presents
the method that combines the compactly supported orthogonal wavelet db4 with the threshold
method of minimax theorem to compress power quality disturbance signals. The MATLAB sim-
ulation shows that this method can compress the power quality disturbance data effectively, it
can obtain a high compression ratio under the premise of no losing the time-frequency local
characters. In [12] an advanced metering system (AMI) is a new advanced metering system for
a two-way measurement and interaction operation in the smart grid. A compressed sensing (CS)
approach based on two-dimensional image compression for power quality analysis is proposed.
Since the sampling information of power quality (PQ) has outstanding frequency-domain sparse
characteristics, power quality measurement using compressed sensing, a two-dimensional sparse
measurement model on voltage, current and power signals was generated. Using these samples,
a power signal is recovered in order to effectively detect the operating status of the power quality
parameters connecting harmonic, instantaneous power disturbance, etc. The performance of the
proposed approach is compared with respect to a compression sampling ratio (CSR), signal-to-
noise-ratio (SNR), mean squared error (MSE) as well as energy recovery percentage (ERP). In
[13] the compression technique is performed through signal decomposition, threshold of wavelet
transform coefficients, and signal reconstruction. Threshold values are determined by weighting
the absolute maximum value at each scale. Wavelet transform coefficients whose values are be-
low the threshold are discarded, while those that are above the threshold are kept along with their
temporal locations. Therefore, the cost related to storing and transmitting the data is significantly
Vol. 67 (2018) DTCWT based PQ Data Compression Algorithm with quantizer and adaptive band 209

reduced. In [14] the author presented an attempt to deal with large volume of data made available
from various measurement systems, while considering the availability of a referential source
in the time domain. Two issues were treated as equally important for the optimization of data
storage and features accessibility and the on-line, secure communication with the installed moni-
toring devices, considering their IP-addressability within a geographical area without appropriate
communication infrastructure. In [15], the author proposed the power quality monitoring system
that would create huge amounts of data, particularly in time-absorbing and high-rate sampling.
This work presents an enhanced method for compressing power quality data based on wavelet
transformation. The power quality data, which eliminated fundamental wave is processed with
the wavelet transform, and then, the threshold method is used to the wavelet coefficients. Several
variety of power quality data were processed by Matlab.

1.1. Discrete Wavelet Transform (DWT)


A wavelet plays an important role in signal processing applications, wavelet transform of an
input signal generates multiple sub-bands of low-pass and high-pass wavelet coefficients. The
low-pass and high-pass band coefficients provide information on an input signal property. One
of the important properties of wavelet coefficients is the de-correlation of low-pass and high-
pass frequency information present in the input data. The low-pass coefficients hold the DC
levels or intensity levels of the input data and the high-pass data holds the short-duration events
in the input signal. Figure 1 presents the level-1 wavelet decomposition using LPF and HPF
filters to generate Ya and Yb coefficients and Figure 2 presents the reconstruction filters that
reconstruct the original signal X from the wavelet coefficients, which is also called the Inverse
Discrete Wavelet Transform (IDWT). For perfect reconstruction, the LPF and HPF need to satisfy
an orthogonal property. For data compression, multi-level wavelet decomposition is carried out
to obtain multi-band frequency components. The most significant sub-bands are the low-pass
coefficients and a few high-pass bands. The quantization process retains the information in the
low-pass bands and selects information from the high-pass bands. Daubcheies and Haar wavelet
filters are primarily used for DWT.

Fig. 1. Basic building block of DWT Fig. 2. Basic building block of IDWT

The limitations of the wavelet transform are the shift variance and loss of directional selec-
tivity. The power fluctuations can lead to time delays in PQ signals being monitored and using
the DWT will lead to change in PQ signal metrics, as the DWT is the shift variance. The use
of the Dual Tree Complex Wavelet Transform (DTCWT) will overcome shift variance limita-
210 E. Prathibha, A. Manjunatha, C.P. Raj Arch. Elect. Eng.

tions, as the DTCWT has real and imaginary filters that generate wavelet coefficients that are
shift invariant. The complexity in computation has limited the use of the DTCWT in place of the
DWT for data compression. In this paper, a novel algorithm based on the DTCWT is proposed
to compress PQ signals and suitable encoding schemes are presented to compress the PQ signals
achieving higher compression. Section 2 presents brief introduction to the DTCWT, Section 3
discusses the proposed PQ data compression algorithm based on the DTCWT, Section 4 presents
the experimental setup and flow diagram for software implementation of the proposed algorithm.
Section 5 presents the results, and the conclusion is presented in Section 6.

2. DTCWT algorithm

DTCWT decomposes an input signal to low-pass and high-pass sub-bands similar to DWT
but also generates imaginary sub-bands in addition to real sub-bands. The wavelet filter coeffi-
cients for computation of real and imaginary sub-bands are orthogonally shifted and are related
by Hilbert transform. With real and imaginary sub-bands time invariant property is achieved and
the energy levels of both real and imaginary sub-bands are invariant with redundancy shift in the
input signal that is considered for analysis. The DTCWT generates 2N sub-bands as compared
with the DWT, from these 2N sub-bands it is easy to estimate the shift variations in the input
signal. The primary challenge in the use of the DTWT for signal processing is the redundancy
in data, and it is required to select appropriate sub-bands for data compression. The complex
wavelet transform is represented by Equation (1):

ψ (t) = ψn (t) + jψg (t), (1)

where, ψg (t) is the Hilbert transform of ψn (t).


The input signal S(z) is decomposed into low-frequency part Sl1 (z) and high frequency part
Sh1 (z) and can be represented as in Equation (2):

S(z) = Sl1 (z) + Sh1 (z), (2)

where
Sl1 (z) = C1 (z2 )H0 (z−1 ) and Sh1 (z) = D1 (z2 )H1 (z−1 ).
The DCTWT algorithm for four-level decomposition is shown in Figure 3. The input signal
represented by X, consisting of N samples is decomposed to 10 sub-bands, representing real
and imaginary bands of DTCWT outputs, consisting of N/16 samples. The transform is twice as
expansive, because it generates 2N DWT coefficients for an N-point input signal.
The DTCWT algorithm with four levels of decomposition generates ten sub-bands denoted
by {C4a , D4a , D3a , D2a , D1a , C4b , D4b , D3b , D2b , and D1b }. The subscripts ‘a’ and ‘b’ denote the real
and imaginary trees. C represents the approximation output, D represents the detail output. The
subscripts represent the levels. The parameters C4a and C4b obtained at level-4 represent the real
and imaginary low-pass coefficients, respectively. The low-pass coefficients contain the lowest
band of a PQ signal (pure sine wave) and the high-pass band contains the detail features such as
PQ disturbances.
Vol. 67 (2018) DTCWT based PQ Data Compression Algorithm with quantizer and adaptive band 211

Fig. 3. DCTWT algorithm for four-level decomposition

Table 1 presents the filter coefficients used for real tree and imaginary tree of the first-level
decomposition. There are 10 coefficients for each of the low-pass and high-pass filters of the real
and imaginary decomposition tree structures. Table 2 presents the filter coefficients of the real
tree and imaginary tree for higher levels of decomposition.

Table 1. DTCWT filter coefficients for the first stage

DTCWT filter coefficients (real) DTCWT filter coefficients (imaginary)


LOW PASS HIGH PASS LOW PASS HIGH PASS
0 0 0.01122679215254 0
−0.08838834764832 −0.01122679215254 0.01122679215254 0
0.08838834764832 0.01122679215254 −0.08838834764832 −0.08838834764832
0.69587998903400 0.08838834764832 0.08838834764832 −0.08838834764832
0.69587998903400 0.08838834764832 0.69587998903400 0.69587998903400
0.08838834764832 −0.69587998903400 0.69587998903400 −0.69587998903400
−0.08838834764832 0.69587998903400 0.08838834764832 0.08838834764832
0.01122679215254 −0.08838834764832 −0.08838834764832 0.08838834764832
0.01122679215254 −0.08838834764832 0 0.01122679215254
0 0 0 −0.01122679215254
212 E. Prathibha, A. Manjunatha, C.P. Raj Arch. Elect. Eng.

Table 2. DTCWT filter coefficients for a higher stage

Filter coefficients used for real tree Filter coefficients used for imaginary tree
for higher level decomposition for higher level decomposition
LOW PASS HIGH PASS LOW PASS HIGH PASS
0.03516384000000 0 0 0.03516384000000
0 0 0 0
0.08832942000000 −0.11430184000000 −0.11430184000000 0.08832942000000
0.23389032000000 0 0 0.23389032000000
0.76027237000000 0.58751830000000 0.58751830000000 0.76027237000000
0.58751830000000 −0.76027237000000 0.76027237000000 0.58751830000000
0 0.23389032000000 0.23389032000000 0
−0.11430184000000 0.08832942000000 −0.08832942000000 0.11430184000000
0 0 0 0
0 −0.03516384000000 0.03516384000000 0

3. DTCWT based PQ data compression algorithm

The DTCWT based PQ data compression algorithm is presented in Figure 4. The input raw
data is pre-processed to eliminate noise. A moving average filter is used as pre-processing op-
eration. The noise filtered PQ signal is processed by the DTCWT block to generate sub-bands.
The level select input denoted by N is set to determine the number of levels required. The in-
put N is set based on input sampling frequency. The sub-bands coefficients are processed by

Fig. 4. Block diagram of DTCWT based PQ data compression algorithm


Vol. 67 (2018) DTCWT based PQ Data Compression Algorithm with quantizer and adaptive band 213

the thresholder and quantizer unit, by setting the threshold level and quantization level, respec-
tively. During this process, insignificant coefficients and redundant information in the sub-bands
are eliminated. The entropy encoding schemes such as Run Length Coding (RLC) and Huffman
Coding, process the quantized data to achieve compression. The compressed data are grouped
into packets and is prepared for storage or transmission in the smart meter sub-module and other
smart grid systems.

3.1. Selection of DTCWT sub-bands


A DTCWT algorithm decomposes an input signal into multiple sub-bands, each of these sub-
bands represents information in different frequency ranges varying from (sampling frequency)
FS to (FS/2)N . PQ disturbances such as swell, sag, harmonics and interrupts will have voltage
fluctuations as well as frequency differences. Table 3 shows the frequency range in which PQ
disturbances would appear.

Table 3. PQ disturbance frequency range

PQ disturbances Frequency range


Sag 50 Hz ± 10 Hz
Swell 50 Hz ± 10 Hz
Harmonics 100 Hz – 500 Hz
Interrupts > 500 Hz

The PQ undistorted signal will be a 50 Hz signal, assuming a noise reduction of 10% and the
frequency of the PQ signal will be in the range of 45–55 Hz. PQ disturbances such as voltage sag
and swell cause amplitude changes and hence lead to frequency fluctuations, thus the undistorted
PQ signal, voltage sag and swell will also occur in the frequency band of the PQ undistorted
signal. The disturbances such as harmonics and interrupts will always fall in higher frequency
bands. In the novel algorithm shown in Figure 5, DTCWT decomposition is carried out to capture
these signals accurately.
Eight levels of decomposition are carried out, assuming the input sampling frequency to be
of 2000 Hz. The seventh- and eight-level decomposition is carried out for high-pass coefficients,
as the high-pass band in level 6 holds the PQ signal of interest. The low-pass bands in level 6 are
discarded. The low-pass band in level 8 is in the frequency range of 46.875 Hz to 54.0625 Hz
and captures the undistorted PQ signal. The high-pass band in level 8 captures the PQ signal in
frequency range of 54.0625 Hz to 62.5 Hz and hence it will contain the voltage sag and voltage
swell distortions. The low-pass band in level 7 is in the frequency range of 31.25 Hz to 46.875 Hz
and this band will also hold the voltage sag and swell distortions. From the 8-level decomposition
the DTCWT sub-bands of importance are shown in Table 4 along with the information content.
PQ events are captured in DDC8a/b , DC7a/b , D5a/b , D4a/b , D2a/b , D1a/b sub-bands.
The events in C6a/b are noise and are discarded, and the event in the D3a/b band is very high
harmonics, which is also discarded. The data in DDD8a/b in the PQ undistorted signal is also
214 E. Prathibha, A. Manjunatha, C.P. Raj Arch. Elect. Eng.

Fig. 5. DTCWT algorithms to capture PQ disturbances

Table 4. Selected DTCWT sub-bands for data compression

Band Sub bands Frequency Range (Hz) PQ Signal Threshold Quantization


1 DDC8a/b 46.875–54.0625 Sag/Swell No Yes
2 DDD8a/b 54.0625–62.5 PQ undefined Yes Yes
3 7
DCa/b 31.25–46.875 Sag/Swell No Yes
4 C6a/b 0–31.25 Noise Yes Yes
5 D5a/b 62.5–125 Harmonics 1 No Yes
6 D4a/b 125–250 Harmonics (2–5) No Yes
7 D3a/b 250–500 Harmonics (5–10) Yes Yes
8 D2a/b 500–1 000 Interrupts No Yes
9 D1a/b 1 000–2 000 Interrupts No Yes

interesting. The process of quantization and thresholding is designed to retain the PQ events in
bands 1, 3, 5, 6, 8, 2, 9. All other bands are discarded as the information content is very low. From
the real and imaginary sub-bands only the real band low-pass coefficients are selected. As both
Vol. 67 (2018) DTCWT based PQ Data Compression Algorithm with quantizer and adaptive band 215

of them have similarly energy levels, all the eight high-pass bands are selected for encoding.
The selected sub-bands at level-4 will contain PQ disturbances such as voltage sag and swell.
These disturbances may also be present in the low-pass bands. The remaining three bands {D3a/b ,
D2a/b , and D1a/b } will contain all other disturbances. The D1a/b sub-band will have high-frequency
disturbances and will be considered as high priority.

3.2. Quantization and thresholding


The input signal of N samples after decomposition at every level of the samples is reduced
by half. The intensity levels of samples at each level will also be scaled down during the de-
composition process. It is found that the higher order sub-bands (high-pass bands) that hold PQ
disturbances will have lower intensity levels compared with low-pass coefficients. Most of the
thresholding algorithms presented in literature use a constant thresholding level across all bands
of coefficients. In this algorithm, a novel thresholding algorithm is proposed to accurately cap-
ture the PQ disturbances without loss, by using a variable threshold scheme. In order to retain
PQ disturbances in the high-pass bands the threshold level is set to {0.5, 1 and 2} for {D1a/b ,
D2a/b and D3a/b } bands respectively. The variable thresholding algorithm is shown in Figure 6.
The low-pass sub-band at the lowest level consists of real and imaginary bands, the demulti-
plexer unit selects either of these bands and is quantized from the first packets of the compressor.
The higher order sub-bands are thresholded and quantized, so as to ensure minimum loss of data
during this process. The higher order sub-bands are processed using variable thresholder and
quantizer modules.

Fig. 6. Variable threshold and quantizer module

The sub-band coefficients at each level will have different intensities and hence, in order
to capture the PQ disturbances without loss of data, the quantization levels are set as given in
216 E. Prathibha, A. Manjunatha, C.P. Raj Arch. Elect. Eng.

Equations (3)–(6). By considering the maximum and minimum intensity levels at each band, the
Q-levels are derived.
[ ]
(−1 + 28 ) D4a/b − D4(a/b) max
QD4a/b = , (3)
21 D4(a/b) max − D4(a/b) min
[ ]
(−1 + 28 ) D3a/b − D3(a/b) max
QD3a/b = , (4)
21 D3(a/b) max − D3(a/b) min
[ ]
(−1 + 28 ) D2a/b − D2(a/b) max
QD2a/b = , (5)
20 D2(a/b) max − D2(a/b) min
[ ]
(−1 + 28) D1a/b − D1(a/b) max
QD1a/b = . (6)
2−1 D1(a/b) max − D1(a/b) min

Due to the variable thresholding process, the detail information is not lost. Similarly, the
quantizer designed is a variable quantizer. The low-pass band is quantized only to avoid loss of
data. The thresholded and quantized sub-bands are combined into DTCWT packets denoted as
{P1, P2, P3, P4, P5, P6, P7, P8, P9} as shown in Figure 6. The DTCWT packets are encoded us-
ing the RLC encoder and Huffman encoder. Prior to encoding of the PQ data using the RLC and
Huffman encoder, the PQ metrics are detected and only these metrics are encoded. The PQ signal
in general will be free from all disturbances such as sag, swell etc. the metrics of disturbances
is also very significant and need to be captured. The novel approach captures these PQ metrics
and compresses the metrics rather than compresses the PQ signal in total. The novel algorithm
to capture PQ metrics is presented in Figure 7. The DTCWT sub-bands capture the PQ distur-
bances at various sub-bands depending upon the frequency of occurrence. The metrics such as
time duration of disturbances, occurrence time, intensity of disturbance and frequency harmonics
during disturbances are measured and are quantified with regard to the set threshold. Later they
were compressed and transmitted as PQ disturbance features. Thus, the metrics provide adequate
information on the PQ signal and require very less storage space.

Fig. 7. Block diagram for PQ signal compression using DTCWT

Table 5 presents the energy levels of various PQ events, which are compared with the PQ
signal without any disturbances (sine wave). The energy level of the sine wave is around 8 units,
Vol. 67 (2018) DTCWT based PQ Data Compression Algorithm with quantizer and adaptive band 217

all other disturbances do not fall in this range and hence there is a clear demarcation between PQ
events that assist in determining the event and its metrics.

Table 5. Energy levels of various PQ events


Harmonics Harmonics
DTCWT Sine Swell Sag Harmonics Interrupts
with swell with sag
Energy level 8.01 43.925 28.374 40.66864 30.13071 44.87097 6.8300

Figure 8 illustrates the novel algorithm for PQ metric estimation. The DTCWT decomposi-
tion gives rise to 10 sub-bands. Each of the sub-bands is processed and is verified for PQ distur-
bances. If the PQ event is swell and sag, the time duration of the swell and sag is determined by
computing the maximum gradient of each sub-band. The time duration determined is superim-
posed on the PQ signal and the fluctuations in voltage is computed in reference to average PQ
signal intensity. Similarly, if the Q event is harmonics or interruptions, THD is computed and
the total duration of these events occurred is also determined. If the PQ events are below the set
PQ standards, they are discarded. Only the signals, which are very significant are encoded into
packets by the algorithm shown in Figure 8. To verify their functionality, the input signals repre-
senting power line distortions are mathematically modelled. The controlled parameters are used
in the mathematical model for generation of various distortions. The input signal is generated for
certain time duration, it is divided into multiple frames of size 2 048 samples. Each frame of data
is processed using DTCWT and 10 sub-bands are computed along with the energy levels, which
have unique values for various distortions as shown in Figure 9. Based on the unique values of

Sub1
PQ N
DTC Classi N N N
Sign WT fica! I If If If Termin
al Deco Sub on of f S H In ate
mpos Distu
Y
i!on rbance Y Y Y

Sub10 Determine Determine


Intensity & THD &
Dura!on PQ Dura!on
signal

Threshold Threshold

Encode Encode
Into Into
Packets Packets

Compression
Fig. 8. Block diagram for classification of PQ disturbances
218 E. Prathibha, A. Manjunatha, C.P. Raj Arch. Elect. Eng.

energy levels, PQ classification is performed. PQ distortion is identified and based on the classi-
fication algorithm along with the time-frequency information obtained it is used to characterize
the input.

Fig. 9. Energy levels of 10 sub-bands of various PQ events

4. Software modeling and implementation


A PQ analyser EN50160 module is connected to capture real time PQ parameters along with
a net meter (a sub-set of smart grid environment), which is connected between the source and
load.
Figure 10 shows the general block diagram of a grid connected PV inverter system, hav-
ing solar panels that provide most of their power needed during the daytime, while still being
connected to the local electrical grid network during the night-time. The excess electricity gen-
erated during the daytime is not wasted but it is fed back into the power grid. The PQ analyser
is connected externally to an inverter side to measure the variation of RMS voltage and other
parameters. The PQ data recorded from 10.11.16 to 12.11.16 are mentioned, just to represent the
real time data extracted by the PQ analyser, which has been connected externally as shown in
Figure 11.

Fig. 10. General diagram of solar grid Fig. 11. PQ analyzer connected to
connected inverter extract the data

The data login module is connected to one phase of the grid and the PQ data is recorded con-
tinuously for four days. The recorder or the data login module captures RMS values, calculated
Vol. 67 (2018) DTCWT based PQ Data Compression Algorithm with quantizer and adaptive band 219

in each half-period (10 ms at 50 Hz, 8.3 ms at 60 Hz), which are out of the thresholds set upon
configuration by 1% to 30% of a set reference value with a 1% step. To validate the proposed
algorithm, RMS values of raw voltage data are considered from the PQ data recorder instrument.
Figure 12 shows the RMS voltages of the PQ data recorded from 10.11.16 to 12.11.16 and
only the average RMS voltages of 4 300 data samples are plotted. For PQ signal analysis, the av-
erage RMS values are used to generate an actual PQ signal of 50 Hz sine wave. The disturbances
are recorded and stored in a storage unit in the PQ instrument. The memory card reader is re-
moved and the recorded PQ data is accessed in offline mode in Matlab environment for analysis.
Figure 13 shows the experimental setup for validation of the proposed algorithm. The PQ data
captured online is stored in a computer in Excel format and the data is read in the Matlab envi-
ronment for off line analysis. The developed software module loads the power signal data and
computes the DTCWT coefficients. The DTCWT coefficients after quantization and threshold-
ing are encoded using RLC and Huffman Encoders. The compressed data stored in the Matlab
environment is processed to estimate the memory storage requirement. The compressed data
is decompressed using the inverse DTCWT and inverse encoding process to obtain the recon-
structed PQ data. The error in reconstruction processes is evaluated by computing MSE, PSNR
and the maximum error.

Fig. 12. Recorded voltage data in pixels

Fig. 13. Experimental setup of PQ data analysis

The length of the input data is determined to identify the number of bits, similarly the com-
pressed data is evaluated to identify the number if bits required after compression. The com-
pression ratio is determined by evaluating the input sequence length and the encoded sequence
length. The performance parameters such as MSE, maximum error and PSNR are computed by
evaluating the input data and the decompressed output data. The proposed algorithm is mod-
elled in Matlab and the performance metrics for data compression is computed to evaluate the
advantages of the DTCWT based compression algorithm as shown in Figure 14.
220 E. Prathibha, A. Manjunatha, C.P. Raj Arch. Elect. Eng.

Fig. 14. Performance evaluation setup

5. Results and discussion


The developed MATLAB code for compression of a PQ signal is executed by considering the
recorded PQ signal. The distorted PQ signal is presented in Figure 15. The DTCWT algorithm,
which is designed to compute eight levels of decomposition processes, the PQ signal and the
results are presented in Figure 16. Figure 17 presents the DTCWT results of a low-pass real
sub-band that comprises of 17 000 samples. The interrupts in the PQ data are seen as voltage
dips.

Fig. 15. PQ analyzer recorded voltage data Fig. 16. DTCWT sub-bands
for 3 days

Figure 18 presents the results of the DTCWT sub-bands after thresholding and quantization.
The quantization process reduces the number of bits required to represent DTCWT samples, thus
constituting compression. The proposed quantization and thresholding logic ensures that the data
loss does not exceed more than 2 dB.
The quantized DTCWT sub-bands are entropy encoded using RLC and Huffman coding.
The compressed PQ data is reconstructed by performing an inverse process. The reconstructed
PQ signal is compared with the input data and performance metrics such as a PSNR and com-
pression ratio are computed. Table 6 presents comparison results of PQ data samples compressed
using the DTCWT with optimum thresholding and quantization, the DTCWT and DWT based
algorithm for five sets of data recorded at different time intervals. The proposed algorithm for PQ
compression considers only the significant sub-bands and the corresponding threshold and quan-
tization levels are set to achieve better compression and reconstruction. The proposed Modified
Dual Tree Complex Wavelet Transform algorithm is denoted in Table 7 as “MDTCWT”. The PQ
Vol. 67 (2018) DTCWT based PQ Data Compression Algorithm with quantizer and adaptive band 221

Fig. 17. DTCWT low pass real sub-band Fig. 18. DTCWT sub-bands after quantization
and thresholding

data samples recorded for certain duration have an input sequence length of 2 975 778 samples
(each of 8-bit) and are compressed to 954 253 samples. The compression ratio is determined to
be 67.9327 with a maximum error of 5.8139, MSE of 3.7343 and PSNR of 42.4732. The com-
pression ratio achieved using the DWT based algorithm is found to be superior to the DTCWT
based algorithm, however the PSNR obtained for the proposed algorithm is better than the DWT
based algorithm. The number of sub-bands in the DTCWT is twice as high as it is in the DWT
and hence it restricts the compression ratio. The redundancy in the real and imaginary DTCWT
sub-bands is identified and eliminated to improve the compression ratio without affecting the
PSNR. The results of the MDTCWT algorithm in terms of a compression ratio and PSNR is
found to be better than with the use of the DWT and DTCWT based algorithms for PQ compres-
sion. With selection of bands, selection of threshold levels and the quantization algorithm, the
proposed PSNR of the MDTCWT is improved by a factor of 3% as compared with the DTCWT
based PQ compression algorithm. Similarly, the compression ratio is also improved by a factor
of 16%.

Table 6. Comparison of DWT and DTCWT results

Real time PSNR Compression ratio


data samples DWT DTCWT MDTCWT DWT DTCWT MDTCWT
sample1 42.2111 42.4732 88.4021 82.7240 67.9327 81.2391
sample2 38.5949 40.5795 70.3797 99.2550 98.2096 99.7821
sample3 34.2399 40.8719 60.2698 98.5620 96.9110 99.1711
sample4 36.1726 40.1784 71.8160 98.5095 96.7771 99.4112
sample5 36.1757 39.4565 70.3452 98.5598 96.9174 99.0145

Eight-level DTCWT generates 18 sub-bands, of which 9 are real and 9 of them are imaginary.
The shift invariant property of the DTCWT is demonstrated by considering both of these bands.
222 E. Prathibha, A. Manjunatha, C.P. Raj Arch. Elect. Eng.

For compression of data only the real or the imaginary bands could be considered. In order
to improve compression ratio beyond 50%, the phase information needs to be computed and
significance of data loss needs to be analysed by considering the real and imaginary information.

Table 7. Comparison of Compression performance of different methods

Energy threshold and Using integrated spline Proposed


PQ data adaptive arithmetic wavelet and MDTCWT
encoding [5] S-transform [9] method
CR NMSE CR NMSE CR NMSE
Real time voltage data 7.09% 1.42 × 10−3 5.0633 2.5088 e−04 32.0673 1.64 e−04

Table 7 gives the comparison of the proposed method with the reference papers on energy
threshold and adaptive arithmetic encoding [5] as well as using integrated spine wavelet and
S-transform [9]. With respect to a compression ratio and normalized mean square error, this
proposed DTCWT produces a higher compression ratio and obtains a smaller mean square error.

6. Conclusion
Smart grid technology will provide better power supply services and eventually revolutionize
the power generation and distribution management services. A smart meter, which is the sub-
component of a smart grid, will need to be able to provide services for data logging, storage
and transmission. The data compression algorithm proposed in this work achieves a compression
ratio of greater than 90% with minimum loss of data measured in terms of a PSNR achieving
more than 42 dB. DTCWT sub-bands that support shift invariant property and directionality
produce more than 28 sub-bands and hence have redundancy of data. The selective thresholding
technique and quantization modules ensure that the information content or PQ signal features
are selected from the DTCWT bands and are encoded to achieve required compression ratios.
With selective logic, desired compression can be achieved for PQ signals and hence supports
real time application requirements of smart meters, which have an additional feature of variable
data compression schemes that is compatible to the needs of available transmission bandwidth
or data rate requirements.

References
[1] http://ibm.com/software/data/industry/energy.html, accessed May 2012.
[2] http://netl.doe.gov/moderngrid, accessed January 2007.
[3] Norman C.F., Chan Y.C., Lau W-H., Real-Time Power-Quality Monitoring with Hybrid Sinusoidal
and Lifting Wavelet Compression Algorithm, IEEE Transactions on power Delivery, vol. 27, iss. 4,
pp. 1718–1726 (2012).
[4] Bingham R.P., Kreiss D., Santoso S., Advances in data reduction techniques for power quality In-
strumentation, Proceeding of 3rd European Power Quality Conference, Bremen, Germany, pp. 47–55
(1995).
Vol. 67 (2018) DTCWT based PQ Data Compression Algorithm with quantizer and adaptive band 223

[5] Wang J., Wang C., Compression of Power Quality Disturbance Data Based on Energy Threshold
and Adaptive Arithmetic Encoding, TENCON-2005, IEEE region10 Conference, Melbourne, Qld,
Australia, pp. 1–4 (2005).
[6] Zhang D., Bi Y., Zhao J., A new data compression algorithm for power quality online monitoring,
Proceeding of International Conference on Sustainable Power Generation and Supply, China, pp. 1–4
(2009).
[7] Ning J.,Wang J., Gao W., Liu C., A wavelet-based data compression technique for smart grid, IEEE
Transactions on Smart Grid, vol. 2, no. 1, pp. 212–218 (2011).
[8] Parseh R., Acevedo S.S., Kansanen K., Molinas M., Ramstad T.A., Real-time compression of Mea-
surements in distribution grids, Proceeding of 3rd International conference, Smart Grid Communica-
tion, Tainan City, Taiwan, pp. 223–228 (2012).
[9] Dash P.K., Panigrahi B.K., Sahoo D.K., Panda G., Power Quality Disturbance Data Compression,
Detection, and Classification Using Integrated Spline Wavelet and S-Transform, IEEE Transactions
on Power Delivery, vol. 18, no. 2, pp. 595–600 (2003).
[10] Mohammadzadeh S., Seifossadat S., Ahmadzadeh M., Power Quality Disturbance Data Compression
Using WaveletsTransform, International Conference on Computer, Systems and Electronics Engineer-
ing, South Africa, Johannesburg, pp. 78–82 (2014).
[11] Zhao Hongtu, Xi Dongmei, Compression and Realization of Power Quality Disturbance Data Based
on Wavelet Analysis, International Conference on Uncertainty Reasoning and Knowledge Engineer-
ing, Bali, Indonesia, pp. 217–219 (2011).
[12] Yi Zhong, Cheng Chen, Hang Su, Measurement and Analysis for Power Quality Using Compressed
Sensing, Journal of Applied Science and Engineering, vol. 17, no. 3, pp. 305–318 (2014).
[13] Santoso S., Powers E.J., Grady W.M., Power quality disturbance data compression using wavelet
transform methods, IEEE Transactions on Power Delivery, vol. 12, no. 3, pp. 1250–1257 (1997).
[14] Albu M.M., Neurohr R., Apetrei D., Silvas I., Monitoring voltage and frequency in smart distribution
grids. A case study on data compression and accessibility, Published in Power and Energy Society
General Meeting, 2010 IEEE, Providence, RI, USA, pp. 1–6 (2010).
[15] Zhang Li, Ma Shiqiang, An Improved Method Based on Wavelet for Power Quality Compression, 2016
IEEE 11th Conference on Industrial Electronics and Applications (ICIEA), Hefei, China, pp. 1750–
1753 (2016).

You might also like