A Novel Power Transformer Fault Diagnosis Model Based on Harris-Hawks-Optimization Algorithm Optimized Kernel Extreme Learning Machine

Dissolved gas analysis (DGA) method is widely used to detect the incipient fault of power transformers. This paper presents a novel DGA method for power transformer fault diagnosis based on Harris-Hawks-optimization (HHO) algorithm optimized kernel extreme learning machine (KELM). The non-code ratios of the gases are used as the characterizing vector for the KELM model, and the Harris-Hawks-optimization (HHO) algorithm is introduced to optimize the KELM parameters, which promotes the fault diagnostic performance of KELM. Based on dataset collected from IEC TC 10, the fault diagnosis capability of the proposed method is validated by different characterizing vectors and is compared with conventional KELM and other optimized KELM. Moreover, the generalization ability of the proposed method is confirmed by China DGA data. The results demonstrate that the proposed method is superior to other methods and is more effective and stable for power transformer fault diagnosis with high accuracy.


Introduction
The power transformer plays a vital role in power systems, and it serves as the connection of transmission and distribution networks at different voltage levels [1]. Once it fails, it will cause power interruption, which seriously influence economic production and living activities [2]. Thus, it is of great necessity to detect and diagnose incipient fault in power transformers [3].
In recent years, diagnosis incipient fault in power transformers has been studied by many scholars and experts and transformer fault diagnosis problem is solved with different approaches. The aim of all these studies is to meet the reliability requirements of power supply in order to minimize device damages and reduce economic, social and personal losses. Various approaches have been used to solve transformer fault diagnosis problem such as frequency response analysis [4], the vibration analysis [5], dissolved gas analysis (DGA) [6], etc.
Among these methods, dissolved gas analysis (DGA) is a widely used technique to detect the incipient faults in power transformers [7,8]. Many researchers have put forward a large number of DGA-based methods. Traditional methods based on DGA such as IEEE key gases [9], Rogers ratios [10], IEC standard code [11], Dornenburg ratios [12], Duval triangle [13], IEC 60599 [14], have been applied to transformer fault diagnosis.
In addition to these traditional methods, artificial intelligence (AI) methods based on DGA have been recently used in the field of transformer fault diagnosis, including artificial neural networks(ANN) [15], support vector machine(SVM) [16], fuzzy logic (FL) [17], adaptive neuro fuzzy inference system (ANFIS) [18],random forest (RF) [19], Bayesian network [20], gene expression programming(GEP) [21], time series analysis [22], expert system [23], association rule [24], set pair analysis [25], evidential reasoning [26], etc. The various proposed methods have produced good results and made an important contribution in the field of transformer fault diagnosis. These methods tend to build models that can bridge the relationship between machines data and machines health states [27].
Nowadays, deep learning theories have also been proposed for transform fault diagnosis with the development of calculation capacity [28]. Deep learning can realize end-toend learning and avoid tedious feature engineering and build a black box model compared with traditional AI methods. However, it requires a lot of iterations and weight updates with time-consuming gradient computing. A new model based on extreme learning machine (ELM) was introduced to identify the state of transformer to solve the efficiency degradation caused by gradient update [29]. The ELM model outperformed ANN and other traditional methods. However, stochastic selection of the number of hidden layer nodes is easily leads to low stability and poor robustness of the model in the application [30].
By analyzing the reviewed articles, despite different diagnosis models have been presented by various scholars and experts, a precise diagnosis model is still needed yet. For this purpose, a novel fault diagnosis model based on HHO-KELM for power transformers is proposed in this study.
The contributions of this study are as follows: (1) Noncode ratios set is selected as the characterizing vector for KELM model. (2) A parameter optimization method based on HHO is adopted to obtain the optimal model parameters of KELM automatically. (3) The established HHO-KELM model is applied to diagnose incipient fault in power transformers.
The remaining parts of the paper are organized as follows: Sect. 2 describes the proposed method; Sect. 3 presents the proposed fault diagnosis approach based on HHO-KELM; In Sect. 4, the results and analysis discussion are given. Section 5 concludes the summary.

