# A Novel Intelligent Condition Monitoring Framework of Essential Service Water Pumps
## 2 Basic Theory
### Fault Diagnosis Algorithms  
Convolutional neural networks (CNNs) and SVMs are classical classifying algorithms for supervised FD methods. CNNs were initially proposed for image-related works, and they have been improved and applied in non-image-related works [13; 28]. The structure of a CNN includes the input layer, convolutional layers, pooling layers, fully connected layers, the dropout layer, and the output layer. The input and output layers are only responsible for transmitting data without processing. Convolutional layers are the core part of convolutional neural networks which extract features from input data. A pooling layer is added between the two convolutional layers to reduce the parameters of the neural network and prevent overfitting. Generally, each convolutional layer is followed by a ReLU function to accelerate learning and simplify models. The full connection layer converts the output from the convolution and pooling layers into classification or regression results. The dropout layer randomly discards some neurons during the training process to prevent overfitting of the model and improve the generalization ability of the model. The output layer outputs the final result according to the full connection layer. Originally, SVMs were binary classification mathematical models based on structural risk minimization [29], and they already have been developed to solve multi-class classification problems. One-versus-rest (OVR) and one-versus-one (OVO) are the two main approaches for the multi-class classification of SVMs. The basis of both methods is to transform a multi-class problem into multiple binary classification problems. For training samples \(\{(x_{i},y_{i})|x_{i}\in\mathbb{R}^{m},i=\{1,2,\dots,N\},y_{i}\in\{-1,1\}\}\), SVM linear classifiers complete the classification task by placing a hyperplane between samples \(x_{i}\) of two linearly separable categories. An SVM nonlinear classifier introduces kernel function to project the nonlinearly separable samples \(x_{i}\) into a separable projected feature \(\varphi(x_{i})\), similar to the processing of SVDD models. Since the principles of the linear and nonlinear classification of SVMs are similar, nonlinear classification is introduced here. The decision function can be expressed as  
\[f(x_{i})=w^{T}\varphi(x_{i})-b \tag{8}\] \begin{table}
\begin{tabular}{c c} \hline \hline
**Criteria** & **Status** \\ \hline \(s\) close to 1 (\(>\)0.5) & Abnormal \\ \(s\) approximately equal to 0.5 & Normal \\ \(s\) close to 0 & Normal \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The criteria of anomaly detection based on ISF. where \(w^{T}\) and \(b\) are adjustable parameters of the decision function, and \(f(x_{i})\) is the output of the classifier with input \(x_{i}\). The optimization problem is converted by constructing the hinge loss function  
\[ \begin{split}\min_{w,b,\xi}&\Big{(}\|w\|_{2}^{2}+ \frac{1}{c}\sum_{i=1}^{N}\xi_{i}\Big{)}\\ s.t.y_{i}\big{(}w^{T}\varphi(x_{i})-b\big{)}&\geq 1 -\xi_{i},\xi_{i}\geq 0,i=\{1,2,\ldots,N\}\end{split}  \tag{9}\]  
where \(C\) is the penalty factor and \(\xi_{i}\) is a relaxation variable. Introducing Lagrange multiplier technology, the dual problem of Equation (9) is  
\[ \begin{split}\max_{\alpha}&\Big{(}\sum_{i=1}^{N} \alpha_{i}-\frac{1}{2}\sum_{i=1}^{N}\sum_{j=1}^{N}\alpha_{i}\alpha_{j}y_{i}y_{j }K\big{(}x_{i},x_{j}\big{)}\Big{)}\\ s.t.\sum_{i=1}^{N}\alpha_{i}y_{i}&=0\\ \frac{1}{2n\lambda}&\geq\alpha_{i}\geq 0,i=1, \ldots,N\end{split}  \tag{10}\]  
where \(\alpha_{i}\) are the Lagrange multipliers; then,  
\[b=w^{T}\varphi(x_{i})-y_{i}=\Big{[}\sum_{j=1}^{N}\alpha_{j}y_{j}K\big{(}x_{j},x_{i}\big{)}-y_{i}\Big{]} \tag{11}\]  
Finally, the decision function is  
\[f(z)=sgn\Big{(}w^{T}(\varphi(z)-b)\Big{)}=sgn\Big{(}\Big{[}\sum_{i=1}^{N} \alpha_{i}y_{i}K(x_{i},z)\Big{]}-b\Big{)} \tag{12}\]  
where \(sgn()\) means symbolic function. For a sample \(z\), the predicted label is \(f(z)\). And the \(f(z)\) of multi-classes are processed by OVR [30].