Next Article in Journal
Adaptive Tracking of High-Maneuvering Targets Based on Multi-Feature Fusion Trajectory Clustering: LPI’s Purpose
Next Article in Special Issue
Development of a Multi-Layer Marking Toolkit for Layout-Printing Automation at Construction Sites
Previous Article in Journal
Continuous Authentication against Collusion Attacks
Previous Article in Special Issue
CFHBA-PID Algorithm: Dual-Loop PID Balancing Robot Attitude Control Algorithm Based on Complementary Factor and Honey Badger Algorithm
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

System Identification and Nonlinear Model Predictive Control with Collision Avoidance Applied in Hexacopters UAVs

by
Luis F. Recalde
1,
Bryan S. Guevara
2,
Christian P. Carvajal
2,
Victor H. Andaluz
3,
José Varela-Aldás
1,4,* and
Daniel C. Gandolfo
2
1
SISAu Research Group, Facultad de Ingeniería y Tecnologías de la Información y Comunicación, Universidad Tecnológica Indoamérica, Ambato 180103, Ecuador
2
Instituto de Automática, Universidad Nacional de San Juan-CONICET, Av. San Martín Oeste 1109, San Juan J5400ARL, Argentina
3
Departamento de Eléctrica y Electrónica, Universidad de las Fuerzas Armadas–ESPE, Sangolquí 171103, Ecuador
4
Department of Electronic Engineering and Communications, University of Zaragoza, 44003 Teruel, Spain
*
Author to whom correspondence should be addressed.
Sensors 2022, 22(13), 4712; https://doi.org/10.3390/s22134712
Submission received: 9 May 2022 / Revised: 7 June 2022 / Accepted: 18 June 2022 / Published: 22 June 2022

Abstract

:
Accurate trajectory tracking is a critical property of unmanned aerial vehicles (UAVs) due to system nonlinearities, under-actuated properties and constraints. Specifically, the use of unmanned rotorcrafts with accuracy trajectory tracking controllers in dynamic environments has the potential to improve the fields of environment monitoring, safety, search and rescue, border surveillance, geology and mining, agriculture industry, and traffic control. Monitoring operations in dynamic environments produce significant complications with respect to accuracy and obstacles in the surrounding environment and, in many cases, it is difficult to perform even with state-of-the-art controllers. This work presents a nonlinear model predictive control (NMPC) with collision avoidance for hexacopters’ trajectory tracking in dynamic environments, as well as shows a comparative study between the accuracies of the Euler–Lagrange formulation and the dynamic mode decomposition (DMD) models in order to find the precise representation of the system dynamics. The proposed controller includes limits on the maneuverability velocities, system dynamics, obstacles and the tracking error in the optimization control problem (OCP). In order to show the good performance of this control proposal, computational simulations and real experiments were carried out using a six rotary-wind unmanned aerial vehicle (hexacopter—DJI MATRICE 600). The experimental results prove the good performance of the predictive scheme and its ability to regenerate the optimal control policy. Simulation results expand the proposed controller in simulating highly dynamic environments that showing the scalability of the controller.

1. Introduction

1.1. Motivation

In recent years, the field of robotics has experienced exponential growth due to fast technological advances. The applications are not restricted to the industrial field, as nowadays robots are equipped with sophisticated and intelligent algorithms that are useful for performing complex task in unstructured and natural environments with a high degree of autonomy. The integration between robots and humans through service robotics has the objective of facilitating activities of daily life or improving repetitive tasks. As such, we can find mobile manipulators that are used to load transportation in structured environments [1,2], robotic systems that help people during their rehabilitation process [3] and aerial robotic vehicles that are useful in rescue or transportation operations [4]. Robot applications can be divided into four main groups: (i) Learning robots, which are robotic systems for whom the main objective is to improve learning and stimulation processes [5,6]. (ii) Construction robots, which are systems that can be programmed to develop complex repetitive tasks, where the main contributions are the decrease in production time and the prevention of accidents in dangerous workplaces [7,8]. (iii) Field robots, which show a variety of improvements in mining industries, agricultural and livestock, increasing the economy of the population [9,10]. (iv) Military robots, which are designed to perform exploration, security, rescue, among other applications in hostile environments that can be dangerous for humans, and these applications are highly developed using unmanned aerial vehicles (UAVs) [11].
The use of unmanned aerial vehicles have grown in a wide range of fields and has been extensively studied by the scientific community due to the versatility and the possibility to perform the fully autonomous tasks that humans are unable to. The extremely agility of the UAVs with four or more rotors has attracted attention due to their ability to vertically take off and land in confined or difficult to access spaces, which eases construction and enables having a higher payload capacity, which are useful in critical missions such as transportation, rescue, search, surveillance and disaster assistance. In these applications, the execution time is an extremely important feature due to the task only being executed for high-speed trajectories. To take advantage of UAVs, it is necessary to guarantee the safe execution of the application; however, dynamic environments are spaces with highly probabilities of collisions, where obstacle information is unknown at the beginning of the task, and thus the UAV must be capable of avoiding the obstacles using online-scheme information. Obstacle avoidance is an important feature that guarantees the correct functionality of UAV applications. In this context, research efforts are still needed to safely introduce UAVs as a technological tool with great potential to solve various current problems such as a collision avoidance control structure that can perform high-speed trajectories in dynamic environments.

1.2. Related Work

Depending on the environment, UAV applications can be divided in two groups: (i) Outdoor environments where many studies have employed UAVs with onboard sensors, e.g., Mellinger et al. presented collaborative grasping to logistic applications [12]; Bircher et al. performed path planning for structural inspection using UAVs [13]; search and rescue operations were developed by Oetter- shagen et al. in [14]; and an application consisting of tasks related to physical interaction with the environment was developed by Garimella et al. [15]. (ii) Indoor environments are the counterpart applications, developed in cluttered indoor experiments, examples of which include the study by Song and Hsu who presented navigation based on factor graph optimization (FGO) [16]; Paredes et al., who developed a hybrid acoustic and optical positioning system for accurate 3D movements [17]; and Sandino et al., who proposed an autonomous navigation system using partial observable and uncertainty sensor measurements [18]. Due to the different types of UAVs, these systems have the ability to perform a wide range of applications that are emerging. The most popular configuration of multi-rotors is the quadrotor UAV, which is applied in a variety of aerial fields, e.g., Radoglou–Grammatiski et al., who presented the compilation of the most important applications for precision agriculture using quadrotors [19]; and Gupta et al., who presented the advances of UAVs and the applications in transportation systems [20]. This configuration only presents four motors attached to the mechanical frame generating a limiting power that restricts the fields of use, especially for rescue and transportation tasks. However, nowadays the design of a multi-rotor with more than four rotors is a rapidly growing industry because multi-rotor configuration has presented important advances due to its high maneuverability and transportation capacity [21,22]. More works were conducted by Belmonte et al., who designed an octocopter for the inspection of mobile cranes [23]; Phong-Nguyen et al., who presented a sliding mode control algorithm with a fuzzy inference system considering variable gains for hexacopters [24]; and Ali et al., who developed adaptive backstepping for the attitude and altitude of coaxial octorotors [25].
The use of more rotors can produce high costs in production, a considerably increased size of the UAV and complex dynamics. Nowadays, it still a challenge to design effective controllers that ensure good performance in multi-rotors at high-speed trajectories. Precise trajectory tracking is an important feature for multi-rotors operating in real-world environments due to the considerable size of the structure and possible collision with obstacles. The main reasons that make this configuration more complex than the others are presented below: (i) System actuation: An inherently under-actuated system due to there only being four control inputs over the six degrees of freedom (DOF). (ii) Dynamics behavior: high nonlinearities produced by translational and rotational dynamics due to the considerable size of the system. (iii) Dynamic model mismatch: Unmodeled dynamics, uncertainties and disturbances produced for high-speed trajectories and the possibility of external forces such as wind in outdoor environments. All of these problems incited the special attention of researchers from different fields. As a consequence, a wide variety of control strategies have been proposed for the problem of trajectory tracking for hexacopters. Initially, some linear control methods were presented, and these works considered small angles’ assumptions that are necessary for linear control techniques, and the most common structures were presented by Alaimo et al., who developed a proportional–integral and derivative controller (PID) under linear assumptions in UAVs with an hexacopter configuration [26] and Salim et al. presented optimum linear control that stabilizes the attitude of a micro-hexacopter in indoor environments [27].
Linear models are only valid around the hover position, providing slow movements where the controllers cannot guarantee the convergence to the desired trajectories. In order to improve the performance and to satisfy the requirements of high-speed trajectories, a large number of studies have used the principles of nonlinear control, e.g., Chen et al., who proposed a nonlinear trajectory controller for UAVs based on backstepping and nonlinear observer [28] and Wang et al. presented the sliding mode control (SMC) with a variable structure to generate the control inputs [29]. Recently, many authors have proposed using geometric tracking controllers, e.g., Lee et al. showed the results of trajectory tracking using a nonlinear controller developed in a Euclidean group S E ( 3 ) [30]; Mellinger et al. revealed the differential flatness properties in UAVs and the ability to derive the attitude, acceleration and angular rate [31]. The property of differential flatness improves the accurate trajectory tracking under high-speed references and it was demonstrated by [32,33]. In recent years, intelligent control approaches were used to developed advance control systems, and these schemes included artificial neural networks and fuzzy logic controllers that are highly used in multi-rotor UAVs; the results present interesting behaviors under disturbances and parameter changes [34,35,36,37].
Unlike multi-rotor control techniques, obstacle avoidance has not been highly developed by the research community. Obstacle avoidance is a relatively new field and most works have used the concept of artificial potential fields, a method which is based on the generation of repulsive and attractive forces that allow the movements of the system around obstacles. The literature presents the extensive applications with UAVs, but these works revealed the problem of a local minimal that cannot guarantee the execution of the task [38,39]. Nowadays, other methods have been proposed to solve the problem of obstacle avoidance, the most popular among which include: (i) rapidly exploring random tree (RRT), a formulation which generates a tree rooted at the initial configuration of the system and using random samples to create edges between feasible points. The work by Achtelik et al., who presented an RRT algorithm with a modification rapidly exploring random belief tree (RRBT), which was used to generate the collision free path using quadrotor UAVs [40]; (ii) The belief roadmap, which is a probabilistic version of the roadmap, which uses the Kalman filter for the planning motion, and has the ability to generate trajectories by avoiding obstacles; this structure was presented by [41]. (iii) The minimum snap trajectory generation this algorithm includes navigation through corridors whilst considering constraints on velocities and accelerations, the solution to which is based on the generation of optimal trajectories that minimizes a functional cost confirmed by square norm of the snap, an application of which was presented in [31]. All the obstacle avoidance algorithms presented beforehand only consider the prior knowledge of the obstacle in the environment, whilst also requiring high computational times and complex operations.
Taking into account the problems of no-dynamics constraints and only the prior knowledge of environments, the results thus produce unfeasible control actions and problems in dynamic environments with highly probabilities of collisions during the task execution. To fully exploit hexacopters’ capabilities and take advantage of the available computation power, optimization-based control techniques are becoming suitable for real-time problems. Model predictive control (MPC) has been used in many fields of robotics due to the accuracy of its tracking trajectories, robust performance and the ability to include constraints in the controller scheme. In function of the field, the general applications can be divided into the following groups:
  • Ground mobile robots: where Sani et al. presented nonlinear model predictive control (NMPC) to solve the competitive games between ground robots [42], another work undertaken developed by Subramanian et al. increased the ability to avoid dynamic obstacles [43], and finally, a leader–follower structure control using NMPC through visual information to mobile robots was presented by Ribeiro et al. [44].
  • Robotic arms and manipulation: In the last year, this field of research has been the focus of many studies due to the complexity of the systems and the scalability of the NMPC structure. The work of Osman et al. presented a task-space controller based on (NMPC) to control a mobile manipulator 10 (DOF) [45].
  • Aerial mobile robots: this field has also been the subject of a large number of studies due to the high use of aerial vehicles in real-world applications, some applications of which were studies Neunert et al., who developed an unconstrained nonlinear predictive model for generation and tracking trajectories for the AscTec Firefly hexacopter [46]; Aoki et al., who presented an NMPC for position and attitude control applied in a hexacopter without three of the six motor configurations [47]; and finally, the contribution of Tzoumanikas et al., a letter which presented the NMPC designed for micro aerial vehicles (MAVs) equipped with a robotic arm [48].
