Numerical algorithm for measurement of angle phase shift for sines ...

1 downloads 0 Views 592KB Size Report
ABSTRACT. This paper presents one method for measurement of phase shift between signals in electric power system (EPS), such as voltages or currents.
NUMERICAL ALGORITHM FOR MEASUREMENT OF ANGLE PHASE SHIFT FOR SINES SIGNAL Abdulah Akšamoviü, Samim Konjicija Faculty of Electrical Engineering University of Sarajevo, B&H [email protected] ABSTRACT This paper presents one method for measurement of phase shift between signals in electric power system (EPS), such as voltages or currents. The presented algorithm is very simple and efficient, and it can be used for purposes of protection, control and measurement in EPS, as well. The algorithm is based on mathematically simple expressions, which don't require high processing power, so it is convenient for single chip applications. This algorithm is considered with high and low sampling rate, and proper pre-processing of signal in integrated data acquisition and control systems in EPS is proposed. It is shown that the achieved accuracy can satisfy requests of intended application.

2. THE DESCRIPTION OF THE PROBLEM Let there exist sine signals x1(t) and x2(t) (Figure 1).

x1 (t ) A1 sin(Zt ), x 2 (t ) A2 sin(Zt  M ). 4 3 2 1 0

1. INTRODUCTION Numerical systems for measurement, control and protection have been used in electrical power systems for a long period of time >1@->4@. There are many cases where it is necessary to acquire on time satisfactory precise information on phase shift between signals in electric power system, like voltages or currents. No matter if it concerns measurement of cosM, synchronization of voltages of generator and network, directed protection unit etc., it is necessary to determine the angle of the phase shift between the two basically sine signals. Each example of application has its features and uses different techniques to determine this angle. This paper will present an algorithm, which can be used for any of the mentioned applications. The algorithm is founded so that it can be efficiently implemented on a relatively simple microcomputer, therefore it is convenient for applications based on single chip. In current research of more efficient control of EPS encompass integration of data, which represent system parameters >5@->8@. Such data would be used in an integral information system of EPS for various purposes. In three-phase systems, up to 8 informational signals are required for one feeder (4 currents and 4 voltages). Currently used sampling frequencies for transient registration purposes enable up to 64 samples per period, what requires data bandwidth of 512 Kbps for just one feeder, when 10-bit analog to digital converter (ADC) is considered. With large number of objects present in an EPS, such as feeders, transformers, generators, etc., it is clear that the required bandwidth can be met with difficulties, and that this communication channel is in fact weak point of such approach. Therefore, the procedure of pre-processing of signals at the very object and their further distribution in such pre-processed form to users is considered as one possible solution for the mentioned problem >9@. Calculation of phase shift of currents and voltages would be interesting in such pre-processing procedure.

0-7803-8715-5/04/$20.00 ©2004 IEEE.

(1)

-1 -2

0

5

10

15

20

25

TM

-3 -4

Figure 1. Phase shift between two sine signals The signals x1(t) and x2(t) have the same frequency (f=2SZ) and the angle of their phase shift M is proportional to the time distance between their consequent transitions through zero-level in the same direction (TM). The relation between the phase angle M and the time interval TM is given with the formula (2):

TM (2) ˜ 360, T where T 1 represents the period of the signals x1(t) and x2(t). f M

It is clear that it is possible to determine the phase shift angle by determining the interval TM, when we consider just the absolute value of that angle, not its sign. We are usually not interested just in the value of the angle, but also its sign. In order to determine the sign of this angle, it is necessary to consider one of the signals x1 and x2 as the reference. So, if the signal x1 is taken as reference (that will be the case in this paper), and if the signal x2 passes through zerolevel as first, then the angle M is positive, and it is said that signal x2 forwards signal x1. Contrary, if the signal x2 passes through zerolevel as second, then the angle M is negative, and it is said that signal x2 delays signal x1. In order to define the algorithm for measurement of the phase shift angle, two auxiliary functions p1(t) and p2(t) will be introduced. Each function represents the polarity of signals x1 and x2, in the way that p1(t) equals to 1 if the signal x1 is non-negative, and equals to 0 if the signal x1 is negative. The function p2(t) is defined in the same way.

451

3. DIGITAL IMPLEMENTATION

­1,...........x1 t 0, p1 (t ) ® ¯0,...........x1  0. ­1,...........x2 t 0, p2 (t ) ® ¯0,...........x2  0.

Numerical system, which can be used for measurement of the phase shift angle, is represented in Fig. 3.

DISPLAY

(3)

x1

LPF

S/H

p1(t)

MUX x2

p2(t)

Figure 2. Auxiliary functions p1(t) and p2(t) induced from signals represented in Figure 1

Although p1(t) and p2(t) represent functions of continuous time, their values are discrete, so they can be considered as logical functions. Therefore, the function of the angle 4M(t) will have discrete values 0 and 1, so that it can be described as the logical function. The analytical description of that function can be induced from the Table I:

4M (t )

p1 (t ) p 2 (t )  p1 (t ) p 2 (t )

p1 (t ) † p 2 (t ). (4)

