Designing A Protective Relay for Differential Protection of Power Transformers Using Clarks Transform and S Transform

: Given that power transformers are one of the most important components of each network, their protection is an important part that the power transformer errors must be accurately identified and distinguished from each other. Therefore, identification and differentiation of transient phenomena of power transformers, including internal and external errors and magnetic inrush current are essential. In this research, Clarke transform and S transform were used to distinguish between these phenomena that the proposed algorithm is very suitable in terms of three characteristics of accuracy, speed and computational cost. Initially, the simulation of internal, external errors and magnetic inrush current of the transformer was performed for different transformer scenarios. For this purpose, 1060 signal tests were performed under different conditions. Subsequently, the signals of differential current obtained by Clarke transformation and S transformation were analyzed and appropriate criteria were extracted for detecting the current of internal errors from external errors and inrush current. The simulated internal and external errors include three-phase, three-phase to ground, two-phase, two-phase to ground and phase to ground error. Simulations were performed using PSCAD software and implementation of the proposed algorithm in MATLAB environment. The results of this study prevent the unwanted performance of differential protection to prevent undesirable electrifying. It is clear that the description of transient phenomena is the first step towards improving new ideas and criteria for protection with the greater reliability of power transformer which can be controlled better such unusual conditions that are currently used in equipment and relay.


Introduction
Transient phenomena of power transformers include internal errors, external errors, and inrush current.Internal errors of the transformer are related to one of the components of power transformer that the most important of these errors are three-phase, three-phase to ground, two-phase, two-phase to ground and phase to ground.External transformer errors are not related to the power transformer and depend on the network and load.Of external errors can be referred to overloaded, short circuit, overvoltage.The magnetic inrush current also occurs due to the nonlinearity of the transformer core at the moment of the transformer energization.The plan of differential protection for the transformer is a general and comprehensive plan that detects the error current and operates.The primary protective relay is sensitive to any type of unbalance in current transformers or saturation of current transformer, and in some cases the heavy unbalance of the loads connected to the power transformer, and therefore causes the mal-operation of relay.Currently, intelligent algorithms are used to improve the reliability of relay.In this type of relay, there is also mal-operation due to the inrush current.
In the standard relays, internal errors are distinguished from the magnetic inrush current with the help of the second order harmonic.One of the most important features of the high-speed differential relay is during transient phenomena that harmonic differential relays do not have a high velocity.The description of transient phenomena of transformer is the first step towards improving the new ideas and criteria for protection with a greater reliability of the power transformer, which can control better such unusual conditions that are already used in equipment and relay and prevents the unwanted operation of differential protection.
The most important factors that can lead to unwanted performance of the differential protection of power transformer include the ratio of current and power transformers conversion, group vector and transformer connections, inrush current, overflow and the effect of the transformer pulse shift mechanism.Various studies have been done on differential protection of power transformers based on various algorithms.Javad Feyz et al. [1], based on the wavelet transform have proposed an algorithm that decides to separate the internal error from inrush currents by considering different current behaviors under error conditions and inrush current.Jing Ma et al. [2] have used a normalized window curve to distinguish between inrush current conditions and internal error in two time and frequency domains.The normalized window curve is useful for transient signals and extracts its features by quantitative calculation.Ali Hooshyar et al. [3] have used average differential power to detect the saturation conditions from the waveform characteristics of signal.
Therefore, this algorithm is independent of the parameters of transformer and its power consumption.That's why the accuracy and speed of this method is high in compare with state and parameter estimation algorithms such as Kalman Filtering [4], [20].
Majid Sanaye Pasand et al [5] in order to improve the performance of distance relay of transmission lines provide an adaptive logic.The adaptive logic stated in this reference can be used to distinguish between internal errors from external errors and the magnetic inrush current in power transformer.Y.V.V.S. Murty et al. [6] have proposed the design and implementation of time domain of Kalman filter based on the digital percentage protection and ground error for the transformer.Ernesto Vázquez et al. [7] have proposed a protective algorithm based on detecting differential current pattern.This algorithm uses the main component analysis to eliminate waste information and improve the secret pattern in the differential current to distinguish internal errors from inrush current and over-stimulation.Z.
Lu et al. [8] have presented a cognitive pattern for detecting the inrush current of the transformer.The proposed plan separates and analyzes the signal based on the analysis of cognitive-mathematical operators in several levels.
Since differential current signals are unstable, it is required a powerful tool for signal analysis.Transform S is a powerful tool for frequency analysis -time series signals.S.R. Samantaray et al. [9] use the S transform to distinguish between inrush currents and internal error.The elements of this matrix are mixed numbers, which determine the amplitude and phase of different frequencies of transient current at any time, so that complete information about the waveform will be obtained.
Sy-Ruen Huang et al. [10] have used a method using parameters of Jiles-Atherton model for detecting small error current from coil short circuit error in the magnetic inrush current of power transformer.Saeed Jazebi et al. [11] have proposed a differential protection method that combines support vector machine (SVM) and wavelet transform theories.There are two common transient states, i.e. transient inrush current and internal error.
In this research, the purpose of designing a protective relay for the differential protection of power transformer is by using Clarke transform and S transform.Identification of inrush currents and internal and external errors of power transformers is one of the main concerns of electrical engineers.In this research, inrush currents and external errors are identified and distinguish from internal errors.This research is an applied research, which ultimately an intelligent relay is designed and can make the proposed relay.Also, this relay is used in all industries such as electricity, petrochemicals, gas oil and so on.At the present time, harmonic differential relay is used which has very high computing load and low response speed that are not suitable for relay.The innovation aspect of this research is that the Clarke transform and S transform, which are very powerful tools for identifying power transformer errors, are used.