This kind of controller has had a huge impact on the field of robotics thanks to the predictive behavior and ability to introduce system constraints in the controller scheme. The main idea of this controller is to generate the control actions trying to minimize a cost function over a prediction horizon. The cost function is solved using constrained optimization techniques; however, the resolution of constrained optimization problems is computationally expensive. Due to the recent developments in hardware and nonlinear optimization solvers, nonlinear predictive control is computationally applicable in many fields and has received the attention of a hexacopter control field [49,50,51,52,53].

1.3. Main Contributions of This Work

Run NMPC structures are realizable in modern computers and guarantee the execution of complex tasks but still require more computational time than the schemes mentioned beforehand. It is necessary to show performance under tracking accuracy and the ability to extend this technique to dynamic environments in order to add obstacles in the optimization problem. With all the aforementioned controllers and the significant results in many areas, this work presents the nonlinear model predictive control to fast trajectory tracking in dynamic environments applied in hexacopter platforms. The controller best generates the control policy that moves the hexacopter to the reference trajectory while avoiding obstacles through the environment. To construct the approach, this work developed the important contributions presented below:
  • System dynamics: a large number of research platforms cannot be controlled through torque commands; as such, this work developed a reduced dynamic model of the hexacopter using general control velocities, which is possible with the incorporation of low-level PID schemes in mathematical representation. The PIDs guarantee the required velocities generated by the high-level controllers. The mathematical representation was developed through an Euler–Lagrange formulation and the data-driven technique known as dynamic mode decomposition (DMDc). Both approaches were identified using experimental data from the (DJI MATRICE 600 PRO); furthermore, this work presents accuracy comparative results between both techniques and selects the best formulation to build the controller scheme.
  • NMPC formulation: this includes the differential kinematics and the reduced dynamic representation; furthermore, due to the ability of the NMPC controller, the system constraints can be included in the optimization problem. The constraints included in this work are: control action limits, control rate of change, and the system dynamics and static and dynamic obstacles. The nonlinear optimization problem was solved using CasADI framework and the problem was transformed into a nonlinear programming problem (NLP) form using the direct multiple-shooting method. The CasADI optimization toolkit guarantees a fast convergence with the possibility of extending the solution to onboard hardware implementation.
  • Results: the experiments were conducted in real-world outdoor environments, where the system has a model mismatch and external disturbance product by air flows and delay in system communications. The experiments were developed through the hexacopter platform (DJI MATRICE 600 PRO) where multiple reference trajectories were selected in order to verify the performance of the controller. The metrics used in the experiments are the following: tracking accuracy, computational time and disturbance rejection. Additionally, the simulation results show the scalability in simulated high dynamic environments, considering the identified dynamics and obstacles; these results will be used as a start point in future research due to the fact that the hexacopter aerial platform does not have any sensor to measure obstacles during the experiments.

1.4. Outline

This work is structured as follows. Section 2 presents the instantaneous kinematics with the reduced dynamic model and system identification and validation. Furthermore, the controller formulation is presented in this section, which consists of the nonlinear model predictive controller with an obstacles avoidance scheme. Section 3 shows the real-world experiments and simulation results; furthermore, considering the experiment results, this section exhibits a review of the important aspects and the future research direction. The conclusions of the work are presented in Section 4.

2. Materials and Methods

2.1. Hexacopter System Preliminaries

This section presents the instantaneous kinematics and the dynamic model. The dynamic model was formulated in maneuverability velocities space using two different formulations: the Euler–Lagrange and dynamic mode decomposition. After the formulation process, this work presents the validation results in order to verify the performance of each formulation.
Figure 1 shows the hexacopter platform DJI MATRICE 600 PRO, where the world-fixed inertial frame is represented by < I > with the following unit vectors I x , I y , I z and the body-fixed frame attached to hexacopter movements is defined by < B > with the unit vectors B x , B y , B z , where the center of mass (CoM) is aligned; furthermore, the hexacopter is configured with six motors in the mechanical frame which allows the movement of the system.

2.1.1. Kinematics Model

The robot has the ability to move through the inertial frame < I > and it is enabled to rotate only in yaw ψ defined in the vertical axis B z , whilst the others’ angular rotations roll and pitch ( ϕ , θ ) are not considered in this work due to this hexacopter platform having a low level flight controller which guarantees the hover position. The position and orientation of the point to be controlled is defined by the vector η = η x η y η z η ψ T R 4 with respect to the frame < I > , and the following equation defines these elements in greater detail:
η x = η x 0 + d x cos ( ψ ) d y sin ( ψ ) η y = η y 0 + d x sin ( ψ ) + d y cos ( ψ ) η z = η z 0 + d z η ψ = ψ
where the values ( η x 0 , η y 0 , η z 0 ) are the locations of the CoM and ( d x , d y , d z ) are the distances in the body-fixed frame < B > to the point of interest η . In order to know the evolution of the interest point, it is necessary to introduce the concept of the instantaneous kinematic, defining the time derivative as η ˙ = η t μ . With these considerations, the velocity of the point is defined by the vector η ˙ = η ˙ x η ˙ y η ˙ z η ˙ ψ T R 4 with respect to the frame < I > ; furthermore, the time derivative produces maneuverability velocities μ attached to the frame < B > . Due to the low-level PIDs controllers, the maneuverability vector is defined by μ = μ l μ m μ n ω T R 4 , with the longitudinal velocities ( μ l , μ m , μ n ) through the axis ( B x , B y , B z ) and the angular rate of change ω over unit vector B z . Using the definition of instantaneous kinematics, the evolution can be defined by the following equation:
η ˙ x = μ l cos ( ψ ) μ m sin ( ψ ) ( d x sin ( ψ ) + d y cos ( ψ ) ) ω η ˙ y = μ l sin ( ψ ) + μ m cos ( ψ ) + ( d x cos ( ψ ) d y sin ( ψ ) ) ω η ˙ z = μ n η ˙ ψ = ω
the equation presented before can be written in a matrix form, defined as:
η ˙ x η ˙ y η ˙ z η ˙ ψ = cos ( ψ ) sin ( ψ ) 0 ( d x sin ( ψ ) + d y cos ( ψ ) ) sin ( ψ ) cos ( ψ ) 0 ( d x cos ( ψ ) d y sin ( ψ ) ) 0 0 1 0 0 0 0 1 μ l μ m μ n ω
where the expressions ( d x sin ( ψ ) + d y cos ( ψ ) ) and ( d x cos ( ψ ) d y sin ( ψ ) ) represent the additional behavior considering the displacement of the point of interest. To simplify the notation, Equation (3) is expressed in the compact form in (4)
η ˙ ( t ) = J ( ψ ( t ) ) μ ( t )
where J ( ψ ( t ) ) R 4 × 4 is the Jacobian matrix which allows the linear mapping between the control maneuverability velocities μ to the evolution of the point of interest η ˙ , Equation (3) is expressed in vector-function form as:
η ˙ ( t ) = f k ( ψ ( t ) , μ ( t ) )
Considering that η ¨ ( t ) = d d t η ˙ , the following relation was developed:
η ¨ x η ¨ y η ¨ z η ¨ ψ = cos ( ψ ) sin ( ψ ) 0 ( d x sin ( ψ ) + d y cos ( ψ ) ) sin ( ψ ) cos ( ψ ) 0 ( d x cos ( ψ ) d y sin ( ψ ) ) 0 0 1 0 0 0 0 1 μ l ˙ μ m ˙ μ n ˙ ω ˙ + ω sin ( ψ ) ω cos ( ψ ) 0 ω ( d x cos ( ψ ) d y sin ( ψ ) ) ω cos ( ψ ) ω sin ( ψ ) 0 ω ( d x sin ( ψ ) + d y cos ( ψ ) ) 0 0 0 0 0 0 0 0 μ l μ m μ n ω
it can be written in compact form as η ¨ ( t ) = J ( ψ ) μ ˙ ( t ) + J ˙ ( ψ , ω ) μ ( t ) , where μ ˙ = μ l ˙ μ m ˙ μ n ˙ ω ˙ T R 4 is the vector of maneuverability accelerations, and this formulation will be used in the dynamic model section.

2.1.2. Dynamic Model

This section presents the dynamic model, which has been developed considering low-level PIDs controllers that only generate longitudinal movements in I x , I y , I z and the angular rotation through B z . The dynamic model is useful for guaranteeing the stability of the proposed controller in real-world applications.

Euler–Lagrange Formulation

