Published
Non-linear Dynamic Behavior Identification of a Quadcopter F450 Using an Artificial Neural Network-Based NARX Model
Identificación del comportamiento dinámico no lineal de un quadcopter F450 utilizando un modelo NARX basado en redes neuronales artificiales
DOI:
https://doi.org/10.15446/ing.investig.109708Keywords:
drone, system identification, underactuation, neural network, roll, pitch (en)dron, identificación de sistema, subactuado, red neuronal, alabeo, cabeceo (es)
A quadcopter drone is an extremely complex, multi-variable, highly nonlinear, and underactuated system characterized by its six degrees of freedom controlled by only four actuators as inputs. This highlights the importance of employing advanced algorithms for its identification. Therefore, this research aimed to use a nonlinear neural network model to identify the dynamic behavior of a quadcopter based on the commercially available F450 frame. Data acquisition involved four experiments in a controlled environment for both roll and pitch angles, recording the signal duty cycles and the quadcopter’s attitude. Then, the selected non-linear autoregressive neural network model with exogenous inputs (N-NARX) model was trained using the acquired data along with the Levenberg-Marquardt algorithm. Afterwards, the response of the quadcopter’s actual attitude angles from the validation dataset was analyzed against the predicted values generated by the neural model, obtaining an 89.44% fit with an RMSE of 2.25% for the roll angle and an 89.29% fit with an RMSE of 2.20% for the pitch angle. Both attitude angles were subjected to a statistical cross-correlation validation to assess their relationship at different time lags, observing a solid settling within the confidence bands at a 95% level. It was concluded the proposed neural network model can effectively capture the quadcopter’s nonlinear dynamics.
El dron quadcopter es un sistema extremadamente complejo, multivariable, altamente no lineal y subactuado, caracterizado por sus seis grados de libertad controlados por solo cuatro actuadores como entradas. Esto resalta la importancia de emplear algoritmos avanzados para su identificación. Por lo tanto, esta investigación tuvo como objetivo utilizar un modelo de red neuronal no lineal para identificar el comportamiento dinámico de un quadcopter basado en el frame comercial F450. La adquisición de datos involucro cuatro experimentos en un entorno controlado para los angulos de alabeo y cabeceo, registrando los ciclos de trabajo de la señal y la actitud del quadcopter. Luego, se entrenó el modelo seleccionado de red neuronal autoregresiva no lineal con entradas exógenas (N-NARX), utilizando los datos adquiridos junto con el algoritmo de Levenberg-Marquardt. Posteriormente, se analizó la respuesta de los ángulos de actitud reales del quadcopter en el conjunto de datos de validación frente a los valores predichos generados por el modelo neuronal, obteniendo un ajuste del 89.44 % con un RMSE del 2.25 % para el ángulo de alabeo y un ajuste del 89.29 % con un RMSE del 2.20 % para el ángulo de cabeceo. Ambos ángulos de actitud fueron sometidos a una validación estadística de correlación cruzada para evaluar su relación en diferentes desfases temporales, observándose una sólida estabilización dentro de las bandas de confianza al nivel del 95 %. Se concluyo que el modelo de red neuronal propuesto puede capturar de manera efectiva las dinámicas no lineales del quadcopter.
Recibido: 24 de junio de 2023; Aceptado: 27 de septiembre de 2024
ABSTRACT
A quadcopter drone is an extremely complex, multi-variable, highly nonlinear, and underactuated system characterized by its six degrees of freedom controlled by only four actuators as inputs. This highlights the importance of employing advanced algorithms for its identification. Therefore, this research aimed to use a nonlinear neural network model to identify the dynamic behavior of a quadcopter based on the commercially available F450 frame. Data acquisition involved four experiments in a controlled environment for both roll and pitch angles, recording the signal duty cycles and the quadcopter's attitude. Then, the selected non-linear autoregressive neural network model with exogenous inputs (N-NARX) model was trained using the acquired data along with the Levenberg-Marquardt algorithm. Afterwards, the response of the quadcopter's actual attitude angles from the validation dataset was analyzed against the predicted values generated by the neural model, obtaining an 89.44% fit with an RMSE of 2.25% for the roll angle and an 89.29% fit with an RMSE of 2.20% for the pitch angle. Both attitude angles were subjected to a statistical cross-correlation validation to assess their relationship at different time lags, observing a solid settling within the confidence bands at a 95% level. It was concluded the proposed neural network model can effectively capture the quadcopter's nonlinear dynamics.
Keywords
drone, system identification, underactuation, neural network, roll, pitch.RESUMEN
El dron quadcopter es un sistema extremadamente complejo, multivariable, altamente no lineal y subactuado, caracterizado por sus seis grados de libertad controlados por solo cuatro actuadores como entradas. Esto resalta la importancia de emplear algoritmos avanzados para su identificación. Por lo tanto, esta investigación tuvo como objetivo utilizar un modelo de red neuronal no lineal para identificar el comportamiento dinámico de un quadcopter basado en el frame comercial F450. La adquisición de datos involucró cuatro experimentos en un entorno controlado para los ángulos de alabeo y cabeceo, registrando los ciclos de trabajo de la señal y la actitud del quadcopter. Luego, se entrenó el modelo seleccionado de red neuronal autoregresiva no lineal con entradas exógenas (N-NARX), utilizando los datos adquiridos junto con el algoritmo de Levenberg-Marquardt. Posteriormente, se analizó la respuesta de los ángulos de actitud reales del quadcopter en el conjunto de datos de validación frente a los valores predichos generados por el modelo neuronal, obteniendo un ajuste del 89.44 % con un RMSE del 2.25 % para el ángulo de alabeo y un ajuste del 89.29 % con un RMSE del 2.20 % para el ángulo de cabeceo. Ambos ángulos de actitud fueron sometidos a una validación estadística de correlación cruzada para evaluar su relación en diferentes desfases temporales, observándose una sólida estabilización dentro de las bandas de confianza al nivel del 95 %. Se concluyó que el modelo de red neuronal propuesto puede capturar de manera efectiva las dinámicas no lineales del quadcopter.
Palabras clave
dron, identificación de sistema, subactuado, red neuronal, alabeo, cabeceo.Introduction
During the last decade, there has been an increase in the implementation of new technologies for unmanned aerial vehicles (UAVs) in multiple fields, e.g., logistics, surveillance and monitoring, public security, among others (Macrina et al., 2020). Many cases can be highlighted, such as the design and construction of the S4 Éhecatl UAV by Hydra Technologies in Mexico, intended for the surveillance and monitoring of hazardous terrain, or the use of a UAV by the Geophysical Institute of Peru in a volcano monitoring project, which flew over the Ubinas volcano in Moquegua over 6000 m above sea level (Saito, 2019).
A quadcopter is a type of UAV that lifts and propels itself with four motors, which control its stability and mobility by varying their rotational speeds (Ahmad et al., 2020).
The most commonly used controller in quadcopters is the classic PID (proportional-integral-derivative) control system, given its ease of implementation and parameter adjustment (Cedro and Wieczorkowski, 2019). Nevertheless, quadcopters pose a significant challenge in terms of control due to their complex nature, as their dynamic model is nonlinear, multivariable, strongly coupled, and underactuated, a result of the six degrees of freedom being controlled by only four actuators (Zhang et al., 2014). Therefore, it would be convenient to implement nonlinear control algorithms to ensure flight stability and robustness against uncertainties such as external airflows or model errors (Santoso et al., 2018).
An appropriate quadcopter controller has to adapt to changes in dynamics and handle uncertainty; it is necessary to identify an accurate dynamic model, as its performance depends on it. To obtain this model, two methods can be used. The first involves modeling the system from a physical analysis using Newton's laws and Euler angles. The second method is called system identification, and it involves analyzing input and output data from experimental flights (Pairan and Shamsudin, 2017).
The identification method based on experimental data can be parametric or non-parametric; in the former, a reduced number of parameters are fitted to a predefined mathematical model, whereas, in the latter, more flexible techniques such as neural networks are used to fit the data without imposing a prior mathematical structure (Atteia et al., 2021). Neural network-based identification methods allow obtaining an appropriate dynamic model for quadcopters since they can adapt to the complexity of the system, adjust to any variation, and obtain more precise results in real-time control (Rosales et al., 2019).
System identification can be achieved through linear approaches such as AutoRegressive eXogenous models (ARX), Autoregressive Moving Average models with eXogenous variables (ARMAX), and Output Error models (OE). Belge et al. (2020) found the OE method to be the linear model with the highest estimation accuracy for a fixed-wing UAV under different noise variations. In a comparative analysis between a linear and a nonlinear Model Predictive Controller (MPC) for trajectory tracking in a Micro Air Vehicle (MAV), the latter showed better performance regarding disturbance rejection capabilities, step response, tracking performance, and computational effort (Kamel et al., 2017).
Recent studies have devised methods to effectively quantify uncertainties in identifying nonlinear systems, with a focus on cascade or block-oriented approaches such as Volterra series and Wiener and Hammerstein models (Xavier et al., 2021). Similarly, there are black-box models, which have been primarily used in the analysis of electrical and control systems. These models do not incorporate prior knowledge, but instead rely on a structure flexible enough to capture all relevant physics in the measured data. Typical approaches include the Nonlinear AutoRegressive eXogenous model (NARX), the Nonlinear AutoRegressive Moving Average model with eXogenous inputs (NARMAX), artificial neural networks, fuzzy networks, statistical learning theory, and kernel methods (Noel and Kerschen, 2017).
In Altan et al. (2018), the trajectory tracking of a hexacopter was studied with a NARX neural network controller aimed at the transportation of physical cargo packages. Moreover, this approach was compared against a PID controller using performance indicators such as the Mean Squared Error (MSE) and the Root Mean Squared Error (RMSE), with the NARX controller yielding much more robust and stable results.
In addition, the implementation of a tensor network B-splines algorithm with the NARX model for nonlinear system identification demonstrated high efficiency and accuracy through numerical experiments in Single Input and Single Output nonlinear systems (SISO), surpassing the RMSE of other nonlinear methods during both prediction and simulation processes (Karagoz and Batselier, 2020).
In a detailed performance comparison between a PID and an advanced controller utilizing NARX neural networks, various indicators such as the MSE and RMSE were utilized (Karakaya and Goren, 2022). The findings revealed a similar performance for both controllers in yaw tests. However, the advanced controller yielded superior results in altitude, roll, and pitch tests, exhibiting an enhanced performance.
In this vein, Ozbek et al. (2015) identified the issue of modeling uncertainties in UAVs during a survey of quadrotor aerial robot control, and, in their quadcopter modeling review, Pairan et al. (2020) concluded that neural network-based identification is a more suitable option due to its high accuracy, cost, and resource availability. They proposed future research using Radial Basis Functions (RBF) for activation.
The most recent proposals in this field include the works by Ullah et al. (2020, 2021, 2022), who presented two sliding mode control designs for UAVs. These proposals were evaluated using mathematical models and simulations, with promising results. However, the progress of these works could be accelerated through more accurate models with the help of system identification.
Consequently, the design of a NARX neural network identification algorithm could be considered in order to obtain a robust model of the nonlinear systems featured by quadcopters. This would ensure proper functioning while avoiding total equipment losses associated with flight control failures.
Nonetheless, the way to ensure system identification is to consider data representing the system's non-linear behavior. Thus, input/output quadcopter data that genuinely exhibit a nonlinear behavior must be verified for use in the training and validation of quadcopter system identification models.
In light of the above, the objective of this research was to identify the non-parametric model that captures the dynamic behavior of a F450 quadcopter, with the purpose of representing the inherent nonlinearities of the system using NARX neural networks. The model was trained with experimental data acquired from the quadcopter's sensors, and a nonlinear data validation was conducted to ensure suitable data for system identification.
System identification methods
ARX
The ARX model, a linear input/output model, is commonly used due to its computationally efficient parameter estimation (Galrinho et al., 2017). This is accomplished directly through the use of a least squares algorithm, which handles linear relationships between parameters and prediction errors (Tu et al., 2020). However, if the actual noise in the process differs from the assumed conditions, the parameters may deviate from their optimal values, and consistency issues may occur (Nelles, 2020).
As described by Equation (1), the ARX model establishes a relationship between the future value of the dependent output signal y(k), the preceding values of the output signal, and an independent or exogenous input signal u(k). In this context, na and nb represent the model orders, whereas e(k) corresponds to the error of the system, indicating the discrepancy between the predicted and actual output values (Billings, 2013).
(1) \[y(k) = [b_1 u(k-1) + \dots + b_{nb} u(k-nb)] - [a_1 y(k-1) + \dots + a_{na} y(k-na)] + e(k)\]NARX
The NARX model represents a nonlinear generalization of the ARX model that substitutes the linear relationship described in Equation (1) with an unknown nonlinear function F(·), as outlined in Equation (2), where nu and ny represent the input and output memory orders, respectively (Nelles, 2020).
(2) \[y(k) = F[y(k-1), y(k-2), \dots, y(k-n_y), u(k-d), u(k-d-1), \dots, u(k-d-n_u)] + e(k)\]N-NARX
The neural network NARX representation is referred to as N-NARX. It is a dynamic neural network with a closed-loop architecture that consists of an input layer, a hidden layer, and an output layer. In addition, it incorporates lagged inputs and outputs through explicit integration or a recurrent procedure, as depicted in Figure 1.
Figure 1.: A recurrent single-hidden-layer NARX network
Materials and methods
This work was conducted while following the methodology depicted in Figure 2, which involved a systematic review of the available scientific literature to obtain relevant and up-to-date information.
After conducting the literature review, the focus shifted towards implementing the workspace, specifically a test bench, and building a prototype F450 quadcopter. With this test bench, experimental data on the roll and pitch angle of the quadcopter were acquired. The input and output data obtained from the quadcopter were pre-processed to reduce noise. Afterwards, a neural network model was selected, its parameters were defined, and it was trained using the conditioned data. Finally, the trained model was validated using performance indicators such as the MSE and the RMSE, as well as through cross-correlation with data that were not used during training.
Figure 2.: Methodology flowchart
Implementation
A quadcopter was developed using a commercial F450 frame. The prototype was equipped with four brushless motors, four Electronic Speed Controllers (ESCs), four propellers, and a Lithium Polymer (LiPo) battery. These components were connected to an Arduino UNO hardware development board, along with an MPU9250 IMU sensor, in order to enable precise control of the system's orientation (Figure 3).
The data acquisition process involved the use of specialized equipment, i.e., a test bench specifically designed to collect data on the quadcopter's dynamic behavior. Figure 4 shows the CAD assembly of the test bench with a single degree of freedom (or one axis), which was used to analyze two of the three attitude angles of the F450 quadcopter: roll and pitch.
Figure 3.: Electronic diagram of the drone
Figure 4.: CAD assembly of a one-degree-of-freedom test bench
Data acquisition
The data acquisition architecture relied on the test bench, which combined the use of an Arduino board and a computer running the MatLab software. Furthermore, to ensure ease of resetting in case of failure, the Arduino board was located outside the quadcopter.
Figure 5 presents the equipment used for data acquisition alongside a block diagram illustrating the control system of the quadcopter's initial programming, which includes a PID control algorithm with deliberately unsynchronized gains, causing the quadcopter to exhibit an oscillatory motion. The goal of this was to gather crucial insights into the quadcopter's dynamic performance. This motion was critical in capturing the necessary data for subsequent identification processes. Additionally, an algorithm called Motor Mixer was implemented to distribute the output of the PID controller into four Pulse-Width Modulation (PWM) signals that served as inputs for the quadcopter's four Electric Propulsion Units (EPUs).
Subsequently, four experiments were conducted for each angle, with each lasting 40 seconds and featuring a sampling time of 10 ms, in order to gather a comprehensive range of data on the quadcopter's dynamic behavior.
The input and output data obtained from Experiment 1 with the roll angle are presented in Figures 6 and 7, respectively.
Figure 5.: Equipment for data acquisition and block diagram of the control system
Figure 6.: Input data for Experiment 1 – Roll angle
Figure 7.: Output data from Experiment 1 – Roll angle
Data pre-processing
Dataset selection:
The selection of the dataset considered the type of model to be used for the identification process, i.e., a neural network. To train the model, it was important for the data to contain the maximum possible information on the system's dynamics. To ensure this, the dominant frequency from the dynamic system's output data was taken into account alongside its maximum amplitude range.
From the datasets collected during the four experiments conducted for each angle, only two were selected: one for the identification process and the other for cross-validation. Dataset selection for the training process was based on the experiment whose output data had a higher dominant frequency and maximum amplitude range. For the cross-validation process, however, the experiment with lower dominant frequency and a higher maximum amplitude range in its output data would be selected.
The output data for the roll angle data from Experiment 1 are presented in Figure 8, showing a maximum amplitude range of -51.42 to 48.77°.
Figure 8.: Amplitude of output data from Experiment 1 – Roll angle
The output pitch angle data from Experiment 1 are shown in Figure 9, indicating a maximum amplitude range of -50.22 to 44.19°.
Figure 9.: Amplitude of output data from Experiment 1 – Pitch angle
The Fourier transform was applied to calculate the frequency spectrum of the signal and analyze its dominant frequency. The entire frequency domain of the data was limited to the interval from 0 Hz up to twice the dominant frequency.
The frequency spectrum of the roll angle for Experiment 1 is depicted in Figure 10, indicating a dominant frequency of 0.61523 Hz. The frequency spectrum of the pitch angle from Experiment 1 is presented in Figure 11, revealing a dominant frequency of 0.6665 Hz.
Figure 10.: Frequency spectrum of the output data from Experiment 1 – Roll angle
Figure 11.: Frequency spectrum of the output data from Experiment 1 – Pitch angle
Therefore, based on the criterion of higher dominant frequency, the output data from the first experiments involving the roll and pitch angles were selected as the training dataset for the corresponding neural network model. Similarly, following the criterion of lower dominant frequency and lower amplitude, the data from Experiment 3 were selected for the cross-validation of both angles.
Nonlinear data validation:
In order to validate the nonlinear relationship between input and output data (ensuring that the nonlinear behavior of the system would be obtained), two evaluation criteria were considered:
The quotient between the RMS value of each wave of the output's oscillatory signal with respect to the RMS value of each wave of the oscillatory signal of the pitch or roll torque.
A higher-order correlation function of the system's output signal, as long as the input signal satisfied the nonlinear conditions established by (Billings, 2013). This is described in Equation 3.
where φy'y2 is the cross-correlation between the average level output and its power squared, and τ denotes the torque.
Data conditioning:
Data conditioning was performed for both the input and output of the system. In the case of the input, an internal numerical rounding took place in the Arduino micro-controller during the execution of the Motor Mixer algorithm. On the other hand, the output data exhibited measurement variations as a consequence of the quadcopter's vibrations and the presence of white noise in the signal. These inherent factors contributed to the fluctuations and noise observed in the recorded data.
Figure 12 shows a preliminary demonstration, prior to interpolation, of the one-second sampled stepped input data from the first roll angle experiments.
Figure 12.: Stepped input data from Experiment 1 – Roll angle
Afterwards, the acquired stepped input data underwent a smoothing procedure using linear interpolation. This process aimed to obtain a refined dataset that would be more suitable for the subsequent identification.
The interpolated input data from the first set of experiments, with a sample interval of one second, is illustrated in Figure 13 for the roll angle and in Figure 14 for the pitch angle.
It is important to note that this interpolation technique was consistently applied to all the input data gathered throughout the experiments.
Figure 13.: Interpolated input data from Experiment 1 – Roll angle
Figure 14.: Interpolated input data from Experiment 1 – Pitch Angle.
The output signals correspond to the roll and pitch tilt angles, which are considered to be the attitude angles of an aircraft with respect to the horizontal plane. Their processing is based on the implementation of the Kalman filter, a robust estimation algorithm that effectively removes inconsistencies and variations in the measurements, thereby ensuring more precise, reliable, and consistent results.
Figure 15 shows a demonstration, prior to filtering, of a one-second sample interval of the output data for the first experiment with the roll angle.
Figure 15.: Unfiltered output data from Experiment 1 – Roll Angle
The one-second sample interval of the output data from the first experiments with the roll and pitch angles, as filtered using the Kalman filter, is shown in Figures 16 and 17.
Figure 16.: Filtered output data from Experiment 1 – Roll angle
Figure 17.: Filtered output data from Experiment 1 – Pitch angle
Training the neural network model
Based on Al-Mahasneh et al. (2017), a neural model was chosen for the quadcopter identification process. Comparisons between different neural network approaches were made to determine their usefulness and versatility in this task.
The N-NARX model was selected based on El Dakrory and Tawfik (2016). This model consistently demonstrated its promising performance over other methods, surpassing the capabilities of its linear counterpart, the ARX model.
The system architecture (i.e., the number of layers and neurons) followed the mathematical model obtained by Oktay and Kose (2019), with RBF activation functions stemming from prior work by Pairan and Shamsudin (2017). This was used as a starting point for the training and weight adjustment process. The backpropagation training method and the Levenberg-Marquardt algorithm were also employed to minimize the MSE.
Table 1 presents an overview of the features considered while designing the architecture for the selected neural network. This includes the network type, the number of layers, and the neuron activation function used.
Table 1.: Architecture of the selected neural network
In the N-NARX model, one lag was considered for the input and three for the output. This decision was based on the literature review, as illustrated in Figure 18 (Pairan and Shamsudin, 2017). As previously mentioned, an RBF was considered.
Figure 18.: N-NARX model architecture
After identifying the parameters of the neural network model, the processed roll and pitch angle datasets were trained. Firstly, the roll angle information from Experiment 1 was used, consisting of 3901 input and output data. The N-NARX model's training stopped at 19.48 seconds, achieving a minimized MSE of 4.59.
Meanwhile, for the pitch angle dataset from Experiment 1, also consisting of 3901 input and output data, the training stopped at 2.16 seconds, with a minimized MSE of 1.44.
Results and discussion
Results
Based on the previously mentioned indicators, this study compared the temporal response of the non-parametric quadcopter system's actual attitude angles (from Experiment 1) and those predicted by the N-NARX model.
Two validation steps were implemented:
Graphical and quantitative validation, showing how closely the neural model's results approximated the real system data, with quantitative metrics such as the MSE, the RMSE, and the fit percentage.
Cross-validation, using experimental data not employed in training the N-NARX model. This procedure is detailed below.
For the roll angle (Figure 19), the following values were obtained: an MSE of 4.59, an RMSE of 2.14, an RMSE percentage of 2.14%, and a fit percentage of 90.87%.
Figure 19.: Approximation of the N-NARX model using data from Experiment 1 – Roll angle
As for the pitch angle, the comparison is shown in Figure 20, with the following results: a MSE of 1.44, a RMSE of 1.20, a RMSE percentage of 1.28%, and a fit percentage of 93.80%.
Figure 20.: Approximation of the N-NARX model using data from Experiment 1 – Pitch angle
Afterwards, the selected neural model underwent validation on a separate dataset, specifically that of Experiment 3 (i.e., cross-validation).
For the roll angle (Figure 21), the following values were obtained: a MSE of 5, a RMSE of 2.23, a RMSE percentage of 2.25%, and a fit percentage of 89.44%.
Figure 21.: Approximation of the N-NARX model using data from Experiment 3 – Roll angle
For the pitch angle, as depicted in Figure 22, the performance evaluation yielded the following results: a MSE of 2.70, a RMSE of 1.64, a RMSE percentage of 2.20%, and a fit percentage of 89.29%.
Figure 22.: Approximation of the N-NARX model using data from Experiment 3 – Pitch angle
Table 2 presents a quantitative comparison between the performance indicators obtained from Experiment 1, which were used in the training dataset, and those from Experiment 3, i.e., the dataset for cross-validation. This comparison enables an assessment of the model's performance across different datasets.
Table 2.: Performance indicators of experiments 1 and 3 from roll and pitch angles
It is worth mentioning that the results obtained from Experiment 1 evinced a higher level of accuracy and a lower error in predicting both angle values when compared to the actual data, as the model was trained on the former. However, it is important to note that the N-NARX model showed a remarkable prediction performance even when evaluated on the unseen data from Experiment 3.
A statistical analysis was conducted to assess the behavior of the trained model's predictions and the actual values obtained from Experiment 3 for the roll angle (Figure 23) and the pitch angle (Figure 24).
The results confirm that the simple correlation consistently falls within the established confidence bands, at a 95% level for different time lags. This indicates a strong and consistent association between the predicted and actual values, supporting the model's ability to capture the patterns and behaviors of the analyzed nonlinear system.
Figure 23.: Correlation for Experiment 3 – Roll angle
Figure 24.: Correlation for Experiment 3 – Pitch Angle
Discussion
The proposed artificial neural network method showed a high capability to predict attitude angles in a complex nonlinear system model such as a quadcopter. This observation aligns with the results of Muresan et al. (2013) and Zhang et al. (2014), who reported the model's high performance and accuracy in predicting both roll and pitch angles with a trained nonlinear model, outperforming the capacities of linear counterparts.
In light of the above, a comparison was conducted (Table 3) to assess the RMSE percentages of our method and the 4-neuron Minimal Resource Allocating Network (MRAN) linear model proposed by Pairan and Shamsudin (2017), whose work provided the essential basis for parameter selection during the training of the designed neural network. Note that the trained N-NARX model exhibits a lower RMSE percentage than the MRAN model in both roll and pitch angles.
Table 3.: Comparison of the neural models' RMSE percentage
Similarly, Table 4 presents a comparison of the fit percentage between our method and the 4-input, 1-output Multiple Input and Multiple Output (MIMO) ARX linear model presented by Salameh et al. (2015). Note that the trained N-NARX model significantly outperforms the MIMO ARX model regarding the fit percentage for both roll and pitch angles.
Table 4.: Comparison of the neural models' fit percentage
The results shown in Tables 3 and 4, which compare the designed model with those proposed by other authors, clearly demonstrate the system's nonlinear behavior. Moreover, these findings highlight our model's robustness and its exceptional accuracy in delivering precise predictions, further validating its effectiveness and reliability in real-world applications.
Conclusions
Quadcopter drones are extremely complex and highly nonlinear systems, underscoring the importance of employing advanced algorithms for their identification. Thereupon, in this study, the roll and pitch angles of an F450 prototype were captured using a neural network model. To facilitate experimentation, a test bench was employed, enabling data collection from four tests conducted for each angle. Simultaneously, a real-time signal monitoring system was set up by connecting the Arduino to a computer, enabling the tracking of inputs consisting of four PWM signals sent to the quadcopter's EPUs, while the MPU9250 IMU sensor determined the device's orientation and produced the corresponding output signals.
These experiments revealed inherent variations, and data quality was assessed through amplitude and frequency spectrum analyses, leading to the selection of Experiments 1 and 3 as databases for each angle. For enhanced modeling, the input data were pre-processed using linear interpolation, while the output data underwent Kalman filtering, resulting in smoother signals and improved dynamic capture. Next, the NARX neural network, with a hidden layer comprising five neurons and utilizing RBF activation, was employed. The model was then trained using the dataset derived from Experiment 1, using the Levenberg-Marquardt algorithm. This yielded optimal outcomes.
The neural network model effectively captured the quadcopter's nonlinear dynamics during both the training and validation processes, resulting in an 89.44% fit with an RMSE of 2.25% for the roll angle, and an 89.29% fit with an RMSE of 2.20% for the pitch angle. Furthermore, the designed neural network model outperformed the proposals of other authors, clearly showcasing its ability to accurately represent the nonlinear behavior of the system.
Future work and scenarios
Considering the work by Ucgun et al. (2022), future research could also build on both the NARX model and the Vertical Take-Off and Landing (VTOL) UAV testbed by evaluating free-flight drones. This would allow validating neural network-based control algorithms and their integration with the robust sliding mode controller developed for the testbed. The goal would be to enhance drone stability and performance, comparing the combined approach against traditional control methods and demonstrating improved robustness and tracking in real-world scenarios. This synergy between the NARX model and the testbed could lead to more reliable UAV control systems.
Building on previous research using a NARX neural network model to identify nonlinear quadcopter dynamics, future work could be extended to free-flying drones, capturing a fully dynamic behavior that includes yaw motion. By moving from controlled environments to free flight, a neural network-based system could identify and stabilize the drone in real time, adapting to conditions like wind disturbances or payload changes. Combining the NARX model with traditional methods like PID or model predictive control could help to create a hybrid system, enhancing performance in complex scenarios. Real-time experiments would validate the approach for more robust flight control in unpredictable environments.
In addition, according to Mechali et al. (2021), the NARX neural model for UAVs can be extended by integrating it with control strategies such as Continuous Non-singular Terminal Sliding Mode Control (CNTSMC) and Disturbance Observer-Based Control (DOBC). In future research, the use of NARX models to accurately predict and identify the nonlinear dynamics of a free-flying UAV could be explored. Then, the CNTSMC scheme could be applied for robust attitude and position control. By combining the predictive capabilities of the NARX model with CNTSMC's robustness, disturbance rejection (DOBC) and Fixed-time eXtended State Observer (FXESO), a highly accurate and resilient control system for UAVs could be developed which performs well even under uncertainties, nonlinearities, and external disturbances. This approach would allow enhancing trajectory tracking and system stability in real-time scenarios, validating the combined method through both simulations and real-world tests.
References
References
Ahmad, F., Kumar, P., Bhandari, A., and Patil, P. (2020). Simulation of the quadcopter dynamics with LQR based control. Materials Today: Proceedings, 24, 326−332. https://doi.org/10.1016/j.matpr.2020.04.282
Al-Mahasneh, A. J., Anavatu, S. G., and Garratt, M. (2017). Nonlinear multi-input multi-output system identification using neuro-evolutionary methods for a quadcopter [Conference paper]. 2017 Ninth International Conference on Advanced Computational Intelligence. https://doi.org/10.1109/icaci.2017.7974512
Altan, A., Aslan, O., and Hacioglu, R. (2018). Real-time control based on NARX neural network of hexarotor UAV with load transporting system for path tracking [Conference paper]. International Conference on Control, Engineering & Information Technology. https://doi.org/10.1109/ceit.2018.8751829
Atteia, G., Mengash, H. A., and Samee, N. A. (2021). Evaluation of using Parametric and Non-parametric Machine Learning Algorithms for Covid-19 Forecasting. International Journal of Advanced Computer Science and Applications, 12(10), 0121071. https://doi.org/10.14569/ijacsa.2021.0121071
Belge, E., Kaba, H., Parlak, A., Altan, A., and Hacıoglu, R. (2020). Estimation of small unmanned aerial vehicle lateral Dynamic model with system identification approaches. Balkan Journal of Electrical & Computer Engineering, 8(2), 121−126. https://doi.org/10.17694/bajece.654499
Billings, S. (2013). Nonlinear system identification: NARMAX methods in the time, frequency, and spatio-temporal domains. John Wiley & Sons. Cedro, L., and Wieczorkowski, K. (2019). Optimizing PID controller gains to model the performance of a quadcopter. Transportation Research Procedia, 40, 156−169. https://doi.org/10.1016/j.trpro.2019.07.026
El Dakrory, A. M., and Tawfik, M. (2016). Identifying the attitude of dynamic systems using neural network [Conference paper]. 2016 International Workshop on Recent Advances in Robotics and Sensor Technology for Humanitarian Demining and Counter-IEDs (RST). https://doi.org/10.1109/RST.2016.7869856
Galrinho, M., Everitt, N., and Hjalmarsson, H. (2017). ARX modeling of unstable linear systems. Automatica, 75, 167−171. https://doi.org/10.1016/j.automatica.2016.09.041
Kamel, M., Burri, M., and Siegwart, R. (2017). Linear vs nonlinear MPC for trajectory tracking applied to rotary wing micro aerial vehicles. IFAC-PapersOnLine, 50(1), 3463−3469. https://doi.org/10.1016/j.ifacol.2017.08.849
Karagoz, R., and Batselier, K. (2020). Nonlinear system identification with regularized Tensor Network B-splines. Automatica, 122, 109300. https://doi.org/10.1016/j.automatica.2020.109300
Karakaya, S., and Goren, A. (2022). Performance comparison of PID and NARX neural network for attitude control of a
quadcopter UAV. Journal of Materials and Mechatronics: A, 3(1), 1−19. https://doi.org/10.55546/jmm.1010919
Macrina, G., Pugliese, L., Guerriero, F., and Laporte, G. (2020). Drone-aided routing: A literature review. Transportation Research Part C-emerging Technologies, 120, 102762. https://doi.org/10.1016/j.trc.2020.102762
Mechali, O., Xu, L., Huang, Y., Shi, M., and Xie, X. (2021). Observer-based fixed-time continuous nonsingular terminal sliding mode control of quadrotor aircraft under uncertainties and disturbances for robust trajectory tracking: Theory and experiment. Control Engineering Practice, 111, 104806. https://doi.org/10.1016/j.conengprac.2021.104806
Muresan, B., Folea, S., Nascu, I., Ionescu, C. M., and De Keyser, R. (2013). Identification and modeling of the three rotational movements of a miniature coaxial helicopter. Simulation, 89(12), 1490-1504. https://doi.org/10.1177/0037549713504788
Nelles, O. (2020). Nonlinear system identification: From classical approaches to neural networks, fuzzy models, and Gaussian processes (2nd ed.). Springer Nature. DOI: https://doi.org/10.1007/978-3-030-47439-3
Noel, J., and Kerschen, G. (2017). Nonlinear system identification in structural dynamics: 10 more years of progress. Mechanical Systems and Signal Processing, 83, 2−35. https://doi.org/10.1016/j.ymssp.2016.07.020
Ozbek, N. S., Onkol, M., and Efe, M. O. (2015). Feedback control strategies for quadrotor-type aerial robots: A survey. Transactions of the Institute of Measurement and Control, 38(5), 529−554. https://doi.org/10.1177/0142331215608427
Oktay, T., and Kose, O. (2019). Farkli u,cu,s durumlari i ,cin quadcopter dinamik modeli ve simulasyonu. Eur. J. Sci. Technol, (15), 132-142. doi: https://doi.org/10.31590/ejosat.507222
Pairan, M., and Shamsudin, S. (2017). System identification of an unmanned quadcopter system using MRAN neural [Preprint]. IOP Conference Series. https://doi.org/10.1088/1757-899x/270/1/012019
Pairan, M. F., Shamsudin, S. S., and Zulkafli, M. F. (2020). Neural network-based system identification for quadcopter dynamic modeling: A review Journal of Advanced Mechanical Engineering Applications, 2(1), 20−33. https://doi.org/10.30880/ijie.2020.02.01.003
Rosales, C., Soria, C., and Rossomando, F. G. (2019). Identification and adaptive PID Control of a hexacopter UAV
based on neural networks. International Journal of Adaptive Control and Signal Processing, 33(1), 74−91. https://doi.org/10.1002/acs.2955
Saito, C. (2019). Modelamiento dinámico de los parámetros de control de vuelo de una aeronave del tipo ala volante utilizando redes neuronales artificiales [Master’s thesis, Pontificia Universidad Cato´ lica del Perú]. https://tesis.pucp.edu.pe/repositorio/handle/20.500.12404/13308
Salameh, I., Ammar, E. M., and Tutunji, T. A. (2015). Identification of quadcopter hovering using experimental data [Conference paper]. 2015 IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies. https://doi.org/10.1109/aeect.2015.7360559
Santoso, F., Garratt, M., Anavatti S., and Petersen, I. (2018). Robust hybrid nonlinear control systems for the dynamics of a quadcopter drone. IEEE Transactions on Systems, Man, and Cybernetics, 50(8), 3059−3071. https://doi.org/10.1109/tsmc.2018.2836922
Tu, Q., Rong, Y., and Chen, J. (2020). Parameter identification of ARX models based on modified momentum gradient descent algorithm. Complexity, 2020, 1−11. https://doi.org/10.1155/2020/9537075
Ucgun, H., Okten, I., Yuzgec, U., and Kesler, M. (2022). Test platform and graphical user interface design for vertical takeoff and landing drones. Romanian Journal of Information Science and Technology, 25(3), 350−367. https://www.romjist.ro/abstract-727.html
Ullah, S., Mehmood, A., Khan, Q., Rehman, S., and Iqbal, J. (2020). Robust integral sliding mode control design for stability enhancement of under-actuated quadcopter. International Journal of Control, Automation and Systems, 18(7), 1671–1678. https://doi.org/10.1007/s12555-019-0302-3
Ullah, S., Mehmood, A., Ali, K., Javaid, U., Hafeez, G., and Ahmad, E. (2021). Dynamic modeling and stabilization of surveillance quadcopter in space based on integral super twisting sliding mode control strategy [Conference paper]. 2021 International Conference on Artificial Intelligence (ICAI). https://doi.org/10.1109/icai52203.2021.9445268
Ullah, S., Khan, Q., and Mehmood, A. (2022). Neuro-adaptive fixed-time non-singular fast terminal sliding mode control design for a class of under-actuated nonlinear systems. International Journal of Control, 96(6), 1529−1542. https://doi.org/10.1080/00207179.2022.2056514
Wei, M., Ye, M., Li, J. B., Wang, Q., and Xu, X. (2020). State of charge estimation of lithium−ion batteries using LSTM and NARX neural networks. IEEE Access, 8, 189236−189245. https://doi.org/10.1109/ACCESS.2020.3031340
Xavier, J., Patnaik, S., and Panda, R.C. (2021). Process modeling, identification methods, and control schemes for nonlinear physical systems A comprehensive review. ChemBioEng Reviews, 8(4), 392−412. https://doi.org/10.1002/cben.202000017
Zhang, X., Li, X., Wang, K., and Lu, Y. (2014). A survey of modelling and identification of quadrotor robot. Abstract and Applied Analysis, 2014, 320526. https://doi.org/10.1155/2014/320526
How to Cite
APA
ACM
ACS
ABNT
Chicago
Harvard
IEEE
MLA
Turabian
Vancouver
Download Citation
License
Copyright (c) 2024 Howard E. Sifuentes, Carlos A. Rocha, Edgar A. Manzano

