WNN based intelligent energy meter

WNN based intelligent energy meter

Available online at www.sciencedirect.com Measurement 41 (2008) 357–363 www.elsevier.com/locate/measurement WNN based intelligent energy meter Samra...

167KB Sizes 4 Downloads 98 Views

Available online at www.sciencedirect.com

Measurement 41 (2008) 357–363 www.elsevier.com/locate/measurement

WNN based intelligent energy meter Samrat L. Sabat, Santanu K. Nayak *, Sakuntala Mahapatra Department of Electronic Science, Berhampur University, Berhampur 760 007, Orissa, India Accepted 1 August 2007 Available online 7 September 2007

Abstract This paper presents a novel method for estimation of average power based on multiresolution signal decomposition technique and neural network. Proposed method allows the measurement form the samples of voltage and current signal over a cycle. Significance of this approach is we have not considered the phase factor for measuring average power as in conventional method. A prototype model for on line measuring and estimating the average power with high accuracy is presented using TMS320C3X starter kit.  2007 Elsevier Ltd. All rights reserved. Keywords: Energy estimation; Multiresolution analysis; Multiresolution signal decomposition; Feature extraction; Neural network model; Intelligent instrument

1. Introduction The conventional algorithm for measurement of active power is based upon the method of integration or summation over an limited time period of a periodic voltage and current signals. However, the measurement of power and energy under perfect sinusoidal condition [1–3] can not be considered all the time due to the presence of noise, harmonic components and stochastic variations [4–6] in power system signals. Djokic et al. [7] proposed a novel method for reactive power and energy measurement in nonsinusoidal condition by using the principle of frequency controlled power to pulse rate conversion. The drawback associated with this method is of low output pulse rate. Voloshko [8] implemented a digital method using discrete Fourier transform *

Corresponding author. E-mail address: sknayakbu@rediffmail.com (S.K. Nayak).

(DFT) and used cross correlation function of voltage and current signal for measurement of power of a sinusoidal and nonsinusoidal signals in the presence of harmonics and under conditions of frequency deviation. This technique poses error when a noninteger number of periods of the instantaneous power is observed. To overcome this problem Paolo Carbone et al. [9] employed a data windowing technique of noncoherent sampled nonsinusoidal voltage and current signals for measurement of power. This technique requires acquisition of smaller number of voltage and current samples in a window in order to minimise the effect of spectral leakage on the estimated average power [10]. But the choice of window and data truncation causes numerical error in the measurement of power and energy. Traditionally power measurement have been performed in both time domain and frequency domain. In the time domain the voltage and current waveforms are sampled and power is calculated [11]. In

0263-2241/$ - see front matter  2007 Elsevier Ltd. All rights reserved. doi:10.1016/j.measurement.2007.08.003

358

S.L. Sabat et al. / Measurement 41 (2008) 357–363

such cases, the presence of harmonics with the signal causes unnecessary billing to the consumer. In the frequency domain approach the voltage and current waveforms are expanded in a fourier series and the reactive power is defined as a product of fundamental components only. Generally, the voltage and current signals are less stationary and aperiodic in power network. This fact poses a problem for the correct application of Fourier-based frequency domain analysis to power system signal. The application of wavelet transform in measurement of power separates the power associated with the other harmonic frequencies of the signal from the fundamental frequency. Since the multiresolution property of wavelet transform is a suitable tool for analysing time frequency content of a nonstationary signal by decomposing the signal into different frequency bands, Weon [12] formulated a theoretical approach for measurement of power, energy and root mean square (rms) values of voltage and current signals using wavelet transform from the sampled data obtained from voltage and current transducer. The advantage of applying wavelet transform directly to data is that it provides the contribution of power and energy with respect to frequency bands associated with each level of wavelet decomposition. The high execution speed and accurate data manipulation capability of digital signal processor (DSP) has increased its application in areas of signal processing, power quality analysis, power measurement etc. The algorithm [13] were implemented on integrated circuits with the standard computational blocks which keeps the implementation cost relatively low. Bucci and Landi [14] developed a prototype model using 12-bit data acquisition system as well as TMS320C40 floating point DSP processor for power quality analysis of non sinusoidal voltage and current signal. In this model transient analysis of input signal are carried out. However, the implementation cost of TMS320C40 floating point DSP processor is high and it can not measure the power accurately when the frequency of signal varies with time. Since the neural network models are highly nonlinear and better adaptivity of nonlinear functions. It is easier to implement for prediction of nonlinear functions. In this case the power system signals are time varying signals so, it is the better choice to use wavelet based neural network models for estimation of power.

