REVISTA INGENIO
Mathematical analysis and simulation in Matlab of dierential protection in two
power transformers Winding
Análisis matemático y simulación en Matlab de protección diferencial en dos devanados de
transformadores de potencia
David Cárdenas | Universidad Politécnica Salesiana, Guayaquil, Ecuador
Carlos Chávez | Universidad Politécnica Salesiana, Guayaquil, Ecuador
Julio Rodríguez | Universidad Politécnica Salesiana, Guayaquil, Ecuador
Germán Solís | Universidad Politécnica Salesiana, Guayaquil, Ecuador
Luis Morales | Universidad Politécnica Salesiana, Guayaquil, Ecuador
https://doi.org/10.29166/ingenio.v5i1.3785 pISSN 2588-0829
2022 Universidad Central del Ecuador eISSN 2697-3243
CC BY-NC 4.0 —Licencia Creative Commons Reconocimiento-NoComercial 4.0 Internacional ng.revista.ingenio@uce.edu.ec
      
    ,  (), -, . -

is project deals with the realization of mathematical modeling and simulation in Matlab of dierential
protection in two-winding power transformers, the same one that will be part of the Salesian Polytechnic
University, Guayaquil headquarters; will have the objective of simulating the operating conditions of the
protection equipment (SEL 587) found in a substation, obtaining the equation that governs the dieren-
tial protection operations of said relay, by theoretically analyzing the system conditions, both under nor-
mal conditions and for any fault event (external fault, internal fault) on the primary and / or secondary
side of the transformer, facilitating students who are in the last cycles of the electrical engineering career,
learning the concepts and principles of operation of system protections electric power.

El presente proyecto trata sobre la realización del Modelado Matemático y simulación en MATLAB de la
Protección diferencial en transformadores de potencia de dos devanados, el mismo que formara parte de
la Universidad Politécnica Salesiana, sede Guayaquil. Tendrá como objetivo simular las condiciones de
operación del equipos de protección (SEL 587) encontrado en una subestación, obteniendo la ecuación
que gobierna las operaciones de protección diferencial de dicho relé, al analizar teóricamente las con-
diciones del sistema, tanto en condiciones normales como para cualquier evento de falla (falla externa,
falla interna) en el lado del primario o secundario del transformador, facilitando a los estudiantes que
cursan los últimos ciclos de la carrera de Ingeniería Eléctrica, el aprendizaje de conceptos y principios de
funcionamiento de protecciones de sistema eléctricos de potencia.
.
introduction
Within this document you will nd all the information
related to the «Mathematical analysis and simulation in
Matlab of dierential protection in power transformers
with two windings», which consists of making all the
measurements in a dierential protection test module
using the 587 relay, in which all the connections and pos-
sible cases of failure that can occur in an electrical power
system were made, obtaining real data which allowed
analyzing the behavior of the relay for each event.
e rst chapter deals with the demand of the pro-
blems in the electrical power systems based in daily expe-
rience, for which it is proposed to certify the reliability in
 
Received: 15/06/2021
Accepted: 07/09/2021
 
Test bench, protection coordination,
dierential relay 587, Matlab program.
 
Inestabilidad de voltaje, potencias reac-
tivas inductivas, voltajes, ángulos, PV,
QV, factores de participación, colapso
de red.
5
Mathematical analysis and simulation in Matlab of dierential protection in two power transformers windings
the distribution networks through dierential protection.
In the second chapter, the normal operating conditions
were reviewed to electrical systems operating for a nite
or innite time under nominal values. In the third chap-
ter, the respective tests were carried out with the dierent
connections that can be made to a power transformer and
compared through the program in normal condition and
when the internal fault occurs in the transformer. Fina-
lly, in the fourth chapter, the mathematical analysis was
elaborated through equations which was carried out the
structure of the programming in Matlab.
Likewise, the scope of the project and its benets to
society are dened, with the didactic design that allows
to develop real tests where the behavior of the relay is
analyzed through dierential protection, making the di-
erent types of connection of the transformers in which
they evaluated the internal and external faults in the la-
boratory that occur normally.
For the understanding and total perception of the
subject, books, previous technical projects, papers and
web sources were reviewed, in order to consolidate the
knowledge regarding the case study.
Scenario description
e experiments were implement using 1 test module,
three single-phase transformers each one of 1500 
120 / 240 to form three-phase banks with dierent
connections Star-Star (υυ), Star-Delta (Υ∆), Delta-Delta
(∆∆), Delta-Star (∆Υ), located in the Circuits laboratory
of the Politécnica Salesiana University (see Figure 1).
Figure 2 shows a 0-100 variable resistive load
three-phase bank, with a maximum current of 2,5. e
measuring equipment that we use to perform all the tests
is the ideal 61-746 (see Figure 2).
is measuring instrument that is displayed in gure
3 was used as a reference to be able to make comparisons
of voltages and currents (see Figure 3), allowing you to
perform load studies and check the capacity of the elec-
trical systems before adding the load (see Table 1).
Description of the mechanism
For a transformer with two winding, the dierential relay
will detect the faults that occur both inside the protected
area and its external connections to the current trans-
formers associated with this protection. is will act as
Figure 1. Module for transformer protection
Source: Politécnica Salesiana University.
Figure 2. Variable resistive load from 0-100, 2,5A
Sources: Politécnica Salesiana University.
Table 1.
Nomenclature
ree-phase Star-Star system
ree-phase Star-Delta system
ree-phase Delta-Delta system
ree-phase Delta-Star system
Ohm, unit of electrical resistance
 Eective value
  voltage