The time interval proportional to the phase shift angle can be calculated as the integral of the mentioned function at one half of the period >10@:

t0 TM

³ 4M (t )dt ,

(5)

M

360 T

t0

³ ( p1(t ) † p2 (t ))dt.

(6)

The single-chip implementation can look different. In the case that S/H circuit is unique, the signals x1 and x2 can't be sampled simultaneously. That produces system error proportional to the time necessary for A/D conversion. For 50 Hz signals, and for 10 Ps conversion time, this error is 0.18q. The mentioned error is known (Formula 7) and it can be taken into account by the algorithm.

'M

T AD ˜ 360 T

(7)

where 'M represents the absolute error for measurement of the angle, TAD is A/D conversion time. In the microcomputer, the signals x1 and x2 will be discretized both regarding their level and the time. The discretized signal in the moment nT can be represented as: 2b  1 (8) ˜ x(t )) ˜ G (t  nT ) x(n) INT ( Am in which: b - number of bits of A/D converter, Am – maximal range of the input of A/D converter. The auxiliary functions p1(t) and p2(t), as well as the function of angle can be calculated from the discretized signals (8) in the microcomputer. The relations for the mentioned signals in discretized form would be:

­1,...........xi (n) t 0, pi ( n ) ® ¯0,...........xi (n)  0. 4M (n) p1 (n) † p2 (n)

i=1,2

(9) (10)

The absolute value of the angle ij(n) can be calculated according to the formula: N

t0 T / 2

The sign of the angle is determined at t1 within the integration interval, t1>t0-T/2,t0@, during which the function p1(t) changes its value, i.e. p1(t1)z p1(t2), where t2 represents time which forwards t1. Then, according to the accepted reference system in which x1 represents reference signal, if p1(t1)= p2(t1) then the angle is positive, and in the contrary case this angle is negative.

S/H

Figure 3. Numerical system for measurement of the phase shift angle

t0 T / 2

where is t0 time when calculate TM. By introducing (4) into (5) and (5) into (2), the absolute value of the phase shift angle can be calculated as:

µP

x1,x2 - analog input signals; LPF - analog low-pass filter; S/H - sample and hold circuits; MUX - multiplexer; ADC - analog to digital converter; µP - microcomputer; DISPLAY- display of the measured value.

t

If we consider the functions p1(t) and p2(t) as functions with logical values, then the time interval proportional to the angle of the phase shift TM (the shaded part in Fig. 2) can be represented as in the Table I. TABLE I THE TRUTH TABLE FOR ANGLE FUNCTION p2(t) p1(t) 4M(t) 0 0 0 0 1 1 1 0 1 1 1 0

LPF

ADC

M ( n)

1

360 2 ¦ 4M ( n  k ) N k 0

(11)

where N represents the number of the samples in one period. The direction of this angle can be determined in the discrete moment n in which:

p1 (n) † p1 (n  1) 1

452

(12)

For such n, the sign of the angle can be determined according to:

p1(n) † p2 (n)

­1, then is M  0 ® ¯0, then is M ! 0

(13)

(The angle is zero when M(n) for the formula 11 has value zero). This algorithm can calculate values of the angle in range between -180q and 180q. Figure 4 represents the graphs of digital signals for N=16. The angle in this example was 30q, while calculated values from the diagram were: 0, 36q and 18q. This diagram, besides the principle of operation, shows also the disadvantages of the algorithm. The area with zero-level measurement result relates to the starting period, while there were no ones in the function of angle. This shows that the algorithm delays after the change in angle, which lasts up to one half of the period (10 ms, f=50Hz). The next disadvantage is a large error (+6q and –12q), as consequence of a small number of samples during one period. Increasing the sampling frequency can diminish the influence of this disadvantage.

The third disadvantage represents the possibility that different number of ones in auxiliary function pi(n) appears at the end of positive part of one of the signals (x1 in the example) and at the end of negative part of the signal. This is the case because of asymmetric definition of the function pi(n), which adds zero level of the input signal to the values of log 1. Such problem is not probable in practice implementation, since it is very rare that the signal is sampled while passing through zero. Also, this problem becomes less influential as sampling frequency increases. The Table II show that it is possible to achieve satisfactory accuracy (around 0,1q) with 3600 samples per period, which is not to much for microcomputer dedicated to nothing else but phase angle measurement. Better accuracy (achieved with higher sampling frequencies) requires highest quality of other components with influence on accuracy (ADC, for example), what is not easy to achieve. Therefore, for practical applications, interesting number of samples in one period would be between 360 and 3600, what produces error from 1q to 0,1q. TABLE II DEPENDENCE OF ABSOLUTE VALUE OF MEASUREMENT ERROR ON NUMBER OF SAMPLES IN ONE PERIOD N N 'Mq 'Mq 10 36 360 1 36 10 720 0,5 72 5 1440 0,25 144 2,5 1960 0,167 196 1,67 2880 0,125 288 1,25 3600 0,1

x1(n)

no

4. SYSTEM WITH CORECTION ERROR ON EDGE INTERVAL

x2(n)

no

p1(n) 1

