ECE 525

:
Power Systems Protection and Relaying
Lecture 26; Page 1/17
Fall 2010
Directional Overcurrent Relay Model
The MathCAD sheet below implements some basic relay calculations. The file takes data read from a Comtrade file
and postprocesses it.
The matrix "data" below is the data captured from a COMTRADE "*.dat" file. To read in a data file remove the table currently
at the top of the file. Then choose "Insert" ---> "Component".
This will open a dialog box. One option is to choose "Input Table". -
* Then select the first cell in the table and right click your mouse and choose "Import".
* Then browse to the "*.dat" COMTRADE file and select. This will fill in the data in the table. Then name the variable
as "data"
Another option is to choose "File Read or Write". -
* This will open a dialog box, choose Text file
* Browse for file with extension .txt or .csv.
* Your assignments will tell you which files to open.
The example below uses the File Read or Write option. -
Read Comtrade File Data
1. Read Comtrade Configuration File:
config
...\ FSLG83.cfg
:=
Right click on the floppy disk icon and select "Choose File" to
open a file browser. Choose the *.cfg file from the contrade file
(you will need to type the extension)
data
...\ FSLG83.dat
:=
Right click on the floppy disk icon and select "Choose File" to
open a file browser. Choose the *.dat file from the contrade file (it
should be an accepted file type)
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 2/17
Fall 2010
The COMTRADE file is actually threefiles. One has an extension "*.hdr". This file will be emtpy in this case. Another has the
extension "*.dat". This has the actual numerical data in columns of numbers. The third file is a configuration file and has the
extension "*.cfg" and this tells the program reading the numerical data what the columns represent. The configuration file provides
scaling and offset information for each of the variables stored as vectors. Here is a typical entry:
1,TACS LEM6IN,,,,2.6836E-06,7.6143E-04,0.0000E00,-32765,32765,1,1,P
Each data record starts entry number (1-7 here), the name for the measurements (for example "TACS LEM6IN").
The number after the 4 commas (column 5 starting numbering with 0) is a scale factor. The next number (column 6) is an offset
factor. If you don't change the scaling and offset factors, the waveforms you evaluate won't be correct. The MathCAD sheet has
further instructions.
COMTRADE configuration file format:
The first fow states how the file was created and the version of the standard 1.
The second row gives the total number of inputs (7 for these cases), number of analog inputs (7 here) and number of digital 2.
inputs (0 here)
Rows 3 - 10 are the analog inputs, in the following order: 3.
In (referred to as residual current below)
Ia
Ib
Ic
Van
Vbn
Vcn
4. Data sampled 16 times per cycle (960 Hz)
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 3/17
Fall 2010
Scaling and Offset Data from Comtrade CFG file
Read individual cells (scale from column 5, offset from column 6) -
Remember row and column indices start at 0: -
Ir
scale
config
2 5 .
:= Ir
scale
2.5162 10
4 ÷
× = Ir
offset
config
2 6 .
:= Ir
offset
1.0045 =
Ia
scale
config
3 5 .
:= Ia
scale
2.5216 10
4 ÷
× = Ia
offset
config
3 6 .
:= Ia
offset
1.0116 ÷ =
Ib
scale
config
4 5 .
:= Ib
scale
3.4249 10
5 ÷
× = Ib
offset
config
4 6 .
:= Ib
offset
0.01 =
Ic
scale
config
5 5 .
:= Ic
scale
3.4478 10
5 ÷
× = Ic
offset
config
5 6 .
:= Ic
offset
2.2585 ÷ 10
3 ÷
× =
Va
scale
config
6 5 .
:= Va
scale
5.4238 10
3 ÷
× = Va
offset
config
6 6 .
:= Va
offset
7.407 ÷ =
Vb
scale
config
7 5 .
:= Vb
scale
5.4189 10
3 ÷
× = Vb
offset
config
7 6 .
:= Vb
offset
4.4371 =
Vc
scale
config
8 5 .
:= Vc
scale
5.2139 10
3 ÷
× = Vc
offset
config
8 6 .
:= Vc
offset
0.031 ÷ =
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 4/17
Fall 2010
Enter Constants. Note that RS is the sampling rate, and the value of 16 here is assuming that the COMTRADE file was sampled at
that rate.
Phase A symmetrical
components
transform
Phase B symmetrical
components
transform
Phase C symmetrical
components
transform
a 1 e
j 120 · deg
· :=
A
012
1
1
1
1
a
2
a
1
a
a
2
|

