You are on page 1of 6

International Conference on Computing, Control, Networking, Electronics and Embedded Systems Engineering, 2015

MATLAB-Simulink S-Function for Modeling a


Digital MHO Distance Relay
Auday A.H. Mohamad Essar Gafer Ahmed
Al-Mansour University College Electrical Engineering
Baghdad, Iraq Khartoum, Sudan
auday_abdulhussein@yahoo.com eng.essar@hotmail.com

Abstract—A new model for Mho relay algorithm in MATLAB II. NUMERICAL RELAY MODELING
based on Fast Fourier Transform Algorithm (FFT) has presented A successful relay model must produce the same output for
in this paper. The proposed MHO algorithm evaluated by using the same inputs as its real counterpart. However, numerical
MATLAB to models a power system and simulates many fault
relay models can be divided into two categories. First, the
conditions on a selected transmission line such as different fault
locations, resistances with various fault angles.
models that considers only the fundamental frequency
components of voltages and currents. Phasor-based models
The proposed model has been tested under different conditions were the first to be widely used to design and apply relays.
for single line to ground (SLG) fault, double line fault (LL), The second category models take into consideration the high
double line to ground fault (LLG) and three phase fault. All types frequency and decaying DC components of voltages and
of faults were applied at different locations to test the proposed
model. A Mho R- jX plain has been created inside the proposed
currents in addition to the fundamental frequency components
model to show the trajectory of measured apparent impedance [3].
by the relay. The results show that the relay operates correctly A. INPUT SIGNALS OF DISTANCE RELAY
under different locations for each fault type.
A relay algorithm is a set of equations whose evaluation
Index Terms- Protective Relay, MHO Distance Relay, Simulink and comparison with certain predetermined levels determines
Simulation. the operation of the relay. The performance of estimation
algorithms is dependent on obtaining accurate estimate of the
I. INTRODUCTION fundamental frequency component of a signal from a few
Mathematical modeling and computer simulation can be samples [3].
considered the foundation for examine and build complex Table (1) shows the input signals employed by ground and
systems nowadays. Models play a vital role in the possibility phase distance relays. In this table, K0 is a compensating
of testing systems and examine the behavior of its factor. The determination and use of K0 is explained later [2].
characteristics.
The diverse units used in any discipline of protective Table (1): Input Signals of Ground and Phase Distance
relaying determine whether the system is normal or abnormal. Relays [2]
A comparator will give the relay system an output when the Fault Distance Voltage Current
conditions for operation are satisfied. Since phasors are Type Element signal signals
expressed in magnitude and phase, there are two types of Phase A Va Ia + K03I0
Phase to
comparators: phase and magnitude [1]. Phase B Vb Ib + K03I0
Ground
Modelling of numerical relays is important for the Phase C Vc Ic + K03I0
protection of the power systems because it allows the users to Phase A - B Va - Vb Ia - Ib
test the internal performance of relays during normal operating Phase to
Phase B - C Vb – Vc Ib – Ic
states of the power system as well as during system Phase
Phase C - A Vc – Va Ic – Ia
disturbances. Relay models are used in a variety of processes,
such as designing new prototypes and selecting appropriate The composite signals in a phase comparator are denoted
protection algorithms, setting relay parameters, and training by S1 and S2. An angular displacement is considered positive
personnel. if S1 leads S2.The output of a phase comparator operates if the
MATLAB programming language was widely used as a following condition is satisfied [4].
simulation programming language to design numerical and
digital relay models. A new versions of Matlab-based െͻͲ ൑ ሺ‘ܵଵ െ ‘ܵଶ ሻ ൑ ͻͲ (1)
software, capable of modelling digital relays by providing
detailed models of the common components of contemporary The composite signals in an amplitude comparator are
digital relays. The most important part of the Matlab package denoted by So and SR, operating and restraining signals,
is SIMULINK libraries developed for modelling, optimizing, respectively. The comparator operates if the following
setting and testing digital protective relays [2]. condition is satisfied [4].

978-1-4673-7869-7/15/$31.00 ©2015 IEEE


SO t SR Where K0 is compensation factor can be expressed as in Eqn.9
(2)
[5]:
B. DISTANCE RELAY CHARACTERISTICS [4]
§ Z L 0  Z L1 · (9)
The phase comparator signals S1 and S2 for producing the K0 ¨¨ ¸¸
Mho characteristic are defined as shown in Eqns. (3) and (4): © 3Z L1 ¹