A. Kernel Extreme Learning Machine
Kernel extreme learning machine (KELM) [30] is a kind of machine learning algorithm with strongest ability and generalization ability which is proposed on the basis of ELM and kernel functions. On the basis of ELM, the learning method of KELM is described as follows: , t j2 , … , t jm ] T is the encoded class label. The mathematical model of ELM can be described as below: where, L is the neurons number in the hidden layer, w i , b i , i are the input weights, hidden layer bias and output weights of the ith hidden neuron node respectively, g(x i , w i , b i ) is the activation function. Equation (1) can be written in a matrix form as: where = [ 1 , … , L ] T represents the vector of output layer weights, = [t 1 , … , t N ] T is the corresponding coding class label, and H is the hidden layer output matrix: The training of ELM is equivalent to solving the least squares solution of linear Eq. (2), which is defined as: The least square solution of the output weight is calculated as: where C is the regularization parameter. The output function for ELM is implemented as: When the hidden layer function h(x) is unknown, the kernel function matrix is calculated as: where K(x i , x j ) represents the kernel function. The radial basis function (RBF) is applied in this paper, which is given by: Then, the output function of KELM can be obtained as:

B.
Harris Hawks Optimization Algorithm Harris hawks optimization (HHO) is a newly introduced metaheuristic optimization technique by Heidari in 2019 [31], which contains the phases of exploration and exploitation.

Exploration Phase
In this stage, Harris hawks detect the prey through two strategies. The first strategy assumes that the hawks allocate close to the team members and the prey. In the second strategy, the hawks place on random trees. These two strategies can be described as: where X(t) and X(t + 1) represent the hawk's positions at the current iteration t and the next iteration t + 1, respectively. X prey (t) is the position of prey. X rand (t) is a randomly selected hawk from the current position. r 1 ,r 2 ,r 3 ,r 4 and K are randomly generated number between [0, 1]. LB and UB are the lower and upper bounds of control variables. X m (t) is the average position of hawks which calculated as: where, N is the total number of hawks. X i (t) is the position of each hawk in iteration t.

Ransition from Exploration to Exploitation
The change from the exploration to exploitation in the HHO can be modeled based on the prey escaping energy as: where, E indicates the escaping energy of the prey. E 0 is the initial energy of the prey which is generated randomly between [−1, 1]. T is the maximum number of iterations. Therefore, if E < 1, this means the prey is weak, hence the hawks should exploit close to the prey location, and if E > 1, this means the prey has enough energy to escape, so the hawks should continue exploring the prey location.

Exploitation Phase
The exploitation process of HHO has been modeled based on the escaping energy of prey E and its chance for escaping r. There are four chasings besiege in the exploitation phase of HHO. a: Soft Besiege ( r ≥ 0.5 and |E| ≥ 0.5).
In soft besiege phase, the prey tries to escape using random jumps, but the hawks surround it softly. This process can be expressed as: where ΔX(t) is the distance between the prey position and the hawks' position in iteration t. K = 2(1-r 5 ) indicates the strength of the prey randomly jumping during the escaping. r 5 is a random number ranged from [0, 1].
In hard besiege mode, the prey becomes too exhausted to escape. As a result, the hawks effortlessly catch the prey, and then pounce on it. This move can be modeled as: In soft besieges with progressive rapid dives approach, the prey able to escape and the hawks softly surround it. To model this besiege, a levy fight (LF) concept is used as follows: where H is the soft besiege positions. The hawks dive based on the LF as: where D is the dimension of problem. S is a random vector by size 1 × D. The LF is calculated as: where is a constant value set to 1.5. u and v are random values between [0,1].
Finally, the updating position of hawks is calculated as: Hard Besiege with Progressive Rapid Dives ( r < 0.5 and |E| < 0.5).
In hard besieges with progressive rapid dives case, the behavior of the prey is similar to its behavior in the case of a soft besiege. The position of team members is updated by reducing the distance between their average position and the prey position. This motion is described as: where X m (t) is obtained from Eq. (11).

