frequency estimation by demodulation of two complex signals

7
IEEE: Transactions on Power D elivery, Vol. 12, No. 1, January 1997 157 Frequency Estimation by Demod ulati on o f Two Complex Signals Magnus Akke Sydkraft A B S-205 09 Malmo Sweden Abstract This paper presents a method for frequency estimation in power system by demodulation of two complex signals. In power system analysis, the @transfo rm is used to convert three phase quantities to a complex quantity where the real part is the in-phase component and the imaginary part is the quadrature component. This complex signal is demodulated with a known complex phasor rotating in opposite direction to the input. The advantage of this method is that the demodulation does not introduce a double frequency component. For signals with high signal to noise ratio, the filtering demand for the double frequency component can often limit the speed of Ihe frequency estimator. Hence, the method can improve fast frequency estimation of signals with good noise properties. The method looses its benefits for noisy signals, where the filter design is governed by the demand to filter harmonics and white noise. The method has been previously published, but not explored to its potential. The paper presents four examples to illustrate the strengths and weaknesses of the method. 1. Introduction Fast and accurate frequency estimation in presence of noise is a challenging problem that has attracted a lot of attention. Many solutions have been suggested, both in signal processing and in power system publications. Che 3per computational power has boosted the use of mor12 refined signal processing methods. A new research area, known as time-frequency signal analysis, has emerged and is discussed in [7], [8]. This area deals with instantaneous frequency estimation and is, to some extent, also applicable to power system frequency estimation. 96 Shrl379-8 PWRD A paper recommended and approved by the IEEE Power System R elaying Committee of the IEEE Power Enginee ring - August I 996, in Denver , Colorado. Ma nuscr ipt submitted December 28, 1 395; made avail able for pri nting May 21, 1996. The typical use of frequency estimation in power systems is for protection scheme against loss of synchronism [lo], under-frequency relaying and for power system stabilisation [5]. Frequency estimation in power system has evolved along several paths. Some are Change of angle for phasor measurem ents [ 11 Kalman filters [2] Zero crossing and modification thereof [31 Demo dulation with fixed frequency [3], [4] Demodulation with varying frequency. A feedback loop controls the frequency, i.e., a phase locked loop (PLL). This has been used in [5]. Estimation using identification t heory, such as recursive least squares, l east mean squares, see [6] Numerical optimisation. A Newton type method has been used in [9]. The applications can be categorised based on their time demand, that is, critical real time applications, such as relay protection; on-line data monitoring in control room; off-line data analysis of computer recordings. The classification is useful since the different time demands put restrictions on what type of frequency estimator and filter technique that can be used. In off-line data analysis we have access to the full time series and the estimation and filtering can be improved by using non- causal forward-backward filtering. The term causal is explained in [ 111, but basically it means that only sam ples at and before time k can be used to calculate the output at time k. For example, the relation y(k)=u(k)-u(k- 1) is causal, whereas y(k)=u(k+l)-u(k-1) is non-causal. To compare different methods we need a test criterion that reflects relevant demands. Three such demands are: speed of convergence; accuracy; and noise rejection. The key problem is to find a method that improves all these demands and not just compromise one demand for another. 0885-8977/97/$10.00 996 IEEE

Upload: thomas-boyd

Post on 03-Jun-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Frequency Estimation by Demodulation of Two Complex Signals

8/12/2019 Frequency Estimation by Demodulation of Two Complex Signals

http://slidepdf.com/reader/full/frequency-estimation-by-demodulation-of-two-complex-signals 1/7

IEEE: Transactions on Power D elivery, Vol. 12, No. 1, January 1997 157

Frequency Estimation by Demodulation of Two Complex Signals

Magnus Akke

Sydkraft ABS-205 09 Malmo

Sweden

Abstract

This paper presents a m ethod for frequen cy estimation in

power system by demodulation of two complex signals.

In power system analysis, the @transfo rm is used toconvert three phase quantities to a complex quantity

where the real part is the in-phase component and theimaginary part is the quadrature component. This

complex signal is demodulated with a known complex

phasor rotating in opposite direction to the input. The

advantage of this method is that the demodulation does

not introduce a double frequency component. For signals

with high signal to noise ratio, the filtering demand for

the double frequency com ponent can often limit the speed

of Ihe frequency estimator. Hence, the method can

improve fast frequency estimation of signals with goodnoise properties. The method looses its benefits for noisy

signals, where the filter design is governed by the demand

to filter harmon ics and white noise. The method has been

previously published, but not explored to its potential.

The paper presents four examples to illustrate the

strengths and weaknesses of the method.

1. Introduction

Fast and accurate frequency estimation in presence ofnoise is a challenging problem that has attracted a lot ofattention. Many solutions have been suggested, both in

signal processing and in power system publications.

Che 3per com putational power has boosted the use of

mor12 refined signal processing methods. A new research

area, known as time-frequency signal analysis, has

emerged and is discussed in [ 7 ] , [8]. This area deals with

instantaneous frequency estimation and is, to some extent,also applicable to power system frequency estimation.

96 Shrl379-8 PWRD A paper recommended and approved by the IEEEPower System Relaying Committee of the IEEE Power Engineering

Society for presentation at the 1996 IEEWPES Summer Meeting, July 28- August I 996, in Denver , Colorado. Manuscript submitted December

28, 1 395; made available for printing May 21, 1996.

The typical use of frequency estimation in power systems

is for protection scheme against loss of synchronism [lo],

under-frequency relaying and for power system

stabilisation [5]. Frequency estimation in power system

has evolved along several paths. Some are

Chang e of angle for phasor measurem ents [11

Kalman filters [ 2 ]

Zero crossing and m odification thereof [31

Demo dulation with fixed frequency [ 3 ] , [4]

Demo dulation with varying frequency. A feedback loop

controls the frequency, i.e., a phase locked loop (PLL).This has been used in [5].

Estimation using identification theory, such as recursive

least squares, least mean squares, see [6]

Numerical optimisation. A Newton type method has

been used in [9].

The applications can be categorised based on their time

demand , that is,

critical real time applications, such as relay protection;

on-line data monitoring in control room;

off-line data analysis of co mputer recordings.

The classification is useful since the different time

demands put restrictions on what type of frequency

estimator and filter technique that can be u sed. In off-line

data analysis we have access to the full time series and the

estimation and filtering can be improved by using non-

causal forward-backward filtering. The term causal is

explained in [111, but basically it mean s that on ly sam ples

at and before time k can be used to calculate the output at

time k. For example, the relation y(k)=u(k)-u(k- 1) is

causal, whereas y(k)=u(k +l)-u(k-1) is non-causal.

To compare different methods we need a test criterionthat reflects relevant demands. Three such demands are:

speed of convergen ce; accuracy; and no ise rejection. Thekey problem is to find a method that improves all thesedemands and not just compromise one demand foranother.

0885-8977/97/$10.00 996 IEEE

Page 2: Frequency Estimation by Demodulation of Two Complex Signals

8/12/2019 Frequency Estimation by Demodulation of Two Complex Signals

http://slidepdf.com/reader/full/frequency-estimation-by-demodulation-of-two-complex-signals 2/7

Page 3: Frequency Estimation by Demodulation of Two Complex Signals

8/12/2019 Frequency Estimation by Demodulation of Two Complex Signals

http://slidepdf.com/reader/full/frequency-estimation-by-demodulation-of-two-complex-signals 3/7

159

To m ake the analysis straightforward we first assume that

the input voltages VI , v2, v3 do not have any negative

sequence voltage nor any noise. We then have

4)(k) =A[cos(w,t, + I+ jsin(w,t, + I]

A ej(wltk+@)

where A is the phase to phase RMS-value.

The demodulation is done with a complex signal Z , thatrotates in the opposite direction, i.e., negative sequence,

compared to the input signal V.

Z(k) = e joOtk

V(k) = A&(mltk+ ) (k) = Aej[ ol-wO)tk+~l

Figure 2. New demodulation of two complex signals.

The signal Z with a known frequency is

Z(k) = cos(-o, tk )+ s in(-motk) =e- Joo tk. 5 )

The resulting signal, Y, after the m ultiplication becomes

Y(k) = V(k) . Z(k) = A @I tk+@)e-jwOk

A ej[(ol-wO)tk+@]

= A(cos[(w, -w,>t ,+$]+ jsin[(w, -w ,) t ,+ ~] ). 6 )

Note that the demodulation does not create the double

frequency component. Hence, the d emodulation does not

add demands to filter away the double frequencycomponent. However, there still might be a need to filter

due to noise. The frequency estimation is done as in [3].

To find the phase difference, we define the complex

variable U as

U(k) = Y (k ) .Y( k 7 7)

where * stands for conjugate. We separate Y in real and

imaginary part and find that

U(k ) = Re[Y (k)] Re[Y (k )]+ m[ Y (k)] Im[ Y(k )]

+ { Im[Y( k)] Re[Y ( k )] Re[Y (k)] Im[Y( k )]}. (8)

The phase difference y between two consecutive samples

is calculated from the real and imaginary part of U.

(9)

The dev iation in a ngular frequency is estimated from1

AtAm( k .5) = -[y( k) Y(k )] = f, [y(k) (k )] (10)

The time index k-0.5 is used to point out that the estimateis best in the middle of the time interval [k , k] . For real-

time application we are restricted to causal relations and

get

1t [ y ( k ) ( k111= fs .[y k) ( k 11 (1 1)

The unknown frequency for the signal V is estimated as

where fo is the nom inal, and f, is the sampling frequency.

Typical use of this demodulation is for frequency

estimation by demodulation with a fixed frequency or by

a PLL where the demodulation frequency is c ontrolled byfeedback.

3. Demodulation Examples

The purpose of this section is to give examples to

illustrate the strengths and weakness of the proposed

method. The used examples are:

1. Step in frequency under ideal noise conditions; no

noise, no negative sequence, no additional filters are used.

2. Test signal from [3] with low noise; no negative

sequence. No additional filters.

3. Test signal from [3], with medium white noise,

3:rd harmonics, 5:th harmonics and negative sequence.

Additional filters that a re c ausal.

4. Same test signal as 3) but filters that are non-causal.

The program M atlab has been used for calculations. The

code for Example 3 and 4 are given in Appendix A.

Example 1: Step in frequency under ideal conditions

The test signals are three noise-free symmetrical phase

voltages. There is a step change in frequency from 50 to

51 Hz at t=100 ms. T his signal is unrealistic since power

frequency can not chan ge instantaneously. The test signal

is only chosen to illustrate that, with a perfect symmetry

and without any noise, the demodulation gives an exact

frequency estimate within one sam pling interval.

Figures 3-5 illustrate the new demodulation. Note thedifferent time scales.

Real p n af vmaglnsry pa Dl v 2,

I I I01 0.15 2 25

Time ( 1$ 1 015 02 0 2 5

Time E)

R e a l pa,, O l Zpa 01z

Figure 3. Real and imaginary part of the complex input signal V

and the demodulationsignal Z.

Page 4: Frequency Estimation by Demodulation of Two Complex Signals

8/12/2019 Frequency Estimation by Demodulation of Two Complex Signals

http://slidepdf.com/reader/full/frequency-estimation-by-demodulation-of-two-complex-signals 4/7

160

Io z 0 4 5 8 1

T mB a)“a 2 01 6 8 1

Time Is1

Figure 4. Real and imagina ry part of the demodulated signal Y as

well as amplitude and phase of the same sign al.

Estimated Frequency

Freq

Figure 5. Frequency estimate from the demodulated signal Y. No

noise present, nor any nega tive sequence voltage.

From this exam ple we see that under ideal conditions, we

can nearly make an arbitrary fast frequency estimator.

The only limitation is the analogue anti-aliasing filters.

Example 2: Test signal [3] and very low noise

In this example we use the test signal from reference [3 ]

The three phase voltages a re

v, (k) = &A rms sin($, (k)) + N, (m,6 i = 1,2,3

where the angles are calculated from

@ i ( k ) = + , ( k - l ) + o ( k ) A t ; for k 2 l

with the initial values

The frequency is time varying,

o ( k ) = 2 . ~ [ 5 0 sin(2 . .n.l. k )+ 0 .5 , s in (2 .7~6 . k)].

The notation N(m,o) is used for normally distributed

white noise. In this example the standard deviation is

0=0.0001 and the mean m=O. The signal used has anRM S-value of 1p.u. giving a signal to no ise ratio of

SNR = 20 log(- ) = 8 0 d B .0.0001

True freq.= Solid; Estimate=DashDot; SNR=80 dB51.5

495’ 0:1 0’2 0’3 0:4 0’5

Time s)

Figure 6. True and estimated frequency for SN RS O dB and nofiltering of estimate.

This example illustrates that the algorithm works well for

SNR above 80 dB. For lower signal to noise ratios the

frequency estimate needs to be filtered. The two

following examples show filtering in two alternative

situations. Example 3 shows filtering for real-time

applications, such as relay protection. Example 4 shows a

filtering method that can be used for off line calculations,

for exam ple filtering of fault recordings.

Example 3: Test signal [3] with medium noise; causal

filter.

We consider the same type of test signal as in Example 2,

but now distorted with

-Negative sequence of 1%;

-white noise with SN R 40 dB;

-3:rd harmonic, 5 %, mainly z ero sequence;

-5:th harmonic, 2 %, mainly negative sequence.

Matlab’s Signal Processing Toolbox was used to test

various filters. The final c hoice was a 3:rd order low pass

Butterworth filter with a cross over frequency of 20 Hz.

The code is given in Appendix A. Figure 7 shows the true

signal and the frequency estimate be fore filtering.

True freq.=Solid Unfiltered estimate=DashDot S N R=40 dB60

400 0.1 0.2 0 3 0.4 0 5

Time (s)

Figure 7. True and estimated frequency for SNR=40 dJ3 beforefiltering.

Figure  6 shows the simulation result, Note that no

filtering has been used, neither before, nor after thefrequency estimation.

Figure 8 shows the effect of the Butterworth filter.

Page 5: Frequency Estimation by Demodulation of Two Complex Signals

8/12/2019 Frequency Estimation by Demodulation of Two Complex Signals

http://slidepdf.com/reader/full/frequency-estimation-by-demodulation-of-two-complex-signals 5/7

161

The proposed demodulation can be made very fastfor signals with high signal to noise ratio

(SNR>80dB).

The frequency e stimate needs filtering when the S N R

value falls below 8 0 dB.

Causal filtering introduce a time delay. This is true

also for filters such as Bessel with a maximal flat

phase, that implies constant group delay. A constant(non-zero) group delay results in a fixe d time delay.

For off-line calculation we can use non-causal filters

to reduce the time delay. This gives significant

improvements.

True and filtered estimate; SNR=40 dB51.5

49.5' I0.1 0.2 0.3 0.4 0.5

Time s)

Figure 8. True and estim ated frequency filtered in 3:rd order low-pass Butterworth filter with crossover frequency of 20 Hz.

SNR=40 dB.

We see that the filter has introduced a lag, so the estimate

lags the true frequency by around 20 ms. A cross-over

frequency of 20 Hz, still introduces some phase shift at

lower frequencies. This can be seen in the Bode plot of

the filter.

For off-line applications where the raw data have been

sampled and stored, it is possible to reduc e the lag effect.

This is shown by the next example.

Example 4: Same test signal as Example 3, but non-

causal filter.

In this example the full time series is used. The phase

shift is reduced by applying forw ard filtering followed bybackward filtering. The filtering is performed in the

Matlab package by the command Jil@lt and is described

in reference [12]. We use the same filters as for Example

3 and filters the estimate twice, first forward and then

backward. The resulting sequence has precisely zero-phase distortion and double the filter order. We get Figure 

9 that shows significant improvements, except at the

beginning and e nd, w here initial transients from the filter

show up.

True freq. = Solid; Filtered=DashDot; SNR=40 dB51.5

0.1 0.2 0.3 0.4 0.5Time (s)

Figure 9. True and estimated frequency forward-backwardfiltered in 3:rd order low-pass Butterworth filter with crossoverfrequency of 20 Hz. SNR=4O dB.

These four exam ples show that:

4. Discussion

In frequency estimation by de mod ulation there is a need

to filter signals for various reasons. If we exclude anti-

aliasing filters, the m ost imp ortant reasons are reduction

of white noise, harmonics and the double frequencycom ponen t caused by the d emo dulation. The proposed

method does not introduce the double frequency

component. As a consequence, we do not need to filter

for this specific reason. Therefore the proposed method

will show its advantage for applications where the main

concern of the filtering has been the double frequency

compon ent from the demo dulation. In contrast, the new

method will only give minor improvements for signals

with a large content of white noise and harmonics that

need a lot of filtering for these reasons.

Unsymmetric phase voltages

The proposed method w orks excellent when the negative

sequence component is small. If the input contains

negative sequence, the demodulation introduce a double

frequency com ponen t that is proportiona l to the negative

sequence amplitude. This gives the same type of doubIe

frequency component as the traditional demodulation

method. Even though, for most cases our situation is

better, because of the proportionality to the negative

sequence, the amplitude of the double frequency

compon ent is small. How ever, at unsymmetrical fau lts the

negative sequence component can be large. In these

situation the proposed method will give a double

frequency component with a large amplitude and will

work similar to the old demodulation m ethod.

Discrete Hilbert transform filter

The ab-transform is used to get the complex phasor

representation of the three phase inputs. The real and

imaginary parts hav e a phase difference of 90 degrees. An

alternative way to ac hieve this is to use a discrete Hilberttransform filter, as suggested in [lo]. This filter can be

designed to have 90 degrees phase shift and unity gain for

the frequency band of interest. The drawback with a

discrete Hilbert transform filter is that the filter introduces

a time delay of half the filter length. An ad vantag e is that

we can use the three phasors inde pend ently and use the

Page 6: Frequency Estimation by Demodulation of Two Complex Signals

8/12/2019 Frequency Estimation by Demodulation of Two Complex Signals

http://slidepdf.com/reader/full/frequency-estimation-by-demodulation-of-two-complex-signals 6/7

162

mean value as a filtered estimate. In signal processing, th e

Hilbert transform plays a key role for frequencyestimation, see [7], [8], [ I l l . It might be possible that

improvements can be made by using a discrete Hilbert

transform filter instead of the a@-trans form .

Yet another alternative is to use sine and cosine filters.

Reference [131has used this to divide a scalar input signal

into two orthogonal components. The drawback with thismethod is that-in addit ion to the filter tim e delay-the

two filter gains are equal only at the nominal frequency.

Phased Locked Loop PLL)

The proposed demodulation method can also be applied

to PLL as already done in [5]. In the design in [SI, four

FIR filters of a total order of 130 were used inside the

control loop. Filters inside the co ntrol loop puts an upper

limit to PLL performance. From a control point of view it

seems better to filter away harmonic and noise before the

signal enters the PLL. Without any filters inside the PLL

loop, the PLL can be made much faster without stability

problems.In our work we have not found any improvements by

using PLL demodulation instead of demodulation with a

fixed frequency.

5. Conclusion

Demodulation is a promising method for power system

frequency estimation, but one drawback is that the

demodulation itself, introduces a double frequency

component that needs to be filtered. This paper has

demonstrated a demodulation method that solve this

problem. The method uses three phases as inputs and the

ap-transform to convert these inputs to a complex vector

with two orthogonal components. This vector is

demodulated using a complex vector with known

frequency, rotating in the opposite direction. The

resulting signal does not contain the double frequency

component. Hence, a filter for this specific purpose is not

needed.

Advantages with the proposed dem odulation:

* No need to filter the double frequency;

Can be m ade extremely fast for low noise signals

Disadvantages with the proposed demodulation

e The advantages are much reduced if the input signal

contains a large negative sequence component, that might

appear under fault conditions.

* All three phases are used for one calculation. Othermethods that use all the three phases independently, canuse the mean value of the them as a filtered estimate.

Acknowledgement

This work has been supported by a research grant from

Sydkraft. I am also grateful for help from my supervisors

S. Lindahl, Professor G. Olsson and L . Messing.

References

[1] A. G. Phadke, J. S. Thorp, M. G. Adamiak, A New

Measurement Technique for Tracing Voltage Phasors,

Local System Frequency, and Rate of Change ofFrequency , IEEE Trans. on Power Apparatus and

Systems, Vol. PAS-102, No. 5, 1983, pp. 1025-1038.

[2] A. A. Girgis, W . L. Peterson, Adap tive Estimation of

Power System Frequency Deviation and its Rate of

Change for Calculating Sudden Power System

Overloads , IEEE Trans. on Power D elivery, Vol. 5 ,

No. 2, April, 19 90, pp. 585-594.

[3] M . M. Begovic, P. M. Djuric, S. Dunlap, A. G.Phadke, Frequency Tracking in Power Networks in

the Presence of Harmonics , IEEE Trans. on Power

Delivery, Vol. 8, No. 2, April, 1 993, pp. 480-486.

[4] A. G. Phadke et al, Synchronized Sampling and

Phasor Meas urements for Relaying and C ontrol ,

IEEE Trans. on Power Delivery, Vol. 9, No. 1,January, 1 994, pp. 442-452.

[ 5 ]V. Eckhardt, P. Hippe, G. Hosemann, Dynamic

Measuring of Frequency and Frequency Oscillations

in Multiphase Power Systems , IEEE T rans. on Power

Delivery, Vol. 4, No. 1, January, 19 89, pp. 95-102.

[6] I. Kamwa, R. Grond in, Fast Adap tive Schem es for

Tracking Voltage Phasor and Local Frequency in

Powe r Transmission and Distribution Systems , IEE E

Trans. on Power Delivery, Vol. 7, No. 2, April, 1992,

pp. 789-795.

[7] B. Boas hash, Estimating and Interpreting T he

Instantaneous Frequency of a Signal - Part 1:

Fundamentals , Proc. of IEEE, Vol. 80, No. 4, April,

[SI B. Boashash , Estimating and Interpreting Th eInstantaneous Frequency of a Signal - Part 2:

Algorithms and Application , Proc. of IEEE, Vol. 80,No. 4, A pril, 1992 , pp. 540-568.

1992, pp. 520-538.

Page 7: Frequency Estimation by Demodulation of Two Complex Signals

8/12/2019 Frequency Estimation by Demodulation of Two Complex Signals

http://slidepdf.com/reader/full/frequency-estimation-by-demodulation-of-two-complex-signals 7/7

163

Epsilonl =zeros(size(t));

Epsilon2=zeros(size( )) ;

Epsilon3=zeros size t));

Epsilonl 1)=0;

Epsilon2(1)=-125 @/I80;

Epsilon3(1)=1 5 * p i 480;

for k=2:length(t);

Epsilonl k)=rem Epsilonl k-l)-5*wl k) dt,2*pi):

Epsilon2 k)=rem Epsilon2 k-l)-5*wl k) d t ,2*pi);

