## 4 Fault Classification  
The fault classification algorithm using in this research was designed based on the DWT methodology as described in the flowchart in Figure 5. The operation of the algorithm detecting the fault on the power system consists of a transmission line and a transformer by first checking the status of relay 1 (at the transformer). Relay 1 obtains the differential current signals from the transformer and extracts the coefficient value using DWT. This algorithm considers the maximum coefficients at scale 2 every 5 ms (1/4 cycle). When the coefficients changes more than five times and attains values larger than \(5\times 10^{-3}\), an internal fault occurs. This status will signal the relay 1 to trip. Otherwise, it is an external fault and will send a signal for relay 2 (at the transmission line). For the relay 2, the required signals from the transmission line are the positive sequence of the three-phase current signal. These signals will input through DWT to extract the coefficient value. The fault classification conditions in relay 2 are the maximum coefficients at scale 2 of the positive sequence every 5 ms (1/4 cycle). When the coefficients change more than 2 times and attain values larger than \(1\times 10^{-2}\), a fault occurs. This status will signal the relay 2 to trip. The designed fault classification algorithm and testing of the proposed algorithm consists of testing of the experimental setup to obtain the signal from both relays 1 and 2. The number of case studies was varied with the different conditions to obtain a number of data points, as shown in Table 1. The data were divided into three sets with a total number of data points of 1776; the first set of data was used for algorithm design--50% (888 data points), the second set of data was used for algorithm testing--25% (444 data points), and the last set of data was used for a case study--25% (444 data points). The first set was used to design the condition within the algorithm with an accuracy of more than 95%. The second set of data, different from the first set, was used to test the accuracy of the algorithm. The third set of the data, the newer data differentiated from the first two sets, was used as the case study to evaluate the performance of the proposed algorithm. The four different mother wavelets were used to decompose the current signals to obtain the coefficient value from the high-frequency component. The extraction from the DWT of a differential current showed that the coefficients of the internal faults changed more than those of the external faults. However, the results of the four mother wavelets were similar, as shown in Figure 6. This characteristic was used to design the condition in a fault classification algorithm for relay 1 (transformer). External faults can be analyzed by using coefficients of transmission line systems. The coefficient characteristics between faulty and normal conditions when applied different mother wavelets are shown in Figure 7. The extraction from the DWT of three-phase and positive sequence signals showed a similar trend with the fault condition having a higher coefficient than the normal condition. However, there was a difference in the coefficient value between different mother wavelets. The above behavior was used to design algorithms for fault classification. The algorithm was operated by using the maximum coefficients, as shown in Figure 8, for the transformer (relay 1) and Figure 9 for the transmission line (relay 2). From Figure 8 it can be seen that the result from DWT of differential current in scale 2 provided a higher maximum coefficient during the transient condition compared to the normal condition. In Figure 9, a similar trend was also shown with the maximum coefficient from scale 2 in the case of an external fault higher than the normal case. The normal case only consisted of noise due to no significant transient state in the signal.