Sometimes conventional differential relay mal-operates during initial energization of the power transformer, due to the occurrence of magnetizing inrush current. The magnetizing inrush current, is a transient condition, which is drawn by the primary of the transformer whenever an unloaded transformer is switched on for the first time and the instantaneous voltage is not at 90? angle. During this time, the magnitude of the flux wave is larger than that of the flux wave at the steady state condition. This current looks like an internal fault and it causes an unwanted switching in the circuit breaker of the transformer 12. This inrush current has a high value of DC-component which is decaying with time and has large value of harmonics. The Inrush phenomenon is shown in fig. 1. The expression of flux is given by equation 1:? = ?R + ?m cos ? – ?m cos (?t + ?) (1)FIGURE 1. Inrush phenomenonThus, the flux is a function of following three factors which influence the magnitude and duration of magnetizing inrush current:• Residual flux ?R• Instant of switching ?• Magnetic properties of core, i.e. the amount of magnetising current required to produce a given amount of flux. 2The problems caused by inrush current are unbalance and harmonics. Other disturbances caused by inrush are: Incorrect operation and failures of electrical machines and relay systems, Irregular voltage distribution along the transformer windings, high amount of voltage drop at the power system at energization times, electrical and mechanical vibrations among the windings of the transformer. Table 1 gives harmonic content of a typical inrush waveform 6FrequencyMagnitudeFundamental component100 %DC component40 – 60 %2nd harmonic30 – 70 %3rd harmonic10 – 30 %4th harmonicLess than 5 %5th harmonicLess than 5 %6th harmonicLess than 5 %7th harmonicLess than 5 %TABLE 1: Harmonic content of typical inrush current waveformFrom table 1, the second harmonic content is high for inrush condition than for fault current. Presence of Inrush current which is a transient condition creates a false tripping of relay. Therefore, to avoid the needless trip by magnetizing inrush current, the second harmonic component is used for blocking the relay operation 3. It is effective, fast and simple technique to discriminate between magnetizing inrush fault current in transformers.Since 1960, much research has been done to improve security while maintaining dependability. Randy Hamilton 4 had proposed a common restraint method to use the second harmonic information in the inrush current to secure differential protection when energizing transformers. C. L. Cheng et al 5 demonstrated an accurate model which shows the inrush current in single-phase transformers. Conditions under investigation are related to transformer loading, switch-on angles, and remanent flux.In this paper, an attempt has been made to detect and analyse the inrush condition of a transformer. Fast Fourier Transform (FFT) is used to find out the presence of harmonics in primary current of transformer and Total Harmonic Distortion (THD) is calculated to analyse the inrush condition using MATLAB/SIMULINK environment. This analysis will be helpful to generate the tripping signal for the 3 – phase power transformer protection.MATLAB IMPLEMENTATIONSimulation of normal condition, magnetising inrush condition and internal fault condition is performed in MATLAB/SIMULINK considering a 50 MVA, 220/11 kV, 50 Hz, 3 – phase power transformer for the assessment of magnetising inrush current. Second harmonic method is used to compare inrush and fault current for the following conditions:1) Magnetising Inrush condition2) Normal operating condition3) Internal Fault conditionCondition 1: Magnetizing Inrush condition:Figure 2 shows the block diagram for simulation of normal and inrush conditions wherein a three phase two winding50MVA, 220/11 kV, 50 Hz power transformer is connected to three – phase source through a 3-phase circuit breaker.Primary current of 3-phase transformer have been stored in workspace after the sampling. Assuming only onetransformer is to be energized and no other transformer is connected to that system.The total simulation time for this model is considered as 0.5 second. The transformer parameters are given in table 2.Type 3-phase, core type, two -windingtransformerRated capacity 50 MVARated voltage ratio 220/11 kVRated frequency (f) 50 HzConnection Y-Y (neutral grounding)Magnetization resistance (Rm) 500 ?TABLE 2. Outline of measured TransformerFor the simulation of magnetizing inrush current, the saturable core transformer is considered and residual flux istaken as zero.3 – phase ACsource3 – phase circuitbreakerSaturable core 3 –phase transformer(100 MVA, 440/)Samples WorkspaceFFT-THDAnalysis of InrushcurrentFIGURE 2. MATLAB model for simulation of inrush current in transformerWaveforms of inrush current for all three phases are shown in fig. 3. The magnitude of inrush current is 380 A, whichis three times the rated current.FIGURE 3. Magnetizing Inrush Current of 3-phase power transformer when the switching angle is 0?The FFT of Inrush current of phase A is shown in fig. 4. The percentage of second harmonic with respect tofundamental frequency and total harmonic distortion of all the three phases is shown in Table 3.FIGURE 4. FFT of Inrush current phase APhaseTHD2nd harmonic3rd harmonic5th harmonicPhase A55.9653.72 %11.025.87Phase B106.8582.22 %57.6410.74Phase C106.9182.25 %57.3810.79TABLE 4. THD and harmonic values of all three phases of Inrush currentCondition 2: Normal operating condition:Waveforms of primary current at normal operating condition for all the three phases are shown in fig. 5. The rated current of present considered transformer is 131 A. The FFT of rated current of phase A is shown in fig. 6.FIGURE 5. Rated current waveforms of all three phasesFIGURE 6. FFT of normal current phase AIt is seen from fig. 6 that the THD is 0% for the normal rated current of a transformer. It is a pure sinusoidal wave.Condition 3: Internal fault conditionMATLAB model has been prepared according to fig. 7 to simulate the internal fault condition where the same ratingof three phase transformer is used. A 3 – phase to ground fault (most severe fault) is applied at the secondary side ofpower transformer.3 – phase ACsource3 – phase circuitbreaker3 – phasetransformer(100 MVA, 440/)Samples WorkspaceFFT-THDAnalysis of InrushcurrentLOAD3 – phase toground faultFIGURE 7. MATLAB model for simulation of Internal Fault condition of power transformerWaveforms of fault current for all the three phases are shown in fig. 8. The magnitude of fault current is 2200 A,which is about seventeen times the rated current.FIGURE 8. Fault Current waveform (LLLG fault) of 3-phase power transformerThe FFT of fault current of phase A is shown in fig. 9. The percentage of second harmonic with respect to fundamentalfrequency and total harmonic distortion of all the three phases is shown in Table 4.FIGURE 9. FFT of fault current phase APhase THD 2nd harmonic 3rd harmonic 5th harmonicPhase A 4.68 2.91 1.94 1.17Phase B 2.09 1.25 0.84 0.5Phase C 2.66 1.69 1.12 0.67TABLE 4. THD and harmonic values of all three phases of fault current.RESULT ANALYSISThis experiment is conducted on 50 MVA power transformer under fault and inrush condition. The second harmonic contents and total harmonic distortion is calculated and tabulated in table 3 and table 4. It is observed that the contents of 2nd harmonic and THD under fault condition are below 5% and on the other hand, it is about 55 % in case of Inrush current. Hence, comparison can be done between fault and inrush condition on the basis of second harmonic threshold in the primary side of power transformer. It is easier to prevent the mal operation of differential relay during magnetising inrush condition.CONCLUSIONIn this paper, an attempt has been made through the use of MATLAB/SIMULINK to analyze different conditions using FFT. The obtained result illustrates that the proposed MATLAB model represents an appropriate action. The model gives discrimination between inrush current and fault current on the basis of second harmonic threshold. Hence it is very convenient method for inrush detection and to avoid the mal operation of differential relay during inrush. The proposed model was able to compare magnetizing inrush, fault and normal operating conditions.