## 5 Case Analysis
### Results Analysis  
In MATLAB for SSA-BPNN analysis, the evaluation criteria typically include the MSE and R [28]. A smaller MSE value and an R value closer to 1 indicate a better training outcome, reflecting a more effective model fitting. Figure 11 is the regression analysis diagram of the SSA-BPNN model, showing the network prediction (output) of the response (target) of the training set, the validation set, and the test set. From Figure 11, it is evident that the average goodness of fit for the SSA-BPNN coiled tubing erosion model is 0.9998, indicating a high level of fit. This high goodness of fit suggests that the SSA-BPNN model demonstrates excellent predictive performance. Figure 10: SSA-BPNN flowchart. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Input Parameter Values** \\ \hline Number of nodes in the hidden layer & 3 \\ Transfer function & trainscg \\ Training method & SSA-BPNN \\ Maximum number of iterations & 1500 \\ Learning rate & 0.005 \\ Training convergence requirement & \(10^{-4}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Main parameter settings of SSA-BPNN. Figure 12 illustrates the relationship between the gradient of the training data and the MSE. The SSA-BPNN model exhibited excellent validation performance, reaching its minimum MSE value of 0.035258 at epoch 100. This signifies the model's strong predictive capabilities and effectiveness. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Sample** & & & **Input Parameters** & & & **Output Parameters** \\ \hline  & Exhaust & Sand & Impact velocity & Sand & Sand mass & Erosion rate \\  & Volume & Ratio & (m/s) & diameter & flow & (kg/(m\({}^{2}\)-s)) \\  & (L/min) & (\%) & (mm) & (kg/s) & (kg/(m\({}^{2}\)-s)) \\
1 & 100 & 10 & 1.21 & 0.1 & 0.3 & \(5.27\times 10^{-8}\) \\
2 & 200 & 10 & 2.41 & 0.1 & 0.598 & \(1.47\times 10^{-7}\) \\
3 & 250 & 10 & 3.04 & 0.1 & 0.755 & \(4.17\times 10^{-7}\) \\
4 & 300 & 10 & 3.62 & 0.1 & 0.894 & \(4.44\times 10^{-7}\) \\
5 & 350 & 10 & 4.17 & 0.1 & 1.035 & \(5.66\times 10^{-7}\) \\
6 & 400 & 10 & 4.82 & 0.1 & 1.197 & \(9.21\times 10^{-7}\) \\
7 & 450 & 10 & 5.4 & 0.1 & 1.341 & \(1.21\times 10^{-6}\) \\
8 & 250 & 5 & 3.04 & 0.1 & 0.587 & \(1.14\times 10^{-7}\) \\
9 & 300 & 5 & 3.62 & 0.1 & 0.399 & \(1.33\times 10^{-7}\) \\
10 & 250 & 10 & 3.04 & 0.1 & 0.755 & \(4.17\times 10^{-7}\) \\... &... &... &... &... &... &... \\
55 & 300 & 10 & 3.57 & 0.7 & 4.5 & \(7.43\times 10^{-6}\) \\
56 & 300 & 10 & 3.57 & 0.9 & 4.5 & \(8.05\times 10^{-6}\) \\
57 & 300 & 10 & 3.57 & 0.3 & 4.5 & \(5.63\times 10^{-6}\) \\
58 & 300 & 15 & 3.57 & 0.3 & 6.75 & \(8.44\times 10^{-6}\) \\
59 & 300 & 20 & 3.57 & 0.3 & 9 & \(1.21\times 10^{-5}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Coiled tubing erosion rate parameters. Figure 11: Training, testing, validation, and overall R = 0.9996 obtained for training dataset. Figure 13 shows the comparison between the actual value and the predicted value. The root mean square error (RMSE) between the actual data and the predicted data is \(1.25\times 10^{-6}\), which has good consistency. To further assess the model's accuracy, standard statistical validation tests were conducted on the SSA-BPNN model, including the coefficient of determination (\(r^{2}\)), reduced chi-square (\(X^{2}\)), RMSE, mean bias error (MBE), and mean percentage error (MPE) [42]. Throughout the training, testing, and validation phases, the goodness of fit between experimental measurements and model calculations is reflected in the SSA-BPNN performance, specifically in predicting the erosion rate parameter, as presented in Table 5. The SSA-BPNN accurately predicts coiled tubing erosion rates with a high coefficient of determination and minimal errors, showcasing a strong alignment between predicted and actual values.