One of the approaches to find the mathematical model is the Euler–Lagrange formulation. This formulation is a convenient analytical method for obtaining the dynamic model and studying the physical phenomena of the hexacopter. The Euler–Lagrange formulation uses the total energy of the system confirmed by kinetic and potential energy. The total kinetic energy is defined by the following equation:
T ( η ˙ ) = 1 2 η ˙ T M η ˙
where M = d i a g ( m , m , m , I ) is a diagonal matrix confirmed by the mass of the hexacopter m and the moment of inertia I around the vertical axis B z . On the other hand, the potential energy is the position or configuration of the system with respect to the world-fixed frame < I > , and the potential energy is described by:
V ( η ) = m g ( η z + d z )
where g represents the gravitational acceleration. The Lagrange formulation is obtained by the subtraction of the kinetic T ( η ˙ ) and potential V ( η ) energy expressed as:
L = 1 2 η ˙ T M η ˙ m g ( η z + d z )
Now, applying the Euler–Lagrange formulation:
d d t ( d L η ˙ ) d L η = f I
where f I = f x I f y I f z I τ ψ I T R 4 are the generalized forces and torque vector with respect to the frame < I > ; with this formulation, it is possible to obtain the nonlinear model by the following equations:
m η x ¨ d y m cos ( ψ ) η ψ ¨ d x m sin ( ψ ) η ψ ¨ d x m cos ( ψ ) η ψ ˙ 2 + d y m sin ( ψ ) η ψ ˙ 2 = f x I m η y ¨ + d x m cos ( ψ ) η ψ ¨ d y m sin ( ψ ) η ψ ¨ d y m cos ( ψ ) η ψ ˙ 2 d x m sin ( ψ ) η ψ ˙ 2 = f y I m η z ¨ + m g = f z I I η ψ ¨ + d x 2 m η ψ ¨ + d y 2 m η ψ ¨ d y m cos ( ψ ) η x ¨ + d x m cos ( ψ ) η y ¨ d x m sin ( ψ ) η x ¨ d y m sin ( ψ ) η y ¨ = τ ψ I
the equations presented in (11) can be written in a matrix form, resulting in:
f x I f y I f z I τ ψ I = m 0 0 m ( d y cos ( ψ ) + d x sin ( ψ ) ) 0 m 0 m ( d x cos ( ψ ) d y sin ( ψ ) ) 0 0 m 0 m ( d y cos ( ψ ) + d x sin ( ψ ) ) m ( d x cos ( ψ ) d y sin ( ψ ) ) 0 m d x 2 + m d y 2 + I η ¨ x η ¨ y η ¨ z η ψ ¨ + 0 0 0 d y m sin ( ψ ) η ψ ˙ d x m cos ( ψ ) η ψ ˙ 0 0 0 d y m cos ( ψ ) η ψ ˙ d x m sin ( ψ ) η ψ ˙ 0 0 0 0 0 0 0 0 η ˙ x η ˙ y η ˙ z η ψ ˙ + 0 0 g m 0
To simplify the notation, this work compacts Equation (12), resulting in the following classical representation:
f I ( t ) = H ¯ ( η ) η ¨ ( t ) + C ¯ ( η , η ˙ ) η ˙ ( t ) + g ¯
where H ¯ R 4 × 4 is the mass and inertia matrix of the hexacopter system, in addition to being positive and symmetric definite; C ¯ R 4 × 4 is the matrix of Coriolis forces and g ¯ R 4 is known as the gravitational vector. Vectors η ¨ = η ¨ x η ¨ y η ¨ z η ψ ¨ and η ˙ = η ˙ x η ˙ y η ˙ z η ψ ˙ are the acceleration and velocity of the point of interest in the inertia frame < I > .
Due to the fact that the hexacopter platform can be controlled through reference maneuverability velocity commands, this work converts the generalized force and torque inputs of the dynamic model (13) into reference maneuverability velocities as system control inputs. Considering the position dynamic model presented in [54] which considers all DOF in a multirotor:
μ l ˙ μ m ˙ μ n ˙ = 0 w z w y w z 0 w x w y w x 0 μ l μ m μ n f z I m 0 0 1 + g cos ( ψ ) cos θ sin ψ cos ϕ + cos ψ sin θ sin ϕ sin ψ sin ϕ + cos ψ cos ϕ sin θ sin ( ψ ) cos θ cos ψ cos θ + sin ϕ sin θ sin ψ cos ψ sin ϕ + sin θ sin ψ cos ϕ sin θ cos θ sin ϕ cos θ cos ϕ 0 0 1
it can be written in a compact form as μ ˙ = w x μ + g R ( θ , ϕ , ψ ) T e 3 f z m e 3 , where w = w x w y w z are the angular velocities associated with the frame < B > , w x represents skew symmetric matrix and finally R ( θ , ϕ , ψ ) represents the rotation matrix from the frame < B > to < I > . For any multicopter, drags applied to rotating blades are in the direction of the body axes; from (14), the position dynamic model considering the aerodynamic drag model is represented as:
μ l ˙ μ m ˙ = μ m ω z μ n ω y g sin θ k d r a g m μ l μ n ω x μ l ω z + g cos θ sin ϕ k d r a g m μ m
where μ l ˙ , μ m ˙ are the accelerations in the body frame < B > and k d r a g is the drag constant. To include the drag coefficients in the dynamic model, this work split Equation (14) and can be written as:
a x a y = μ m ω z μ n ω y k d r a g m μ l μ n ω x μ l ω z k d r a g m μ m
where a x = μ l ˙ + g sin ( θ ) and a y = μ m ˙ g cos ( θ ) sin ( ϕ ) . Since the low-level controller guarantees hover, the cross terms are ignored, so the specific force satisfies:
f x f y = k d r a g μ l k d r a g μ m
where the forces produced in the system f h B = f x f y are generate by a PD controller for the horizontal plane. The PD controller was designed as:
f h B = k p l ( μ h r e f μ h ) + k d l ( μ ˙ h r e f μ ˙ h )
where μ h = μ l μ m T R 2 is the vector of the horizontal maneuverability velocities, μ h r e f = μ l r e f μ m r e f T R 2 is the reference desired velocity and k p l , k d l are positive definite matrices. For the PD controller, this work used the following assumptions if μ ˙ h r e f = 0 then lim t f h = 0 and lim t μ ˜ h = 0 , respectively.
A similar concept was applied to the vertical force attached to the body frame f z B = f r e f + m g . Designing a PD controller for the vertical thrust as:
f z B = k p n ( μ n r e f μ n ) + k d n ( μ ˙ n r e f μ ˙ n ) + m g
where k p n , k d n are positive definite matrices, this work considers the following assumptions if μ ˙ n r e f = 0 then the lim t f z I = 0 and lim t μ ˜ n = 0 , respectively.
The same approach can be extended to the attitude dynamic model presented in [54], which is defined as:
J B · w ˙ = w × ( J B · w ) + G B + τ
where τ τ x τ y τ ψ R 3 is the vector of moments in the body axes < B > ; J B R 3 × 3 includes the moment of inertia and G B G B , ϕ G B , θ G B , ψ T R 3 represents the gyroscopic torques. Ignoring the term w × ( J B · w ) + G B , the simplified attitude dynamic model is defined as: J B w ˙ = τ ψ , where a PD controller for angular translations is defined as:
τ ψ = k p ω ( ω r e f ω ) + k d ω ( ω ˙ r e f ω ˙ )
where k p ω , k d ω R are positive scalars and the following assumptions are true if ω ˙ r e f = 0 ; then, lim t τ ψ = 0 and lim t ω ˜ = 0 , respectively.
After all the considerations presented beforehand, this work introduces the general structure of low-level PD controllers combining Equations (18), (19) and (21), finally the structure is presented in Equation (22).
f x B f y B f z B τ ψ B = k p l 0 0 0 0 k p l 0 0 0 0 k p n 0 0 0 0 k p ω μ l r e f μ m r e f μ n r e f ω r e f k p l 0 0 0 0 k p l 0 0 0 0 k p n 0 0 0 0 k p ω μ l μ m μ n ω k d l 0 0 0 0 k d l 0 0 0 0 k d n 0 0 0 0 k d ω μ ˙ l μ ˙ m μ ˙ n ω ˙ + 0 0 m g 0
Equation (22) can be written in a compact form as f B ( t ) = K p μ ref ( t ) K p μ ( t ) K d μ ˙ ( t ) + g , where the values k p l , k p m and k p ω are the proportional values of the PD controller; k d l , k d m and k d ω are the derivative gains; μ ref = μ l r e f μ m r e f μ n r e f ω r e f T R 4 are the reference maneuverability velocities or control vector of the hexacopter; μ and μ ˙ are the real velocities and accelerations generated in the system.
Finally, with all the transformations considered beforehand, Equations (4) and (6) are substituted into a dynamic hexarotor model (12), and equating the expression to (22), a new reduced dynamic model can written as:
μ l r e f μ m r e f μ n r e f ω r e f = ζ 1 0 0 ζ 2 0 ζ 3 0 ζ 4 0 0 ζ 5 0 b ζ 6 a ζ 7 0 ζ 8 ( a 2 + b 2 ) + ζ 9 μ ˙ l μ ˙ m μ ˙ n ω ˙ + ζ 10 ω ζ 11 0 a ω ζ 12 ω ζ 13 ζ 14 0 b ω ζ 15 0 0 ζ 16 0 a ω ζ 17 b ω ζ 18 0 ζ 19 μ l μ m μ n ω
This new formulation represents the evolution of the hexacopter’s general velocities with the reference maneuverability velocities as the input of the system. This representation is useful because commercial aerial platforms can be directly controlled with maneuverability velocities, ignoring the low-level control. Equation (23) can be compactly written as:
μ ref ( t ) = H ( ζ , a , b ) μ ˙ ( t ) + C ( ζ , μ ) μ ( t )
where H = ( RK p ) 1 ( ( H ¯ J + R K d ) , C = ( RK p ) 1 ( H ¯ J ˙ + R K p + C ¯ J ) , G = ( RK p ) 1 ( g R G ¯ ) ) = 0 . Thus, H ( ζ , a , b ) R 4 × 4 is a positive definite matrix, which is the new mass and inertia matrix of the hexacopter robot, the new Coriolis and Centripetal matrix is defined by C ( ζ , μ ) R 4 × 4 , R represents the rotation matrix under the z axis from frame < B > to frame < I > . The vector of dynamic parameters represents the combination of all the internal values in the hexacopter robot such as the physical, mechanical, electrical and PD values, and the vector is defined by ζ = ζ 1 ζ 2 ζ l d R l d where l d = 19 is the number of variables that this work needs to identify as the details of each parameters are presented in Appendix A for Equations (A1) and (A2).

Euler–Lagrange Identification and Validation

This section presents the identification and validation of the dynamic parameters, as this work uses real experimental data to estimate these values in order to use the model in the proposed controller. This work transforms the mathematical model (24) in the linear parametric representation into:
μ ref ( t ) = Θ ( μ ˙ ( t ) , μ ( t ) ) ζ
where the matrix Θ confirms the values of velocities and accelerations obtained from real-world experiments. In order to estimate the vector of dynamic values, this work uses snapshot measurements over the time as l [ t , t + t f ] where l is an instant of measure and t f is the final time of the experimental information. The identification process was developed through optimization techniques defining m ( μ ˙ ( l | t ) , μ ( l | t ) , μ ref ( l | t ) , ζ ) : R 4 R 0 , which is a positive semi-definite function confirmed by:
m ( μ ˙ ( l | t ) , μ ( l | t ) , μ ref ( l | t ) , ζ ) = 1 2 | | μ ref ( l | t ) Θ ( μ ˙ ( l | t ) , μ ( l | t ) ) ζ | | Q m 2 M o d e l i d e n t i f i c a t i o n c o s t
Model identification cost: this function was formulated using the subtraction between the reference maneuverability μ ref ( l | t ) velocities applied in the hexacopter and the system measurements defined by the matrix Θ ( μ ˙ ( l | t ) , μ ( l | t ) ) ; the operator | | · | | is known as the Euclidean norm; and Q m R > 0 4 × 4 is a positive definite weighting matrix.
With Equation (26), it is possible to generate the functional cost or performance index over the experimental data, which is formulated as follows:
V m ( μ ˙ ( l | t ) , μ ( l | t ) , μ ref ( l | t ) , ζ ) = t t + t f m ( μ ˙ ( τ | t ) , μ ( τ | t ) , μ ref ( τ | t ) , ζ ) d τ
Considering the performance index function presented in (27), the optimization structures are defined in (28), which was solved using the sequential quadratic programming (SQP) technique.
P m : P m ( μ ˙ ( t ) , μ ( t ) , μ ref ( t ) ) = min ζ V m ( μ ˙ ( l | t ) , μ ( l | t ) , μ ref ( l | t ) , ζ )
This work used the experimental information of the hexacopter platform DJI MATRICE 600 PRO to identify the dynamic parameters. The aerial system has a low-level flight controller called A3, which is confirmed by three global positioning systems (GPS) and three inertial measurement unit systems (IMUs). Furthermore, this system provides highly precise measurements from the system states. The identified parameters are presented in Table 1; furthermore, for the identification and validation process, this work used a different kind of reference velocity signals.
Figure 2 shows the results of the identification process, where the signals μ l , μ m , μ n and ω were obtained by real-world experiments; and μ l m , μ m m , μ n m and ω m are the estimated values of the dynamic model using the optimization formulation presented previously. The presence of noise in the signals is an important factor due to the fact that it probably causes problems in the identification process; this work uses a filter defined as: λ / ( s + λ ) with λ = 1 to eliminate noise in the real measurements. The filter was applied to the system measurements and the reference maneuverability velocities.
The validation process of the dynamic parameters is a very important factor; hence, the model needs to estimate the behavior of the system with different signals in order to represent the real dynamics of the system. The validation signals are shown in Figure 3, the validation process shows the performance of the estimate dynamic model, which will be useful for the comparative section.
With all the previously presented results and the validation of the dynamic parameters, this work formulates the identified model using Euler-Lagrange as a vector-function presented as:
μ ˙ ( t ) = f S Q P ( ζ , μ ( t ) , μ ref ( t ) )