This paper presents the estimation of average power and energy of power system signals in presence of harmonics by decomposing into various subband levels and applying neural network to root men square (rms) value of each decomposed level coefficients. So in power measurement, wavelet transform is applied to instant power derived from both the concurrent samples of voltage and current over a cycle using orthonormal wavelet basis function [15] which gives accurate results. 2. Estimation of power using multiresolution analysis and neural network Multiresolution analysis (MRA) is a technique to decompose a signal into different levels with different time and frequency resolution. It decomposes a given signal into its detail as well as smoothed versions. A comprehensive study of MRA [16] presents the key idea of MRA theory and its implementation in signal processing. Multiresolution analysis (MRA) can be represented as a sequence of approximation of a given function x(t) at different resolutions. The approximation of signal x(t) at a resolution level 2j is defined as an orthogonal projection x(t) on a subspace Vj  L2(R), j 2 Z, where Z is set of integers in the range (1, 1). L2(R) is the vector space for R 1 finite energy signals which satisfies the relation 1 j xðtÞj2 dt < 1. These subspaces as in Fig. 1 satisfies the different properties of wavelet defined in Appendix 1. A signal can be decomposed into its approximation part and detail part at different levels by using multiresolution signal decomposition (MSD) technique [17]. In this work, we have applied MSD technique to instantaneous power of a power system signal and then estimated the average power using neural network model.

Vj+1

W0

…..

Wj+1

Fig. 1. The multiresolution analysis.

Vj+2

S.L. Sabat et al. / Measurement 41 (2008) 357–363

359

The voltage and current signals in presence of harmonics can be represented as N u pffiffiffiffiffiffiffi X uðtÞ ¼ U 0 þ ð2ÞU q cosð2pqfc t þ aq Þ

C j+2,k C j+1,k hk hk

ð1Þ

2

2 gk

C j,k

q¼1

2 d j+21,k

and

gk 2

N I pffiffiffiffiffiffiffi X ð2ÞI q cosð2pqfc t þ bq Þ iðtÞ ¼ I 0 þ

d j+1,k

ð2Þ

Fig. 2. Multiresolution signal decomposition technique.

q¼1

where U0 and I0 represents the DC components of voltage and current, Nu and NI represents the harmonic present in the voltage and current signal, respectively. Uq and Iq represents the root mean square (rms) value of voltage and current signals of qth harmonics respectively. fc is the fundamental frequency of power system signal. aq and bq are the phases involved in the voltage and current signals at qth harmonics respectively. So the average power is given by P average ¼ U 0 I 0 þ

minðN u ;N I Þ X

¼ U 0I 0 þ

2U q I q cosðaq  bq Þ d j ðnÞ ¼ ðV rms ðqÞI rms ðqÞÞ cosðsq Þ ð3Þ

where Vrms(q) and Irms(q) are the root mean square (rms) value of voltage signal and current signal, respectively of qth harmonics, with V rms ðqÞ ¼ U max ðqÞ max ðqÞ pffi , I rms ðqÞ ¼ Ip ffi and (aq  bq) = sq is the phase ð2Þ

factor between the voltage and current at qth harmonics and cos(sq) is the corresponding power factor. The instantaneous power of the signal in terms of wavelet transform can be expressed as P inst ðtÞ ¼

j01 2X

C j0 k /j0 k ðtÞ þ

k¼0

j1 X 2j1 X

d jk wjk ðtÞ

ð4Þ

jPj0 k¼0

where the scaling level j0 is the coarsest level of the signal Pinst(t). C j0 k is the scaling function coefficient at level j0 and djk is the wavelet coefficients at level j and at instant k. J is maximum level of decomposition. These coefficients are defined as C J 0 k ¼ hP inst ðtÞ; /j0 k ðtÞi and d jk ¼ hP inst ðtÞ; wjk ðtÞi