Epsilon3 k)=rem Epsilon3 k-I)-5*wl k) dt,2*pi);endqo.......................................................

Hurml =zeros(size(t));Hurm2=zeros(size(t)); Hurm 3=zeros(si~e(t));

Hurml =O.O5*VI *sin(G ummu l)+0.02*VI *sin(Epsilonl);

Hurm2=0.05 V2'Sin(Gummu2)+0.02 V2 *sin(Epsilon2);

Hurm3 =O. 05*V3 *sin(Gumma3)+0.02 *V3*.~in(Epsil0?~3);

% Phusors

V I =VI *sin(TetuI +Sigmu*rundn(size( ))+Hurml;

v2=V2 *sin Tetu2)+Sigmu*rundn size t))+HurmZ;

v3= V3*sin(Tetu3)+Sigma*randn(size(t))+Hurm2;

% Alpha Betu Components

Alpha=sqrt(2/3) ( V I -0.5*v2 -0.5 *v3);

Betu =sqrt(lQ)*(v2 - v3);

% Complex input signulV=Alpha+j*Betu;

% Modulutiqn signulZ=cos(-2*piTf *t)+j*sin(-2*pi?jO*t);

% Demoduluted signul

Y= v.*z;Im-Y=imug(Y); Re_Y=reul(Y);

