# Applying Neural Networks in Aerial Vehicle Guidance to Simplify Navigation Systems
## 2 Vehicle Modeling
### Navigation
#### 3.1.1 Neural Network Based Gravity Vector Estimation
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multicolumn{5}{c}{**Accelerometer Inputs**} & \multicolumn{3}{c}{**Target**} \\ \hline \(a_{x_{B}}\) & \(a_{y_{B}}\) & \(a_{z_{B}}\) & \(\widehat{g_{x_{B}}}\) & \(\widehat{g_{y_{B}}}\) & \(\widehat{g_{z_{B}}}\) \\ \hline \(-17.68\) & \(-0.004\) & \(9.761\) & \(-0.614\) & \(-0.002\) & \(9.791\) \\ \hline \(-6.019\) & \(5.605\) & \(0.1891\) & \(5.838\) & \(-0.093\) & \(7.883\) \\ \hline \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Neural network schemes for the two different methods or strategies. Regarding the training process, three different backpropagation algorithms are employed: Scaled Conjugate Gradient (SCG) [37], Bayesian regularization (BR) [38; 39], and Levenberg-Marquardt backpropagation (LM) [40; 41]. The choice of these algorithms is a result of literature study. The percentage of data employed in this training is 70%. As it is common practice, a representative amount of sensor data and its corresponding gravity vector are left aside for validation purposes. In this case, a 15% of the available data corresponds to validation data. Note that the total amount of methods and training algorithms provide six different combinations which are analyzed next. The performance of each of the six approaches can be quantified by means of the Mean Squared Error (MSE) and the Regression (R) parameter values. The MSE is the average squared difference between outputs and targets. Lower value means lower error. Zero means no error. R values measure the correlation between outputs and targets. An R value of 1 means a close relationship and 0 a random relationship. Other kind of error indicators (such as Mean Average Error, MAE) may also be used to monitor and validate the training to avoid overfitting. For each of the the training processes, a maximum number of 1000 iterations has been established. As it is common practice in the field, classified by epochs. For the LM and SCG algorithms, training automatically stops when generalization stops improving, as indicated by an increase in the MSE of the validation samples. In the case of the BR algorithm, training stops according to adaptive weight minimization (regularization). In both cases the MAE is controlled as usual to avoid overfitting. In addition, the trained NN is tested with the independent data (15% of the collected data), and MSE and R values are also calculated to validate the presented strategies. Table 4 summarizes the obtained results for the training, validation and tests. It shows the values for the MSE and the R parameters. In the first column, the \"Set\" of data is defined, i.e., train (70%), validation (15%), or test (15%) data. The second column displays the employed training algorithm. The third and forth columns present the MSE and R values for the methods 1 and 2 showed in Table 2.  
Analyzing the results in Table 4, it may be concluded that the best results are obtained for the combination of Method 1 and LM algorithm, which yields a MSE value of \(5.63\cdot 10^{-5}\) and a Regression value of 0.998. Additionally, the combinations of Method 2 and LM and BR algorithms also result in acceptable values for MSE and R values, they are of the same order of magnitude. Consequently, we may conclude that Methods 1 and 2 provide good results when the LM and BR training algorithms are used. Nevertheless, the SCG training algorithm is not appropriate for this application, as the best results for this algorithm are 2 orders of magnitude worse as compared to the the rest of the algorithms. Next, the attitude determination algorithm is presented. It is based on the estimated gravity vector by the neural networks (NN). In addition, note that, because there is information regarding