Predrag Petrovic, Ph. D. Milorad Stevanovic, Ph. D.
Digital Processing and Reconstruction of Complex AC Signals
~ Springer ACADEMIC MIND
Predrag Petrovic, Ph. D. University of Kragujevac, Technical Faculty Cacak
Milorad Stevanovic, Ph. D. University of Kragujevac, Technical Faculty Cacak
DIGITAL PROCESSING AND RECONSTRUCTION OF COMPLEX AC SIGNALS
Reviewers Srdan Stankovic, Ph. D. full professor, University of Belgrade, Faculty of Electrical Engineering
Slavoljub Marjanovic, Ph. D. full professor, University of Belgrade, Faculty of Electrical Engineering
(c) 2009 ACADEMIC MIND, Belgrade, Serbia SPRINGER-VERLAG, Berlin Heidelberg, Germany
Design of cover page Zorica Markovic, Academic Painter
Printed in Serbia by Planeta print, Belgrade
Circulation 400 copies
ISBN 978-86-7466-363-9 ISBN 978-3-642-03842-6
Library of Congress Control Number: assigned
NO TICE: No part of this publication may be reprodused, stored in a retreival system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of the publishers. All rights reserved by the publishers.
Digital Processing and Reconstruction of Complex AC Signals
CONTENTS
1. INTRODUCTION .....................................................................................................................•....•........5 6 1.1 Basic Principles of the Suggested Measuring Method 1.2 Mathematical Proof of Justification of the Suggested Measuring Method 11 14 1.3 Mathematical Proof of Correctness in Active Power Processing 18 1.3.1. Analysis of the Numerical Procedures Suggested in the Processing of Periodic Signals 1.4 Adaptability of the Suggested Algorithm Used for Measuring of Electrical Values in Electric Utilities .........•..........•.................................................•..•.....•...••................................................................... 19 1.5 Analysis of Possible Sources of Errors in Digital Processing With a Suggested Measurement Concept ..................•....•............................................................ 21 1.5.1 Simulation Results .....•.......•...•..............................................•......•.•...•...•..•..•..............................•26 1.5.2 Analysis of the Error Caused by Imprecision in Determining Sampling Interval ............•... 27 33 1.6 Simulation of the Suggested Measuring Method in the Matlab Program Package 1.6.1 Software Testing of the Suggested Measuring Concept of Electrical Values Based on Measurement Results in Real Electric Utilities........••....•.....•..•...................................................•...•..38 41 1.7 Practical Realization of the Suggested Digital Measuring System 49 1.8 Results of Practical Measurements with Realized Digital Wattmeter References 55 2. DIGITAL PROCESSING OF SYNCHRONOUSLY SAMPLED AC SIGNALS IN PRESENCE OF INTERHARMONICS AND SUBHARMONICS
58
59 2.1 Synchronous Sampling in the Presence of Subharmonics and Interharmonics 2.1.1 Derived Conditions for Precisely Processing..............•......•........•..•.............•....................•...••...•. 67 2.1.2 Asynchronous Sampling .••..•..•...•..•.••..•.••..•..•..•..•..•.••....•..••..•..•.•..•..•.••.•..•..•.•.••......•..........•..••..•••.. 69 2.2 Simulation Results 70 2.3 Calculation of the Truncation Errors in Case of Asynchronous Sampling of Complex AC Signals 73 2.3.1 Analysis of Worst Case Errors 73 2.3.1.1 Average Method ............•............................................................................................................ 75 2.3.1.2 Trapezoidal Method ...................................................................................................•..•..•....••... 76 2.3.1.3 Stenbakken's Compensation..............................•.•..•...•.................•........•...•.••..•.....••.................. 77 2.3.1.4 Zu-Liang Compensation ...•............•.....................................................................•..•.................. 77 2.3.1.5 Average Method- approximate expression ...•........................................•...•..••.......••.•..•..••........• 78 2.3.1.6 Trapezoidal Method- approximate expression...................................................................•....•. 78 2.3.1.7 Stenbakken's Compensation- approximate expression ....................................................•......• 78 2.3.1.8 Zu-Liang Compensation- approximate expression 79 2.3.2 Simulation Results 79 References .............................................................................•.•..•.......................................•.•.................83 Appendix A 84 3. RECONSTRUCTION OF NONUNIFORMLY SAMPLED AC SIGNALS
86
3. 2. Proposed Method of Processing 3.2.1 The Determinants ofthe Van der Monde Matrix 3.2.2 Reconstruction ofBand Limited Signals in Form ofFourier Series 3.3. Simulation Result and Error Analysis 2
88 89 90 95
3.4. Possible Hardware Realization of the Proposed Method of Processing 99 References ..•..••......••..••..........•.......•...••.•...•...••.••................•.•.•..........••..•..•••.••.•••..••..•••...•...••...........•.••.. 102 Appendix B ...•...•..•...•...•...•.•..............••.•..•..••..••..•...•...•..•..•.......•..........••.••..........••........•.....••.••..•..•.••.... 104 Appendix C •..••..••••••..•..•........•.....•.•....•.•..••.••...••.•••••..••••..•••••...........•.•..••.•..•••..••.•••..••......••••••••••••..•.••.•• 104 Appendix D •...•...••.....•...•.....••.•.•............•..••..••..••.•...........•.•....•......•.•....•.............•.....••...••••....•....•.•.••.••. 108 Appendix E ...........................................................................................................................•..•......••... 110 4. NEW METHOD FOR PROCESSING OF BASIC ELECTRICAL VALUES BASED ON DEFINITION FORMULA IN TIME DOMAIN ...•..•.........................................................•.....•....••. 112 4. 1. Suggested Method of Processing
112
4.1.1 EstimationofMeasuring Uncertainty
115
4.2. Simulation of the Suggested Measuring Method 115 4.3. Practical realization of the proposed algorithm 117 4.4. Experimental Results 119 References ..•.••...•................................•...•....................•.........•..•..........•......•..••....••..••............•....•..•.••.•. 121
3
PREFACE This monograph is the result of a long-term work of the authors on the problems of digital processing of complex periodic signals of voltage and current which can be found in the distribution network. This scientific field has been given special attention in the literature abroad through a great number of articles published in the leading journals, textbooks and the other publishing forms. Over the recent period, the authors of the monograph have published a large number of papers in a number of journals and have presented at the leading international conferences, which verifies the results they have achieved in this scientific field. Their patents which have been registered in their home country are the result of the work. The problem of the reconstruction of complex periodic signals, which is in the focus of Chapter three of this monograph, has been given special attention. A completely new protocol, which enables the development of much superior and more efficacious algorithms, has been developed, and the obtained results are unique in global practice. Chapter two deals with the processing of nonharmonic components of ac signals, i.e. interharmonics and subharmonics based on the principles of synchronous sampling. The conditions, required for the performance of such a processing, have necessarily been derived. Chapter four looks at a newly developed method for the calculation of basic parameters of the processed voltage and current signals. Having being practically verified, this method has demonstrated exceptionally favourable performance. The authors believe that the monograph will be beneficial to specialists and experts involved in problems of this scientific field, and hope that it will serve as a useful guideline to follow in further investigations. The authors wish to express their gratitude to their language editor Lidija Palurovic, M.A. Philo!'
4
1. INTRODUCTION The first chapter of this book is dedicated to the problem of measuring basic electric quantities in electric utilities (voltage, current, power, frequency), both from the aspect of accuracy of this type of measurements and the possibilities of simple and practical realization. The conventional algorithms used to this purpose (calculating the active power and the RMS value of the voltage and current signals that are the object of processing) are based on the use of integration or summation process on limit time interval. A characteristic of this approach is that it offers the correct result if the input signal is periodical in time. However, in real systems, voltage and current signals are not necessarily of a periodical quantity, due to the presence of nonharmonic components or/and possible stochastic variation. It is for this reason that, very often, the result of processing is not an instantaneous value of processing signal - it is rather a processed (observed) value in some time interval, both with conventional and certain new algorithms for processing [1-19]. The measuring equipment used to this purpose worldwide (as well as in our electric utilities) can be of different precision class (from class 0.1 to class 2), and measuring usually presupposes that the recording on the net takes place from a specified moment to another moment, specified with a particular protocol (these two moments can be some minutes or some hours away). This further implies that we deal with measurements not conducted on-line (continuously in time), and for which we can use a realized measurement system due to its accuracy and price. Many applications involve digital processing of periodic signals [1-19]. For example, both voltage and current in electric utilities are periodic signals containing harmonic components. The measuring method proposed in this chapter is based on selecting samples of the input variable in a large number of periods in which the system (electric utilities, in this case) is considered to be stationary. The stationary condition can be proved by the values obtained from measuring of the RMS (root mean square or effective) values of the voltage system. Stationarity of the system suggests that slowly changing quantities, such as current and voltage, and their harmonic content, are constant within the measuring interval. In this case, unlike the Nyquist criteria, undersampling is possible. The current makes this system nonlinear as the type of load which will be used and the time of its connection to the investigated system cannot be predicted. However, after a certain number of periods, the current can be considered as a slowly changing variable during processing. The utilities are inert systems in character, so that the sampling during several periods of the observed system variables can be performed. It is for this reason that very slow, low-cost, but very accurate AID converters, such as a dual-slope type, were used in the proposed measuring system. Voltage and current from real electric utilities were used as input variables. The sampling procedure is initiated arbitrarily. The distance between two consecutive samples is given by:
tdelay = N · T + L\t
(1.1)
where N is the number of periods between sampling, T is the period of the input voltage, and .<1t is the delay determined by the delay of elements in the processing circuit. .<1t depends on the harmonic content of the input signal. All conditions, which have to satisfy both Nand .<1t to get an accurate result of measuring, can be derived. For that reason they can not be arbitrary. The suggested measuring method is classified as a synchronous sampling method which does not introduce any error when measuring sine and spectrally limited complex periodic voltage and current signals. Compared to other methods, it is the simplest method from the viewpoint of realizing a microcomputer block using the simplest algorithm with a relatively small number of samples W in the measuring cycle. However, it is non-ideal synchronization of sampling frequency with the frequency of the measuring signal that introduces a significant error. Special attention has been paid to this problem. Taking into account the presented facts, it is obvious that the time interval necessary for the correct processing of the observed quantities becomes very short from the viewpoint of inertia of such huge systems as electric utilities. This has been absolutely confirmed by experimental measurements we have performed. The measuring time for the proposed method is about 1 second. 5
The problem of noise that can occur in a real system, as averaging is performed to determine the average power, is not considered important as the average noise value is zero. The possible nonlinear distortions in transition processes do not last very long, so they can be avoided when the functioning of this wattmeter designed for measuring periodic variables is considered. Mathematical analysis of the proposedmeasurement methodand the defined conditions in which they give an absolutely (mathematically) correctresult will dependon the harmonic contentof the input signal which is the object of processing. All of this is made for the nets that operateat frequencies of 50 and 60 Hz. Thus we create a possibility to define an adaptive algorithm for processing which can track changes in slowly-changing systems such as electricutilities. Consequently, it is possible to make a correction of the sampling frequency based on the established change.
1.1 Basic Principles of the Suggested Measuring Method Voltage and currentoccurring in real electricutilities (the real circuitof alternating current) were used as input variables. Practically, measuring is based on the direct measurement method, e.g. voltage and currentmeasurement duringwhich the problem of phase correlation between voltage and current signals is not evidenced since instantaneous signalvaluesare first sampled, and then processed. It is a knownfact that the phase angle represents a serious defect in measurement methods realized with an analogue voltmeter and ampermeter. In this case, it is due to the fact that measuring is restricted only to the resistive load. In the measurement systemwe are suggesting, the samples of voltage and currentare taken in arbitrary moments, with the distance between two consecutive samples givenby (1.1). Based on the obtained samples, series v(k), i(k) (k = 1,2,... U') of voltage and current samples are formed. The sampling procedure is initiated arbitrarily and it enables the reconstruction of the measured valuesin accordance with the following diagram (Figure 1.1). v[v] Idelay
310
I[ms] 20
10
30
40
50
-310
Figure 1.1 Proposed methodof sampling
The average power of signals sampled in this way is calculated when the sum of all W instantaneous valuesof poweris dividedby the wholenumberof samples W, according to the following equation: 1
1
W-I
W-I
T
p!::'e = W ~V(ti~(t;)= W ~P(ti}, ti = to +i W 1=0
(1.2)
1=0
where W is an arbitrary numberdetermined by the numberof samples neededfor a precisereconstruction of the measured value, to- the initial moment of measurements, where O
f
P = - v(t). i(t)lit To
(1.3)
where T is the periodof the input voltage. After measuring a series of samples the wattmeter repeats the sameprocedure on the next series of the same lengthuntil it is switched off. 6
Measuring the active power in a system with complex periodical signals and with arbitrary load is basedon the principle appliedin the case of a stemwith simple periodical signals. The measurement method proposed in this chapter is based on selecting samples (the original assumption) of the input variable in a large numberof periods in which the system (the electricutility in this case) is considered to be stationary. Stationarity of the system provides consistency in slowly changing quantities, such as current and voltage, and their harmonic content within the measuring interval. This is why very slow, low-cost, but very accurate dual-slope AID converters were used in the proposed measuring system. For this type of converter, the accuracy of conversion will only be governed by the reference voltage. By determining the transferfunction AOw) (amplitude transferfunction of dualslope ADC), we notice that this is a linear system with const. amplitude characteristic, and this is the reasonwhy it doesnot include an additional distortion in the measurement value [20]. The basic structure of suchADCwith 8-bitsresolution is presented in Figure 1.2. sw;
r - --, I
I SAMPLE --.jAND Vul BOLD I
L __
-Vul
~
~
I
--"\M~~
+Vre
J
STRATL
eLK
BUSY
OW Q, Q, Q s Q 4
QJ Q2 Q I Q I
Figure 1.2 Dual-slope ADCwith 8-bitsresolution
For this type of ADC the following equation is valid, and it is the one we base on the conversion of the measured value: 1
VI (t1 )
where T]
= t] -
=_ . R·C
V';nput •
(1.4)
dt
to
to.
v. ()1 = R.C
V t I
tl
J
mput.
T. = 1
v.
mput •
R.C
2n • t
(1.5) C
where T] = t: - to represents the period of time in which the countercounted Z" clock impulses of period t.. In equations (1.4) and (1.5)we assumed that Vinput is the constant value in the periodof integration. If it is not the case,we mustplacethe sample in front of ADC and hold the circuit. An the moment determined as t2, the voltageat the outputof the integrator is vo = 0, i.e. 1 ~ V VI(t2)=VI(t1)--·JVREF .dt=VI(t1)- REF .T2=0 ,
R·C
where T2 infer:
=
t: - t]
=
~
R·C
(1.6)
it; is the time in whichthe counterregistered i clockimpulses. The last two equations
7
~.2n.t - VREF -i-t =0 R.C
C
R.C
C
(1.7) ,
in other words:
2n
(1.8)
i=--·V V ul REF
The last formula reveals that the number i, i.e. the number registered at the counter at the moment t2 is proportional to the absolute value of the input voltage. Similarly, it suggests that it is dependent neither on the resistance R nor capacity C nor the amplitude of the clock impulses t.: A standard dual slope AID converter operates with a sampling frequency between 4 and 96 Hz, depending on the input amplitude. This type of converter with a resolution of 16 bits was used for the development of the described digital measuring system. Another important advantage of this method (integrating ADC) is that the input signal becomes averaged as it drives the integrator during the fixed-time portion of the cycle. Any changes in the analog signal during that period of time have a cumulative effect on the digital output at the end of that cycle. Other ADC strategies merely "capture" the analog signal level at a single point in time every cycle. If the analog signal is "noisy", i.e. containing significant levels of spurious voltage spikes/dips one of the other ADC converter technologies may occasionally convert a spike or dip because it captures the signal repeatedly at a signal point time. A dual-slope ADC, on the other hand, averages together all the spikes and dips within the integration period, thus providing an output with greater noise immunity. Delta-sigma (or more accurately, sigma-delta) ADCs is the newest architecture, and it is used in systems demanding high-resolution data acquisition; but when they are used in instrumentation, their filter delays prevent multiplexing and loop stability. Otherwise, they have poor step response contrary to dual-slope ADCs. The influence that ADC architecture (over adequate model of ADC) has on the error in conversion is very well-known for three most important converter types: integrating, with successive approximations and flash converter [21]. The different sources of error were analyzed in the form of integral and differential nonlinearity, in order to define unique model of error. In this way we can generate the table with correction factors and a diagnostic model for error detection. Numerical simulations were carried out in order to valorise the theoretical results. In this way, a possibility is opened to model an AD feedback block on the above-mentioned converters, in a unique way [22]. The error in the processing section for the analogue signal at the integration AD will have a polynomial form, so that it can be compensated in the simplest way. Taking into consideration the confirmed linearity of the suggested methods in [22], we can rightly assume that the applied dual-slope ADC represents an optimal solution under this criterion. The suggested concept of measuring the RMS or effective value of current, voltage and power can be classified as a synchronous sampling method through which, in theory, in equal time intervals, W samples are taken. However, non-ideal synchronization of sampling frequency with the frequency of the measuring signal introduces a significant error. Special attention has been paid to this problem. Theory of synchronous sampling was developed for periodic alternating signals (sine and complex periodic signals). In the classification of measurement signals, these are the first and second type of measurement signals. Synchronous sampling with an own definition is performed when a certain period T is divided into W equidistant intervals, after which W samples of current and voltage are taken in equal time intervals TIW. According to the expanded definition of synchronous sampling, we take W samples of the measurement signal and form W power samples in equal time intervals over M periods of signal, provided M and W do not have a common factor. It was proved mathematically (the sample set theory) [4], that if we take W samples of a periodic function equidistantly over M periods, we will obtain the same value of observed periodic function as in the case of uniformly performed sampling with W samples over a period, if the starting time moment to is the same, and provided that M and W do not have a common factor. A broadened definition of synchronous sampling enables us to increase the sampling interval from TIWto MTIW, which can be important from the aspect of practical realization. Stocton and Clarke [3] derived the theory of synchronous sampling based on a representation of periodic signals v(t) and i(t) in the form of a Fourier series. The instantaneous power of such signals p(t)=v(t)i(t) can be presented as:
8
(1.9) where s is the harmonic order from the spectrum of v(t), s E (0, (0), Vs and as are the amplitude and phase of the sth harmonic, r is the harmonic order from the spectrum of signal i(t), rE(O, (0), L, fJr are the amplitudeand phase of the rth harmonic.Harmonicsof the same order in voltage and current signals, v(t) and i(t) (for s=r) generate the de componentand sine componentwith frequency 2s, while the current and voltage harmonicswith different order (when is s<>r) generate two sine componentswith frequencies (sr) and (s+r) in power signal p(t) spectrum. The instantaneous power signal with period T can be representedin the form of a Fourier series as: (1.10)
The average power calculated in accordance with the algorithm of synchronous sampling with W samples taken over a M period of the measurementsignal, can be represented in the following way, if the startingmoment of sampling to is equal to null: (1.11)
The absolute error which generatedthis kind of calculationof active power is defined as:
E=~~ -Po
1
= - L00
W
q=l
(
(2'
JJ
W-l M PqLsin ~+({Jq
i=O
(1.12)
W
Based on the cosine theory [4], the expression ~Sine1Zi:M + ffJq
Jis equal to null. If qWW does not
belong to the group of integer numbers (qMlW ftZ), the error E is equal to O. If qMlW is an integer number,the error is different from null and obtained as: E=
IP sin e,
(1.13)
q
qM=int W
A practical explanation of this mathematical result can be expressed in this way: the harmonic component of a q order from the power signal p(t) spectrum of the T period has the period of T/q. If MT/W is the sampling interval, then for the.qth harmonic, it is a qMlWth part of their period. If qMlW is the integer number, the interval between two samples for qth harmonic is equal to the multiple of its period. In the given case, through sampling we obtain the same value of harmonic component of the q order. For this reason, it is obviously not possible to reconstruct this harmonic component from a signal spectrum, on the basis of the same sample value. A similar analysis is used for the RMS value account with synchronous sampling. If the measured signal is periodical with a T period, the synchronous sampling by definition includes dividing of the T period in Wequidistant intervals and taking of the W sample of the voltage signal in equal time intervals T/W. By multiplying sampled values of the voltage v(t) by themselves, we obtain W values of the square of the voltage signal in discrete time moments v2(tJ. The square of the effective value vej(W) is calculated when the sum of these W values of the square of the voltage signal is divided by W: (1.14) 9
where Ii represents the discretetime moments in which we take the voltage samples. In a similarway we calculate the square of the effective value of the current Iej(W), with W samples of the measured current signal i (t):
I;jW)
=~ I;i(tJ(ti)=~ I;i 2(t;) W;=o
(1.15)
W;=o
It is at this place, as in the case of calculating the active power, that the extended definition of synchronous sampling is validated. The same result is obtainedif the calculation of the effective value is performed with W samples of the measured signal. These samples are synchronously sampledduring the M period,providedM and W do not have a common factor. For the periodicalvoltage signal v(t) with the T period represented in the form of a Fourier series, the instantaneous value of the squareof the voltagev2 (t) comprises the sum of the following expressions: (1.16) where Vs and as are the amplitude and phase of the sth harmonic, Vr and a; are the amplitude and phase of the rth harmonic from the voltage signal v(t) spectrum, and s, rE(O, (0). The harmonics of the same order (in case s=r) within spectrum of the measurement signal generates the de component and sine component of the 2s frequency, while harmonics of differentorder generates two sine components of the (s-r) and (s+r) frequency, in the spectrum of the square of the voltage signal. The square of the voltage signalwith the T period can be represented in the form of a Fourierseries as: 1llJ t • v 2 ( t ) = Veff2 + ~ LJVq SIn --+a q q=l T
(2
J
(1.17)
The effective value Veff2(W), calculated on the basis of equations (1.14) and (1.17), in accordance with the theory of synchronous sampling with W samples, is: V 2(W) = eff
1LV sin(2~+a OM J V +W T 2
W-l
eff
q=l
q
(1.18)
q
The absolute error generated by this kind of calculation of the effective value is: E = Veel2(w) - Veff2 = .l ~(V LJ q ~ £..J sIn(21li W;-o i=O W
qM
°
+ aq
JJ
(1.19)
If qMlW does not belong to the group of integernumbers, the error E is equal to null, but if it belongs to integernumbers, the error is differentfromnull and it takes the following form: E
=
LV sina q
(1.20)
q
qM=int W
10
1.2Mathematical Proofof Justification of the Suggested Measuring Method Now we investigate the case where the proposed algorithm in this chapter is applied to the input voltage defined as: vi"put
M • [rad] =r, + fivR ~ k2r- 1 sm[{2r -1}w1 + IfJ'2r-1] =V input {t 1io =2tif -s-
(1.21)
where {O is the fundamental angular frequency, k2r-1 VR is the RMS value of the 2r-1th harmonic component, VI is the average input voltage, and If/2r-l is the phase angle of the 2r-1th harmonic of voltage. M is the number of harmonic components (the highest harmonic is of 2M-1 order); where we initially supposed that only the odd harmonics (in the processed complex input voltage signal) exist. By the definition, the RMS value of voltage with the given harmonic content is: M
viMs = V/ + vi L r=1
v..
(1.22)
while, in accordance with the proposed algorithm, it is calculated as:
~
J]
2* = - 1 L..J Vinput 2 [ ). ( -N + I1t , VRMS
W
j=1
50
N being a natural number.
(1.23)
In this case, the number N (the number of whole periods between two consecutive voltage samples) belongs to the group of natural numbers, L1t is the delay in processing presented in seconds, W is the number of samples needed for accurate processing of the observed values, based on the suggested algorithm for digital processing. When we select the value for delay L1t, we must introduce the additional limitations for satisfying the Nyquist criterion. Namely, with the suggested measurement method we are not able to perform real reconstruction of the processed signals because of extremely low speed of conversion. This is the reason why it is possible to make only "virtual" (delay in time) spectral reconstruction. Since the delay L1t defines the distance between two consecutive samples from period to period (or more periods, depending on the value of parameter N), the delay must satisfy the Nyquist criterion. In other words, it must be in agreement with the basic postulate of the theory of synchronous sampling, under which we can classify the suggested measuring method. If the processing signal possesses the highest harmonic of the M order (the voltage signal defined by (1.20)), the delay L1t must satisfy the condition L1t5f/(2M+ 1), while T is the period of signal processing (for the net in Europe
T=20ms). The proof follows the procedure (it is supposed that only odd harmonics exist in the system, but the presented mathematical proof is of a general type). It is essential that: (1.24) The input voltage signal can be presented as:
(1.25)
M
=
VI + fiVR
Lk
2r- 1 sin[(2r
-1)2fJifl1t + If/2r-l]
r=1
and then (1 ~ j ~ W) . Squaring the predicted input voltage, we have:
11
t
Vi~PU,[J{~ + 1M)] = {~ + J2vR
t
kzr-Isin[(2r -1)2fJdIM + !fIzr-I]}'
.{~ + J2v kZt- sin((2t-l)2fJdIM +!fIzt-ll} = R
(1.26)
1
M
=V} +2J2~VRLk2r-l sin((2r-l)2/JTjN+fJl2r_l]+V;Z r=1
where: M
Z
M
=L
L k2r-lk2t-1 {cos[2(r - t )2/JifAt + fJlr - fJlt]-cos[2(r + t -1 )2/JifAt + fJlr + fJlt]} r=l t=1
(1.27)
f=tr
{ttlczr-lk2J-{SiI(!fI2r-l +!fI2J_J~sin2(r +t -l)2/JiN -CO~!fI2r_1 + !fI2JJ~cos2{r
+;
+t -l)2f1iN ]}
In order to shorten the expression (1.28), we write the first addend as: . (2r-l)2j1rMiW 1 (2r-I)2jtdMi ((2r-l)2 jtmti)) (2r-l)2jtmti e A = L.Je = L.J e =e . (2r-I)2j1rMi 1
f
f
}=I
}=I
(2r-l)2jtmti
=
e
e-
(1.29)
e(2r-l)j1rMiW
( ) sin 2r -1 f1lAtW . (2r-l} 2j1rMi . At e 2 sin(2r -1)2/1l2
For the predicted harmonic content of input signal we write:
/(2r-l)WAtEN
2f(2r -I)~(l N(I::S; Vr::S; n)
(1.30)
The second addend in relation to (1.28) can be represented as (under condition
W W . 4 jtr(r-t )MWi " 2(r-t)2jtdMi =,,( 4jtr(r-t)Mi\J = 4jtr(r-t)Mi. e -1 f=te f=t e J e e4/1r(r-t )M -1 2jtr(r-t )MWi.
= 4jtr(r-t)Mi. e
e2jtr (r-t)titl
e
(
)
.. SIn 2/1l r - t AtW (r '* t)
r~):
= (1.31)
sin 2/1l(r - t )At
from which it follows that: r-t E Z
2f1l(r - t)!'!I ~ ktr,!'!I ~
k ( (!'!I rt (r;t() 2/ r - t '
(1.32)
In an extreme (boundary) case for (1.31), the following is obtained: I
= lim
sin2/1l(r-t)AtW
A~Ar,1 sin 2/1l(r - t )At
= 2/1l(r-t)W = W 2/;r(r - t) 12
(1.33)
where: 1 ~ r,1 ~ M (r * 1) -M s -I
~-1
-(M -1)~ r-I
111*
s M-l
(1.34)
k 2/(r-l)
If, for example, we take M=lOl and net with frequency of/=50Hz: -100(M -1) ~ 100(r- I) ~ (M -1)100 (1.35)
M=101 - 10 ~ 100(r- 1) ~ 10
4
4
Underthe assumedconditions (1.35) it follows that: sin[2/1l"(r - 1)111W] = 0 2/(r - 1)I1IW E N
(1.36)
*
1 ~ r.t ~ M,r 1 The last addendin expression (1.28)can be represented as: w
~
w
2(r+t-1)2/t;iMi _
LJe
. 2(r+t-1)2/nnti\J _
- LJ e
j=1
=
~(
2(r+t-1)2/nnti.
) -e
e2(r+t-1)2/trNiW _ 2(r+t-1)2/nnti -
e
j=1
(1.37)
T. sin(r + 1 -1)2jJrMW sin(r + 1 -1)2jJrM
Fromwhich 1 ~ r + 1 - 1 ~ 2M - 1 2/1l"(r + 1 -1)111
~ k1l",111 ~
(k ) 2/ r+l-1
k
(1.38)
111*-~-"""7""
2/(r + 1 -1)
2/(r + 1 -1 )111
*k
In a boundary condition (case) (f=50Hz) for (1.37) we obtain:
(r+t-l)2/1l"W = W (r + t -1)2/1t 100 ~ 100(r+ 1 -1) ~ (2M -1)100 I
= lim sin(r+ t-l)2/1tdtW
=
A~Ar.t sinl» + t -1)2/1tdt
*
100(r+ t - 1)dt k 2/(r+t-l)dtW E N 1 s r.t ~ M
(1.39)
The derived condition (1.30) for the delay L11 must be satisfied in order to equalise the result of theoretical and the suggested modelof processing. In addition, the conditions (1.36) and (1.39) determine the shape of indexesrand 1 and, consequently for the value of L11. Therefore, we are in a positionto write an adaptive algorithm which will, in accordance with the harmonic content of the input voltage signal, definethe value of delay L1t, so that the suggested measuring methodcan yield the correctvalue. In a case when the input voltage signal (besides odd harmonics) containsharmonics as well, the conditions (1.30), (1.36)and (1.39)take the following form:
13
jrWl1t
E
N (1.40)
I1t 2fr-~N 2 f(r - 1)fllWEN 1 ~ r.t ~ M, r ;t 1
f(r + t)l1tW
E
(1.41) N
(1.42)
l~r,t~M
In order to confirm that the derived conditions (1.40), (1.41) and (1.42) are appropriate for conditions (1.30), (1.36) and (1.39), it is sufficient to look at relations (1.40), (1.41) and (1.42): here, the indexes r and t can be replaced with 2r-1 and 2t-1, for the case in which only odd harmonics (in a complex periodic voltage) signal are present; these are processed according to the suggested measurement method. With our forms, the derived conditions are very similar to those provided in the theory of synchronous sampling, the difference being that in the latter it is necessary to fulfil the additional demands related to the selection of parameters LIt and W, with regard to the delay in processing and the necessary number of samples. During this, we must not fail to satisfy the Nyquist criterion, as a basic postulate in a digital processing of analogue values. Depending on the harmonic content, it will subordinate the error or, more precisely, the form of the delay that will cause the accumulation of error.
1.3 Mathematical Proof of Correctness in the ActivePowerProcessing If calculating the average power by the proposed method, let us assume that the system voltage Vinput(t), and current iinput(t) signals can be represented as a sum of their Fourier components as follows: V input
M
= VI + .J2V R
•
L k .sin (rmt + f//
r)
=V
=
(nput
input
(t),
r=!
i input
= I I + .J2I R
(1.43)
M
•
L
1s sin
(s OJ t +
¢s
)
(t)
s=!
where m.=21ifrepresents the angular frequency, krVR is the RMS voltage value of the rth harmonic, lsIR is the RMS current value of the sth harmonic, f//r, f/Js are the phase angles of the rth and sth harmonic of voltage and current, V/, II are the average input voltage and current respectively. M is the number of the highest harmonic, while, for the reasons of simplicity, we assume that the voltage and current signals possess the same number of harmonic components. At the same time, we maintain general character in our approach and conclusions. In real environment, the current signal usually possesses a "richer" harmonic content. The delay LIt must satisfy the same demands as in the processing of the RMS value of the net voltage (LltSf/(2M+1)), the difference being that if the current and voltage signals have a different harmonic content, the conditions for the delay LIt will determine a signal with a "richer" harmonic content (which is usually the current signal because of its greater dynamics) In other words, we must satisfy the demand that LltSf/(2max(M, K)+1), where M is the number of the voltage harmonic components, and K the number of current harmonics. Average power p is calculated using the following (definition) expression, while the processed power is defined as p", in accordance with the suggested measuring method: T
p
=t f iinput (I). Vinput (I )d1,T =]o
w
p* =
t L Vinput (j(NT + fll )). iinput (j(NT + ~/))
(1.44)
j=l
Llt[s] is the delay in processing presented in seconds, W is the number of samples needed for accurate processing of the observed values, based on the suggested algorithm for digital processing. 14
We shouldprove that:
p * =p We start with the following expressions: p
=1-
=
J..
HII
+ ../21 « '
t
l,sin(swt +
(1.45)
¢,)} [VI
+ ../2V.
·
t
k,sin(rwt + lfI J]dt
fT!IIVI +J2IIVR· fr= krsin(rmt+f//r)+J2I RVI .flSSin(smt+¢s)+! dt s =1
1
fr=1 fs=1 k),sin (rwt + v , )lin (swt + ¢,) = lIVI J2 II? f krcos(rmt f// r)' -fc;1 ; J2 IR;I f lscos(smt r=1 + 1- I. V• . f f k), f {cos [(r - s)wt + ¢,]- cos[(r + s)wt + r=1 s=1 + 21.Ve
T 0
(1.46)
'
+
+
+
+ ¢s)· -fr;1
;
+
s=1
lfI, + ¢Jdt
lfI, -
0
If we introduce the following abbreviations in eqn.(1.46): Al = II~
Az = Jii
M
L ~ [cosur,cos(2r1t + \fir)] ~ Az = 0
VR
(1.47)
r=1
A3 = Ji~R~
M
L -1;[ coso, - cos(2s1t + ~s)] ~ A
3
=0
s=1
(1.49)
=>~1 =0 M
~2 =IR~· L~~CO~\jIr -~r) r=1
A43 =-tIR~' ttk,ls
r=1 s=1
=>~3
.~{siq(r+s)2Jr+f//r+¢r]-sir(f//r +¢r)}=0 (1.50)
=0 M
=>p=II~ +IR~' Lk,lrco(f//r -r/Jr) r=1
The final expression (1.50) defines the power based on the definition including the harmonic voltage and currentcontent. On the other hand: p' =t
t {~ -iiv. tk,Sin~llj(NT +
s'
M
+ M)+
W
lfI.J}
+1
+ .[iIe ' tl,sin[sllj(NT + M)+ M
¢J} =
M
=IJVI + J2~VI LIsLsin[sO!i(NT+~tA,)+¢J+ J2~vRLkrLsin[rmj(NT+~t)+f//r]+ s=1 j=1 r=1 j=1 + IR;R
(1.51)
ffk,lsI{cos[(r-s)aJj(NT + Llt)+V/r -¢J-cos[(r + s)ad(NT + Llt)+V/r +¢sn r=1
s=l
j=l
Introducing the.following expression: w
w
j~
j~
B. =Lsirlsaj(NT+!!J)+¢S] =L{co~sirlsaj(NT+!!J)]+siIYAco~saj(NT+!!J)]}=co~Cz +siIYAG; while: 15
(1.52)
C1 =
w
W
L cos [sOJj(NT +!1t)lc = L sin [sOJj(NT +!1t)]
(1.53)
2
}=1
}=1
It yields: C + iC 2 1
=
Lw esmj(NT +~t)i = L \esmi(NT +~t))\i = esmi(NT +~t). L \esmi(NT +~t))\i j=1
W {
W -1 (
j=1
j=O
.( ) smi(NT +~t}w -1 = esm1 NT+~t . e esmi(NT +~t) -1
=
e
. S{j)i(NT+~t)W
.(
= esm1
) Tie
NT+~t .
. • sin
2
+~t)
smi (NT 2ie 2
SOJ
-(NT + ~t)v
2
s OJ
.sin-(NT+~t)
2
s:
SWi(NT+MXW+l) sin (NT + L1t)w 2 .--=------
sin sO) (NT + L1t) 2 sin sO) (NT + L1t)w
C1 = cos sO) (NT +L1tXW +1).
2 ,C 2 sin sO) (NT + L1t) 2
2
= sin
sin sO) (NT + L1t)w sO) (NT +L1tXW+1)._--=2::...-_ 2 sin sO) (NT + L1t) 2
(1.54)
That is: . W( N + S~)
C\ =cos[(W+lXsNJr+ S~I)]. Sl~ (s
Jr
~)
sin sNJr+ S~I
sOJflt
. sOJfltN
[~] cosWsNJr,sln-cos(W +1~NJr'cos (W +1)~ . 2 cossNJrsinsm t 2
1
. sOJfltW
WSN cos(W +1) ' - - ' S l n - =(_lyw+l)sN ( ) 2 2 . S OJflt (- l)sN
.-=i-.
[(
=
Sln--
2
[
{
C, =sin (W +\sN7r+
s~t
SOJ~tJ
J]
sinW ( sNJr+--
.
. (
s~ J
sin sN Jr +- -
)SOJflt]. sOJfltW 2 2 . S OJflt Sln-2
. ( ) sOJ~t . sOJ~tW ( l)wsN sin W +1 , - - , s l n - (_lYW+'~N. (~I)SN . ~OJflt 2 Sln--
2
2
(1.56)
. [(W + 1) .SOJflt] . sOJ~tW sin - - 'S ln--
2
(1.55)
cos W +1 - - ' S l n - -
2
sOJ~t
.
Sln--
2
To be able to equalize the definition and the processed signal it can be noticed that: sin s~M :f. 0, sin sw~tW
= 0, (1 ~ 'is ~ M) OJ = 100Jr rad / s,!1t = 0,5.10-3 s, sin ~:f. 0 ~M ~ 39;
(1.57)
sin ~ W = 0 ~W 2 40k, kEN The derived conditions are arising as a result of the freely-assumed value of the L1t delay, which is limiting the possible values for the highest harmonic of the processing signal. It is clear that for the obtained value for M~39, in accordance with the Nyquist criterion, we must adopt the delay of L1t~0,5xl0 3s. If we introduce the following abbreviations in the calculation under the proposed method: M
M
s=1
r=}
~B; = J2I;~ lls( eos
s~ +sinsC1) =0, '\Is,andB; = J2I: Dr( cos'Vr~ +sin'VrCl) =0, '\Is M
B3
=
IR;R. L «.t., Wcos{'Vr
- ~r) ~ B 3
r=1
M
= I R • VR
•
L krlrcos{'Vr - q,r) r=1
16
(1.58) (1.59)
W
W
W
j~
j~
j~
B4= Lco~((r-s)oj(NT+&)+~r -¢s)]= Lco(~r -¢s)co~(r-s)oj(NT +&)]- Lsin(~r -¢s)·
(1.60)
.sin[(r-s)oj(NT +&)]=co(~r -¢S)c3 -sin(~r -¢s)c4 Introducing the following shortens writing: w
w
C3
= L cos [(r - s )mj(NT
C4
= Lsin[(r-s)mj(NT +~t)]= Lsin(r-s)mj~t;
j=l
W
j=l
j=l
C + i- C
4
=
(1.62)
f e(r-s)wjMi = f (e(r-s)wMi Y= e(r-s)wMi . I (e(r-s)wMiY= 1
j=l
j=l
j=O
L
=
(1.61 )
j=l
W
We obtain: 3
L cos (r - s)mj~t;
+ ~t )]=
e(r-s)wMi . e(r-sJWMiW -1 e(r-s)wMi. e(r-s )(l)Mi _ 1
2i . e
(r-s )wMWi 2
(r-s )(OM
Ti- e -2-
. sin
• sin
(
r-
S
(
r-
S
i.. jW!:J.tW
2 \~_,
~(
e
2
.
( \~-'!:J.tW ), sin r - s jW
W+l1 .
jW!:J.t
(1.63)
--'---~2-sin (r - s )Wilt 2
2
To obtain complete equality of the suggested method and the definition, it is necessary that: ~t = 0,5.10-3 s, OJ = 100Jr rad / s, sin ri: Jr:;i: 0, (r:;i: s), M ~ 40; sin (r-:o)w Jr = 0, W ~ 40k ~B: = 0, kEN
(1.64)
The derived conditions are arising as the result of the same assumption as shown in the calculation of the relation (1.57). Taking into account that: M M
W
r=1 s=l
j=1
B; =_l~R 'LL k)sLco~(r+s)oj(NT+M)+f/lr+¢J W W W (1.65) B4 = Ico~(r+s)oj(NT+M)+f/lr +¢J= Ico~(r+s)j2mV +(r+s)utM+f/lr +¢J= Ico~(r+s)utM+f/lr +¢J= ~
~
~
W
W
j=1
j=l
= CO~f/lr + ¢s)I co~r + s)ojM- sin{f/lr + ¢s )Isin(r + s)ojM = CO~f/lr + ¢s)·C, - sin{f/lr + ¢s)·C6
Introducing the following abbreviations: W
C, =
W
Lj=l cos (r + s )mj!!,.t;C = Lj=l sin (r + s )mj!!"t 6
It follows that: . _ (r+s{llJM(w +1)i sin (r+s)t MW Cs + I . C 6 - e . . 0G:iliIii sm 2
(1.66)
(1.67)
To attain equality it is necessary to have: ~t = 0,5.10-3 S,
sin (r+s)wMW 2
OJ =
100Jr rad / s, sin r;os Jr :;i: 0, M ~ 19
= sin (r+s)W1i =0 ~ W > 40k kEN 40 ,
(1.68)
Based on stated above, we conclude that the demand (1.45) will be satisfied provided that the strictest of the three derived demands - (1.57), (1.64) and (1.68) - are satisfied: We can conclude that: p=p * (1.69) for ~t = 0,5 .10- 3 s, OJ = 100Jr rad / s, T = -to, M ~ 19, W ~ 40k, kEN
17
We can observe that the last equation is in accordance with the Nyquist criterion (as regards the delay in accordance with the harmonic content), and, consequently, in accordance with the theory of synchronous sampling. As a new criterion, issuing from the suggested measuring concept, a very complex dependency between the delay time and possible harmonic content of the signal, the object of processing, has been evidenced. When a system works at 60 Hz, the described conditions (1.57), (1.64) and (1.68) can take the following form (with points 1,2 and 3 in the next equations): ~t
= 0,5.10-3 s, OJ = 120trrad / s, T = 1;os,
I°M~49,W~100,
2° M
~
50, W ~ 100,
3°M
~
24, W ~ 100.
(1.70)
Derived conditions have been assuming that delay is L1t=0,5xl0-3s, but apart from this they are of general type. They define the number of harmonics M needed for accurate processing of average power according to suggested algorithm, as well as the number of samples W, both of voltage and current, needed to satisfy the equation (1.45).
1.3.1. Analysis of the Numerical Procedures Suggested in the Processing of Periodic Signals The precision of each numerical method depends on the available processing potential, as well as the time in which it can be realized. In [23], with "practically" unlimited processing capacities and under ideal conditions post-processing of the described signals was realized, therefore these results cannot be identified with the results obtained within a real system, as in this monograph. The synchronization with the signal of fundamental frequency is a separate problem. By [23], we attempted to show that the error in the trapezoidal rule was a small one, since it is reduced to harmonics so high that they practically do not occur within the range of the real ac signal. This is true if you possess a strong processor and enough time for processing, i.e. if you do not restrict the number of significant digits in the record of calculated values - all of which is not applicable for a real-instrument situation. The statement that the precision of processing is not increased with the increase in the number of measurements (from 40 to 80), as explained in [23], is also a result of the above supposition. In the real system, however, the precision was increased, and this was verified during practical measurements performed in two authorized laboratories (one was the National Institute for Measuring), especially if the source of the system error is eliminated, within a system such as a circuit for sample and hold. By increasing the number of samples, we reduce step L1 t between two consecutive measurements so that the number of samples is effectively increased within the period of the processed signal. This will undoubtedly lead to an increased precision in processing, especially if the source of the system error is eliminated, within a system such as a circuit for sample and hold. Although the authors [23] tried to describe the error of the trapezoidal rule through equation (5) [23], the literature provides evidence [24] that the mistake in a function with a continuous second derivative at the interval in which integration is done is described as: b-a ( ~ b-a (1.71) ~::;-h2SUplf"x~ h = 12
[a,b]
n
where f(x) is the function whose integral is decided in the interval from a to b, with the step h at n points. This error decreases if, for the basic algorithm (depending on the calculation), a different method is chosen, e.g. Simpson's rule [24]. In such a case, the calculus is more complex as well as the interpretation of the derived conditions. For this reason, the authors of this monograph have started to derive the conditions from definition formulas for calculating the basic ac values, without favoring any of the numerical procedures. Under the derived condition (6) in [23], we are completely uncertain not only about what qJm is on the other side, but also about the real value of the error of the proposed procedure. 18
Stenbakken [25] derived an expression for the value of the error with this type of average power processing procedure, for simple sin signals and complex periodic signals. In the case of synchronized sampling, this error can be expressed as follows:
E = AfpqcosqJq Sin(2 1llJ iTs] + AfpqsinqJq COS(2 1llJ iTs] = T
q=l 00
T
q=l
(1.72)
00
=LXqPq cosqJq + LYqPq sinqJq q~
q~
where:
X q = ASine; iTs} Yq = ACos(2; tr,
J
(1.73)
where A represents the processing operator, Ts=T/W is the sampling interval, T is period of fundamental harmonic, qJq is the phase angle of the qth harmonic power signal, W is the number of samples. The Xq, Yq factors for the algorithm of the trapezoid formula are given as:
J~
X q = A Sin( 2; n; = 2 Yq = A cos( ;
( 0,5sin 0 +
~ Sin( 2m;,Ts i] + 0,5Sin( 2m;,T W]} s
rr, J= W1 ( 0,5cosO+ t;cos 2m;,Ts i ] +0,5cos( 2~ T W]J W -1
(
(1.74)
s
The same principle is applied in the calculation of the RMS values. All of this is directly related to the problem of synchronization of the processed signal. The above relation and conclusions are the key reason for using the original definition relation to obtain the value of the processed active power. In the first paragraph of Section 4 authors of [23] is said that, in case that the number of periods L=1 +nM over which is calculated the average value of processing signals (n is the number of samples, M is the natural number), then the generalized undersampling method is reduced to the method described here. This is incorrect for a simple reason that in its first equations define the step between two consecutive measurements as tstep=NT+Jt, where Nand Jt are not connected - Jt is directly connected to the Nyquist frequency. This is the reason why the procedure described here represents a general form of synchronized undersampling. Practically, the result obtained through [23] is the same as the one derived in this monograph. Similarly, it is in compliance with the theory of synchronized sampling defined by Stockton and Clarke [3].
1.4 Adaptability of the Suggested Algorithm Used for Measuring Electric Values in Electric Utilities The adaptability of the suggested algorithms look at the fact that we can in dependence of detected harmonic content of observed input signal to determine the necessary number of samples that we must take, in order to have accurate data about processing value. This is confirms the derived conditions (1.39), (1.40), and (1.41) while we processing the effective value of the net voltage, in other words demands (1.69) and (1.70) while we calculating the active power. Certainly, for the realization of this kind of processing concept we need a microprocessor capable of carrying out the DFT, a common option in modem microprocessors. It is a low-cost microprocessor type, acceptable in respect of the total price of the final digital system. Aiming at confirming that the presented mathematical proof is general in type, if we assume that the input signal is of general harmonic content, the following can be written: M
M
M
n=l
n=l
n=l
Lansn(nrot+'Vn) + Lbnco~nrot+'Vn) =LCnS~nrot+'Vn +8n)
(1.75)
While c, =~c{, +If. and oo;(}n =~, sitfln =~., which provides the same form of the input signal already considered.
19
In case that the assumed input signals are described in the following order: M
M
Lan si"'-nrof+ \fin) + Lbncos(nrof + <J>n) n~
(1.76)
n~
Ifwe introduce the following abbreviations:
(ancos\fln - bnsin<J>n) = an
(1.77)
(ansin\fln + bncos<J>n) = ~n It follows that: (an cosvn - b;sino,)sines+(an simpn +b;coso,)COSIDt = an sinox + ~ n cosox =
~a~ + ~~ sin( IDt+y n), while cosy n = ~ ~n siny n = ~ ~n by which the expression (1.76) comes to the known form. an+~n an+~n 2'
(1.78)
2 .,
Finally, we can conclude that the suggested method gives very accurate results when measuring the average power, and therefore can be accepted as reliable regardless of the harmonic content of the input signa1. In addition, this method can be defined in the form of an adaptive algorithm. The comparison of the suggested algorithm with those known provided by the literature suggests that its relative simplicity renders less processing time. Similarly, under very complex exploitation conditions, it ensures high level of performance and adaptability (depending on the harmonic content of the input signal). This is provided by the implementation of additional algorithms - these algorithms solve the synchronization problem and eliminate the quantization error. In addition, all the requirements imposed here can be satisfied using a wide range of low-cost microprocessors. The time needed for the processing by the suggested method (the time in which we require the input signal not to change its harmonic content) is very short - limited to I second. The dynamic characteristic of the suggested algorithm for measuring electrical values depends on the speed at which the processing signal changes (voltage or current). The speed of the used ADC does not allow us to follow sudden changes (as the jump function or similar). However, for all the changes for which the speed can be recorded with a sampling frequency that corresponds to a dual-slope ADC, it will be recorded with high accuracy. It cannot escape notice that the same measuring concept can be applied on other slowly-changing values such as pressure, temperature, etc. The realized mathematical analysis is general in type, and absolutely accurate from the mathematical point of view. The authors did not try to adapt the derived results to individual practical cases, which is certainly going to be the matter of consideration for those aiming at realizing the device practically. The expressions obtained put only a lower limit on the necessary calculations (necessary but insufficient condition). The delay used in the derivations of inequality (1.69) and (1.70), Lit=0,5ms, was taken as an example, not as an obligated assumption, for the purpose of illustrating the results obtained in nets working at the frequencies of 50 or 60 Hz. In the derivation we assumed that M was the highest harmonic component, whereas, for the reason of simplicity, we assumed that the signals of voltage and current possessed the same number of harmonics, by which the conclusions do not lose generality. In the real environment, it is common for the current signal to possess somewhat richer harmonic content. The claim made by authors of the monograph in their conclusions about the necessity of equidistant current and voltage samples has already been practically given by expressions in the above text. As shown by expressions (1.69) and (1.70), and according to the one with the highest demand, it can be concluded that it is necessary for this to be:
"* 0 :::::> (r+;)wA -< tt, I ~ 'tIr,s ~ M :::::> mA -< 11, (r+s ;WAW = kn, kEN (natural number) sin
(r+;)wA
(1.79)
The obtained conditions for the value of delay Lit are completely equal to the Nyquist condition. In other words, as it was described in the introduction, we are not able to carry out real spectral reconstruction of the processed signal by the proposed measurement method due to the extremely low speed of sampling. It is only possible to carry out "virtual" (delay in time) spectral reconstruction. Since
20
the delay L1t is responsible for the movement forward of the moment of sampling from period to period (or more periods, depending on the parameter N value), the delay must satisfy the Nyquist criterion. In other words, it must be in accordance with a basic postulate of synchronous sampling, where the proposed measurement method conditionally belongs. If the current and voltage signals have different harmonic content, the conditions for delay L1t would determine a signal with "richer" harmonic content (which is usually the current signal because of its greater dynamics): sin (r+slcoM 0 => (r+slmM -< 1!, 1 ~ "\Ir,s ~ M 1 , M 2 (1.80) => r.0,.t -< _Mj+M t r _ (r+s)m~tW = kn: k r S E N(natural number) 2 " ,
'*
t.v.
z'
where 0)=2 if is the angular frequency of the fundamental harmonic, M] is number of the highest harmonic of the voltage, and M2 is the number of the highest harmonic of the current signal. It is necessary to take the samples equidistantly on the interval of one period. In that way, on the basis of established limits in processing, it is possible to calculate accurately the observed electrical values in electric utilities. With the appearance of more modem microprocessors, we received hardware resources which enable very simple realization of the suggested measurement system. Namely, these microprocessors posses inbuilt ADC of integration type, which can activate 16-bit resolution in correlation with the input signal dynamic which is the object of processing. It can possess (internally) four different current sources, charged at a varied speed (in other words with different bias of changing), with the externally added capacitor. This will directly determine the speed of the conversion which, in the case of a 16-bit resolution, demands approximately 3ms for the realization of the complete process of converting the input analogue value into the digital output value. All of this completely satisfies the conditions suggested here for the digital measurement system.
1.5 Analysis of Possible Sources of Errors in DigitalProcessing With a Suggested Measurement Concept The synchronous sampling of alternating current (ac) signals enables a highly accurate recalculation of basic electrical values in a network with very low uncertainties (on the order of a few parts of 10-6 [28]). This is possible in cases when we have a modified signal that is spectrally limited and when we have a sufficient processing time and necessary recalculation capacities. For this method to be effective, it is necessary to precisely measure the period T, as well as to generate the sampling interval Ts = TIW, where T is the period of the processed signal, and W is the number of measurements necessary for exact calculation. This method is suitable for sinusoidal signal and complexperiodical signals with low harmonic content. There are various sources of error during the synchronous sampling of complex-periodical signals, such as the variable initial time of measurement to, the error of the sampling interval generator, which depends on the number of samples and the initial phase, the delay of the SIR circuit at a command signal, and the effect of the initial phase. Owing to the issues mentioned above and the non-ideal nature of the method, theoretically obtained discrete sampling moments are not in agreement with the experimentally obtained values. Therefore, an additional analysis under the designed conditions, based on the conclusions in above text, should be performed by considering the sensitivity of the procedure suggested in cases when sampling frequency does not correspond to the actual frequency of fundamental signals. It is only now that synchronous sampling is performed, this being the method most sensitive to this type of error. Stockton and Clarke [3] mathematically derived the value of the error in the case of sine signal sampling, when the signals are not spectrally limited. If we perform the sampling with W samples over M period, the error is a result of the effect of the harmonic of a q order which is bigger than W, which is considered as qMlW EZ. If we consider the initial time, at which measuring starts to be to=O (measurements are synchronized with the zero crossings of signals, O
(1.81)
in the case of calculating the active power, while:
E~
L:Vqsinaqs L:IVql
(1.82)
qM=int W
in the case of calculating the effective value. The error is limited by the sum of the harmonic amplitudes for which the sampling frequency is either equal to this harmonic frequency, or represents a value that is a multiplied value of this frequency. There are harmonics of order W, 2 W, 3 W... in the case when M is equal to 1. Flicorri, Mirr and Rinaldi analyzed the error in the case of synchronous sampling with W samples in general when the initial time of sampling to variable [26].They assumed that M had the value 1 (sampling is realized during a single period). The average power calculated with W samples is:
~~(to)= Po +
LP cos[21l"/(T /W~o]
q q=W,2W,3W
(1.83)
the periodic function of to with period T/W which has average value Po, while the periodical part presents the error E(to) and it is generated from the harmonics of order W, 2W, 3Wetc. [26]. The average value of the square error in function of to : (1.84)
depends only on a harmonic whose order is an integer multiple of the samples number W [26]. In cases when the signal spectrum (harmonic amplitude) is not known, it is very difficult to calculate the error in the process of obtaining the active power by the means of synchronous sampling with W samples. This is the reason why the derived algorithm is very valuable for an approximate estimation of the error, based on the known sample values in a much larger number of discrete moments [26]. If for example Wz is the number of the known samples of the measured signals, so that Wz =? , the average power value can be calculated for different submultiples Wx =r, o<x5{z. If we suppose that the error is decreasing with the increase of the x value (provided that the signals are of such a form that, in calculating of the observed values with a finite number of samples, the error decreases with the increase of the number of samples W), the error can be approximated with the following expression: (1.85) where a and b are the constants. On the base of the numeric algorithm, which is similar to DFT, it is now possible (based on a larger number of the samples value of the measured signal Wz ) to calculate the approximate value of the error which is introduced in the calculation of the average power or the square of the effective value with a smaller number of samples Wx. Using a mathematical model for estimating measurement uncertainties we investigate an ideal signal source with a nonideal sampler. The sampler used in this study is a high-resolution integrating ADC that operates on the basis of the dual-slope principle. In estimating the fundamental frequency of the processed signals we suppose that the error is fjf The sampler takes samples synchronously with the same clock reference over an integration time T; at regular time intervals of length Ta (sampling time). The 22
sampled voltage Vv (at a time vTa, where v is an integer) of the integrating ADC is the mean of the voltage signal v(t) over T, and is given by [27-28]: 1 lITo+T; (1.86) Vy =v(t)dt•
T,
J
lITo
The effective value, of a signal with a fundamental frequency 1 (period T=J/j) from MN samples (N samples per period over M periods) is given by:
" VRMS =
1
. ( 1rT: ) SInc -
1 ~ 2 y -L..JV MN y=l
(1.87) ,
T
where Sinc(x)=sin(x)/(x) is the function accounting for the transfer function of the sampler in the frequency domain due to (1.86). Effective values of ac voltages are estimated either by using (1.87) or from the contribution of the spectral line determined by the discrete Fourier transform (DFT) or fast Fourier transform (FFT) of the data from the set of N samples taken over M periods of the sinusoidal voltage generated by the source. Practically equivalent method is applied in establishing the active power its only difference from the above mentioned method being that the extraction of the square root for obtaining the final value is unnecessary. The zero transition of one of the voltage signals is first detected from the change in the sign of the samples [29]. To avoid false detection due to the noise of high-order harmonic components superimposed on the signal, a minimum delay between two successive transitions based on the expected frequency is assumed. This delay is applied after each valid transition before the acceptance of the successive transition. The time interval between the total numbers of periods of the signal is evaluated. Near the first and last transitions, the samples and their respective times are recorded, and the times of the two transitions are evaluated by the zero intersection of the two segments that best fit these samples. The first frequency is then evaluated as the ratio of the number of periods to the time interval. If we only consider the uncertainties LJI resulting from nonideal synchronization of fundamental signals, the processing method we are proposing in this book, we can analyze in the following manner, if the subject of processing the voltage signal is of the form: v(t) = V sin(21ifi+ qJ), (1.88) where 1 represents the frequency of the basic voltage harmonic and V is its amplitude, OF 21if angular frequency and qJ is the phase angle. If we perform a calculation to establish the effective value using the method described above on W equidistant samples from the initial time to, then W must satisfy the conditions of synchronous sampling. We determine the times at which we take the measurements of the processed value as: . 1 (1.89) tj=to+J-· jW Here, we introduce the following shortened formula for squaring the signal described in relation (1.88), and establishing the RMS value of the observed voltage signal: Al =
I sin (2 tif(t + -.1-) + rp) . Wf 2
(1.90)
0
]=0
Moreover, we calculate the value in an actual device, owing to the introduced uncertainties in reading the frequency Sf: B,
( . J, =W-I Lsin 2 ( 2nf to + (J. ) ) +) rp =W-l Lsin 2 ( 2tifio + 2tga j=O
W
f
+!:"f
j=O
(1.91)
W
where a = 1 /(1 + tJ./), which is the relative deviation from the nominal frequency. In solving the problem related to defining the shape of the signal after the occurrence of the uncertainties in defining the sampling interval, we have to start from the shape defined by relation (1.91); otherwise, if we suppose that the measured value of the carrying signal (i.e., its frequency) is wrongly read, then we cancel the uncertainties in calculating the basic electrical values. This is reasonable, since the frequency of the processed signal is due to the generator in the observed system. If we consider that the subject of 23
processing is the signal defined by relation (1.88), and if we perform a calculation to establish the effective value using the definition formula on Wequidistant samples from the time to, we obtain: W-l Lsin
2(
'J
2 2mof+~ =M1 ,
(1.92)
W
i=O
whereas the value calculated using the fabricated device, due to the introduced error in reading the frequency ~f is: W-l t;sin
2(
27lioV
'J
+Af)+ 2:: =M2
(1.93)
•
The error in calculating the effective value is determined as:
J'1.
!:ill = M 2 - M 1 = sin (27li o8f sin(21lto(2f + 4f))~cos W-l
4'
4 '}
:: + cos(21lto(2f + 4f))~sin:: = 0, W-l
(1.94)
where ~B is the error in calculation. In the data for M], M2 and ~B, the amplitude of signal V is intentionally not included. The ultimate expression is equal to zero because:
4'
W-l
(e ~)W -1
4 ')
4'
W-l
W-l
p= LCos-!!; q= Lsin-!!=:> p+qi= j=O W j 0 W =
Le
(
-.!! i W
=
j 0
(1.95)
=0.
4JZi
e-W -1
=
The uncertainties in calculating the effective value are: A D
_
B
Ll1J 1 -
cos(4Jiffo + 2rp) ~ 41ifa sin(4Jiffo + 2rp) ~ , 41ifa L.Jcos - - + L.Js1n - - ,
A_ 1 -
-
2
W
j=O
2
j=O
W
(1.96)
where W is the number of measurement of a signal with a known effective value and ~B] is an error in calculus. In the data for A], B] and ~B], the amplitude of signal V is intentionally not included; however, this is considered when establishing ultimate uncertainties. We apply the same procedure for establishing the uncertainties in determining the effective value of the signal as the proposed algorithm. In the last relation (1.96), we transform the obtained sums using the Euler form of the complex number and by introducing: PI =
W-I 4Jl"a. L COS-j;
ql =
W
j==O
. _W-I[
PI + lql - "LJ e
W-I . L S. l4Jl"a n - j -::::::> W
j==O
4;aiJj _
-
j==o
e41rai -I _ Zie21ra isin(Z7l"a) _ 21rai 4 ' 2 ' - e nca nca e W -1 2' 2Jl"a te sln
w '
W
;1sin(Z7l"a) 2
W
(1.97)
na sin-
W
where i is the imaginary number. We express the uncertainties in determining the effective value of the signal as:
= cos
M 1
4ift cos 0
2
21l'a(W -1) , ( ) sin 21l'a W . Zxa
sln-
W
, 21l'a(W -1) ,( ) . 4ift sin sin 21l'a + sin 0 _ _----'-'-W _ 2 ' 21l'a slnW
=-!sin(21l'a Xcos(4ifto + 2rp)sin(21l'a )+ sin(4ifto + 2rp) COS (21l'a)) 2
21l'a cosW (cos(4ifto + 2rp)cos(21l'a)- sin(4ifto+ 2rp)sin(21l'a)) -!Sin(21l'a)-2 2 ,1l'a slnW
In the case when phase angle qr=Q:
24
(1.98)
2·J IL
W-I ( 21ifto +~ =- W-I( I-cos( 41ifto Al = Lsin }=o W 2 }=o 2
4.JJ =-W +~ W
2
~
(1.99) cos-21Caj. W M31 =-~sin(21Ca sin(41ifto +21Ca)+cos(41ifto + 21Ca)-2 2 . 1Ca Sln-W If we consider the initial time, at which measuring starts to be 10=0 (measurements are synchronized with the zero crossings of signals):
~
cos2tra) M3l = -!sin(2tra sin(2tra )+cos(2tra ) - W 2 . 2 . tra SlnW
(1.100)
The absolute obtained relation must satisfy the next inequality: cos2tra]
lM3ll~!lsin(2tra~ ISin(2tra~+coS(2tra)-1 WI· 2 . 2tra [
(1.101)
Sln-
W
Using the conditionsI + 111 ~. I 1M31
1
(111 ~ 0) andsin x ~ x(x ~ 0), we obtain:
s ~cos~lsin(2tra~. 4tr
(1.102)
2W
With the introductionof the amplitude of the processed signal V, the definition formula for calculating the effectivevalue of the signal is:
VRMS
JJ
(10 +L. , = -1 W-I LV 2 sin"( 2;(
W}=o and with this equation we apply
WI
(1.103)
~ + Mil ~~1 + ~l ;1\(1 + t)~ 1+ ~ + [~}2 + [:}3 +.... Al
=
=
(1.104)
The error in calculatingthe effectivevalue can thus be presented as:
M=~Al +M1 -~ =fA:(M3 2A
1
1
I
2
-
3
J.
M31 + M31 +... 8A I
16AI
(1.105)
By neglectingthe higher members in the series, the following error in calculus is obtained: till '"
fA:
Mi2Al 2fA: Mil ~ ItillI:: ; 2MifA:l . =
(1.106)
I
By introducing the amplitude V in relation (1.106) and by using the definition formula for calculating the effectivevalue, the followingequation is obtained: IE/:S;
V ~cos~lsin(2i'Z'a) V 41C 2W =--cos~/sin(21Ca~, 2~.JW 4i'Z'Ji 2W
(1.107)
where E is the error (absolute) in the calculation of the effective value (it is easily reduced to an error in the calculation of average power) under a supposition that the initial moment of measuring is synchronizedwith the zero crossing of the signal (10=0). The errors in the AC voltage measurementwere comparedwith those given in [30], and were in good agreement. The followingconstraintsmust hold to attain minimumuncertainties: I) Ta=I/(Wf) must hold at all times for the multiple of two W. This is the condition for the synchronous samplingof the signal with the frequencyf generated from a common clock reference. 25
2) The number of sampled periods M must be an integer multiple of the number of power-line cycles in order to reduce the number of power line interferences. Conditions 1 and 2 prevent artificial spectral components (leakage) from appearing when performing the DFT of the sampled data. 3) The suppression ofhannonics of the power line frequency occurs when 1/(T!»> 1 and is an integer. In the case of complex input signals (with harmonic and nonhannonic components), the uncertainties probably are evaluated as the superposition's of harmonic errors (with the form defined in relation (1.107», and this is expected to be the theme of some future publications. The total uncertainty of the sampling method is approximately the same as that of the step calibration in the observed frequency range of 46-65 Hz. The presented result (1.107) enables a more accurate estimation of possible errors in calculating the RMS values of low frequency ac signals then those presented in [31].
1.5.1 Simulation Results The calculated results were further tested by simulation using the program package Matlab and module Simulink. In Figure 1.3, a block diagram of the suggested digital measuring system is shown. The system is made of ready-made Simulink models. The unique advantage of using such a program environment or surrounding is that we are able to provide an arbitrary input signal which is further processed. The signal (comprising two voltage signals or voltage and current signals) is introduced into the circuit for the sample and hold (unit delay), which is located in front of the actual ADC. Then the signal is transferred from the output sample-and-hold circuit into the D flip-flop as a delay element and clocked from the unique signal generator (rectangular series of impulses) for which an arbitrary duty ratio is given. In this manner, the continual signal is measured, and the sample is held constant up the next measurement or sampling. The next sample is obtained from one of the next periods of the input signal, which is adjusted using the chosen simulation model parameters. Signals are multiplied and then integrated in time, thus obtaining the effective value (or active power). Since it has such an input block, Simulink enables the introduction of a deviation in the frequency of the processed signals. A separate program has been created in the Matlab. This program enables us (for a known spectral content of the processed voltage and current signals) to establish the desired sampling interval. It also enables us to determine the necessary number of samples to be processed in this manner, so that we can establish the power of the ac signal with a high precision. Table 1.1 shows the results obtained by the suggested procedure and the designed program for different cases of nonideal synchronization with a fundamental frequency of the processed signals. The results obtained by applying relation (1.107) were compared with those obtained using the practically realized instrument described in the following text. From the results given in Table 1.1, it can be concluded that the calculated relation for the uncertainties in the processing of ac signals in the case of nonideal synchronization provides satisfactory results. Thus, we can easily recalculate the uncertainties in the above described case.
26
Constant
Figure 1.3 Block diagram of simulation model for measuring effective value (or active power), based on the measuring concept suggested in this monograph
Table 1.1 Uncertainties in calculating RMS value of processing voltage signals obtained using relation (1.107) and fabricated instrument [1] (V = ..fi.220[V]; f=50Hz; W=40) Numberof measurements
Uncertainties in establishing sampling frequency
Uncertainties in establishing effectivevalue of voltagesignal using relation IE I [V]
t1ffHzl 1 2 3 4 5
0.05 0.04 0.035 0.1 0.2
0.1097 0.0878 0.0768 0.2193 0.4378
Uncertainties in establishing effectivevalue of voltage signal using fabricated instrument IE* I rVl 0.11 0.089 0.08 0.22 0.45
The obtained expression for the uncertainties (1.107) is in agreement with the results and uncertainties in the calculation of the basic ac values in [32-37].
1.5.2 Analysis of the Error Caused by Imprecision in Determining Sampling Interval For the proposed measurement concept, based on the usage of dual-slope ADC, we will analyze the error which introduces the sampling method and sampling interval generator, in order to completely recognize the possibility for practical realization of such a measurement method. Based on the realized analysis of the known harmonic content of the input signal (voltage or current), the necessary number of samples of the processed voltage and current signals is determined, which theoretically gives the correct result. All the remaining errors, which can appear in practice, practically come from the sampling interval generator. The error in the case of non-synchronized measurements is due to the fact that the measurement is not finished after the time period KT - because of the use of the "window' for measuring, in the most negative case, the measuring is performed subsequent to the time KT+ts, where K is the number representing the 27
number of periods in which we measured the time, T is the signal period, and ts is the interval between certain samples [15]. During the determination of the effective value we add the square value of the sampled data, while in case of determination of the active power we add the multiples of the sampled data regarding voltage and current. The analysis of the error (theoretically) in power measurement is performed in accordance with the following expression:
g =
1 1 VI
(
xr ,»,
)
J
[to+KT+t
S
(2)-Iu sin(2) ~ t - dt - (KT + t )VIcos(qJ)]
.[iv sin ~ t T
to
T
tp
s
(1.108)
The first member in the middle brackets is the work measured from the moment when sampling to , started and all through to the moment to+KT+ts. This further implies that the width of the 'window' in which the sampling occurs is different from the integer multiple of the number of signal samples. This is owing to the fact that sampling is not synchronized with the measured signal. The error is referred to the apparition power and not to the active power; this is necessary for error evaluation while we measure the active power in the presence of the reactive power. By solving the above integral for maximal error we obtain: (1.109)
The relative error in the calculation of the effective value of sine signals produced by the interval sampling generator can be represented by the equation:
E; = C1suml + C2sum2,
(1.110)
where sum1 and sum2 are the values which depend on the number W (samples) and relative error x in the realization of the sampling interval Ts : sumal = suma2 =
J.-. W
I cos(2JrT
2iTs J
i=O
(1.111)
J.-. ~sin(21! 2iTs ) W
i=O
T
t, =KT(l+x) Constants C t and C2 at synchronous sampling will depend in the simplest case only on the starting phase, so that the error is presented as: C1 =-cos2a,C2 =sin2a
(1.112)
E; = (- cos2a )suml + (sin 2a )sum2
To obtain a concrete result, we wrote the program in the C program language, which enables error analysis at synchronous sampling, in the case of calculating the effective value of sine signal, in relation to the relative error x in determination of the sampling interval, while W= I00 is fixed and phase u is given. Figure 1.4 presents the graphic dependency of the error Ep in calculation of the sine signal effective value from relative error x, in relation to the sampling interval in the range of -4% to 4%, for the two values of the starting phases: u=60° and u=90°. We can see that the error E; is almost a linear function of the error x in determination of the sampling interval, as soon as the x is in interval (-0,5%, 0,5%), which is important for synchronous sampling application. For the values of the relative error in the determination of the sampling period which is outside this range, the error in calculation of measured values with this method is unacceptably great. Another analysis which produces practical results, and can be significant in calculating the effective value of synchronous sampled sine signals is the analysis of the error dependent on the starting phase u, 28
for given Wand relative error x in determination of the sampling period. If synchronous sampling for a measuring system is realized by using a specified W, along with generating the sampling interval realized with the relative error x, then error in calculation is a function of the starting phase of the measured signal. By determining the derivation of the error function, we program-define the starting phases at which the error is maximal, together with their values. The results of this analysis for W=100 and the error in determination of sampling period x=±O,1%, are given in Figure 1.5 and graphic E; in function of the staring phaseo, We can conclude that the error Er, for a given Wand determined x, is a simple periodical function of the starting phase, and for some values of the starting phase it can be equal to O. The maximal value of this error is certainly dependent on x. Table 1.2 presents the concise program results for some characteristic values of x. The first column of the table shows the error value x, the second column is the starting phase at which the error in calculation of the effective value of sine signals E; is maximal, and in the third there is the maximal value of the error E: All the results are obtained for W= 100.
Synchronous sampling- Effectivevalues Dependency ofthe error Er*lE6from the relative error Ts EM=39267.20 ppm v(t)=V*sin(w*t+alpha), alpha=90, W=lOO (number ofsamples) alpha=60, W=100 (number ofsamples)
Figure 1.4 Dependency of the error in the calculation of the effective value from the error in determination of the synchronous sampling period
Sine function v(t) = V*sin(wt+alpha) E p=-cos(2 *alpha)*suml +sin (2 *alpha) *sum2,suml =f(W, x), sum2=f(W, x) 29
1009
E
-1009
1011
E
-1011
Figure 1.5 Error analyses in relation to the phase for certain errors in samplingperiod for synchronous sampling The third analysis is made for the effective value calculation of complex periodic signals (which, besides the fundamental harmonic contains the twentieth harmonic as well), while synchronous sampling is derived with W=200 samples, and with the error x=0,5% in the calculation of the sampling period. It infers that the error E; for certain values of x at synchronous sampling is not affected by the presence of the twentieth harmonic, which confirms the theoretical assumptionthat with a sufficiently large number of sampleswe eliminatethe systemic error which introducesthe measurementmethod. Table 1.2 The maximal value of error for certain errors in determinationof the samplingperiod for suggestedmethod of measurement
1
2 3 4
x(%) 0.001 0.005 0.5 4.0
nCO)
Er(ppm)
91.80 91.79 91.18 84.67
10.01 50.03 4977.61 38085.01
The programfor error analysisfor complexperiodicsignal in case of the suggestedmeasuring method 30
SYNHRONOUS SAMPLING - EFFECTIVE VALUES ERROR ANALYSIS IN THE CASE OF THE TWENTIETH HARMONIC FOR GIVEN W=200 (samples) AND RELATIVE ERROR FOR Ts=O.5% SINEFUNCTION v(t)= V*sin(wt+alpha) + V20*sin(20wt+alpha20) Sampling frequencyfs= 1OOHz+O.5% Fundamental harmonicf=50Hz, T=20ms, 20.harmonicj20=lKHz, T20=lms Number ofsamples W=200, the relative errorfor Ts errorTS=O.5% Er=El+E2+E3+E4 El =-1/2*cos(2*alpha)*sumll +1/2*sin(2*alpha)*sumI2 E2=-1 12 *cos(2*alpha20)*sum21+ 112 *sin(2*alpha20)*sum22 E3=cos(alpha20-alpha)*sum31-sin(alpha20+alpha)*sum32 E4=-cos(alpha20+alpha)*sum41 +sin(alpha20+alpha)*sum42 sumll=4975.l32521 ppm sumI2=-0.781492 ppm The maximal error for startingphase: alpha=O.OO, 90.00, 180.00, 270.00 Elmax(alpha)=-2487.566291 ppm sum21=4978.472857 ppm sum22=-15.640385 ppm The maximal error for startingphase: alpha20=0.09, 90.09, 180.09, 270.09 E2max(alpha20)=-2489.248712 ppm sum31=4975.863781 ppm sum32=-7.425271 ppm E3(alpha,alpha20)=4975.846969 ppm sum41=4976.028871 ppm sum42=-8.207152 ppm E4(alpha,alpha20)=-4976.035561 ppm The total error E=-4976.815186 ppm The results presented here for synchronous sampling represent concrete results for the error in the calculation of the measured value. This option was chosen due to the inability to effect an ideal realization of the sampling interval (tsampling which is defined earlier), i.e. an ideal synchronization of the sampling frequency with signal frequency which is the object of measuring, as it has the strongest influence on this sampling method. The remaining nonidealities are: due to the non-formed signal (to]), the delay SIR (t02) from the momentof issuing a command signalto the momentof holding a samplewill have the same influence as the starting phase. It is for this reason that we do not take this moment into consideration. Only the parameter t anmu, e.g. non-ideality of SIR (the uncertainty of sample catching) can give a different contribution to the error, because of its unexpected nature. The approximate analysis of the error, made in the MCAD-y program, for taptu in the range from 0 to 200ns and for W=300. The results of the analyses carriedout in this mannershow that the error ESHPPM(taptu)<200ppm, which impliesthat this non-ideality does not add up greatlyto the error.
31
Program for synchronous sampling analysis of error occurring due to nonideality of SIR circuit T=~
50 n = 300
i = O...n -1
APT = 0,0.1..2
j = 0...10
Zj = md(APT)
ESH(APT) = [LCOS[2 j
.~.2.i +2 .~.(10-7 .md(APT))l].~+~LSin(2 ·~·2·i + 2.~·10-7 .md(APT)) n
J
T
n
n>;
n
ESHPPM(APT) = ESH(APT).10 6
APT value in range (0 - 2 * 10-7)s
ESHPPM(1) = -2.304
The error ESHPPM express in ppm
T
ESHPPM(1.5) = 12.999 ESHPPM(2) = 0.758 ESHPPM(0.5) = 2.695
The relative error E; is defined as a quotient of the absolute error and a theoretically accurate value of the measured value. By the application of the digital measuring methods, the calculation is taken as an important parameter which characterizes the performance of the measurement device. Synchronous sampling (the suggested measuring method in this book can be classified as a synchronous sampling method), in the case of a sine signal (which can appear in real electric utilities), when calculating the square of the effective value with W samples Veffusing the following equation:
Veff 2(W)
V2
=-
2
-
V W-1 -L cos [2(mt 2
2W
i
+ a)]
(1.113)
i=O
The relative error is:
_ 1 E
=-
r
W
W -1
L
cos
2
(m
ti +
a )
(1.114)
i=O
In an ideal case the discrete sampling moment t. can be defined as: (1.115)
to- is the starting moment of the sampling process, 0
ti
= to + to 1 + iK (1 + x )T + t02 + tapti •
• •
•
(1.116)
tOJ - the time delay due to the signal forming, x - the relative error in the realization of the sampling interval, t02 - the nonideality of the SID -circuit, the time delay from the moment of issuing the command signal, to the moment of capturing the sample (e.g. "charge time") tap tu - the nonideality of the SIR circuit, the time uncertainty of capturing a sample (e.g.
"aperture time"). The error introduced into the calculation of the effective value of sine signals with synchronous sampling, in ideal case, is equal to 0, in accordance with the following equations:
{21C
{21C
) {21C
{21C
)
-1 E, =-co -2t0 +2a )W-1 LCo -2iTs +si -2t0 +2a )W-1 Lsi -2iTs =0 W T i=O T T i=O T
32
(1.117)
Ifwe take into consideration the cited nonideality, the error can be expressed as:
J
E, = C1LcOS ~Ts +C2Lsin ~Ts W-l
(2 2·
i=O
W-l
T
i=O
(2 2·
J
(1.118)
T
where the constants are:
C1 -cos( 2;2 Vo + to! + t + tapti)+ 2aJ C Sine;2 Vo +to! + + taptJ+ 2a J =
2
02
=
(1.119)
t 02
and the sampling period is:
t, =KT(l+x)
(1.120)
where x is the relative error in the realization of Ts. In the case of calculating the active power with the suggested measurement concept (variation of synchronous sampling), the relative error can be presented in the form of an expression as for E; where C, and C2 are defined by the following equations:
C1 =
-cos( 2;2 Vo + t
01
J
+ t 02 + taptJ+ a + P
(1.121)
C2 Sin(2;2 (to + to! +02 +tapti)+ a + PJ =
1.6 Simulation of the Suggested Measuring Method in the Matlab Program Package Additional testing of the suggested digital measuring system was carried out by simulation in the Matlab program package, module Simulink. By using Simulink we can analyze linear, nonlinear, time continuous or discrete multivariable systems with concentrated parameters. The simulation is realized by creating Simulink models and using Simulink function for a numerical solving of an ordinary differential equation of the first order. Simulink models are practically present in the form of a block-diagram, which presents a special form of a mathematical system model, which describes dynamic characteristic of a system, the main system variables and connection between variables. The block-scheme also presents the functional relation between the system parts. Every system element is presented by a certain block which contains a mathematical relation between the input and output of the given element. The input and output variables are observed as signals, while the blocks are connected with orientated lines which mark the signals' flow from one block to another. Figure 1.6 presents a block-diagram of the suggested digital measuring system whose construction was made of ready-made Simulink models. Special advantage of such program environment is it enables us to give arbitrary input signal (in the sense of its harmonic content, white noise presence, different irregularities which may occur and simulate jump functions, changeable phase position between processed voltage and current signals) which is further processed. Thus, both voltage and current signals are introduced into simulation, while a completely arbitrary phase relation and amplitude value were assigned to them and absolutely arbitrary noise power superimposed on them. For a comparison with the modelled digital measurement system (based on the usage of a dual-slope ADC) we have constructed a block-diagram (Figure 1.7) of the reference digital wattmeter (that can measure the effective value of the voltage and current) operated at the same input voltage and current signal.
33
After forming a complex harmonic input signal by superpositioning (adding), the signal was taken into the circuit for sample and hold (unit delay) located in front of real ADC. The signal was taken from the output sample and hold circuit into the D flip-flop as a delay element, which is clocked from the special signal generator (rectangular series of impulses) for which the arbitrary duty ratio can be given. In this manner, a continuous signal was measured and the sample was held constant up to the moment of the next measuring (sampling) given on the basis of the previously proposed form. In this way we obtain the signal presented in Figure 1.9. Every next sample was taken from one of the next periods of the input signal which can be adjusted by the choosing the parameters of the simulation model. Voltage and current signals were multiplied and then integrated in time thus obtaining data of momentary circuit active power value. The existing graphic environment provides us with a possibility to follow (by the means of a special oscilloscope) the signals which are the object of processing at different system points. In this way, we are in a position to check the correctness of the seated simulation model. All the model parameters are adjusted to real dual-slope ADC and its speed and conversion precision. All the above infers that this kind of simulation completely presents real conditions of exploitation, where the only difference is that by simulating its work was tested in more extreme conditions that the ones which may be expected in practice. The obtained results confirmed fully all suppositions and conclusions that had been made before.
x Product
-
r:l ~II
In:r.:~tor~ Product1
DII DitpllY
118
Con_lnt
Figure 1.6 Block-diagram of simulation model for measuring active power, based on suggested measuring concept with dual-slope ADC and sample and hold circuit
34
Figure 1.7 Block-diagram of simulation modelof reference wattmeter used for comparison with the proposed model
Figure 1.8 Voltage signalused duringthe simulation
In a separate figure (Figure 1.8), a time diagrampresentsthe voltage signalused duringthe simulation of the proposed digitalmeasurement system. Figure 1.9presentsa time diagramof the voltage signalafter it is processed in a part of the simulation model, representing a dual-slope ADC. On the basis of the diagram we can check whether the concept of processing is suitable for a real dual-slope ADC and the parameters suggested in this monograph.
35
Figure 1.9 Time diagram of the voltage signal after it was processed in a part of the simulation model which represents a dual-slope ADC
From Figures 1.6 and 1.7 it can be noticed that voltage/current signals with 3 harmonics (beside the basic one, third, fifth, either even or odd) were used because they are the most dominant harmonics in practice. However, it is not a limitation factor in such simulation. In other words we are able to introduce higher harmonics, but complained conclusions are still valid. In the simulation model designed in this manner, ideal synchronization in processing with frequency of processed signal was achieved. That is very difficult in practice, but with the usage of the planned hardware resources (precise comparator and microprocessor with 16-bit architecture) we will be able to determine accurately the frequency of processed signals. Simulink gives possibility (it has such input block) for introducing a sinus signal whose frequency varies completely arbitrary, so this block was also used during the simulation, but the results were still beyond our expectations (to the third decimal). Table 1.3 presents the results of the simulation, both as recorded on a reference wattmeter and based on the model designed to be used with a slow but very accurate dual-slope ADC. Both types of results are based on ten different cases (different relation between fundamental and higher harmonics and for different noise power). For the suggested measurement method it is very important to have an accurate detection of the measured frequency signal, more precisely the detection of the zero-crossing. We can check the accuracy of the zero-crossing through Simulink and separate circuit for zero-crossing detection, which can be used both in continuous and in discontinuous signals. In Figure 1.10 a circuit for zero-crossing detection occurs, while in Figure 1.11 there is a diagram of a simulated sine signal that is used during the check of this type circuit work. Three different sine signals are marked with three different curves (they have different initial phase: 0.1; 0.2 and 0.3 rad). The circuit for saturation has three different thresholds : 0.5; 0.55 and 0.6, for the three different input sine signals. The switch provides the passing of the signal through the first input, while the second input is greater or equal to the seated threshold , which in this case is 0.5. By contrast, the switch is passing through the signal from the third input. From the oscilloscope diagram we can conclude that this zero-crossing circuit model, independently of the initial phase, can almost instantaneously detect the set condition. Thus, the model can also change the switch position, more exactly the shape of the output signal recorded at the oscilloscope.
36
Table 1.3 Results of the measurements of the active power in simulation model based on the usage of the referent and the suggested wattmeter Number of meas.
Fundamental voltage harmonic amplitude
Third voltage harmonic amplitude
Fifth voltage harmonic amplitude
noise power
310 310 300 300 290 290 280 280 320 320
54 70 45 80 20 20 50 20 68 90
10 14 5 20 5 5 10 4 14 20
0.001 0.001 O.oI 0.01 0.001 0.001 1
Fundamental
Third
current
current
harmonic amplitude
harmonic amplitude
10
3 0.3 0.3 35
Fifth current harmonic amplitude
noise
power
Measureme nt results with referent wattmeter
1 2 3 4 5 6 7 8 9 10
I I
2
I
5 100 3 40 20 5 0.5 30
I
1 0.1 0.1 5 0.2
8 3
I I
I
0.2 0.03
0.1 4
I
0.001 0.001 0.002 0.002 0.01 0.01 1 I
1 2
1632 165.6 757.1 1.641e+004 465.2 5.883 2.878 711.6 84.76 4,985
Measuremen t results on the suggested model 1631 165.7 757.6 1.64e+OO4 465.4 5.880.3 2.875.1 711.1 84.7 4,981,6
Sre V'tw
Figure1.10 Circuit for detection of accuracy of zero-crossing in simulation package
Figure 1.11 The input sine signal wave shapes simulated with three different initial phases
37
1.6.1 The Software Testing of the Suggested Measuring Concept of Electrical Values Based on Measurement Results in Real Electric Utilities The additional test of the proposed method for measuring electrical values was carried out on the basis for checking possibilities for more precise reconstruction of input voltage signal according to the known values of voltage samples obtained over the experimental setup. To perform a more accurate and realistic checking of the suggested measuring concept, which is based on usage of slow but very accurate dual-slope ADC, we used the data related to the measured net voltage in real electric utilities obtained from the distribution organization in our country. The files with data about net voltage measuring values were software processed, in order to be transformed from the original format (second complement) into decimal record. In this manner, we came to one-dimensional series of great length (with over 16,000 members, which correspond to over 60 periods of net voltage). These series are input files for calculations carried out afterwards in the Matlab program package. These real data about the voltage value in the electric utility enable estimationg of the current value, which corresponds to some random load. Besides, we can ever carry out submersion of some fast changeable signal (like Heaviside function of the determined amplitude and length or noise signal of determined strength) by which we simulate different irregularities which can be expected on the real utility. The determination of current value for the known type of loading and starting conditions is carried out in a discrete domain by solving differential equations, which corresponds to specific load type. Thus we come to a series of current samples of the same length as voltage series of samples. Knowing both the voltage and current series, we can calculate the RMS value of voltage and current signals, as well as active power for two cases: using definition form and on the basis of the suggested concept of processing described in this chapter. According to the shape of input files, there are 260 ss. samples on the length of one period (20ms) i.e. each sample at a distance of 7.7xl0· The calculation of the RMS values of voltage and current, as well as active power will be carried out on the propounds of the following relations: 1 260 2 U RMS
= -Lu (i) 260
1
I RMs =
i=l
260
-Li 260
2
(1.122)
(i)
i=l
1
260
L u(i )i(i) 260
P= -
i=l
where uri) and i(i) are voltage and current samples. These equations can apply from any member of the series at the length of 260 samples which are in one period. The obtained values used for the comparison with the values obtained by applying the suggested measuring method. The calculation by the proposed method is carried out on the basis of the following relations: U~S = -
1
40
I~s = -
1
40
p.
1
40
40
k=l
40
Lu 2(269.k) k=l
40
(1.123)
Li 2(269. k) k=l
=- LU(269. k)i(269. k)
Taking 40 samples is required is owing to the fact that even the most complex harmonic content processed by proposed method demands for more than 40 voltage and current samples. Index 269 provides jump from period to period of the measured voltage and current, and delay for 9 samples at every next processing. In order to achieve the expression, which defines current for specific loading, the following equations are given in the space condition of the following shape: 38
Ri+L ai +!Ji.dt=u{t) at C
Ri+ L oi +-i = u(t) at
L oi
at
C
=-Ri--i+u(t) C
ai =_R i __l_ q +l u (t) L LC L
at
oq
at
(1.124)
= 1. i + 0 · q + 0 · u(t) ~
i = 1· i + 0 . q + ·0 . U (t ) q
=0 . i + 1· q + 0 . u(t)
The obtainedsystemof equations can be written as follows:
ai
~~ IIAII'II~II + IIBII· u(t) =
(1.125)
at
I ~I = Ilell'II~11 + IIDII· u(t) where matrixesare of the form:
R
I=-L
IIA
1
Ilel = II~
~I ,
1
Le,
o
1
IIBII= L
o
(1.126)
IIDII = I ~I
On the basis of the above-presented equations in the space condition we have written the program in the Matlabprogrampackage. Calculating current program for optional loading on the basis of state condition equations
clear load u452.mat kkk=size(u452); vel=kkk(1,2); t=O: 1.27/(vel-1): 1.27; f=50· ur452=u452. *310./30000; eps=10/\(-80); R=1.; XL=1.0; XC=O.1; ILO=O· UCO=O; L=XL./(2.*pi.*f); C=l./(XC.*2.*pi.*f+eps); L=L+eps; 39
C=C+eps; R=R+eps· A=f-R.7L'-I.1(L.*C);10]; B= l./L;O]; CC=[1 0;0 1]; D=[O;O]; s=lsim(A,B,CC,D,ur452,t,[ILO C.*UCO]); zbir=O; zbirl =0·
zbir2=0~ zbir3=0~ zbir4=0~ zbir5=0~
figure(l) plot(t,ur452,t,s(:, 1),'r'); grid figure(2) plot(t(l: 1000),ur452(1: 1OOO),t(l: 1OOO),s(l: 1000, 1),'r'); grid for ii=261:520 zbir=zbir+s(ii, 1).*s(ii, 1); zbirl =zbirl +ur452(li). *ur452(ii); zbir2=zbir2+s(ii, 1).*ur452(ii); end for jj=I:40 zbir3=zbir3+sGj*7, 1).*sG)*7,1); zbir4=zbir4+ur452GJ*7). ur452(ii*7); zbir5=zbir5+sGj*7, 1).*ur452Gj*i); end ief=sqrt( zbir .1260) uef=sqrt(zbirl.1260) p=zbir2.l260 ief-sqrttzbir3 .140) uef=sgrt( zbir4 .140) pf=zblr5.140 The ability of this program is to calculate current samples series for arbitrary loading according to input samples series of voltage from electric utility, which is recorded by experimental setup. After presenting the results graphically, this program is used to calculate the value of the active power, both on the basis of definition form and on the suggested measuring method. We must step away from the suggested equations (1.122 and 1.123) as this program package does not allow reading of long one-dimensional series as originally prepared (with 16,000 members), but we work with 1200 member long series sufficient for checking of the suggested measurement concept. We can conclude from the program that 40 samples are taken on the basis of the suggested method as it meets the conditions of even the most complex harmonic content to be expected. Special attention should be paid to transition processes occurring in certain types of loading, when circuit should let calm down in other words, the usual regime of the circuit work should be reestablished, and it is only after that measuring of the determined electrical values on the basis of described procedure can be done. Namely, during transition processes, an error may occur when reading the instrument working on the basis of the suggested measuring method where dual-slope AID converter is used. That error is about 2%. The following Figure 1.12 presents the net voltage diagram and the corresponding current diagram for this type of load.
40
AOO,.----,------,---.--
--,.-
-
...,--
-..,.-
,
-
-,--
-"
"
·-rr·r·······Tr.~···: ·······T·!·'\r·······1·--r\.[ ········
n 200
' 00
· l\\\.· · ·f~·j· · · :\· "'l~t .\.,../l .'. Q
·/·/\:····· ····r'··/ 't ·······:··· ·j·,\'( ·······rj"lTC······
I \' :. : ,··· y\········ \~\ 1T : i;.· ···hl~ \······ .1T···\······ 1":11;/ .. ···\\······r
; ·.\ ······ j:1· · o /······· ··K ·'00
\;
:/
' \ ':l...·····L\.,.J '\' ·200 .•••.•.• .:.. ··,·L' •
, , ,
. . )
, ,, , "
001
~\ "
'/
'
.,
',
' j ,
,
,
l.. ~, " " "
000
,
't'
j ,,
..i , )
:I
~; .\
jl
'\'1:"L L. '
,, ,
'f
\
"
).
,,
-?-~
.
l'\\\\ . ' \
l..\.\.. , ). I . ,
,
;. . , , . . ,.
om
OCll
Figure1.12 The voltage recorded in real net and the corresponding currentif: R=ln, L=IF, C=O,IF
By using software developed in this mannerwe are able to check different types of loadingpresented in Table 1,4,Besides activepower, the RMSvaluesof voltage and currentwere checked, Table1.4 Results of measuring basedon the definition expression and the suggested measuring method, as well as according to a calculation carriedout in the Matlabprogram package and voltagesamples from the electricutility measured objectively numberof measurem.
I 2 3 4 5
R[!1]
I 10 100 50 10
LIH]
I 0.01 0.1 1 2
elF]
0,1 0.01 0,001 0.001 0,01
RMSvalueof voltageby definition
205.321 205.321 205.321 205.321 205.321
RMSvalueof currentby definition
152.Q2 20.532 2,053 4.105 20.118
active power
calculated by definition formula
2,2Ie+004 4,22e+003 421.563 842.725 4,05e+003
RMSvalueof voltagewith suggested measure. method
RMSvalueof current with suggested measure. method
205.493 205.493 205.493 205.493 205.493
152.129 20.559 2.056 4,111 20.151
activepower processed with suggested
measure. method 2.23e+004 4,23e+OO3 421.679 842.979 4.06e+003
The results of measuring given in Table 1,4 revealsthat the suggested measuring methodensureshigh precision when calculating basic electrical values in electric utilities, if the stationary condition of the observed system is satisfied. As the whole calculation is based on the objective input data about the measured voltage samples in an electric utility, these results can be accepted as highly credible for the suggested measuring concept.
1.7 Practical Realization of the Suggested DigitalMeasuring System In a practical realization of the suggested digital measurement system we rely on all of the statedfacts in abovepresented text. A dual-slope ADC is the basicprocessing unit. The ADC TC530 are serial analogdata acquisition sub-systems ideal for high precision measurements (up to 17 bits plus sign). The TC530 consists of a dual slope integrating AID converter, negative power supply generator and 3-wire serial interface port. Key AID converter operating parameters (Auto Zero and Integration time) are programmable, allowing the user to trade-offconversion time for the resolution. The data conversion is initiated when the RESET input is brought low. After the conversion, a data is loaded into the outputshift registerand EOC is assertedindicating a new data is available. The converted data (plus Over range and polarity bits) is held in the output shift registeruntil read by the processor, or until the next conversion is completed allowing the user to accessdata at any time. The TC530 requires a 41
single 5V power supply and features a - 5V, 1DrnA output which can be used to supply negative bias to other components in the system. We use two ADC, one for voltage and one for current signal. The voltage and current signals must be adapt to range of ±2V to activate maximum linearity of used ADC, and over special resistant circuit specify reference signal on 1,025V. Complete control of the measuring process and all necessary calculations are performed by the microcontroller (Motorola 68HC 11) (a flow chart in Figure 1.15). The microcontroller works by a program, which is stored in EEPROM, and complete calculations were realized using derived relation, with the specified N=6, W=40, L1t=0.5xlO-3s. Thus, the obtained results are sent to a display so that the process of measuring can be followed visually, too. An interface circuit (RS-232) is designed to enable a connection between the meter and PC with the possibility to choose the number of samples needed to calculate observed ac values. Over the installed display we can visually follow the results of calculation (RMS values of voltage, current, active power and frequency of the basic harmonics of voltage). As sample and hold circuit we use Analog Devices circuit AD684. The AD684 is ideal for high performance, multichannel data acquisition systems. Each SHA channel can acquire a signal in less than 1 ms and retain the held value with a droop rate of less than 0.01 mV/ms. Excellent linearity and AC performance make the AD684 an ideal front end for high speed 12- and 14-bit ADCs. The AD684 has a self-correcting architecture that minimizes hold mode errors and insures accuracy over temperature. Each channel of the AD684 is capable of sourcing 5 rnA and incorporates output short circuit protection. Low droop (0.01 mV/ms) and internally compensated hold mode error results in superior system accuracy. Independent inputs, outputs and sample-and-hold controls allow user flexibility in system architecture. Fast acquisition time (1 ms) and low aperture jitter (75 ps) make the AD684 the best choice for multiple channel data acquisition systems. Low droop (0.01 mV/ms) and internally compensated hold-mode error result in superior system accuracy. The block diagram of the proposed multimeter is shown in Figure 1.13. The supplying blocks are not presented in detail. They are with a standard configuration: a 220V/12V transformer with a diode rectifier and the necessary stabilization and filter condensers by which we provide supply of ±12V and +5V, as demanded by the introduced integral circuit. The part for adapting the voltage and current signals to be processed is realized by the means of precise (trimmed) resistors. To be more precise, the measuring of the current signals is made over the instrumentation amplifiers with a current transformer. Figure 1.13 displays that two TC530 converters are used, one for the voltage signal measurement, and the other for measuring of the current signal. The program with which the microprocessor operates is stored in the external EEPROM. The board provides a place for an external RAM, which enables us to store some data and use it for some additional calculation, and also as a supporting memory location, when performing all of the recalculation predicted by this measurement system. Taking into consideration that we tend to have a more flexible device in order to implement the adequate software, we can suppose that every subsequent modification and usage of a superior algorithm can demand the use of a buffer. Addressing of the periphery and memory is made by the means of mapping of the address space with use of a decoder (PAL circuit). Thus, the obtained results are sent to a display so that the process of measuring can be followed visually (e.g. the calculation of the effective value of voltage and current, or system active power), and by the means of an installed keyboard we can select a measuring type. Besides basic elements, the board contains other standard elements for connection, microprocessor oscillatory circuit, etc. The installed keyboard, which is used to set up the measuring range and the start of measurement, is not presented in the Figure 1.13. We can also choose the type of measurement. For example, this multimeter can be used for measuring the RMS values of voltage and current, as well as average and reactive power. The errors that must be taken into account for this developed experimental model are the errors introduced into every bond on the board within the range of 10 to 100 I.lV when standard soldering is used. This can be avoided if gold plating is used (evaporating), for which the error is equalized. This procedure reduces the error for two orders. Another problem is temperature swing, which is of the same order and which reduces the measuring resolution by two bits. Thus, in the standard measuring device the 42
resolution of the AID converter cannot be higher than 14 bits. Even this resolution is sufficiently high for the verification of the proposed method, as all currently used digital wattmeters are based on fast "flash" AID converters with a much lower resolution. A possible solution to the temperature swing problem is thermostat control of the measuring board which completely eliminates this error. The system transformer also introduces a certain measuring error due to the unknown measuring ratio, which needs to be verified by a special procedure (it is described in the following text) and there is also the error that occurs due to scaling of factors of the resistor circuit which adapts the system voltage to the measuring region of the AID converter. All described factors reduce the resolution of the AID converter to "only" 12 bits. After being adjusted to the measuring range of a converter, both voltage and current signals are brought into the acquisition board. The voltage signal has been adopted from a precise resistance network (in the range 0 - 400 V). The transducer consists of a resistive voltage divider buffered with a lowdistortion, low-noise, and wide-band operation amplifier. Precision resistors (tolerance: ±0.01%; nominal power: 0.6 W; temperature coefficient: ±5 ppm/C) have been used for the voltage divider. When 230 V are applied to the transducer, the power consumption of each resistor is lower than 10% of the nominal power. We have analyzed some error sources and their effects, which might be commonly encountered in using the series-resistor-type voltage dividers. For calibration of the voltage transducers we have used the procedure described in [13]. The current signal from an accurate current transformer has been taken for the input of the dual-slope ADC (Linear Technology ADC TC530) (in the range 0-10 A)~ In this case, current transducers consist of the traditional current transformers (CT) with a magnetic core. Under sinusoidal conditions the accuracy of the passive components can be very high, provided that the load applied to their output is close to the nominal burden. When distorted waveforms are dealt with, typically because of the presence of power electronic components) these devices can be inadequate, owing to their nonlinear behavior caused by the saturation and hysteresis phenomena. In any case, in order to comply with safety requirements, current transducers must guarantee galvanic separation between the power and the measurement systems. In this case, the overall behavior of the current-to-voltage transducer can be examined, offering high accuracy specifications (0.01% at 20°C) and residual inductance so low as to be negligible in all performed tests. It is interesting to observe that the phase difference, unlike that in active devices, decreases as the frequency is increased. In practice, this is due to the magnetizing current which is the factor governing inaccuracies of CTs at low frequencies. The magnetizing current decreases as the frequency increases. On the other hand, traditional current transformers are intrinsically unsuitable when currents with a de component have to be measured. In addition, the presence of de components, superimposed on alternating components, can make it impossible to use the transformer correctly, owing to the polarization of its magnetic core. As for the problems concerning the nonlinearity, in traditional current transformers, the effects of saturation and hysteresis, more or less evident but always present in the magnetic core, cause distortion in the secondary waveform. Thus they limit the above-observed advantages on phase shifts. It is suitable compensation methods [10, 11] that could reduce this problem. A digital technique improved the accuracy of instrument current transformers. A simple scalar model for CTs magnetic core, taking into account saturation as well as hysteresis and eddy current phenomena, has been implemented in a software compensation routine. This allows us to improve the accuracy in the reproduction of the primary current, in the case of both sinusoidal and distorted current waveforms (provided the DC components are not present). The uncertainties due to the exciting current, which is the main source of errors in instrument current transformers, can be strongly reduced, provided that an accurate preliminary identification of the transformer has been performed. Based on this, a compensation technique for CT has been set up. This techniques allows obtaining, simply by measuring the secondary current, a much more accurate estimate of the primary quantity than that usually achievable using the CTs nominal ratio. The proposed procedure needs at least one period of the signal to be acquired to perform the compensation. The proposed technique [10, 11] reduces the so-called composed error (for 1%), which includes amplitude errors, time shift between primary and secondary current, and harmonic content. The current transformer has a secondary circuit operation amplifier, which provides practically zero resistance, and thus much better linearity of the transfer function of all transformers. To minimize common-mode errors, the voltage developed across R is isolated and converted to a ground-referenced signal using a unity-gain 43
differential amplifier. Feedback amplifiers have been employed to increase, in effect, the permeability of transformer cores. Such techniques have been quite successful in reducing low-frequency errors [12, 14]. Hall-effect probes may represent the right solution in many cases, since they can measure de components and their bandwidth extends up to hundreds of kilohertz. Moreover, they are practical to use. On the other hand, the two main drawbacks of these transducers are the fact that measurement results depend on the position of the primary wire with respect to the core axis and the Hall sensor, and that results are influenced by magnetic fields generated by nearby power wires. This is the reason why we did not use this type of current transducer. A special circuit detects the passing of the signal through zero with a comparator (Figure 1.14), in this way achieving synchronization of the measuring cycle with the electric utility frequency. In order to avoid multiple false detections of zero crossing, caused by noise, the comparator is replaced by Schmitttriggers. The microcontroller generates sampling intervals and is able to perform the necessary calculations, based on sampling values of the measured signals. The analyses of operation of the zerocrossing detector proved that satisfactory accuracy could be achieved. The number of zero crossings of the signal is evaluated by a test on the sign of consecutive samples. The program corrects for multiple transitions due to noise and checks that the distance between zero crossings is approximately compatible with the frequency expected by the program. An odd integer number of valid zero-crossings are taken, and the frequency of the signal is calculated from the period of time between the first and the last zero crossing, divided by the number of periods. For better accuracy the values of the samples around these two zero-crossings are interpolated by means of a least squares procedure. In this way we eliminate possible errors if the input periodic signal has more than two zero crossings per period. In real electric utilities the possible de component is never higher than its amplitude, and this is the reason why we did not consider this special problem. In the case of such high de component, we must translate the input voltage signal or adapt the level of comparison. The usage of PLL multiplier circuits offers much better synchronization with the input signal frequency, avoiding errors caused by frequency measurements. The majority of all PLL design problems can be approached using the Laplace Transform technique, and relatively complex mathematical tools for their realization. One project demand was simplicity in realization and usage of very simple microprocessors such as Motorola 68HC 11. The existing PLL circuit needs a very sophisticated DSP for control, and consequently the price of the final instruments will be higher. In the existing electric utilities the system frequency swings in the range of 49.06 - 50.02 Hz (allowed by existing regulations). This can certainly influence the accuracy of the proposed measuring concept, due to the error made when determining the sampling period by zero-crossing detection. The error can be as high as 2%. When the period is read using an internal counter in the microprocessor, a zero crossing is required. The least expensive comparators have a slew-rate of 50 V/Jls. As the system voltage is scaled to about 2 V on the board (ratio of 1:150), this comparator triggers at about 2.5 mV, so the error is about 20 ns. This error can be ignored, since there is no accumulation. The accuracy of period reading then depends only on the processing power of the microprocessor. The processing demands described above can be satisfied using a wide range of low-cost microprocessors. The microprocessors are also capable of carrying out the DFT to detect the harmonic content of an input signal, automatically adjusting the algorithm to the real conditions in electric utilities (special subroutine in Fig. 7). The following constraints must hold to attain the lowest uncertainties: 1) L1t=TIW must hold at all times for W a multiple of two. This is the condition for synchronous sampling of a signal with frequency f= liT generated from a common clock-reference. 2) The number of sampled periods N must be an integer multiple of power-line cycles in order to reduce power line interferences. Conditions 1) and 2) prevent artificial spectral components (leakage) from appearing when doing a DFT on the sampled data. The realized instrument was checked in the frequency range from 45 to 65 Hz. The methods for estimating the frequency of a signal under noisy conditions [9] are also considered. The proposed algorithm [9] is suitable for real-time applications, especially when the frequency changes are abrupt and the signal is corrupted with noise and other disturbances due to harmonics. It is highly iterative and therefore needs a fast processor. 44
lr-71
jR1lfWRA-ZAt AO DL
1CSLE~)JSPLAY
~ GALE
4
DCLK_V l.-.+ DIN_V
r
'----
GALE DCLK_1+ DIN_II+-
VOLTAGE
CURRENT
AID
AID
VIN+V VREF
~
.-
SCHMITT TRIGGERS
VIN+I
VREF
I
L-
SIH~
L--SAMPLE AND HOLD
~1
NET VOLTAGE ~E TRANSDUCER
CURRENT
LOAD
rRANSFORMEI~T
l - - - - -...TXDADAPTING CIRCUIT RXD (RS-232)
Figure 1.13 Block scheme of the realized digital multimeter • Vee
R AC -_"~F\F'--__-
__-
--......j
OUT
Figure 1.14 Circuit for detectingthe frequency of the measured signal (R= 330k, C=220pF,R1=10k, R2=100k, Ry-Ik)
45
Calculationby the proposed method is carried out on the basis of the followingrelations: U RMS
I
RMS
P
1 w =
=
1 = -
W
L
-
W
.l. f W
2 U
(k. (delay
)
k=l
i2
(k .
(1.127) (delay
)
k=l
W
L (k . U
(delay
)(k .
(delay
)
k=l
where W is the number of samples needed for accurate processing of the observed values (in our case N=6, W=40, L1t=0.5xl0-3s), IRMs and URMS are the RMS values of current and voltage, respectively, and p is the active power. The reason for taking W=40 samples is that.even the most complex harmonic content processed by the proposed method demands more than W=40 voltage and current samples. Index k provides the jump from period to period of the measured voltage and current and delay Lit for samples at the next processing. The program used here suggests that the measuring system should consist of a main program, and subroutines for: testing the accuracy of the willingness indicator display (Busy flag), for testing the activated keyboards, for initializing all the memory location and resetting LCD, as well as a subroutine for the recalculation of the fundamental harmonic frequency and a subroutine for calculating the measured values based on the suggestedalgorithm. The device is capable of detecting a possible error in data communication with the master PC, using the implementedCRC (Cyclic Redundancy Check) method. Based on the suggestedhardware solution, it is planed that the device has the control over the control communication line, without really affecting its condition and timing. They must stay under the direct control of the software which is implementedat the master PC. To avoid possible error in calculation of the basic electrical values, which appears as a result of nonideal synchronization with frequency of fundamental signal (with the realized instrument it is 0.02%), an algorithm is adopted. The way it is used is that it gives the number of samples W (which we will use in calculation with equation (1.127)), by the means of a keyboard before the start of the work. Based on such a given value, the device will calculate a new value of delay L1t for W, where L1t=TIW, T is the readied period of fundamental voltage signal. With this the device is tested over a wide frequency range from 46 to 65 Hz, during which process it retains the predicted characteristics. We also tested the algorithm which is adapted to the new definition for the effective value of the measured signal, which is suggested by Professor Miljanic [15]. Based on this suggestion,the calculation in the first passing is done by the given samples number Wand equation (1.127). However, after that, the effective value obtained in this is used as a boundary value for sample selection of processed signal in next periods. The practical meaning of this is that for the first sample in every next calculation we take the one which has a greater effective value obtained in the first passing. The last sample which is taken for the calculation of the effective value is one that is not greater from the boundary value (effective value of signal from the first passing). In this way the algorithm becomes more resistant to the introduced error, because of the inaccurate determination of the fundamental signal period, and step L1t between two consecutive samples of voltage and current signals. We wrote a special program for Windows environment (in Visual Basic) to offer a possibility for connecting more of such wattmeters/counters in the net. In this way, if the developed measurement system is accepted for monitoring of a real distributivenetwork, we will be in a position to accompany all of the relevant parameters: the effective value of voltage and current, load active power, the fundamental frequency and energy. The basic window for monitoring of the realized application is presented in Figure 1.16.
46
I
Initialization
+
I
Definition of the pointer transmission of the fimction in a separate order. Call of individual functions that affect the input and initialization of new timers, through which necessary periodical fimctions are affected automatically.
I:
Definition of timer functions Setting approval for forceful disconnection of timer before the planned time has elapsed.
I
I
Initialization of SCI port Within this routine, processing of SCI interrupt is effected, free places in TF buffer are counted, switch-off and switch-on of delivery, updating of bytes in the delivery buffer, delivery of the length order of the byte size, start of the interrupt routine for delivery and count-up ofthe number of countable bytes in the RX buffer of, review of the first byte in the RX buffer, taking an order from the RX buffer, start of the interrupt routine for reception.
, ,
Communication protocol: in the routine SCI_WORK sending data on frequency, voltage (measured value) and current Initialization of the display, definition of ports and pins that participate in the display operation, definition of the displayed data - voltage and currency, or power and frequency in a single respective write-out. Displaying the 'overflow' message in case ofa calculation error (division by zero, since there is no frequency signal).
, ,
Start of the function that analyzes press-buttons, i.e. indicates the activated one; the values are set only when the press-button values are changed, with a possibility of detection of a double press-button.
An interrupt reacting to the input edge signal of 50Hz, through which a counter of full cycles of the processor counter is activated, and the frequency is re-calculated. We have T and At=TIW
Setting of the pulse ,ignal for the SIR elreuit, .::-:tting the counter oftb... 'interrupts' to tbe pin PAJ of microprocessor. The calculus is done based on the read-on frequency.
I
,
• • •
I
Reading of value of AID converter; definition of the port for the signal reception, and the communication signal. 'interrupt' reacting to the EOe signal of the voltage/current conversion. Translation of the read signal into a normal format which is processed subseouentlv
After the reading of the preparation (reset) of AID converter and all the addresses for a new conversion
•
Through an endless loop, a calculation of the effective value of the voltage and current is done, i.e, a calculation ofthe active power, with eq. (2). every read and measured value of the voltage and current is scaled down to the correct value. After 40 measured values have been collected, the SQRT routine is activated, upon which an ultimate value of the effective voltage/current is established and displayed. This value will remain unchanged until the next 40 values are measured, and so on. At the calculation of the value of the current, compensation factor is taken into consideration as well. This factor is obtained for the used current transformator.
SUBROUTINE
A Radix-2 Cooley-Tukey FFT is implemented with no limits on the length ofFFT. The length is only limited by the amount of available program memory space. All computations are done using double precision arithmetic. The FFT is implemented with Decimation in Frequency. Thus the input data before calling the FFT routine should be in normal order and the transformed data is in scrambled order. The original data is overwritten by the transformed data to converse memory. This is achieved by use of inplace calculations. This in place calculations causes the order of the DFT terms to be permuted. So at the end of the transform, all the data needs to be unscrambled to get the right order of the DFT terms. The 16bit data stored in the external RAM is organized as low byte followed by high byte. The performance of FFT using Motorola is quite impressive nothing that for an 8-bit machine with no hardware multiplier. Also note that all computations are performed using double precision arithmetic which is the case in most of the low end DSPs.
C RETURN Figurel.15 A flow chart of the programrunning on the microcontroller 47
000 .000
(AJ
000 .000
M
000.000
IWl
000.000
[wsJ
000 .000
[Hz)
Figure 1.16 The basic window for monitoringthe realized digitalmultimeter
Every operator working with this program can have a different level of access, depending on his or her place in the distributive network; each of them can adapt the serial transmission speed from the realized multimeter and remaining serial communication parameter, and thus change the numberof samples in the calculation of electrical values (Figure 1.17). The measured samples can be memorized in special data bases; we can ask for EXCEL reports or make an adjustment of time intervals for monitoring, in order to analyze the collected data. All of this is tracked by the means of diagrams for the visualmonitoring of the measured values.
Figure 1.17 The windowfor serialcommunication parameter adjustment
48
The presented results infer that the realized digital system has a sufficiently wide frequency range provide by the adaptive algorithm which can be adapted to the frequency of a fundamental harmonic. This will give it the possibility to perform basic electrical values measurements, with the (relative) error not bigger than 0.5 %. This was the basic demand from which we started in the realization of the suggested model, by which we practically confirm the validity of the model and of the basic work hypotheses.
References [1]. R.S. Turgel, "Digital wattmeter using a sampling method", IEEE Trans. on I&M, Vol. IM-23, pp. 337-341, December 1974. [2] P. Bosnjakovic, "Electronic measurement of electric energy", Ph.D. thesis (in Serbian), ETF Beograd, 1985. [3]. Clarke FJJ. and Stockton JR, "Principles and theory of wattmeters operating on the basis of regulary spaced sample pairs", J.Phys.E: Sci.Instrum. 15, pp.645-652, January 1982. [4]. T.S.Rathore, "Theorems on power, mean and RMS values of uniformly sampled periodic signals", lEE Proceedings 131, pp.598-600, November 1984. [5]. L. Toivonen, J. Morsky, "Digital Multirate Algorithms for Measurement of Voltage, Current, Power and Flicker", IEEE Trans. on PowerDelivery, Vol. 10, No.1, January 1995. [6]. A.V. Voloshko, 0.1. Kotsar, O.P. Malik, "An approach to the design of digital algorithms for measuring power consumption characteristics", IEEE Trans. on Power Delivery, Vol. 10, No.2, April 1995. [7]. T. Tanaka, H. Akagi, "A new method of harmonic power detection based on the instantaneous active power in three-phase circuits", IEEE Trans. on PowerDelivery, vol. 10, no. 4, 1995. [8]. S.S. Milovancev, V.V. Vujicic, V.A. Katie, "Improvements of On-line Measurement in Distribution System Using New Adding AID Converter", IEEE Trans. on PowerDelivery, vol. 10, vn. 4, 1995. [9]. L. Cristaldi, A. Ferrero, "A Method and Related Digital Instrument for the Measurement of the Electric Power Quality", IEEE Trans. on PowerDelivery, vol. 10, no. 3, 1995. [10]. lR.Pickering, P.S.Wright, "A new wattmeter for traceable power measurements at audio frequencies", IEEE Trans.Instrum. Meas., vol. 44, no.2, 1995. [11]. E.So, P.N.Miljanic, DJ.Angelo, "A computer-controlled load loss standard for calibrating highvoltage power measurement system", IEEE Trans.Instrum. Meas., vol. 44, no.2, 1995. [12]. C.S.Moo, Y.N.Chang, P.P.Mok, "A digital measurement scheme for time-varying transient harmonics", IEEE Tran. on PowerDelivery, vol. 10, no. 2, 1995. [13]. Crochiere, R. E., Rabiner, R.R., "Interpolation and Decimation of Digital Signals - A Tutorial Review", Proc. IEEE, vol. 69, no. 3, pp. 300-331,1981. [14]. Srinivasan, K., "Errors in digital measurement of voltage, active and reactive powers and an on-line correction for frequency drift", IEEE Trans. PowerDelivery, vol. PWRD-2, no. 1, pp72-76, 1987. [15]. P. Miljanic, "Definitions of the Average and RMS Values Suitable for the Measurement and Descriptions of Quasi Steady State", Electronics, vol. 5, no.1-2, Banja Luka, 2001. [16]. B. Stojanovic, F. Herrmann, and M. Stojanovic, "High-Performance power Measurements by Sample-and-Hold AC/DC Transfer Technique", IEEE Trans. on I&M, vol. 48, no.6, pp.1301-1305, 1999. [17]. G. Bucci, and C. Landi, "On-Line Digital Measurement for the Quality Analysis of Power Systems Under Nonsinusoidal Conditions", IEEE Trans. on I&M, vol. 48, no.4, pp.853-857, 1999. [18]. A. Carullo and M. Parvis, "Power Meter for Highly Distorted Three-Phase Systems", IEEE Trans. on I&M, vol. 46, no.6, pp.1262-1267, 1997. [19]. V. V.Vujicic, S.S.Milovancev, M.D.Pesaljevic, D.V.Pejic, and I.Z.Zupunski, "Low-frequency stochastic true RMS instrument", IEEE Trans. on I&M, vol. 48, no. 2, pp. 467-470, 1999. [20]. D.B. Zivkovic, M.V. Popovic, "Impulse and digital electronics", Electro technical Faculty Belgrade, and IP NAUKA, Beograd, (in Serbian), 1997. [21]. P. Arpaia, P. Daponte, and L. Michaeli, "Influence of the Architecture on ADC Error Modeling, IEEE Trans. on I&M, vol. 48, no.5, pp.956-966, 1999. 55
[22]. P. D. Capofreddi, B. A. Wooley, "The Efficiency of Methods for Measuring AID Converter Linearity", IEEE Trans. on I&M, vol. 48, no.3, pp.763-769, 1999. [23]. Pejovic, P., Saranovac, L., and Popovic, M.: 'Computation of average values of synchronously sampled signals', lEE Proc. Electr. Power Appl., vol. 149, no. 3, pp.217-222, 2002. [24]. Numerical Integration: Course Materials, Department of Mathematical Sciences - Worcester Polytechnic Institute, MA, USA, http://www.math.wpi.edu/Course Materials/MAI023C05/num int/nodel.html, 2005. [25]. Stenbakken, G.N.: 'A wideband sampling wattmeter', IEEE Trans. Power Appa. Syst., PAS-I03, no. 10,pp.2919-2926, 1984. [26]. F. Fiicorri, D. Mirri, M. Rinaldi, "Error estimation in sampling digital wattmeters", IEEE Proceedings, May 1985. [27]. G. Ramm, H. Moser, and A. Braun, "A New Scheme for Generating and Measuring Active, Reactive, and Apparent Power at Power Frequencies with Uncertainties of 2.5xl0- 6" , IEEE Trans. lnstrum. Meas., vol. 48, no. 2, pp. 422-426,1999. [28]. W.G.K. Ihlenfeld, E. Mohns, H. Bachmair, G. Ramm, and H. Moser, "Evaluation of the Synchronous Generation and Sampling Technique", IEEE Trans. Instrum. Meas., vol. 52, no. 2, pp. 371374,2003. [29]. U. Pogliano, "Use of Integrative Analog-to-Digital Converters for High-Precision Measurement of Electrical Power", IEEE Trans. Instrum. Meas., vol. 50, no. 5, pp. 1315-1318,2001. [30]. B.N. Taylor, and C.E. Kuyatt, "NIST Technical Note 1297, 1994 Edition: Guidelines for Evaluating and Expressing the Uncertainty ofNIST Measurement Results", Physics Laboratory, National Institute of Standards and Technology, Gaithersburg, MD 20899-0001, USA (Supersedes NIST Technical Note 1297, 1993), 1994. [31]. B.D. Hall, "Calculations of Measurement Uncertainty in Complex-Valued Quantities Involving Uncertainty in the Uncertainty", 64th ARFTG Microwave Measurements Conference, pp. 15-22, 2-3 Dec. 2004. [32]. N. Oldham, T. Nelson, R. Bergeest, G. Ramm, R. Carranza, A.C. Corney, M. Gibbes, G. Kyriazis, H.M. Laiz, L.X. Liu, Z. Lu, U. Pogliano, K.-E. Rydler, E. Shapiro, E. So, M. Temba, and P. Wright, "An International Comparison of 50/60 Hz Power (1996-1999)", IEEE Trans. Instrum. Meas., vol. 50, no. 2, pp. 356-360,2001. [33]. M. Kampik, H. Laiz, and M. Klonz, "Comparison of Three Accurate Methods to Measure AC Voltage at Low Frequencies", IEEE Trans. Instrum. Meas., vol. 49, no. 2, pp. 429-433, 2000. [34]. S. Simonson, S. Svensson, and K.E. Rydler, "A Comparison of Power Measuring Systems", IEEE Trans. Instrum. Meas., vol. 46, no. 2, pp. 423-425, 1997. [35]. G.A. Kyriazis, "Extension of Swerlein's Algorithm for AC Voltage Measurement in the Frequency Domain", IEEE Trans. Instrum. Meas., vol. 52, no. 2, pp. 367-370, 2003. [36]. R.G. Jones, P. Clarkson, AJ. Wheaton, and P.S. Wright, "Calibration of AC voltage", 2000 Conference on Precision Electromagnetic Measurements Digest, pp. 234 - 235, 14-19 May 2000. [37]. B. Larsson, H. Nilsson, and S. Svensson, "Calculation of Measurement Uncertainty in a Measuring System for Electrical Energy", Ninth International Conference on Metering and Tariffs for Energy Supply, (Conf. Publ. No. 462), pp. 58 - 62, 1999. [38]. P. Miljanic, Z. Mitrovic, I. Zupunski and V. Vujicic, "Toward New Standard of AC Voltage, th Current, Power, Energy and Phase Angle-Experimental Results" (in Serbian), Proceedings of the 4 Congress ofMetrologists ofSerbia and Montenegro, Belgrade, Serbia and Montenegro, 2003. [39]. Z. Mitrovic, I. Zupunski, "Stable Source of AC Voltage and Current", IMTC'2004, IEEE Instrumentation and Measurement Technology Conference, Como, Italy, 18-20 May 2004. [40]. P.Petrovic, S. Marjanovic, M. Stevanovic,"Measuring Active Power, Voltage and Current Using Slw AID Converters", 15th Annual IEEE Instrumentation and Measurement Technology Conference, Volume II, pp.732-737, St. Paul, Minnesota, USA, 18-21 May 1998. [41]. P. Petrovic, S. Marjanovic, M. Stevanovic, "New algorithm for measuring AC values based on the usage of slow AID converters", IEEE Trans. on I&M, vo1.49, No.1, pp.166-171, 2000. 56
[42]. P. Petrovic, S. Marjanovic, M. Stevanovic, "Digital method for power frequency measurement using synchronous sampling", lEE Proceedings, Electric Power Applications, vol.146, no.4, pp.383-390, 1999. [43]. P. Petrovic, S. Marjanovic, M. Stevanovic, "An approach to the design of digital algorithm for measuring AC values using slow NO Converters", International conference on Scientific Creativity of the Young Scientists, COMPUTER SIMULATION, MODELING AND COMPUTER TECHNOLOGIES. (CSMCT - 2000)", Proceedings Vol.II, ISBN: 5-89653-058-7, Edited by LASER ACADEMY Kaluga, pp.14-26, Kaluga (Russia), June 30 - July 2, 2000. [44]. P. Petrovic, "New Improvements in Accurate Measurement of Synchronously Sampled AC Signals", Proceedings of the IEEE Instrumentation and Measurement Technology Conference IMTC12002,pp.1367-1372, Anchorage, Alaska, 21-21 May 2002. [45]. P. Petrovic, "Digital processing of slowly changing signals without sample-and-hold circuit", The 2000 International Symposium on Information Theory and its Applications, ISITA2000 proceedings, Sheraton Waikiki Hotel, Honolulu, Hawaii, U.S.A., Paper No.0003, section W-A-5 Intelligent Processing, pp. 724-727 , November 5-8, 2000. [46]. P. Petrovic, S. Marjanovic, "New approach to measuring of AC values without sample and hold circuit", Fourth lASTED International Conference on Power and Energy Systems, PES 2000, paper No.319-049, September 19-22, 2000, Marbella, Spain (published in the MIC conference proceedings, February 2001). [47]. P. Petrovic, S. Marjanovic, M. Stevanovic, "Measuring of slowly changing AC signals without sample and hold circuit", Trans.Instrum.Meas., vol.49, no.6, pp.1245-1248, 2000. [48]. P. Petrovic, "Simulation and Practical Realization of the New High Precise Digital Multimeter Based on Use of IADC", European Transactions ofPower Electrical Engineering, vol. 14, no. 1, p.5-19, 2004. [49] P. Petrovic, S. Marjanovic, M. Stevanovic, "A Reply on Comments on "Digital method for power frequency measurement using synchronous sampling", lEE Proc.-Electr. Power Appl., vol.l48, no.2, 2001. [50] P. Petrovic, "New Improvements in Accurate Measurement of Synchronously Sampled AC Signals", IEEE Trans. Instrum.Meas., vo1.53, no.3, pp.716-725, 2004. [51]. P. Petrovic, "Calculation of the measurement uncertainties of synchronously sampled AC signals in the case of nonideal synchronization with fundamental frequency" IEICE Transactions on Electronics, vol. E89-C(11), pp.1695-1699, 2006. [52]. P. Petrovic, S. Marjanovic, M. Stevanovic: "Digital multimemeter-watthourmeter based on usage of slowly ADC with possibility of processing without special sample-and-hold circuit", Serbian and Montenegro Patent No. 033/03, January 21, Belgrade, 2003.
57
2. DIGITAL PROCESSING OF SYNCHRONOUSLY SAMPLED AC SIGNALS IN PRESENCE OF INTERHARMONICS AND SUBHARMONICS This chapter of book deals with the problem of estimating the value of the active power of the ac signal in the presence of subharmonics and interharmonics. The method can also be applied analogously for determining the RMS value of basic electrical values. The analysis makes use of the most general model of the voltage and current signal, i.e. the most complex spectral content that can be expected to appear in practice. A simulation of the suggested procedure has been done as well, as a final confirmation of the possibility to have accurate processing by using the synchronized sampling technique, even in the presence of subharmonics and interharmonics. In little more than ten years, electricity power quality has grown from obscurity to a major issue. Particularly, the increasing penetration of power electronics-based loads is creating a growing concern for harmonic distortion in the ac supply system. Consequently, the quality of the electric power is a major issue for both utilities and their customers and are quickly adopting the philosophy and the limits proposed in the new International Standards (such as IEC, EN, BS, IEEE). The quality of electrical power supply is widely recognized as one of the most important issues besides the liberalization of the electricity industry. It is also apparent that too little is known about the quality of existing power networks. As a result, there are concerted efforts to carry out power quality measurements, not only to assess the overall quality but also to gather the necessary information for designing improvement measures. The quality of electrical power in commercial and industrial installations is undeniably degrading. In addition to external disturbances, such as outages, sags and spikes due to switching and atmospheric phenomenon; there are inherent, internal problems, specific to each site, resulting from the combined use of linear and non-linear loads [1]. Between the harmonics of voltage and current which are the integer multiple of the power frequency (fundamental), further frequencies can be observed which are not an integer multiple of the fundamental. Interharmonics are spectral components at frequencies that are not integer multiple of the system fundamental frequency. They can appear either as discrete frequencies or as a wide-band spectrum (IEC61000-2-1). Subharmonics are interharmonics with frequencies lower than fundamental frequency (60 or 50 Hz). The most significant interharmonic source is the cycloconverter. The magnitude of these frequency components depends on the topology of the power electronics and the degree of coupling and filtering between the rectifier and inverter sections. Another common source of interharmonic currents is an arcing load. This includes arc welders and furnaces. These types of loads are typically associated with low frequency voltage fluctuations and the resulting light flicker. Other sources of interharmonics include: induction motors (wound rotor and subsynchronous converter cascade), induction furnaces, integral cycle control (heating applications) and low frequency power line carrier (ripple control). In synchronous sampling the sampling frequency and the frequency of the analyzed signal are synchronized in such manner that a block of samples represents an integer number of periods. The synchronized sampling technique of the ac signal can enable a fully accurate recalculation of the basic electrical values in the network. This is true in cases when we have a modified signal that is spectrally limited and when we have enough processing time and necessary recalculation capacities. In the papers [2]-[4] published so far, the subject of analysis has been, in the first place, only the harmonic components of the voltage and current signals, whereas a true analysis of the application of this technique in the presence of subharmonics and interharmonics has not been done so far. Therefore, it is in this chapter that we will focus on this problem. The conducted analysis can be transposed, in a completely analogous way, to the problem of estimating the correct RMS value of the voltage and current, in the presence of nonharmonic components. The suggested procedure is significantly different from the undersampling method described before [2, 4], as a result of adjusting the speed of processing to the requirements of real processing. Almost all research which concerns the problem of interharmonics and subharmonics is directed towards the identification of interharmonics and subharmonics [5-7], through which we come to the 58
spectral content and the possibility to define the distortion of the signal and establish the most suitable method for their elimination. In all the cases in practice, they account for only a small part of the total power of the complex signal - not bigger than 2%. The maximum change in voltage amplitude is equal to the amplitude of the interharmonic voltage, while the changes in voltage RMS value are depending both on the amplitude and the interharmonic frequency. At interharmonic frequencies higher than twice the power frequency, the modulation impact on the RMS value is small compared to the impact in the frequency range below the second harmonic (about 0.2%). Some analytical methods were derived to determine the occurrence of subharmonics, interharmonics, their number, frequencies and maximum amplitudes [8, 9], but this analysis did not derive conditions for precise measurements. Section 2.2 of this chapter provides a description of the simulation procedure used to check the suggested concept of the processing of ac signals in the presence of subharmonics and interharmonics.
2.1 Synchronous Sampling in the Presence of Subharmonics and Interharmonics We consider the initial signals with the following form (in this manner, subharmonics and interharmonics are introduced into analyses, in the voltage and current signal): Mz
M3
r=1
r=1
vj(t) = v:ar(t)+ .fivR Lkr'sin(,,{,r 'OJt + v, ')+ .fivR Lkr"sin(Ar OJt + v ,") II
(2.1)
with: M1
v:ar(t) = VI + .fivR Lkr sin(rOJt + lj/r)
(2.2)
r=1
The current signal is of the following form: i, (t) =
itar(t)+.fiI
«. R
N3
Lis 'sin(j.Js 'OJt + tPs ')+.fiI R Lis "sin(j.Js OJt + tPs ") s=1 s=1 II
(2.3)
with:
har
ij
(t) = II -
Ju
NI R
Lis sin(sOJt + tPs) s=1
(2.4)
where the subscript i in equations (2.1)-(2.4) denote input (voltage and current) signals. To enable a general approach, we assumed that quotients A and J1 belong to rational numbers, meaning that they have min form. Average power is calculated using the following expression, while the processed power is defined as p * in accordance with the suggested measuring method in [2]: 1T P = T (t )dt}it (2.5)
h o
p' =
lM
:tj=1
v;{j(cT + M))dj(cT + M))
(2.6)
In order to fulfill the condition of the precise processing (with high accuracy), we should prove that it is possible to satisfy the relation: p* = p (2.7) In the above relation, T represents the period of the complex signal which comprises both interharmonics and subharmonics, c is the number of periods between sampling, defined as the jump from one period to another (due to the low speed of the dual-slope AID converter used), used in [2]. Figure 2.1 illustrates the synchronously sampling procedure of complex ac signal with step L1t.
59
-, -2
_3'------~---~-----a.----.......&..------J
o
0.00&
0.01 0.016 Timein 88CondB
0.02
0.025
Figure 2.1 Illustration of the sampling procedure over an integration time (period 1) at regular time intervals of length Ltt. The sampled value is represented by a square located at moment j Ltt. A defining formula for calculating these complex signals is practically unavailable [10-12]. Papers dealing with the problem of processing in non-sinusoidal conditions are targeting on suggesting a method for parameter estimation of distorted signals, not on measurement of power of these types of signals [13, 14]. The accuracy of estimation depends on the signal distortion, the sampling window and on the number of samples taken into the estimation process. This is the reason why it was necessary to precisely define the period of superposition of these complex signals [15]. The conclusion is that this has to be a period determined as a product of the period of the fundamental harmonic (/==50 Hz or f=60 Hz) and the least common denominator of periods of all components in the complex signal (the multiple of the least common denominator of numerators of quotients A and J1 and the period of fundamental component of the complex signal). It can be established through analyses that the period for this complex signal becomes very large, up to the size of several minutes. This automatically renders impossible performing of an online calculation - this has a theoretical significance. This is especially true of the undersampling method detailed in [2], because of the unacceptably high delay in processing. Due to the nature of the process, the number c should be set equal to zero. In this manner, sampling of complex signals is performed inside one period of a signa1. A possibility to continue using slow, dual-slope AID converters remains open provided that the harmonic content is not too complex, since T period lends itself for such processing, due to its length. This was tested in simulation models described in [4], introducing interharmonics and subharmonics as the initial signals for processing. For this type of processing it could be expected that increasing the number of measurements will result in convergence of the calculated value of the active power per algorithm suggested in [2, 4] to the active power as calculated according to the principle of synchronized sampling. If we use the methods of calculating average power for signals described in equations (2.1)-(2.4), according to the definition formula (2.5), nine different products are obtained as the result. These products can be compared to the obtained expression based on equation (2.4), whereby c is defined as zero, for the reasons explained above. Supposing that T is the least common denominator (led) for the periods of all harmonic, subharmonic and interharmonic components, o/I' when multiplied by each of A', A", J1', J1". It is the multiplier of a natural number and 2Jr that is obtained in a result. The first member in the equation (2.5) is a multiplied value of the voltage harmonic and the current harmonic, having the form:
60
t
TPI = [[VI +.J2VR =
kr Sin(rOJt+lI'r)}[II
+.J2IR~ls Sin(sOJt+¢J]dl =
M) N) 1 1 0 0 TV/I/ + V/.J21RLIs -cos{swt + tPs ~ T + 1/.J2vRLkr -cos{rwt + 'IIr ~ T + s=1 sw r=1 rw M)
1T
N)
J
(2.8)
+21RVR LLkrls - {cos[(r - s)wt + 'IIr - tPs]- cos[(r + s )wt + 'IIr - rPs ]}dt = r=1 s=1 20 min(M1,N1)
=TV/I/ + IRVR Lkrlr cos('IIr - rPr)T => r=1
Q)
PI = VIII +IRVRLk,lr COS('IIr -rPrt Ql = min(Ml'N1)
r=1
In the equation (2.8) we specify that summing is going to QJ as, in the case when MJ is not equal to NJ, the components of signal (voltage or current) with index between MJ and NJ in product give O. In the case when we calculate the RMS value of processing signals (voltage or current), QJ is equal to MJ or NJ, respectively. The member in the equation (2.5) which is the multiplied value of the current harmonic and voltage subharmonic is: TP2 =
f II +.J2IR~?sin(sOJt+¢J ..J2VR~?~sin(A~OJt+II'~~/= T[
N)
1T
M 2 N)
]
M2
~
~
llJ
= 21RVRLLk~ls .- J{COSL(A~ - s}vt + II'~ - ¢s - COSL(A~ + s}vt + II'~ + ¢s JPt r=1 s=1 20 A~ ~ Z (integer number)=> P 2 = 0 ]
(2.9)
The member of the equation (2.5) which is a multiplication of the current harmonic and voltage interharmonic is: T[ N) ] M3 TP3 = II +.J2IR~?s sin(sOJt + .J2vR~/ sin(.4:~OJt + 11'; ~t (2.10)
f
¢J .
A: ~ Z => P3 = 0 In equations (2.9) and (2.10) P2 and P3 are equal to 0, because the signals are integrated over the time interval that is generally equal to an integer number of their periods. The same analogy leads us to a conclusion that members P4 (obtained through multiplication of the voltage harmonic and current subharmonic) and P5 (obtained through the multiplication of the voltage harmonic and current interharmonic) equal 0, whereas P6, obtained through the multiplication of voltage subharmonic and current subharmonic), is equal to:
~ ~ lIST f ~(, , \__ ' ~( llJ TP6 = 2VR I R L..J L..Jk,ls .- lCos~ Ar -Ils pt + If/r - rPs - cos~ Ar + Ils pI + If/r + rPs JPI = r=1 s=1 20 I
I
I
,
\__
T
=VRIRL L k~l~ cos[(A.~ - ,u~ }vt + II'~ - ¢~ pI ~ r=1 s=1 0 P6
=VRIR~>~I~cos(II'>¢~r} r=1
'
,
L
J
M2 N2
]
(2.11)
Q2 =min(M2 ,N 2 )
The above is valid if M25:N2 and for a certain r if there is s (this s we denote as s.), i.e. if s, is such that
Ar '
= VRIRtl~k~s cos(lI'~s - ¢~)
(2.12)
s=1
The conclusion about the value of Q2 in the case of calculating the RMS value is the same as in the case of QJ. The member of equation (2.5) obtained through the multiplication of voltage subharmonic and current interharmonic has the following form: 61
M 2 N3
T
J
TP7 = 2VRI R LLk~t; Sin(A~mt + fI/~ )sin{,u;mt +¢;' ~t = r=1 s=1
0
(2.13)
P7 =0 The P7 is equal to 0 just as P2 and P3. Similarly, P8, which is obtained through multiplication of the voltage interharmonic and current subharmonic, is similar and equals O. Now, the only remaining value is P9, which is a result of the multiplication of the voltage interharmonic and current interharmonic:
f. j>;t; .!2 J{cos[{,u; - 2~ }m +¢; - fI/; ]- cos[{,u; +2~ }m +¢; +fI/;]}it ~
Tp9 =2VRIR
r=1 s=1
0
(2.14)
P9 = VRIR~>;I>OS(fI/> Q3 = min(M3, r=1 The above is valid if M3g[3 and for a certain r if there is s (this s we denote as s,), i.e. if s, is such that A,"=ps". For other cases, there is no r. If N3<M, the above relation adopts the form:
¢;J
P9
NJ
= VRIRtt;k;s cos(¢>fI/;,)
(2.15)
s=1
From all of the above, it can be concluded that:
P = VIII
+VRIR[tk,l, cos(fI/, -¢,)+ ~k;Z;, cos(fI/; -¢;,}+ t ( ( cos(fI/; -¢;J]
(2.16)
The first member that is a result of the application of the equation (2.6) within the concept of synchronized sampling is of the following form (product of voltage and current harmonics): N) M M) M Mp; = MV]I] + J2V]I R Lis Lsin(sO?ii\t + tPs)+ J2VRI] Lkr Lsin(rmji\t + If/r)+ s=1 j=1 r=1 j=1 M)
N)
M
(2.17)
+ 2VRI R LLkrls Lsin(rO?ii\t + If/r )sin(sO?ii\t + tPs) r=1 s=1 j=1 By applying the following way of recording, we get:
rsin(Sli!iM)=L2;rCOS(Sl1!iM)=L, j=1
j=1 iSOJ6tM
= eisOJ!!.t e .
e,sOJ!!.t _ I
I
~L, +iL2 = reisoiM = r(e;s,"",y = j=1
= eisr.of!..t
. iS~M . smi1tM 2ze Sln-2
iSOJ6t ~ 2ie-2- sin sm. t
.sOJ6t(M
= e'T
j=1
sin sm. t
Lcos(sl1!i~t)= M j=1
=>
Sln-2
(2.18)
. SOJi1tM
M
Sln--
j=1
sin sm. t
2~ cossmAt(M+l~Lsin(Sl1!iAt)= 2
2
Lsin(sli!iAt+¢J=
2
. smi1t
. smi1tM
Sln--
1) S l n - +
2 M
j=1 . smi1tM
~ 2~ sin sm t(M+l)
2
2
sin SOJi1t~
[
2~ sin smAt (M+l)+¢s
sin sm. t
]
2
2
In order to comply with the condition regarding the equity of the Pi * expression to the Pi expression, the following conditions must be satisfied (the second addend in (2.17) has to be equal to zero):
62
. SOJI11 . SOJI11 ( ) s1O--:I: 0 and sln--M = 0 for 'Vs = 1,2,...,N1 2 2 because OJ = ~ => N1OJI11 --< 1r ¢:> 111 --< l:.!!- = Tharmonics Tharmonics 2 N10J N1 . SOJI11 {} . OJI11 OJI11 s1O--M=Ofor'VsE 1,2,...,N1 =>s1O-M=O;-M~1r 2
2
(2.19)
2
=> M ~ Tharmonics => OJI11 M = k' 1r ¢:> ~ M = k' 111 2 Tharmonics where Tharmonics is the period of harmonic components of voltage and current signals, and k' is a natural number. In addition to the condition stated above, the following condition must be satisfied as well (the third addend in (2.17)):
sin
rOJ~t 2
*" 0 and sin rOJ~t M = 0 fior '\IrE {I 2 ... M }~ M OJ~t -< 1r ~ ~t -< 2 ' , '1 I
2
Tharmonics
M1
(2.20)
If we take as relevant conditions (2.19) and (2.20), the equation (2.17) becomes: M 1 N)
M
Mp; =MVjlj +LLVRIRk)sL{cos[(r-s)adl1l+fJlr -¢J-cos[(r+s)adl1l+fJlr +¢J} where is r=1 s=1
j=1
(2.21)
M
Lcos[(r-s )a!i111 + fJlr -¢J= M cos(fJlr -¢r) for s = r; j=1 M
M
M
L cos[(r- s)OJjl1f + fJI r - ¢s] = cos(fJI r - ¢r)L cos((r- s)mjl1/)- sin(fJI r - ¢r)L sin((r- s)mjl1f) for r :I:s j=1
j=1
j=1
To satisfy Pl=Pl*, the equality in the third row of equation (2.21) must be equal to zero, because the following conditions must be satisfied:
r-s 2 N -1 ~ _1
sin--OJ~t
r-s *" 0 and sin--OJ~tM = 0 for '\Ir *" s
2
21r
~t
(2.22)
. -< 1r ~ ~t -< Tharmonics
2 Tharmonics N I -1 For the subtrahend in the first row of equation (2.21) we can write that: M
M
M
Lcos[(r + S )ojl1t+ v, + (A]= cos(f//r + ¢s)Lcos[(r + S )ojl1t] - sin(f//r + ¢s)Lsin[(r + s )aJl1t] j=l
j=l
(2.23)
j=l
which infers that a necessary condition for (2.23) equal to zero is: . r+S . r+s M +N 21r T . sin- - OJl1t *-0 and sin- - OJl1tM = 0 => 1 I I1t -< 1r=> I1t -< harmnOlCS 2 2 2 Tharmonics M1 + N 1 (2.24) 21r I1t . OJl1tM = nk" ¢:> ---l1tM = nk"; 2- - - M = k"/\OJl1tM ~ 21C >- 1C; k" IS natural number Tharmonics Tharmonics If the last of the conditions (2.24) is satisfied, the step between two consecutive samples L1t must be taken as: flt -<
Tharmonics
MI + NI
and ~M = k'~ M ~
Tharmonics
<=:> M
~ k'
flt
Tharmonics
(2.25)
P;
~ = PI We can perform a similar numerical procedure to establish the necessary condition to satisfy all equalities of type Pl=Pi* (i=1, 2,..., 9) The second member that is a result of the application of the equation (2.6) is of the following form: M2
M
Mp; = fiVRI 1 Lk~ Lsin(A~li!il1t + fJI~)+ r=1
j=l
M 2 N1
M
r=1 s=1
j=1
+ VRIRLLk~ls L {cos[(s -
A~ ~l1t + ¢s - fjI~]- cos[(s + A~ }vj~t + ¢s + fjI~ nwhere is:
Isin(A~t4M +If/;)= sin If/; I cos(A~t4M)+ COSlf/; Isin(A~t4M) j=1
j=1
}=1
63
(2.26)
Since it is necessary that P2 *=0, for the first addend in (2.26) we can conclude that:
.
2~OJ~t
Sln--*
0 I\S . 2~OJ~t M -- O.,"IrE, {12,..., M} max(2~) 21C ln-2 =>------~t_<1C
2
2
2
(2.27)
Tharmonics
The last condition is always fulfilled, since the basic assumption is that 0 _< lr conclusion is that the following has to be true:
~ ml1t _ ' . ~ ml1t _ ' . -2- M - k l " , -2- M - k2" ,
The obvious
JM2 ml1t _ - 2 - M - kM2", kl'k 2 , ••• ,k M21S natural number we take. I
•••
_<1.
."
' .
•
, _ a;. a; a~2 ' _ c;. c; C~2. _ (" ,) A, - -;-, ~ - -;-,...,AM2 - -,- => A, - -, ~ - -,... ,AM2 - - , d, -Icd bl'b2,···,bM2 => bl b2 bM2 dl d, d, I
_
I
_
I
_
I
(2.28)
_
, (" ,) d' ,AI 'I' => d = gcd CI,C 2,.··,C M2 => d = A => 2 ml1tM = II" ¢::> A I1tM = IITharmonics
¢::>
,I kA
A'I1t ~ n; 2-M
= 11 /\ mI
I
I; is natural number
Apart from conditions (2.28) for equation (2.26), it is also necessary to analyze the second addend in (2.26). We can write for the minuend:
fCOS[(S-A~N8t+¢, -If/;]=cos(¢, -If/;)fcos[(s-A~NM]-sin(¢, -If/;)fsin[(s-{N8t] j=1
j=l
To equalize (2.29) to zero, it is necessary to: s - i r m/),.t -:;:. O/\sin-s - i r m/),.tM = O: Vr E { } sin-12 ... M => 2
2
"
, ,
,s-~
N - min(A: ) I
2
2
rm/),.t -< rc => /),.t -<
T. . harmOniCs NI - min(.{)
(2.30)
I
if we take L, = S- => sin~m/),.tM = sin dIS -Cr m/),.tM = 0; Vr E {1,2,...,MJ;Vs E {1,2,...,N I } d,
if e'= gcd{dls
2
(2.29)
j=l
2dl
1Vr => ~m/),.tM = l;rc,l; 2d,
E
N;
~ = Afl => Afl/),.tM = I;Tharmonics; M ~ Tha~;onics; k'Afl = I; ~
A
/),.t
The subtrahend in the second addend of (2.26) will also have to be equalized to zero. For this we can write:
fcos[(s + A~ ~Llt + ¢s + lj/~]= cos(¢s + lj/~ )fcos[(s + A~ ~Llt]- sin(¢s + lj/~ )fsin[(s + A~ ~Llt] j=l
j=l
The (2.31) is equal to zero if: . s + A'r m/),.t -:;:. O/\sm-. s + A'r (o/),.tM = 0; Vr E { } sm-1,2,...,M => 2
2
2
,
S
+<
(
. dI . if we take A, C = ~ => sm-mdtM = sm s r
=
d,
2
(2.31)
j=l
N + max(A' ) I rm/),.t -< 2
1C =>
,)
,
dt -<
T.harmonics .
I
N I +maX(Ar ) I
S-A . S-A . S-A r mdtM = smsmdtWcos-_r mdtM-cossmdtMsm--r mdtM = 2 2 2
(2.32)
s-A'
sinsm/),.tM cos-_r mdtM = 0 2
The last equation takes into consideration the condition (2.19). The third member that is a result of the application of the equation (2.6) is of the following form: M3
M
M3 N,
M
r=1
}=I
r=1 s=1
}=I
Mp; = JiVRI 1 Lk~Lsin(A:mjl1t +VI~)+LLk~/s L {cos[(s -A: }vjl1t+¢s -v, ]-cos[(s +A'~ }vjl1t+¢s +VI~
n(2.33)
M M M where is L sin(A:OJ}I1t +VI ~ ) = sin VI ~ L COS(A: OJ}I1t )+ cos VI ~ L sin(A:mjl1t) }=I
}=I
}=I
In order to satisfy the condition stating that P3 *=0, for the first addend in (2.33) is necessary to have:
64
. i' OJ~t
SIn _ r _ ; t
2
. i' OJ~tM { } max(i' '-'L\t T. 0 A SIn _r_ _ = 0; \lr E 1,2,»>, M 3 => ,f1' -< ,,=> !tJ -< h
if. we take AI"a~'" =~;A2 bl
a; "a~3 ( " " " ) , , c~' "c; " C~3 =-;;-,...,A M3 =-,,-;d2 = gcd\bl' b2,·..,bM3 ~AI =-;A2 =-,...,A M3 = - ; b2 bM3 d2 d2 d,
(2.34)
." ("" ..·,C,,) ~d=A d" III =gcdA ( " " , .. ·,A,,) ~ where is d =gcd\C 1,C 2, I,A2 M3 M3 2
AlII
2
,AIII~t
lII'
,HI
OJ~tM = 13 tr ~ OJ -2- M ~ tr ~ A ~tM =13Tharmnoics ~ k A
=13 ; I
I ~ is natural number
The second addend (2.33) can be represented as:
t cos[(s - ,{ }vj~t
+ q)s -
~,<]= cos(q)s - VI;)t cos[(s - A~ }vj~t]- sin(q)s - VI;)t sin[(s - A~ }vj~t]
j=1
j=1
(2.35)
j=1
The (2.35) is equal to zero if:
sin s - A~ oust « 0 /\ sin s - A: m~tM = 0; V'r E {1,2,..., M 3 }; V's E {1,2,..., Nl}~ 2 2 tlt -< IV
A
Tharmonics ~ tlt -< Tharmonics maxtNI - min(A: ~' max(A: )-1} max(A: )-1
(2.36)
= gCd{s - A:IV'r E {1,2, ...,M3 }, V's E {1,2,...,Nl}}~
IV
A 'IV tlt , IV T · ;/ , is naturalnumber -mtltM =/41[~A --M=/4 ~k'A =/ 4; M~ h a;;omcs 4 2 Tharmonics A tlt The subtrahend in the second addend of (2.33) can be present as: I
t cos[(s + A: }q~t + q)s + VI;]= cos(q)s + VI;)t cos[(s + A: }q~t]- sin(q)s + VI; )tsin[(s + A:}q~t] j=l
j=1
(2.37)
j=l
The (2.37) is equal to zero if:
. s + A: . s + A: 0;V'rE {1,2,...,M };V'SE {1,2,...,N } ~ sln--mtlt:;t:O/\Sln--mtltM= 1 3 2 2 N + max(A" ) . 1 r mtlt -< 1[ ~ tlt -< Tharmomcs
(2.38)
N 1 + maX(A: )
2 Since we know that:
J (
).
J
. ~ s+X wf1tM = sm . (s-XJ . (swf1tM )cos(s-X sm s - ~ wf1tM = sm ~ wf1tM - cos swf1tM sm(s-X ~ wf1tM = 0 We can write: if ..iV = gCd{s + ..i~IV'r
E
{1,2, ...,M3 }, tis
E
(239) .
{1,2,...,N}}}~
v
(2.40) · , ..i 'v i1t , v' T -OJtltM = Is1[ ~..i - - - M = Is ~ k'..i = Is; M ~ harmomcs'l is natural number v 2 Tharmonics ..i i1t ' 5 If conditions (2.36) and (2.40) are fulfilled, then P3*=0. The conditions for members P4* and Ps* can be derived in a manner absolutely identical to the one in which P2* and P3* are derived. The reason for this is that the latter are obtained by multiplying subharmonics of the voltage and the harmonics of the current. The sixth member that is a result of the application of the equation (2.6) is of the following form:
I I k~l~ f {cos[(i
Mp; = VRIR
r -
r=1 s=1
where is
j=1
f cos[(i
r -
j=1
Jl~ )jwf1t + If/~ - ¢~]- cos[(i + Jl~ )jwf1t + v, + ¢~ n r
(2.41)
Jl~ )jwf1t + If/~ - ¢~] = cos(lf/~ - ¢~)f cos[(i Jl~ )jwf1t]- sin(lf/~ - ¢~)f sin[(i Jl~ )jwf1t] r -
j=1
r -
j=1
In order to satisfy the condition on the equity of the sums P6 and P6 *, it is necessary to fulfill (for the expression in second row of (2.41)):
65
. A~2 - JL:- wtlt;i:: O ' A~2 - JL:- mtltM = 0; 'Vr e { ' , /\ SIll 1,2,...,} M 2 ; 'Vs e {1,2,..., N 2} ; 0 -< Ar -< 1;0 -< JL -< 1=>
SIll
S
"
=> -1 -< Ar - JL s -< 1=>
Imax{A~ - JL: ~ 2
(2.42)
1 wtlt -< - wtlt -< N j wtlt -< 1C 2
Besides this condition,the followingmust be true as well (the subtrahendof(2.41»: . A~ + JL: . A~ + JL: { sIn--OJtlt;i::O/\SIll--OJtltM=O;'Vre 1,2,...} ,M ;'Vse {1,2,...,N }=> 2
2
2
max{ir + JL' }OJtlt -< 1C => tlt -<
2
TharmOniCs .
S
max{A~ + JL:} VI { , , I A ' V I - -tltM = / , if =gcdAr+JLsl~r~M2/\I~s~N2 }=>-OJtltM=/ 61C=>A 6=> 2 Tharmonics VI' Tho, => k' A = I => M ~ ~. I is natural number 6 AVI t:..t ' 6 VII VII tlt M = 1' => L' - JL 'I'Ar ;i:: Il ,; 1~ r S M /\1 ~ s ~ N }~ -OJt:..tM A if AVI = gcdlAr = 17, 1C => A - 2 2 s s 7 2 Tharmonics 2
AVI
(2.43)
=> k' AVII = I' => M > Tharmonics . I' is natural number 7 AVII t:..t ' 7
The seventh member that is the result of the applicationof the equation (2.6) is of the following form:
Mp;
M 2 N3
M
r=l s=l
j=l
VRIRLLk);L{cos[(P; -A~)jOJ~t+t/J~'
=
-Vl~]-cos[(u; +A~)jOJ~t+t/J~' +VI~»
(2.44)
It is necessaryto satisfy the following conditions(for the subtrahendin (2.44»: sin
A~ + P: OJM 0# 01\ sin A~ + P: OJMM = 0; Vr E {1,2,..., M 2 }; Vs E {1,2,..., N3}~ 2
2
max{ir + J-/} TharmOniCs . s mflt ~ 1r ::::::> flt ~ 2 max{A~ + Jl;}
AW ~ =gcd{A~ + Jl;ll ~ r ~ M 2 /\ 1~ s ~ N 3 }::::::> -OJfltM =1~1r::::::> AVlII _ _ t_ M =I~ ::::::>
if AVlII
2
::::::> k' AVIII =
l. ::::::> M > Tharmonics . 8 AHII flt '
max{Jl" -_r--:..mflt A' } ~ 1r ::::::> flt ~
_~_s
2
if AIX
t: is natural number TharmOniCs .
max{u; - A~}
IX I1~r~M2 /\l~s~N3 }::::::>-mfltM=191r::::::>A A ' I X ---M=19::::::> flt t
2
Tharmonics
Tho,
/x'
::::::> k' A
(2.45)
8
{" -A =gcdJls r I
Tharmonics
= I ::::::> M > ~. I is natural number 9
-
A/X flt '
9
If the condition shown in (2.45) is satisfied, it results in P7*=0. The condition for P8*is analogous to the one that has already been obtained (2.45). For the last member that is the result of multiplication of the voltage interharmonicand the current interharmonics (P9 *) we observe that: M3 N 3
M
r=1 s=l
j=l
Mp; = VRIRLLk~l;L {cos[(Jl; - A: )jOJ~t + t/J~' - VI:]- cos[~; + A: )jOJ~t + t/J~' + VI:» In order to guarantee that P9*=P9, it is necessary to have:
66
(2.46)
. A~ +- /1: mlit * O ' A~ +- /1: mlitM =O;V're {1 ,2,...,M };V'se {1,2,...,N }:::> sln/\sln3 3 2 2 max{l'r + r:II"}s mlit ~ J[ :::> lit ~ Tharmonics.
max{A~ + /1:}
2 .
X
{ "
if A =gcdAr
+/1s"I 1~r~M3
/\l~s~N3
}:::>-mfl.tM=/ AX ,
101C:::>A
2
X
, - -litM = /lO:::> Tharmonics
(2.47)
:::> k' AX = I' :::> M > Tharmonics . I' is natural number -
AXfl.t '
~
1C :::> lit ~
10
max{/1" - A"} mfl.t
_~~s----.;r~
2
10
TharmOniCs .
max{p: - A:}
• f -A"I" " if AXI =gcdVLs r /1s *Ar;1~r~M3 u
:::> k' AXI
= I'
/\l~s~N3
}:::>-mfl.tM=/ AAI , 2
I I1C:::>A
AI --M=/II:::> lit ' Tharmonics
:::> M > Tharmonics . I' is natural number
II
-
AAI fl.t '
II
2.1.1 Derived Conditions for Precisely Processing All the above conditions are summarized in the Table 2.1. The Tharmonics is the period of harmonic components of voltage and current signals. By accepting that a is the maximum value of all denominators in the second column of the Table 1, whereas b is the minimum of all the denominators in column 3, k' lowest common denominator (led) of 11k], llk3 , .•. , Uk» in column 4, then we come to a conclusion that it is necessary to satisfy the following condition:
~I -< Tharmonics
(2.48)
a
M~
Tharmonics
(2.49)
b~1
M = k'· Tharmonics ~t
~ k' a
(2.50)
By combining the conditions (2.48) and (2.49), we get the following: M ~~ (2.51) b from which, it becomes evident that the first natural number that satisfies the condition is defined by:
M
=[~] + 1;
[~ ] =m{~)
(2.52)
therefore we can conclude that with M chosen like this, we assume that L1 1 : 111 = Tharmonics • k' . M ' k'= lcd(ll A~, i = 1,...,M2;11 A~,j = 1,...,M3;11 /.1~,S = 1,...,N2;11 /.1;,r
(2.53)
= 1,...,N3 )
to fulfill the condition for the completely accurate recalculation of the active power, according to the suggested concept of synchronized measuring. The condition obtained for L1 1 is a complete equivalent of the one from the original concept of synchronized sampling (the number of samples M must be in accordance with the Shannon-Nyquist criterion that takes into consideration the highest frequency from the spectrum of the processed signal), because the member (2.53) for ~t, contained in the nominator of the expression, represents the period T of the complex signal which comprises both interharmonics and subharmonics: T = lcd(Tharmonics' Tinterharmonics' Tsubharmonics) (2.54) The conclusions (2.53) and (2.54) are completely new and unique. The viability of the method confirms the fact that we can apply this procedure on measurements described in [2, 3, and 4]. The
67
conclusions will be the same as before, with the exception that now the measuring time will be different, depending on the spectral contentof the processedsignals. Table2.1 Conditions to be fulfilled in order to satisfythe equation contained in relation(2.7) conditionto be satisfiedwhen selectingthe samplingintervalilt product of multiplying the voltage harmonicby current harmonic product of multiplying the current harmonicby the voltage subharmonic of product multiplying the current harmonicby the voltage interharmonic product of multiplying the voltage harmonicby current subharmonic product of multiplying the voltage harmonicby current interharmonic product of multiplyingthe voltage subharmonic by current subharmonic product of multiplying the voltage subharmonic by current interharmonic product of multiplying the current subharmonic by voltage interharmonic product of multiplying the voltage interharmonic by current interharmonic
J1f -<
conditionto be satisfiedwhen selectingthe necessarynumberof samples W
M~
Tharmonics
Tharmonics
J1f
M}+N}
~M=k' Tharmonics k' is natural
number I1t-<
~f-<
Tharmonics
N] +max(,{)
Tharmonics
N} +max(j~)
Tharmonics
M~
gcd~ - 2~I'v'r E {1,2, ...,M2 }; 'v's E 1,2,....N, }. ~t k 2 =gCd{s - A~ I'v'r E {1,2,..., M 2};'v's E 1,2,..., N l }
M"?
Tharmonics
gCd{s + A:I\ir E {1,2, ...,M3 }, \is E {1,2,...,N} }}~f
k, = gCd{s + A:I\ir E {1,2, ...,M3 }, \is E {1,2, ...,N}}} I1t-<
~t-<
~t -<
Tharmonics
M] + max(JL~ )
Tharmonics
M} +max(p;
Tharmonics
~t -<
~t-<
gcd~ - u, I'v'r E {1,2,..., M l }; 'v's E 1,2,..., N 2}- ~t k., = gcd{r - p~ I'v'r E {1,2,..., M}}; 'v's E 1,2,..., N 2}
Tharmonics
M"?
gcd~ + p;I'v'r E {1,2, ...,M}}, 'v's E {1,2, ...,N3 }}~t k s = gcd{r + JL~IVr E {1,2, ...,M}}, Vs E {1,2, ...,N3 }} M~
Tharmonics
M"?
max{{ + p;}
Tharmonics
max{i;. + p~}
Tharmonics
gCd{A~ + p~ 11::S; r::S; M 2 1\1::S; s::S; N 2}~t k 6 = gcd{2~ + p~ 11::S; r::S; M 2 1\ 1::S; s::S; N 2} Tharmonics
gcd{2~ + p;/I::S; r::S; M 2 1\1::S; s::S; N 3 }~t k; = gCd{A~ + p; 11::S; r::S; M 2 1\ 1::S; s::S; N 3}
M~
Tharmonics
gcd{.( +p~ll::s;r::S;M31\1::s;s::S;N2}~t
kg =gcd{.{ +p~ll::s;r::S;M31\1::s;s::S;N2}
~t-<
Tharmonics
max{i;. + p;}
number
k-k-is natural number
TharmoniCS
M~
max{A: + p~} r
k'·k2is natural
M~
Tharmonics
gcd{2: + p;ll::S; r::S; M 3 1\1::S; s::S; N 3}~t
k 9 =gCd{A: +p;ll::s;r::S;M31\1::s;s::S;N3 }
68
k'·k4is natural number
k-k.is natural number
k'·k6 is natural
number
k'·k7is natural number
k'·kgis natural number
k'·k9is natural number
If we now perform the numerical calculation according to the suggested algorithm which is in accordance with the theory of synchronized sampling (Appendix A), (c=O, L1t=T/M), we can conclude that it is possible to satisfy the equation (2.7), under the assumption that was introduced at the beginning. The algorithm and the speed of the sampling have been adapted to suit the complexity of the processed signal, so that the realization of the possible instrument must be completely different as the one described in [4]. In case of very slow processes, such as the ones that can be found with some power oscillations (e.g. 0.3 Hz), the measuring time must be significantly longer than the time described in [4], where the measuring time was one second.
2.1.2 Asynchronous Sampling We conclude that the number of samples M in the proposed processing approach becomes sufficiently large. This can be taken as one of the conclusions reached in the theory of asynchronous sampling [16]. In asynchronous sampling the sampling frequency and the frequency of the signal being sampled are not synchronized, and generally, a block of samples will not coincide with an integer number of periods. The result however is still a truncation error that is inherent to this approach. Different methods of processing the sampled signals can reduce but not eliminate these errors. The concept of asynchronous sampling is the one to be applied with these complex signals since the period of the complex signal becomes too large and difficult for practical determination. Therefore, it is easier to transfer to a method of measuring like this one. In this case, the error that can be expected in measuring of the active power is known from the theory of asynchronous sampling [17]. In case of a general periodic design, the power signal with period T can be shown through a Fourier series. Here, those harmonics of current and voltage that have q=/sir/, and where r is a series of voltage harmonics, s is a series of current harmonics; q is a series of power harmonics, take part in the amplitude of power harmonic Pq and phase {jJq. The error of cutting in a general case of asynchronous sampling can be shown to be:
1 M-l M q=l i=O 11/' = Mrs - NT 00
(
21r T
E=- LPqLcOS 2i-qTs +qJq
J
(2.55) (2.56)
whereas the error introduced by a single harmonic of the series q is:
E q
= ~Ts
2c}T
'J cos( _ 21r T. _ q21r 11/'J . (q J qJq q 2T s 2T 2T s
SIn . (q--11/ 21r
2 T 21l To
(2.57)
SIn
where 11/' represents the difference between measuring interval and complete number of periods, ci is defined as a real number representing the number of cycles of the measuring signals with period T and within the measuring interval (c]T= Mrs) and Ts is the period of sampling whichis not synchronized with the complex signal T. The aliasing error becomes large in the case when the arguments of the sin function in the denominator reaches the 7Cn value, where n is a whole number. This is the case with the power harmonics of the order q, whose frequency equals the multiple frequency of sampling (q/T=n/Ts). The last two expressions define the error in calculating the first member in the product of the signals defined by expressions (2.1)-(2.4), i.e. the member obtained from the product of the voltage and current harmonics only. The complete analyses of the error would comprise nine members of this form, due to the presence of interharmonics and subharmonics. From an accuracy of calculation consideration synchronous sampling has clear advantages in that most of the time ac components of the power do not contribute to an error in the calculated power. It is obvious from the expressions (2.55) - (2.57) that the increase in the number of measurements (and in proportion to that, the use of fast AID converters together with DSP) can offer a satisfactory level of precision. However, the cost of the final device is several times higher, which was not the intention when we started designing the multimeter [2, 4].
69
of nonharmonic components. The number of samples M and the distance L1t between two consecutive samples, the necessary conditions for precise processing of basic electrical values of currents and voltage signals with known spectral content, can be specified in advance. The case when the voltage spectrum and the current spectrum have different band limits is discussed, and the conditions that guarantee correct results are derived. The obtained results have been confirmed through simulation. A measuring concept of this kind can be used for calibration of equipment, under-complex-conditions calibration of instruments, and also for real measuring, in cases where the conditions in the system allow the performance of such measuring in a short time interval.
Table 2.2 Results obtained through a check of the suggested method of measuring (VR=220 V; IR=10 A, f=50 Hz) Numberof measurements
1
2
3
4
5
V/[V] I/[A] k;
0 0 1; 0.5; 0.3; 0.3;0.1 0.3; 0.2; 0.1; 1; 0.8~ 0.6; 0.3; 0.1
10 1 1
0 0 1; 0.75; 0.53
5 5 1; 0; 0.7; 0; 0.32
0.456; 0.34 0.97; 0.648; 0.439
0.54 0.86; 0.47
0.3 0.9; 0.7; 0.4
1; 0.6~ 0.4; 0.3; 0.2; 0.15; 0.1
1; 0.754; 0.65 1; 0.732; 0.54
22; 0; 15.4; 0; 7.04
0.3; 0.2; 0.1 0.9; 0.7; 0.4; 0.35; 0.3; 0.2; 0.15 0.25; 0.5; 0.8
0.478; 0.34
0.53; 0.46; 0.15
6.6
0.856; 0.65; 0.397 0.786; 0.453
0.79; 0.65; 0.38
19.8; 15.4; 8.8
0.53
0.75
Ar "
1.25; 1.5; 2.5; 3.2; 3.7
1.238; 1.765; 3.65
1.75; 3.45
1.25; 1.983; 4.35
Ps
0.2; 0.5; 0.75
0.498; 0.563
0.42; 0.53; 0.75
0.75
1.2; 1.5; 2.75; 2.5; 3.7; 4.2; 6.5
1.754; 2.487; 4.536
1.37; 1.78; 4.75
Ps"
1.25; 1.983; 4.35
If/r [rad]
0;0;0;0;0
0
0; n; 1t/5
n; 0; 0; 0; 1t/4
fJlrTradl [rad]
0;0;0 0; 0; 0; 0; 0
1t/5; 1t/4
n; 1t16; 0
1t n; 1t/2
1t16 1t/12; 1t/l0; 1t16
¢s[rad]
0; 0; 0; 0; 0; 0; 0 0;0;0 0; 0; 0; 0; 0; 0; 0 273 0.0014652
0; 1t/3; 1t/7
0; 1t/2; 1t
1t;0; 0; 0; 1t/4
1t; 0 0; 1t/8; 1t1l0
0; 1t/3; 1t16 1t1l5·; 0; 1t16
1t16 1t1l2; 1t/10; 1t16
5254747 0.0021961
974 0.0020533
10001 0.0019998
15 3 1; 0.245; 0.68; 0.05; 0.57 0.64; 0.42; 0.21 0.652; 0.538; 0.32; 0.267; 0.05 1; 0.35; 0.79; 0.168; 0.87; 0.06; 0.264 0.62; 0.36; 0.28 0.53; 0.74; 0.234; 0.65; 0.41; 0.364; 0.1 0.756; 0.842; 0.95 1.127; 1.534; 2.682; 5.622; 8.85 0.326; 0.537; 0.725 1.86; 1.924; 2.375; 2.895; 3.927; 6.22; 6.695 0; 1t; n; 1t/12; 1t/20 1t/4; 1t/15; 1t/9 1t/8; n; 0; 1t/2; 1t/5 n; 0; 1t/7; 1t16; 0; 1t/4; 1t 0; 1t; 1t/12 1t/5; 0; 1t/2; 1t/4; 0;1t;1t 17923 0.0011158
1458.548
-504.811
152117.16
-1722.45
k/
s.: Is Is' Is"
Ar'
fj/,."
¢s'[rad] ¢s" [rad] M~
~t -<
[s]
p=p*rW]
7711
72
2.3 Calculation of the Truncation Errors in Case of Asynchronous Sampling of Complex AC Signals Previous chapter of this monograph deals with the problem of defining the active power of an ac signal in the presence of subharmonics and interharmonics, with the use of synchronous sampling of current and voltage signal measuring. It has been shown that by using synchronous sampling and with a suitable selection of the processing parameters we can effect completely accurate calculation of the active power in the presence of nonharmonic components, but this type of processing requireds much time. On the other hand, asynchronous sampling has potentially simpler circuitry, and with an appropriate processing method it can be used for wideband signals. In asynchronous sampling, the sampling frequency and the frequency of the signal being sampled are not synchronized, and in general, a block of samples will not coincide with an integer number of periods. The number of samples can be adjusted so as to provide that a block size is within a less than the sampling period of coinciding with an integer number of input signal periods. The result however is still a truncation error that is inherent to this approach. Different methods [27-30] of processing the sampled signals can reduce but not eliminate these errors. In this section, we defined the truncation error in a form which can be used by a designer to specify the number of samples required, the sampling rate, or the number of cycles over which the sampling should be done. We derive equations which give the worst case errors that can be expected for various processing methods in processing of complex ac signals. These equations can be used for design purposes. On the other hand, presented simulation results define the error bounds for this method of processing (asynchronous sampling) in possible practical applications.
2.3.1 Analysis of Worst-Case Errors A convenient approach to the analysis of errors in measuring the average value of non-sinusoidal periodic signals is the use of Fourier series. We take for the initial signals the ones of the following form (quotients "A' and fl' are such that they are within the range 0-1, quotients "A" and u" are greater then 1, thus introduced subharmonics and interharmonics into analyses, the voltage and the current signal): v; (t) = v~ (t)+
J2v
R
u,
M3
r=1
r=1
L k, 'sin(Ar 'OJt + lfIr ,) + J2vR L k, "sin[Ar "OJt + lfIr ,,]
M1
v~ (t) = VI + J2vR L k, sin(rOJt + lfIr ) r=1
(2.58)
The current signal is of the following form: Nz
i, (t) = i;o (t)+.fiI R LIs 'sin(,us' OJt +
N3
f/Js ')+.fiI R LIs "sin[,us" OJt + f/Js ,,]
s~
s~
N1
i;O
(t) = I] +.fiIR LIs sin(sOJt + f/Js)
s=1 (2.59) where OJ=2;if angular frequency, k-V« is the RMS voltage value of the rth harmonic, IsIR is the RMS current value of the sth harmonic, If/r and qJs are the phase angles of the rth and sth harmonic of voltage and current, the subscript i in equations (2.58) and (2.59) denote input (voltage and current) signals, and VI and II are the average input voltage and current, M], M2, M3 are the numbers of the highest harmonic, subharmonic and interharmonic of the voltage, N], N2 , N3 are the numbers of the highest harmonic, subharmonic and interharmonic of the current signal, respectively. To enable a general approach, we assumed that quotients A and J1 belong to rational numbers, meaning that they have min form, with m and n being natural numbers. Sampling the signal at regularly spaced intervals of time Ts the sampled values Vi and i, can be expressed as:
73
(2.60) i, (it)= liD (iTs )+ J21 R
N2
N)
L Is 'sin(u s ' »n, + f/J s ,)+ J21 L Is "sinLusII wiTs + f/J s II] R
s=1 (2.61) with i=O,I, 2,..., W for a signal sampledat W+ 1 point. If a linear averagingoperator A [27] is applied to the sampledvalues, the error E can be expressedas: s=1
1
fv;(t)dt
Tgenera/
E = A(v;)-Tgenera'
(2.62) where A(VI) = VI , and Tgeneral is the period of the complexsignal which comprises both interharmonics and subharmonics. We can obtain Tgeneral as least common denominator of periods of all nonharmonic and harmonic components in input complex signals. The operator A can be moved inside the summation signs. From this we can write: M
0
M
M
E= fE;ar + IEt"b + fE: k=l
1=]
t
(2.63)
p=l
where the amplitudes of kth, Ith, and pth harmonics, subharmonics and interharmonics error term can be expressedas: E:
ar
ak =
= akck COSlflk +bkck sinlflk; ck = JiVRk k;
A[sin(27lk~JJ; b, A[COS[27lk~JJ =
Tgenera'
E,
sub
Tgenera'
= al'd I coslfll'b'd" + I I SIn lfIl;
J'b, = Acos(, 2A 1d - a;- J
al = A SIn 2AI 1d - n, I
•
dI = -vr;;2V k' L, R I;
( ,
I
Tgenera'
Tgenera'
(2.64)
E~nt = a~gp COSfj/~ + b;gp sinfj/;; gp = JiVRk;;
a; = ASin(2J.~71p~J b; = ACOS(2~~1lfJ~J T'.general
. Tgenera'
In addition, the same form of errors can be used for subharmonics and interharmonics. The terms ak ,bk, a'i ,b '1, a"p and b '~ can be written as: ar ar ar ar ak = sin /\ bk = cos
8: r:
a; = 8t
r: 8t cos -r int 8:
-r /\
sin b; = in t a" = 8 sinrint /\ b, = 8 p
ub
p
p
p
ub
P
cosrPint
(2.65)
where:
"tUb = ~ a;2 + b? 1\ tan-I
-r = :~ I
"int P
= ~ a"2 + b"2 P
P
"
1\
tan-I rint P
= ap
b;
(2.66)
If the last two equationsare substitutedinto equation(2.64), then equations(2.64) become:
74
Ekhar
har - C B k k
sub
sub
E/
--
har C B sin(yhar k k k
(sin yhar cos 'l'k IIF + cos yhar sin IIF ) k k 'l'k -
d / B/ (sin ySUb cos '1'/ IIF' + cos /
-r sin /
sub
IIF') -- C/ B/
'1'/
+ 'l'k IIF )
+ '1'/ IIF')
sin(ySUb /
E~nt = g pB~nt (sin y~nt cos If/~ + cos y~nt sin If/~)= g pB: sin~~nt + If/~) t
(2.67)
From these expressions it can be observed that:
IE I= d B
IEk,max I = c k B k '• when
'lfk
sUb I,max
har
har
I
IE I= g
sub I '•
int p,max
int p Bp
(2.68)
+ y;ar = ±!:. and CkC£ar is the magnitude of the worst-case error due to the kth harmonic 2
component. This term can be set to zero if lfIk + y;ar = 0 i.e. if the starting point of the process is properly selected. Since the starting point of a process would normally be triggered by a zero crossing or threshold value of one of the signals being processed it would be difficult in practice to reduce the error caused by a particular harmonic (subharmonic and interharmonic) by changing the starting point of the calculation. In cases where the voltage and/or current waveforms are complex, the time varying power will contain more than one harmonic, interharmonic and subharmonic term. In this case it will not be possible to eliminate the truncation error except for a single harmonic term. For (W+I) regularly spaced samples spanning W intervals of time duration Ts, the following expression is obtained:
(w + ~ )Ts = MTgeneral
(2.69) where W, M, are integers and ~ is a dimensionless quantity. This equation implies that W samples are used to span M periods of the input signal. In asynchronous sampling the number of samples would normally be increased or decreased to keep I~I< 1. It will be shown that in some of the processing schemes keeping ~ within a range of -0.5 <~~ 0.5 is best, while in other cases keeping ~ within a range of 0<~<1 will give a smaller potential truncation error (the same conclusions are valid for subharmonics and interharmonics in form as defined in (2.69)). The terms ak and bs, a'i and b r; and a'~ and b '~ can be related by single equation:
= A e j2trk---.!!'.L J
b, + ja,
"
Tgeneral;
[
j =
H.
= A[e j2Jl"i
l---.!!'.L
J
Tgeneral;
[j2Jl"i~-fL- J
"
bp + jap = A e where
b; + ja,
(2.70)
general
The worst-case error term for a particular harmonic, subharmonic and interharmonic was
seen to be related to the term ~af + Pf , which can be obtained by finding:
(B:ar ) = b~ + a; = (bk + ja, Xbk + jak ) = A e '2nk J
iTS][ Tgeneral
'2nk
e -J
iTs ] Tgeneral
[
(B;Ub) = A e j2Jl")"I--.!!L..][ e-j2Jl")"I--.!.!L] Tgeneral
Tgeneral
[
(B~nt
r
=A e
j2Jl"l P-!.!.L][ e-j2Jl"l P--.!.!L] P Tgeneral
P
Tgeneral
[
(2.71)
2.3.1.1 Average Method The operator A used to calculate the value for W+I samples is given by:
1 W-l A = - L,vt(or it) W t=O
(2.72) 75
and the square of the corresponding kth, lth, and pth harmonics, subharmonics and interharmonics error coefficient is given by:
(s;ar
(&r
r
b)
[W-l 27lk ---.!!L. ][W -le -j27lk~] ~
i = -1 2 ~e
W 1
1
=-2
W
Tgeneral
1=0
[w j2"}'~/---.!!L. ][w~ e j2"i/I---.!!L.] -1
-1
= -2 ~ e
W
(&:t)
Tgenera/
1=0
-
Tgeneral
1=0
Tgeneral
1=0
[W-l ~e j2"l P---.!!L.][W-l ~e -j2"l P---.!!L.] p
P
Tgeneral
1=0
Tgeneral
1=0
(2.73)
This expression can be written in a simpler form by making use of eq. (2.69) and writing:
.s:..»: Tgenera'
W + L1
(2.74)
In addition, defining ¢ as:
M
¢=2:rr-W +L1 Equation (2.73) can then be written in the form:
(2.75)
(Char) =_12 [1-ejWk¢Jl[l-e-jWk¢Jl=_12 [ej~ -e-j~]= I2 smf!¥J k w l-ejk¢J J l-e-jk¢J J w j'5t _j'5t w sin2(k2¢J e 2 -e 2
(2.76)
Finally, we can write:
(2.77)
2.3.1.2 Trapezoidal Method The operator A using a trapezoidal method for calculating the average value of W+1 samples is given by:
J
1[ W-1 1 [W -1 ] AVi(or ii)= - O.5vo + LVi +O.5vw = LVi +O.5(vw -vo) W i=1 W i=O
The square of the corresponding worst-case error coefficient is given by:
76
(2.78)
(2.79) 2 ] Sin Wk; _ _2__ sin 2 Wk; =~[Sin2 W [ ~~~ 2 ~
=~
Wk; ctg 2 1:1..]
2
2
2
2
(2.80)
2.3.1.3 Stenbakken's Compensation Stanbakken proposed an "end" correction to improve the accuracy of the processing method when compared to the simple averaging method. The operator A in this case becomes:
1 [W-I Avi(ori;)=-(--) LVi+~VW ] W +~
i=O
(2.81)
The square of the worst-case error coefficient is then given by:
[sin sin
sin
!Vk; Wk; l-e)'Wk~ 'Wk~ ][ l-e-}'Wk~ -'Wk~ ] 1 2 2 (W + 1)-; 2 ] --.-+!J.e} --.-+!J.e} = - - --+2!J.--cos--+!J. 2~ (W +!J.r [ l-e}k~ l-e-}k~ (W +!J.r sin~ 2
har \2 1 (8k J = - -
2
(8:ar )
=_1_
(W + !J.)
[ 2
(W+!J.)
int
y=_ I_
(w + ~Y
p
2
Sin2(WkTr~J Sin(WkTr~J ] W+!J. +2!J. W+!J. COS[(W+l)kTr~]+!J.2 =8 2(k) . 2(kTr-M J . (kTr-M J W + !J. sm sm
(8;Ub) =_1_
(c
(2.82)
[
W+!J.
[
W+!J.
Sin2(W~Tr~J
sin(WA:rTr~J
W+!J. +2!J. W+!J. . ''1Tr-M M sm sm ''1Tr-W+!J. W+!J.
J
2(1'
. (1'
J
]
CO{(W+l)~Tr~)+!J.2 =E2(~) W+!J.
Sin2 (Wi>r ~) Sin(Wi~1r~) ] . W+!J. +2~ W+~ COS((W+I),r1r~)+~2 =c 2(,r ) . (A." M) . (x M) W +~ sm W+~ sin W+~ 2
p
p
P
1C
p1C
(2.83)
2.3.1.4 Zu-Liang Compensation Zu-Liang proposed a trapezoidal method with "end" correction as a possible processing method. He demonstrated that the ak and bi; a', and b '/, and a'~ and b"p terms were reduced considerably when compared to the other proposed methods. With this method the operator A was defined as: AVi(or
l ~ ] 1 [W-l 5vo+-LVi ii)= -1- [O.W +O.5vw +-(vw +vw+!J.) = - - LVi +o.s(vw
since vw+~ =
w+ ~
Vo
i=1
W +!1
2
i=1
for a measurement covering an integral number of cycles.
The square of the worst-case error coefficient is then given by:
77
~]
-vo)+-(vw +vo) 2
(2.84)
i Wk¢
Wk"" Wk¢ 2 sin ---'!.Wk¢ ;Wk¢ Wk"" e -iT sin Wk¢ .Wk; Wk; 2 +t:J/ 2 cos Wk; + je 2 sin-'" . 2 +!!:.e-;2 cos Wk; + je -;2 sin Wk¢J k¢ 2 k¢ 2 /2" sin e - i 2" sin
e (e har k
\2
1 J = (W + A)2 o
. 2
1
sm
Wk¢J
Y...
Y...
2
2
. Wk¢J sm
2 Y...
2 Y...
Wk¢
k¢
2
2
(2.85)
] . 2 Wk; 1 [. Wk¢ k¢ Wk¢J2 = - - sm-ctg-+!!:.cos2 (W + !!:.)2 2 2 2
2 k¢J
2
=
= - - --+2!!:.--cos-cos-+!!:. cos --sm
(W +!!:.f
[
sin 2
sin
2
(& r
2
2
g r= ( )2 [Sin (Wk 7r --'!!'-)ct W+A W+A (k7r --.!!.-) W+A 1
+A
cos (Wk 7r --.!!.-)]2 W+A = e2(k)
(c:!Ub) = _1 ()2 [Sin(WA,~7r--.!!.-)ctg(A,~7r~)+ ~COS(WA,~7r~)]2 W+~ W+A W+~ W+~ (&;tY =-(_1_ [Sin(WA~7r~)ctg(i~7r~)+ACOS(Wi~1r~)]2 W+A) W+A W+A W+A 2
Assuming Ik¢I-<-< 1a Taylor series expansion for the obtained. With the further assumption that W + d
~
lark
=
c:2(A,~)
=&2(A~)
(2.86)
(similarly for tUb, and dn~) expressions can be
W , we can use approximate expression given below.
2.3.1.5Average Method- approximate expression
I: [1
k : 6
~
(I - ~2 )](-Ir +11
&;a,
=
et
=1: [1+ 1l:1~~2 ~_L\2)](_lYM+ll
ub
e
~nt
=
I:
+ JT
[1 +
JT
2
2
I
(2.87)
2:: ~ 2(1 _ ~ 2)] (- 1)PM 1 +
2.3.1.6 Trapezoidal Method- approximate expression
&;m
=
&,'"b =
&:'
=
I: I: I:
k; '6
[I -
JT
[I -
JT:
[I -
JT
~ , (2
I;~
2
(2
+ 1\ 2 +
~
)] ( -
2 )] ( -
l)kM
Ir
2/: ~ 2(2 + 1\ 2)] (- I )pM
+1
+1
+1
I I I
(2.88)
2.3.1.7Stenbakken's Compensation- approximate expression
e;r =11l:~ L\(1-L\X-1YM+ll e/ub = 11l~~ e ~t =
L\(1- L\X-1 r
1
+
11l:~ L\ (1 - L\ X_ I)PM +
1
I
I
(2.89)
78
2.3.1.8 Zu-LiangCompensation- approximate expression
&;m = ItiJT : ~ e ,'.b
e ~nt
=
=
I
M 2
32~2 ~
t1 IT
2
3
2
6- X-I)*" I (1 _ X-I jM I t1 2
+I
t1 2
+1
I {3M 6- X-I r I t11T ;
2
t1 2
+1
(2.90)
2.3.2 Simulation Results In order to perform the estimation of possible errors in the processing according to suggested algorithm, a simulation was performed in the Matlab program package (version 7.0). The special advantage of such a program environment is that it enables obtaining an arbitrary input signal, which is further processed. When the input voltage and current waveforms are of the form as given in relations (2.58) and (2.59), the average power becomes:
~krlr COS(IVr - qlr)+ %k~l~r COS(IV~ - ql~r)+ ~k;l;r COS(IV; - ql;r)]
P = VIII + VRIR[
(2.91) wherep, = min(Nl'M1), Q2 = min(N 2,M2),Q3 = min(N 3,M3 ) . Other members of product, represents the time varying power components, corresponds to harmonics, subharmonics and interharmonics terms. The worst-case absolute error can be expressed in the following manner:
E=~fEi
W i=1 (2.92) where variables Ei defined in Table 2.3, (it was assumed that the phase angles for all signal components are equal to 0). When the Stenbakken or Zu-Liang method is used in relation (2.92), it is necessary to use factor 1/(W+i\), instead of the multiplying factor I/W From the derived relations addressing variables E; it is clear that there is not limit in the number of harmonic, interharmonic and subharmonic components taken into consideration through this approach, when determining the size of the worst-case error E. It was assumed that the phase angles for all signal components are equal to 0, in order to define the proper worst-case error. This way of estimating the error factors could lead to a higher value of the overall truncation error limits, then the value that it has in practice. There is a very small possibility that the values of the phases for all of the harmonics, interharmonics and subharmonics are such that they fulfill a condition that their differences are always ±!!.... It is possible introduce the dependence of the error E on 2
the existing phase angles; the introduction of this dependence would require a modification of the factors that are defined in Table 2.3, and based on the relations from equation (2.67). However, for the reasons of practicality, the conducted analysis is correct. By making the right selection of the parameters used in processing, the actual error that will appear in the processing of the observed complex signals will be lower than the one that is defined in (2.92). According to this relation, the size of the worst-case error in the paper is defined only by the values of the amplitudes of all of the components of the input signals. When doing this, it is not necessary to estimate the value of the phase angles, since this would require new procedures and new algorithms - much more complex and more demanding in the realization process. The conducted analysis can be analogously applied to the case of determining the rms or effective value of the processed complex ac signals. In order to calculate the rms value of the input signal, it is necessary to multiply the signal by itself. The square of the signal formed in this way is subjected to the described processing procedure. In the end, what remains to be done is to calculate the square root of the calculated average value of the signal's square. What follows from this is that the worst-case truncation 79
error in determining the rms value of the input signal is practically determined as the square root from (2.92). Based on Figures 2.4-2.7, it can be concluded that, given an adequate choice of the number of samples Wand keeping d within the projected limits, asynchronous sampling can offer a satisfactory precision in processing of complex ac signals. The much bigger dynamics of the processed signals, results in a need of a much higher number of samples, in order to achieve the desired level of precision. Modem AD converters can offer satisfactory precision combined with a high speed of sampling, so that it is possible to perform the asynchronous processing within the required interval. It is interesting to observe that the limits of the actual errors in the calculation of the active power for the input signals characterized by a high level of complexity, almost identical for all the four processing methods that are analyzed. This is different from the analysis conducted in the case of periodic ac signals, where much better performances were recorder for Lu-Ziang method that was the case with other methods. In the hardware realization of these algorithms a strategy that would be easy to implement would be to start taking samples when an input waveform crosses some threshold value and shut off the sampling process when the threshold value again reached. This process would imply that d lies in the demanding range. It would be more difficult to implement an algorithm based on taking samples both before and after the threshold value was reached and then determining if the last sample should be used. This algorithm process can be implemented with the design of a suitable controller. In a real environment and when the measuring is performed in practice the samples of the processed signals are measured with errors, which are caused by the imprecision of the voltage and current transducers, that are used to adapt the measured signals to the measuring system. This type of error is known as the error of conversion and it occurs due to various imperfections, such as processing of the analogue signal in various digital circuits, or determining of the digital equivalent and similar. All of this results in raising the worst-case error in asynchronous sampling (equation (2.92».
Figure2.4 Relative error in determination of the average power as function of the number of samples W and d, for the average method (M, = 1; M 2 = 2, M , = 1;N, = 2;N 2 = 3,N, = 3)
80
Table 2.3 Values of the error variables defined in the equation (2.92) Error variables E, =- V. I.
QI=min(M1.Nd
QI
QJ
'f.k,I,c(r+s)+,[iIiV. L} jc(j)+,[iI.Vi 'f.lkc(k) j= 1
r =s=\
k =1
Q2=min(M2,N1 )
~);t;e(A:, +,u;)
£ 2 = -V.I.
r =s= 1 OJ=min(M ) ,N) )
E, =
-VRIR I(t;s(.<'; +,u;) r =$=1
E, = V,I,"Ik,l,[c(r-s )-c (r+s)]+ , _I
.J2IIV' ~)JC(j)+.J2I,vl tllc(k) t al
j _1
. ,,2
s, = V,I , "fic;t;[c(.{ - ,uJ- C(,1, + ,u;)] ' :01 $", 2
'"
E6 = V.I.M I k);-[s(i;- ,u;)- s(A; + ,u;')] r= 1 $=2 res
E7 = V.I.M Ik,l;[s(r- ,u:)- s(r+,u;)]+ ~V/,II;S{,u;) r =\
) =1
$=1
E, =
V.I.M I k,t;[s(r - ,u;)- S~+ ,uJ]+~ViI.It;s{,u;) j=l
r= \
$= 1
E9 = V.IRM I k;t,[s(i,
- s)- s(i, - s )]+ ~/YR ~>;s(iJ j= 1
r=[ $ "' )
EIO = V.I. MIk;t;[s(A:, - ,u;')-s(i, + ,u;)] r =1 $=1
V,I, ~);I;c0::- ,u;)- e(i; + ,uj~ M " N,
Ell =
[
, :oJ $=-1
Figure 2.5 Relative error in determination ofthe average power as function ofthe number of samples W and A, for the trapezoidal method (M, =1;M2 = 2,M 3 = 1;N1 = 2;N2 =3,N 3 =3)
81
~
!.. l
€
~ 0.0
l:
.•a
ne
:';: 0 .4
i
Figure 2.6 Relative error in determination of the average power as function of the number of samples W and A, for the Stanbakken method (M\ = 1;M2 = 2,M, = l;N\ = 2;N 2 =3 , N, = 3)
_12 .-
l' ;
0.8
1:
~ 0 .6
~
1
04
Figure 2.7 Relative error in determination of the average power as function of the number of samples W and A, for the Zu-Liang compensation (M\ = l;M, = 2,M, = l;N\ = 2;N 2 = 3,N , =3) The derived analytical expression defines the potential truncation error in processing of complex ac signal in cases when asynchronous sampling is used to determine the average value (active power or rms value), for each of the analyzed four processing methods. Based on the known amplitudes of the harmonic, interharmonic and subharmonic components, in the most general case, the use of the derived relations makes it possible to determine a numeric size of the error. The error limit is a function of the number of samples used for processing the observed signal and with a suitable selection of the processing parameters (the necessary number of samples Wand the and dimensionless quantity ~) ; it is possible to hold the error limit within acceptable boundaries.
82
References [1]. A. Testa, and R. Langella, "Power system subharmonics," in IEEE Power Society General Meeting, pp.1922-1927,2005. [2]. P. Petrovic, S. Marjanovic, and M. Stevanovic, "New algorithm for measuring 50/60 Hz AC values based on the usage of slow AID converters," IEEE Trans. Instrum. Meas., vol.49, no.1, pp. 166-171, 2000. [3]. P. Petrovic, S. Marjanovic, and M. Stevanovic, "Measuring of slowly changing AC signals without sample and hold circuit," IEEE Trans. Instrum. Meas., vol. 49, no. 6, pp. 1245-1248,2000. [4]. P. Petrovic, "New digital multimeter for accurate measurement of synchronously sampled AC signals," IEEE Trans. Instrum. Meas., vol.53, no.3, pp.716-725, 2004. [5]. T.T.Nguyen, "Parametric harmonic analysis," lEE Proc.-Gener. Transm. Distrib., vol. 144, pp.2125, 1997. [6]. G.D.Marques, and P. Verdelho, "A simple slip-power recovery system with a DC voltage intermediate circuit and reduced harmonics on the mains," IEEE Trans. Industr. Electr., vol. 47, pp. 123132,2000. [7]. I. Jacobs, S. Schroder, and R.W. De Doncker, "Shunt hybrid power filter control in power system with interharmonics," in Proc. Power Electronics Congress, pp. 264-269, 2002. [8]. T. Abeyasekera, C.M. Johnson, DJ. Atkinson, and M. Armstrong, "Elimination of subharmonics in direct look-up table (DLT) sine wave reference generators for low-cost microprocessor-controlled inverters," IEEE Trans. Power Electr., vol. 18, pp. 1315-1321,2003. [9]. G.C. Montanari, and L. Peretto, "A model for fluorescent lamp flicker in the presence of voltage distortion," inProc. Harmonics And Quality ofPower, pp. 1206-1210,1998. [10]. Electromagnetic Compatibility (EMC) - Part 2-2, "Environment - compatibility levels for lowfrequency conducted disturbances and signalling in public low-voltage power supply systems," IEC 61000-2-2 Ed. 2.0 b: 2002. [11]. Electromagnetic Compatibility (EMC) - Part 4-30, "Testing and measurement techniques - power quality measurement methods," IEC 61000-4-30 Ed. 1.0 b: 2003. [12]. INTERHARMONICS IN POWER SYSTEMS, IEEE Interharmonic Task Force, Cigre 36.05/ClRED 2 CC02 Voltage Quality Working Group. [13]. T. Lobos, Z. Leonowicz, I. Rezmer, and H-I. Koglin, "Advanced signal processing methods of harmonics and interharmonics estimation," in lEE Proc. Developments in Power System Protection, pp.315-318, 2001. [14]. A. Ben-tal, V. Kirk, and G. Wake, "Banded chaos in power systems', IEEE Trans. Pow. Deliv., vol. 16, pp.105-110, 2001. [15]. Yan Xu, Leon M. Tolbert, Fang Z.Peng, John N. Chiasson, and Jianqing Cheng, "Compensationbased non-active power definition", IEEE Pow. Electr. Lett., vo1.1, pp. 45-50, 2003. [16]. G.N. Stenbakken, "High-accuracy sampling wattmeter", IEEE Trans. Instrum. Meas., vol. 41, no.6, pp.974-978, 1992. [17]. G.N.Stenbakken, "A wideband sampling wattmeter", IEEE Trans. Pow. Appar. Sys., PAS-I03, pp.122-128, 1984. [18]. P. Syam, G. Bandyopadhyay, P.K. Nandi, and A.K. Chattopadhyay, "Simulation and experimental study of interharmonic performance of a cycloconverter-fedsynchronous motor drive," IEEE Trans. Ene. Convers., vol. 19, pp. 325-332,2004. [19]. L. Cohen, "Time-frequency analysis," Prentice-Hall, Englewood Cliffs,1995. [20]. B. Boashash, "Note on the use of the Wigner distribution for time-frequency signal analysis," IEEE Trans. Acoustics, Speech, Signal Processing, vol. 36, pp. 1518-1521, 1988. [21]. C. W. Therrien, "Discrete random signals and statistical signal processing," Prentice Hall, Englewood Cliffs, New Jersey, 1992. [22]. T. Lobos, T. Kozina, H.-I. Koglin, "Power system harmonics estimation using linear least squares method and SVD," lEE Proc.-Gener. Transm. Distrib., vol. 148, pp. 567- 572, 2001. 83
[23]. P. Petrovic, and Milorad Stevanovic "Measuring of active power of synchronously sampled AC signals in presence of interharmnoics and subharmonics", lEE Proceedings, Electric Power Applications Volume 153, Number 2, pp.227-235, March 2006. [24]. P.Petrovic and M. Stevanovic, "Digital processing of Synchronously Sampled AC Signals in Presence of Interharmonics and Subharmonics", IEEE Trans. Instrum.Meas., vol.56, no.6, pp.2584-2598, 2007. [25]. P. Petrovic, "AC Power Measurements in Presence of Nonharmonic Signal Components" th Proceedings of 13 International Syposium on Power Electronics-EE'2005, Paper No. T4-1.2, pp. 1-5, Serbia and Montenegro, Novi Sad, November 2-4, 2005. [26]. P. Petrovic, "Processing of Synchronously Sampled AC Signals in Presence of Interharmonics and Subharmonics", IEEE International Workshop on Intelligent Signal Processing WISP 2005, Proceedings of WISP 2005, IEEE Catalog Number 05EXI039C, ISBN: 0-7803-9031-8, University of Algarve, Faro, Portugal, 1-3 September 2005. [27]. Nyarko, DJ., Strsmoe K.A., "Analysis of truncation errors in asynchronous sampling of periodic signals", 1992, Canadian Conference on Electrical and Computer Engineering, vol.2, pp.1117-1120. [28]. Clarke, F.JJ., Stockton, lR.:"Principles and theory of wattmeters operating on the basis of regularly spaced sample pairs", J. Phys. E., vol. 15, pp. 645-652, 1982. [29]. Lu Zu-Liang:"An error estimate for quasi-integer-period sampling and an approach for improving its accuracy", IEEE Trans Instrum. Measum., vol. 37, no. 3, pp.141-150, 1988. [30]. lM.Dias Pereira, A.Cruz Serra, P.Silva Girao, "Minimising Truncation Error in Digital Wattmeters", Proceedings of the 9th International Symposium on Electrical Instruments in Industry, pp. 113-116 [31]. P. Petrovic, "Calculation of Measurement Uncertainties in Case of Asynchronous Sampling of Complex AC Signals", Proceedings of 12MCT 2008, International Instrumentation and Measurement Technology Conference, IEEE Catalog number 08CH37941C, ISBN: 1-4244-1541-1, ISSN: 1091-5281, pp.1701-1706, Victoria, Vancouver Island, Canada, 12-15 May 2008.
Appendix A The first member in the equation (2.6) is (for c=O, At=T/A!):
Mp;
= t[Vl +JiVR~k, sin(rai~t+'I',)].[Il +JiIR~I, sin(saiM +¢,)] = N1
M
M1
M
s=1
j=1
r=1
j=1
=~I[ + J2V[I R Lis Lsin(sai~t + ¢s )+J2VRI[ LkrLsin(rai~t + lfIr)+ M 1 N1
M
r=1 s=1
j=1
+2VRIR LLk,/s Lsin(rai~t+ lfIr )sin(sai~t + ¢s) M M M L sin(sai~t + rPs )= cosrPs L sin(sai~t )+ sin rPs L cos(sai~t ) j=1
j=1
(2.93)
j=1
MM..
. M-l
.'
. esmiMM_ 1
L[cos(sai~t)+isin(sai~t)]= L(eSMi!!Jy =eSMIM. L(eSaNMy =esMi!!J. smiM j=1
j=!
e
j=O
M
M
M
M
j=!
j=1
j=1
j=!
=0
-1
=> Lsin(sai~t) = 0; L cos(sai~t) = 0 => Lsin(sai~t + rPs) = 0 => Lsin(raJ~t + lfIr) = 0;
r isnatural number From which we conclude that:
84
(2.94)
Mp; = MVII I + MVRIRtkqlqcos('I'q -¢q)=> q=:1
t kqlq
p; =VIII + VRIR
('I' q- ¢q)=> p; =PI
COS
q=1
The second member of (2.6) has the following form:
Mp; = ~ .J2V
R%k;
M2
M
r=1
j=1
sin (A,mjM + '1'; ).[11 + .J2IR~ls sin(smjM + M2 N1
¢J]
=
M
=-fiVRI1 Lk~ Lsin(A~mj~t + If/~)+ 2VRIRLLk~lsLsin(A~mj~t + If/~ )sin(smj~t + fA) r=1 s=1
j=1
M
M
M
j=1
j=1
j=1
(2.95)
L sin(A~mj~t +lfI ~) = sin If/ ~ L cos(A~mj~t )+ cos If/ ~ L sin(A~mj~t ) = 0 because A~OJiMD.t L (V eA~OJiD.t J = eA~OJiD.t e ' . M
eArOJlD.t
j=1
1
=0
-1
which yields that : Mp;
=VRIR~~>;(t {cos[(s - A, ~~t + ¢s -If/;]- cos[(s + A, }»jM + rPs + If/; n= 0 => r=1 s=1
j=1
p; =0
p;
p:
(2.96)
p;
Analogous to the above, we conclude that = 0; = 0; =0 For the following element of the equation (2.6) the conclusionis that:
~~ " I fk.JftCOSrAr ~(, - f..ls,)'iOJ~t+lf/r'-fA ,] ~( "n MP6* = 2VRI RLLk,/s'-cosr Ar + f..ls 'iOJ~t+lf/r +¢sJf= r=1 s=1 2 j=1 I
=
,)
VRIRr~>;d~:coS[(A, - Jl;)jmM+'I'; -¢;]= MVRIRI(( cos('I'; -¢;,)=> r=1 s==1
j=1
(2.97)
r=1
P: =VRIR}»;,cos('I';
-¢;,)=> P: = P6
r=1
p;
p;
Since already explained above that: = 0; = O. for the last member in the equation (2.6), we conclude that:
Mp; =2VRI
Rrl:((·.!.
2
r=1 s=1
~N3
M
r==1 s=1
j=1
f~os[~; -A;)jmM+¢; -'I':]-cos[~; +A;)jmM+¢; +'1':»= j=1
~
=VRIRLLk;I;LcOSL(f..l; -j,~)jm~t+¢;' -If/;
Q3
]
=
MVRIRL-k;l;r cos(¢;~ -If/;)=>
(2.98)
r=1
p; = VRIRIk);, cos(¢;, -'I':)=> p; = P9 r=1
This brings about the followingconclusion: p' = p
¢:>
~ Jv;(t)i;(t)dt = l..-
i>; (jM)i; (jM)
T o M j=1 T for ~t = M; T = lcdl;Tha,man;cs , Tin! erharmonics, Tsubharmonics ) 85
(2.99)
3. RECONSTRUCTION OF NONUNIFORMLY SAMPLED AC SIGNALS The reconstruction of trigonometric polynomials, a specific class of band limited signals, such as ac signals, from a number of integrated values of input signals is in the focus of this chapter of our monograph. It is widely applied in signal reconstruction, spectral estimation, system identification, as well as in other important signal processing problems. We are proposing a practical and new algorithm for signal reconstruction and discussing potential applications to recover band-limited signals in the form of Fourier series (with known frequency spectrum but unknown amplitudes and phases) from irregularly spaced sets of integrated values of processed signals. Based on the value of the integer of the original input (analogue) signal, a reconstruction of its basic parameters is performed by the means of derived analytical and summarized expressions. In this way, we create a possibility to conduct a subsequent calculation of all the relevant indicators related to the monitoring and processing of ac voltage and current signals. Computer simulation demonstrating the accuracy of these algorithms and potential hardware realization is also presented. The chapter investigates the errors related to the signal reconstruction, and provides an error bound around the reconstructed time domain waveform. In signal processing, reconstruction usually means determination of an original continuous signal from a sequence of equally spaced samples. The samples are measured by using a quantizer, i.e. ADC. It is a well-known fact that any real signal which is transmitted along a channel-like form will have a finite bandwidth. As the result, the spectrum of the received signal cannot contain any frequencies above a maximum value, fmax=Mf if is the fundamental frequency). Consequently, M frequencies provide a specification of everything we know about the signal spectrum in terms of a d.c. level plus the amplitudes and phases of just- i.e. all the information we have about the spectrum can be specified by 2M + 1 numbers. Any transmission of a signal will always presuppose the loss of information when it is sampled in the receiver. The same will occur with the processing of an analogue signal into digital circuits due to its sampling in an analogue to digital (AD) converter. We get jitter errors, sometimes we even lose data, which results in a larger sampling gap, and, of course, we get noise. Therefore it is a demanding task to reconstruct the original signal from its sampling values, and the applied uniform sampling and reconstruction methods will not ensure proper results. The available data are frequently insufficient to achieve a high resolution reconstruction. This is especially important for the problems occurring during the conversion of the observed signals, due to the non-ideal nature of the AD converter used here, as well as the transducer and other devices used in the process [1]. Therefore, many attempts have been made in respect of the application of sampling techniques supported by optimal methods of reconstruction of band-limited signals in the form of a Fourier series (trigonometric polynomials). Reference [2] describes a new technique for the reconstruction of a bandlimited signal from its periodic nonuniform samples. Using a model for the nonuniform sampling process, the reconstruction was viewed in terms of a perfect reconstruction multirate filter bank problem. The [3] considers sampling of continuous-time periodic bandlimited signals which contain additive shot noise. By modeling the shot noise as a stream of Dirac pulses, [3] shows that the sum of a bandlimited signal with a stream of Dirac pulses falls into the class of signals that contain a finite rate of innovation, that is, a finite number of degrees of freedom. Reference [4] introduces two new algorithms for perfect reconstruction of a periodic bandlimited signal from its nonuniform samples. The reconstruction can be obtained by using the Lagrange interpolation formula for trigonometric polynomials, and when the number of sampling points N is odd and it satisfies N 2 2M + 1, Lagrange interpolation for exponential polynomials results in a complex valued interpolation function. An iterative frame algorithm for the reconstruction of bandlimited signals from local averages with symmetric averaging function is described in [5]. This paper gives bounds estimates on the aliasing error when a direct frame reconstruction is used for the reconstruction of non-band-limited signals. In this chapter, the application of integrative sampling for periodic-signal reconstruction is analyzed. The reason for this approach is in the fact that sampling consists of a sample and hold (or track and hold) circuit followed by conversion to digital equivalent, and is implemented using an AD converter. In [6], attention is paid to the possibility of the elimination of a separate sample and hold circuit, which, in itself, 86
is an original approach. This paper provides the platform for the development of an entirely new algorithm for processing slow-changing ac signals. The described procedure (integration) is used to process the original input analogue signal, which can be (as it almost always occurs in practice) modified by the presence of noise, as this noise is also processed. The proposed method has one important advantage resulting from the integrative sampling - the input random and periodic disturbance are filtered. The algorithm in which the reconstruction of the signal is done through a system of linear equations is explained in detail in [7]. This kind of approach to the processing was also considered in [8] and [9], along with the problem of subsequent reconstruction of the processed signals. In [8] and [9], the standard matrix inversion is used as the method of reconstruction, which requires very intensive numerical calculation. In [10], it was noticed that the ac signal integration method produces a regular matrix form in the derived system of equations. Based on this, an assumption was made that a full analytical solution can be reached, which was pointed out in [10], and has been realized in this chapter. If the integrative samples were assumed to be measured without errors, the presented algorithm without any further modifications can be used for signal reconstruction of periodic band-limited signals, which occurs in simulation. In a real environment and when the measuring is performed in practice, the integrative samples are measured with error. This happens as a result of the error ,caused by the imprecision introduced by the voltage and current transducers used to adapt the measured signals to the measuring system - the error of conversion, generated by errors occurring during the processing of the analogue signal through various digital circuits, as well as during determining the digital equivalent, etc. The sampled values obtained in practice may not be the exact values of the signal at sampling points, but only averages of the signal near these points [5]. In this case, the suggested algorithm must be modified, in order to be able to determine the best signal estimate, according to the criterion assumed, as in [5], [9] or [11]. We are proposing an efficient implementation of the algorithm for signal reconstruction that yields a significant improvement in computational efficiency over the standard matrix implementation. The approach is based on the use of the values obtained as a result of the integral-processing of the continuous input signal, in precisely defined time periods; this kind of integral-processing was performed as many times as needed to enable the reconstruction of the multi-harmonic signal that is the subject of the processing operation. Its main advantage is the possibility to increase the time of measurement without using sample and hold circuits. The presented method is designed for very accurate RMS measurements of periodic signals, and can be applied for precise measuring of other important quantities such as power and energy.
Table 3.1 The nomenclature used in the following parts of the chapter Meaning
Symbol
f s(t) M ADC
fundamental frequency of processing signal bandlimited input analogue signal the number of signal spectrum ac (harmonic) analogue to digital converter
Qo
the average value of the input signal
Qk
the amplitude of the kth harmonic
k If/k
the number of the harmonic the phase angle of the kth harmonic
87
3. 2. Proposed Method of Processing Let us assume that the input signal of the fundamental frequency f is band limited to the first M harmonic components. This form of continuous signal with a complex harmonic content can be represented as a sum of the Fourier components as follows: M
(3.1)
s(t) = ao + La k sin(k2Jift+V!k) k=l
Integrating the signal (3.1) (similar to equations (7) [6]), and by forming a system of equations of the same form, in order to determine the 2M+ 1 unknowns (amplitudes and phases of the M harmonic as well as the average value of the signal), we get: M
x(t,}= ?[ao+ fak sin(k2JifT + r, )JdT = ao~t __ 1 ~[COS(k2if(tl + ~t) + 'Ilk) - COS(k2 if(tl At k=l 2if k=1 k 2
f
t'-2
=
~t) + 'lfk)] = 2
(3.2)
f
ao~t + ~ ~sin(2k1ift1 + 'l/k )sin(kif~t) if k=l k
where I
=
1,2,...,
2M+!. The time interval (tl+ ~t)_(tl_ ~t)=MiS an interval within which the
integration of the input analogue signal is done. The moment t, - tJ.t is defined as the initial moment,
2
from which the integration process begins. This moment must be shifted with any subsequent integration of the input signal. The x(tJ value represents the value of the integral and is measured according to any reference value used in the process of conversion, i.e. in the work of the circuit with which the integration is performed. The obtained relation can be represented in a short form as: M
AO,lGo + LAk,lGk(sina..
COSlf/k
+cosak,l Sinlf/k)=Bl
(3.3)
k=l
where:
I
sin [kifM] = Ak,i'
2k1iftl
(k = 1,2'00" M X(I = 1,2,...,2M + 1)
= ak,l; ;if~t = Ao,l;
(3.4)
1ifx(tl ) = B,
Variables Ao,l, Ak,l and ak,l are the result of integration of the signal in the real device as defined by the equation (3.1). When processing is based on a dual-slope ADC, as it was done in [6], the values of the parameters defined by the relation (3.3) adopt the form given in Appendix B. We can define the integration interval as:
(tl+ ~ )-(tl- ~) = M= const., for every I ~ (tl+ ~)+(tl- ~t)=2tl
(3.5)
Ao,I = iftJ.t = Ao and Ak ,I = ~ k sin (kiftJ.t ) = Ak
t, = tl _ 1 + tJ.t + t delay where tdelay is the delay in processing. The value of tJ.t=const. (constant) in the above relation (3.5) is arbitrary. The system determinant for the system of 2M+ 1 (unknown parameters) can be represented as:
88
~sin~,1
Azsin~,1
...
AMsinaM,1
~CO~,1
AzCO~,1
...
AMcosaM,1
~Sinal,2
Azsina2,2
... AMsinaM,2
~CO~,2
AzCO~,2
...
AMcosaM,2
~Sin~,2M+1
Az Sina2,2M+1
~CO~,2M+!
AzCOsa2,2M+i
...
AM COsaM,2M+!
X system =
(3.6)
=(~·Az
...
AM SinaM,2M+l
·... ·AM_1.AM)~M+!
where:
X ZM+1 =
sin ce.,
sinaz,1
sinaM,1
cosal,1
cosaz,1
cosaM,1
sinal,z
sinaz,z
sinaM,z
cosal,z
cosaz,z
cosaM,z
sinal,ZM+l
sinaZ,ZM+l
sinaM,ZM+I
cosaJ,ZM+1
cosaZ,ZM+1
cosaM,ZM+J
cosZzz, cosZzz,
cosMa z
sinal sin zz,
sin2a l
sin Mal
cos«,
sin Zcr,
sinMa z
cosrz,
cos Ma,
(3.7)
sin a ZM+J sin 2a ZM+I ... sin Ma ZM+J cos a ZM+J cos 2a ZM+J ... cos Ma ZM+I Here is:
a k,t
= kat = Zknft,
(3.8)
The form of the obtained determinant (3.7) was the object of study in [9], but this was only the first step for the estimation of Fourier coefficients which are estimated from integrative samples and subsequently, in the second step, the estimators were corrected using the method of least squares and precision measurement of rectified-signal average. In this chapter, we derived analytical and summarized expressions for solving system equations (3.3).
3.2.1 The Determinants ofthe Van der Monde Matrix Let us consider the Van der Monde determinant [12] of the M order:
11 M = w(XpXZ'''''X M) =
M-I XJZ xJ Z M-J XZ ... Xz
XI 1 Xz
2 XM x M
where xi,
X2, ... , XM Xz
M-I Xz
XM
Z XM
XM
SJ,M'
Xk E C
(3.9)
k=J
(X2X3"~M j:
Xz
M-Z Xz
XM
M-Z XM
=(x ZX 3, ,,X M )SZ,M =
=
-
= (X ZX3• .. X M)
IT ft~j -xk)=
j=k+1
are arbitrary variables. If the following symbol is introduced for the co-determinant:
Z XZ
~(M)_ II
M-\ XM
=
M-l
(3.10)
IT fi(x
j -Xk)
j=k+1k=Z
We can obtain the subsequent equations for the next co-determinants (see Appendix C for reference): (3.11) where: (3.12)
89
(3.13) where: 1 1 1 1 1 L(X2X3",1XM )2 =X2-1X3+ -X21+ " . + - - + - + - + ...+--+ ... + - X4 X2XM X3X4 X3XS X3XM XM-IXM
(3.14)
(thesumof all inverted double products of different indices). (3.15) (thesumof all inverted triple products of different indices).
s;(M) -_ (-1 )k+l S2,M (X2X3···XM )~ LJ (
1
(3.16)
)
X 2X3",XM k-l
Here k cantake anyvaluefrom 4 to M-l. (3.17) An analogous procedure can be conducted in order to finda solution to the determinants that have the form of ~\~) , where I takes thevalues from the set2 ~ I ~ 2M + 1.
3.2.2 Reconstruction ofBand Limited Signals in Form ofFourier Series In the case of the system of equations formed according to the suggested concept of processing of the input signals (equation (3.3)), instead of the x variables in the above expressions, it is necessary to take in the trigonometric values foral,az,a3, ...,azM+I' as it was defined in (3.8). The given determinant (equation (3.7)) canbe transformed in the following manner (by using Euler's formulas):
=
2~M e-Mfill e'" _ e- a 1i
= ~e-Mfill
eali _ e-ali
e
2a1i
_ e-
2a1i
e2ali _ e-2ali
•••
e
_
«":'
e
ali
+ e?"
•••
eMa\i _
«":'
eali
e2ali
Ma l i
22M
= (-I) e-Mfill
e-ali
e-2ali
•••
e-Mali
eali
e2a1i
•••
e
2a l i
.,.
+ e- 2a 1i
'"
eMa\i
+ e-Ma1il
e2ali +e-2a 1i
eMali
e2a2i +e- 2a 2i
eMa2i
+ e- Ma l i + e- Ma 2i
=
eMalil =
eMalil =
22M
(((M-I)
_ -I
2
-~
" e-M"2i\e-Mali
e-(M-I)a li
'"
e-a1i
e"
I
e2ali
'"
eMalil =
M(M-I)
= (-I)
2
e-Mfie-M(al +....+a2M+1 )ill
ea1i
e2ali
•••
e(M-I)ali
eMali
e(M+I)ali
•• ,
e2Malii =
22M M(M-I) -M'!.-i 2M+' 2M ( ) ( - 1)- 2 = - 2 - M- e 2 e-M(a'+ ....+a2M+tliIlIl\eaji _e a k i = 2
=
j=k+1 k=1
(_I(~+I)iM
e-M(al+ ...+a2M+tliTIf.r(eaj:aki2isin a j - a k J =
2
2
j=k+1 k=1
)M(~+I).M 2M(2M+I) 2,\1(2M+I) ( =_1_ _ ' e-M(al+ ....+ a2M+I)ieM(al+ ... +a2M+I~2 2 i 2 _
2M+1 2M
a. -
a k
JIlIlsin-
M
2
X
+ = (_I((~+I) 2 2M 2
2M 1
TITI sin j=k+lk=1
j=k+1 k=1
a,; -
~
(3.18)
2
a k
2
Theco-determinants that are necessary to reach the solution of thegiven system of equations (3.5) are: 90
XZM+I,I
BI Bz
sinal sinzr,
BZM +I
sina ZM +I
=
Bz
=
cosMal cosMa z
cos Zc,
cosal cosc,
cos2a z
(3.19)
sin 2a ZM +I ... sin Ma ZM +I cosa ZM +1 cos2a ZM +1 ... cosMa ZM +1
sinZe, sin2a z
BI XZM+I,Z
sin Mal sinMa z
sin Z«, sin Zc,
sin Mal
cos e,
cos2a l
cos Mal
sinMa z
cos«,
cos2a z
cosMa z
(3.20) BZM +I
sin2a ZM +I
...
cosa ZM +1 cos2a ZM +1 ... cos Ma zM +I
sin Ma ZM +I
and so on. The above given co-determinantsbased on the following development can be written as: (3.21) X~ ,X~ ,..., X~M+l are the cofactors, obtained from cofactor X2M+I,1 after the corresponding row as well as the first column has been eliminated. The second cofactor is derived from the expansion of X 2M+1 along such a column. For this purpose, we must determine x; as cofactors of X 2M+ I. After the intensive mathematical calculation (Appendix D) we obtain:
«
la
ZM ZrrM+lrr . -ak S 1 n2 --l + ...+a -I +a +1 + ...+aZ M+I ) M(M+I) p P M(M-I) Z x' = (-l)p+q (-l)-z- 2 j=k+1 k=1 . ~ cos 2 P ZM+I a p-a .t..J -k sin-(a l + ...+a p_1+a p+1+ ...+aZM+JM k=1 2
rr
(3.22)
ke p
(the summing is done by all of the M's of the set For 2~q~M +1: M(M+I) X q = (_1)p+q(_1)-z-2 ZM(M-I)+1 p
ZM . 1 n-ak ZrrM+lrr S ---
«
j=k+1 k=1
2
ZM+I
a - a sin - P__ k 2 l:5:k*p
rr
{al'az, ...,aZM+J).
1
.~sin
z:
a
l
)
+ ...+a p_1+a p+1+ ...+a ZM+I
2
(
)
(3.23)
- a l + ...+a p-I +a p+1 + ...+a ZM+I M+q-I
q = M +r+ll\l::;; r::;; M-l ZM+I ZM a.-a J sin - 2_k M(M-I) . Z M(M-I)+1 X" = (_1)-z-2 J=k+1 k=1 ~ cos P ZM+I a -a.t..J sin - P__ k 2 l:5:bp
ITIT
rr
q=2M+l
rrrr
ZM+I ZM
X" = (_I)M(~-I) 2 ZM(M-I)+1 j=k+1 p
k=1
ja -
l
+ ...+a p-I +a p+1 + ...+aZM+I
)
2 ( ) a l + ...+a p -I +a P +1 + ...+a ZM+ 1 M-r
(3.24)
a-a
sin _j_k 2 cos a l + ...+a p_ 1+a p+1+ ...+aZM+I
ZM+I a -a rrsin-P__ k l:5:k*p 2
2
Based on (analytical) relation derived in this way the unknown parameters of the signal (amplitude, phase), can be determined through a simple division of the expression that represents a solution of the adequate co-determinants with the expression that represents an analytical solution to the system determinant: X2M+I,M+k+l
If/k = arctg - - - X 2M +1,k+ l
k
(3.25)
~ X 22M +1,k + l + X 22M +1,M +k+l
1 «; = A X 2M+l
91
The analyzed determinants and co-determinants of the system (3.3) were used only as the starting function (of the polynomial form), to the purpose of obtaining explicit and summarized analytical expressions which can be used further on to perform the calculation of the unknown signal parameters. It is a fact that the obtained system of equations (3.3) can be described, after the processing, by a special form of the determinant (which is summarized as the Van der Monde's determinant). This fact enables factoring and application of transformations that can be applied only on determinants. Any other procedure would lead to a much more complex calculation and to relations that are mathematically much more demanding. Owing to this, any subsequent calculation conduct towards reconstructing a periodic signal will not be related either to determinants themselves or to the procedures that are typically used in their solving. The obtained result clearly suggests that it is not necessary to use the standard procedure for solving the system of equations, as suggested in [8] and [9]. This procedure in the case of an extremely complex spectral content of a signal would require a powerful processor and enough time for processing. The derived expression, which is practically on-line for the known frequency spectrum of input signals, ensures determining all unknown parameters (amplitudes and phases). The proposed algorithm for signal reconstruction is presented in the form of a flow-chart in the text below. For the proposed algorithm, the order of the highest M harmonic component in the processed signal spectrum is required to be either known or adopted in advance, accepting that an M determined in this manner is higher than the expected (real) value. For the estimation of the frequency spectrum one of wellknown methods can be used. In [13], two accurate frequency estimation algorithms for multiple real sinusoids in white noise based on the linear prediction approach have been developed. The first algorithm minimizes the weighted least squares (WLS) cost function subject to a generalized unit-norm constraint. Similarly, the second method is a WLS estimator with a monic constraint. Both algorithms give very close frequency estimates whose accuracies attain Cramer-Rao lower bound for white Gaussian noise. A modified parameter estimator based on a magnitude phase-locked loop principle was proposed in [14]. It showed that the modified algorithm provided tracking improvements for situations in which the fundamental component of the signal became small, or disappeared for certain periods of time. In order to recalculate unknown parameters (amplitude and phase) of the processed periodic signals, it is necessary to have the results of the integration of the input analogue signals Bi; (equation (3.3) and (3.4)) obtained by means of integration in a precisely defined time interval of the signal that is the object of the reconstruction. The moment II -
~I , from 2
which the integration process begins, is referred to in
relation to the detected zero-crossing of the input analogue signal. It is possible here to equal t1 -
~I
with 2 o (the moment from which the integration process begins in the first passage). Since any subsequent integration begins immediately after the previous one, the total integration time in every passing is practically determined witht int .,! = f1t + t de/ay ' According to the suggested algorithm, the frequency of the carrier signal is recalculated in every passage, in a manner that takes into consideration a possible change, introducing it in the process of recalculating the new integration interval for the input analogue signal, the new variables Ao, Ak , az and the value of the input analogue signals integral Bi. Thus we reduce the possibility of error in the reconstruction process that occurred as a result of the variation in the frequency of the processed signal. The value f:J.t = canst. =
(1
f2M+l
) is to be taken as the constant value in order to
make the proposed method possible. By choosing its value in this manner the integration process can comprise the whole period of the complex input signal. Thus the processing will comprise all the possible changes to the processed signal at its period. Similarly, the error in calculation of the variable Ak becomes smaller. The procedure described in [7] can be used in order to have precise measuring of the period of the carrier signal. The proposed procedure depends on the harmonic frequency f since all of the relevant parameters calculated in the proposed algorithm depend onf However, the problem of synchronization is much less expressed than with the standard techniques of synchronized sampling, since this is a case of a real reconstruction of a signal, i.e. determining its basic parameters (phase and amplitude). 92
As an error occurs when determining the integrative samples BI, and variables Ao, Ak and ai; which is caused by their dependence on the carrier frequency f of the processed signal (Fig. 1-5), in the practical applications of the proposed algorithm we need to provide the best estimate of the given values, according to the criterion assumed. This can be done by the means of recalculation of the values BI, Ao, Ak and ai, through N passages (N is arbitrary). In this process, we form series Bnl, Ano, Ank, and ani (n=I, ...,N), as is given in the proposed algorithm. Random errors tJ,.n of measurements are unbiased, E(tJ,.n)=O have the same variance var(tJ,.n)=d, and are not correlated. Under these assumptions, the least squares (LS) estimator minimizes the residual sum of squares [15]: N
N
2
S(SI)= L>n(SI-Bnlf;S(~)= L>n(~-Ano) ; n=1
S( A
k )
n=1
N
= ~>n (Ak n=1
2
-
(3.26)
N
A ;S(Ill) = L>n (Ill -anl nk )
)2
n=1
where Pn = k / (J'2 ,k >- 0 (k is arbitrary). By minimizing the function S, we obtain the LS estimators
B,,~,Ak,al of the values BI, Ao, Ak and al as:
(3.27) n=1
n=1
n=1
n=1
The value of N will depend on the required speed of processing - the higher the N, the more precise the estimation of the value. Specifically, the LS method has been applied to a variety of problems in the real engineering field due to its low computational complexity. In this particular case, the estimation procedure does not require the matrix inversion and is considerably less demanding from the processor aspect than the methods described in [16] and [8]. In addition, when the proposed algorithm is used in simulations, the estimation of the given variables (3.27) is not necessary, which significantly reduces the processing time needed for its realization. It is important to notice that the values of the determinants and co-determinants (equations (3.7) and (3.21)) are governed by the measured frequency of the fundamental harmonic of the processed signal, as well as by the adopted constant and the value of the initial moment t1 - tJ,.t from which the integration 2 process begins. This is due to the fact that the calculation of the values of the determinant elements is based on coefficient ai, according to equation (3.8). The computational load of the iterative step involving FFTs does not change with the number of sampling values for some of the non-matrix implementation, but the speed of convergence is improved if a greater number of points are available [17]. A larger number of sampling points will result in the appearance of large matrices; the same occurs in the case of a large-spectrum input signal. Therefore the computational load for standard matrix methods (either iterative or those using pseudo-inverse matrices) increases quickly. Thus they may be extremely effective in situations with few sampling points, but fairly slow if there are many sampling points. Quite contrary effects are observed with the matrix methods proposed here. In the suggested algorithm, the determination of the inversion matrix is not required - a fact that makes it much faster and have a much better convergence than other matrix-based methods. Inverting the Van der Monde matrix requires calculating very high powers of the coefficients, which is always a problem with single precision or even double precision calculations. Apart from this, the suggested algorithm is non-iterative and therefore much faster. This is the key reason for our view that the analytical solution that we derived is more computationally attractive for moderately sized problems. Moreover, this feature makes it feasible for large reconstruction problems. 93
(
START
Frequency spectrum estimation of specified input signal (volatge/ current) derived by one of known technique s [12] and [13] 'f Defined value of M-the number of signal spectrum ac (harmonic ) component s
, ,
for n=! to N A special circuit detects the zero-crossing of the processing signal using comparator described in [6].
,
,
Integration time (const.) is defined as: M =
canst. =
rt:
I
I)
2M +!
AnO= :r -f -til
,
,
~
I
for k=1 to M Ank = .!.sin(k;iftil) k
¢> ~
for/ =! t02M+1 'J
if I = 1then I I II
~ = O;a. 1 = Lnft, else
= 11_ 1 + LlI
.,
ani = 2:rft l
As a result of integration of input analogue signal in a defined time interval we obtain the value Bnl
~
,---.j
for I=! to 2M+I and for k=! to M LPnBnl
Lp.A.o
LPnAnk
LPna nl
~>n n.
~>n
LPn n.
LPn
B =~; Ao = ~; A* = ~ ; al = ~ J
n=
¢>
.
Determinanti on of all necessary determin ants and co-determinant s based on derived analitical solutions with known coefficients I he unknown parameter s ot the SIgnal (amplitude , phase) cctermmco through a simple dividi on of the adequate co-determinats with the svstem determinat similarv to the well-known Cramer's rule 'f Calculation ofRMS in input signals, active power, energy
yo<$> Continue=? No
(
94
STOP
)
This procedure can also be used for the spectral analysis where it is possible to find out the amplitude and the phase values of the signal harmonic, based on the set (predicted) system of equations. By taking the step-by-step approach in conducting the described procedure, it is possible to establish the exact spectral content and subsequently perform the optimization of the proposed algorithm. With this, the algorithm will be adapted to the real form of the signal.
3.3. Simulation Result and Error Analysis Additional testing of the realized calculations was carried out by simulation in the Matlab program package (version 7.0). In Appendix E, to provide better understanding of the record of derived results the form of solutions of obtained determinants of fifth order (M=2) is given. Table 3.2 presents a comparison of the results obtained through the application of the derived relations for solving the observed system of equations (3.3) {the relations (3.18) and (3.22)-(3.24)), and GEPP algorithm (Gaussian elimination with partial pivoting), offered in the Matlab program package itself (all of the calculations are done in IEEE standard double floating point arithmetic with unit round off u ~ 1.1x 10-16 ) . This represents a practical verification of the proposed algorithm for a case of ideal sampling (without an error in taking the value of the integral sample and determining the frequency of the processed signal). The values in columns separated by commas correspond to the solution for derived relations with different orders (taking that M=7, .f=50 Hz, tFO.OOl s). This means that in the column for x: values 77.3751539; 65.8192372; -96.0730198; 82.9370773; etc. correspond to x: = 77.3751539; x;=65.8192372; X~=-96.0730198; x;=82.9370773, respectively. Table 3.2. Verification of the derived expression for solving a system of equations with which the . 0 fh reconstruction teob served si signal is IS done X~; I
X 2M +1
proposed algorithm
96.2746562
GEPP algorithm
96.2746562
= 1,...,15
77.3751539; 240.7369977; 585.7387744; 1048.6023899; 1601.6571515; 2122.6636989; 2515.8984526; 2655.5007221; 557.8121810; 2190.4815359; 1686.1064501; 1129.5098525; 644.9058063; 279.7307319; 94.0066154 77.3751539; 240.7369977; 585.7387744; 1048.6023899; 1601.6571515; 2122.6636989; 2515.8984526; 2655.5007221; 557.8121810; 2190.4815359; 1686.1064501; 1129.5098525; 644.9058063; 279.7307319; 94.0066154
As it can be seen from Table 3.2, the derived relations produce solutions that are practically identical to the procedure that is most commonly used in solving systems of linear equations. The difference in the obtained values was equal to ixro" . Since the measuring becomes corrupted by noise, the reconstruction is an estimation task, i.e. the reconstructed signal may vary, depending on the actual noise record. The estimated input signal of the measurement system consists of two types of errors: systematic and stochastic ones. In the proposed system for the signal reconstruction, we eliminated a sample-and-hold circuit as a possible source of systematic errors. We investigate the issue of noise and jitter on the measurement method. The occurrence of the noise and jitter causes false detection of signal zero-crossing moments, giving an incorrect calculation of determinants and co-determinants. The error analysis was performed both in the program and as a SIMULINK (Figure 3.7 shows a SIMULINK model of a possible hardware realization used for simulation and uncertainty analysis), closely matching the flow-chart of the proposed algorithm. Figure 3.1 shows the influence of the error in determining the frequency of the carrier signal on the relative error in determining the integration interval and the A o and A k coefficients (equation (3.4)), for various harmonic content of the input periodic signal. 95
Figures 3.2, 3.3, 3.4 and 3.5 show another dependence: the manner in which 1) the relative error in determining the value of the input signal integral and 2) the value of system determinant both depend on the error in determining the frequency of the carrier signal and on the error in determining the initial moment from which the integration process begins, for various harmonic contents of the input periodic signal. The error in determining integration interval is not governed by the harmonic content; similarly, the value of the integral will depend on the chosen moment for the start of the integration and the harmonic content of the input periodic signal. The analyses showed that the starting moment of the integration is best determined in accordance with the zero-crossing of the input signal (t 1 - !J.t = 0). The 2 values of the A oand Ak coefficients prove to be less dependent on the fundamental signal frequencies.
l
0.5 ,----.---r---.----.,--~r_-;:==;====::;:'===.===.=1l
I
inl egrenon interval • Ak , M=5 --- Ak , M=7
-0 .1
-0 .2
·0 .3
L .0.t.2-
-
,-L- -
-0. 15
--,.L.--0 . 1
--:c':-::- -0 .05
----'-0
-
-,--l-::0 .05
-
,-L- 0 .1
----::--'-:- 0.15
--:c'
02
frequ ency deviatio n [Hz}
Figure 3.1 The relative error in determination of integration time and variables Ak as function of error in synchronization with frequency of fundamental harmonic of the input signal
1.5
..... ~
~ i
0.5
~
.~
-0.5
., · 1.5 1
0 .2
96
Figure 3.2 Relative error in integral calculation of inputsignal as function of error in synchronization with frequency of fundamental harmonic of the inputsignal and error in definition of the startingmoment (for M=5)
' 5
~
0 .5
~
t
0
~
~ t
-0.5
., 0.2
Figure 3.3 Relative error in integral calculation of the inputsignalas function of error in synchronization with frequency of fundamental harmonic ofthe inputsignaland error in definition of the startingmoment (for M=7)
97
0.2 0 .15 0. 1
-~
0 .05
.~
-0.05
~
~
-0 .1 -0 . 15
-0.2 1 0 .2
-0.2
Figure 3.4 Relative error in calculation of the system determinant as function of error in synchronization with frequency of fundamental harmonic ofthe input signal and error in definition ofthe starting moment (for M=5)
0 .6
--"!. ,
0 .4
02
S
.~
~
-0.2 -0 .4 1
0.2
Figure 3.5 Relative error in calculation of the system determinant as function of error in synchronization with frequency of fundamental harmonic of the input signal and error in definition of the starting moment (for M=7) The immunity of algorithm could be improved by applying more complex algorithm for the detection of signal zero-crossing moments [7]. Special attention is given to uncertainty analysis for the calibration 98
of high-speed calibration systems in [18]. The effect of the uncertainty created by the time base generator (jitter) can be modeled as non-stationary additive noise. Reference [18] also develops a method to calculate an uncertainty bound around the reconstructed waveform, based on the required confidence level. The error that appears as a result of the supposed non-idealities occurring in the suggested reconstruction model is within the boundaries specified by the [18] and [19]. A sensitivity function is commonly formulated assuming noise-free data. This function provides point-wise information about the reliability of the reconstructed signal before the actual samples of the signal are taken. In [19], the minimum error bound of signal reconstruction is derived assuming noise data. The quantization error is a very important problem because the reconstruction algorithm proposed here is of quite sophisticated form and some operations, like determinant calculation for example, are badly conditioned task and may considerably amplify the quantization errors. However, the error of quantization that appears here is much smaller, due to the described concept of measuring (integration) of the input signal and proposed hardware realization (Figure 3.6).
3.4. Possible Hardware Realization of the Proposed Method of Processing The block diagram of the digital circuit for the realization of the proposed method of processing is shown in Figure 3.6. As shown in Figure 3.6, there is no special circuit for sample-and-hold - the analogue signal is directly taken to the integrating circuit by the means of an analogue multiplexer which practically determines the type of processing. Signals x(t) and xlt) are the input periodic signals that are the object of reconstruction according to the suggested algorithm (e.g. voltage and current signal), after being adapted to the measuring range within which the processing components operate.
SIGN
Counter and control logic
"'"
, --
Figure 3.6 Block scheme ofthe digital circuit for the realization ofthe proposed method of processing Within this precisely defined interval, the counter will count up to the value of a certain content remembered inside the accompanying logic (the DSP that controls the operation of the complete system in figure 6, and within which the proposed processing algorithm is implemented). After this, the counter is reset. The digital equivalent to the calculated value is established by the means of the counter and the reference voltage signal, following the same principle by which this is done inside a dual-slope ADC or sigma-delta ADC. Namely, dependening on the speed of the counter (counter's tact signal) being used, after the integrator performs the re-calculation according to the equation (2), in the second time interval, a numerical equivalent of the calculated integral of the analogue input signal is determined, based on a known reference value. The value determined in this manner is transferred to the controlling processor by the "DATA" lines (Figure 3.6). At the end of the second interval, the comparator placed at the integrator 99
output will identify the moment of completion of the conversion process as the moment in which the total voltage at the integrator output reached the 0 value. In this manner a signal is generated, by which the counter is reset, to form a digital equivalent of the input analogue signal. In the same process, the condenser in the integrating circuit is reset, and the suggested system is ready for a new integration process. Special selection lines control the operation of the analogue multiplexer at the input, which determines the type of the signal (voltage or current) being processed. The proposed solution can be modified for the purpose of reducing the error in determining the integral of the input signal. Owing to this, the proposed algorithm (even without a special addition by which to perform the best estimation of the integrative samples B, of observed signal) can perform a nonideal but feasible signal reconstruction. In [20] it was shown that implementation of sampling and reconstruction with internal antialiasing filtering radically improves performances of digital receivers, enabling reconstruction with much lower error. The B[ value (equation (3) and (4)), represents the value of the integral of the input analogue signal. We should note that the sign of VREF is dependent on the sign of B/, i.e., if B/ is positive, then VREF must be negative, and vice versa. The line "SIGN" (Figure 6) represents the detected polarity of the input signal which enables the polarity of the reference voltage to be chosen via a separate switch. The sign of the expression B[ can be verified by a program check, thereby adjusting the sign of VREF, which can be avoided if the operation is conducted using the absolute values of the operation. In order to verify the effectiveness of the proposed hardware solution, a simulation was performed in the SIMULINK program package (Figure 3.7).
Figure 3.7 SIMULINK model of the proposed hardware realization Figure 3.7 shows the addition of the white Gauss noise, thermal and IIJnoise, and jitter to the complex periodic signal. In the original toolbox, all the possible noise sources (mainly the contributions of the operational amplifiers and of the voltage references) were supposed to be white. The noise power in the block "Band-Limited White Noise" is of the height of the PSD (Power Spectral Density) expressed in V2/Hz. The power of the noise in the digital circuit suggested for the realization of the proposed method of processing (Figure 3.6) was well-described and defined in [21]. Considering that the noise power is additive, the PSD can be considered as the sum of a term due to flicker (1/j) noise and one due to thermal noise, associated to the sampling switches and the intrinsic noise of the operation amplifier. However, in order to have the most precise analysis of the sampling noise and the op-amp' s thermal and flicker noise at low frequencies, these were modeled by separate blocks in Figure 3.7. Here, k, T, and Care Boltzmann's constant, the temperature in Kelvin, and the sampling capacitor, respectively [22]. The Vn denotes the input-referred thermal noise of the op-amp. Flicker (1/j) noise, wide-band thermal noise and 100
2
dc offset contribute to this value. The total noise power V n can be evaluated, through transistor level simulation, and during the simulation it is assumed that Vn=30 JlVRMS, while the value of the sampling capacitance was C=2 pF. The effect of jitter was simulated by using a model separately shown in Figure 3.7, under the assumption that the time jitter is an uncorrelated Gaussian random process having a standard deviation f!,. t. This model of the jitter was described and analyzed in detail in [23] and [24], where it was shown that the noise floor is dependent on the input sinusoidal frequency. During the simulation, the value of jitter was Ins (standard deviation f!,. i) [22], [25]. The parameters of the input signal correspond to the values given in Table 3.3. In the course of the simulation conducted in this manner, the signal-to-noise distortion ratio (SNDR) ranged between 56 dB and 96 dB. By using the simple Relay block shown in Figure 3.7, the frequency of the fundamental harmonic was measured in the signal formed in this manner, which produced a series of samples to be used as input data for "S-Function Builder". Inside it, and based on the proposed algorithm the integration interval is defined, which practically generated the signal action (enable signal) in the block "If Action Subsystem". This (enable signal) action determines time interval in which integration of the input signal was done. After the values of the input signals integrals were determined through the above procedure, these were introduced in the "S-Function" block, so that the values of the unknown amplitudes and phases of the input periodic signal can be established, named on the derived relations. The simulation results for signal reconstruction are shown in Table 3.3. In the simulation, a signal containing the first 7 harmonics was used (with the fundamental frequency of 50Hz). Table 3.3 defines the amplitude and phase values of the signal. In order to achieve a realistic simulation, it is necessary to scale the given values of the amplitudes of the harmonic components, by adjusting then to the working range of the proposed digital circuit (figure 6), in the way it was done in [7]. The superposed white noise and jitter will, in simulation performed in this manner, cause an error in detection on fundamental frequency of 0.022%. We can observe that the accuracy of the proposed algorithm is very promising and results are better then presented in [26]. The error in the amplitude and phase detection are mainly due to the error in measuring of the integrative samples and the error in determination of the necessary determinants and co-determinants needed for the solution of the obtained set of equations. Table 3.3 Simulation results of signal reconstruction by the proposed algorithm Harmonic number
Amplitude
1 2 3 4 5 6 7
311 280 248 217 186 155 155
Phase [rad] 1t 'Tt/3
0 1t/6 1t/4 1t/12 0
Proposed reconstruction algorithm Amp.error [%] 0.016 0.026 0.023 0.025 0.023 0.025 0.017
Phase error r%1 0.017 0.021 0.025 0.024 0.026 0.023 0.021
The suggested algorithm can be applied in operation with sigma-delta ADC, thus enabling high resolution and speed in processing of input signals. This is an important difference to be taken into consideration when comparing its implementation in this approach to the processing, to the results presented in [6] and [7]. This practically enables the reconstruction to be performed on-line, thus enabling high resolution and speed in processing of input analogue signals. To realize the circuit with which the integration is done, it is possible to use a separate circuit of the integrator (with the addition of a resetting option, so as to annihilate the impact that the time constant has upon the precision in the process of integrating the value of the input analogue signal; this in fact is performed internally in a dual-slope and sigma-delta ADC). Subsequent to this, the counter will form a digital equivalent to an integral obtained in this manner. Based on this, it can be assumed that the circuit can be realized in a very simple manner, as anIC. 101
The speed of the proposed algorithm makes it nearly as fast as the recently proposed algorithms [27], [28]. A computer with CPU 2.4 G, 256Mb memory, and Windows XP 2002 operating system was used for the verification of the real-time characteristic of the proposed algorithm. The time required for the performance of the necessary number of the integrations of the input signal that is the object of reconstruction is defined as (2M + 1Xlit + t delay). It is directly dependent on the working tact of the system, and can be practically limited to the period of the processed signal, which represents the value approximate to the time needed for the reconstruction (in simulation). In practical applications of the proposed algorithm, the determined time for the reconstruction of the processing signal ought to be increased by the time testimation; necessary to estimate the variables EI, A o, Al and al. This time is directly governed by the value N, although it can be limited to the interval of 1 second. The time interval tdelay is directly governed by the speed at which the condenser in the integrator circuit in Fig. 6 reaches the value of O. It also depends on the speed of the switches and the analog multiplexer. This time can be reduced, in accordance with the processing principles used in sigma-delta ADC. All calculations were done by floating point arithmetic, thus eliminating any software uncertainty contributions to the measuring method. Reference [29] gives a measurement of the required processor time, in the realization of the matrix method in the reconstruction of signals, in the form in which it is implemented in many program packages. The method suggested by the authors neither requires any special memorization of the transformation matrix, the way it happens in [29], nor does it require recalculation of the inversion matrix. Thus, it is much more efficient in implementation, and it is not limited only to sparse matrices. In addition to this, the proposed solution becomes easier for hardware realization, while the proposed algorithm can be practically implemented on any platform. The accuracy of signal reconstruction can be guaranteed in practical applications in noisy environments with the use of a powerful processor with adequate filtering. The realized algorithm is a promising approach for determining the signal reconstruction and for highly accurate measuring of periodic signals [30-31]. The implementations we propose make this algorithm significantly more computationally attractive for moderately sized problems, and even make it feasible for large-reconstruction problems. It is based on integrative sampling of input analogue signals. The derived analytical expression opens a possibility to perform on-line calculations of the basic parameters of signals (the phase and the amplitude), while all the necessary hardware resources can be satisfied by a DSP of standard features. What has been avoided here is the use of a separate sample-andhold circuit which, as such, can be a source of a system error. The suggested concept can also be used as separate algorithm for the spectral analysis of the processed signals. Based on the identified parameters of the ac signals, we can establish all the relevant values in the electric utilities (energy, power, the RMS values). The uncertainty bound is a function of the error in synchronization with fundamental frequency of processing signal, owing to the nonstationary nature of the jitter-related noise and white Gauss noise. The analysis shows that the proposed algorithm retains high accuracy in reconstructing periodic signals in a real environment.
References [1]. 1. G. Proakis and D. G. Manolakis, Digital Signal Processing: Principles, Algorithms, Applications, 3rd ed. Englewood Cliffs, NJ: Prentice-Hall, 1996. [2]. R. S. Prendergast, B. C. Levy, and P. 1. Hurst, "Reconstruction of Band-Limited Periodic Nonuniformly Sampled Signals Through Multirate Filter Banks", /EEE Trans. Circ. Syst.-/, vol. 51, no. 8, pp.1612-1622, 2004. [3]. P. Marziliano, M. Vetterli, and T. Blu, "Sampling and Exact Reconstruction of Bandlimited Signals With Additive Shot Noise", IEEE Trans. Inform. Theory, vol. 52, no. 5, pp.2230-2233, 2006. [4]. E. Margolis, Y. C. Eldar, "Reconstruction of nonuniformly sampled periodic signals:algorithms and stability analysis", Electronics, Circuits and Systems, 2004. /CECS 2004. Proceedings of the 2004 11th IEEE International Conference, pp. 555-558, 13-15 Dec. 2004. [5]. W. Sun and X. Zhou, "Reconstruction of Band-Limited Signals From Local Averages", IEEE Trans. Inf. Theory, vol. 48, no. 11, pp. 2955-2963, 2002. 102
[6]. P. Petrovic, S. Marjanovic, and M. Stevanovic, "Measuring of slowly changing AC signals without sample and hold circuit", IEEE Trans. Instrum. Meas., vol. 49, no. 6, pp.1245-1248, 2000. [7]. P. Petrovic, "New Digital Multimeter for Accurate Measurement of Synchronously Sampled AC Signals", IEEE Trans. Instrum. Meas., vol. 53, no. 3, pp.716-725, 2004. [8]. P.Pejovic, L.Saranovac, and M. Popovic, "Comments on "New Algorithm for Measuring 50/60 Hz AC Values Based on the Usage of Slow AID Converters" and "Measuring of Slowly Changing AC Signals Without Sample-and-Hold Circuit"", IEEE Trans. Instrum. Meas., vol. 52, no. 5, pp.l688-1692, 2003. [9]. A.K. Muciek, "A Method for Precise RMS Measurements of Periodic Signals by Reconstruction Technique With Correction", IEEE Trans. Instrum. Meas., vol. 56, no. 2, pp.513-516, 2007. [10]. P. Petrovic, M. Stevanovic, "A Reply to Comments on "New Algorithm for Measuring 50/60 Hz AC Values Based on the Usage of Slow AID Converters" and "Measuring of Slowly Changing AC Signals Without Sample-and-Hold Circuit"", IEEE Trans. Instrum. Meas., vol. 55, no. 5, pp.1859-1862, 2006. [11]. A.V.D.Bos, "Estimation of Fourier Coefficients", IEEE Trans. Instrum. Meas., vol. 38, no. 5, pp.1005-1007, 1989. [12]. V.E. Neagoe, "Inversion of the Van der Monde matrix", IEEE Signal Processing Letters, vol. 3, no. 4, pp.119-120, 1996. [13]. H. C. So, K. W. Chan, Y. T. Chan, and K. C. Ho, "Linear Prediction Approach for Efficient Frequency Estimation of Multiple Real Sinusoids: Algorithms and Analyses", IEEE Trans. Signal Proc., vol. 53, no. 7, pp.2290-2305, 2005. [14]. B. Wu and M. Bodson, "Frequency estimation using multiple source and multiple harmonic components", American Control Conference, 2002. Proceedings of the 2002, vol.1, pp. 21-22, 8-10 May 2002. [15]. G. Seber, Linear Regression Analysis, New York; Wiley, 1977. [16]. SJ.Reeves and L. P. Heck, "Selection of Observations in Signal Reconstruction", IEEE Trans. Signal Proc., vol. 43, no. 3, pp.788-791, 1995. [17]. H. G. Feichtinger, "Reconstruction of band-limited signals from irregular samples, a short summary", 2nd International Workshop on Digital Image Processing and Computer Graphics with Applications, pp. 52-60, 1991. [18]. T. Daboczi, "Uncertainty of Signal Reconstruction in the Case of Jitter and Noisy Measurements", IEEE Trans.on Instrum.Meas., vol. 47, no. 5, pp.1062-1066, 1998. [19]. G. Wang, W. Han, "Minimum Error Bound of Signal Reconstruction", IEEE Signal Proc. Lett., vol. 6, no. 12, pp. 309-311,1999. [20]. Y. S. Poberezhskiy and G. Y. Poberezhskiy, "Sampling and Signal Reconstruction Circuits Performing Internal Antialiasing Filtering and Their Influence on the Design of Digital Receivers and Transmitters", IEEE Trans. Circ. Sys.-I, vol. 51, no. 1, pp. 118-129,2004. [21].E. Alon, V. Stojanovic and M. A. Horowitz, "Circuits and Techniques for High-Resolution Measurement of On-Chip Power Supply Noise", IEEE Journal of Solid-State Circuits, vol. 40, no. 4, pp.820-828, 2005. [22]. H. Z. Hoseini, I. Kale and O. Shoaei, "Modeling of Switched-Capacitor Delta-Sigma Modulators in SIMULINK", IEEE Trans. Instrum. Meas., vol. 54, no. 4, pp.1646-1654, 2005. [23]. G. Vendersteen and R. Pintelon, "Maximum likelihood estimator for jitter noise models", IEEE Trans. Instrum. Meas., vol. 49, no. 6, pp.1282-1284, 2000. [24]. K.J.Coakley, C.M.Wang, PD. Hale and T.S. Clement, "Adaptive characterization of jitter noise in sampled high-speed signals", IEEE Trans. Instrum. Meas., vol. 52, no. 5, pp.1537-1547, 2003. [25]. G.N. Stenbakken, and J.P. Deyst, "Timebase Distortion Measurements Using Multiphase Sinewaves", IEEE Instrum. Meas. Techn. Conf., Ottawa, Canada, pp.1003-1008, May 1997. [26]. N.C.F. Tse and L.L. Lai, "Wavelet-Based Algorithm for Signal Analysis", EURASIP Journal on Advances in Signal Processing, vol. 2007, Article ID 38916, 10 pages, 2007. [27]. T. Cooklev, "An Efficient Architecture for Orthogonal Wavlet Transforms", IEEE Signal Proc. Lett., vol. 13, no. 2, pp. 77-79,2006. 103
[28]. Y. C. You; L. 1. Fei and Y. Q. Xun; "A Real-Time Data Compression & Reconstruction Method Based on Lifting Scheme" Proc. Trans. Dist. Conf. Exh., 200512006 IEEE PES, pp. 863-867, 21-24 May 2006. [29]. S. 1. Reeves, "An Efficient Implementation of the Backward Greedy' Algorithm for Sparse Signal Reconstruction", IEEE Signal Proc. Lett., vol. 6, no. 10, pp. 266-268, 1999. [30]. P. Petrovic, "A new matrix method for reconstruction on band-limited periodic signals from the sets of integrated values", IEICE Transactions on Fundamentals of Electronics, Communications and ComputerSciences, vol.E91-A, no.6, pp.1446-1454, Jun 2008. [31]. P. Petrovic, "New Approach to Reconstruction of Non uniformly Sampled AC Signals", Proceedings of 2007 IEEE International Symposium on Industrial Electronics (ISlE 2007), 1-4244-0755-9/07/$20, Vigo, Spain, pp. 1693-1698, 4-7 June 2007. [32]. P. Petrovic, M. Stevanovic, "New algorithm for reconstruction of complex ac voltage and current signals", author art with number 2478, Serbian and Montenegro Patent, Belgrade, 30. August 2006. [33]. P. Petrovic, M. Stevanovic, "Digital analizer of complex and nonharmonic ac signals", Serbian and MontenegroPatent No.2006/0558, Belgrade, 9.0ctober 2006.
AppendixB When processing is based on the usage of dual slope ADC, we have the following:
i"sin(k;if2ntJ= At, (k=1,2,...,M) k1if(2 + tc + 2to )=a k ,/ ; 1if2 tc n
n 1
(3.28)
= Ao; 1ifVREP (t2,/ - t1,/)=B/
where T2 = tz: - tu = it., the time in which the counter registered i clock impulses, VREF is reference voltage, B, is result of input signal integration, tc is the sampling rate with which the counter inside the AD convertor operates, 2n is the total number of the state that can be occupied by the counter (n-bit), while to is the initial moment of the conversion process. After developing a system of equations formed in this manner, we obtain a determinant equivalent in form to the one described in relation (7), where the qJz value is defined as: (3.29) a k ,/ = kip, = kif(2 n+1 t c + 2to )
Appendix C Based on relations (3.9-3.10), we can concluded that: ••• •••
M-l
X2
M-l
X3
(3.30)
M-l
•••
XM - 1
•••
XM
M-l
where a coefficient is still unknown, and will be determined through the iterative procedure, while: M-l
•••
X2
•••
X
•••
XM - 1
M-l
3
= (-1) (X2X3,,,XM_IYW(X2,,,,,XM_J
(3.31)
M-l
which yields the following written expression: (M)A(M-l) a 12 U12
)82,M-l
( - - X 2 .. ·X M _ 1
(3.32)
From this equation, it follows that: 104
A(M-l) _ ( -
Ll 12
X
\ (X
X M - l -X2 XM - l -X3 }
··
_ (- I)M - 2 ( X2",XM - 2 )a(M-l)A(M-2) 12 Ll l2 -
\I
M - 1 -XM - 2J\.X M - l
(
-
\A(M-2) -a12(M-l) P12
I)M-l( )2 X2·"XM - 2 S2,M-2
(3.33) (3.34)
where: (3.35) By continuingthe same procedure (by reducing the order of the determinant), we obtain the following:
11\~ = (x4 -X3XX4 -X2XX4 -ag)Xx3 -X2XX3 +X2 )
(3.36)
(3.37) where: 11(4) -
12 - -
S T· 2,4 2,4'
(3.38)
In order to determinethe unknown coefficients,we will have the following: A(5) - (
Ll 12
-
X. X
\I
X5 - X2 Xs - X3 Xs - X4J\.XS -
a l2(5)\A(4) P12
(3.39) (3.40) (3.41)
After a sufficientnumber of steps, we get: A(M-l)
Ll 12
S
= 2,M-l
T
(3.42)
M-3,M-l
(3.43) Finally, we can write that: (3.44) where: (3.45) If we assume that: 1
x2
1
x3
A(M) _ Ll l3
(3.46)
-. M-l
1
X M-1
1
xM
X M-1 M-l
xM
where:
105
1 (
-
M- l ( )a(M)A(M-l) _ ( I)M( I) 2···XM _ 1 2···XM - 1 13 t i 13
X
X
1
(3.47) X~
X~-2
a(M)i1(M-l) __ 1 13
13
(3.48)
-
X~_1
M-2 XM - 1
(3.49) (3.50)
(3.51)
Apart from this, the following form is applied:
- (X2X3 XX3 - X2 )ag) = (X2X3 XX3 - X2 XX3 + x2 ) ~ ag) = -(X2X3 )
(3.52)
From now on, we can write that:
i1\~ = S2,4 (x 2 + X3 + x4 ) = S2,4~,4
(3.53) (3.54) X4X2
+ X4X3 + X3X2
(3.55)
X2 +X3 +X4
What we conclude fromthis is:
i1~1 = S2,sT;,s
(3.56)
After a sufficientnumberof iterations, we conclude that: A(M-l) S T t i l3
=
2, .•1-1
M-4,M-l
(3.57) (3.58)
Finally,we have: (3.59)
(the sum of all the inverteddoubleproductsof differentindices). For the next co-determinant in this succession, we can write that:
106
-~~)=
1
X2
x 22
1
X3
X3
x 24
M-l
X2
M-l
4
2
X3
X3
-( (M)~(M-I) - X M -X2 X X M -X3 }.. (X M -X M - 1X X M -a14 14
• XM - 1
X~_1
XM
XM
X~_1
2
(3.60)
M-l XM - 1 M-l XM
4
XM
(3.61)
X~_1
Fromthis, it can be concluded that: (M)A(M-l) S T a 14
L.l 14
(3.62)
2,M-l M-4,M-l
- -
A(M-l) _ ( - X M-1 - x2
L.l 14
(M-l)A(M-2) a 14 Ll 14 - -
X
\(
\I
(M-t) lA(M-2)
X M-1 - x3},. X M-1 -XM-2!\XM-1 - a14
S
P14
T
(3.63) (3.64)
2,M-2 M-S,M-2
After conducting an iterative procedure, with which we reduce the order of the obtained expressions, we get the following form:
~~1 = (x5 - x2 XX5 - x3 XX5 - al(~) Xx s - x4 XX4 - x2 XX4 - x3 XX3 - x2 ) (X4X3X2)al~)(X3 -
X 2XX4 - X 3XX4 - x 2)
= -(X4X3X2
1
X2
11
x3
1x 4
x~ x~
(3.65)
x;
where:
(3.66)
What is also appliedis that - (X2X3
~(5)
14
=
)p(x3 -
ST.' 2,5 1,5'
x 2)
t
= (X2X3 XX3 - x2 XX3 + x 2) => p = -(x2 + x3 a}~) = -(x2 + x3 + x4 )
~(6) 14
=
S2,6T2,6
(3.67) (3.68)
An analogous conclusion is that A(M-l) _ -
L.l 14
ST'
(M) 2,M-l M-S,M-l' a 14 -
TM - 4,M - l
. A(M) - -
--T--' L.l 14
S
T
2,M M-4,M
(3.69)
M-5,M-l
If we performa substitution here, we get (3.70)
(the sum of all invertedtriple productsof differentindices). Repeating the procedure described above,we obtainethe following equations
107
(3.71)
(3.72)
AppendixD We must determine
x~
for l~q~M+l. Therefore:
x~ = (-lr+qE~
(3.73)
where E~ is obtainedfrom XZM+l overtumingp row and q column. We know that: X ZM+1=EzM+l. -M!!..i 2
E I = _e_ _ leati P 22M
_e-ati
•••
e'"
eMati _e-Mati
+e-ali
e2ali +e-2ati
•••
(3.74)
eMati +e-Mati\p
The index p shows that p row is eliminated fromthis determinant. -M!!..i 2
I
- e -2M - eati -e -at i EI p 2
...
e
Mati
I
+ e-Mati = p
(3.75)
(3.76) (3.77) (3.78) A
L.l
If. 2M+I 2M a - a· ap" (l)M 2M(2M+I) M-;t M(at+a2+...+ U2M+dirrrr· j k( e = e e· Sln--- Xj = ) 2M+I ( j=k+1 k=1 2
i)" 2-2M e -Mapi e 2'at+.·.+ ap-l+ap+I+···+U2M+I, • 1/
\.
(3.79)
rr
2M+l r2M r
EI
M(M+I) = (_1)-2-22M(M-I)
p
sin a j
-ak
2
j=k+1 k=1 2M+I
a
I(
).
(
\.
.e2at+...+ap-l+ap+I+...+a2M+11 • ~ e-at+...+ap-l+ap+I+...+a2M+lJiI
L..J
- a
M
rrsin-P--k
2
k=1 kv p
I
or: E I = (_l)M(~+I) 22M(M-I) P
nIT
sin a
j
-ak
2 . ~ cos
j=k+1 k=1
rr
2M+I k=1 ke p
a
sin-p -
- a -
k
£..J
ja l
+ ••• +a p_1 +a p+I + ••• +a 2M+I
2 (
-\a l
) + ••• +a p_1 +a p+1 + ••• +a 2M+1 M
2
It follows that: 108
(3.80)
(- I )P+1 ______ 1 . ZM+I a -a k
ITsin-P-
Lcos{a + ...+a l
p- I
+a P+1 + ...+a ZM+1 2
(3.81 )
-
2
ISk..p
Now, we can determine E~ for 2~q~M+l:
(3.82)
Now is:
(~P,M-q+Z - ~ p,M+q XXj = e
aji
)
nIT
E" = (_I)M(~+I) 2ZM(M-I)+1 j=k+1 P
hI
la
j
sin a -ak 2 . "" sin L..J
ZM+I a -a IT sin~2 k
(3.83) + ...+ap_1 +ap+1+ ...+aZM+1
l
( -
)
2 )
a l + ...+a p_ l +a p+ 1 + ...+a ZM+1 M+q-I
ISk.-p
It follows that:
X~ __ (-I)p+q _ ZM-1 X ZM+I
2
1:
1 ------.
IT ZM+I
a -a sin-P- - -k 2 ISk..p
.la
SIn
l
+ ...+a p_1+a p+1+ ...+a ZM+ 1 2
)
( ) - a l + ...+ap_1+a p+1+ ...+a ZM+1 M+q-I
;2 s q s M
(3.84)
while: x~
X ZM+I
_ (-l)p+q
-
2
ZM-1 ZM+I
IT'
«. -ak SIn---
ISk..p
. a l + ...+a _I +ap+1 + ...+a ZM+1 . SIn p ; for q = M +1 2
2
Forq=M+r+l:
109
(3.85)
(I) = __ -_ _ M- l
2M
1!
e
()
-M 2i(_I)M
~-I
e
M(Q]+...+ ap-l+ap+l+...+a2M+l~(~ p,M-r+l
+
~
) p,M+r+1
=>
q=M+r+ll\l~r~M-l 2M+12M
a-a
TITI sin- 2 L {a cos ----p-=----=----k
j
-
E q = ( -I
M (M - l ) 2 )
2
2M(M-l\'1 j=k+l k=1
r
1 + ••• + a
1 +ap+l + ••• + a 2M+1
a -a TIsin-P - - k
2
2M+I
P
2
l$.b'p
(3.86)
q=2M+I 2M+12M
a-a
TITI sin-
k
j
E" = (_I)~22M(M-l)i.l
-
j=k+1 k=1
cos a
2
a -a TIsin-P - - k
1 + ••• + a p_1 +ap+, + ••• + a2M+ 1
2
2M+I
p
2
l$ko
It followsthat: for q = M + r + 1/\ 1 ~ r ~ M -1
x-
1
(_I)p+r+l
--p-
X
2 ZM - 1
{ aj +...+a
------
IT sin a ZM+I
-a
_ P_ _ k
ZM+I
I$k.. p
Lcos
-I P
+a 2
+1 P
+...+a ZM +1
(3.87)
2
forq=2M+l
X~ X
+ ZM 1
(_I)P+M+1
=
2 ZM-I
------cos a l +...+a p _1 +ap +1 +...+a ZM +1 ZM+I a -a ITsin-P - -k I$k..p
(3.88)
2
2
Appendix E
For the fifth order (M=2) derivedrelationsfor determinants of system(3.5) have the form: X = _2 8 sin at -a2 sin at -a3 sin at -a4 sin at -as sin a 2 -a3
22222 . a 2 - a4 • a 2 - aS • a3 - a4 • a 3 - aS • a 4 - aS .Sln---Sln---Sln---Sln---Sln--2 222 2
•
(3.89)
(3.90)
110
x 2 =-32sin a 2 -a3 sin a 2 -a4 sin a 2 -as sin a 3 -a4 sin a 3 -as sin a 4 -as. 1
2
2
2
2
2
2
. a 4+aS+a3 - a2 + SIn • a 4+aS+a2 - a3 • a • a 2+a3+aS - a4 ] . + SIn 2+a3+a4 - aS + SIn----"'--"""""-----.;~---:.... ( 2 2 2 2
(3.91)
. SIn
x' = -32 sin a 2 -a3 sin a 2 -a4 sin a 2 -as sin a 3 -a4 sin a 3 -as sin a 4 -as sin a 2 +a 3 +a 4 +as 1
2
2
2
222
2
X 4 = -32 sin a 2 -a3 sin a 2 -a4 sin a 2 -as sin a 3 -a4 sin a 3 -as sin a 4 -as. 2 1 222 2 2
~+~+~-~] . cos -~+~+~+~ + cos ~-~+~+~ + cos ~+~-~+~ + cos --=--~----:...._....:::... ( 2 2 2 2 XS = -32 sin a 2 -a3 sin a 2 -a4 sin a 2 -as sin a 3 -a4 sin a 3 -as sin a 4 -as cos a 2 +a 3 +a 4 +a s 1
2
2
2
2
2
111
2
2
(3.92)
(3.93)
(3.94)
4. A NEW METHOD FOR PROCESSING OF BASIC ELECTRICAL VALVES BASED ON DEFINITION FORMULA IN TIME DOMAIN Many applications involve digital processing of periodic signals. For example, both voltage and current in electrical utilities are periodic signals containing harmonic components [1-4]. There are generally three steps associated with the digital processing of a signal. First, the signal is uniformly sampled and converted into a discrete sequence. Then, a block of data is constructed by looking at the sequence for a period of time neglecting everything that happens before and after this period. This period of time is referred to as the data window or observation interval. Finally, digital signal processing techniquessuch as the discrete Fourier transform (DFT) are applied to the samples within the data window to obtain the result. There are some requirements associated with the first two steps. The sampling frequency must be higher than the Nyquist frequency, which is twice the highest frequency of interest. A practical problem arises when the sampling frequency is high enough to satisfy the Nyquist theorem, but the sampling process is not synchronized with the signal to be processed. When processing an analogue signal in digital circuits, a loss of information will occur due to the fact that sampling is performed in an analogue to digital (AD) converter. Jitter errors appear, sometimes data are lost, which results in a larger sampling gap and, of course, noise occurs. Very commonly, due to the physical limitations, the available data is insufficient to achieve high resolution in processing, which is especially important for the problems occurring during the conversion of the observed signals, due to the non-ideal nature of the AD converter used here, as well as the transducer and the other devices used in the process [5]. On the other hand, sampling consists of a sample and hold (or track and hold) circuit followed by conversion to digital code word, and is implemented using an AD converter. A sample and hold circuit is a possible source of systematic errors. In [6], the attention is paid to the possibility of eliminating a separate circuit for sample and hold, which in itself is an original approach. An important advantage of this method (integration) is that the input signal becomes averaged as it drives the integrator during the fixed-time portion of the cycle. Any changes in the analogue signal during that period of time have a cumulative effect on the digital output at the end of that cycle. Other ADC strategies merely "capture" the analogue signal level at a single point in time in every cycle. If the analogue signal is "noisy" (contains significant levels of spurious voltage spikes/dips, as it almost always happens in practice), one of the other ADC converter technologies may occasionally convert a spike or dip because it captures the signal repeatedly at a signal point time. An integration, on the other hand, averages together all the spikes and dips within the integration period, thus providing an output with greater noise immunity. In this manner the result of the processing is a precise representation of a signal from the real surrounding. The processing method proposed in this chapter has the potential to overcome the above difficulties occurring in processing of ac signals. The proposed concept performs a direct determination of the digital equivalent of the effective (RMS) values of voltage or current, i.e. of the active power. Thus, there is no need for sampling in the way required in an AD conversion. This naturally results in a considerable simplification of the realization of the proposed digital instrument, and also in the possibility to have a much more precise recalculation of the basic ac values. The approach is based on the use of the values obtained as a result of the integer processing of the continual input signal, in precisely defined time periods, without the use of a separate circuit for sample and hold. The chapter contains a description of the realization of the prototype of the measuring circuit, as well as a discussion on the experimental results.
4. 1. Suggested Method of Processing Let us assume that the input signal of the fundamental frequency f is band limited to the first M harmonic components. This form of the continuous signal (voltage or current) with a complex harmonic content can be represented as a sum of the Fourier components as follows:
112
M
X(t) = XI + LXk sin(k21ift + fjI k)
(4.1)
k=1
Here, .N is the average value of the input signal, X, is the amplitude of the kth harmonic, k is the number of the harmonic, and fjlk is the phase angle of the kth harmonic. By integrating the signal (4.1), the following is obtained:
1 1 { 1 X -f x(t)lit" =XI (t1- to)+- L- sin(2k1ift1 + fJ/ RC RC if k 1
r(t 1)=
t
M
to
k=1
k
k ) sin
}
[kif(t 1- to)]
(4.2)
A similar processing principle was performed in [6] using the dual-slope AD converters, where the time interval tI-to was equal to the one required by the counter located inside the converter to perform the counting to the maximum content. The moment to is defined as the initial moment, from which the integration process begins, and is arbitrary in the above relation. . If we assume that the interval trto is equal to the period of the input signal T=1/f, the equation (4.2) practically calculates the average value of the input analogue signal according to the definition formula, i.e. equation (4.2) can be represented as
Y(t1 ) = _ 1 .~.T
(4.3)
RC
where T
= t1- to = 1/ f = kt.,
the time in which the counter registered k clock impulses of period te,
while 4f) represents the average value of the input periodic signal. Within this precisely defined interval, the counter will count up to the value of a certain content remembered inside the microprocessor. The content of the counter is then transferred via the data lines to the microprocessor that controls the operation of the complete system in Figure 4.1. After this, the counter is reset. x(t)x1(t)
." selection lines
+VREF
----0 sm
K REF
-V
r SIGN
Counter and control logic
Tactipulse
OVF
Busy
EOC
Figure 4.1 Principal block-diagram of digital circuit for the realization of proposed algorithm. The digital equivalent of the input periodic signal integral is determined as based on the value (content) reached by the counter and the reference voltage signal, following the same principle by which this is done inside a dual-slope or sigma-delta ADC. Namely, after the integrator performs the calculation according to the relation (4.3), in the second time interval, a numerical equivalent of the calculated integral is determined, as based on a known reference value. At the end of the second interval (from the moment tt, to the moment tz), the comparator placed at the integrator output will identify the moment t2 as the moment in which the total voltage at the integrator output reached the 0 value, i.e.:
1 -f VREFdr = 0 Ret t2
Y(t 2 ) = Y(t 1 ) -
(4.4)
1
where T2 = t: - tt = it., the time in which the counter registered i clock impulses, VREF is reference voltage. The formulation above suggests that the number i, i.e. the number registered at the counter at the moment ti, is proportional to the average value of the input signal and is not dependent either on the 113
resistance R, or capacitance C, or on the period of the clock impulses tc • If we further develop (4.4), the following formulation is obtained
1
2 1
Y(/ 2 ) = Y(/1)--fVREF dr RC 11 --::r:\ _ X\I) -
1
1
RC
RC
= -~.T - - VREF -i ·Ie = 0 =>
VREF • i . Ie _ VREF • i . t, T k· Ie
_ -
(4.5)
V
i REFk
In order to perform precise processing according to the proposed algorithm, it is necessary to measure with high accuracy the interval trto within which integration of the input signal is required to be done; this interval has to be equal to the period of the processed signa1. Apart from this, it is necessary to have a very stable source of the reference voltage. In the suggested algorithm, the frequency of the carrier signal is recalculated in every passage, in a manner that takes into consideration a possible change, introducing it in the process of recalculating the new value of the input analogue signals integral Y(tj). Thus, we reduce the possible error in the calculation process that appears as a result of the variation in the frequency of the processed signa1. The sign of VREF, depends on the sign of Y(tj), i.e. if Y(tj) is positive, then VREF must be negative, and vice versa. The sign of the expression Y(tj) can be verified by a program check, thereby adjusting the sign of VREF by the means of "SIGN" line (Figure 4.1). In order to calculate the RMS value of the input signal, it is necessary to multiply the signal by itself. This is done by a multiplier which is located before the analogue multiplexer in Figure 4.1. The square of the signal formed in this manner is subjected to the described processing procedure. Finally, what remains to be done is to calculate the square root of the calculated average value of the signal's square. The power in the ac system is obtained as the average value of the product of voltage and current signals on the interval that is equal to the period of the processed signals. To calculate the energy, it is necessary to possess the information about the time in which the processing is performed (the time must be measured), after which previously established power is multiplied by the time interval in which the processing is performed. By using the approach without a separate sample and hold circuit, the suggested algorithm is distinctly different from the one described in [6], as it does not require an additional solving of a system of equations in order to establish the basic ac values, which makes it considerably less demanding in respect of the processor power and the time needed for the realization. It makes it possible to determine the digital equivalent of the desired electrical values (of the processed analogue signals) in the most direct way, based on the derived relations (4.3)-(4.5). The time needed to reach the required value (average, RMS, active power or energy) is in the border case, limited to the time interval that is marginally longer than the two periods of the input signal subject of the processing. As a result" the processing algorithm described here is not limited only to slowchanging ac signals, unlike the methods proposed in [6] and [7]. The method suggested here does not depend on complex hardware or intensive numerical calculations, which makes its practical realization highly inexpensive. In addition, it is clear that this kind of approach puts no limitations whatsoever on the speed of the circuit through which the conversion is done, i.e. the determination of the numerical value of the continual signal integral, in the form of the Fourier series. This is an important difference to be taken into consideration when comparing its implementation in this approach to the processing and the results presented in [6], that was based only on the use of standard dual-slope ADC. To realize the circuit with which the integration is done, it is necessary to use a separate circuit of the integrator with the addition of a resetting option, to annihilate the impact that the time constant has upon the precision in the process of integrating the value of the input analogue signa1. After this, the counter will form a digital equivalent to an integral obtained in this manner. Based on the proposed solution shown in Figure 4.1, it can be assumed that the circuit can be realized in a very simple manner, as an IC. This kind of processing does not introduce limitations regarding the type of the signal being processed, i.e. this signal can contain non-harmonic components as well (interharmonics and subharmonics). However, it will be necessary to determine the period of such a complex signal, as it was done in [8]. 114
4.1.1 Estimation ofMeasuring Uncertainty The measuring uncertainty of the realized digital multimeter is a key metrological characteristic. In order to achieve very low measuring uncertainty, the decision made in producing the concept for, as well as in the development and realization of this instrument, was restricted by extreme requirements. A model of the results of measuring can be formulated based on expression (4.5). This formulation includes the factors that can have a significant impact on the measuring uncertainty of the used method: 7:\
) (i + ~i + bl)
(
x~tJ= VREF+AVREF (k+M+&)
•
•
• •
(4.6)
L\VREF - correction of the reference voltage. This is a random value, with an even distribution. Its mathematical expectation is equal to zero, and its relative standard measuring uncertainty UMEF of the B type, is determined by the manufacturer's specification. t1i - correction of the i-counter content. This value depends on the precision of the operation of the zero comparator. If the procedure of eliminating the error of the comparator is applied (the socalled 'auto-zeroing'), this correction will be neglected, together with its uncertainty. s - inherent error of the counter: ± 1. This is a random value, with an even distribution. Its mathematical expectation is equal to zero, and its standard measuring uncertainty is »s = 1/ J3 .
Sk -
correction of the k - counter content. This value depends on the precision in the measuring of
the period of the processed signal, Sk =
t1T. Ie
t1T
is the difference between the period of the
measured and the processed (real) signal. Sk is a random value, with an even distribution. Its mathematical expectation is equal to zero, and its relative standard measuring uncertainty UAk of the B type, is determined as
Utlk = UtlT ,
where
UtlT
represents the measuring uncertainty in the
Ie
evaluation of the period of the processed signal. lie - inherent error of the counter: ± 1. This is a random value, with an even distribution. Its mathematical expectation is equal to zero, and its relative standard measuring uncertainty isuac = 1//3 . A combined measuring uncertainty is calculated according to the well-known rules [9]: •
2 (V-k- )2Utli+ 2 (V-k- )2U(j+ 2 ( V i)2 2 -:2= (i)2 k UMEF+ - 7 UAk+ (V - 7i)2Uac2 REF
REF
REF
REF
(4.7)
Example: For an effective value of the processed signal that is close to the reference value, and a 16bit counter that operates at the tact of 10MHz, along with an error in determining the frequency of the processed signal that is within the ±O.IHz, the standard measuring uncertainty of the method will be approximately 0.35%. An analysis of the measuring uncertainty reveals that a dominant influence of the uncertainty occurs as a result of the evaluation of the frequency of the processed signal.
4.2. Simulation of the Suggested Measuring Method In order to perform the estimation of possible errors in the processing according to the suggested algorithm, a simulation was performed in the Matlab program package. As measurement gets corrupted by noise, the processing is an estimation task, depending on the actual noise record. In the proposed system for signal processing, we eliminated a sample-and-hold circuit as a possible source of systematic errors. The impact of noise and jitter on the measurement method is investigated. In simulations, upon the formation of a complex harmonic input signal the white Gauss noise was added to the measuring signals, whereby the amplitude range is defined. Thus, it is possible to get a general insight into the impact that the noise and the harmonic components have on the precision of the suggested algorithm. The presence of the noise and jitter causes false detection of signal zero-crossing moments giving an incorrect calculation of the interval for integration of the input signals (equation (4.3)). The error analysis 115
was performed both in the program and as a SIMULINK (Figure 3.7) [10] so as to verify the effectiveness of the proposed hardware solution (Figure 4.1). Figures 4.2 and 4.3 show the influence of the error in determining the frequency of the carrier signal on the relative error in determining the average power and the RMS value of the input signal, for various harmonic content of the input periodic signal. 0.4,.-------,-------,------,-------r----r-------r------r-----,
0.3
0.2
0.1
M=3.N=5 • M=5.N=6 ____ M=7.N=7
-0.1
-0.2
-0.3
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
frequency deviation [Hz]
Figure 4.2 Relative error in calculation of average power as function of error in synchronization with frequency of fundamental harmonic of the input signal (M and N are the highest harmonic components of input voltage and current signals respectively).
According to the results of the analysis shown in Figures 4.2 and 4.3, it can be concluded that there is a practical linear interrelationship between the size of the relative error in determining the average power and the RMS value of the input signal on the one hand, and the error in determining the frequency of the fundamental harmonic, on the other hand. This error becomes greater when establishing the average value - this is actually as a result of the influence of the phase angle between the processed voltage and current signals. A measured uncertainty of 0.35 % is clearly seen. However, the limits of possible errors are acceptable; since the allowed tolerance in the network frequency is rather low (the first security level in the network is activated when there is a change in frequency of 0.05Hz in relation to the nominal value). The immunity of the algorithm could be improved by applying a more complex algorithm for the detection of signal zero-crossing moments. The conducted analysis implied high stability of the reference voltage source, which is easily performed in the practical realization [7]. The obtained results imply that the offered solution is really general in character and remains highly accurate in processing of input ac signal in real environment.
116
0.2.-----..,-----,-----.------,-----,---..------,---------,
0.15
0.1
0.05
o
-0.05
-0.1
-0.15
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
frequency deviation[Hz]
Figure 4.3 Relative error in calculation of input signal RMS value as function of error in synchronization with frequency of fundamental harmonic of the input signal (Mis the number of the highest harmonic component).
4.3. Practical realization of proposed algorithm The block diagram of the digital circuit for the realization of the proposed algorithm is shown in Figure 4.4. As shown in Figure 4.4, there is no special circuit for sample-and-hold - the analogue signal is directly taken to the integrating circuit by the means of an analogue multiplexer, which practically determines the type of processing. The voltage signal has been adopted from a precise resistance network (within the range of 0 - 400V). The transducer consists of a resistive voltage divider buffered with a low-distortion, low-noise, and wideband operation amplifier. Precision resistors (tolerance: ±0.01%; nominal power: 0.6W; temperature coefficient: ±5 ppm/°C) have been used for the voltage divider. The current transducers consist of the traditional current transformers (CT) with a magnetic core. Under sinusoidal conditions, the accuracy of the passive components can be very high, provided that the load applied to their output is close to the nominal burden. The calibration of this type of ac current-to-voltage converters is well described in [7] and [11]. The current transformer has a secondary circuit operation amplifier, which provides practically zero resistance, and thus much better linearity of the transfer function of all transformers. To minimize common-mode errors, the voltage developed across resistance is isolated and converted to a groundreferenced signal using a unity-gain differential amplifier. Feedback amplifiers have been employed to increase, in effect, the permeability of transformer cores. Such techniques have been quite successful in reducing low-frequency errors. Additional attention was paid to the limitations that exist in the use of this type of transducer, which was thoroughly analyzed in [12]. Three AD633 circuits are used in forming the products of processing signals (voltage-voltage, currentcurrent and voltage-current). The signals that are formed in this way are taken into the 8-channel 117
analogue multiplexer (ADG528A). Apart form the three above products, the voltage and current signals are also directly brought to the input end of this multiplexer (in order to establish the possible average value of the processed signal), together with two referential voltage signals which are used in the integration process, as described in equations (4.4) and (4.5). The three selection lines (SLO-2), determine the type of the signal to be passed through the multiplexer. The reference signals are obtained from the unit that supplies the whole instrument, over a special resistant circuit and Zener diodes. The output of the multiplexer is introduced into the integration circuit (MAX427). After performing the integration of the specified type of the signal (or a signals product) within the time interval that is proportional to the period of the complex input signal, the output from the integrator is taken into the LMV762 circuit which possesses two in-built precise comparators. One of the comparators is used to detect the moment of completion of establishing the digital equivalent (equation (4.4». At the end of the second interval (equation (4.4», the comparator will identify the moment of completion of the conversion process as the moment in which the total voltage at the integrator output reached the 0 value. (he m,tor COOllnlflod
XINXOUT
RFS ET NRST
Y(t, ) Comparator (LMV762 Nationa l
S<mlcond)
}o;()C End of Co nversion)
M icroco nlro ller AT91SAM7S256 ATMEL
uencv. r-- - ----'Fre -'''"'.==:=:::;--j
88fJ(=====::l USB
Comparator (L.~IV761
SIGN
I §}
National Semtce nd.)
" 'Kh' OOOO' Snial Controll""
E----=:=====-~
_ _~
V(I) 0. 111+-
--'
ch,I,....- - - - - - ----1 8-Channtl
I I
Analog Cb ' ~Iuh lpltl.tr
(An-dog Devtees
VOLTAOE.'CtTJUtEN1' MULmuD "' ..... DencnAD633j
ADG528Alo.).._--===========-.J
Cb!+Cb Cb'
-
-
-
- -- - - i
REFERENCE VOLTAGE
Figure 4.4 The block diagram of the digital circuit for the realization of the proposed algorithm. Through the analogue switch (TS3A4l59), the output of the integration circuit is introduced to another comparator circuit (LMV761), in order to detect the sign of the input signal integral value. The moment of introducing the integrator output into the comparator circuit is determined by the moment directly dependent on the measured period of the input signal, as controlled by the microcontroller itself, via a separate selection line (SL3). Based on the integral sign determined in this way, the microcontroller will 118
introduce the corresponding reference voltage to the integrator, via the analogue multiplexer. In this way, the value of the integrator output voltage will be brought back to zero, which will indicate that the process of determining the digital equivalent is completed. The voltage signal from the network is brought directly to the input of the second circuit comparator LMV762. This circuit detects the passing of the voltage signal through zero, as described in [7], thus achieving synchronization of the measuring cycle with the electric utility frequency. Based on the frequency measured in this manner, the microcontroller can control the integration process of the input signal with high precision. As the system voltage is scaled to about 2V on the board (ratio of 1:150), this comparator triggers at about 2.5mV, whereby the error is about 20ns. This error can be ignored, since no accumulation occurs. The microcontroller (ATMEL AT91SAM7S256) performs complete control of the measuring process and all the necessary calculations. Over the installed display, it is possible to monitor visually the results of calculation (the RMS values of voltage, current, active power and frequency of the basic harmonics of voltage). The installed keyboard is used to set up the type of measurement and the start of measurement.
4.4. Experimental Results The realized instrument was checked in the laboratory by using a measurement system described in detail in [13]. Figure 4.5 shows a block scheme of the system realized in this manner, where the measuring of the alternating values is done by asynchronous sampling using a new definition for calculating the average and effective value suitable to be applied in measurement [14]. The process makes use of the capacities of the digital system voltmeter HP3458A-the synchronization of the measurement moment and fast measuring of de voltage with high precision. The applied digital voltmeter enables very fast and more precise measuring of the de voltage than the method in which alternating values are measured. If synchronous measurement is to be applied on two signals of the same frequency and the random phase angle, the device that defines the moments when measurements are taken would have to possess two precise detectors for passing through the zero value, as well as two multipliers of the frequency by a whole number (phase-locked loop), and a circuit for a precise determination of the time that elapses between the passes of each of the two signals through zero. In doing so, an analysis of the measuring uncertainty of the ultimate measurement must also include a comprehensive analysis of the uncertainty introduced by parts of a complex system that determines the moment at which the samples are taken.
I I PC
GI'JIl
I
Jl rWO -CHANl'\ EL SOURCE
I I o R~V'h 7ed multimerer .
I
U
Vc ltuge
div ider
~ ,J
Iii' 3458A
I
]
H
I'---'
HP3458A
~
"1 1'
Figure 4.5 The block diagram of the measuring system used for testing of the realized multimeter
119
The measurement is taken simultaneously from both channels, at a frequency that is not correlated to the signal frequency. This approach is based on the fact that the average or the RMS value (obtained by calculation from the group of samples) does not change significantly if any single sample close to the average value is either deducted from the sum or added to it. By selecting the "window" for the measurement between the passages of the signal through the average, i.e. the RMS value, the error introduced by the asynchronous sampling, is significantly reduced. It has been shown that the errors introduced by this method can be corrected by an adequately favorable selection of the beginnings for the measurement interval and the number of samples [14]. The number of samples in each period is not fixed, owing to the requirement of defining the beginning and the end of a period is to determine whether the measured value is higher or lower than its own previously calculated RMS value. According to [13], the RMS value of the alternate voltage is given as 1 m-l u: U rms(p)(t*) = (4.8)
-2: m-n s=n
where t* represents the discreet time moment in which the RMS value is calculated after the mth sample, m is the serial number of the sample for which the measured voltage has became higher than its RMS value, n represents the serial number of the sample for which the voltage also became (one or two periods earlier) higher than its RMS value, p is the number of which the calculation of the RMS value is done. The expressions for alternate current and power are similar. This expression calculates the RMS value of the signal for the whole number of periods, including the possibility to calculate the RMS value for each individual period. Since the period is calculated as a time interval between the two passages of the signal through the RMS or average value, it is possible to measure non-stationary periodic occurrences as well. By determining the average and RMS value in this manner, it is possible to determine which part of the measuring inaccuracy results from the instability of the measurement equipment, and which one from the tested device [13]. The process makes use of a current shunt and voltage divider, declared for operations involving alternating current and voltage. The values of the impedance of these elements are used to correct the phase tolerance when calculating the active power and energy, as well as in calculating the phase angle. The values of the current shunt and resistance divider are chosen so that the system voltmeter operates within the upper part of the measurement range of 1V, for the nominal values of voltage and current. The practical measurement that was performed by this method [13], over several years has shown the repeatability and reproductivity of measurement on the net frequency in the range of a few ppms, with measuring inaccuracies less than those of the present national standards for ac voltage, current, power, energy and phase angle. During the development of the measurement method, based on asynchronous sampling, a programmable device was developed, performing a simultaneous setting of the moments of taking the samples. The device has two system voltmeters and software that implements this method. As a source in the measurement system in Figure 6 the device described in [15], [16] was used. The main two-channel voltage and the current source characteristics are: • • • • • • •
Frequency range 10 Hz-I0 kHz. Voltage range 0 V to 120 V. Current range 0 A to 6 A. Output power: voltage channel 25 W, current channell00W. Short-term stability: better then 10 ppm with respect to range. Phase angle: 0°-360°. Phase angle resolution: equivalent to time delay of 5 ns in high-speed operation. Manual and automatic operation.
After conducting the measurement via the system presented in Figure 4.6, the obtained results fully confirm the initial suppositions (Table 4.1). This provides verification for using the suggested concept in precise reference and laboratory measurements. The realized instrument has been checked in operation with signals that possessed up to 50 harmonics. In all the measurements, it retained high accuracy even if 120
the frequency deviates from the nominal value. The very simple and inexpensive hardware, in contrast to highly sophisticated and expensive hardware described in [17], meets all price and accuracy requirements for the design of the measurement system. The high level accuracy in processing ac values is preserved, better than in some other solutions [18], with excellent noise rejection.
Table 4.1 The results of experimental measuring with the proposed digital instrument. RMS values of voltage and current of the source 120V; 6A 120V; 5A 120V; 4A 110V;6A 110V;3A 110V; lA 100V; 4A 100V; 2A 60V; 2A 60V; 1A
Relative error of measured RMS value of voltage ([%]) 0.00089 0.00083 0.00078 0.00085 0.00068 0.00092 0.00084 0.00089 0.00092 0.00091
Relative error of measured RMS value of current ([%J) 0.00095 0.00085 0.00088 0.00092 0.00075 0.00096 0.00091 0.00093 0.00096 0.00097
Relative error of measured value of active power ([%]) 0.00062 0.00065 0.00054 0.00063 0.00051 0.00071 0.00072 0.00065 0.00073 0.00075
The developed algorithm can perform the calculation of the basic ac values, practically on-line, for the known fundamental frequency of input signals [19J. Based on the suggested concept of processing, the complete realization of the necessary hardware can be achieved through the resources of the microprocessor itself with a considerably high performance, as well as through its counting resources. All these elements will lead to reduced costs of the suggested solution. What has been avoided here is the use of a separate sample-and-hold circuit which, as such, can be source of a system error. The main advantage of the digital multimeter described in this chapter is that the measurements are performed exactly according to the determination of power and true RMS voltage. The uncertainty bound is a function of the error in synchronization with fundamental frequency of processing signal owing to the nonstationary nature of the jitter-related noise and white Gauss noise. The analysis shows that the proposed algorithm remains highly accurate in processing of periodic signals in real environment. The precision limit of the instrument was investigated theoretically, experimentally and by simulation. The real limit of precision was found experimentally, and it was 10ppm in laboratory environment.
References [IJ. 1. Xi and 1.F. Chicharo, "A new algorithm for improving the accuracy of periodic signal analysis", IEEE Trans. Instrum. Meas., vo1.45, no.4, pp.827-831, 1996. [2]. R. Rausher and V. Grupe, "An AID-chip for accurate power measurement", Euro ASIC 1991, pp. 352-355, May 1991. [3]. M. Dupplis and C. Svensson, "Low power mixed analog-digital signal processing", Proc. 2000 Inter. Sym. Low Pow. Elec. Des., ISLPED 2000, pp.61-66, 2000. [4]. E. M. Hawrysh and G. W. Roberts, "An integration of memory-based analog signal generation into current DFT architectures", IEEE Trans. Instrum. Meas., vol. 47, no. 3, pp.748-759, 1998. [5]. 1. G. Proakis and D. G. Manolakis, Digital Signal Processing: Principles, Algorithms, Applications, 3rd ed. Englewood Cliffs, NJ: Prentice-Hall, 1996. [6]. P. Petrovic, S. Marjanovic, and M. Stevanovic, "Measuring of slowly changing AC signals without sample and hold circuit", IEEE Trans. Instrum. Meas., vol. 49, no. 6, pp.1245-1248, 2000. [7J. P. Petrovic, "New Digital Multimeter for Accurate Measurement of Synchronously Sampled AC Signals", IEEE Trans. Instrum. Meas., vol.53, no.3, pp.716-725, 2004. 121
[8]. P. Petrovic and M. Stevanovic,"Measuring of active power of synchronously sampled AC signals in presence ofinterharmnoics and subharmonics", lEE Proc., Elec. Pow. Appl. 2006,vol. 153, no.2, pp.227235,2006. [9]. ISO 1993 Guide to the Expression of Uncertainty in Measurement (Geneva; ISO). [10]. H. Z. Hoseini, I. Kale and o. Shoaei, "Modeling of Switched-Capacitor Delta-Sigma Modulators in SIMULINK", IEEE Trans. Instrum. Meas., vo1.54, no. 4, pp.I646-I654, 2005. [11]. P. Miljanic, "High precision calibration of current-to-volatge converters", Metrologia, vo1.4 1, pp.365-368, 2004. [12]. Alexander E. Emanuel, "Current Harmonics Measurement by Means of Current Transformers", IEEE Trans. Power De/., vo1.22, no.3, pp.1318-I325, 2007. [13]. P. Miljanic, Z. Mitrovic, I. Zupunski and V. Vujicic, "Toward New Standard of AC Voltage, Current, Power, Energy and Phase Angle-Experimental Results" (in Serbian), Proceedings of the 4th Congress ofMetrologists ofSerbia and Montenegro, Belgrade, Serbia and Montenegro, 2003. [14]. P. Miljanic, "Definitions of the Average and RMS Values Suitable for the Measurement and Descriptions of Quasi Steady State", Electronics, vol. 5, no.1-2, Banja Luka, 2001. [15]. Z. Mitrovic and I. Zupunski, "Stable Source of AC Voltage and Current", Proceedings of IMTC 2004, Como, Italy, May 2004. [16]. Z. Mitrovic, "A phase angle standard", Meas. Sci. Techno/. 15 (2004) 559-564. [17]. H. Germer, "High-precision ac measurements using the Monte Carlo method", IEEE Trans. Instrum. Meas., vo1.50, pp. 457-460, 2001. [18]. http://us.fluke.comlusen/products/ [19]. P. Petrovic, "New method for processing of basic electric values", Measurement, Science and Technology, lOP Publishing, 19 (2008) 115103 (9pp), doi:I0.1088/0957-0233/19/Il/115103. [20]. P. Petrovic, "New digital system for calculation of basic electrical values in time-domain", Serbian and Montenegro Patent No. 2007/0234, Belgrade, 29. May 2007.
122