This work is licensed under a Creative Commons Attribution 4.0 International License.
The authors or holders of the copyright for each article hereby confer exclusive, limited and free authorization on the Universidad Nacional de Colombia's journal Ingeniería e Investigación concerning the aforementioned article which, once it has been evaluated and approved, will be submitted for publication, in line with the following items:
1. The version which has been corrected according to the evaluators' suggestions will be remitted and it will be made clear whether the aforementioned article is an unedited document regarding which the rights to be authorized are held and total responsibility will be assumed by the authors for the content of the work being submitted to Ingeniería e Investigación, the Universidad Nacional de Colombia and third-parties;
2. The authorization conferred on the journal will come into force from the date on which it is included in the respective volume and issue of Ingeniería e Investigación in the Open Journal Systems and on the journal's main page (https://revistas.unal.edu.co/index.php/ingeinv), as well as in different databases and indices in which the publication is indexed;
3. The authors authorize the Universidad Nacional de Colombia's journal Ingeniería e Investigación to publish the document in whatever required format (printed, digital, electronic or whatsoever known or yet to be discovered form) and authorize Ingeniería e Investigación to include the work in any indices and/or search engines deemed necessary for promoting its diffusion;
4. The authors accept that such authorization is given free of charge and they, therefore, waive any right to receive remuneration from the publication, distribution, public communication and any use whatsoever referred to in the terms of this authorization.