Proposed algorithm of differential protection of power transformer based on Clarks transform and S transform
In this study, Clarke transform and S transform are used.S transform provides enough information to analyze and combine the original signal with a relatively small computational time, and its implementation is very simple in practice.To differentiate between transient phenomena in power transformers from energy, the coefficients of standard deviation of coefficients in a half-cycle time window, which is transient, are used as a feature for categorization.In terms of three characteristics of accuracy, speed, and computational cost, the proposed algorithm based on Clarke transform and S transform is very suitable and can easily implement the above algorithm in practice.
Therefore, in this study, Clarke transform and S transform are used to distinguish between transient phenomena in power transformers.S transform is a very powerful method that connects the distance between the discrete wavelet transform and Fourier transform, and provides very high precision.S transform has a higher characteristic than the discrete wavelet transform and provides Fourier transform.In this algorithm, the length of moving semicircular window is considered, and the sampling frequency is 10 kHz.Due to the use of a moving window in the analysis, transient state information is maintained.
The time window length is obtained as a compromise between the accuracy and the response time after the initial examinations.Differential protection should distinguish internal errors from external errors and inrush current, and only has function in the condition of internal errors.In this algorithm, the differential current of phases first, is obtained from the differential secondary current of transformers of primary and secondary of power transformers and then the following steps are performed to distinguish the transient phenomena: 1.In this algorithm, the activation current is calculated first.In the differential protection, the activation current is defined as equation (1) [12] 2 . .
In this equation, I set point is the activation current, k is the percentage differential, ir is the inhibitory current and i2p and i2s are the secondary currents of current transformers in the primary and secondary power transformer.In this section, the size of I set point is considered 0.25 prionite according to references [13] and [16] [0.25].If the three-phase differential current is smaller than activation current, the normal state and otherwise, other transient phenomena may have occurred.
2. If one of the three-phase differential currents is greater than or equal to the activation current may be occurred one of the transient phenomena, including the magnetism inrush current, internal errors, and external errors in the power transformer.In this algorithm, for the purpose of differentiation between transient phenomena, first, by the help of Clarke transform of ground tide currents, air tide one, and air tide two are calculated using equation (2) [14,15].1.Under normal conditions and stable performance, changes in the values of detailed coefficients are very small.If sudden change in the detailed coefficients is observed over time, the system may be under error conditions, and energy indices and standard deviation of coefficients are very suitable criteria for distinguishing between internal errors, external errors, and magnetic inrush current and normal state.
2. In this study, the sampling frequency is 10 kHz.Given that the length of the moving window is considered semicircle, so there are 100 samples per window.
3-In the proposed algorithm, the coefficient of detail is used.Therefore, the computational load of relay decreases sharply, which is one of the important advantages of this relay.Then, by transforming S, the energy of coefficients of ground tide currents (I0) is obtained in various experiments and in various transitional phenomena.
The energy of a discrete signal x (n) is obtained by the following formula [18,19]: After sampling the differential current in different states, the internal and external errors and the magnetic inrush current of the wavelet transform are applied to these signals, that the equation ( 4) is represented by a matrix: In this equation, [X] 3x1 is input signal that can be a differential current in different transient phenomena of power transformers.[ED] ix3 is the energy calculation operator of wavelet transform coefficients up to level i.The energy is the sum of the square wavelet coefficients.
For example, EDij is the i-th energy from the j-th phase.[X-D] ix1 is the sum of the energy of the three-phase wavelet coefficients at the j level that the above equation is displayed for the current signal to three levels is as equation ( 5) [17 and 18]: If the energy of coefficients is not within the minimum and maximum range of equation ( 6), the magnetic inrush current may be occurred.Otherwise, there may be occurred three-phase internal errors, three-phase error to ground, phase error to ground, phase-to-phase error, and phase-to-phase error to ground or three-phase external errors, three-phase error to ground, phase-to-phase error, phase-to-phase error to ground, and external error of phase to ground.
In the next step, to distinguish between internal errors and external errors, the following vector is defined.
In this equation, 2 2 I D is the vector of coefficients of air tide two (I2).In this stage, the standard deviation of the vector D is calculated in experiments and in different phenomena.
The standard deviation of a discrete signal x (n) is obtained by the following equations [18,19]: In these equations, i x x n and , respectively are coefficients, mean of coefficients, number of coefficients, and standard deviations.
As already mentioned, at this stage, the standard deviation of vector D is calculated in experiments and in different phenomena.If the standard deviation of the vector D associated with internal errors according to ( 9) is considered as threshold, external errors are also distinguished from internal errors.Simulation results