C. The Proposed HHO-KELM Method
The diagnosis performance of KELM is affected by the penalty factor C and kernel parameter σ. In order to obtain the optimal parameters of the KELM, we optimize the penalty factor C and the parameter σ of the kernel function by HHO. The specific steps of HHO optimizing KELM parameters are described as follows: Step 1: Initialize the KELM parameters C, σ and the parameters of HHO, including the number of search agents N, the number of iterations T and D-dimensional space.
Step 2: Calculate the objective function value of each hawks through the Eq. (9) and update the position of X prey . The fitness function of the HHO in the optimization process is the mean square error (MSE), which is: where y D and y represent the measure value and the observed value. M represents the number of observation samples.
Step 3: Update the initial energy, jump strength and escaping energy of each individual in each iteration.
Step 4: Determine whether the number of iterations is equal to the maximum value. If it is not, execute t = t + 1 and return to step 2. Otherwise, go to step 5.
Step 5: Export HHO optimal solutions (values of C and σ).
The flow chart of this procedure is described in Fig. 1.

A. Transformer Fault Types and Input Characterizing Vector Selection
Faults inside transformers are classified in thermal faults and electrical faults according to [32]. Thermal faults are low and medium thermal (LM-T) and high thermal (H-T) categorized by means of temperature in the range of TLM-T < 700 °C and TH-T > 700 °C, respectively. Electrical faults are low-energy discharge (LE-D) and high-energy discharge (HE-D). In addition this work takes the normal state (NS) into account to distinguish between normal mode and failure mode.

B. Transformer Fault Diagnosis Model Based on HHO-KELM
In this study, a fault diagnosis model based on HHO-KELM for transformers is established. It can be divided into three parts: data collection and processing, the training of the network, and the performance testing and evaluation of the network model.
In the data collection and processing part, some dissolved gas content of transformer is firstly collected from the transformer faults records as DGA data, the collected DGA data are then transformed to non-code ratios. When the ratio with 0/0 is set to "0" and c/0 to 20, where c is not "0" [33].The obtained DGA ratios are then normalized to clear up the influence of order of magnitude, shown as: where x si and x i are the DGA ratios before and after normalization, x imax and x imin and are the maximum and minimum value of a DGA ratio.
In the network training part, a training dataset is constructed by using DGA records with transformer fault types. The characterizing vectors are input to the KELM network. The KELM adopts the HHO algorithm to obtain the model parameters. The learnt feature shows the relationships between the DGA ratios and the corresponding fault patterns.
After the training process, the diagnostic parameters are obtained. Then, the types of faults are classified for the samples in the testing set or the transformer under investigation with the trained diagnostic parameters. Accuracy is taken into consideration to appraise the capability of fault diagnosis approach which is computed by: where N correct is the number of samples correctly diagnosed, N total is the total number of samples in the whole dataset.
The implementation process of the proposed fault diagnosis model is described as follows: Step1: Obtain the DGA data of transformers through the acquisition device.
Step2: Transform DGA data to Non-code ratios.
Step3: Normalize the obtained DGA ratios and construct a feature vector.
Step4: Divide the data into a training set and testing set. The training set is used to train a diagnostic model.
Step5: The testing set is selected to test and evaluate the performance of the proposed model.
The flow chart of the proposed transformer fault diagnosis model is shown in Fig. 2.

Results and Analysis
A. Test Data DGA samples are collected from IEC TC 10 database [11], as shown in Table 1. These samples are used to evaluate the performance of the proposed fault diagnosis method.

B. Model Parameters
The relevant parameters of HHO and KELM for transformer fault diagnosis are detailed in Table 2.  In order to investigate the accuracy of HHO-KELM for transformer fault diagnosis, 93 samples out of total 118 cases are used to train KELM structure parameters and the rest 25 samples (5 samples of each fault) are employed to test diagnosis capability of the trained KELM. Figure 3 reports the typical HHO fitness variation curves. It is found that the converge time is 11.2693 s and the fitness value (mean square error) reaches 0.1708 after the second iteration, and then remain flat for a while. After the fifth iteration, the fitness value is reduced to 0.1630, which is the best value. This illustrates that the HHO algorithm can converge to the best solution very quickly.

C. Transformer Fault Diagnosis Results
The diagnosis results based on HHO-KELM are present as Fig. 4. It can be seen that HHO-KELM has four errors in training samples, and the classification accuracy is 95.7% (89/93). In the test samples, three errors are generated in the type of faults, and the classification accuracy is 88% (22/25). This indicates that the proposed method has good accuracy.

