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.