Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

ECE 525:

Power Systems Protection and Relaying


Session 23; Page 1/15
Fall 2006
Simple 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.
data
C:\..\loop5.dat
:=
You may need to browse a bit to find this file when you open this sheet.
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 2/15
Fall 2006
data
0 1 2 3 4 5 6
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1 0 -1.53810
4
-1.12410
4
1.00310
4
-8.40210
3
-1.22310
4
2 1.04110
3
-3.1710
4
-3.1310
4
1.6310
4
-5.52310
3
-3.27610
4
3 2.08310
3
-1.85910
4
-3.17910
4
1.07310
4
2.77810
3
-2.88310
4
4 3.12510
3
-9.78110
3
-3.19110
4
7.02810
3
8.18110
3
-2.60110
4
5 4.16610
3
4.99310
3
-2.43210
4
1.01810
3
1.23310
4
-1.54110
4
6 5.20810
3
1.56110
4
-1.52210
4
-3.15910
3
1.29510
4
-5.02710
3
7 6.2510
3
2.64810
4
-2.10310
3
-7.34810
3
1.11910
4
8.47110
3
8 7.29110
3
3.10510
4
9.85510
3
-8.8810
3
6.30710
3
1.90210
4
9 8.33310
3
3.27610
4
2.15310
4
-9.24910
3
-85 2.84110
4
10 9.37510
3
2.77610
4
2.8810
4
-6.89210
3
-7.78810
3
3.22510
4
11 1.04210
4
210
4
3.26310
4
-3.50910
3
-1.49310
4
3.25910
4
12 1.14610
4
7.77910
3
3.05710
4
1.59710
3
-2.10610
4
2.70210
4
13 1.2510
4
-4.41910
3
2.46510
4
6.54110
3
-2.46610
4
1.85110
4
14 1.35410
4
-1.71410
4
1.41810
4
1.15910
4
-2.57310
4
6.41510
3
15 1.45810
4
-2.62210
4
2.22710
3
1.50310
4
-2.35910
4
-5.6210
3
16 1.56310
4
-3.23510
4
-1.07510
4
1.72210
4
-1.90510
4
-1.74510
4
=
The COMTRADE file is actually three files. 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 is a scale factor. Copy this number into value Ir
scale
below (In is the same as the residual current
Ir). Do likewise with the voltage and current entries. The numbers listed above are the ones currently entered in the MathCAD file.
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 3/15
Fall 2006
If RS 1 rows data ( ) 1 .. :=
v
RS
4
rows data ( ) 1 .. :=
i 0 rows data ( ) 1 .. :=
Enter vector indices for filter and relay calculations (do not change these)
RS 16 := a 1 e
120j deg
:=
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.
Ir
offset
7.6143 10
-4
:= Ir
scale
2.6836 10
-6
:=
Vc
offset
2.5105 10
-1
:= Vc
scale
4.8099 10
-3
:= Ic
offset
1.6207 := Ic
scale
2.5779 10
-4
:=
Vb
offset
2.4410 := Vb
scale
4.8154 10
-3
:= Ib
offset
1.5161 := Ib
scale
3.7742 10
-4
:=
Va
offset
5.3129 := Va
scale
4.8918 10
-3
:= Ia
offset
3.1708 10
-2
:= Ia
scale
1.5269 10
-4
:=
Scaling and Offset Data from Comtrade CFG file.
The next number is an offset factor. If you use the MathCAD sheet, copy this number into the sheet as I
offset
(In is the same as the
residual current Ir). Do likewise with the voltage and current entries. The numbers listed above are the ones currently entered in the
MathCAD file.
If you don't change the scaling and offset factors, the waveforms you evaluate won't be correct. The MathCAD sheet has further
instructions.
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 4/15
Fall 2006
Level_2_50G 2.2 := Level_1_50G 4 :=
Level_2_50Q 2.6 := Level_1_50Q 5 :=
Instantaneous Overcurrent Elements (secondary Amps, again leave off units) for zero sequence (ground) and negative sequence
(designated with a Q). elements. These numbers are just made up so don't base your answers on these. Again peak amplitudes.
Relay Settings
Z0ANG 84.289 := Z0MAG Z0 :=
Z1ANG 84.289 := Z1MAG Z1 :=
arg Z1 ( ) 84.289 deg = line arg Z1 ( ) :=
Z0 3 Z1 :=
Z1 1.2 j 12 + :=
Line impedance in Ohm's secondary (i.e. values seen after the CTR and PTR are factored in).
PTR 1 := CTR 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.
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 5/15
Fall 2006
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
Session 23; Page 6/15
Fall 2006
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.
0 2 4 6 8 10 12
15
10
5
0
5
10
15
IA
i
IB
i
IC
i
IR
i
i
RS
Since the residual current stayed at 0 and
the currents in two phases increased, this
was probably a line-to-line fault.
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 7/15
Fall 2006
0 2 4 6 8 10 12
200
100
0
100
200
VA
i
VB
i
VC
i
i
RS
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.
You will learn more about applications of digital filters for relays in ECE 526.
Each of the measurements is filtered.
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 8/15
Fall 2006
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 +