l1 X

hðmÞC j1 ð2n þ l  1  mÞ;

l1 X

gðmÞC j1 ð2n þ l  1  mÞ

ð6Þ

m¼0

q¼1

ð2Þ

C j ðnÞ ¼

m¼0

q¼1 minðN u ;N I Þ X

Let C0(n) be the discrete time instantaneous power signal. This signal is to be decomposed into the detailed and smoothed version of the signal at different level. From the MRA theory, we can conclude that Cj(n) are the smoothed version of instantaneous power signal and dj(n) are the detail version of instantaneous power signal at level j. They can be defined in the form of wavelet coefficient as

ð5Þ

The instantaneous power of the signal Pinst(t) is decomposed as in Fig. 2 using MSD technique.

where h(Æ) and g(Æ) are the Daubchies 4 low pass and high pass filter coefficients and l is the order of the filter. Using above recursive relation we can decompose the instantaneous power signal into its coarse and detail parts at different scales. Fig. 3 shows the general form of architectural model of multiresolution and the artificial neural network which consists of input layer, one or more hidden layers and output layer. The sampled inputs which are generated from the signal is defined by Eqs. (1) and (2), are passed through the different levels and down sampled by two at each level. In order to get an equal length of vector for input to neural network model, features at each decomposed levels are calculated. In our work we have selected root mean square (rms) values as the feature for input to neural network, because rms value at different decomposed level represents the energy contents of the signal at that decomposed level. For each pattern a set of rms value at different decomposition level are taken as input vector to neural network. The desired average power for the same pattern of signal is also calculated using Eq. (3). The neural network is trained for calculating average power of the signal by minimising the error signal defined as difference between desired average power and output of neural network.

360

S.L. Sabat et al. / Measurement 41 (2008) 357–363 C j+2,k

22

C j+1,k hk

20

2

2

Feature

gk

C j,k

Average Power

hk

2

d j+21,k

Extra ction

gk 2

d j+1,k

18 16 14 12 10

Desired signal generator

8

1

2

3

4

5

6

7

8

9

10

Pattern number

Fig. 5. Matching of predicted with desired average power.

dpk

Extra cted Feat ures

ypk(M)

epk (M) Adaptive Algorithm

Fig. 3. Architectural model of multiresolution and artificial neural network.

the connection weight associated with jth node of (M  1)th layer to kth node of Mth layer and ðM1Þ y pj ðtÞ is the output from the jth node of (M  1)th layer for pth pattern of network model. ðM1Þ NM is number of nodes in Mth layer. ~ Y pj ðtÞ forms the input vector to Mth layer of neural network. dpk is the desired output at kth node for pth pattern of network data. The error at kth node of ðMÞ Mth layer i.e. epk ðtÞ and the cost function can be expressed as ðMÞ

10 -1

Mean Squared Error

ðMÞ

epk ðtÞ ¼ d pk  y pk ðtÞ

10 0



10 -2

P 1 X p¼0

1X 2 EðpÞ ¼ e 2 p;k pk

ð8Þ ð9Þ

10 -3 10 -4 10

-5

10 -6 10 -7 10 -8 0

0.5

1

1.5

2

2.5

3 x10 4

Epochs No.

Fig. 4. The error convergence curve.

where value of k ranges form 0 6 k 6 Nk  1, Nk is number of nodes in kth layer. The network is trained with Levenberg–Marquardt algorithm [18] and weights of different layers are updated as  1 ðMÞ ðMÞ wkj ðt þ 1Þ ¼ wkj ðtÞ þ H TðMÞ ðtÞH ðMÞ ðtÞ þ kI  H TðMÞ ðtÞeM ðtÞ

ð10Þ

where k is a real quantity and H(t) is Jacobian Matrix as [19].

Let us consider a multilayer neural network model of M layers having NM number of nodes at Mth layer. The output from kth neuron of Mth layer for pth pattern of multilayered neural network in Fig. 5 can be expressed as [18] ! NM X ðMÞ ðMÞ ðM1Þ Y pk ðtÞ ¼ f wkj ðtÞy pj ðtÞ ð7Þ j¼0 ðMÞ

