Digital Differential Protection of Power Transformer Using Matlab

Power system development is reflected in the development of all the power system devices generators, transformers with different sizes, transmission lines and the protection equipment. Modern power transformer is one of the most vital devices of the electric power system and its protection is critical. For this reason, the protection of power transformers has taken an important consideration by the researchers. One of the most effective transformer protection methods is the differential protection algorithm. Typically, transformer protection is focused on discriminating the internal faults from the magnetizing inrush currents in the power transformers and overcoming the CTs related issues [1 -5].


Introduction
Power system development is reflected in the development of all the power system devices generators, transformers with different sizes, transmission lines and the protection equipment.Modern power transformer is one of the most vital devices of the electric power system and its protection is critical.For this reason, the protection of power transformers has taken an important consideration by the researchers.One of the most effective transformer protection methods is the differential protection algorithm.Typically, transformer protection is focused on discriminating the internal faults from the magnetizing inrush currents in the power transformers and overcoming the CTs related issues [1 -5].

Conventional differential protection scheme
This scheme is based on the principle that the input power to the power transformer under normal conditions is equal to the output power.Under normal conditions, no current will flow into the differential relay current coil.Whenever a fault occurs, within the protected zone, the current balance will no longer exist, and relay contacts will close and release a trip signal to cause the certain circuit breakers (CBs) to operate in order to disconnect the faulty equipment/part.The differential relay compares the primary and secondary side currents of the power transformer.Current transformers (CTs) are used to reduce the amount of currents in such a way their secondary side currents are equal.Fig. 1 shows the differential relay in its simplest form.The polarity of CTs is such as to make the current circulate normally without going through the relay, during normal load conditions and external faults.
Current transformers ratings are selected carefully to be matched with the power transformer current ratings to which they are connected so as the CTs secondary side currents are equal.However, the problem is that the CTs ratios available in the market have standard ratings.They are not available exactly as the desired ratings.Therefore, the primary ratings of the CTs are usually limited to those of the available standard ratio CTs.Commonly the primary side of the current transformer has only one turn (1) and the secondary side has many turns depending on the transformation ratio (N) of the CT, which is selected to match the ratings of the power transformer.Since the transformation ratio of transformers is the ratio between the number of turns in the primary side to the number of the turns in the secondary side.Therefore, the turn ratio of the primary current transformer is and the turn ratio of the secondary side current transformer is .The secondary current of the CT located in the primary side of the power transformer is [2], [6][7]; Where: : the primary side current of the power transformer, : the secondary side current of .: the number of turns in the secondary side of In the same manner for the CT located at the secondary side of the power transformer, the CT secondary current is: Where: : secondary side current of the power transformer, : secondary side current of .: number of turns in the secondary side of Since the differential current is: = − , then, from equation (1) and equation ( 2) the differential current flowing in the relay operating coil current can be calculated as; If there is no internal fault occurring within the power transformer protected zone, the currents are assumed equal in magnitude and opposite in direction.That means the differential current = 0 as shown in figure 2. The primary and secondary side current of the power transformer are related to each other by equation (4); = Where: and : primary and secondary side turns of the power transformer, respectively : power transformer transformation ratio.If there is any fault in the power transformer protected zone, the currents are no longer equal in magnitude and opposite in direction.That means the differential current = ∠ has a significant value as shown in figure 3. From equation (4) the secondary current with respect to the primary current of the power transformer is [2], [6][7]; Therefore, by manipulating equations (3) and ( 5), From equation (6) it is obvious that the term must be equal to zero in order to make = 0 Equation (7) gives the condition for the security of the differential relay, which means the reciprocal of the ratio of the secondary side turns of the CTs must equal to the turns ratio of the power transformer.
In power transformers, the input power is equal to the output power.However, the voltage and the current in both the primary and secondary sides are different depending on whether the transformer is step up or step down.For instance, if the transformer is step up that means; the input voltage of the power transformer is low and the current is high, meantime the voltage in the secondary side is high and the current is low.This action makes both the input and output power equal.Due to this nature the CTs in the primary and the secondary sides of the power transformer do not have same turn ratio.However, they are carefully selected, in terms of turn ratio and magnetizing characteristics, so that they have the same output current at normal conditions of operations.If identical CTs are not available, the closer ones are chosen and then the mismatch between them is compensated by using the interposing CTs.The interposing CTs can fix the mismatch in the CTs; however they add their own burden to the output of the main CTs.
The same argument is applied for three phase (3 ) transformers, except some extra issues may appear in polyphase transformers.Figure 4 shows the schematic diagram of the 3 differential protection.
In some cases, of 3 power transformer connections as shown in figure 5, a 30 phase shift between primary and secondary currents is taking place.This phase shift occurs in the Y- or -Y connected transformers due to the transformation of the current from Y- or -Y as illustrated in the figure 4.This phase shift can be corrected easily by connecting the CTs secondary circuits in opposite way to the way that the power transformer phases are connected.I.