S1 Where:
Vr ‘0 o  Z R ‘T z .I r ‘  M r      
S 2 Vr ‘0 o (4) Z L1 is positive-sequence impedance from the fault to relay
location.
Dividing these equations by the line current I r ‘  M r , give the Z L 0 is zero-sequence impedance from the fault to the relay
Eqns. (5) and (6). location.

S '1 Z r ‘M r  Z R ‘T z (5) III. FAST FOURIER TRANSFORM [6]


The fast Fourier transform (FFT) is simply an algorithm to
S '2 Z r ‘M r (6) speed up the discrete Fourier transform (DFT) calculation by
' ' reducing the number of multiplications and additions required.
As seen in Fig.1., the impedances S 1 and S 2 are placed in the An N-point DFT requires complex multiplications. The
extremes of the constant impedance Z R ‘T z .When the system number of multiplications required is significant because the
impedance Z r ‘M r is inside the operating characteristic, as multiplication function requires a relatively large amount of
DSP processing time. In fact, the total time required to
shown in Fig.1(a), the angle between S '1 and S ' 2 fulfills the
compute the DFT is directly proportional to the number of
conditions of relay operation. Fig.1 (b) shows the case of
multiplications plus the required amount of overhead. The Fast
Z r ‘M r lying outside the operating characteristic. Now, the
Fourier Transform FFT which requires only complex
angle between S '1 and S ' 2 is outside the range specified in multiplications. The computational efficiency of the FFT
Eqn.1, and the relay does not operate. The constant parameter versus the DFT becomes highly significant.
Z R ‘T z marks the diameter of the circular characteristic that To understand the development of the FFT, simplify the
passes through the origin. DFT equation to be as Eqn.10 [6].

1 N 1 nk
X (k ) ¦ x(n)WN (10)
N n 0
 j 2S

Where: WN exp N

N is the number of samples of discrete signal x(n).


The radix-2 FFT algorithm breaks the entire DFT
calculation down into a number of 2-point DFTs. Each 2-point
DFT consists of a multiply-and-accumulate operation called a
 butterfly.
(a) Operating Condition (b) Non-operating condition IV. MATLAB/ SIMULINK S-FUNCTION
Fig.1. Definition of the Mho Characteristic Phase Comparator.
S-Functions (System-Functions) provide a powerful
In the case of phase distance relays, phase-to-phase mechanism for extending the capabilities of the SIMULINK
voltages and differences between line currents are used. For environment. An S-function is a computer language
example, a relay designed to detect phase-B to phase-C faults description of a SIMULINK block written in MATLAB, C,
computes the impedance as expressed in the Eqn.7. C   , or FORTRAN. The languages C, C   , and FORTRAN
S-functions are compiled as MEX files using the MEX utility.
Vb  Vc Vbc As with other MEX files, S-functions are dynamically linked
Z seen
Ib  Ic I bc (7) subroutines that the MATLAB interpreter can automatically
load and execute. S-functions use a special calling syntax
The ground distance relay that used to protect phase-A can called the S-function Application Program Interface API that
be expressed as in Eqn.8 to computes the apparent impedance enables the user to interact with the SIMULINK engine. This
of that phase. interaction is very similar to the interaction that takes place
between the engine and built-in SIMULINK blocks. S-
Va
(8) functions follow a general form and can accommodate
Z seen
I a  K 0 3I 0 continuous, discrete and hybrid systems.