where f(Æ) is the activation function and Y pk ðtÞ is the ðMÞ

output from kth node of the Mth layer and wkj ðtÞ is

3. Simulation For simulation purpose we have considered the voltage signal v(t) and current signal i(t) of fundamental frequency 50 Hz associated with third, fifth, seventh, ninth and eleventh order of harmonics. The phase difference between voltage signal and current signal is random in nature and varies between 0 and 180. The simulated voltage and current signal with noise are represented as

S.L. Sabat et al. / Measurement 41 (2008) 357–363

pffiffiffiffiffiffiffi ð2Þð1:5 þ cðpÞÞS v ðtÞ þ nðtÞ pffiffi ip ðtÞ ¼ ð2Þð1:5 þ dðpÞÞS i ðtÞ þ nðtÞ

vp ðtÞ ¼

ð11Þ ð12Þ

where n(t) is Gaussian white noise signal having standard deviation 0.2 and p is the number of patterns considered for simulation purpose c(p) and d(p) are used for modulating the amplitude of the signal which can be expressed as: c(p) = d3 sin (2pf1p) and d(p) = d1 sin (2pf2p), where d3 = d1 = 1 and f1 = f2 = 1. Sv(t) and Si(t) represents the voltage and current signal which can be expressed as S v ðtÞ ¼

5 X

sinðð2c þ 1Þ2pfc t þ sc Þ

ð13Þ

sinðð2c þ 1Þ2pfc t þ rc Þ

ð14Þ

c¼0

S i ðtÞ ¼

5 X c¼0

where fc = 50 Hz, s0 = r0 = 0, s1, s2, s3, s4, s5 and r1, r2, r3, r4, r5 are the random phases present in the voltage and current signal respectively from 0 to 180. For simulation purpose we have considered 1000 number of patterns and average power is determined by preprocessing the data signal using wavelet transform and then fed the preprocessed data to neural network having an input layer of 6 nodes with 2 hidden layers, 5 neuron at 1st hidden layer, 3 neuron at 2nd hidden layer and one neuron at the output layer. The activation function associated with 1st hidden layer and 2nd hidden layer is tan sigmoid function because we have normalised the input data value to neural network in between +1 and 1, where as the output layer is linear transfer function. The voltage and current signals are sampled according to Nyquist criteria and 128 sample points per each cycle for voltage and current signals are generated. For the preprocessing of signal instantaneous power value is determined for the 128 samples as per the equation represented below P p ðtÞ ¼ vp ðtÞ:ip ðtÞ

ð15Þ

The instantaneous power signals of 128 points are decomposed upto 6 level. The rms value of each decomposed wavelet level are computed from the wavelet coefficients at each level. The decomposition is carried out by taking Daubchies4 low pass and high pass filter coefficients [20]. For each pattern of signal, set of rms values are computed and an input vector to the neural network is formed. From the analytic signal vp(t) and ip(t) average power of an ac signal can be computed by taking zero dc values,

361

Table 1 Comparison of desired average power and its corresponding simulated average power using WT Desired average power

Simulated average power (Using WT)

10.2964 12.7075 13.2982 16.3551 19.0672

10.8907 12.7835 13.2742 16.5440 18.9658

P av

" # 6 1 X ¼ V max ðqÞI max ðqÞ cosðaq  bq Þ 2 q¼1

ð16Þ

