Given that power transformers are one of t he 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 o f 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 exte rnal 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 pr oposed 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. Keywords: Protective Relay, Differential Protection, Power Transf ormer, Clarks Transform, S Transform 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 t ransformer 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 energizati on. 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, the re is also mal -operation due to the inrush current . In the standard relay s, 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 rel ay 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 o f the power transformer, which can control better such unusual conditions that are alre ady 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 d ifferential 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 bee n 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 indepen dent 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 impr ove 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 exter nal 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 unsta ble, it is require d 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 in formation 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 identifie d 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 comput ing 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 powe rful tools for identifying power transformer errors, are used . Proposed algorithm of differential p rotection of power transformer b ased on Clark s transform and S transform In this study, Clarke transform and S transform are used. S transform provides eno ugh 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 st andard 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 metho d 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 cur rent is calculated first. In the differential protection, the activation current is defined as equation (1) [1 2] 2. .2 2 ints p poSeti ik irk I (1) In this equation, I set point is the activation current, k is the percen tage differential, i r is the inhibitory current and i 2p and i 2s 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