#### Abstract

In this work, a novel family of exact nonlinear control laws is developed for trajectory tracking of unmanned aerial vehicles. The proposed methodology exploits the cascade structure of the dynamic equations of most of these systems. In a first step, the vehicle position in Cartesian coordinates is controlled by means of fictitious inputs corresponding to the angular coordinates, which are fixed to a combination of computed torque and proportional-derivative elements. In a second step, the angular coordinates are controlled as to drive them to the desired fictitious inputs necessary for the first part, resulting in a double-integrator 3-input cascade control scheme. The proposal is put at test in two examples: 4-rotor and 8-rotor aircrafts. Numerical simulations of both plants illustrate the effectiveness of the proposed method, while real-time results of the first one confirm its applicability.

#### 1. Introduction

Unmanned aerial vehicles (UAVs) have become a topic of interest in many works due to the fact that they are capable of operating in degraded environments which might be dangerous for humans. These vehicles are designed to fly with high agility and rapid maneuvering, even under wind gusts. For all these qualities, the UAVs have a wide variety of applications such as military [1], 3D mapping and aerial photography [2, 3], and inspection of places that are not easily accessible or are too dangerous for humans [4], among others [5, 6].

There is a great variety of UAVs that can be classified by a broad number of performance characteristics such as their structure, weight, endurance, range, speed, and so on [7]. In this work, we will focus on plants with a cascade structure that allows for a family of novel cascade nonlinear control laws to be applied, e.g., the quadrotor and the 8-rotor aircrafts. These plants consist in a structure of symmetrical links and 4 or 8 rotors at its ends, respectively. In the case of the quadrotor, given that the front and the rear motors rotate counter-clockwise while the other two rotate clockwise, gyroscopic effects and aerodynamic torques tend to cancel during flight. A similar situation is produced in the 8-rotor aircraft. Both plants include the rotation motion of three axes and the linear motion of the center of gravity along three axes. Thus, there are six motions: back/front, left/right, up/down, yaw, pitch, and roll. The quadrotor has 4 control inputs and 6 degrees of freedom; its dynamics has the characteristics of nonlinearity and strong coupling [8]. On the other hand, the 8-rotor has 6 control inputs and 6 degrees of freedom [9].

In the literature, there are many works about control laws applied to UAVs. Most of them do not require precise or complete knowledge of the dynamic equations of the plant. Indeed, one of the most basic control structures, the family of proportional-integral-derivative (PID) controllers, which requires tuning of its gains, can be applied successfully to these plants as they are capable of bringing the error signals to zero in trajectory tracking [10–12]. Other reports incorporate fuzzy logic in combination with PID controllers, thus easing the tuning of the gains and increasing the adaptability of the control law to changing plant or environment parameters; they usually have better performance than classic PID [13–16]. Dead-zone and actuator faults have also been studied in this context [17]. Recent works present solutions based on neural networks for the autonomous landing of a quadrotor both on fixed and moving targets for maritime search-and-rescue applications [18]. In [19], a neural network adaptive scheme is combined with sliding mode control, which preserves the advantages of both methods, namely, adaptability and robustness against coupled perturbations.

On the other hand, there are also control laws that require knowledge of the plant, such as linear quadratic regulator (LQR) techniques that can be found in [20], where a linearization of the plant is necessary to design the controller; nonlinear dynamic models based on quaternions for attitude and LQR control are presented in [21]; in [22], a controller design using the backstepping approach has been applied to the state-space model of a quadrotor, while in [23], the model is used in the Lagrange–Euler form; in [24], a backstepping control and nonlinear disturbance observer have been developed; the observer is constructed separately from the controller to estimate the external disturbances and compensate for the negative effects of the disturbances such as wind gusts.

Yet, another category of controllers uses partial information of the model, e.g., sliding modes in [25–27], which besides being robust and simple, produces high-frequency switching of the control signals (chattering phenomenon); integral predictive and nonlinear robust strategy [28], where the integral of the position error is considered, allowing the achievement of a null steady-state error when sustained disturbances are acting on the system; and a hybrid finite-time control approach [29] for trajectory tracking with unknown dynamics and disturbances. Furthermore, many recent works have shown different approaches for trajectory tracking of the quadrotor such as finite-time output feedback schemes [30], adaptive control [31, 32], supertwisting [33], active disturbance rejection [34], and neural networks with backstepping [35].

##### 1.1. Contribution

