# A Model-Based Intelligent Adjustment Method of Toolface for Bent-Housing Motor
## 4 Results and Discussions
### Tooface Results Predicted by GA-BP Method
After analysis and calculation, the Pearson coefficients of each influence factor with the actual rotation angle of the toolface are shown in Table 3. From Table 3, it can be seen that Factor 4 and Factor 5 (wellhead drill string rotation angle and toolface-calculated rotation value) have a strong correlation with the toolface actual rotation value, and Factor 3 (WOB) has a moderate correlation, Factor 1 has a weak correlation with the toolface actual rotation value, and Factor 2 has a very weak or no correlation with the toolface actual rotation value. After retaining a strong correlation for Factor 4 and Factor 5, the accuracy of the actual rotation angle of the downhole toolface, predicted by the BP neural network and the GA-BP neural network under different combinations of influence factors, is shown in Table 4. All the artificial intelligence models listed in Table 4 use the first 24 sets of data in Table 2 as training set samples, and the last 6 sets of data as test set samples. After a comprehensive comparison of computing times, the mean absolute error of the training set MAE-train and test set MAE-test, mean squared error of the training set MSE-train and test set MSE-test, coefficient of determination of the training set R\({}^{2}\)-train, test set R\({}^{2}\)-test, and all data R\({}^{2}\)-all, the following conclusions can be drawn: (1) Under the same combination of influence factors, the GA-BP method has a significant improvement in prediction accuracy compared to the BP method, while also consuming longer computing time. (2) Whether it is the BP method or the GA-BP method, the computing time decreases with the reduction in considered influence factors, but there is no significant difference in prediction accuracy. It should be noted that the basic data shown in Table 2 are all from a well section where the data variations in depth, deviation angle, and WOB are not significant. In order to prevent a decrease in prediction accuracy due to data mutations, all influence factors are ultimately retained in the prediction model, although this may increase prediction time. After considering all five influence factors, the prediction program code for BP and GA-BP was written in the MATLAB environment. The BP and GA-BP methods have five input layer neurons, one output layer neuron, and five hidden layer neurons. The prediction results of the BP and GA-BP method are shown in Figure 11, and the correlation coefficient R is shown in Figure 12. The accuracy results of the GA-BP method and the BP method are shown in Table 5. By comparing Figures 1 and 11b, it is evident that the accuracy of the GA-BP method is much higher than that of the drill string dynamics model. From \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Number** & **Depth** & **Deviation** & **WOB** & **Wellhead** & **Toolface** & **Toolface** & **Actual** \\  & **(m)** & **Angle (\({}^{\circ}\))** & **(kN)** & **Rotation** & **Rotation** & **Rotation** \\  & & & & **Angle (\({}^{\circ}\))** & **Value (\({}^{\circ}\))** & **Value (\({}^{\circ}\))** \\ \hline
23 & 1751.01 & 18.61 & 0 & 130 & 88 & 70 \\ \hline
24 & 1809.00 & 17.47 & 0 & 150 & 104 & 84 \\ \hline
25 & 1814.01 & 17.46 & 0 & 80 & 46 & 36 \\ \hline
26 & 1814.01 & 17.46 & 0 & 240 & 157 & 125 \\ \hline
27 & 1814.01 & 17.46 & 140 & 120 & 68 & 42 \\ \hline
28 & 1814.01 & 17.46 & 0 & 220 & 147 & 117 \\ \hline
29 & 1814.01 & 17.46 & 0 & 220 & 147 & 120 \\ \hline
30 & 1904.00 & 15.92 & 0 & 300 & 180 & 139 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: _Cont._ \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Influence Factor Number** & **Factor 1** & **Factor 2** & **Factor 3** & **Factor 4** & **Factor 5** \\ \hline Pearson coefficient & 0.2631 & \(-\)0.1039 & \(-\)0.5126 & 0.9614 & 0.9904 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Pearson coefficient of each influence factor with the actual rotation angle of the toolface in the mode of adjusting the downhole toolface by rotating the drill string at the wellhead.