Dynamic Mode Decomposition Formulation

This section presents the second approach of the dynamic model formulation which, due to the hexacopter platform, only has internal low-level PIDs; and the system tries to stay close to the hover-position with small angular variations in roll and pitch angles ( ϕ , θ ) . Furthermore, this kind of hexacopter platforms cannot be controlled with the torques commands, and the control inputs at the system are the reference maneuverability velocities μ ref . Considering the small angle assumptions and the inputs in the system, the model can hence be formulated with a linear approximation for time-varying systems resulting in:
μ ˙ ( t ) = A μ ( t ) + B μ ref ( t )
where μ and μ ˙ are the vectors of the maneuverability velocities and accelerations; μ ref is the reference maneuverability velocity vector also known as the control vector; matrices A R 4 × 4 and B R 4 × 4 represent the unforced system and the contribution of the control vector, respectively.
One of the emerging techniques to identify systems by experimental information is that of dynamic mode decomposition (DMD) [55,56,57], where the objective is to approximate the matrices A and B . The DMD algorithm proposes the construction of snapshot measurements s and the formation of augmented matrices, resulting in a new formulation of the system as follows:
χ ˙ A χ + B Γ
where the new matrices are defined below:
χ ˙ = | | | μ 1 ˙ μ 2 ˙ μ s ˙ | | |
χ = | | | μ 1 μ 2 μ s | | |
Γ = | | | μ ref 1 μ ref 2 μ ref s | | |
χ ˙ and χ are the augmented matrices confirmed by the maneuverability accelerations and velocities, respectively; and Γ is the matrix of the reference velocities applied in the system over the s number of snapshots.
For estimation purposes, the system can be formulated as:
χ ˙ Φ Ω
where Φ = A B R 4 × ( 4 + 4 ) is the matrix confirmed by unknown values of A and B ; and Ω = χ Γ T R ( 4 + 4 ) × s is the data matrix obtained from the system. This work finds the best values of the unknown matrix using the Frobenius norm | | χ ˙ Φ Ω | | F , defining the values in the following equation:
Φ χ ˙ Ω
One of the best methods to find the solution of the Frobenius norm is the singular value decomposition (SVD); therefore, applying this method to the augmented data matrix resulting as Ω U ¯ Σ ¯ V ¯ T , where U ¯ , Σ ¯ and V ¯ are matrices with a truncation value r ¯ , with these considerations presented above, the estimation is defined by the following equation:
Φ χ ˙ V ¯ Σ ¯ 1 U ¯ T
To approximate the values of the matrices A and B , the Equation (34) can be written as (35), considering the splitting values of the singular vector U ¯ .
A ¯ B ¯ χ ˙ V ¯ Σ ¯ 1 U ¯ 1 T χ ˙ V ¯ Σ ¯ 1 U ¯ 2 T
The values of the matrix A can be approximated using the split matrix U ¯ 1 R 4 × r ¯ and the values of B are approximated using the values of U ¯ 2 R 4 × r ¯ .

Dynamic Mode Decomposition Identification and Validation

This section presents the identification and validation process of the dynamic model using the DMD formulation. The values of matrices χ ˙ , χ and Γ were constructed by measure snapshots information of the aerial platform DJI MATRICE 600 PRO and the application of Algorithm 1, which represents all the necessary steps to identify the values of unknown matrices.
Algorithm 1 Identification process Using DMD
Input: DJI MATRICE 600 PRO measurements ( χ ˙ , χ , Γ ) and truncation value r ¯ .
Output: Matrices A ¯ and B ¯ .
    Ident ( χ ˙ , χ , Γ , r ¯ ) do
      Ω χ Υ T
      ( U , Σ , V ) S V D ( Ω )
      ( U ¯ , Σ ¯ , V ¯ ) T r u n c ( U , Σ , V , r ¯ )
      ( U ¯ 1 , U ¯ 2 ) S p l i t ( U ¯ )
      A ¯ χ ˙ V ¯ Σ ¯ 1 U ¯ 1 T
      B ¯ χ ˙ V ¯ Σ ¯ 1 U ¯ 2 T
    end Ident
    return ( A ¯ , B ¯ )
The approximation values of the unknown matrix are presented in Table 2 and Table 3, where, a i j and b i j are the individual elements of A ¯ and B ¯ , respectively.
The signals used for the identification process are presented in Figure 4, which are the same as those used for the identification process employing Euler–Lagrange formulation, due to the fact that both techniques need to estimate the values under the same conditions.
The estimated model displays good behavior due to the fact it replicates the signals obtained from experimental data. The noise in the angular maneuverability velocity ω is an important factor, however, dynamic mode decomposition and the robustness of the Frobenius norm can deal with this noise and the application of filters is not necessary in the identification process.
In the same way presented in the validation process using the Lagrange formulation, this section presents the validation process under DMD formulation, the results of which are shown in Figure 5, which shows the good performance of the proposed technique.
Finally, considering the approximation values of the unknown matrices, the dynamic model can be written in a vector-function form as:
μ ˙ ( t ) = f D M D ( Γ , μ ( t ) , μ ref ( t ) )

2.1.3. Accuracy Comparative Results

This section presents the comparative results between the Euler–Lagrange (29) and dynamic mode decomposition (36) formulations. This work uses the integral square error (ISE) to show the performance of each formulation and selects the best one for the nonlinear model predictive controller structure.
Figure 6 shows the ISE of each formulation, where the model for frontal maneuverability velocity μ l m presents a considerable error using the Euler–Lagrange formulation—with a value of precisely 1.26 —whilst on the other hand, DMD results show a better performance with a value of 0.56 . The proposed formulations show similar results with respect to the lateral velocity μ m m , and the values using the Euler–Lagrange and DMD are 0.35 and 0.16 , respectively. The results for the estimated upper maneuverability velocity μ n m are really close with the following values 0.0104 and 0.0100 . Finally, the ISE of the estimated models for the angular maneuverability velocity are 0.104 and 0.038 for the Euler–Lagrange and DMD formulations, respectively.
With the previously presented results, this work uses the DMD estimated model to construct the proposed controller. Combining Equations (5) and (36), the general mathematical representation is defined as:
x ˙ ( t ) = f ( x ( t ) , μ ref ( t ) )
f ( x ( t ) , μ ref ( t ) ) : = f k ( ψ ( t ) , μ ( t ) ) f D M D ( Γ , μ ( t ) , μ ref ( t ) )
where x = η T μ T T R 8 is the generalized vector of the system states that is confirmed by η , which is the pose of the point of interest in the hexacopter and μ is the maneuverability velocities.

2.2. Control Methodology

This section presents the formulation of the proposed controller, where the main objective is the trajectory tracking over the desired reference trajectory using an hexacopter platform and due to the dynamic effects and the important size of the system, this work includes obstacle avoidance to improve the behavior of the system in dynamic environments. This work presents the nonlinear model predictive controller (NMPC); furthermore, the constraints included in the optimization problem were: generalized system dynamics, bounded maneuverability velocities, rate of change of control velocities and obstacles in the dynamic environment. The main objectives of the proposed controller are: to solve the control problem associated with the trajectory tracking subject to the system and the environment and system constraints. The control problem is solved by the scheme shown in Figure 7, where the structure uses the system information and possible obstacles in the environment to generate an optimal control policy under the system constraints.

2.2.1. Nonlinear Model Predictive Control

In order to solve the NMPC proposed scheme, this work formulates the generalized dynamics (37) as a prediction, resulting in:
x ˙ ( l | t ) = f ( x ( l | t ) , μ ref ( l | t ) )
where l [ t , t + T ] is the instant value evolution between the initial time t and the prediction horizon T. Due to the prediction behavior of this scheme, the NMPC formulation requires index performances over the prediction horizon T that guarantees the solution of the control problem and the system constraints. The generation of the performance functions are presented below.

2.2.2. Tracking Trajectory Formulation

This subsection presents the generation of the cost function over the evolution instants l considering the following property: t ( x ( l | t ) , η ref ( l | t ) , μ ref ( l | t ) ) : R 4 × R 4 R 0 to formulate the function as:
t ( x ( l | t ) , η ref ( l | t ) , μ ref ( l | t ) ) = 1 2 | | η ref ( l | t ) W t x ( l | t ) | | Q t 2 T r a j e c t o r y s t a g e c o s t + 1 2 | | μ ref ( l | t ) | | Q u 2 C o n t r o l s t a g e c o s t
Trajectory Stage Cost: this part of the function is structured by the control error between the desired trajectory η ref = η x r e f η y r e f η z r e f η ψ r e f T R 4 and the measurements of the system x ; the constant matrix W t R 4 × 8 produces linear mapping between all the states of the system and the outputs η x , η y , η z and η ψ ; the Euclidean norm is defined by the operator | | · | | ; finally, Q t R > 0 4 × 4 is a constant positive definite matrix.
Control stage cost: this part of the cost function defines the variations between the maneuverability control velocities μ ref ( l | t ) ) considering that Q u R > 0 4 × 4 is a positive definite weighting matrix.
The cost function at the last step of the prediction horizon T was formulated with following property: T ( x ( t + T | t ) , η ref ( t + T | t ) ) : R 4 R 0 ; with this consideration, the cost function is defined as:
T ( x ( t + T | t ) , η ref ( t + T | t ) ) = 1 2 | | η ref ( t + T | t ) W x ( t + T | t ) | | Q T 2 T e r m i n a l T r a j e c t o r y c o s t
Terminal trajectory cost: this term considers the control error between the reference trajectory at the last step of the prediction horizon T, where Q T R > 0 4 × 4 is a positive definite weighting matrix.
This work uses Equations (39) and (40) to generate the performance index over the prediction horizon, which was developed in the continuous time formulation, where τ is the interval analyzed in the integral operation, and the performance index is defined as:
V ( x ( l | t ) , η ref ( l | t ) , μ ref ( l | t ) ) = t t + T t ( x ( τ | t ) , η ref ( τ | t ) , μ ref ( τ | t ) ) d τ + T ( x ( t + T | t ) , η ref ( t + T | t ) )
The performance index function (41) guarantees the trajectory tracking propriety of the controller. The tuning process of the positive definite matrices were developed in the simulations in order to prevent accidents in real-world experiments.

2.2.3. Maneuverability Velocities Constraints

Due to the hexacopter platform having maximum maneuverability velocities, this work proposes control input constraints on the NMPC structure, in addition to further constraints on the successive difference of the maneuverability velocities which were included to prevent aggressive behaviors. The input constraints are defined in (42) in order to maintain the control signals generated by the proposed structure under the limits of the hexacopter platform
U = { μ ref R 4 : μ ref m i n μ ref μ ref m a x ; | μ ref ( j + 1 | t ) μ ref ( j | t ) | Δ μ ref m a x }
where μ ref m i n R 4 and μ ref m a x R 4 are the vectors of lower and upper limits in maneuverability velocities; to the successive difference, this works considers j [ t , t + ( T 1 ) ] and Δ μ ref m a x as the vector of the maximum rate of change between the maneuverability velocities.

2.2.4. Obstacle Constraints