The contribution of this article is to provide a family of exact nonlinear cascade control schemes for UAV plants such as the quadrotor and the 8-rotor aircraft, which, due to their characteristics, have a cascade interconnection of groups of states. In contrast with other schemes in the literature, the control laws are exact, not approximate, and allow a variety of options to be easily incorporated via linear matrix inequalities (LMIs) [36], which are efficiently solved via convex optimization software [37].

##### 1.2. Organization

The remainder of this study is organized as follows: Section 2 defines the family of systems to be studied, the basics on the computed torque technique, the mathematical models of the UAVs under study, and the difficulties for implementing a computed torque-like control scheme: a problem statement is made; in Section 3, the main results concerning the family of exact nonlinear cascade controllers are presented; in Section 4, numerical simulations are provided proving the flexibility and efficiency of the control proposal; real-time results are shown in Section 5; and finally, conclusions are gathered in Section 6 along with a discussion on future work.

#### 2. Preliminaries

This section describes the mathematical structure expected for the plants under consideration, the specific dynamic models of the two UAVs that will be used for illustration of the proposal, basics on the computed torque technique, and the problem statement of this work.

##### 2.1. Cascade Plants

The plants under consideration must have one or more nested cascade structures of the following form:where and are associated with the plant states; the control inputs are and ; is a sufficiently smooth nonlinear function in a domain that contains the origin with . As it will be seen later, UAVs belong to the former class as is usually associated with Cartesian coordinates, stands for the angular coordinates, and are usually the result of a simplification of the original inputs (i.e., from the voltage/speed inputs to the minimum number of torque ones), and is clearly a nonlinear input distribution vector from the point of view of and : this point of view will be exploited later.

Most UAVs require trajectory tracking in the Cartesian coordinate space; therefore, following the analogy established between the model (1) and a UAV model, it is clear that trajectory tracking reduces to find inputs such that is asymptotically driven to a desired trajectory . Note that, despite the cascade structure, backstepping is not directly applicable as the double-integrator and strong coupling of states in the first equation, precludes the designer from following the usual path. Indeed, most UAVs do not have polynomial coupling of states, but trigonometric ones. This means that backstepping cannot be performed as normally done because the required fictitious inputs cannot be straightforwardly determined [38].

Moreover, backstepping asymptotic stability of the origin is guaranteed via the direct Lyapunov method. But trajectory tracking requires writing the dynamic equations of the tracking error system in a form suitable for Lyapunov analysis, i.e., given the tracking error , being able to writewhere, obviously, the form of might be very hard or impossible to obtain. The methodology to be presented in this study will circumvent this problem; once this is done, if a system can be put in a series of cascade connections such as the one presented above, the technique can be recursively applied.

##### 2.2. UAV Dynamic Models

Since the UAVs employed for illustration of our proposal have similar underlying physical principles, we will focus on the development of the quadrotor model. This is standard material which, nevertheless, may help the reader understanding the origin and meaning of certain terms in the model.

The configuration of the quadrotor is composed by a rigid cross frame and four rotors as shown in Figure 1. The quadrotor is an underactuated and nonlinear coupled system with six degrees of freedom; its mathematical model will be obtained using the well-known Lagrangian method. To this end, let us define as the generalized coordinates vector for the quadrotor, where is the position of the center of mass of the quadrotor relative to the frame (Figure 1), and are the Euler angles (yaw, pitch, and roll) that describe the orientation of the aircraft. The kinetic energy of both translational and rotational motions are expressed, respectively, aswhere denotes the mass of the aircraft, and is the inertia matrix for the rotational kinetic energy, with

The only force that contributes to the potential energy is the force due to gravitational acceleration, which is expressed as , where is the altitude of the quadrotor, and is the gravitational constant. Thus, the Lagrangian is given by

Considering the Euler–Lagrange equations and taking into account the vector of generalized external forces, the dynamic model of the quadrotor is defined aswhere is the vector of generalized forces. groups the forces produced by the control inputs that produce a translational movement, and is the vector of generalized moments produced by the control inputs to perform rotational movements. The small body forces are ignored due to their being much smaller compared to the forces produced by the main control inputs. Then, the forces applied to the quadrotor with respect to the reference are given bywhere , for , and , a positive constant parameter depending on the density of air, and is the angular speed of the ^{th} motor. This set of forces expressed in is transformed intowhere is the transformation matrix representing the orientation of the quadrotor from to . Furthermore, the vectors of generalized moments acting on variables are as follows:where is the moment constant of the ^{th} motor, and is the distance between the axes of the motors and the center of gravity. Since the Lagrangian (5) does not contain any cross-term combining and , the Euler–Lagrange equation (6) can be split into two subsystems, one for the translational dynamics and the other for the rotational dynamics as follows:where is the Coriolis matrix. In order to simplify the analysis, the following change of the input variables is proposed:

Here, are the new inputs ([8] for details). Then, and equation (10) are rewritten aswhere the horizontal plane coordinates are represented by , the vertical position is represented by , is the yaw angle around the axis, is the pitch angle around the axis, and is the roll angle around the axis. The system (12) has four control inputs , , , and .

##### 2.3. Computed Torque

Computed torque control is a technique used for trajectory tracking in rigid robotic manipulators consisting of open kinematic chains [39]. This sort of models is amenable to the Lagrange–Euler form:where is a vector gathering the joint variables of the kinematic chain, is the inertia matrix, is the Coriolis vector, accounts for the friction forces (whether viscous, dry, or others), is the gravity vector, and is the generalized force vector. Traditional computed torque control considers the plant as fully actuated, i.e., all entries in are available for control purposes or it has one available actuator per joint. A desired trajectory can be asymptotically tracked by if the following control law is used:where is responsible for stabilizing the tracking error system:with . Control law (14) is known as the inner-loop control feedback; it is based on exact feedback linearization [40]. Control law is known as the outer-loop control feedback; it stabilizes the error system (15), a task usually achieved by linear state feedback or PD control:where for simplicity, gains and are the diagonal constant matrices with positive entries.

Clearly, computed torque is critically dependent on the precise knowledge of the model and does not take advantage of the nonlinear structure of the plant, let alone the cascade form of UAV models.

##### 2.4. Problem Statement

For a UAV model of the form (1) to perform trajectory tracking of a Cartesian path by means of its inputs and , i.e., with , , , backstepping is not a straightforward option. Indeed, the double-integrator and the trigonometric functions in impede its application.

Moreover, computed torque cannot be applied either because, following its notation, the joint vector and the generalized force vector do not share dimensions, i.e., there is not enough number of actuators as required by the computed torque technique.

In the next section, a novel family of exact nonlinear control laws is developed for trajectory tracking of UAVs; it will exploit the cascade structure without recurring to backstepping and will be able to deal with the underactuated characteristics that the computed torque technique is unable to cope. In contrast with other proposals, no approximations are employed; all the nonlinearities are taken into account for control purposes.

Notation: in matrix expressions, 0 and stand for a zero and identity matrix, respectively, whose dimensions can be inferred from the context; and stand for positive and negative-definiteness; the symbol denotes the transpose of the expression on the left, i.e., .

#### 3. Main Results

In this section, a family of nonlinear cascade controllers for trajectory tracking of UAVs with cascade model structure is proposed. To begin with, we reproduce the general mathematical model of the UAVs under consideration:where and are associated with Cartesian and angular coordinates, respectively; the simplified control inputs are and ; is a sufficiently smooth nonlinear function in a domain that contains the origin with .

Consider a desired trajectory in Cartesian coordinates such that , where , , and are the desired trajectories in the direction of the , , and axis, respectively; let the corresponding tracking error be ; thus, taking into account (17), we have

Thanks to the cascade structure above, the following assumption can be made:

*Assumption 1. *There exists and such thatwhere and are the matrices with proportional and derivative gains, respectively, to be defined (usually diagonal with positive entries); otherwise, claim the approach fails.

Despite its complexity, note that the existence of and holding Assumption 1 is not only guaranteed for most of the UAV models but also a family of solutions. Indeed, as variables in are angle coordinates, they come into trigonometric expressions which naturally lead to multiple solutions, if any.

Once and holding Assumption 1 are found, the next problem is to drive towards , i.e., to drive the tracking error to 0 as . To this end, computed torque techniques come at the hand, i.e., from (19), we havewhere and are the matrices with proportional and derivative gains, respectively, to be defined (usually diagonal with positive entries).

The whole tracking error system, once Assumption 1 and computed torque control law (21) are employed, is given by

The main result of this work can now be stated by defining the overall tracking error signal as .

Theorem 1. *The origin of the tracking error system (22) is asymptotically stable if there exists matrices , , , , , , , and , such that the following LMIs hold:*