D. Comparisons with Different Input Characterizing Vector
In order to further determine the proposed method, the input characterizing vectors of HHO-KELM are divided into four categories: (1)All the DGA data (H 2 , CH 4 , C 2 H 2 , C 2 H 4 , C 2 H 6 , CO, CO 2 ); (2) IEC Rations (CH 4 /H 2 , C 2 H 2 /C 2 H 4 and C 2 H 4 /C 2 H 6 ); (3) Rogers Ratios (CH 4 /H 2 , C 2 H 2 /C 2 H 4 , C 2 H 4 / C 2 H 6 and C 2 H 6 /CH 4 ); (4)Non-code Rations. The above four different types of characterizing parameters are modeled in KELM for diagnosis and the fault diagnosis results are reported in Table 3 and Fig. 5. As seen in Table 3 and Fig. 5, HHO-KELM with Noncode ratios can detect LM-T better than others. HHO-KELM with IEC ratios and Rogers ratios can not detect LM-T properly. HHO-KELM with Non-code ratios has the best performance for H-T as well. The accuracy of HHO-KELM with Non-code ratios for LE-D is same to HHO-KELM with IEC ratios and Rogers ratios. All methods except HHO-KELM with all the DGA data, can detect HE-D and N-S properly.
In short, the HHO-KELM with Non-code ratios shows the highest total accuracy. With the input vector of Non-code ratios, the average accuracy of HHO-KELM is increased significantly compared to HHO-KELM with all the DGA data,  IEC ratios and Rogers ratios, the average accuracy for testing samples is increased by 60%, 32% and 24%, respectively.

E. Comparisons with Different Diagnostic Methods
In order to verify the diagnosis performance, the ELM, KELM, GA-KELM and PSO-KELM with the input vector of Non-code ratios are selected to compare with the HHO-KELM. Figure 6 shows the relationship between the fitness value (mean square error) and the number of iterations for different algorithms in the optimization process for KELM. It can be seen from Fig. 6 that the HHO-ELM model reduces the number of iterations and can find a stable solution close to the best goal. The reason the original ELM, KELM are not represented in the iteration number versus fitness plot is that the original ELM, KELM did not incorporate an intelligent optimization algorithm and did not ensure fitness.
The fault diagnosis results for five different methods are shown in Table 4 and Fig. 7.
According to Table 4  It can be concluded that HHO-KELM has the best average accuracy. Compared with ELM, KELM, GA-KELM and PSO-KELM, the average fault diagnosis accuracy of

3
HHO-KELM is increased by 28%, 24%, 8%, and 4% for testing set, which show that the HHO-KELM has higher classification accuracy than those of the other compared method.

F. Fault Diagnosis Using China Transformers DGA Data
In order to investigate fault diagnosis capability of the proposed method comprehensively, 180 DGA samples of transformers in China are diagnosed by HHO-KELM. The180 samples are divided into two parts, of which 130 samples are used to train HHO-KELM model and the other 50 samples (10 samples of each fault) are tested with the trained model. Figure 8 presents a high accuracy of 90% (46/50) for China DGA data, which shows that the proposed method has better performance.

Conclusion
In this work, a fault diagnosis method based on HHO-KELM is presented to diagnose the different fault states of transformers. The proposed model is solved using non-code ratios as the input vector, Furthermore, HHO algorithm is implemented to optimize the KELM model parameters. Finally, some numerical analysis are proposed in order to demonstrate the validity of the proposed strategy. The comparison results show that the average test accuracy of the Non-code ratios feature set is 60%, 32% and 24% higher than that of the DGA full data, the IEC ratios and the Rogers ratios feature quantity respectively. Also, the accuracy of the HHO-KELM model for transformer fault diagnosis reaches 88% which is higher than the model of ELM, KELM, PSO-KELM model and GA-KELM. Considering the presented results, it can be said that the proposed method outperforms all compared diagnosis models and is an accurate model for solving such problems.
However, some shortcomings still existence in the study, such as the insufficient data samples. Additional datasets could be considered in future work in order to validate the proposed method by means of fault diagnosis accuracy.