This section presents the obstacle constraints in order to track the desired trajectory and avoid obstacles in the dynamic environments. The obstacles can be defined as ξ o b s ( i | z ) = η x o b s η y o b s η z o b s T R 3 like a position vector with respect to the inertia frame < I > , where i [ z , z + Z ] considering the analyzed obstacle as z and Z the number of obstacles detected by the system, the representation of the obstacles is shown in Figure 8.
The function of the distance between obstacles and the hexacopter has the following property: o b s ( x ( l | t ) , ξ o b s ( i | z ) ) : R 4 R 0 , and the equation is formulated as:
o b s ( x ( l | t ) , ξ o b s ( i | z ) ) = | | ξ o b s ( i | z ) W o x ( l | t ) | | 2 D i s t a n c e t o O b s t a c l e s
where W o R 3 x 8 is a constant matrix that produces linear mapping between all the states of the system and the outputs η x , η y and η z . With the previously presented considerations, this work formulates the system states constraints in (44), and where the safe region was defined as r o b s R > 0 , this value includes the safely region and the rotating blades’ positions.
O = { x R 4 : r o b s o b s ( x ( l | t ) , ξ o b s ( i | z ) ) 0 }

2.2.5. Nonlinear Model Predictive Control Formulation

Considering the performance index presented before (41) and the system states (44) and control (42) constraints, this work can formulate the optimization problem as:
P : P ( η ref ( t ) ) = min μ ref ( l | t ) , x ( l | t ) t t + T t ( x ( τ | t ) , η ref ( τ | t ) , μ ref ( τ | t ) ) d τ + T ( x ( t + T | t ) , η ref ( t + T | t ) )
subject to : x ˙ ( l | t ) f ( x ( l | t ) , μ ref ( l | t ) ) = 0
with the following constrains:
x ( l | t ) r o b s o b s ( x ( l | t ) , ξ o b s ( i | z ) ) 0
μ ref ( l | t ) μ ref m i n μ ref μ ref m a x ; | μ ref ( j + 1 | t ) μ ref ( j | t ) | Δ μ ref m a x
P is the function that guarantees the correct trajectory tracking and obstacle avoidance of the hexacopter system. The optimal control problem (45a) was converted into a nonlinear programming formulation (NLP) using the direct multiple shooting method, where the control maneuverability velocities μ ref ( l | t ) and the system states x ( l | t ) are the decision variables of the optimization problem. A multiple shooting technique is more computationally efficient when it is compared with other discretization formulation, e.g., single shooting, more information in [58]. The system model was considered as the optimization constrain defined by (45b), the system and control constraints formulated in (45c) and (45d), respectively. With these considerations, this work minimizes the nonlinear programming problem using CasADI as a nonlinear optimization framework [59].

3. Results and Discussions

This section presents the simulations and experimental results to validate the proposed controller for the hexacopter platform DJI MATRICE 600 PRO. The experiments were performed considering: (i) Real-world experiment: the results presented in this section were developed using the nonlinear model predictive controller and environment obstacles are not considered in this experiments due to the hexacopter platform not having the required sensor for real-world measurements. (ii) Simulation experiment: simulation experiments show the effectiveness of the proposed controller in highly dynamic simulation environments with simulations of the dynamic behavior of the hexacopter in order to make it more realistic and prove the scalability of the controller.

3.1. Real-World Experiments

Several experiments on trajectory tracing were performed in order to demonstrate the performance of the proposed controller. In order to demonstrate the effectiveness of the optimization structure, the controller was implemented at onboard computer of the hexacopter through the software Matlab, additionally the hexacopter platform is shown in Figure 9 with the following hardware features Intel processor i7-7700HQ and CPU 2.80 GHz × 8. The controller was developed considering the optimal control problem (45a), the evolution of the identified model was developed using the fourth-order Runge–Kutta method, with a sample time of t s = 0.1 [ s ] and the final time of the experiment is defined as t f = 100 [ s ] .
The experiment was performed in the city of Ambato, in the province of Tungurahua, Ecuador, and started at 09:36 on 12 January 2022. The wind velocity at the time of the experiment was approximately 10.1 km/h, as shown in Figure 10.
The desired reference trajectory for the hexacopter and the initial conditions are defined in Table 4, where ( η x o , η y o , η z o , η ψ o ) and ( μ l o , μ m o , μ n o , ω o ) are the initial position and maneuverability velocities of the hexacopter, respectively.
To implement the proposed controller, the constant values of positive definite matrices are defined in Table 5, and were obtained through a variety of experiments in order to improve the performance of the controller scheme.
The results of the experiment are illustrated in Figure 11, Figure 12, Figure 13 and Figure 14. Figure 11 shows the movement of the hexacopter platform based on real information over the experiment. The hexacopter tracks the desired reference trajectory; however, the results present a small control error in the trajectory due to the wind velocity that acts as an external disturbance. The reference trajectory is defined as η ref = η x r e f η y r e f η z r e f η ψ r e f and the hexacopter system states during the experiment were confirmed by η .
The previously presented results show the performance of the controller that guarantees the execution of the reference trajectory over different axes.
The control signals represented in Figure 12 are generated by the proposed control scheme, the external disturbances produce a miss match in the model but the controller generates the adequate smooth control actions.
Figure 13 shows the control errors of the proposed controller, where η ˜ x , η ˜ y , η ˜ z and η ˜ ψ are the results from the steady state error that asymptotically converge to values close to zero, i.e., since these position errors are bounded and different from zero η ref ( t ) W t x ( t ) = 0 R 3 , it is achieved that the errors in the steady state are | η ˜ | < 0.15 [ m ] . In addition, the control error maintains a dependency on the external disturbances in the outdoor environments, and external disturbances are the product of the wind velocity which was approximately 10 km/h.
The time required to solve the optimal control problem is shown in Figure 14, and the computation time stays always below the sample time t s = 0.1 [ s ] , guaranteeing the efficient computation of the proposed control considering the time horizon of T = 2 [ s ] in the optimal control problem.

3.2. Simulation Experiments

This section presents the simulation result of the proposed controller. In order to improve the results, this experiment was performed using the identified dynamics in Equation (36) with the identified parameters presented in Table 2 and Table 3. Furthermore, a Gaussian noise with the following consideration in all the states η n N ( 0.05 , 0.05 ) and μ n N ( 0.01 , 0.01 ) , where η n and μ n are the additive noise in position and velocity states, was identified.
The desired reference trajectories and initial values over the frame < I > are defined in Table 6.
The desired values of the reference trajectory are the same as the proposed in real-world experiments; therefore, the results present similar behavior. The controller constant values are the same as those presented in Table 5. However, the safe region distance was defined as r o b s = 0.4 [ m ] .
The trajectory described by the hexacopter platform and the reference trajectory are presented in Figure 15. The results show that the hexacopter tracks the desired reference trajectory, in addition to the avoidance obstacles property being demonstrated due to the system following the reference and trying to maintain the distance to obstacles considering the safety radius r o b s . The three obstacles were positioned over the reference trajectory, two of which were positioned at the corners are dynamic obstacles and they have movements during the experiment.
The values of the control errors presented in Figure 16 tend to increase when the hexacopter avoids the obstacles satisfying the system constraints, a phenomenon which is represented in the rectangles representing obstacles close to the hexarotor. Given that the errors in steady state η ˜ x , η ˜ y , η ˜ z and η ˜ ψ symptomatically converge towards zero in the presence of the Gaussian noise applied in the simulation, the results show the robustness under this type of disturbance and the ability to keep the system under the reference trajectory, i.e., the position errors are bounded and are different from zero η ref ( t ) W t x ( t ) = 0 , achieving a final characteristic error with a max | η ˜ | < 0.9 [ m ] when the obstacles are close to the hexarotor and | η ˜ | < 0.1 [ m ] without obstacles near the system reference trajectory.
The control signals are presented in Figure 17, which are generated by the proposed control scheme. Taking into consideration the dynamics of the robotic system and the simulated environmental conditions, the behavior of the reference velocities are close to the dynamic model values. Furthermore, the values are presented as smooth curves with the presence of peaks when the obstacles are close to the hexacopter which are emphasized by the rectangles shown in Figure 17. The behavior of the control actions prevents collisions between the hexacopter and the obstacles during the simulation.
The time required to solve the proposed controller and the Euclidean distance are presented in Figure 18, and the computational time is an important factor to demonstrate its ability to generate an adequate control policy that guarantees the system constraints. The computational time presents peaks produced by the obstacles that are close to the hexacopter during the trajectory whilst the controller finds a sub-optimal solution to guarantee that the computational time remains under the sample time; however, this problem can be efficiently solved using another low-level language to implement the proposed controller or with a more powerful computer, which is therefore a solvable technological issue. On the other hand, the distance to each obstacle shows that the proposed controller respects the safely radius, guaranteeing the avoidance property of the system.

3.3. Discussion

The experiments presented in the last section show that the nonlinear model predictive scheme solves the control problem associated with the trajectory tracking subject to the system and environment constraints. Specifically, the real-world experiments showed the robustness of the proposed controller due to the excessive wind velocity during the experiment which acted as an external disturbance. Despite the excessive wind velocity, the controller generates the adequate smooth control actions guaranteeing that the steady state error that converges towards values close to zero with the dependency of the external disturbances. The use of CasADI such as an optimization framework guarantees the fact that the computational time always stays below the sample time, which is one of main problems in NMPC schemes due to the highly computational time that these solutions required, as similar computing times were presented in [45].
On the other hand, the simulation results show the ability of the proposed scheme to generates the adequate control signals guaranteeing the corrected tracking trajectories while the system avoids obstacles during the simulation. The presence of Gaussian noise provides uncertainty in the measurements demonstrating the power of the controller as it maintains the distance to obstacles in consideration of the safety radius. One of the main differences presented in this experiment was the control error, which tends to increase when the hexacopter avoids obstacles satisfying the system constraints. Furthermore, the computational time presents peaks produced by the hard constraints included in the optimization problem, and despite the hard constraint, the controller finds a sub-optimal solution to guarantee a low computational time. Other works have used the concept of soft constraints, low-level programming language and embeddable optimization methods such as (SQP) in order to increase the convergence of the optimization algorithm and reduce the computational time [60,61,62,63,64]. This work uses the concept of soft constraints and the approximation of the nonlinear problem in order to improve the computational time and the future implementation on a single on-board PC.

4. Conclusions

This work carried out the identification of a dynamic system using the dynamic mode decomposition with control technique to develop the optimal control problem for trajectory tracking with obstacle avoidance, a decision which was made due to the precision of the comparative results between the Euler–Lagrange and the dynamic mode decomposition formulations. The optimal control problem was translated into a nonlinear programming problem (NLP) using the multiple shooting technique and considering the control actions and systems states as decision variables, which is a technique that improves the computational time and the convergence of the algorithm. The nonlinear model predictive control (NMPC) generates the maneuverability velocities policy that allows the hexacopter platform to track the reference trajectory while avoiding obstacles presented in the environment. The NMPC formulation was developed in consideration of the reference desired trajectory and constraints in the system such as the bounded control actions, the generalized dynamics and static and dynamic obstacles. Furthermore, the NMPC problem was solved through the nonlinear programming framework CasADI, which solves high-dimensional optimization problems and has advantages that can be expanded to a low-level programming language to improve the computational time.
The simulation results show how the hexacopter avoids both static and dynamic obstacles whose locations vary over time while executing the trajectory tracking task, and always maintaining a safe distance defined as a radius of repulsion. Since there is no sensor for obstacle measurements in the hexacopter platform, the real experimental tests were not carried out with obstacle avoidance; however it was verified that although the experimental tests were carried out during the period of time in which the average wind speed was approximately 10 km/h, the behavior of the control law on the hexacopter system fulfills the desired task, so that the control errors in stable state converge closer to zero. In addition, it can be observed that the steady state error asymptotically converges towards values closer to zero under conditions wherein the control actions are saturate when they reach the established restrictions. On the other hand, the computational time of the proposed control algorithm is maintained under 100 ms in real experimentation due to the optimization technique used to solve the control problem. During the simulation tests, it is clearly verified that the computational time remains under 100 ms; however, when obstacle avoidance occurs, this time increases but remains under the specified sample time with a sup-optimal solution. Other works use the concept of soft constraints to guarantee the rapid convergence of the optimization algorithm, as this work will use the same concept to improve the computational time and the possible expansion to visual-servoing systems under an MPC structure.