where k stands for harmonic levels. Vmax(q) and Imax(q) represents maximum values of voltage and current at qth harmonic level. aq and bq are the random phases associated with voltage and current in qth harmonic level. After forming the input vector to neural network the network is trained for average power. The neural network training is carried out in a Pentium-II PC of 350 MHz. The learning time is 1.92 seconds in Pentium-II PC. The error convergence curve during training process is as shown in Fig. 4. With the help of learned weights some untrained patterns are tested which provides good results as shown in Fig. 5 and some results are tabulated in Table 1. 4. Design of intelligent energy meter using TMS320C3X DSP starter kit This section represents a prototype model design as Fig. 6 of an intelligent energy meter using wavelet neural network simulated on digital signal processor (TMS320C3X starter kit). The codes for TMS320 C3X processor was generated using TMS320C3X code generation tool (320C30-C-compiler). The starter kit has one TLS32040CFN (Analog interface circuit) which is a on board chip for 14 bit analog to digital converter (ADC) and a 14 bit digital to analog converter (DAC). The measurement is carried out in the following way: The ac voltage of single phase domestic line is stepped down to 5 V peak to peak using a step down transformer and fed to a calibration circuit to calibrate the out put swing of 0–5 V for line voltage swing of 0–255 V a.c. This calibrated waveform of voltage signal is fed to IN+ pin of TLC32040CFN. It samples input signal with sampling frequency initialised by the program. The sampling frequency is controlled by the software while initialising the TLC32040CFN. The current signal is measured from a current transformer

362

S.L. Sabat et al. / Measurement 41 (2008) 357–363

TRA NSF ORM 220~ ER

Overload Protection

L O A D

(P.T)

TMS 320C3X DSP Starter Kit Current. Transformer

Current Calibration circuit

Voltage Calibration circuit

S/ H AIC TLC 32040C FN S/ H

V O L T A G E C U R R E N T

I N S T.

P O W E R

M U L T. R E S.

F E A T U R E

A N A L Y S.

E X T R A C T

N E U R A L N E T. M O D E L

D I S P L A Y

Fig. 6. Intelligent energy meter using TI DSP starter kit.

(CT). The output from CT is converted into equivalent amplitude of voltage signal. The calibration circuit is calibrated in such a way that a maximum amplitude of 5 V will be at output for maximum load current of 15 amp. Output from calibration circuit is fed to AUXPIN+ of TLC32040CFN. Then the voltage and current signals are sampled by TLC32040CFN and instantaneous power value is calculated using the relation Pinst = v(t) Æ i(t). The instantaneous power value is decomposed upto six levels by using multiresolution signal decomposition technique using Daubchies 4 wavelet filter coefficients. RMS value from each decomposed level are calculated which forms as an input vector to the neural network model implemented in DSP starter kit. The codes, weight vector and bias vector of the trained network stored in the ROM locations are used for calculating the average power of the signal. The output of the DSP starter kit is tabulated in Table 2. The prototype is tested with stan-

dard loads and power is calculated in terms of watts in the laboratory. 5. Conclusion The use of wavelet neural network for average power measurement is as good as other available methods. The intelligent instrument is helpful for on-line measurement or prediction of average power over a cycle from the voltage and current signals. The prototype instrument along with the proposed method for measuring power does not require power factor measurement, any a-priori information of the signal, constraint over the signal as well as instrument. Since this instrument does not require any system for measurement of power factor, it reduces the extra hardware in the circuit and the overburdening of the computation is minimised due to use of DSP processors. Acknowledgement

Table 2 Comparison of the desired average power with its corresponding power computed by DSP-TI card Desired average power

Average power computed by DSP TI card

100 100 60 40

99.1 99.3 59.5 39.8

The authors are thankful to the CSIR, Govt. of India for providing financial support to carry out research work. Appendix 1 The properties of wavelet transform can be expressed as

S.L. Sabat et al. / Measurement 41 (2008) 357–363

• • • • • •

Vj  Vj1, "j 2 Z x(t) 2 Vj () x(2t) 2 Vj1, "j 2 Z x(t) 2 Vj () x (t  2jk) 2 V j, "j, k 2 Z limitj!1Vj = 0 limitj!1Vj = L2(R) There is a function /(t) called as scaling function such as /(t) 2 V0 whose translation {/ (t  k); 2 Z} forms a orthonormal basis for V0.

