## 4 Quantitative Analysis of the Internal Leakage in a Valve
### Quantification of Internal Leakage Rate Based on Wavelet-BP Neural Network
The first hidden layer has only one neuron. In this case, a neural network model was established. The sample training set was used to train the model. When all the parameters of the model were determined, the sample test set was used to test the performance of the model. By analogy, the performance of the model when the first hidden layer has two, three,..., nine neurons, was tested gradually. Three evaluation indexes, MAE, RMSE and R were used to evaluate the prediction performance of the model. By doing so, the index scores of the model performance for different numbers of neurons are shown in Table 4. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Numbers of Neurons** & **MAE** & **RMSE** & **R** \\ \hline
1 & 0.47625 & 0.581045 & 0.994024 \\
2 & 0.548971 & 0.678835 & 0.988537 \\
3 & 0.589502 & 0.713228 & 0.986409 \\
4 & 0.627522 & 0.818928 & 0.980072 \\
5 & 0.714719 & 0.907486 & 0.977476 \\
6 & 0.745887 & 0.889888 & 0.980421 \\
7 & 0.684662 & 0.852834 & 0.981729 \\
8 & 0.712839 & 0.873321 & 0.979994 \\
9 & 0.745381 & 0.950341 & 0.974458 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Scores of model evaluation indexes with a single hidden layer at different numbers of neurons. It can be seen from Table 4 that when the model has only one hidden layer, as the number of neurons increases, the values of the model performance evaluation indexes, MAE and RMSE, increase gradually. While the evaluation index R shows a downward trend. When the model has only one hidden layer and only one neuron in the hidden layer, the evaluation scores of the model, MAE, RMSE and R, are 0.476255, 0.581045 and 0.994024, respectively, which is better than the model performance when the number of neurons is other values. Therefore, it can be concluded preliminarily that when the neural network has a hidden layer and the number of hidden layer neurons is one, the model proves the best performance. The optimal structure of the model can be expressed as 3-1-1. Secondly, it is assumed that the model contains two hidden layers, and the first hidden layer has only one neuron. Similarly, the trial-and-error method was used to determine the optimal structure of the model. Following the steps above, the model performance index scores when the number of neurons in the second hidden layer varying was calculated, as shown in Table 5.  
It can be seen from Table 5 that when the number of neurons in the second hidden layer is 1, the three evaluation indexes of the model, MAE, RMSE and R, have the best scores, 0.502898, 0.621259 and 0.992559, respectively. Therefore, the optimal structure can be expressed as 3-1-1-1. Compared with the optimal structure of the neural network with a single hidden layer, the performance of the model with double hidden layers is relatively low, but it has little difference. So, the hidden layers should increase continually and the trial-and-error verification is still required. Next, a model containing three hidden layers is established, in which both the first and second hidden layers contain just one neuron. The trial-and-error method was used again to analyze the influence of the number of neurons in the third hidden layer on the performance of the model. The results are shown in Table 6.  
It can be seen from Table 6 that when the model has three hidden layers and the third hidden layer has only one neuron, the MAE index score of the model is the best, thus 0.461136. When the third hidden layer of the model contains four neurons, the RMSE index score of the model is the best, thus 0.611622. When the third hidden layer of the model contains two neurons, the R index score of the model is