Author Contributions

Conceptualization, L.F.R., V.H.A. and B.S.G.; methodology, L.F.R., C.P.C. and V.H.A.; software, L.F.R., C.P.C. and B.S.G.; validation, L.F.R., C.P.C. and B.S.G.; formal analysis, L.F.R., V.H.A. and D.C.G.; investigation, L.F.R.; resources, L.F.R., V.H.A. and J.V.-A.; data preparation, C.P.C. and D.C.G.; writing—original draft preparation, L.F.R., B.S.G. and C.P.C.; writing—review and editing, J.V.-A., V.H.A. and D.C.G.; visualization, L.F.R. and B.S.G.; supervision, V.H.A., D.C.G. and J.V.-A.; project administration, V.H.A., C.P.C. and J.V.-A. All authors have read and agreed to the published version of the manuscript.

Funding

The APC was funded by Universidad Tecnológica Indoámerica (Ecuador).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

If anyone wants to obtain the original data of this paper, please contact with Luis F. Recalde.

Acknowledgments

The authors would like to thank the Universidad de las Fuerzas Armadas ESPE; Universidad Tecnológica Indoamérica; SISAu Research Group, and the Research Group ARSI, for the support and development of this work. The results of this work are part of the research project Advanced Control of Unmanned Aerial Vehicles developed by Universidad de las Fuerzas Armadas ESPE, and of the project “Control Cooperativo de Robots con Óptimo Consumo de Recursos” developed by Universidad Tecnológica Indoamérica.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

The dynamic parameters developed during the system identification of the hexarotor aerial platform are as follows:
μ l r e f μ m r e f μ n r e f ω r e f = K d l + m K p l 0 0 2 b m K p l 0 K d m + m K p m 0 2 a m K p m 0 0 K d n + m K p n 0 b m K p w a m K p w 0 2 m ( a + b ) + I + K d w K p w μ ˙ l μ ˙ m μ ˙ n ω ˙ + 1 m ω K p l 0 2 a m ω K p l m ω K p m 1 0 2 b m K p m 0 0 1 0 a m ω K p w b m ω K p w 0 1 μ l μ m μ n ω
ζ 1 = K d l + m K p l , ζ 2 = 2 b m K p l , ζ 3 = K d m + m K p m , ζ 4 = 2 a m K p m , ζ 5 = K d n + m K p n , ζ 6 = b m K p w , ζ 7 = a m K p w , ζ 8 = 2 m ( a + b ) K p w , ζ 9 = I + K d w K p w , ζ 10 = 1 , ζ 11 = m ω K p l , ζ 12 = 2 a m ω K p l , ζ 13 = m ω K p m , ζ 14 = 1 , ζ 15 = 2 b m K p m , ζ 16 = 1 , ζ 17 = a m ω K p w , ζ 18 = b m ω K p w , ζ 19 = 1 ,

