Vision-Based Nonlinear Control of Quadrotors Using the Photogrammetric Technique

Centro Universitario de Ciencias Exactas e Ingenieŕıa–UdG, Blvd. Gral. Marcelino Garćıa Barragán 1421, Oĺımpica, 44430, Guadalajara, Jalisco, Mexico Departamento de Ciencias Tecnológicas, Universidad de Guadalajara, Centro Universitario de La Ciénega, Av. Universidad 1115, 47820, Ocotlán, Jalisco, Mexico Department of Information Engineering, Computer Science and Mathematics, University of L’Aquila, Via Vetoio, L’Aquila, Coppito, 67100, Italy Center of Excellence DEWS, University of L’Aquila, Via Vetoio, L’Aquila, Coppito, 67100, Italy


Introduction
e technology of unmanned aerial vehicles (UAVs) is developing rapidly, based on the integration of many technologies in the mechanical structure, energy management, communication, control, etc, [1]. UAVs are widely used in many applications in civilian as well as in military contexts. For instance, UAVs provide great advantages in geographical information acquisition and safety purposes, as well as significant benefits when used for inspection and detection purposes. Furthermore, UAVs are becoming more and more accessible due to technological developments that enable their increasing use in different and broad application areas.
Different mathematical models can be used to design a controller for UAVs. In [2][3][4], a Newton-Euler model was presented. Furthermore, the studies in [5,6] considered quaternions to describe the angular kinematics, whilst the study in [7] applied the Euler-Lagrange equations to obtain the whole quadrotor mathematical model. Regarding the control of quadrotors, many control techniques were proposed. e linear quadratic regulator control and proportional integral derivative control were proposed in [8,9]. However, the stability of these methods cannot be guaranteed when the quadrotor moves away from its equilibrium configuration. Compared to linear control, the nonlinear control can ensure global stable flight for a quadrotor. Examples of nonlinear control techniques used to design a controller for a quadrotor are the sliding mode and the backstepping techniques [10][11][12][13]. e backstepping and adaptive control [14] were applied to the quadrotor flight control. In [15,16], an observer-based adaptive fuzzy backstepping controller was designed for trajectory tracking of a quadrotor subject to wind gusts and parametric uncertainties. In [17], a robust adaptive attitude tracking control for a quadrotor was proposed. In [18], a control trajectory tracking was designed via the sliding mode technique and using neural networks to optimize the controller parameters through a network learning process which is based on the control process.
To design vision-based controllers, researchers used different methods for the recognition of objects, trajectories, road lanes, etc. In [19], an INS/vision-based autonomous landing system on stationary platforms was proposed, whereas in [20], mobile platforms were used for the landing of quadrotors. In [21], the position of a quadrotor was estimated by the detection of a set of concentric circles. In [22], a controller, based on computer vision techniques applied to helipad recognition, was proposed, in which the visual recognition of a black and white pattern of the helipad was exploited. In [23], a computer vision system was developed for the automatic estimation of the position and attitude of a helipad fixed on a mobile platform. In [24], a trajectory tracking problem for a vision-based quadrotor control system via super twisting sliding mode controller was proposed. Also, the study in [25] proposed a neuroadaptive integral robust controller for the tracking of ground moving targets in the presence of various uncertainties, via an Image-Based Visual Servo (IBVS) framework. e authors of [26] presented a predictive control algorithm for autonomous approaches of quadrotor helicopters to a window using a reference image captured with a photographic camera. e target is selected by an operator in a reference image which is sent to the vehicle. Besides, the authors of [27] proposed an adaptive sliding mode controller based on the backstepping technique for a tracking problem using a monocular algorithm to obtain the accurate location information of the quadrotor and its reference. In the same context, the work in [28,29] developed a vision-based attitude dynamic surface controller, constructing an IBVS to ensure that the visual target remains in the camera's field of view all the time.
In this paper, a controller for the tracking of a reference trajectory is designed via the backstepping technique. e quadrotor model is divided into four subsystems for the altitude, longitudinal, lateral, and yaw motions, and a control input is designed for each subsystem. Furthermore, the photogrammetric technique is used to obtain the reference trajectory to be tracked. e performance and effectiveness of the proposed nonlinear controllers are tested via numerical simulations using the simulation software called Pixhawk Pilot Support Package (PSP), which predicts accurately the real dynamic quadrotor helicopter behavior. e main contributions of this article are as follows: (i) e backstepping technique is used to design a controller capable of tracking a reference position and yaw of a quadrotor (ii) e photogrammetric technique is used to obtain the reference trajectory (iii) e performance and effectiveness of the proposed controller have been tested in PSP e paper is organized as follows: Section 2 introduces the description and the mathematical model of the quadrotor. In Section 3, the control problem is formulated, whilst in Section 4, the nonlinear controller is designed. In Section 5, the reference trajectory is obtained via the photogrammetric technique, and some numerical simulations implemented in PSP are presented. Some comments conclude the paper.