Differential protection difficulties
Generally, three main difficulties handicap the conventional differential protection.They induce the differential relay to release a false trip signal without the existing of any fault.These complications must be overcome in order to make the differential relay working properly [2], [3]: CTs Mismatch and saturation,  Transformation ratio changes due to Tap changer.

Magnetizing inrush current
This phenomenon, the transient magnetizing inrush or the exciting current, occurs in the primary side of the transformer whenever the transformer is switched on (energized) and the instantaneous value of the voltage is not at 90 .At this time, the first peak of the flux wave is higher than the peak of the flux at the steady state condition.This current appears as an internal fault, and it is sensed as a differential current by the differential relay.The value of the first peak of the magnetizing current may be as high as several times the peak of the full load current.The magnitude and duration of the magnetizing inrush current is influenced by many factors, some of these factors are [2], [6], [7]; The instantaneous value of the voltage waveform at the moment of closing CB,  The value of the residual (remnant) magnetizing flux,  The sign of the residual magnetizing flux,  The type of the iron laminations used in the transformer core,  The saturation flux density of the transformer core,  The total impedance of the supply circuit,  The physical size of the transformer,  The maximum flux-carrying capability of the iron core laminations,  The input supply voltage level, The effect of the inrush current on the differential relay is false tripping the transformer without of any existing type of faults.From the principle of operation of the differential relay, the relay compares the currents coming from both sides of the power transformer as explained above.However, the inrush current is flowing only in the primary side of the power transformer.So that, the differential current will have a significant value due to the existence of current in only one side.Therefore, the relay has to be designed to recognize that this current is a normal phenomenon and to not trip due to this current.

False trip due to C.T characteristics
The performance of the differential relays depends on the accuracy of the CTs in reproducing their primary currents in their secondary side.In many cases, the primary ratings of the CTs, located in the high voltage and low voltage sides of the power transformer, does not exactly match the power transformer rated currents.Due to this discrepancy, a CTs mismatch takes place, which in turn creates a small false differential current, depending on the amount of this mismatch.Sometimes, this amount of the differential current is enough to operate the differential relay.Therefore, CTs ratio correction has to be done to overcome this CTs mismatch by using interposing CTs of multi taps [8].
Another problem that may face the perfect operation of the CTs is the saturation problem.
When saturation happens to one or all CTs at different levels, false differential current appears in the differential relay.This differential current could cause mal-operation of the differential relay.The dc component of the primary side current could produce the worst case of CT saturation.In which, the secondary current contains dc offset and extra harmonics [9], [10].

False trip due to tap changer
On-Load Tap-Changer (OLTC) is installed on the power transformer to control automatically the transformer output voltage.This device is required wherever there are heavy fluctuations in the power system voltage.The transformation ratio of the CTs can be matched with only one point of the tap-changing range.Therefore, if the OLTC is changed, unbalance current flows in the differential relay operating coil.This action causes CTs mismatches.This current will be considered as a fault current which makes the relay to release a trip signal [11], [12].

