## 2 The Proposed Method
### Developed Algorithms  
#### 2.2.1 Support Vector Machines (SVM)  
SVM is a pattern recognition model that is applied for classification models. SVM classifiers have been successfully used to separate the data into two or several classes in many applications, especially fault detection in PV systems [24; 25]. The major advantage of SVM classifiers is that they are resistant against the error of models and also have comparable computational efficiency with other machine learning methods. Hence, it can be used as a powerful model for detecting and classifying the LL faults in PV arrays. The SVM classifier aims to find a hyperplane in the feature space in order to properly separate data with a maximum margin. The closest data samples to the hyperplane are named \"Support Vectors\" [26]. To better understand the function of the SVM classifier, we briefly describe the SVM formulation in a binary classification problem. In the case of binary classification, a linear straight line can be a good hyperplane for separating data of each class with a maximum margin. According to the training data \((x_{i},y_{i}),\ i=1,\ 2,\ 3,\cdots,n\), where \(y_{i}\ \in\ \{+1,-1\}\) records the category of the sample, and \(x_{i}\ \in\ R^{\rm d}\) represents the input space vector, \(\rm R^{d}\) indicates the dimensional feature space, and \(n\) is the number of data instances. The linear hyperplane is expressed in Equation (1):  
\[\rm w^{T}x+b=0 \tag{1}\]  
where b is a scalar and w is the weight vector. Two important features for finding this hyperplane are: error in separating data must be minimal, and distance from the nearest data of each class should be maximum. Therefore, the search area for the hyperplane can be anywhere between support vectors. Hence, the SVM classifier for separable \begin{table}
\begin{tabular}{c c} \hline \hline
**Moule Parameters** & **Module Rating** \\ \hline I\({}_{\rm MPP}\) & 4.35 A \\ V\({}_{\rm MPP}\) & 34.5 V \\ I\({}_{\rm SC}\) & 4.75 A \\ V\({}_{\rm OC}\) & 43.5 V \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulated PV module parameters. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \multicolumn{4}{c}{**Extracted Features**} \\ \hline f\({}_{\rm I}=\frac{{\rm I}_{\rm SC}}{{\rm ICSC}}\) & f\({}_{\rm Z}=\frac{{\rm V}_{\rm OC}}{{\rm VCSC}}\) & f\({}_{\rm 3}=\frac{{\rm V}_{\rm MPP}}{{\rm VCSC}}\) & f\({}_{\rm 4}=\frac{{\rm I}_{\rm MPP}}{{\rm VCSC}}\) \\ \hline f\({}_{\rm S}=\) f\({}_{\rm 4}/\) f\({}_{\rm 3}\) & f\({}_{\rm 6}\)= f\({}_{\rm 3}/\) f\({}_{\rm 2}\) & f\({}_{\rm 7}\)= f\({}_{\rm 4}/\) f\({}_{\rm 1}\) & f\({}_{\rm 8}\)= \(({\rm I}_{\rm MPP}\)\({}^{-}\)I\({}_{\rm SC})/({\rm V}_{\rm MPP})\) \\ \hline f\({}_{\rm 9}=(-{\rm I}_{\rm MPP})/({\rm V}_{\rm OC}-{\rm V}_{\rm MPP})\) & f\({}_{\rm 10}=\frac{{\rm FE}}{{\rm FE}^{\rm(STC)}}\rightarrow{\rm FF}=\frac{{\rm V }_{\rm MPP}{\rm NC}_{\rm MC}}{{\rm VCSC}_{\rm MC}}\) & \({\rm FF}_{\rm(STC)}=\frac{{\rm V}_{\rm MPP(STC)}{\rm X}_{\rm MP(STC)}}{{\rm VCSC }_{\rm NCSC}}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Extracted features from I-V characteristics of the PV array. training data solves an optimization problem in order to maximize the distance value between the margins by finding the optimal hyperplane. Equation (2) describes the optimization problem:  
\[ \begin{array}{c}\min\limits_{w,b}\frac{1}{2}w^{T}w\\ \text{s.t}\quad y_{i}\Big{(}w^{T}x+b\Big{)}\geq 1\end{array}  \tag{2}\]  
It should be noted that it is challenging to specify an optimal hyperplane for non-separable cases that can accurately classify each training sample. The slack variable \(\xi_{i}\) is introduced into the optimization problem in order to modify the non-separable to separable cases, presented in Equation (3):  
\[ \begin{array}{c}\min\limits_{w,b}\quad\quad\frac{1}{2}w^{T}w+C\sum\limits_{ i=1}^{n}\xi_{i}\\ \text{s.t}\quad y_{i}\Big{(}w^{T}x+b\Big{)}\geq 1-\xi_{i}\end{array}  \tag{3}\]  
where \(C\) is the penalty of misclassifying the training samples.