Mathematical Model of a Quadrotor
e quadrotor considered in this work consists of a rigid frame equipped with four rotors. e rotors generate the propeller force F i � bω 2 p,i , proportional to the propeller angular velocity ω p,i , i � 1, 2, 3, 4. Propellers 1 and 3 rotate counterclockwise, and propellers 2 and 4 rotate clockwise.
Let us indicate with RC(O, e 1 , e 2 , e 3 ) and RΓ(Ω, ϵ 1 , ϵ 2 , ϵ 3 ) the frames fixed with the Earth and the quadrotor, respectively, and Ω is coincident with the center of mass of the quadrotor (see Figure 1). e absolute position of quadrotor in RC is described by p � (x, y, z) T , whereas its attitude is described by the Euler angles α � (ϕ, θ, ψ) T , with ϕ, θ, ψ ∈ (−π/2, π/2) being the pitch, roll, and yaw angles, respectively. e sequence 3-2-1 is here considered [30]. Moreover, v � (v x , v y , v z ) T and ω � (ω 1 , ω 2 , ω 3 ) T are the linear and angular velocities of the center of mass of the quadrotor, expressed in RC and in RΓ, respectively. e translation dynamics, expressed in RC, and rotation dynamics, expressed in RΓ, of the quadrotor are where m is the mass of the quadrotor, J � diag J x , J y , J z (expressed in RΓ) is the inertia matrix of the quadrotor, and is the so-called dyadic representation of ω. Furthermore, 2 Mathematical Problems in Engineering are the input forces and moments produced by the propellers, where l is the distance between center of mass CG to the rotor shaft and c is the drag factor. Moreover, F grav in (3) is the force due to the gravity, expressed in RC. e vectors expressed in RΓ are transformed into vectors in RC by the rotation matrix where c * � cos( * ), s * � sin( * ), and * � ϕ, θ, ψ. e angular velocity dynamics are expressed using the matrix with tg * � tan( * ), sc ◇ � sec( * ), and * � ϕ, θ, ψ.
is assumption is justified by the fact that the movements of the quadrotor are slow and soft [4]. e rolling torque τ 1 is produced by the forces F 2 and F 4 . Similarly, the pitching torque τ 3 is produced by the forces F 1 and F 3 . Due to Newton's third law, the propellers produce a yawing torque τ 2 on the body of the quadrotor, in the opposite direction of the propeller rotation. Moreover, is the gyroscopic torque due to the propeller rotations, with J p being the propeller moment of inertia with respect to its rotation axis, and ω p � ω p,1 − ω p,2 + ω p,3 − ω p,4 is the socalled rotor relative speed. Finally, F d and M d are the forces and torques due to the external disturbances, here assumed negligible. Now, using (1) and (3) and under the small angle assumption, the mathematical model of the quadrotor can be expressed by where the control variables u j , j � 1, 2, 3, 4, are defined as (3). e values of the parameters used in (7) are defined in Table 1.

Formulation of the State Feedback Control Problem
e control problem is to ensure the asymptotic converge of the variables χ � (x, y, z, ψ) to some reference trajectories In view of the control of the quadrotor, the following coordinate change is considered: � ω θ , and _ ψ � ω ψ (ω ϕ ≃ω 1 , ω θ ≃ω 2 , ω ψ ≃ω 3 ), and the system of equations (7) became

Mathematical Problems in Engineering
Clearly, model (8) is composed of rotational and translational dynamics. Figure 2 shows that the input control u 1 does not influence the rotational dynamics but only the translational ones and can be used to impose z ⟶ z ref . Hence, the following four subsystems will be considered: the altitude subsystem S 1 , the latitudinal subsystem S 2 , the longitudinal subsystem S 3 , and the yaw subsystem S 4 : deg/s e controller design for each subsystem will be carried out in the following section.

Design of the Nonlinear Controller
e translation dynamics in equation (7) are dependent on the ϕ, θ, and ψ angles. In the next sections, a nonlinear control is used for each subsystem to solve the control problem.

Altitude Control.
In this section are established the altitude control and its stability proof via Lyapunov function. For this purpose, it is considered that the altitude control S 1 subsystem is the dynamic errors are _ e z,1 � −k z,1 e z,1 + e z,2 , e proposed altitude control u 1 is where c ϕ ≠ 0 and c θ ≠ 0. erefore, using altitude control (13) in (12) For the stability analysis of system (14), the following Lyapunov function candidate is proposed: where P z � P T z > 0. Deriving Lyapunov function (15), one obtains where P z is taken as solution of the Lyapunov equation with Q z � Q T z > 0 being fixed. Using (17) into (16), one finally obtains with α � 2λ Q z min /λ P z maz and P z as solution of (17). erefore, by [31], V z (e z ) ≤ e − αt V(e z (0)), so that the tracking errors converge globally exponential to zero.