1-Simulation of external and internal errors
To simulate external and internal errors, the power grid is considered in Fig. 1.External and internal errors are occurred in the outside and inside of the protection zone of differential relay in the load side.Types of external and internal errors simulated are three-phase error, three-phase error to ground, phase to ground error, phase-to-phase error, and phase-to-phase to ground error, which is obtained by considering the effect of transformers of primary and secondary current of differential current.In Figure 2  The length of the time series is 101 points  As it is shown in Figures 3 and 4, the error is occurred in 0.2 seconds in all three phases which is seen in the form of waves.On the other hand, due to the fact that the errors are external, the range of differential currents is low.In addition to the three-phase differential current, the three-phase frequency rage is shown in terms of frequency which the output of S transforms during the window information period which is semi-cycle.Given that the error is occurred in three phases, the frequency range of each three phase is very large.In Fig. 5 and Fig. 6, the differential currents and frequency range resulting from the output of S transform related to two -phase and two-phase to ground external error is shown.The error in phase A and B is occurred in 0.2 seconds, which is seen in the form of waves.The range of currents in phase A and B is much larger than the phase C, it is due to the fact that there is no error in phase C. In addition to the three-phase differential current, the three-phase frequency range is shown in terms of frequency, which output of S transform during the window information period, which is semi-cycle.
Given that error is occurred in phase A and B, the frequency range in phase A and B is very large.In Fig. 7, the differential currents and frequency range resulting from the output of S transform related to phase-to-ground external error are shown.In the time of occurring phase-to-ground external error, the range of differential current of relay is very low and is not very effective.Also, as it is seen, the frequency range is very low during the time of information window, which is semi-cycle.
The differential currents and the frequency range resulting from the output of S transform due to internal errors in various modes are shown in Fig. 8 to Fig. 12.In the internal errors simulated, the error is occurred in 0.2 seconds.As it is shown in Figs. 8 and 9, the error is occurred in each three phases in 0.2 seconds, which is seen in the form of waves.On the other hand, given the internal errors, the range of the differential current is very large compared with external errors.In addition to the threephase differential current, the three-phase frequency range is shown in terms of frequency that the output of S transform is during the information window period that is semi-cycle.
Given that the error is occurred in three phases, the frequency range of each three phase is very large.In Fig. 10 and Fig. 11, the differential currents and frequency range resulting from the output of S transform are shown related the two-phase internal error and two-phase to ground.Error in phase A and B occurred in 0.2 seconds, which is seen in the form of waves.The range of current in phase A and B is much larger than the phase C that it is due to the fact that there is no error in phase C. In addition to the three-phase differential current, the three-phase frequency range is shown in terms of frequency which output of S transform during the window information period which is semi-cycle.Given that the error occurred in phase A and B, the frequency ranges in phase A and B is very large.In Fig. 12, the differential currents and frequency range resulting from the output of S transform related to phase-to-ground internal error are shown.Given the phase-to-ground internal error, the range of differential current is very high in phase A and is low in phases B and C. Also, as it is seen, the frequency ranges during the time of information window, which is semi-cycle, is very high in phase A, but in phase B and C it is very low due to the lack of error.