Digital differential protection
Many digital algorithms have been used so far after the invention of the computer.These algorithms do the same job with different accuracy and speed.The acceptable speed according to IEEE standard for transformer protection is 100 msec.All modern algorithms are faster than this IEEE standard.Nowadays, there are some algorithms performs their function in less than 10 msec.In this chapter, a fast algorithm is introduced.Its speed is in the range of 1 to 15 msec.This algorithm is based on the Fast Fourier algorithm (FFT).This algorithm is not new, however, significant changes has been introduced to make it much faster.
The proposed digital differential relay is designed using a simulation technique in Matlab Simulink environment.The design is implemented to protect the power transformer against internal faults and prevent interruption due to inrush currents.
This algorithm is built on the principle of harmonic-current restraint, where the magnetizing-inrush current is characterized by large harmonic components content that are not noticeably present in fault currents.Due to the saturated condition of the transformer iron, the waveform of the inrush current is highly distorted.The amplitude of the harmonics, compared with the fundamental is somewhere between 30% to 60% and the third harmonic 10% to 30%.The other harmonics are progressively less [3] [6], [13].Fast Fourier Transform ( ) is used to implement this approach.In general, any periodic signal ( ) can be decomposed to its sine and cosine components as follows: Where: is the DC component of the f (t), and , are the cosine and sine coefficients of the frequencies present in ( ), respectively.The discrete forms of the coefficients , are expressed in the following equations: The Fourier harmonic coefficients can be expressed as [13]: Where: is the harmonic coefficient for k = 1, 2,...,N and ( ) is the signal ( ) in its discrete form.The produces exactly the same results as the ; however, the is much faster than DFT, where the speed of calculation is the main factor in this process [13][14][15][16].The software is implemented according to the following steps [15][16][17]: Step 1. Reading data from the .Step 2. Data calculation, which is given as follows; For the amplitude calculation, if the absolute difference (| -| ) between the output currents is greater than zero the logic (1) takes place, which indicates the case of an inrush current or an internal fault.Otherwise, the logic (0) takes place, which indicates a detection of an external fault.In the meantime, the harmonic calculation is performed.If the percentage value of the second harmonic amplitude is in the range of (0.3 to 0.6) of the fundamental component amplitude, then the logic (0) occurs, that means recognition of inrush current.Otherwise, the logic (1) takes place, which indicates a detection of an internal or external fault.
Step 3. Taking the final decision: If the logic cases received from both cases (a & b) in step two are both (1), that indicates a detection of an internal fault.Then a trip signal is released to stop the simulation.
For the other logic options of (0,1) means an external fault, (1,0) means an inrush current, or (0,0) indicate an occurrence of an inrush current or an external fault, and the simulation goes back to step two to start the calculation again for the next sample.

Implementation of the digital differential protection using matlab
This implementation is done using Matlab/Simulink environment.Figure 7 shows the simulated power system built in Matlab/Simulink environment.In which a three phase, 250MVA, 60Hz, (735/315) kV, Y/ power transformer is used in this system.The contents of each designed block are illustrated in separate figs.8 to 12.
There are some coefficients are kept hidden for the reader to find them.These coefficients can change the behavior of the design.

The results and discussions
The results will be given for different cases: Case 1: magnetizing inrush current, Case 2: magnetizing inrush with adding load, Case 3: Three phase to ground fault at loaded transformer, Case 4: Phase A to ground external fault at loaded transformer, Other cases of different types of faults and inrush currents such as single line to ground fault, line-to-line fault, line to line to ground fault and three phase fault in both cases loaded and unloaded transformer are illustrated.
Case 1: Magnetizing inrush current: In this section of simulation, when the primary side CB1 is closed at 0.1 sec, only the inrush current flows in the primary circuit of the power transformer and no current passes through the power transformer to the secondary side as shown in Fig. 13.The harmonic comparator shows in Fig. 14 that the value of the 2nd harmonic is higher than 0.3 of the fundamental component.In this case the harmonic calculation part released logic (0) but the amplitude comparator showed in Fig. 15 that the differential current is equal to the inrush current, where both curves are drown over each other, then the amplitude comparator release logic (1).For this logic coordination (0,1) no trip signal is released.

Digital Differential Protection of Power Transformer Using Matlab 233
Case 2: Magnetizing inrush with adding load: This test is carried out after the energization of the power transformer by switching ON the CB1 at 0.1sec and CB2 at 0.3 sec from the beginning of the simulation to see the effect of load excursion on the accuracy of the designed approach.Therefore, a 500W resistive load is added to the system at 0.3 sec.Consequently, the inrush current disappeared and load current started to flow in the primary and secondary circuits of the transformer according to the transformation ratio of the power transformer as shown in Fig. 16.However, the amplitude of the output currents of the primary and secondary CTs are equal due to the proper selection of the transformation ratio of the primary and secondary CTs, which can obviously noticed in Fig. 18.Where, before the time 0.3 sec the differential current was equal to the inrush current, but after the swathing ON of the load the differential current went to zero and the primary and secondary currants became equal.As shown in Fig. 17, after the switching of CB2, the value of the 2nd harmonic become lower than 0.3 of the fundamental component.Accordingly, the harmonic calculation part released logic (1) but the amplitude comparator released logic (0).Consequently, for this logic coordination (1,0) no trip signal is released.Figure 18 shows the amplitude comparator results.Case 3: Three phase to ground fault at loaded transformer: In this section, a three phase to ground fault is created to test the security of the algorithm.After the switching of CB1 at 0.1sec, an internal fault is created at 0.5 sec at the secondary side of the power transformer by connecting the three phases A, B and C of the secondary side of the power transformer to the ground.In this case, a significant increase of the primary current takes place due to the fault occurrence inside the protected zone at 0.5 sec as shown in Fig. 19.The relay detected this increase using the harmonic and amplitude comparators and realized it as an internal fault.Consequently the transformer is isolated from the grid.Also it is obvious from Fig. 20 that the relay has released a trip signal after 0.57 msec after the occurrence of the fault, which can be considered as a very good speed to isolate the transformer.
As shown in Fig. 21, after the occurrence of the fault at time 0.5 sec, the value of the 2nd harmonic increased during the transient time and then decreased rapidly to a value lower than 0.3 of the fundamental component once the steady state is achieved.Accordingly, the harmonic calculation part released logic (1).Also from Fig. 22 which shows the result of the amplitude comparator the value of the differential current is no longer equal to zero.Accordingly the amplitude comparator released logic (1).Therefore, for this logic coordination (1,1) a trip signal is released in order to isolate the power transformer from the grid.This case is similar to case 2, where the occurrence of the fault current outside the protected zone leaded to the increase of fault currents in both sides of the power transformer.Therefore the relay considered this case as a sever increase in load currents.Fig. 23 shows the increase in phase A currant and no trip signal is released As illustrated in Fig. 24, after the occurrence of the external fault at 0.5 sec, the value of the 2nd harmonic decreased to a value less than 0.3 of the fundamental component.Accordingly, the harmonic calculation part released logic (1) but the amplitude comparator released logic (0) because the differential current is almost zero as it can be seen from Fig. 25.Consequently, for this logic coordination (1,0) no trip signal is released.