In order to decrease the measurement error for such small number of samples of input signal, a method of measurement is used, which enables correction at the ends of the interval, where the angle function has value of one. The principle is in calculating the time of crossing zero level based on ratio of amplitudes of the sampled signal before and after crossing zero >11@. As it is illustrated on Fig. 5., sine signal can be approximated with linear function when small values of angle are considered (sinx=x, xo0).

no

p2(n) 1

C

no

4M(n)

x(n)

1

n-2

no

n-1 A

n M

O

x(n-1)

B

Tk

M(n)

x(n-2) 36

Ts

18 no

Figure 4. Algorithm principle, N=16

Figure 5. Metode corection error with small number of semples

453

With such linear interpolation of crossing zero level, from similarity of triangles ABC i OMC on Fig. 5, the following can be concluded: x ( n) (14) Tk ˜ Ts x(n)  x(n  1)

x1

XOR x2

where Tk represents time passed between the signal crossed zero level and the moment of the first sample with positive value of that signal; x(n-1) and x(n) are the values of the signal before and after passing zero level; Ts is sampling period. The correction of error for negative passing through zero level can be determined similarly. The correction of error is calculated for consequent passing through zero level, in the same direction, for current and voltage. For correction calculated in such way, the phase shift angle can be determined according:

M ( n)

N 1 2 T '  Tk' ' 360 ( ) 4M ( n  k )  k N Ts k 0

¦

(15)

where T’k represents error for the first signal which passes through zero level, while T’’k represents error for the second signal which passes zero level. Figure 6 illustrates the principle in which this correction is calculated at both ends of the interval where angle function equals one.

4M=1

4M=0

n-6,

n-5,

n-4,

n-3,

4M=0

n-2,

n-1,

n,

x'' Tk'' Tk' Figure 6. Principe of calculate angle phase shift with correction For correction of error calculated in such way, the accuracy better than 1q can be achieved even for N t 32, what can satisfy requirements of protection devices.

5. SYSTEM WITH ANALOG GENERATION OF ANGLE FUNCTION Good result can be achieved by modifying the schematic from Fig. 3 so that the angle function is generated at analog level, as presented in Figure 7. The schematic shown above is interesting for couple of reasons. The microcomputer doesn't have to possess ADC, there is no error produced by S/H circuit, as well as the ADC. In the same time, the algorithm for determination of phase angle is simple. Since there exist no A/D conversion, the resolution of measurement is induced from the source of stabile frequency pulses (real-time clock), or from the clock frequency.

4M(t) µP p2 (t)

DISPLAY

Figure 7. System for measurement of phase shift angle with analog generation of angle function

6. CONCLUSION This paper shows that phase shift between currents and voltages in EPS can be determined with satisfactory accuracy, by using a very simple algorithm. The presented algorithm can be implemented on simple and cheap processors, and therefore it is convenient for single chip applications. If it is necessary to synchronize the system for measurement of phase shift with sampling frequency used for other purposes, then the method with small number of samples can be used, which calculates correction at the ends of interval where angle function equals one. In cases where high accuracy is required, the implementation with analog formation of angle function, and high sampling frequency can produce excellent results.

REFERENCES

n+1

x'

p1 (t)

>@ ABB Automation, 'Station Automation & Protection SPACOM Products' Bayer's Guide 1999. Volume II. >@ Siemens AG, 'Numerical Time Overcurrent Protection Relay with Thermal Overload Protection, Earth Fault Protection, Auto-Reclosure, and Directional Option' 7SJ512 V3.2 Instruction Manuel, 2000. >@ ABB REF524 plus, Multifunction Protection and Switchbay control Unit, 2003. >@ ABB 'Feeder Terminals REF 541/543/545' >@ M.Kezunovic, G.Latisko, ‘Automated monitoring Functions for Improved Power System Operation and Control’ IEEE MELECON 2004, Dubrovnik, Croatia. >@ M. Kezunovic, H. Taylor, "New Solutions for Substation Sensing, Signal Processing and Decision Making," Hawaii International Conference on System Sciences HICSS-37 Waikoloa Vilage, HI, January 2004. >@ M. Kezunovic, "Special Report: Fault and Disturbance Data Analysis," CIGRE Colloquium, SC B5-Protection Sydney, Australia, September 2003. >@ M. Kezunovic, L. Philippot, "Future Trends in Utilizing Advanced Technologies for Fault and Disturbance Data Analysis," CIGRE Colloquium, SC B5-Protection Sydney, Australia, September 2003. >@ M. Kezunovic, T. Popovic, D. R. Sevcik, A. Chitambar, "Requirements for Automated Fault and Disturbance Data Analysis," CIGRE Colloquium, SC B5-Protection Sydney, Australia, September 2003. >@ A. Wright, C. Christopoulos, ‘Electrical Power System Protection’, Chapman & Hall, London 1993. >@ A. Akšamoviü, 'Parallel Evaluation of Microprocessors, DSP and Microcontrollers as a Support for Implementation of Feeder Protection', ETF in Sarajevo 2004, Master Thesis.

454

Suggest Documents