SIMULATION OF THE MAGNETIC INRUSH CURRENT
For simulation of the magnetic inrush current, Fig. 1  In Fig. 14 and Fig. 15, the differential currents and the frequency range resulting from the output of S transform related to inrush currents due to the change in conduction angle and change in residual flux variation are shown.Given that in the secondary magnetic inrush current, the connect transformer is open, so that the primary current of power transformer reaches to the differential relay be considering effect of current transformer in the primary side which differential current range and frequency range resulting from the output of S transform is relatively large.

Differentiation between internal and external errors and magnetic inrush current using Clarke transform and S transform
The minimum and maximum energy of coefficients in the first level in ground tide are presented in Table 1.According to Table 1, if the minimum and maximum energy of ground tide coefficients are related to internal errors as thresholds, the phenomenon of inrush current is not placed in the range between minimum and maximum and this phenomenon is separated from internal errors.
To distinguish between internal errors and external errors, first, according to equation ( 7), the vector D is calculated and then the standard deviation of vector D is obtained in different experiments.The minimum and maximum standard deviations related to internal errors are considered as thresholds.
In Table 1, the minimum and maximum standard deviation of D vector is also presented in internal errors and external errors.According to Table 1, if the minimum and maximum vector D related to internal errors is placed as thresholds, the external errors are not placed in the range between the minimum and the maximum and are distinguished from internal errors.
According to Table 1, the minimum and maximum energy of ground tide coefficients related to internal errors are 0.32693 and 2.676427, respectively that according to the table, the energy of ground tide coefficients related to the magnetic inrush current is not placed in the above range.Therefore, this phenomenon is distinguished from internal errors.
The minimum and maximum standard deviation of vector D in the first level related to internal errors according to Table 1 is 10,9025 and 120,70,921.Based on the results, the minimum and maximum standard deviation of the D vector in the first level related to threephase external errors, three-phase to ground, two-phase, two phase to ground and phase to ground are not placed in the above range.Therefore, these phenomena are also distinguished from internal errors.Therefore, using the proposed algorithm with defined criteria, internal errors can be distinguished from external errors and the magnetic inrush current and prevent the unwanted performance of differential protection.

CONCLUSIONS AND SUGGESTIONS
Differential protection of the standard power transformer is based on the second-order harmonic to avoid malfunctioning of the differential protection of transformer against inrush currents and external errors.In the algorithm, the second-harmonic component of the differential currents component was used in which the differential current signal was processed by the Fourier transform function in order to be identified second harmonic components and, consequently, the relationship between the second harmonic component and the main component to be used as a criterion for detecting error from inrush current and external errors in differential relay.Given that in standard differential protection, the Fourier transform algorithm is used, so the speed of response of differential protection is low, and intelligent algorithms should be used.Differential protection is a limited protection that response speed is very important in it.At the time of internal errors, differential protection should be reacted immediately.So the trip time is very important.In the standard relays, the Fourier transform algorithm is used that response speed of this algorithm is not high.Therefore, new algorithms for differential transformer protection are needed.
In this study, Clarke transform and S transform were used as a powerful tool for distinguishing between transient phenomena in differential protection of power transformer.In the proposed algorithm, various types of external errors, internal errors, and magnetic inrush current were simulated and a suitable criterion for distinguishing between these phenomena was presented.In the proposed algorithm, by the help of Clarke transform of ground tide current, air tide 1, and air tide 2 were obtained.Then, using S transform, the energy of the ground tide coefficients and the standard deviation of air tide 2 coefficients were calculated and internal errors were distinguished from the magnetic inrush current and external errors.
The following suggestions are presented based on the findings: 1.One of the other transient phenomena that may occur in power transformer is the ultra-saturation phenomenon that should be considered in the differential protection of the power transformer and distinguished from internal errors.The ultra-saturation phenomenon causes unwanted performance of differential protection and is a very dangerous threat to the power transformer.
2. Some power transformers in power networks have non-linear loads, such as induction arc furnaces and ....In this type of power transformers, which have specific loads, suitable protection algorithms should be provided by discrete wavelet transform, Clarke transform, S transform and ... for power transformer 3-In all differential protection studies, a differential current signal component is used to distinguish between internal errors from external errors and magnetic inrush current.For this purpose, instead of current signals, it can be uses the voltage components between the primary and secondary coils of transformer (the ratio of transformer power transform) and define the appropriate criteria for distinguishing between transient phenomena.
4. The combination of Clarke transformation and fuzzy technique, artificial neural network, discrete wavelet transform, etc., is very effective in differential protection of power transformers, and it can be improved the accuracy and speed of response with the above combinations.