(
(

=
:=
Now create phasors:
First map everything back to upper letters
The calculate line to line voltages.
VAB VA VB := VBC VB VC := VCA VC VA :=
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 9/15
Fall 2006
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 00 degress (1/4 cycle-- or 4 samples when sampling at 16 samples per cycle).
VAcpx
v
Va
v
j Va
v
RS
4

+ :=
IAcpx
v
Ia
v
j Ia
v
RS
4

+ := IRcpx
v
Ir
v
j Ir
v
RS
4

+ :=
VBcpx
v
Vb
v
j Vb
v
RS
4

+ :=
IBcpx
v
Ib
v
j Ib
v
RS
4

+ :=
VCcpx
v
Vc
v
j Vc
v
RS
4

+ :=
ICcpx
v
Ic
v
j Ic
v
RS
4

+ :=
Each of these terms is a phasor with magnitude and phase.
0 2 4 6 8 10 12
0
5
10
15
IAcpx
v
IBcpx
v
ICcpx
v
IRcpx
v
v
RS
0 2 4 6 8 10 12
0
40
80
120
160
200
VAcpx
v
VBcpx
v
VCcpx
v
v
RS
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 10/15
Fall 2006
However, note the scaling on the magnitudes. The magnitude is capturing the peak of the waveform, not the RMS value.
0 2 4 6 8 10 12
200
100
0
100
200
VBcpx
v
VB
i
v
RS
i
RS
,
Also note that the magnitude values are initially
zero.
0 2 4 6 8 10 12
4
2
0
2
4
arg VBcpx
v
( )
v
RS
i
RS
,
Now look at the angle
Note that that the angle is continually moving
between - and + and then resetting.
If this angle is subtracted from another angle
it is possible to get a smooth angle (one one
corrects for the two angle reseting at
different points).
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 11/15
Fall 2006
0 2 4 6 8 10 12
15
10
5
0
5
10
15
IBcpx
v
IB
i
v
RS
i
RS
,
Notice that the DC offset does not
pass through the magnitude
calculation.
Create symmetrical components:
V0
v
1
3
VAcpx
v
VBcpx
v
+ VCcpx
v
+
( )
:=
I0
v
1
3
IAcpx
v
IBcpx
v
+ ICcpx
v
+
( )
:=
V1
v
1
3
VAcpx
v
a VBcpx
v
+ a
2
VCcpx
v
+
|
\
|
.
:=
I1
v
1
3
IAcpx
v
a IBcpx
v
+ a
2
ICcpx
v
+
|
\
|
.
:=
V2
v
1
3
VAcpx
v
a
2
VBcpx
v
+ a VCcpx
v
+
|
\
|
.
:=
I2
v
1
3
IAcpx
v
a
2
IBcpx
v
+ a ICcpx
v
+
|
\
|
.
:=
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 12/15
Fall 2006
0 2 4 6 8 10 12
0
2
4
6
8
I0
v
I1
v
I2
v
v
RS
0 2 4 6 8 10 12
0
50
100
150
200
V0
v
V1
v
V2
v
v
RS
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 13/15
Fall 2006
Relay Model:
1. Ground and negative sequence over current elements
A. First plot the negative and zero sequence currents and compare them to the settings. Note that the settings needs
an extra SQRT(2) factor since the digital filter is giving us the peak amplitude and not the RMS value.
0 50 100 150 200
0
2
4
6
I2
v
2
Level_1_50Q
Level_2_50Q
v
Note that the negative sequence current
crosses the level 2 threshold, so the relay
would issue a time delayed trip. Also note
that the start up transient in the relay almost
exceeded this threshold.
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 14/15
Fall 2006
0 50 100 150 200
0
1
2
3
4
5
6
I0
v
2
Level_1_50G
Level_2_50G
v
In this case the zero sequence current is
never very large
B. Simple relay logic expressions.
Level1Q_pu
v
1
I2
v
2
Level_1_50Q if
0 otherwise
:= Level2Q_pu
v
1
I2
v
2
Level_2_50Q if
0 otherwise
:=
Level1G_pu
v
1
I0
v
2
Level_1_50G if
0 otherwise
:= Level2G_pu
v
1
I0
v
2
Level_2_50G if
0 otherwise
:=
Note that these elements are not well done, and could "chatter" since they don't latch.
ECE 525:
Power Systems Protection and Relaying
Session 23; Page 15/15
Fall 2006
Instantaneous Overcurrent Element Outputs
0 50 100 150 200
0
0.5
1
1.5
Level1Q_pu
v
Level2Q_pu
v
v
0 50 100 150 200
0
0.5
1
1.5
Level1G_pu
v
Level2G_pu
v
v

You might also like