In that case, the gains are given by

*Proof. *The closed-loop tracking error system (22) can be rewritten as two independent ones, namely,Let us focus on the first one as the proof follows the same lines for both of them. Consider the quadratic Lyapunov function candidate , where ; its time derivative isCondition for is satisfied ifwhich pre and postmultiplying by is equivalent to the third LMI in (23), provided that , thus proving that is a valid Lyapunov function establishing asymptotic stability of .

The same analysis establishes asymptotic stability of , thus concluding the proof.

*Remark 1. *As pointed out before, for any UAV model belonging to the family of systems under consideration, there is always a variety of solutions leading to a linear tracking error system; in this sense, the technique mimics computed torque control [39]. Since some states are employed as fictitious control signals in order to drive another set of states to a desired reference, the technique mimics backstepping [38]. Nevertheless, the proposal does not belong to any of the former approaches.

*Remark 2. *Notice that, in contrast with computed torque techniques, the gains , , , and are not asked to be diagonal, which provides greater flexibility to the controller design. Moreover, these gains are determined via LMIs, which are solved in polynomial time by commercially available software. The LMI formulation has additional advantages as performance specifications such as decay rate, input/output constraints, or disturbance attenuation can be straightforwardly added [36].

#### 4. Simulation Results

In this section, two examples illustrating our proposal are presented: the first one concerns a quadrotor performing trajectory tracking; the second one is an 8-rotor UAV. In both cases, a member of a family of exact nonlinear cascade control laws for trajectory tracking is used.

*Example 1. *Consider the quadrotor system (12), reproduced for convenience with a split of the state vector corresponding to (17), where the Cartesian coordinates are governed byand angular coordinates are driven bywhere and in the notation of (17).

Focusing on the dynamic equation (28) governing the position in Cartesian coordinates, it is clear that, with the exception of , angular variables , , and can be seen as virtual inputs; their ideal values being those necessary to drive the Cartesian coordinates as desired for trajectory purposes; let us name these ideal signals as , , and , which results in (28) being rewritten as the steady-state dynamic equations:where it is supposed that the angles are already in their sought behaviour.

Since the control objective is that the system tracks a reference in Cartesian coordinates, the error signals are defined as , , and , where , , and are the desired trajectories in , , and coordinates, respectively. Thus, taking into account the dynamic equations above, the error system (18) is given byFollowing the methodology, equation (20) in Assumption 1 is expressed aswhere and are the constant gains to be found. If the above equations hold, the tracking , , and will be performed; they are 3 equations with 4 variables, namely, , , , and . Due to their nonlinear trigonometric nature, there is an infinite number of solutions, each of them yielding a family of controllers that guarantee the tracking error goes to zero. In order to obtain a particular solution, we simplify the analysis considering that the gains and have a diagonal form, i.e.,Thus, from the last equation in (32), it is clear that the choicewill drive the error signal to zero, i.e., . Substituting (34) in the first two equations in (32), we haveThere are many ways to find a set of solutions to the equations above. One choice is to solve for and , which will depend on , the other variables in the expression being known. Nevertheless, regardless of the value of , the equalities will be fulfilled; therefore, it is enough to drive to . Now that the control signal and the virtual inputs , , and are known, time derivatives , , , , , and can be calculated in order to use them in the computed torque control (21). The latter consists in designing such that the orientation angles go to their corresponding desired signals, that is, , , and as . Thus, considering that gains and in (21) have the following structure,the control law (21) is given bywhere , , , , , and are the constant gains to be found.

The LMIs in Theorem 1 can now be programmed; they yield the following feasible solution:Figure 2 shows the simulation results of the position and control signals where the quadrotor follows the desired trajectory , , and . The initial conditions for simulation are , , , , and . High-frequency signals are customary during the transient of UAV control due to the very fast dynamics of these plants; this is the case of the control signals on the right.

**(a)**

**(b)**

*Example 2. *Consider the 8-rotor aircraft system whose mathematical model is given bywhere represent the position of the aircraft in Cartesian coordinates, are the orientation angles, is the mass of the aircraft, and is the gravitational constant. In contrast with the quadrotor, this model has six control inputs , , , , , and (see [9] for modelling details).

