## 3 Classification of Power Quality Disturbance Based on H-ELM
### ELM Learning Algorithm  
ELM can be built using randomly initialized hidden layer nodes, given power quality disturbance data \(\left\{(x_{i},t_{i})\big{|}x_{i}\in R^{d},t_{i}\in R^{m},i=1,\ldots,N\right\}\), where \(x_{i}\) is the training data vector, \(t_{i}\) represents the type of each power quality disturbance data, and L represents the number of hidden layer nodes. ELM theory seeks minimal training errors as shown in Equation (12).  
\[\textit{Minimize}:\ \ \big{\|}\beta\big{\|}_{u}^{\sigma_{1}}+\lambda\big{\|}H \beta-T\big{\|}_{0}^{\sigma_{2}} \tag{12}\]  
where \(\sigma_{1}>0,\sigma_{2}>0,u,v=0,(\frac{1}{2}),1,2,\ldots,+\infty\), \(H\) is the output matrix of the hidden layer as shown in Equation (13) and \(\beta\) is the output weight. \(\lambda\) is a user-specified parameter and provides a tradeoff between the distance of the separating margin and the training error [21].  
\[H=\left[\begin{array}{c}\mathrm{h}(\mathrm{x}_{1})\\ \vdots\\ \mathrm{h}(\mathrm{x}_{N})\end{array}\right]=\left[\begin{array}{ccc}h_{1}(x _{1})&\cdots&h_{L}(x_{1})\\ \vdots&\vdots&\vdots\\ h_{1}(x_{N})&\cdots&h_{L}(x_{N})\end{array}\right] \tag{13}\]  
\(T\) is the training data tag matrix, as shown in Equation (14):  
\[T=\left[\begin{array}{c}t_{1}^{T}\\ \vdots\\ t_{N}^{T}\end{array}\right]=\left[\begin{array}{ccc}t_{11}&\cdots&t_{1m}\\ \vdots&\vdots&\vdots\\ t_{N1}&\cdots&t_{Nm}\end{array}\right] \tag{14}\]  
The ELM training algorithm can be divided into the following three steps:  
(1) Randomly assign hidden layer node parameters;  
\begin{table}
\begin{tabular}{c c} \hline \hline \multicolumn{2}{c}{**Best Feature Set**} \\ \hline
20 dB &
\begin{tabular}{c} \(\mu\)_1, \(\mu\)_3, \(\mu\)_4, \(\mu\)_6, \(\sigma\)_1, \(\sigma\)_4, \(\sigma\)_6, \(\sigma\)_7, \\ RMS\_3,RMS\_5,RMS\_6,RMS\_7,RMS\_8,KT\_7,Ent2,Ent\_7,_5K\_4,RG\_2,RG\_3 \\ \(\mu\)_1, \(\mu\)_3, \(\sigma\)_2, \(\sigma\)_8, \(\sigma\)_9, RMS\_1, \\ RMS\_8,RMS\_9,KT\_5,Ent\_1,Ent\_5,Ent\_9,SK\_9,RG\_1,RG\_3,RG\_4,RG\_5,RG\_6,RG\_9 \\ 40 dB & \(\mu\)_4, \(\mu\)_5,RMS\_1,RMS\_4,RMS\_6,RMS\_7,RMS\_8,RMS\_9,KT\_4,Ent\_8,RG\_2,RG\_6,RG\_8 \\ 50 dB & \(\mu\)_2, \(\mu\)_3, \(\mu\)_5, \(\mu\)_8, \(\sigma\)_1, \(\sigma\)_3, \(\sigma\)_4, \(\sigma\)_6, \(\sigma\)_8, \(\sigma\)_9,RMS\_7,RMS\_9,KT\_5,KT\_7,KT\_8,Ent\_7,RG\_2 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Particle swarm optimization (PSO) selected best feature set.  
(2) Calculate the hidden layer output matrix \(H\);  
(3) Obtain an output weight vector such as Equation (15).  
\[\beta=H^{\dagger}T \tag{15}\]  
where \(T=\left[t_{1},\ldots,t_{N}\right]^{T}\), \(H^{\dagger}\) is the generalized inverse matrix of Moore-Penrose of matrix \(H\). According to the ridge regression theory, it was suggested that a positive value (1/\(\lambda\)) is added to the diagonal of \(HH^{T}\) in the calculation of the output weights \(\beta\). To improve the robustness of ELM, the output weight vector can be obtained using Equation (16).  
\[\beta=(\frac{1}{\lambda}+HH^{T})^{-1}H^{T}T \tag{16}\]  
The output function of ELM is shown in Equation (17):  
\[f(x)=h(x)\beta=h(x)(\frac{1}{\lambda}+HH^{T})^{-1}H^{T}T \tag{17}\]