231
A Level-2 MATLAB S-function is MATLAB function that VI. TEST SYSTEM
defines the properties and behavior of an instance of a Level-2
The three phase line diagram shown in Fig.3 represents an
MATLAB S-Function block that references the MATLAB
overhead transmission line (500 kV, 50 Hz, and 236.7 km)
function in a SIMULINK model. The MATLAB function
connected with dynamic load. The positive and zero sequence
itself comprises a set of callback methods that the SIMULINK
impedance of the transmission line are:
engine invokes when updating or simulating the model. The
callback methods perform the actual work of initializing and Z1= 0.028 + 0.276j Ω /km
computing the outputs of the block defined by the S-function.
Z0= 0.3445 + 0.981j Ω /km
Where: the capacitance of the line is neglected.
V. DESCRIPTION OF DESIGN METHODOLOGY USING MATLAB
0
The new proposed MHO relay Algorithm is designed in The positive sequence impedance of source is 66‘90 Ω,
MATLAB based on Fast Fourier Transform (FFT). FFT used with apparent power 1400 MVA.
to extract the magnitude and phase of current and voltage The proposed Mho relay block named Level-2 MATLAB
waveforms to estimate transmission line impedance. S-Function which is shown in Fig.4, has a user interface
The output of the FFT from Eqn.10 is X (k), contains a window such as shown in Fig.5 to insert the transmission Line
real and imaginary component that can be converted into parameter, zones length, zones delay time, internal size of data
amplitude and phase. The ratio of appropriate voltages and and Line angle adjustment. Fig. 6 illustrates the Adjustment of
currents provide to computes the apparent impedance as Line angle characteristic by several degrees.
expressed in Eqns.2 and 3 which used to detect phase to
ground and phase to phase faults signals employed to distance
relay algorithm from Table (1). The composite signals in a
phase comparator are denoted by S1 and S2 are defined in
Eqns.1 and 2. An angular displacement is considered positive
if S1 leads S2.The output of a phase comparator operates if the
condition in Eqn. 1 is satisfied.
The Simulation of protection system is initiated by
Simulate the modeling of Mho numerical relay belonging to
the protection system. The data and parameters of each of the
numerical relays are entered in an S-Function project. The
final product of the S-Function project is a set of files
containing the code of the Mho numerical relay model.
Summarizing, the proposed methodology to design model
of protection systems can be outlined in the following manner.
a.Writing the MATLAB structure to simulate the Mho relay
characteristics and numerical relay models.
b.Embed the m-file of Mho relay models into the level-2 S-
Function for a variety of applications.

A. MHO Relay Modeling


When a transmission line subjected to a fault, the voltage
signals and current signals contain decaying dc components,
higher order frequency components and lower order frequency
components. The higher order frequency components can be
eliminated using low pass anti-aliasing filters with appropriate
cut-off frequency, but the anti-aliasing filters cannot remove
decaying dc components and rejects lower order frequency
components. This affects the performance of digital relay.
Fig.2 shows a modeling of Mho relay; the algorithm has a
changeable data size of FFT for extracting the fundamental
frequency component to increase the accuracy.

Fig.2. Proposed Mho Relay Algorithm.

232
Fig.3. Single Line Diagram of Test System

Fig.4. Simulation of Test System

233
Fig.6. Adjustment of Line Angle Characteristic by Several
Fig.5. User Interface Window Degrees

234
VII. SIMULATION RESULTS
The output signals as resulted from faults set over a power
network using MATLAB/SIMULINK are injected to the
proposed Mho relay model. Evaluation extended to include
different fault locations. The faults were also set over the
(a)
power network when fault resistances at different values were
assumed. Fig. 7 shows the impedance diagram of proposed
Mho relay in case faulted transmission line or not. The fault
signal, voltage waveform and trip signal in case of no fault or
faulted transmission line are shown in Fig.8 and Fig.9
respectively.
(b)

(c)
Fig.9. Fault Case Where (a) Fault signal (b) Voltage
Waveform (c) Trip Signal.
(a) In Case of No Fault
VIII. CONCLUSIONS
A new algorithm with new SIMULINK block for
modeling, optimizing, setting and testing digital protective
Mho relays has been presented in this work. The relay has the
ability to detect and classify the Phase-Ground (AG), Phase-
Phase (AB) and three Phases to Ground (ABCG) faults. The
new algorithm has a high sensitivity and high accuracy,
especially after adding the filters and used FFT with
changeable data size. The developed block facilitates setting-
up model of Mho relays using generic representation of
(b) In Case of Fault various hardware and software elements of actual relays. The
Fig.7. Impedance Diagram of Mho Relay software was tested with various faults situations and
conditions.
IX. REFERENCES
[1] Walter A. Elmore, “Protective Relaying Theory and
Applications”, 2nd Edition, Marcel Dekker Inc, 2004.
(a) [2] Simulink®, Developing S-Functions R2013b, Reference Manual,
Math Works, Inc. 2013.
[3] Yashasvi B, Vidushi K, and Ramesh P, “Simulation of MHO
Characteristics for Transmission Line Protection Using PSCAD”,
Issue No.2, International Journal of Research in Engineering &
Applied Sciences, 2012.
[4] Emilson Pereira Leite, “Matlab - Modeling, Programming and
Simulations”, Sciyo, India, 2012.
(b)
[5] Sandro Gianny, Aquiles Perez, “Modeling Relays for Power
System Protection Studies”, Ph.D. Research, University of
Saskatchewan, Saskatchewan, Canada, 2006
[6] ALSTOM Grid, “Network Protection and Automation Guide
NPAG”, 2011.

(c)
Fig.8. No fault Case Where (a) Fault Signal (b) Voltage
Waveform (c) Trip Signal.

235

You might also like