Volts
Amps
 Volt-amperes, unit of apparent power
6
Cárdenas D., et al.
a protection with absolute selectivity; the instantaneous
current, modules and phases will be compared.
Figure 4 shows the current ows that circulate throu-
gh the Tc’s which send information to the dierential re-
lay, these being governed by the following equations for
non-fault and fault-free conditions (see Figure 4):
Dierential current = Id = I1 + I2
Equation 1: Dierential current.
Source: [7, p. 23]
I1=I2 Id=0
Equation 2: Equipment without failure
Source: [7, p. 23]
I1≠I2 Id≠0
Equation 3: Equipment failed
Source: [7, p. 23].
e dierential protection characteristic can be set ei-
ther as a percentage dierential characteristic as a slo-
pe or as a variable percentage dierential characteristic
with double slope (see Figure 5); the elements operation
is determined by the operating () and holding ()
quantities, calculated from the input currents of the win-
dings [7, p. 21].
e gure shows the operating current  and a res-
training current  and an 087 setting or a minimum
level required for the  operation and two operating slo-
pes called 1 with their operating limit 1 which is an
initial curve starting at the origin and with its intersec-
tion 087 and a second curve 2 which, if used, must
be greater than or equal to 1 and its entire upper area
is a region of operation of the relay and the internal area
of the gure shows a region of the relay where this does
not operate [7, p. 21].
Triggering occurs if the operation amount is greater
than the minimum pickup level and is greater than the
curve value, for a particular holding amount. Four set-
tings dene the characteristic [7, p. 21].
With careful selection of these settings, the user can
closely emulate the characteristics of existing dierential
current relays [7, p. 21].
Dierential protection responds to design criteria ba-
sed on reliability, speed, selectivity, safety, sensitivity, eco-
nomy and simplicity [7, p. 21].
Figure 4.
Protection of transformers with two winding
Figure 6.
Equivalent circuit of the transformer
Figure 3.
Ideal 61-746
Figure 5.
Slope of dierential operation
Source: [7, p. 22].
7
Mathematical analysis and simulation in Matlab of dierential protection in two power transformers windings
II. mathematical modeling
To nd the currents of the s, the analysis of the trans-
former is performed, we begin from the equivalent cir-
cuit of the transformer where (see Figure 6):
Vrn = Input voltage.
R1 = Hysteresis resistance and heat losses.
Lm1 = Inductance necessary to produce magnetic ux
from the transformer.
Rcc1 = Short circuit resistance
Lcc1 = Short circuit inductance
Rc = Load resistance
I1 = Primary current
Io = Vacuum current
Im = Magnetizing current
Irh = hysteresis current
I2 = Secondary current
Using Kirchhos laws, we obtain the following dieren-
tial equations that dene the modeling of the single-pha-
se transformers in gure 6:
Single phase transformer 1
e voltage over time is dened by the following formula:
Vrn(t)=Vp Sen(wt+0º) (1)
From Kirchhos law, we dene the current of the pri-
mary of the transformer T1 as a function of the no-load
current and of the secondary:
I1T1=Io+I2 (2)
Knowing that the voltage over time of the inductor is de-
ned as:
(3)
Applying Ohms law we draw hysteresis current from the
single-phase transformer T1.
(4)
Secondary current of single-phase transformer T1.
(5)
Primary current of a single-phase transformer.
(6)
Single phase transformer 2
e voltage over time is dened by the following formula:
Vsn(t) = Vp * Sen(wt + 120°) (7)
From Kirchhos law, we dene that the current of the
primary of the transformer T2 as a function of the no-
load current and of the secondary:
I1T2 = Io + I2 (8)
Knowing that the voltage at time of the inductor is de-
ned as:
(9)
Applying Ohms law, we draw hysteresis current from the
single-phase transformer T2.
(10)
Secondary current of single-phase transformer T2.
(11)
Primary current of a single-phase transformer.
(12)
Single phase transformer 3
e voltage over time is dened by the following formula:
Vtn(t) = Vp * Sen(wt - 120°) (13)
From Kirchhos law, we dene that the primary current
of the transformer T3 as a function of the no-load cu-
rrent and the secondary current:
I1T3 = Io + I2 (14)
Knowing that the voltage at time of the inductor is de-
ned as:
(15)
Applying Ohms law we draw hysteresis current from the
single-phase transformer T3.
(16)
Secondary current of single-phase transformer T3.
(17)
8
Cárdenas D., et al.
Primary current of a single-phase transformer.
(18)
Single phase transformer 1
Primary current of transformer T1, seen from the secon-
dary of ’.
(19)
Secondary current of transformer T1, seen from the se-
condary of ’.
(20)
Single phase transformer 2
Primary current of transformer T1, seen from the secon-
dary of ’.
(21)
Secondary current of transformer T1, seen from the se-
condary of ’.
(22)
Single phase transformer 3
Primary current of the transformer T1, seen from the se-
condary of ’.
(23)
Secondary current of transformer T1, seen from the se-
condary of ’ (see Figure ).
(23)
 1 of a dierential relay.