Following the methodology shown in Section 3, the error signals of interest are defined as , , and . Dynamic equations of the error system (18) can be straightforwardly written (omitted for brevity). In contrast with the previous example where variables , , and were considered as auxiliary/virtual control inputs, in the case of the 8-rotor aircraft, there are two more authentic control inputs; therefore, it is not necessary to take other signals as virtual control ones. In this case, considering the gains structure (33), Assumption 1 is given by the following equations, and it is fulfilled solving for regardless of ,If equalities above are satisfied, the tracking errors are guaranteed to go to zero as time tends to infinity; thus, the control signals , , and can be solved. By way of illustration, the shortest of them is provided, namely, , whereOnce the control signals , , and have been found, the remaining ones , , and are proposed with a simple PD form, such that , , and as . Thus,Figure 3 shows the simulation results for initial conditions , , , , and . It can be seen in 3(a) that the position of the aircraft follows the desired trajectory , , and . The gains used are , , , and . Control signals are shown 3(b). Since in this case, it was not necessary to take signals as virtual control inputs, the initial conditions for the angles are zero, and the control signals , , and are zero during simulation.

The previous solution does not exploit the cascade structure of the system; in this sense, it is a 0-level cascade one. A 1-level one is, nevertheless, possible; such control law does not only serve artificial purposes but also can help standing against actuator fails. To illustrate this alternative, the design can take up from the error equations in (40); any variable in these expressions can be considered as a control signal, which results in a cascade structure and in turn represents a family of solutions. Indeed, considering the control input asthe dynamics of the position can be rewritten as . Thus, can be seen as a fictitious control input, thus resulting in a cascade control. Renaming as and substituting (43), Assumption 1 yieldswhich can be solved for , , and , such that Assumption 1 holds.

Once the control signals , , , and the virtual input are determined, the time derivatives and can be calculated to be used in the computed torque control (21), which consists in designing , such that the orientation angles go to their corresponding desired signals, i.e., as . Thus, considering that the gains and have the structure (36), the control law (21) is given bywhere , , , , , and are the constant gains to be found.

LMIs in Theorem 1 have been found feasible with the following solution:Figure 4(a) shows the simulation results of the position where the aircraft follows the desired trajectory , , and . Initial conditions are , , , , and . Figure 4(b) shows the control signal.

**(a)**

**(b)**

**(a)**

**(b)**

#### 5. Real-Time Results

To corroborate the effectiveness of the proposed results in the previous section, its implementation on an experimental platform is presented; such implementation has been made in the National Laboratory of Autonomous Vehicles and Exoskeletons from the Autonomous University of Hidalgo State. The system used for the experiments is from the DJI Matrices 100 quadrotor (Figure 5). Some details about the performance of this platform are given in Table 1, while the specifications of the structure are given in Table 2 [41].

The mathematical model of the experimental platform above is (10). To implement the controller (11), (34), and (37), first a simulation was conducted using the DJI flight simulator provided by the manufacturer, later to program on the experimental platform Android Studio and DJI Mobile SDK (software development kit).

Using the data given in the previous tables, the values of the Coriolis and inertia matrices arewhere , , and , ,

Here, the desired trajectory of the quadrotor is , , and . The initial conditions are , , , and . For the input signal (24), , , and and are proposed. While, for the equation (26), the gains used are and .

Figures 6 and 7 show the performance of the DJI Matrice 100 quadrotor using the flight simulator provided by the manufacturer. The video with the simulation results can be seen at the following link: https://youtu.be/Igoobvl61AE.

Figures 8 and 9 show the performance of the DJI Matrices 100 quadrotor in real-time. The video where these results are shown can be consulted in the following link: https://youtu.be/oGN5N7M3UZw.

#### 6. Conclusions

A family of exact nonlinear cascade control laws for trajectory tracking of unmanned aerial vehicles has been presented. It has been shown that the control scheme can be applied to UAVs because it takes advantage of their underactuated characteristics, which produce a cascade model suitable for Lyapunov-based design. The proposal has been proven to produce an infinite number of solutions which guarantee that the position in Cartesian coordinates of the aircraft follows a desired trajectory. The methodology has been illustrated via numerical simulations in 4- and 8-rotor systems. Real-time results have been provided on the quadrotor, which confirm the applicability of the presented approach. Future work is on course for including robustness and more general classes of underactuated systems.

#### Data Availability

No data were used to support this study.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

This research has been supported by the CONACYT scholarship (731421), the Laboratory LANAVEX from the Universidad Politécnica de Pachuca, and the project ITSON-PROFAPI 2021-0027.