## 4 Quantitative Analysis of the Internal Leakage in a Valve
### Quantification of Internal Leakage Rate Based on Wavelet-BP Neural Network  
Based on the sample feature set after dimensionality reduction by factor analysis in the previous section, wavelet decomposition was performed first. Wavelet decomposition can not only increase the number of sample feature sets, but also plays a decisive role in improving the prediction accuracy and anti-interference ability of the neural network quantitative model. Three-layer wavelet decomposition was performed on the sample feature set after dimensionality reduction, and finally, four decomposed sample feature subsets were obtained. The four sample feature subsets were inputted into the quantitative model of the valve internal leakage rate. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameters** & **Initial Value** & **Extraction Rate** \\ \hline Entropy & 1.000 & 0.754 \\ Energy & 1.000 & 0.973 \\ Maximum value & 1.000 & 0.983 \\ Root mean square value & 1.000 & 0.990 \\ Root square amplitude & 1.000 & 0.992 \\ Kurtosis & 1.000 & 0.952 \\ Upstream pressure & 1.000 & 0.881 \\ Downstream pressure & 1.000 & 0.844 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Common factor variance. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **Factor 1** & **Factor 2** & **Factor 3** \\ \hline Energy & 0.969 & 0 & 0 \\ Maximum value & 0.935 & 0 & 0 \\ Root mean square value & 0.924 & 0 & 0 \\ Root square amplitude & 0.928 & 0 & 0 \\ Downstream pressure & 0.746 & 0 & 0 \\ Entropy & 0 & 0.686 & 0 \\ Downstream pressure & 0 & 0.924 & 0 \\ Kurtosis & 0 & 0 & 0.920 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Factorial load matrix after rotation. In order to evaluate the performance of the quantitative model based on neural network for valve leakage rate, mean absolute error (MAE), root mean square error (RMSE) and Pearson's correlation coefficient (R) are introduced as evaluation indexes, as shown in Equations (7)-(9). \[\text{MAE}=\frac{1}{N}{\sum\limits_{i=1}^{N}{\left|{{y_{i}}-{\overline{y}_{i}}} \right|}}, \tag{7}\]  
\[\text{RMSE}=\sqrt{\frac{1}{N}{\sum\limits_{i=1}^{N}{\left({{y_{i}}-{\overline{ y}_{i}}}\right)^{2}}}}, \tag{8}\]  
\[\text{R}=\frac{{\sum\limits_{i=1}^{N}{\left({{d_{i}}-{\overline{d}}}\right) }({y_{i}}-{\overline{y}})}}{{\sqrt{\sum\limits_{i=1}^{N}{\left({{d_{i}}-{ \overline{d}}}\right)^{2}}}\cdot\sum\limits_{i=1}^{N}{\left({{y_{i}}-{ \overline{y}}}\right)^{2}}}}, \tag{9}\]  
where \(N\) is the number of samples, \(y_{i}\) is the predicted value by the model, \(\overline{y}\) is the average of the predicted value by the model, \(d_{i}\) is the sample value, \(\overline{d}\) is the average of the sample. The smaller the value of MAE and RMSE, the better the performance of the model. The larger the value of R, the better the performance of the model. The sample feature set after dimensionality reduction based on factor analysis is chosen as the sample data for establishing the quantitative prediction model of the valve leakage rate. The number of samples is 100. The sample feature set is divided into two parts, the sample training set and the sample test set, which accounts for 75% and 25% of the sample feature set, respectively. In the previous section, three common factors were extracted by factor analysis, and a three-dimensional feature set was obtained by dimensionality reduction. So, the input layer of the neural network prediction model contains three neurons. The output of the model is the valve leakage rate, so the output layer contains one neuron. In training the BP neural network model, the Sigmoid function is used for both the hidden and output nodes. The weight matrix is initialized to be subject to Gauss distribution N(0,1). The bias vector is initialized as 0. The training set is used to optimize the weight matrix and bias vector by reverse iteration. Then, the trial-and-error method was used to test the effect of the number of hidden layers and the number of neurons in each layer on the performance of the model. Firstly, it is assumed that the model has only one hidden layer.