Vj is the vector space interpreted as set of all possible approximation of the signal at the resolution level 2j of a function in L2(R). A scaling function / (t) 2 L21(R) exists in V0 such that 8j 2 Z; /j;k ðtÞ ¼ ð2j Þ2 ð/ðð2j Þ1 t  kÞÞ is an orthonormal basis of Vj with Vj  Vj1. By defining complementary subspaces Wj = Vj1  Vj so that Vj1 = Vj +PWj, we can write from MRA property as L2 ðRÞ ¼ j2Z W j . These subspaces are called wavelet subspaces and contain the difference in signal information between the two spaces Vj and Vj1. Mallat has proven that a mother wavelet w(t) can be constructed from the space such that the set of functions {w(2j) 1 (t  k):k 2 Z} forms a basis for Wj and these spaces are mutually orthogonal. The set of scaled and dilated 1 1 wavelets fð2j Þ 2 wðð2j Þ t  kÞ : j 2 Z; k 2 Zg provides an orthonormal wavelet basis for L2(R). Approximation and detail signals are obtained by projecting the input signal to corresponding (approximation and detail) spaces, respectively. References [1] T. Matsunaga, High precision optical encoders, Jpn. Soc. Precis. Eng. 51 (4) (1985) 722–729. [2] N. Hagiwara et al., Conference on electromagnetic measurement’88 digest (1988) 239. [3] N. Mohan, T.M. Undeland, W.P. Robbins, Power Electronics, Converters, Applications and Design, John Wiley and Sons publication, 2001. [4] K. Srinivasan, Errors in digital measurement of voltage, active and reactive powers and an on-line correction for frequency drift, IEEE Trans. Power Delivery 2 (1) (1987) 72–76.

363

[5] W. Shepherd, P. Zand, Energy Flow and Power Factor in Nonsinusoidal Circuits, Cambridge University Press, Cambridge, London, New York, Melbourne, 1979. [6] A. Marganitz, Power measurement of periodic current and voltage by digital signal processing, IEEE Trans. Power Delivery 2 (2) (1992) 117–123. [7] B. Djokic, P. Bosnjackovic, M. Begovic, New method for reactive power and energy measurement, IEEE Trans. Instr. Measur. 41 (1992) 280–285. [8] A.V. Voloshko, O.I. Kotsar, O.P. Malik, An approach to the design of digital algorithms for measuring power consumption characteristics, IEEE Trans. Power Delivery 10 (2) (1995) 607–612. [9] Paolo Carbone, Dario Petri, Average power estimation under nonsinusoidal conditions, IEEE Trans. Instr. Measur. 49 (2) (2000) 333–336. [10] S.L. Marple, Digital Spectral Analysis with Applications, Englewood Cliffs, NJ Prentice-Hall, 1987. [11] P.S. Filpski, Y. Baghzouz, M.D. Cox, Discussion of power definitions contained in the IEEE dictionary, IEEE Trans. Power Delivery 9 (3) (1994) 1237–1244. [12] Weon-Ki Yoon, Michael Devaney, Power measurement using the wavelet transform, IEEE Trans. Instr. Measur. 47 (5) (1998) 1205–1210. [13] A.V. Voloshko, O.I. Kotsar, O.P. Malik, An approach to the design of digital algorithms for measuring power consumption characteristics, IEEE Trans. Power Delivery 10 (2) (1995) 607–612. [14] G. Bucci, C. Landi, On-line digital measurement for the quality analysis of power systems under nonsinusoidal conditions, IEEE Trans. Instr. Measur. 48 (4) (1999) 853– 857. [15] W. Yoon, M.J. Devaney, Reactive power measurement using the wavelet transform, IEEE Trans. Instr. Measur. 49 (2) (2000) 246–252. [16] S.G. Mallat, A theory for multiresolution signal decomposition: The wavelet representation, IEEE Trans. Patt. Anal. Mach. Intel. 11 (7) (1989) 674–693. [17] A.N. Akansu, M.J.T. Smith, Subband and Wavelet Transforms Design and Application, Kluwer, M.A, 1996. [18] S. Yao, C.J. Wei, Z.Y. He, Evolving wavelet neural networks for function approximation, Electronic Letters 32 (4) (1996) 360–361. [19] T. Haggan Martin, B. Menhaj Mohammad, Training feedforward networks with the Mar-quardt algorithm, IEEE Trans. Neural Network 5 (6) (1994) 989–993. [20] Ingrid Daubchies, Ten Lecturer on Wavelets Society for Industrial and Applied Mathematics, Philadelphia, Pensylvania, 1992.