Conclusions
This chapter is talking about the implementation and simulation of a small power system with a differential protection for the power transformer.The implementation is shown in step by step.This simulation is tested for various cases and for all cases it gave satisfactory results.All the tests gave satisfactory results.There are some difficulties are faced in the implantation of this system such as the lack of some toolbox in the Sim-power-system.For example, there is no current transformer in the toolbox.In this case, there are two choices to solve this problem.The first one is to use a regular single phase and make some changes in its specification to fit the current transformer specifications.The second one is to use a current measurement, but this one will not simulate the problems of the CTs.

Figure 1 .
Figure 1.Differential protection for single phase two winding transformer

Figure 2 .
Figure 2. Output currents of the CTs are equal in magnitude and opposite in direction

Figure 3 .
Figure 3. Output currents of the CTs are not equal in magnitude and not opposite in directionThe amount of current = ∠ induces the relay operating coil to operate in order to send a trip signal to the circuit breakers to isolate the transformer.

Fig 6
Fig 6 illustrates the flow chart of the designed digital Fourier Transform based logic technique algorithm.In this algorithm the output currents of the undergo over two analysis processes, amplitude comparison process and harmonic content calculation process.The amplitude comparison between the values of the output currents ( | -| ) is in the left hand side of the flowchart, and the harmonic calculation is in the right hand side of the flowchart.

Figure 6 .
Figure 6.Flow chart of the proposed Digital Differential Relay Scheme

Figure 13 .
Figure 13.Inrush currents waveforms of the three phases at the primary side of the power transformer.

Figure 14 .
Figure 14.Harmonic comparator result: the 2nd harmonic and the fundamental component for the 1 st case.

Figure 15 .
Figure 15.Amplitude comparator results for the 1 st case.

Figure 17 .
Figure 17.2nd harmonic and the fundamental component for the 2 nd case.

Figure 18 .
Figure 18.Amplitude comparator results for the 2 nd case.

Figure 19 .Figure 20 .
Figure 19.Increase of phase A, B & C currents due to the occurrence of the fault at 0.5 sec for loaded transformer

Figure 22 .
Figure 22.Amplitude comparator result for the 3 rd case.

Case 4 :
Phase A to ground external fault at loaded transformer.

Figure 23 .Figure 24 .
Figure 23.Increase of phase A current due to the occurrence of the fault at 0.5 sec for loaded transformer

Figure 25 .
Figure 25.Amplitude comparator result for the 4 th case.Similarly, the relay is tested for all other cases of different types of faults such as single line to ground, line to line, line to line to ground and three phase faults in both cases loaded and unloaded transformer.In all cases the relay has successfully released a trip signal in each case.The results of some of these different types of faults are shown in Figs (26 -30).

Figure 26 .Figure 27 .Figure 28 .Figure 29 .Figure 30 .
Figure 26.Increase of phase A & B currents due to the occurrence of the fault at 0.5 sec, for unloaded transformer

Table 1 .
Summary of the performance of the designed differential relay at different types of disturbances that may occur to the power transformer