Amp-Y=sqrt(Re-Y. *Re-Y+lm-Y. *Im-Y);

Pha_Y=utan2(lm_Y,Re_Y);

% Create the signul U

NN= ength( Y) ;

Re-U=[O Re-Y(2:NN). *Re-Y l:NN-l)+Im-Y 2:NN).Im-Y(I: NN-I)] ;

lm-U=[0 Im-YI2:NN). *Re-Y I:NN-I)-Re-Y 2:NN).Im-Y(I:NN-I)l;

70

Arg_U=utun2(lm_U,Re_LI);

.flhut= fo+fi Arg-V./(2 *pi);7 ___----

N=3; % jilter order

fc=20; % ( Hz ) Cut o f frequency

fn= f YQ;

filter estimate ________--

% spec cution in normulize djrequency

Wn= d f n ;

% design LP Butterworth,fi'lter

[B,Al=butter(N,W n ) ;%jilte r the estimate

,fLhutfilt-ex3 = ilter(B,A,,fLhut;fO)+fO;

, f ~ h a t f i l t ~ e x 4 = ~ l ~ i l t ( B , A , . f ~ h u t ~ f ~ ) i f ~ ;

[9] V. V. Terzija et al, Voltage Phasor and Local System

Frequency Estimation Using Newton Type

Algorithm , Paper 94 WM 016-6 PWRD, IEE EPE S

1994 Winter Meeting, New York, January 30 -February 3, New Y ork, 1 994. Later published in IEEE

Trans. on Power Delivery (T-PWR D), July, 1994.

[ l o ] P. Denys, C. Counan, L. Hossenlopp, C. Holweck,

Measurement of Voltage Phase for the French FutureDefence Plan Against Losses of Synchronism , IEEE

Trans. on Power Delivery, Vol. 7, No. 1, Jan, 1992,

pp. 62-69.

[111 A . V. Oppen heim, and R. W. Schafer, Discrete-Time

Signal Processing, Prentice-Hall, Englewood Cliffs,

New Jersey, USA, 1989.

Natick, Mass.

[13] P. J. Moore, R. D. Carranza, A. T. Johns, " A NewNumeric Technique for High-speed Evaluation of

Power System Frequency , IEE Proc.-Gener. Transm.

Distrib., Vol. 141, No. 5 Sept, 1 994, pp. 529-536.

[121 Matlab-Reference Guide, The Mathworks, Inc.,

Appendix

A. Matlab code for new demodulation

% % test qfcomplex demodulution

% Ex 3 und 4 in paper

,ji=I000; % ( H z ) sumplingfrequency

Sigmu=le-Z; % stundurd deviutionfiv noise

j0=50; % Hz;

V-rm.i=l.O;

V I =,ryrt(2) V-rms; Phil =0.3;

V2=1 015 V I ; Phi2 =Ph il -2 *pi/3;

V3=1.015*VI; P hi3=Phil+2*pi/3;;

SNR=2O*logI 0( V-rms/Sigmu);

t=[0:dt:0.5];

. f l=(to) ones(size(t))+ *sin(2*pi31*t)+0. *si42*pi*6*t);

wl=2*pi;y ' l ;%-------Angles,fi,r,fundumantul phusor quuntities----------

Tetul =zeros(size(t));

Tetu2 =zeros(size(t));

Tetu3=zeros(size(t));

Tetul(I)=Phil; Tetu2(1)=PhiZ; Tetu3(1)=Phi3;

.for k=2:length (t);

dt=14r;

Tetul(k)=rem(Tetul k- l)+w l(k)*dt ,2 pi);

Tet~Z k)=rem Tetu2 k-l)+wl k)*dt,2~~pi);

Tetu3 k)=rem Tetu3 k-l)+wl k)*dt,2 pi);

end

%------- Angles,for 3:rd harmonic ----------Gumm ul =zeros(size.e(tJ);Gummu2=zeros(size(t));

Gumma3 =zeror(size(t));

Gummul I ) =O ;

Gummu2(1)= lO;Kpi/ l0;

GammuJ 1 = I O f p i / 1 8 0 ;

,for k=2: ength(t);

Gummul (k)=rem(Gummul k-I)+3*w l k) d t ,2*pi);

Gummu2(k)=rem(Gummu2(k-l)+3*wl(k)*dt,2*pi);

Gummu3 k)=rem Gummu3 k-1)+3wl k)*dt,2 pi);

end% ...............................................

%-------Anglesfrir5:th hurmonic ..........