References

  1. Recker, T.; Heilemann, F.; Raatz, A. Handling of large and heavy objects using a single mobile manipulator in combination with a roller board. Procedia CIRP 2021, 97, 21–26. [Google Scholar] [CrossRef]
  2. Ortiz, J.S.; Molina, M.F.; Andaluz, V.H.; Varela, J.; Morales, V. Coordinated Control of a Omnidirectional Double Mobile Manipulator. Lect. Notes Electr. Eng. 2018, 449, 278–286. [Google Scholar] [CrossRef]
  3. Ortiz, J.S.; Palacios-navarro, G.; Andaluz, V.H.; Recalde, L.F. Three-Dimensional Unified Motion Control of a Robotic Standing Wheelchair for Rehabilitation Purposes. Sensors 2021, 21, 3057. [Google Scholar] [CrossRef] [PubMed]
  4. Arnold, R.D.; Yamaguchi, H.; Tanaka, T. Search and rescue with autonomous flying robots through behavior-based cooperative intelligence. J. Int. Humanit. Action 2018, 3, 1–18. [Google Scholar] [CrossRef] [Green Version]
  5. Jiménez-Moreno, R.; Pinzón-Arenas, J.O.; Pachón-Suescún, C.G. Assistant robot through deep learning. Int. J. Electr. Comput. Eng. 2020, 10, 1053–1062. [Google Scholar] [CrossRef] [Green Version]
  6. Yolcu, V.; Demirer, V. A Review on the Studies about the Use of Robotic Technologies in Education. SDU Int. J. Educ. Stud. 2017, 4, 127–139. [Google Scholar]
  7. Petersen, K.H.; Napp, N.; Stuart-Smith, R.; Rus, D.; Kovac, M. A review of collective robotic construction. Sci. Robot. 2019, 4. [Google Scholar] [CrossRef]
  8. Pan, M.; Linner, T.; Pan, W.; Cheng, H.; Bock, T. A framework of indicators for assessing construction automation and robotics in the sustainability context. J. Clean. Prod. 2018, 182, 82–95. [Google Scholar] [CrossRef] [Green Version]
  9. Chebrolu, N.; Lottes, P.; Schaefer, A.; Winterhalter, W.; Burgard, W.; Stachniss, C. Agricultural robot dataset for plant classification, localization and mapping on sugar beet fields. Int. J. Robot. Res. 2017, 36, 1045–1052. [Google Scholar] [CrossRef] [Green Version]
  10. Kuric, I.; Bulej, V.; Saga, M.; Pokorny, P. Development of simulation software for mobile robot path planning within multilayer map system based on metric and topological maps. Int. J. Adv. Robot. Syst. 2017, 14. [Google Scholar] [CrossRef] [Green Version]
  11. Shaw, I.G. Robot Wars: US Empire and geopolitics in the robotic age. Secur. Dialogue 2017, 48, 451–470. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  12. Mellinger, D.; Shomin, M.; Michael, N.; Kumar, V. Cooperative Grasping and Transport Using Multiple Quadrotors. Springer Tracts Adv. Robot. 2013, 83, 545–558. [Google Scholar] [CrossRef]
  13. Bircher, A.; Kamel, M.; Alexis, K.; Burri, M.; Oettershagen, P.; Omari, S.; Mantel, T.; Siegwart, R. Three-dimensional coverage path planning via viewpoint resampling and tour optimization for aerial robots. Auton. Robot. 2015, 40, 1059–1078. [Google Scholar] [CrossRef]
  14. Bircher, A.; Kamel, M.; Alexis, K.; Oleynikova, H.; Siegwart, R. Receding horizon next-best-view planner for 3D exploration. In Proceedings of the IEEE International Conference on Robotics and Automation, Stockholm, Sweden, 16–21 May 2016; pp. 1462–1468. [Google Scholar] [CrossRef]
  15. Garimella, G.; Kobilarov, M. Towards model-predictive control for aerial pick-and-place. In Proceedings of the IEEE International Conference on Robotics and Automation, Seattle, WA, USA, 26–30 May 2015; pp. 4692–4697. [Google Scholar] [CrossRef]
  16. Song, Y.; Hsu, L.T. Tightly coupled integrated navigation system via factor graph for UAV indoor localization. Aerosp. Sci. Technol. 2021, 108, 106370. [Google Scholar] [CrossRef]
  17. Paredes, J.A.; Álvarez, F.J.; Aguilera, T.; Villadangos, J.M. 3D Indoor Positioning of UAVs with Spread Spectrum Ultrasound and Time-of-Flight Cameras. Sensors 2017, 18, 89. [Google Scholar] [CrossRef] [Green Version]
  18. Sandino, J.; Vanegas, F.; Maire, F.; Caccetta, P.; Sanderson, C.; Gonzalez, F. UAV Framework for Autonomous Onboard Navigation and People/Object Detection in Cluttered Indoor Environments. Remote Sens. 2020, 12, 3386. [Google Scholar] [CrossRef]
  19. Radoglou–Grammatikis, P.; Sarigiannidis, P.; Lagkas, T.; Moscholios, I. A compilation of UAV applications for precision agriculture. Comput. Netw. 2020, 172, 107148. [Google Scholar] [CrossRef]
  20. Gupta, A.; Afrin, T.; Scully, E.; Yodo, N. Advances of UAVs toward Future Transportation: The State-of-the-Art, Challenges, and Opportunities. Future Transp. 2021, 1, 326–350. [Google Scholar] [CrossRef]
  21. Chen, Y.; Zhang, G.; Zhuang, Y.; Hu, H. Autonomous Flight Control for Multi-Rotor UAVs Flying at Low Altitude. IEEE Access 2019, 7, 42614–42625. [Google Scholar] [CrossRef]
  22. Vu, N.A.; Dang, D.K.; Le Dinh, T. Electric propulsion system sizing methodology for an agriculture multicopter. Aerosp. Sci. Technol. 2019, 90, 314–326. [Google Scholar] [CrossRef]
  23. Belmonte, N.; Staulo, S.; Fiorot, S.; Luetto, C.; Rizzi, P.; Baricco, M. Fuel cell powered octocopter for inspection of mobile cranes: Design, cost analysis and environmental impacts. Appl. Energy 2018, 215, 556–565. [Google Scholar] [CrossRef]
  24. Nguyen, N.P.; Kim, W.; Moon, J. Super-twisting observer-based sliding mode control with fuzzy variable gains and its applications to fully-actuated hexarotors. J. Frankl. Inst. 2019, 356, 4270–4303. [Google Scholar] [CrossRef]
  25. Ali, R.; Peng, Y.; Iqbal, M.T.; Ul Amin, R.; Zahid, O.; Khan, O.I. Adaptive backstepping sliding mode control of coaxial octorotor unmanned aerial vehicle. IEEE Access 2019, 7, 27526–27534. [Google Scholar] [CrossRef]
  26. Alaimo, A.; Artale, V.; Milazzo, C.L.R.; Ricciardello, A. PID Controller Applied to Hexacopter Flight. J. Intell. Robot. Syst. 2013, 73, 261–270. [Google Scholar] [CrossRef]
  27. Dayana Salim, N.; Derawi, D.; Abdullah, S.S.; Mazlan, S.A.; Zamzuri, H. PID plus LQR attitude control for hexarotor MAV in indoor environments. In Proceedings of the IEEE International Conference on Industrial Technology, Busan, Korea, 26 February–1 March 2014; pp. 85–90. [Google Scholar] [CrossRef]
  28. Chen, F.; Lei, W.; Zhang, K.; Tao, G.; Jiang, B. A novel nonlinear resilient control for a quadrotor UAV via backstepping control and nonlinear disturbance observer. Nonlinear Dyn. 2016, 2, 1281–1295. [Google Scholar] [CrossRef]
  29. Wang, Q.; Zhang, H.; Han, J. Research on Trajectory Planning and Tracking of Hexa-copter. MATEC Web Conf. 2018, 173, 02008. [Google Scholar] [CrossRef] [Green Version]
  30. Lee, T.; Leok, M.; McClamroch, N.H. Geometric tracking control of a quadrotor UAV on SE(3). In Proceedings of the IEEE Conference on Decision and Control, Atlanta, GA, USA, 15–17 December 2010; pp. 5420–5425. [Google Scholar] [CrossRef] [Green Version]
  31. Mellinger, D.; Kumar, V. Minimum snap trajectory generation and control for quadrotors. In Proceedings of the IEEE International Conference on Robotics and Automation, Shanghai, China, 9–13 May 2011; pp. 2520–2525. [Google Scholar] [CrossRef]
  32. Tal, E.; Karaman, S. Accurate Tracking of Aggressive Quadrotor Trajectories Using Incremental Nonlinear Dynamic Inversion and Differential Flatness. IEEE Trans. Control Syst. Technol. 2021, 29, 1203–1218. [Google Scholar] [CrossRef]
  33. Faessler, M.; Franchi, A.; Scaramuzza, D. Differential Flatness of Quadrotor Dynamics Subject to Rotor Drag for Accurate Tracking of High-Speed Trajectories. IEEE Robot. Autom. Lett. 2018, 3, 620–626. [Google Scholar] [CrossRef] [Green Version]
  34. Santoso, F.; Garratt, M.A.; Anavatti, S.G. A self-learning TS-fuzzy system based on the C-means clustering technique for controlling the altitude of a hexacopter unmanned aerial vehicle. In Proceedings of the 2017 International Conference on Advanced Mechatronics, Intelligent Manufacture, and Industrial Automation (ICAMIMIA), Surabaya, Indonesia, 12–14 October 2017; pp. 46–51. [Google Scholar] [CrossRef]
  35. Dierks, T.; Jagannathan, S. Output feedback control of a quadrotor UAV using neural networks. IEEE Trans. Neural Netw. 2010, 21, 50–66. [Google Scholar] [CrossRef]
  36. Ferdaus, M.M.; Pratama, M.; Anavatti, S.G.; Garratt, M. A Generic Self-Evolving Neuro-Fuzzy Controller Based High-Performance Hexacopter Altitude Control System. In Proceedings of the SMC 2018: 2018 IEEE International Conference on Systems, Man, and Cybernetics, Miyazaki, Japan, 7–10 October 2018; pp. 2784–2791. [Google Scholar] [CrossRef] [Green Version]
  37. ul Amin, R.; Aijun, L.; Khan, M.U.; Shamshirband, S.; Kamsin, A.; ul Amin, R.; Aijun, L.; Khan, M.U.; Shamshirband, S.; Kamsin, A. An adaptive trajectory tracking control of four rotor hover vehicle using extended normalized radial basis function network. MSSP 2017, 83, 53–74. [Google Scholar] [CrossRef]
  38. Nieuwenhuisen, M.; Droeschel, D.; Schneider, J.; Holz, D.; Labe, T.; Behnke, S. Multimodal obstacle detection and collision avoidance for micro aerial vehicles. In Proceedings of the ECMR 2013: 2013 European Conference on Mobile Robots, Barcelona, Spain, 25–27 September 2013; pp. 7–12. [Google Scholar] [CrossRef]
  39. Rezaee, H.; Abdollahi, F. Adaptive artificial potential field approach for obstacle avoidance of unmanned aircrafts. In Proceedings of the IEEE/ASME International Conference on Advanced Intelligent Mechatronics, Kaohsiung, Taiwan, 11–14 July 2012. [Google Scholar] [CrossRef]
  40. Achtelik, M.W.; Weiss, S.; Chli, M.; Siegwart, R. Path planning for motion dependent state estimation on micro aerial vehicles. In Proceedings of the IEEE International Conference on Robotics and Automation, Karlsruhe, Germany, 6–10 May 2013; pp. 3926–3932. [Google Scholar] [CrossRef] [Green Version]
  41. He, R.; Prentice, S.; Roy, N. Planning in information space for a quadrotor helicopter in a GPS-denied environment. In Proceedings of the IEEE International Conference on Robotics and Automation, Pasadena, CA, USA, 19–23 May 2008; pp. 1814–1820. [Google Scholar] [CrossRef] [Green Version]
  42. Sani, M.; Robu, B.; Hably, A. Pursuit-evasion game for nonholonomic mobile robots with obstacle avoidance using NMPC. In Proceedings of the MED 2020: 2020 28th Mediterranean Conference on Control and Automation, Saint-Raphaël, France, 15–18 September 2020; pp. 978–983. [Google Scholar] [CrossRef]
  43. Subramanian, S.; Nazari, S.; Alvi, M.A.; Engell, S. Robust NMPC Schemes for the Control of Mobile Robots in the Presence of Dynamic Obstacles. In Proceedings of the MMAR 2018: 2018 23rd International Conference on Methods and Models in Automation and Robotics, Miedzyzdroje, Poland, 27–30 August 2018; pp. 768–773. [Google Scholar] [CrossRef]
  44. Ribeiro, T.T.; Fernandez, R.O.; Conceicao, A.G. NMPC-based Visual Leader-Follower Formation Control for Wheeled Mobile Robots. In Proceedings of the IEEE 16th International Conference on Industrial Informatics, INDIN 2018, Porto, Portugal, 18–20 July 2018; pp. 406–411. [Google Scholar] [CrossRef]
  45. Osman, M.; Mehrez, M.W.; Yang, S.; Jeon, S.; Melek, W. End-Effector Stabilization of a 10-DOF Mobile Manipulator using Nonlinear Model Predictive Control. IFAC-PapersOnLine 2020, 53, 9772–9777. [Google Scholar] [CrossRef]
  46. Neunert, M.; De Crousaz, C.; Furrer, F.; Kamel, M.; Farshidian, F.; Siegwart, R.; Buchli, J. Fast nonlinear Model Predictive Control for unified trajectory optimization and tracking. In Proceedings of the IEEE International Conference on Robotics and Automation, Stockholm, Sweden, 16–21 May 2016; pp. 1398–1404. [Google Scholar] [CrossRef]
  47. Aoki, Y.; Asano, Y.; Honda, A.; Motooka, N.; Ohtsuka, T. Nonlinear Model Predictive Control of Position and Attitude in a Hexacopter with Three Failed Rotors. IFAC-PapersOnLine 2018, 51, 228–233. [Google Scholar] [CrossRef]
  48. Tzoumanikas, D.; Graule, F.; Yan, Q.; Shah, D.; Popovic, M.; Leutenegger, S. Aerial Manipulation Using Hybrid Force and Position NMPC Applied to Aerial Writing. arXiv 2020, arXiv:2006.02116. [Google Scholar]
  49. Bicego, D.; Mazzetto, J.; Carli, R.; Farina, M.; Franchi, A. Nonlinear Model Predictive Control with Enhanced Actuator Model for Multi-Rotor Aerial Vehicles with Generic Designs. J. Intell. Robot. Syst. Theory Appl. 2020, 100, 1213–1247. [Google Scholar] [CrossRef]
  50. Foehn, P.; Romero, A.; Scaramuzza, D. Time-Optimal Planning for Quadrotor Waypoint Flight. Sci. Robot. 2021, 6. [Google Scholar] [CrossRef]
  51. Torrente, G.; Kaufmann, E.; Fohn, P.; Scaramuzza, D. Data-Driven MPC for Quadrotors. IEEE Robot. Autom. Lett. 2021, 6, 3769–3776. [Google Scholar] [CrossRef]
  52. Small, E.; Sopasakis, P.; Fresk, E.; Patrinos, P.; Nikolakopoulos, G. Aerial navigation in obstructed environments with embedded nonlinear model predictive control. In Proceedings of the 2019 18th European Control Conference, ECC 2019, Naples, Italy, 25–28 June 2019; pp. 3556–3563. [Google Scholar] [CrossRef] [Green Version]
  53. Nguyen, H.; Kamel, M.; Alexis, K.; Siegwart, R. Model Predictive Control for Micro Aerial Vehicles: A Survey. In Proceedings of the 2021 European Control Conference (ECC), Delft, The Netherlands, 29 June–2 July 2021; pp. 1556–1563. [Google Scholar] [CrossRef]
  54. Quan, Q. Introduction to Multicopter Design and Control; Springer: Berlin/Heidelberg, Germany, 2017; pp. 1–384. [Google Scholar] [CrossRef]
  55. Zhang, H.; Rowley, C.W.; Deem, E.A.; Cattafesta, L.N. Online dynamic mode decomposition for time-varying systems. SIAM J. Appl. Dyn. Syst. 2017, 18, 1586–1609. [Google Scholar] [CrossRef]
  56. Schmid, P.J. Dynamic mode decomposition of numerical and experimental data. J. Fluid Mech. 2010, 656, 5–28. [Google Scholar] [CrossRef] [Green Version]
  57. Proctor, J.L.; Brunton, S.L.; Kutz, J.N. Dynamic Mode Decomposition with Control. SIAM J. Appl. Dyn. Syst. 2016, 15, 142–161. [Google Scholar] [CrossRef] [Green Version]
  58. Albersmeyer, J.; Diehl, M. The Lifted Newton Method and Its Application in Optimization. SIAM J. Optim. 2010, 20, 1655–1684. [Google Scholar] [CrossRef] [Green Version]
  59. Andersson, J.A.; Gillis, J.; Horn, G.; Rawlings, J.B.; Diehl, M. CasADi: A software framework for nonlinear optimization and optimal control. Math. Program. Comput. 2018, 11, 1–36. [Google Scholar] [CrossRef]
  60. Farshidian, F.; Kamgarpour, M.; Pardo, D.; Buchli, J. Sequential Linear Quadratic Optimal Control for Nonlinear Switched Systems. IFAC-PapersOnLine 2016, 50, 1463–1469. [Google Scholar] [CrossRef]
  61. Farshidian, F.; Neunert, M.; Winkler, A.W.; Rey, G.; Buchli, J. An Efficient Optimal Planning and Control Framework For Quadrupedal Locomotion. In Proceedings of the IEEE International Conference on Robotics and Automation, Singapore, 29 May–3 June 2017; pp. 93–100. [Google Scholar] [CrossRef] [Green Version]
  62. Giftthaler, M.; Farshidian, F.; Sandy, T.; Stadelmann, L.; Buchli, J. Efficient Kinematic Planning for Mobile Manipulators with Non-holonomic Constraints Using Optimal Control. In Proceedings of the IEEE International Conference on Robotics and Automation, Singapore, 29 May–3 June 2017; pp. 3411–3417. [Google Scholar] [CrossRef] [Green Version]
  63. Verschueren, R.; Frison, G.; Kouzoupis, D.; Frey, J.; Duijkeren, N.V.; Zanelli, A.; Novoselnik, B.; Albin, T.; Quirynen, R.; Diehl, M. acados: A modular open-source framework for fast embedded optimal control. Math. Program. Comput. 2019, 14, 147–183. [Google Scholar] [CrossRef]
  64. Gaertner, M.; Bjelonic, M.; Farshidian, F.; Hutter, M. Collision-Free MPC for Legged Robots in Static and Dynamic Scenes. In Proceedings of the IEEE International Conference on Robotics and Automation, Xi’an, China, 30 May–5 June 2021; pp. 8266–8272. [Google Scholar] [CrossRef]
