# Applying Neural Networks in Aerial Vehicle Guidance to Simplify Navigation Systems
## 2 Vehicle Modeling
### Navigation
#### 3.1.1 Neural Network Based Gravity Vector Estimation  
Among the numerous applications that machine learning offers to exemplary and current GNC issues (see [23; 31; 32; 33; 34]), its potential to precisely estimate the gravity vector from sensor information is one of the main unexplored settings. The utilization of neural networks (NN) to understand the evolution of nonlinear equations has been demonstrated before [35], regardless of uncertainty. Scientifically, this infers NN will learn flight mechanics equations [36] and produce an equal outcome. The gravity vector estimation method presented here depends on the aerial platform on which it will be employed. This means that the method must be adjusted for the aircraft of interest. Without loss of generality, the estimation method detailed in this section is particularized for a four canard controlled aerial vehicle. However, using the appropriate neural network training, it may be applied to other aircraft. The estimated gravity vector may be expressed as shown in (10), where its components in body axes are displayed. The point is to recouple a high precision gravity vector by consolidating the estimations from the accelerometers and the potential offered by machine learning. \[\overrightarrow{\widehat{g}_{B}}=[\widehat{g_{x_{B}}},\widehat{g_{y_{B}}}, \widehat{g_{z_{B}}}]^{T} \tag{10}\]  
In order to prove the suitability of the proposed approach two different methods or strategies are proposed, as they can be visualized in Table 2:  
* Method 1: it is based on a neural network which features two-layers with one hundred standard sigmoid hidden neurons and the usual linear output neuron [35]. The input vector is composed of three components constructed from \(a_{x_{B}}\), \(a_{y_{B}}\) and \(a_{z_{B}}\). The outputs of the neural networks are the components of the gravity vector expressed in body axes (\(\overrightarrow{\widehat{g}_{B}}\)). * Method 2: this method is the same as method 1, but the number of neurons in the hidden layer is 50. The choice of the number and shape of neurons as well as the amount of training and validation data selected for the presented two strategies is a result of the literature review (specially from [35]) and a performed hyperparametric study. This study provided two points of interest: around 100 neurons and 50 neurons. Increasing the number or neurons or layers translated only into an increase of computation time for a limited improvement in terms of error of approximation. A further and detailed hyperparametric study will be performed in future work to precisely determine the optimal working point but is not the objective of this research to formalize this statement. The preliminary results of this hyperparametric study suggest that there is a limit number of neurons in the intermediate layer (estimated at about 100 neurons), and over this limit, results do not get improved. Then, neural networks are trained replicating the flight dynamics problem. Two examples of the available \(3\cdot 10^{8}\) rows of data, which are obtained from 12,000 simulations, are showed in Table 3. \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 3: Neural network input and target values.