(24)
 2 of a dierential relay.
(25)
Aer nding the currents of said  which we dene
with the following formulas:
Figure 7.
Block diagram of protection relay operation.
Figure 9.
Parameter entry graph window
Figure 8.
Compensation matrix
9
Mathematical analysis and simulation in Matlab of dierential protection in two power transformers windings
TRANSFORMER 1
Primary phase  current, aer passing through  1.
(26)
Secondary phase  current, aer passing through  2.
(27)
TRANSFORMER 2
Primary phase  current, aer passing through  1.
(28)
Secondary phase  current, aer passing through  2.
(29)
TRANSFORMER 3
Current of phase of the primary, aer passing through
 1.
ICw1F = ICw1
Tap1 (30)
Secondary phase current, aer passing through
 2.
(31)
en go to the block of compensation matrices depen-
ding on the transformer connections and their phase di-
erence that was chosen internally in the program and
in turn the dierential relay relates them through pre-
viously adjusted parameters, the matrices are as follows
(see Figure 8).
Example:
Protection relay operation through compensation matrix.
Primary current in each of the phases, from the com-
pensation matrix.
(32)
Secondary current in each of the phases, from the com-
pensation matrix.
(33)
Aer having had all these currents, the relay proceeds
to calculate the operating currents (Iop) and restriction
(Irst) for which the following equation is used:
Operating current in phase .
IopA=IA
W1FC1 + IA W2 FC1 (34)
Operating current in phase .
IopB=IBW1FC1 + IB W2 FC1 (35)
Operating current in phase .
Figure 10.
Results graph window
Figure 11.
Simulink blocks
10
Cárdenas D., et al.
IopC=ICW1FC1 + IC W2 FC1 (36)
Restriction current in phase .
(37)
Restriction current in phase .
(38)
Restriction current in phase .
(39)
Operating conditions when the relay operates.
Iop≈0 relay not actuated, normal operation.
Iop≠0 relay actuated, fault operation.
iii. test and validation
Aer obtaining the electrical parameters of each of the
transformers through short-circuit and open-circuit
tests, the dierent connections are made under vacuum
and under load. e responses of the soware whose in-
terface were compared with the graphs obtained by the
measurement instrument, resulting in the following (see
Figure 9):
e graphs of each of the phase currents that are seen
by the relay on both the secondary side and the primary
side are shown (see Figure 10).
For the coding of the dierent graphs the following
process was used, at the moment of executing the Simu-
link internally, gure 11 block arrangements were crea-
ted that have the equations that represent our modeled
system and to be able to obtain the current graphs (see
Figure 11):
Figure 12.
Internal fault Line A.
Figure 14.
Primary and secondary current in each phase seen from the CT’s,
with 100% load
Figure 15.
Operating and restriction currents in each of the phases, with
100% load
Figure 13.
Normal operation
11
Mathematical analysis and simulation in Matlab of dierential protection in two power transformers windings
INTERNAL FAILURE IN EACH OF THE PHASES
By activating any of this «push button» will allow us
to see the behavior of the relay in each of the phases as
shown in gure 12 (see Figure 12).
Here you can see the current values in the phase whe-
re the fault occurred, and also see the operating current
in the phase where it occurred.
e phase where the failure occurred will be shown
in red and in turn it will proceed to block any load chan-
ge that could be made in the Slider as well as the «push
button» of the failures in the other phases, all this will be
blocked until do not press the reset button which will re-
turn the readings to normal and clear the fault as shown
in gure 13 (see Figure 13).
Aer reviewing the required results, we press the exit
button which will ask us for an exit conrmation and by
pressing «yes», the interface will be completely exited and
the previously entered data will be deleted (see Figures 14
y 15 and Table 2).
TESTS AND RESULTS
Star-star connection:
Test 1:
R1 = 100,6 ohms
R2 = 100 ohms
R3 = 99,8 ohms
iv. conclusion
e objective of this work was to show by means of the si-
mulation in Matlab the behavior of the dierential protec-
tion using the  587 relay, of the «Module for transformer
protection» which was analyzed to obtain the governing
equations, comparing values and the operation of the relay
both empty and loaded, the following was concluded:
A didactic modeling was carried out in Matlab where
dierent practices and simulations were performed, in or-
der to visualize and analyze the moment when the dieren-
tial protection acted for both internal and external failure
of a transformer, with the data obtained through the simu-
lations it can be conclude that the operating results of the
relay in the simulator are within the range of the trip, since
it works at close operating currents of the real relay.
When comparing the responses obtained when si-
mulating the system with the dierent types of connec-
tions of the single-phase transformers, the data obtained
were satisfactory, since it was possible to appreciate the
currents of the windings both on the primary side and
on the secondary side. It was able to appreciate the ope
-
rating current and restriction of the relay, which showed
an error rate of less than 5%.
For the different practices, the parameters were
modied in the  587 relay as: (connection type of
single-phase transformers and operating current Iop).
rough these practices it can be concluded that the load
varies in percentage form for the dierent types of con-
nection in the transformers.
e purpose of the  587 dierential relay is to pro-
tect the power transformer where the input current must
be equal to or similar to the output current, in which real
faults that normally occur in electrical power systems
could be simulated. reliability in the system and no da-
mage occurs.
e tests were performed on the board «Transfor-
mer protection module» which was demonstrated and
analyzed the fault that eventually occurs in two-winding
transformers, where the dierential relay is in charge of
protecting the transformer from an internal fault for this,
comparison tables were made to consider the settings in
the relay and to be reliably in the system.
references
[1] C37.91-2000,  Guide for protective relay application to
power transformers.
[2] M. Sangrá, Protecciones en las instalaciones eléctricas: evolu-
ción y perspectivas, Barcelona: Marcombo.
[3] R. Mujal Rosas, Protección de sistemas eléctricos de potencia,
Barcelona: Ocina de Publicaciones Académicas Digi-
tales de , 2014.
[4] F. Barberán-Núñez y M. Suárez-Ordóñez, Diseño y cons-
trucción de módulo didáctico de protecciones de redes de
distribución en sistemas eléctricos de potencia (), te-
sis de ingeniería, Universidad Politécnica Salesiana-se-
de Guayaquil, 2016.
[5] V. M. Castillo y G. I. Ospina, «Análisis de los modelos de
transformadores para la simulación de protección dife-
rencial», Instituto de Energía Eléctrica, Universidad Na-
cional de San Juan, San Juan, Argentina, 2010.
[6] J. Morón, Sistemas eléctricos de distribución, Barcelona: Edi-
ciones Reverte, 2009.
[7] A. A. Naranjo-Yépez, M. A. Feraud-López y R. J. Villa-
crés-Salazar, Diseño y construcción de un módulo para
protección diferencial de transformadores, tesis ingenie-
ría, Universidad Politécnica Salesiana, sede Guayaquil,
Ecuador, 2015.
[8] P. Concha, «patricioconcha.ubb» [En línea]. Available:
http://patricioconcha.ubb.cl/410113/accionamientos/
razon%2016.jpg. [Último acceso: 4 diciembre 2016].
[9] O. Enrique Ras, Transformadores de potencia de medida y de
protección, Barcelona: Marcombo Boixareu Editores, 1994.
[10] S. Ramírez, «Protección de sistemas eléctricos», Maniza-
les: Universidad de Manizales, 2003.
[11] S. Laboratories, Manual de instrucciones Sel 587-0, -1, :
Hopkins Court., 2004.
[12] G. Valderrama, Protección y coordinación de sistemas de
distribución, Sevilla: Publicaciones Litosa, 2000.
[13] J. Briones y R. López, Análisis y modelación matemática de
paralelismo de banco trifásico de transformadores con co-
nexión delta estrella de diferentes grupos vectoriales, tesis,
Universidad Politécnica Salesiana, sede Guayaquil, 2014.
[14] M. Sangrá, Protección en las instalaciones eléctricas: evolu-
ción y perspectiva, Barcelona: Marcombo, 1999.