Longitudinal Motion Control.
In this section, the longitudinal motion is studied making use of the subsystem S 2 and using the backstepping technique. One considers the tracking error e x, 1 x ref , and the error dynamics or, equivalently, where is the velocity error and is the reference velocity. Successively, one works out the velocity error dynamics as Mathematical Problems in Engineering with k x,2 > 0, where u 1 is given by (13). For the stabilization of e x,2 , the reference value for s θ can be fixed as follows: where c ϕ ≠ 0 and c ψ ≠ 0, so that To impose such a reference for θ, one considers the tracking error e θ,1 and its derivative: with k θ,1 > 0, where is the reference angular velocity and is the angular velocity error. erefore, one works out the velocity error dynamics as Finally, one determines the input control u 2 as so that the velocity error dynamics become with k θ,2 > 0.

Lateral Motion Control.
In this section is designed the controller for the lateral motion along the y-axis of the quadrotor, using the same procedure followed in Section 4.2.
One starts with the tracking error with k y,2 > 0, c ψ ≠ 0, and u 1 given by (13). Furthermore, the angular error dynamics are with k ϕ,1 > 0 and Finally, the angular velocity error dynamics are so that the control input is with k ϕ,2 > 0.

Yaw Motion Control.
Considering the subsystem S 4 , and the errors one works out the error dynamics as with k ψ,1 > 0. erefore, with the control one finally obtains the yaw error dynamics as e global exponential stability can be inferred analogously to what is done in Section 4.1.

Simulation Results
e photogrammetric technique has been used for measuring the important physical quantities in both ground and flight testing, including attitude, position, and shape of objects. To generate the trajectory reference a photogrammetric technique was applied to analyze a natural scenery, with and with f i , i � 1, 2, 3, functions of (x(t), y(t), z(t)). e selected scenario is a serial array of trees, where all trees have approximately the same separation. Figures 3 and 4 show the trees' frontal and lateral views, respectively. Using the photogrammetry, the following estimations were determined: W f � 0.85 m for the trees' width, T t � 2.72 m for the distance between the two trees, and W s,1 � 0.75 m and W s,2 � 0.522 m for the widths of the two trees. For this application, the reference trajectory has two important characteristics: (1) e altitude is constant (2) e reference trajectory is periodic over the x-y plane (3) e reference trajectory avoids the collision between the quadrotor and the trees erefore, the reference position was set equal to with where T ref is the period. Figure 5 shows the reference trajectory for x ref ∈ [0, 18] m. e behavior of the controllers designed in Section 4 has been tested with numerical simulations on the quadrotor described by equation (1). e parameters used are given in Table 1, whilst the variables and gains used in the controllers    are given in Table 2. In order to simulate the controller for each subsystem, the software developed by the PSP for Simulink was used. e reason for choosing the PSP software was due to the performance of this software in predicting the dynamic quadcopter behavior, which is very close to the real behavior. In fact, the PSP software is proven to represent accurately the quadrotor dynamics. In order to appropriately implement the controllers, the reference trajectory was sampled as in Figure 6. e simulations results of the closed-loop system are shown in Figures 7 and 8, where the quadrotor's initial conditions have been set equal to p(0) � (0, 0, 0) T , v(0) � (0, 0, 0) T , α(0) � (0, 0, 0) T , and ω(0) � (0, 0, 0) T . Figure 7 shows the quadrotor altitude and yaw, z(t) and ψ(t), ensured by the controllers (13) and (18). Regarding the latter, the most significative tracking error is 0.5 rad immediately after the initial time. Figure 8 shows the quadrotor x and y positions ensured by the controllers (30) and (38). e x position achieves its reference value in 3 s, and the y position achieves its reference value in 6 s. e overall controller performance is accurate and fast. Moreover, this performance could be improved using also integral terms in the controllers.

Conclusion
In this paper, a controller based on the backstepping technique has been designed for the position and yaw control of a quadrotor helicopter. e quadrotor dynamics have been divided into four subsystems, each with a control input and an output variable. e overall controller leads to satisfactory results. e photogrammetric technique on a scenario with fixed obstacles, due to some trees, has been used to determine the scene geometry and to fix the position reference trajectory. e numerical simulations of the proposed controllers have been implemented using the PSP, ensuring an accurate approximation of the real quadrotor dynamics, and the results show a good performance and effectiveness of the proposed control law. Future work will regard the real implementation of the proposed controller.
Data Availability e figures, tables, and other data used to support this study are included within the article.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.