## 2 Proposed Fault Diagnosis Method
### Health Condition Classification Based on the SSDAE  
#### 2.4.1 Autoencoder and its Variant Algorithms  
Autoencoder (AE) is a typical three-layer neural network that consists of an input layer, a hidden layer, and an output layer. As shown in Figure 4, the network structure is divided into coding and decoding processes. Mapping from input layer to hidden layer is a coding process, and the mapping from hidden layer to output layer is a decoding process. AE extracts and compresses the input features in the coding part and then restores the compressed features in the decoding part, which turns the hidden layer into another form of expression of the input. Assume that input data is \(X\), and the reconstructed data is \(\hat{X}\), and the average reconstruction error between \(X\) and \(\hat{X}\) is as shown in Equation (9), where \(n\) is the number of training samples, \(\hat{X}^{i}\) is the new sample reconstructed from the input, \(X^{i}\) is the raw input, \(W\) is the weight, and \(b\) is the bias. \[\mathrm{J}(W,b)=\frac{1}{n}\sum_{i=1}^{n}\left(\frac{1}{2}{\|\hat{X}^{i}-X^{i} \|}^{2}\right) \tag{9}\]  
AE realizes the repetition of input through the encoding and decoding processes, in which much redundant information interferes with the extraction of useful features. To solve this problem, [PERSON] et al. [38] proposed a sparse autoencoder (SAE) in which a restriction condition is added to the coding process. Sparse restriction refers to the suppression of hidden layer neurons in most cases. Here, a sigmoid function is used as an activation function. The SAE adds a sparse penalty term to the loss function, and its expression is shown in Equation (10):  
\[\sum_{l=1}^{m}KL(\overrightarrow{\rho}\|\hat{\rho}_{l}^{-})=\sum_{l=1}^{m}\| \overrightarrow{\rho}\log\frac{\overrightarrow{\rho}}{\hat{\rho}_{l}^{-}}+(1- \overrightarrow{\rho})\log\frac{1-\overrightarrow{\rho}}{1-\hat{\overrightarrow {\rho}}_{l}} \tag{10}\]  
where \(m\) is the number of neurons in the hidden layer, index \(l\) represents each neuron in the hidden layer in turn, \(\left|\overrightarrow{\rho}\right|\) is a sparse parameter, and \(\hat{\overrightarrow{\rho}}_{l}\) represents the average activity of the hidden layer \(l\), and its expression is in Equation (11):  
\[\left|\overleftarrow{\overrightarrow{\rho}}_{l}^{-}\right|=\frac{1}{n}\sum_ {i=1}^{n}\left[a_{l}^{(2)}(x^{(i)})\right] \tag{11}\]  
where \(a_{l}^{(2)}\) denotes the activation of hidden neurons, and \(a_{l}^{(2)}(x^{(i)})\) denotes the activation of hidden neurons \(x\) in a given input of \(l\). The function \(KL(\overrightarrow{\rho}\|\hat{\rho}_{l}^{-})\) has the following properties: when \(\left|\overleftarrow{\overrightarrow{\rho}}_{l}^{-}\right|=\left| \overrightarrow{\rho}\right|\), \(KL(\overrightarrow{\rho}\|\hat{\rho}_{l}^{-})=0\) increases monotonously as the difference between \(\left|\overleftarrow{\overrightarrow{\rho}}_{l}^{-}\right|\) and \(\left|\overrightarrow{\rho}\right|\) increases. The function  
Figure 4: Structure of autoencoder (AE). \(KL(\left|\overrightarrow{\rho}\right|\left\|\hat{\overrightarrow{p}}\right\|_{1})\) is added to the loss function, and the loss function is then minimized, so the effects of \(\left\|\hat{\overrightarrow{p}}\right\|_{1}\) and \(\overrightarrow{\rho}\) are as close as possible. The loss function of the SAE is shown in Equation (12):  
\[J_{sparse}(W,b)=J(W,b)+\beta\sum_{l=1}^{m}KL(\left|\overrightarrow{\rho} \right|\left\|\hat{\overrightarrow{\rho}}\right|_{1}) \tag{12}\]  
where \(\beta\) denotes the weight of the sparse penalty items. When the SAE extracts features, most of the neurons in the hidden layer are suppressed, and its mechanism is similar to that of a visual system. The advantage of SAE is that it can learn more representative and sparse features from the input rather than just reproduce them. Therefore, the features extracted by the SAE help improve the reliability of health condition recognition. Denoising autoencoder (DAE) [22] is to add noise to the input and then train the network with the noised input.