**4. 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

$$\mathbf{f(t)} = \frac{\mathbf{a\_0}}{2} + \sum\_{\mathbf{k=1}}^{\infty} \mathbf{C\_k} \cos(\text{kwt}) + \mathbf{S\_k} \sin(\text{kwt})$$

$$\mathbf{C\_{k}} = \frac{2}{\mathbf{N}} \sum\_{\mathbf{n=1}}^{\mathbf{N-1}} \mathbf{x(n)} \cos \left(\frac{2\mathbf{kwt}}{\mathbf{N}}\right)$$

$$\mathbf{S\_{k}} = \frac{2}{\mathbf{N}} \sum\_{\mathbf{n=1}}^{\mathbf{N-1}} \mathbf{x(n)} \sin \left(\frac{2\mathbf{kwt}}{\mathbf{N}}\right)$$

$$\mathbf{F\_k} = \sqrt{\mathbf{S\_k^2} + \mathbf{C\_k^2}}$$


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.