\
|
|
|
|
.
:= B
012
1
1
1
a
1
a
2
a
2
1
a
|

\
|
|
|
|
.
:= C
012
1
1
1
a
2
a
1
a
a
2
1
|

\
|
|
|
|
.
:=
RS 16 :=
Enter vector indices for filter and relay calculations (do not change these)
i 0 rows data ( ) 1 ÷ .. :=
v
RS
4
rows data ( ) 1 ÷ .. := Offset samples by 1/4 cycles for phasor calculation
d 5 RS · rows data ( ) 1 ÷ .. := Offset samples by 5 cycles for trip calculation
If RS 1 ÷ rows data ( ) 1 ÷ .. :=
User Entered Parameters:
I am entering typical values the current transformer ration (CTR) and voltage transformer ratio (PTR). You need to change these -
to match your calculations.
CTR 1 := PTR 1 :=
Relay Settings -
Moved later in the file close to the relay model and plots.
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 5/17
Fall 2010
Read Data From Comtrade File:
The data from the COMTRADE file is now read into vectors for MathCAD to use. -
Note that these vectors are assuming that IA, IB, etc are in certain columns in the table. The numbers below assume that the -
data is assigned as described in the other handout. Columns 0 and 1 of the COMTRADE file do not store data, so Column 2 is
the first one of interest.
Since the neutral current I
N
was measured, that will be used for the residual current (IR = 3I0). -
IR
data
2
( ,
CTR
|

\
|
|
.
Ir
scale
· Ir
offset
+ :=
VA
data
6
( ,
PTR
|

\
|
|
.
Va
scale
· Va
offset
+ :=
IA
data
3
( ,
CTR
|

\
|
|
.
Ia
scale
· Ia
offset
+ :=
VB
data
7
( ,
PTR
|

\
|
|
.
Vb
scale
· Vb
offset
+ :=
IB
data
4
( ,
CTR
|

\
|
|
.
Ib
scale
· Ib
offset
+ :=
VC
data
8
( ,
PTR
|

\
|
|
.
Vc
scale
· Vc
offset
+ :=
IC
data
5
( ,
CTR
|

\
|
|
.
Ic
scale
· Ic
offset
+ :=
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 6/17
Fall 2010
Now plot the currents and voltages. These should be sinusoidal. Note that the horizontal axis is in the number of cycles since the
i/RS is sample number divided by sampling rate.
As a check, the prefault data should be balanced three phase -
Phase currents and residual current
0 5 10 15
10 ÷
5 ÷
0
5
10
IA
i
IB
i
IC
i
IR
i
i
RS
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 7/17
Fall 2010
Line to ground voltages:
0 5 10 15
200 ÷
100 ÷
0
100
200
VA
i
VB
i
VC
i
i
RS
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 8/17
Fall 2010
Digital Filter Stages:
Now the data is run through a digital cosine filter as a first step in calculating magnitude and phase. Normally the first step -
would be to perform a low pass filtering operation on the data, but since ATP Analyzer already did this, we can skip that step.
Ia
If
2
RS
0
RS 1 ÷
k
cos
2 π · k ·
RS
|

\
|
|
.
IA
If RS 1 ÷ ( ) ÷ [ ] k +
·

¯
=
· :=
Va
If
2
RS
0
RS 1 ÷
k
cos
2 π · k ·
RS
|

\
|
|
.
VA
If RS 1 ÷ ( ) ÷ [ ] k +
·

¯
=
· :=
Ib
If
2
RS
0
RS 1 ÷
k
cos
2 π · k ·
RS
|

\
|
|
.
IB
If RS 1 ÷ ( ) ÷ [ ] k +
·

¯
=
· :=
Vb
If
2
RS
0
RS 1 ÷
k
cos
2 π · k ·
RS
|

\
|
|
.
VB
If RS 1 ÷ ( ) ÷ [ ] k +
·

¯
=
· :=
Ic
If
2
RS
0
RS 1 ÷
k
cos
2 π · k ·
RS
|

\
|
|
.
IC
If RS 1 ÷ ( ) ÷ [ ] k +
·

¯
=
· :=
Vc
If
2
RS
0
RS 1 ÷
k
cos
2 π · k ·
RS
|

\
|
|
.
VC
If RS 1 ÷ ( ) ÷ [ ] k +
·

¯
=
· :=
Ir
If
2
RS
0
RS 1 ÷
k
cos
2 π · k ·
RS
|

\
|
|
.
IR
If RS 1 ÷ ( ) ÷ [ ] k +
·

¯
=
· :=
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 9/17
Fall 2010
Now create phasors.
To create a phasor we need a real and an imaginary part. If one uses Euler's identity, we need: cos(A) + j sin(A). The cosine filter -
output gives us the cosine part. Rather than implementing a sine filter (which doesn't reject decaying DC offsets), create the sine
term by delaying the cosine terms by 90 degress (1/4 cycle-- or 4 samples when sampling at 16 samples per cycle). Also divide
by SQRT(2) to get RMS phasors
VAcpx
v
1
2
Va
v
j Va
v
RS
4
÷
· +
|

\
|
|
.
:=
IAcpx
v
1
2
Ia
v
j Ia
v
RS
4
÷
· +
|

\
|
|
.
:=
IBcpx
v
1
2
Ib
v
j Ib
v
RS
4
÷
· +
|

\
|
|
.
:= VBcpx
v
1
2
Vb
v
j Vb
v
RS
4
÷
· +
|

\
|
|
.
:=
ICcpx
v
1
2
Ic
v
j Ic
v
RS
4
÷
· +
|

\
|
|
.
:=
VCcpx
v
1
2
Vc
v
j Vc
v
RS
4
÷
· +
|

\
|
|
.
:=
IRcpx
v
1
2
Ir
v
j Ir
v
RS
4
÷
· +
|

\
|
|
.
:=
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 10/17
Fall 2010
Each of these terms is a phasor with magnitude and phase (we are only uses magnitude for now). -
0 2 4 6 8 10 12
0
2
4
6
IAcpx
v
IBcpx
v
ICcpx
v
IRcpx
v
v
RS
0 2 4 6 8 10 12
0
30
60
90
120
150
VAcpx
v
VBcpx
v
VCcpx
v
v
RS
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 11/17
Fall 2010
Since et is continually growing as time passes, the angle is not constant:
0 5 10
200 ÷
100 ÷
0
100
200
arg IAcpx
v
( )
180
π
·
v
RS
0 5 10
300 ÷
200 ÷
100 ÷
0
100
arg VAcpx
v
( ) arg IAcpx
v
( ) ÷ ( )
180
π
·
v
RS
If we try to calculate an angle difference
we have a problem due to the different
reset times
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 12/17
Fall 2010
We don't get a nice smooth angle, because the two waveforms don't "reset" to -180 deg at the same time, so first
we need to define phasors with a reference angle. For example, using Van as a reference:
add a small number to avoid numerical
problems
θ
VA
v
arg VAcpx
v
0.000001 +
( )
:= θ
IA
v
arg IAcpx ( )
v
0.000001 +

:=
Phase
IA
v
θ
IA
v
θ
VA
v
÷ θ
IA
v
θ
VA
v
÷ π < if
θ
IA
v
θ
VA
v
÷ 2 π · ÷
|
\
|
.
θ
IA
v
θ
VA
v
÷
|
\
|
.
π > if
θ
IA
v
θ
VA
v
÷ 2 π · +
|
\
|
.
θ
IA
v
θ
VA
v
÷ π ( ) ÷ < if
:=
0 5 10
100 ÷
80 ÷
60 ÷
40 ÷
20 ÷
0
Phase
IA
v
180
π
·
v
RS
Notes:
Angle of zero until filter catches up 1.
Then slightly lagging 2.
Then nearly -90 deg due to fault. 3.
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 13/17
Fall 2010
θ
IB
v
arg IBcpx ( )
v
0.000001 +

:= θ
VA
v
arg VAcpx ( )
v
0.000001 +

:=
Phase
IB
v
θ
IB
v
θ
VA
v
÷ θ
IB
v
θ
VA
v
÷ π < if
θ
IB
v
θ
VA
v
÷ 2 π · ÷
|
\
|
.
θ
IB
v
θ
VA
v
÷
|
\
|
.
π > if
θ
IB
v
θ
VA
v
÷ 2 π · +
|
\
|
.
θ
IB
v
θ
VA
v
÷ π ( ) ÷ < if
:=
v
Phase
VA
v
θ
VA
v
θ
VA
v
÷ θ
VA
v
θ
VA
v
÷ π < if
θ
VA
v
θ
VA
v
÷ 2 π · ÷
|
\
|
.
θ
VA
v
θ
VA
v
÷
|
\
|
.
π > if
θ
VA
v
θ
VA
v
÷ 2 π · +
|
\
|
.
θ
VA
v
θ
VA
v
÷ π ( ) ÷ < if
:=
θ
IC
v
arg ICcpx ( )
v
0.000001 +

:=
θ
VB
v
arg VBcpx ( )
v
0.000001 +

:=
Phase
IC
v
θ
IC
v
θ
VA
v
÷ θ
IC
v
θ
VA
v
÷ π < if
θ
IC
v
θ
VA
v
÷ 2 π · ÷
|
\
|
.
θ
IC
v
θ
VA
v
÷
|
\
|
.
π > if
θ
IC
v
θ
VA
v
÷ 2 π · +
|
\
|
.
θ
IC
v
θ
VA
v
÷ π ( ) ÷ < if
:=
v
Phase
VB
v
θ
VB
v
θ
VA
v
÷ θ
VB
v
θ
VA
v
÷ π < if
θ
VB
v
θ
VA
v
÷ 2 π · ÷
|
\
|
.
θ
VB
v
θ
VA
v
÷
|
\
|
.
π > if
θ
VB
v
θ
VA
v
÷ 2 π · +
|
\
|
.
θ
VB
v
θ
VA
v
÷ π ( ) ÷ < if
:=
v
θ
IR
v
arg IRcpx ( )
v
0.000001 +

:= θ
VC
v
arg VCcpx ( )
v
0.000001 +

:=
Phase
IR
v
θ
IR
v
θ
VA
v
÷ θ
IR
v
θ
VA
v
÷ π < if
θ
IR
v
θ
VA
v
÷ 2 π · ÷
|
\
|
.
θ
IR
v
θ
VA
v
÷
|
\
|
.
π > if
θ
IR
v
θ
VA
v
÷ 2 π · +
|
\
|
.
θ
IR
v
θ
VA
v
÷ π ( ) ÷ < if
:=
v
Phase
VC
v
θ
VC
v
θ
VA
v
÷ θ
VC
v
θ
VA
v
÷ π < if
θ
VC
v
θ
VA
v
÷ 2 π · ÷
|
\
|
.
θ
VC
v
θ
VA
v
÷
|
\
|
.
π > if
θ
VC
v
θ
VA
v
÷ 2 π · +
|
\
|
.
θ
VC
v
θ
VA
v
÷ π ( ) ÷ < if
:=
v
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 14/17
Fall 2010
Z1 1ohm j 10 · ohm + := Z1MAG Z1 := Z1MAG 10.0499 Ω =
Z1ANG arg Z1 ( ) := Z1ANG 84.2894 deg · =
Z0 3 Z1 · :=
MTA Z1ANG :=
TSA
v
VAcpx
v
IAcpx
v
· cos θ
VA
v
θ
IA
v
MTA +
|
\
|
.
÷

· :=
TSB
v
VBcpx
v
IBcpx
v
· cos θ
VB
v
θ
IB
v
MTA +
|
\
|
.
÷

· :=
TSC
v
VCcpx
v
ICcpx
v
· cos θ
VC
v
θ
IC
v
MTA +
|
\
|
.
÷

· :=
0 5 10 15
100 ÷
0
100
200
300
400
500
TSA
v
TSB
v
TSC
v
v
RS
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 15/17
Fall 2010
Create symmetrical components:
Phase A Components:
IA0
v
IA1
v
IA2
v
|

\
|
|
|
|
|
.
A
012
1 ÷
IAcpx
v
IBcpx
v
ICcpx
v
|

\
|
|
|
|
|
.
· :=
VA0
v
VA1
v
VA2
v
|

\
|
|
|
|
|
.
A
012
1 ÷
VAcpx
v
VBcpx
v
VCcpx
v
|

\
|
|
|
|
|
.
· :=
0 5 10
0
0.5
1
1.5
2
IA0
v
IA1
v
IA2
v
v
RS
0 5 10
0
50
100
150
VA0
v
VA1
v
VA2
v
v
RS
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 16/17
Fall 2010
Phase B Components Phase C Components:
IC0
v
IC1
v
IC2
v
|

\
|
|
|
|
|
.
C
012
1 ÷
IAcpx
v
IBcpx
v
ICcpx
v
|

\
|
|
|
|
|
.
· :=
IB0
v
IB1
v
IB2
v
|

\
|
|
|
|
|
.
B
012
1 ÷
IAcpx
v
IBcpx
v
ICcpx
v
|

\
|
|
|
|
|
.
· := The magnitudes for the phase A, B and
C symmterical components will be the same, but
the angles will differ. So this will matter more later.
VC0
v
VC1
v
VC2
v
|

\
|
|
|
|
|
.
C
012
1 ÷
VAcpx
v
VBcpx
v
VCcpx
v
|

\
|
|
|
|
|
.
· :=
VB0
v
VB1
v
VB2
v
|

\
|
|
|
|
|
.
B
012
1 ÷
VAcpx
v
VBcpx
v
VCcpx
v
|

\
|
|
|
|
|
.
· :=
Calculate negative sequence impedance and zero sequence impedance
Avoid divide by 0
Z2A
v
Re VA2
v
IA2
v
1 e
j Z1ANG ·
·
( )
·

÷

·

IA2
v
( )
2
.00001 +
:=
Z0A
v
Re VA0
v
IA0
v
1 e
j Z1ANG ·
·
( )
·

÷

·

IA0
v
( )
2
.00001 +
:= Avoid divide by 0
Z
SOURCE
1 j 10 · + ( )ohm := Zreverse 2Z
SOURCE
2 Z1 · + := 2 Zsource because fault current to 2 paths......
ECE 525:
Power Systems Protection and Relaying
Lecture 26; Page 17/17
Fall 2010
0 2 4
40 ÷
20 ÷
0
20
40
60
Z2A
v
Z
SOURCE
÷
Zreverse
v
RS
0 5 10 15
30 ÷
20 ÷
10 ÷
0
10
Z0A
v
Z
SOURCE
÷
v
RS

6143E-04. Another has the extension "*. COMTRADE configuration file format: 1.-32765.7. The configuration file provides scaling and offset information for each of the variables stored as vectors.cfg" and this tells the program reading the numerical data what the columns represent. Here is a typical entry: 1..0. This file will be emtpy in this case. One has an extension "*. Data sampled 16 times per cycle (960 Hz) . The third file is a configuration file and has the extension "*. The number after the 4 commas (column 5 starting numbering with 0) is a scale factor. number of analog inputs (7 here) and number of digital inputs (0 here) 3..2.dat".6836E-06. the name for the measurements (for example "TACS LEM6IN").0000E00.10 are the analog inputs.1. If you don't change the scaling and offset factors. The MathCAD sheet has further instructions.hdr". The first fow states how the file was created and the version of the standard 2.P Each data record starts entry number (1-7 here).1.ECE 525: Power Systems Protection and Relaying Lecture 26. The next number (column 6) is an offset factor. Page 2/17 Fall 2010 The COMTRADE file is actually threefiles.32765.. The second row gives the total number of inputs (7 for these cases). Rows 3 . This has the actual numerical data in columns of numbers.TACS LEM6IN. the waveforms you evaluate won't be correct. in the following order: In (referred to as residual current below) Ia Ib Ic Van Vbn Vcn 4.

ECE 525: Power Systems Protection and Relaying Lecture 26.4249  10 5 4 6 Icscale  config 5 5 Icscale  3.0116 Iboffset  0.01 3 4 5 Ibscale  3. offset from column 6)  Remember row and column indices start at 0: Irscale  config Irscale  2.5216  10 4 Iaoffset  config 3 6 Iboffset  config Iaoffset  1.031 7 5 Vbscale  5.4189  10 Vcscale  5.407 Vboffset  4.2585  10 Vascale  config 6 5 Vbscale  config Vascale  5.2139  10 3 7 6 Vcscale  config 8 5 3 Vcoffset  config 8 6 .4371 Vcoffset  0.5162  10 4 2 5 Iroffset  config 2 6 Iroffset  1.4478  10 5 Icoffset  config 5 6 Icoffset  2.0045 Iascale  config 3 5 Ibscale  config Iascale  2.4238  10 3 Vaoffset  config 6 6 Vboffset  config Vaoffset  7. Page 3/17 Fall 2010 Scaling and Offset Data from Comtrade CFG file  Read individual cells (scale from column 5.

. Note that RS is the sampling rate.ECE 525: Power Systems Protection and Relaying Lecture 26. Page 4/17 Fall 2010 Enter Constants. CTR  1 PTR  1  Relay Settings Moved later in the file close to the relay model and plots. Phase A symmetrical components transform 1 1 1   2  A012   1 a a   2 1 a a  Phase B symmetrical components transform  1 a a2    B012   1 1 1   2  1 a a  Phase C symmetrical components transform  1 a2 a    C012   2 1 a a   1 1 1  a  1  e j  120deg RS  16 Enter vector indices for filter and relay calculations (do not change these) i  0  rows( data)  1 v  RS 4  rows( data)  1 Offset samples by 1/4 cycles for phasor calculation Offset samples by 5 cycles for trip calculation d  5  RS  rows( data)  1 If  RS  1  rows( data)  1 User Entered Parameters:  I am entering typical values the current transformer ration (CTR) and voltage transformer ratio (PTR). You need to change these to match your calculations. and the value of 16 here is assuming that the COMTRADE file was sampled at that rate.

ECE 525: Power Systems Protection and Relaying Lecture 26. that will be used for the residual current (IR = 3I0). etc are in certain columns in the table. Page 5/17 Fall 2010 Read Data From Comtrade File:    The data from the COMTRADE file is now read into vectors for MathCAD to use. so Column 2 is the first one of interest. IB. Note that these vectors are assuming that IA. Columns 0 and 1 of the COMTRADE file do not store data. The numbers below assume that the data is assigned as described in the other handout.  data2     Irscale  Iroffset  CTR  IR   data6    Vascale  Vaoffset VA    PTR   data7     Vbscale  Vboffset  PTR   data8     Vcscale  Vcoffset  PTR   data3    Iascale  Iaoffset IA    CTR   data4    Ibscale  Iboffset IB    CTR   data5     Icscale  Icoffset  CTR  VB  VC  IC  . Since the neutral current IN was measured.

ECE 525: Power Systems Protection and Relaying Lecture 26. Page 6/17 Fall 2010 Now plot the currents and voltages. Note that the horizontal axis is in the number of cycles since the i/RS is sample number divided by sampling rate. These should be sinusoidal. the prefault data should be balanced three phase Phase currents and residual current 10 5 IA i IBi ICi IRi 0 5  10 0 5 i RS 10 15 .  As a check.

Page 7/17 Fall 2010 Line to ground voltages: 200 100 VAi VB i VC i 0  100  200 0 5 i RS 10 15 .ECE 525: Power Systems Protection and Relaying Lecture 26.

we can skip that step. Page 8/17 Fall 2010 Digital Filter Stages:  Now the data is run through a digital cosine filter as a first step in calculating magnitude and phase. but since ATP Analyzer already did this.ECE 525: Power Systems Protection and Relaying Lecture 26. Normally the first step would be to perform a low pass filtering operation on the data. Ia  If 2 RS RS  1  k 0  cos 2  π k   IA        RS  [ If ( RS1) ] k Va  If 2 RS RS 1  k0  cos 2 π k   VA     [ If  ( RS  1) ]  k RS     Ib  If 2 RS RS 1  k0  cos 2 π k   IB      RS  [ If  ( RS1) ]  k   Vb  If 2 RS RS  1  k 0  cos 2  π k   VB        RS  [ If ( RS1) ] k Ic  If 2 RS RS  1  k 0  cos 2  π k   IC      RS  [ If ( RS 1) ] k   Vc  If 2 RS RS 1  k0  cos 2 π k   VC     [ If ( RS1) ] k RS     Ir  If 2 RS RS 1  k0  cos 2 π k   IR        RS  [ If ( RS1) ] k .

If one uses Euler's identity.ECE 525: Power Systems Protection and Relaying Lecture 26. we need: cos(A) + j sin(A).or 4 samples when sampling at 16 samples per cycle). create the sine term by delaying the cosine terms by 90 degress (1/4 cycle-.  To create a phasor we need a real and an imaginary part. Page 9/17 Fall 2010 Now create phasors. Also divide by SQRT(2) to get RMS phasors VAcpx  v IAcpx  v 1 1 2  Ia  j  Ia v  v RS  4   2  Vav  j  Va  v RS  4   IBcpx  v 1  Ib  j  Ib RS  2 v  v 4    Ic  j  Ic RS  2 v  v  4 VBcpx  v 1 2  Vbv  j  Vb  v RS  4   ICcpx  v 1  VCcpx  v 1 2  Vcv  j  Vc  v RS  4   IRcpx  v 1  Ir  j  Ir RS  2 v  v  4  . Rather than implementing a sine filter (which doesn't reject decaying DC offsets). The cosine filter output gives us the cosine part.

6 150 120 IAcpxv 4 IBcpxv ICcpxv IRcpxv 2 30 VAcpxv VBcpxv VCcpxv 60 90 0 0 2 4 6 v RS 8 10 12 0 0 2 4 6 v RS 8 10 12 .ECE 525: Power Systems Protection and Relaying Lecture 26. Page 10/17 Fall 2010  Each of these terms is a phasor with magnitude and phase (we are only uses magnitude for now).

Page 11/17 Fall 2010 Since t is continually growing as time passes.ECE 525: Power Systems Protection and Relaying Lecture 26. the angle is not constant: 200 100 arg IAcpxv  180 π 0  100  200 0 5 v RS 10 If we try to calculate an angle difference we have a problem due to the different reset times 100 0  arg VAcpxv arg IAcpxv   180 π  100  200  300 0 5 v RS 10 .

ECE 525: Power Systems Protection and Relaying Lecture 26. so first we need to define phasors with a reference angle.000001 v   v add a small number to avoid numerical problems PhaseIA  v θIA  θVA if v v θIA  θVA  π v v  θIAv    θIAv   θVA  2  π if v  θIAv  θVAv  π    θVA  2  π if θIA  θVA  ( π) v v v  0  20  40  60  80  100 Notes: 1. using Van as a reference: θVA  arg VAcpx  0. For example. Page 12/17 Fall 2010 We don't get a nice smooth angle.000001 v v   θIA  arg ( IAcpx )  0. Then slightly lagging 3. Then nearly -90 deg due to fault. because the two waveforms don't "reset" to -180 deg at the same time. PhaseIA  v 180 π 0 5 v RS 10 . Angle of zero until filter catches up 2.

000001 v   v PhaseIB  v θIB  θVA if v v θIB  θVA  π v v θVA  arg( VAcpx )  0.000001 v   v PhaseVC  v θVC  θVA if v v θVC  θVA  π v v  θIRv    θIRv   θVA  2  π if v  θIRv  θVAv  π    θVA  2  π if θIR  θVA  ( π) v v v   θVCv    θVCv   θVA  2  π if v  θVCv  θVAv  π    θVA  2  π if θVC  θVA  ( π) v v v  .000001 v   v PhaseVB  v θVB  θVA if v v θVB  θVA  π v v  θICv  θVAv  2 π if    θICv  θVAv  2 π if    θICv  θVAv  π   θIC  θVA  ( π) v v  θVBv    θVBv   θVA  2  π if v  θVBv  θVAv  π    θVA  2  π if θVB  θVA  ( π) v v v  θIR  arg( IRcpx)  0.000001 v   v PhaseVA  v θVA  θVA if v v θVA  θVA  π v v  θIBv    θIBv   θVA  2  π if v  θIBv  θVAv  π    θVA  2  π if θIB  θVA  ( π) v v v   θVAv    θVAv   θVA  2  π if v  θVAv  θVAv  π    θVA  2  π if θVA  θVA  ( π) v v v  θIC  arg( ICcpx)  0.000001 v   v PhaseIR  v θIR  θVA if v v θIR  θVA  π v v θVC  arg ( VCcpx)  0. Page 13/17 Fall 2010 θIB  arg( IBcpx)  0.ECE 525: Power Systems Protection and Relaying Lecture 26.000001 v   v PhaseIC  v θIC  θVA if v v θIC  θVA  π v v θVB  arg ( VBcpx)  0.

0499 Ω Z1ANG  84. Page 14/17 Fall 2010 Z1  1ohm  j  10ohm Z0  3  Z1 Z1MAG  Z1 Z1ANG  arg ( Z1 ) Z1MAG  10.ECE 525: Power Systems Protection and Relaying Lecture 26.2894  deg MTA  Z1ANG TSA  VAcpx  IAcpx  cosθVA   θIA  MTA v v v v v    TSB  VBcpx  IBcpx  cosθVB   θIB  MTA v v v v v       TSC  VCcpx  ICcpx  cosθVC   θIC  MTA v v v v v 500 400 TSA v TSBv TSCv 300 200 100 0  100 0 5 v RS 10 15 .

5 1 VA0v 100 VA1v VA2v 50 0 0 0 5 v RS 10 0 5 v RS 10 .5 IA0v IA1v IA2v 0. Page 15/17 Fall 2010 Create symmetrical components: Phase A Components:  IA0v   IAcpxv       IA1   A  1  IBcpx  v 012  v   IA2v   ICcpxv       VA0v   VAcpxv       VA1   A  1  VBcpx  v v 012    VA2v   VCcpxv      2 150 1.ECE 525: Power Systems Protection and Relaying Lecture 26.

ECE 525: Power Systems Protection and Relaying Lecture 26. . So this will matter more later.. Calculate negative sequence impedance and zero sequence impedance    j  Z1ANG   ReVA2  IA2  1  e Z2A  v  v  v   Avoid divide by 0  IA2v  2  .00001   j  Z1ANG   ReVA0  IA0  1  e  v  v  Z0A  v     IA0 v  2 Avoid divide by 0  .00001 ZSOURCE  ( 1  j  10)ohm Zreverse  2ZSOURCE  2  Z1 2 Zsource because fault current to 2 paths. B and C symmterical components will be the same..... but the angles will differ. Page 16/17 Fall 2010 Phase B Components  IB0 v   IAcpxv       IB1   B  1  IBcpx  v 012  v   IB2 v   ICcpxv       VB0 v   VAcpxv       VB1   B  1  VBcpx  v v 012    VB2 v   VCcpxv      Phase C Components:  IC0 v   IAcpxv       IC1   C  1  IBcpx  v 012  v   IC2 v   ICcpxv       VC0 v   VAcpxv       VC1   C  1  VBcpx  v v 012    VC2 v   VCcpxv      The magnitudes for the phase A.

Page 17/17 Fall 2010 60 40 Z2Av  ZSOURCE Zreverse 20 0  20  40 0 2 v RS 4 10 0 Z0Av  ZSOURCE  10  20  30 0 5 v RS 10 15 .ECE 525: Power Systems Protection and Relaying Lecture 26.