Figure 1. Hexacopter platform representation.
Figure 1. Hexacopter platform representation.
Sensors 22 04712 g001
Figure 2. Signals of the identification process using the Euler-Lagrange formulation with the optimization techniques (SQPs). The results are confirmed by: (a) identification of the reference velocity μ l r e f ; (b) shows the results over the reference velocity μ m r e f ; (c) identification over the upper longitudinal velocity μ n r e f ; and (d) shows the results of the reference angular velocity ω r e f .
Figure 2. Signals of the identification process using the Euler-Lagrange formulation with the optimization techniques (SQPs). The results are confirmed by: (a) identification of the reference velocity μ l r e f ; (b) shows the results over the reference velocity μ m r e f ; (c) identification over the upper longitudinal velocity μ n r e f ; and (d) shows the results of the reference angular velocity ω r e f .
Sensors 22 04712 g002
Figure 3. Validation process signals using the Euler–Lagrange formulation with the optimization technique (SQP). The results are confirmed by: (a) validation over the reference velocity μ l r e f ; (b) shows the results over the reference velocity μ m r e f ; (c) shows the validation over the longitudinal velocity μ n r e f ; and (d) shows the validation results of the reference angular velocity ω r e f .
Figure 3. Validation process signals using the Euler–Lagrange formulation with the optimization technique (SQP). The results are confirmed by: (a) validation over the reference velocity μ l r e f ; (b) shows the results over the reference velocity μ m r e f ; (c) shows the validation over the longitudinal velocity μ n r e f ; and (d) shows the validation results of the reference angular velocity ω r e f .
Sensors 22 04712 g003
Figure 4. Identification process using dynamic mode decomposition formulation (DMD): (a) results over μ l r e f ; (b) identification on μ m r e f ; (c) validation over μ n r e f ; and (d) shows the results on ω r e f .
Figure 4. Identification process using dynamic mode decomposition formulation (DMD): (a) results over μ l r e f ; (b) identification on μ m r e f ; (c) validation over μ n r e f ; and (d) shows the results on ω r e f .
Sensors 22 04712 g004
Figure 5. Validation process using dynamic mode decomposition (DMD). The results are: (a) validation over the reference velocity μ l r e f ; (b) shows the results through velocity μ m r e f ; (c) validation over the longitudinal velocity μ n r e f ; and (d) shows the validation results of the reference angular velocity ω r e f .
Figure 5. Validation process using dynamic mode decomposition (DMD). The results are: (a) validation over the reference velocity μ l r e f ; (b) shows the results through velocity μ m r e f ; (c) validation over the longitudinal velocity μ n r e f ; and (d) shows the validation results of the reference angular velocity ω r e f .
Sensors 22 04712 g005
Figure 6. Integral square error of the identified models using Euler–Lagrange with sequential quadratic programming (SQP) and dynamic mode decomposition (DMD) formulation.
Figure 6. Integral square error of the identified models using Euler–Lagrange with sequential quadratic programming (SQP) and dynamic mode decomposition (DMD) formulation.
Sensors 22 04712 g006
Figure 7. Proposed controller scheme.
Figure 7. Proposed controller scheme.
Sensors 22 04712 g007
Figure 8. Representation of the hexacopter and obstacles.
Figure 8. Representation of the hexacopter and obstacles.
Sensors 22 04712 g008
Figure 9. Hexacopter platform used in a real-world experiment.
Figure 9. Hexacopter platform used in a real-world experiment.
Sensors 22 04712 g009
Figure 10. Wind velocity during experiment.
Figure 10. Wind velocity during experiment.
Sensors 22 04712 g010
Figure 11. Movements of the hexacopter based on the real-world experimentation: (a) represents the behavior of the hexacopter platform using the 3D isometric perspective I x , I y , I z ; and (b) shows the upper view I x , I y of the experimental information.
Figure 11. Movements of the hexacopter based on the real-world experimentation: (a) represents the behavior of the hexacopter platform using the 3D isometric perspective I x , I y , I z ; and (b) shows the upper view I x , I y of the experimental information.
Sensors 22 04712 g011
Figure 12. Control signals generated by the proposed control during the real-world experiment, where (a) represents the control velocity over the axis I x ; (b) describes the evolution of velocity in I y ; finally (c) and (d) represent the evolution of the upper and angular control velocity, respectively.
Figure 12. Control signals generated by the proposed control during the real-world experiment, where (a) represents the control velocity over the axis I x ; (b) describes the evolution of velocity in I y ; finally (c) and (d) represent the evolution of the upper and angular control velocity, respectively.
Sensors 22 04712 g012
Figure 13. Control errors during a real outdoor experiment: (a) represents the error in the work-space I x , I y , I z ; and (b) shows the results with respect to the desired angular position.
Figure 13. Control errors during a real outdoor experiment: (a) represents the error in the work-space I x , I y , I z ; and (b) shows the results with respect to the desired angular position.
Sensors 22 04712 g013
Figure 14. Computational time during the real-world experimental results.
Figure 14. Computational time during the real-world experimental results.
Sensors 22 04712 g014
Figure 15. Movements of the hexacopter during the simulation experimentation: (a) represents the behavior of the hexacopter platform using the 3D isometric perspective I x , I y , I z ; and (b) shows the upper view of the experimental information; furthermore, the black spheres represent the static and dynamic obstacles. The velocity of the dynamic obstacles was approximately 0.2 cos ( 0.1 t ) [ m / s ] over I x for the first obstacle and approximately 0.6 cos ( 0.2 t ) [ m / s ] over I y for the third obstacle. The second obstacle was considered static and the position is static during the experiment.
Figure 15. Movements of the hexacopter during the simulation experimentation: (a) represents the behavior of the hexacopter platform using the 3D isometric perspective I x , I y , I z ; and (b) shows the upper view of the experimental information; furthermore, the black spheres represent the static and dynamic obstacles. The velocity of the dynamic obstacles was approximately 0.2 cos ( 0.1 t ) [ m / s ] over I x for the first obstacle and approximately 0.6 cos ( 0.2 t ) [ m / s ] over I y for the third obstacle. The second obstacle was considered static and the position is static during the experiment.
Sensors 22 04712 g015
Figure 16. Control errors during the simulated experiment: (a) represents the error in the work-space; and (b) shows the error with respect to angular displacements.
Figure 16. Control errors during the simulated experiment: (a) represents the error in the work-space; and (b) shows the error with respect to angular displacements.
Sensors 22 04712 g016
Figure 17. Control signals generated by the proposed control and maneuverability velocities were generated by the dynamic approximation, where (a) represents the maneuverability velocities over the axis I x ; (b) describes the evolution of velocities in I y ; finally, (c) and (d) represent the evolution of the upper and angular velocity, respectively.
Figure 17. Control signals generated by the proposed control and maneuverability velocities were generated by the dynamic approximation, where (a) represents the maneuverability velocities over the axis I x ; (b) describes the evolution of velocities in I y ; finally, (c) and (d) represent the evolution of the upper and angular velocity, respectively.
Sensors 22 04712 g017
Figure 18. Computational time and distance to obstacles: (a) represents the time to solve the optimization problem; and (b) shows the distance to the obstacles, where o b s 1 o b s 2 and o b s 3 are the respective distances and r o b s is the radius of security considering the dimensions of the hexarotor frame.
Figure 18. Computational time and distance to obstacles: (a) represents the time to solve the optimization problem; and (b) shows the distance to the obstacles, where o b s 1 o b s 2 and o b s 3 are the respective distances and r o b s is the radius of security considering the dimensions of the hexarotor frame.
Sensors 22 04712 g018
Table 1. Dynamic parameters of the hexacopter aerial platform.
Table 1. Dynamic parameters of the hexacopter aerial platform.
SystemDynamic Parameters
DJI MATRICE 600 PRO ζ 1 = 2.11 ζ 2 = 0.005 ζ 3 = 1.8
ζ 4 = 3.17 ζ 5 = 1.78 ζ 6 = 0.39
ζ 7 = 0.003 ζ 8 = 0.03 ζ 9 = 0.006
ζ 10 = 0.02 ζ 11 = 0.002 ζ 12 = 0.06
ζ 13 = 0.70 ζ 14 = 0.02 ζ 15 = 0.05
ζ 16 = 0.01 ζ 17 = 0.005 ζ 18 = 0.01
ζ 19 = 0.831
Table 2. Approximation values of unforced matrix.
Table 2. Approximation values of unforced matrix.
MatrixApproximated Values
A ¯ a 11 = 0.5827 a 12 = 0.0721 a 13 = 0.0587 a 14 = 0.0280
a 21 = 0.0214 a 22 = 0.4770 a 23 = 0.0731 a 24 = 0.1840
a 31 = 0.0152 a 32 = 0.0102 a 33 = 3.5696 a 34 = 0.0064
a 41 = 0.0377 a 42 = 0.0113 a 43 = 0.0058 a 44 = 8.2424
Table 3. Approximate values of control actuation matrix.
Table 3. Approximate values of control actuation matrix.
MatrixApproximated Values
B ¯ b 11 = 0.8048 b 12 = 0.0376 b 13 = 0.0793 b 14 = 0.1797
b 21 = 0.0634 b 22 = 0.8527 b 23 = 0.0783 b 24 = 0.3821
b 31 = 0.0202 b 32 = 0.0046 b 33 = 3.5776 b 34 = 0.0607
b 41 = 0.0251 b 42 = 0.0029 b 43 = 0.0288 b 44 = 8.1294
Table 4. Desired reference trajectory in a real-world experiment.
Table 4. Desired reference trajectory in a real-world experiment.
Initial PositionsInitial Maneuverability VelocitiesReference Trajectory
η x o = 4.18 [ m ] μ l o = 0.01 [ m / s ] η x r e f = 8 sin ( 0.1 t ) [ m ]
η y o = 1.88 [ m ] μ m o = 0.04 [ m / s ] η y r e f = 6 sin ( 0.2 t ) + 1 [ m ]
η z o = 3.97 [ m ] μ n o = 0.02 [ m / s ] η z r e f = 0.35 sin ( 0.5 t ) + 7 [ m ]
η ψ o = 1.05 [ rad ] ω o = 0.02 [ rad / s ] η ψ r e f = 0 [ rad ]
Table 5. Proposed values for the NMPC scheme in a real-world experiment.
Table 5. Proposed values for the NMPC scheme in a real-world experiment.
ParametersValuesParametersValues
Q T d i a g ( 1 ) R 4 × 4 Q t d i a g ( 1 ) R 4 × 4
Q u d i a g ( 0.005 ) R 4 × 4 T 2 [ s ]
μ ref m i n [ 1 , 1 , 1 , 1.5 ] [ m / s , rad / s ] μ ref m a x [ 1 , 1 , 1 , 1.5 ] [ m / s , rad / s ]
Δ μ ref m a x 0.05 [ m / s , rad / s ]
Table 6. Desired reference trajectory in the simulation experiment.
Table 6. Desired reference trajectory in the simulation experiment.
Initial PositionsInitial Maneuverability VelocitiesReference Trajectory
η x o = 4.18 [ m ] μ l o = 0 [ m / s ] η x r e f = 8 sin ( 0.1 t ) [ m ]
η y o = 1.88 [ m ] μ m o = 0 [ m / s ] η y r e f = 6 sin ( 0.2 t ) + 1 [ m ]
η z o = 3.97 [ m ] μ n o = 0 [ m / s ] η z r e f = 0.35 sin ( 0.5 t ) + 7 [ m ]
η ψ o = 1.05 [ rad ] ω o = 0 [ rad / s ] η ψ r e f = 0 [ rad ]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Recalde, L.F.; Guevara, B.S.; Carvajal, C.P.; Andaluz, V.H.; Varela-Aldás, J.; Gandolfo, D.C. System Identification and Nonlinear Model Predictive Control with Collision Avoidance Applied in Hexacopters UAVs. Sensors 2022, 22, 4712. https://doi.org/10.3390/s22134712

AMA Style

Recalde LF, Guevara BS, Carvajal CP, Andaluz VH, Varela-Aldás J, Gandolfo DC. System Identification and Nonlinear Model Predictive Control with Collision Avoidance Applied in Hexacopters UAVs. Sensors. 2022; 22(13):4712. https://doi.org/10.3390/s22134712

Chicago/Turabian Style

Recalde, Luis F., Bryan S. Guevara, Christian P. Carvajal, Victor H. Andaluz, José Varela-Aldás, and Daniel C. Gandolfo. 2022. "System Identification and Nonlinear Model Predictive Control with Collision Avoidance Applied in Hexacopters UAVs" Sensors 22, no. 13: 4712. https://doi.org/10.3390/s22134712

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop