## 3 Data Fusion Method Based on Self-Adaptive
### BackPropagation Algorithm Based on Neighborhood Search Structure Design
To ensure the representativeness and randomness of the datasets, we employed a random partitioning method. Under the condition of setting other error terms, the neural network is trained by simulating different numbers of neurons one by one, and the simulation results of the maximum error curve and training time corresponding to different numbers of neurons are obtained, which is shown in Figure 3.  
As can be seen from Figure 3, the training time will increase with the increasing number of hidden neurons, and the attitude angle error will decrease with the increase in the number of hidden neurons. When the number of hidden neurons is 11, the error is smaller and the training time is shorter. As the number of neurons increases, when the number of hidden neurons reaches 11, there is a significant reduction in error, while the training time of the network also begins to increase sharply. When the number of neurons exceeds 11, although the training time continues to increase, the improvement in model accuracy is relatively small. Although increasing the number of hidden layer neurons can enhance model precision, in order to ensure the generalization capability of the model and reduce the risk of overfitting, the number of hidden layer nodes of the backpropagation algorithm is set to 11 in this paper. Optimization of the number of neurons is conducted based on the training time and attitude angle standard deviation, resulting in the chosen backpropagation algorithm structure for this study. In addition, the sigmoid function is chosen as the activation function for the hidden layer, and a linear function is used as the activation function for the output layer. By defining the basic parameters of the backpropagation algorithm structure, training sample data can be input into the neural network for the training and learning process. The trained model structure is illustrated in Figure 4.  
In this model, the input to the hidden layer can be written as  
\[Q_{input}=w_{1}*x+b_{1} \tag{6}\]  
the output of the hidden layer, where \(x\) represents the combined attitude angles from visual and IMU measurements, can be expressed as  
\[Q_{output}=sigmoid(Q_{input}) \tag{7}\]  
the input to the output layer can be represented as  
\[U_{input}=w_{2}*Q_{output}+b_{2} \tag{8}\]  
Figure 4: Backpropagation algorithm training structure model. Figure 3: Training effect of different numbers of neurons. and the output of the output layer can be written as  
\[U_{output}=U_{input} \tag{9}\]  
where \(w_{1}\) and \(b_{1}\) are the weight matrix and bias vector between the input layer and the hidden layer, and \(w_{2}\) and \(b_{2}\) are the weight matrix and bias vector between the hidden layer and the output layer. Through the backpropagation algorithm, these weight matrices and bias vectors are iteratively optimized to better fit the training data in order to improve the predictive performance of the model. To optimize the network parameters, we used Gradient Descent (GD) as the optimizer. The maximum number of iterations was set to 600, and the learning rate was set to 0.01. And the training process of the network model based on back propagation is shown in Figure 5.  
Figures 6-8 show the training process of a backpropagation-based network with 11 hidden layer neurons. The regression function fit for all processes during training a backpropagation-based network (training, validation, and test) was R = 0.97855 (Figure 6). Figure 3.0 Backpropagation-based network model training process flowchart. The regression function for training was R = 0.97853; for validation, it was R = 0.97983; while for the test process, it was R = 0.97724. The MSE in this model was 0.039407 and was reached in the 600 th epoch (Figure 7). Figure 8 is an error histogram for the training process showing the difference between the targets and the output values from the network. The chart shows errors in the neural  
Figure 3.1 Regression function for the learning process. Figure 3.2 The smallest MSE for the learning process.