2 II
are ground tide currents, air tide one, and air tide two, and, respectively, are current of phases a, b, c respectively.It should be emphasized that Clarke transform can be applied to instantaneous quantities, such as phasors,[16].3-Inthe next step, the input signals are analyzed by the extraction information of S transform from the transient signal in both time and frequency domains.If one of the three-phase differential currents is greater than or equal to the activation current, frequency information is considered by the help of S transform and the following steps are performed to distinguish between internal errors, external errors, and magnetic inrush current: mentioned above, by transforming S, the energy of coefficients of ground tide current (I0) is obtained in different experiments and in different transient phenomena.The energy of coefficients of ground tide currents (I0) related to internal errors is considered as the threshold and is defined as the following equation: the energy of coefficients in the experiments and in different phenomena, the minimum and maximum energy of the ground tide coefficients are related to the internal errors.In this algorithm, 1060 experiments have been carried out in various phenomena, including magnetic inrush currents, internal and external errors, and the energy of signal of ground tide currents is obtained in various experiments.
the standard deviation of vector D in experiments and different phenomena, the minimum and maximum standard deviation of vector D related to internal errors.In the proposed algorithm using Clarke transform and S transform, internal errors are distinguished from external errors and magnetic inrush current.MATLAB and PSCAD software have been used for simulation.The transform S is coded with MATLAB software.1060 experiments have been carried out in various phenomena including internal and external errors and magnetic inrush current.In the inrush current phenomenon, the type of residual fluctuation events, the change in the angle of conduction and the change in key switching time, and in internal and external errors, the type of residual fluctuation events, load variation, resistivity of error, the change in the angle of conduction and change in the time of occurrence of error are considered.
, the output characteristics of the transform S are presented.In this figure, the number of frequency voice, the estimated simulation time, the minimum and maximum frequency, the sampling rate of time and frequency, and the number of samples in the information window obtained in simulation are shown.500 experiments are considered for external errors and 500 experiments for internal errors.In external and internal errors, various experiments have been performed on residual flux change, change of load level, change of conduction angle, change time of occurring error, and change error resistance.In Figures 3 to 7, the differential currents are shown due to external errors in different modes and the frequency range obtained from the output of S transform during the window time of information that is considered semicircle.Error is occurred in 0.2 seconds in external simulated errors.In these figures, the differential current and frequency rage resulting from the output of transform S are shown due to change in the resistance of error, change in the conduction angle, change in residual flux, change in the time of occurring error, and change in the load level associated with external errors.Error is occurred in 0.2 seconds in external errors.

Figure 1 :
Figure 1: Simulated electrical network for analysis of internal and external errors

Figure 2 Figure 3 :
Figure 2: output of S transform

Figure 4 :
Figure 4: Differential Currents and Frequency Range obtained of Output of S transform related to three-phase external error due to change of load

Figure 5 :Figure 6 :
Figure 5: Differential Currents and Frequency Range obtained of Output of S transform related to external error two-phase to ground due to change of time of occurring error

Fig. 7 :
Fig. 7: Differential Currents and Frequency Range obtained of Output of S transform related to phase to ground external error due to change of conduction angle

Figure 8 :Figure 9 :
Figure 8: Differential Currents and Frequency Range obtained of Output of S transform related to three-phase internal error due to change of error resistance

Figure 10 :Figure 11 :
Figure 10: Differential Currents and Frequency Range obtained of Output of S transform related to two-phase internal error due to change of time of occurring error

Figure 12 :
Figure 12: Differential Currents and Frequency Range obtained of Output of S transform related to phase-to-ground internal error due to change of conduction angle

Figure 13 :Figure 14 :Figure 15 :
Figure 13: Differential Currents and Frequency Range obtained of Output of S transform related to inrush current due to change of switching time

Table 1 :
Minimum and maximum energy of ground tide coefficients and standard deviation of Dvector in phenomena and in various experiments