# Advancing Fault Detection in Distribution Networks with a Real-Time Approach Using Robust RVFLN
## 2 Fault Detection Method
### Rr-Rvfkn  
In [57], a weighted empirical lossy ridge-type regularized RVFLN algorithm is derived using the nonparametric kernel density estimation (NKDE) method. This new method solves the robustness problem and is called the robust regularized RVFLN (RR-RVFLN). It is explained that, in RR-RVFLN, empirical loss weights are calculated according to the reliability of the samples estimated by the NKDE method. Reducing the effect of outliers through this method depends on decreasing and increasing the empirical loss weights of low- and high-reliability samples. The RR-RVFLN formula for \(N\) different samples \((s_{o},z_{o})\) is expressed as in Equation (12).  
\[\begin{split} min:\frac{1}{2}\
orm{\alpha}_{2}^{2}+\frac{B}{2} \sum_{o=1}^{N}r_{o}\
orm{\epsilon_{o}}_{2}^{2}\\ s.t:\mathbf{f}(\mathbf{s_{o}})\alpha=z_{o}-\epsilon_{o},\quad \forall o.\end{split} \tag{12}\]  
\(r_{o}\) is defined as the empirical loss weight of the sample.  
According to the information given in the Karush-Kuhn-Tucker (KKT) theorem, we have the optimization problem given in Equation (12). This problem is equivalent to the binary optimization problem in Equation (13).  
\[\begin{split}\mathbf{V}_{\ell_{2}}(\alpha,\epsilon,\beta)& =\frac{1}{2}\
orm{\alpha}_{2}^{2}+\frac{1}{2}B\sum_{o=1}^{N}r_{o} \epsilon_{o}^{2}\\ &-\sum_{o=1}^{N}\beta_{o}(\mathbf{f}(\mathbf{s_{o}})\alpha-z_{o }+\epsilon_{o})\end{split} \tag{13}\]  
\(\beta_{o}\) is expressed as the Lagrange multiplier corresponding to the \(o\)-th input sample. However, in this case, it must satisfy the partial derivative of zero with respect to \(\alpha\), \(\epsilon\), and \(\beta\). In this case, there is only one optimal solution for the resulting convex quadratic optimization problem (see details in [53]).  
The empirical loss weights \(r_{o},o=1,\dots,N\) are important parameters in solving \(\alpha\), while the regularity parameter \(B\) can be chosen via the \(L\)-curve [58]. \(r_{o}\) describes the contribution of the samples to the solution to increase the robustness of the algorithm and is calculated analytically. In this solution, the contribution of low-density outliers to the solution is small. An identity matrix \(\mathbf{R}\) must be constructed to generate the probability distribution of the residuals in RR-RVFLN.  
\[\epsilon_{u}=\sum_{o=1}^{K}\alpha_{o}fo(\mathbf{t}_{o},n_{o},\mathbf{s}_{u})- z_{u},\quad\ u=1,2,\dots,N \tag{14}\]  
The probability density function of the residuals can be calculated using Equation (15).  
\[h(x)=\frac{1}{fN}\sum_{u=1}^{N}\psi\left(\frac{s-\epsilon_{u}}{f}\right) \tag{15}\]  
\(f=1.06\xi N^{\frac{-1}{3}}\) s is called the width of the predicted window. \(\xi\) is expressed as the standard deviation of the residuals. \(\psi\) is calculated using Equation (16) as a Gaussian kernel function.  
\[\psi(s)=\frac{1}{\sqrt{2\pi}}e^{\frac{-1}{2}s^{2}} \tag{16}\]Using Equation (15), the probability \(\varepsilon_{u}\) of each residue is calculated as \(h(\varepsilon_{u})\). The reliability of the sample is proportional to the value of \(h(\varepsilon_{u})\). The weight of \(r_{0}\) is directly calculated analytically with respect to \(h(\varepsilon_{u})\).