Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Article

Title
Firstname Lastname 1,†,‡ , Firstname Lastname 2,‡ and Firstname Lastname 2, *

1 UMI-LAFMIA, CINVESTAV, 07360 Ciudad de Mexico, Mexico; e-mail@e-mail.com


2 UMI-LAFMIA, CINVESTAV, 07360 Ciudad de Mexico, Mexico; e-mail@e-mail.com
* Correspondence: e-mail@e-mail.com; Tel.: (optional; include country code; if there are multiple
corresponding authors, add author initials) +xx-xxxx-xxx-xxxx (F.L.)
† Current address: Affiliation 3.
‡ These authors contributed equally to this work.

Abstract: In this paper, a method based on second order sliding mode control (SMC) is proposed 1

to design controllers for a UAV and its implementation on a Quadcopter having four rotors.This 2

technique allows for a continuous control robust to external disturbance and model uncertainties to 3

be computed without the use of high control gain or extensive computational power. The proposed 4

controller is based on Lyapunov analysis is guaranteed when the initial conditions fall inside a 5

domain of attraction as specified in the analysis. The performance of the proposed sliding mode 6

algorithm is visualized by numerical simulations. 7

Keywords: Aircraft control, Aircraft Dynamics, Sliding Mode , Lyapunov. 8

1. Introduction 9

Unmanned aerial vehicles (UAVs) are currently playing an important role in the tasks of 10

society, this popularity may be owed to the ability to effectively carry out a wide range of 11

applications such as including inspection and security in search and rescue operations [? 12

], precision agriculture [? ], mapping [? ], inspection in natural disasters [? ]. One of the 13

advantages of a quadrotor has a simpler control mode, which allows to achieve a variety 14

of flight control by modifying the speeds of their rotors, which is why they are used for 15

civilian purposes. 16

That is why the quadrotor presents a challenge for a controller design, to cope with this 17

problem based on its stabilization different approaches have been proposed. 18

Citation: Lastname, F.; Lastname, F.;


Lastname, F. Title. Journal Not Specified En este trabajo se considera el control de seguimiento de posición y actitud de un pequeño 19

2022, 1, 0. https://doi.org/ UAV cuadrotor. En las misiones prácticas, la estabilidad de la aeronave se ve fácilmente 20

afectada por cambios bruscos. 21


Received:
Accepted:
One of the first controllers proposed for the UAV was introduced by 22
Published:

Publisher’s Note: MDPI stays neutral Demostraron que la aplicación de una técnica , propusieron una solución con un proced- 23

with regard to jurisdictional claims in imiento aproximado 24

published maps and institutional affil-


iations. El vehículo aéreo quadrotor es un sistema inestable, multivariable, no lineal y con un 25

fuerte acoplamiento. Por lo tanto, se han propuesto muchos resultados que informan 26
Copyright: © 2022 by the authors.
sobre los avances en el modelado y la estabilización de los vehículos aéreos quadrotor. En 27
Submitted to Journal Not Specified
concreto, al poder operar a bajas velocidades, el control de seguimiento de trayectorias de 28
for possible open access publication
los cuadrotores ha generado más atención. Además, el objetivo de este proyecto es proponer 29
under the terms and conditions
un controlador que permita abosorber la perturbacion por medio de un controlador modo 30
of the Creative Commons Attri-
deslizante, esto permitira tener acceso a lugares de dificil acceso. 31
bution (CC BY) license (https://
creativecommons.org/licenses/by/
Existe un controlador propuesto por [] basado en ... 32
4.0/).

Version October 11, 2022 submitted to Journal Not Specified https://www.mdpi.com/journal/notspecified


Version October 11, 2022 submitted to Journal Not Specified 2 of 8

Se han propuesto muchos métodos de SMC extendidos para el diseño de controladores de 33

vuelo para la aeronave cuadrotor [] 34

En cuanto a los controladores lineales, existen diferentes métodos de control lineal basados 35

en el proporcional-integral-derivativo (PID) diseñados para el control de la posición del 36

quadrotor []. Sin embargo, el rendimiento del controlador disminuye significativamente 37

cuando el vehículo aéreo se enfrenta a condiciones adversas. 38

El modelado dinámico del vehículo aéreo quadrotor se estudia en [] utilizando las ecua- 39

ciones dinámicas de cuerpo rígido [] 40

A continuación, se diseñan un controlador de modo deslizante (SMC) para llevar los errores 41

de seguimiento de la trayectoria a cero asintóticamente. 42

Resultado 43

Los resultados de la simulación validan que el SMC diseñados proporcionan una rápida 44

capacidad de seguimiento exacto y una fuerte capacidad de rechazo de las perturbaciones 45

para el UAV quadrotor. 46

This paper is organized as follows: Section 2 presents the PVTOL model and a change of 47

variables to simplify the analysis. Section 3 describes the stabilization of the altitude as well 48

as the domain of attraction for z and ż. Section 4 presents the desired modes for the Y-axis 49

dynamics of the vertical displacement. Section 5 develops the ϕ orientation angle control 50

strategy. . Section 6 proposes a Lyapunov function and proves stability of the closed loop 51

i.e. convergence of the closed loop system state to the origin. Section 7 presents the desired 52

modes for the X-axis dynamics of the horizonal displacement. Section 8 develops the θ 53

orientation angle control strategy. . Section 9 proposes a Lyapunov function and proves 54

stability of the closed loop i.e. convergence of the closed loop system state to the origin. 55

The proposed algorithm is tested in numerical simulations in section 10 . Final remarks are 56

given in the section 11 . 57


Version October 11, 2022 submitted to Journal Not Specified 3 of 8

2. UAV Quadcopter Model 58

The UAV Quadcopter in Figure 1 satisfies the following dynamic equations

m ẍ = −u sin θ + Γ x
mÿ = u cos θ sin ϕ + Γy
mz̈ = u cos θ cos ϕ − mg + Γz
(1)
θ̈ = τθ + Γθ
ϕ̈ = τϕ + Γϕ
ψ̈ = τψ + Γψ

where u′ is the total thrust, τθ′ , τϕ′ and τψ′ is the couple, m is the mass, I is the inertia 59

moment, x ′ is the horizontal displacement, y′ is the vertical displacement, z′ is the altitude 60

displacement and g is the gravitational acceleration. 61

62

3. Altitude Control Algorithm 63

The altitude z can be stabilized by using the following thrust control input 64

m( g + r )
u= (2)
cos θ cos ϕ
with 65

r = −k1 ż − k2 (z − zd ) (3)
Notice from (2) and the above that if |θ | < π
2 then u > 0. Thus (1) can be rewritten as 66

tan θ ( g + r )
ẍ = + Γx
cos ϕ
ÿ = tan ϕ( g + r ) + Γy
z̈ = r + Γz
(4)

θ̈ = τθ + Γθ
ϕ̈ = τϕ + Γϕ
ψ̈ = τψ + Γψ

4. Desired modes for the Y-axis dynamics of the vertical displacement 67

From (4) it follows 68

ÿ = tan ϕ( g + r ) ± tan ϕd ( g + r ) + Γy (5a)


where 69

ÿ = tan ϕd ( g + r ) + ey′ ( g + r ) + Γy (5b)


and 70

ey′ = tan ϕ − tan ϕd (5b)


Version October 11, 2022 submitted to Journal Not Specified 4 of 8

also tan ϕ is considered as the virtual control input and tan ϕd is the desired virtual control 71

input. 72

Let us define the variable 73

νy = ẏ + k3 (y − yd ) (6a)

Differentiating νy 74

ν˙y = ÿ + k3 ẏ (6b)

and introducing (5b) 75

ν˙y = ÿ + k3 ẏ = (tan ϕd ( g + r ) + e′ ( g + r )) + k3 ẏ + Γy (7)

where k3 > 0 and k4 > 0. Proposing the following control law and δν is considered as a 76

disturbance 77

ν˙y = −νy + ey (8)

where 78

ey = ey′ ( g + r ) (8a)

Let the desired virtual control input tan ϕd satisfy. 79

( g + r ) tan ϕd + ey′ ( g + r ) + k3 ẏ = −νy + ey′ ( g + r ) + Γy (9)

getting tan ϕd 80

( g + r ) tan ϕd = −νy − k3 ẏ (10)

From (6a), (8) and (10) it follows 81

 
ey = tan ϕ − tan ϕd ( g + r ) = tan ϕ( g + r ) + νy + k3 ẏ + Γy (11)

Differentiating the above 82

ϕ̇
ėy = ( g + r ) + tan ϕṙ + ν̇y + k3 ÿ + Γy (12)
cos2 ϕ
Differentiating again and introducing (4) it follows 83

τϕ tan ϕ ϕ̇
ëy = ( g + r ) + 2 2 ϕ̇2 ( g + r ) + 2 2 ṙ + tan ϕr̈ + ν̈y + k3 y(3) + Γy (13)
cos2 ϕ cos ϕ cos ϕ

Notice that the second and third order derivatives of r, x and νx which appear above can be 84

computed as a function of their first order derivatives as follows. From (3a) and (4) 85

r = −k1 ż − k2 (z − zd ) (14)
ṙ = −k1 r − k2 ż
r̈ = −k1 ṙ − k2 r̈

from (5) 86

ÿ = tan ϕ( g + r ) + Γy
ϕ̇ (15)
y (3) = ( g + r ) + tan ϕṙ + Γy
cos2 ϕ
Version October 11, 2022 submitted to Journal Not Specified 5 of 8

and from (6a) 87

νy = ẏ + k3 (y − yd )
ν̇y = ÿ + k3 ẏ (16)
ν̈y = y(3) + k3 ÿ

5. Control of the orientation angle ϕ 88

In view of (13) we can compute τϕ so that the equation for the error e satisfies: 89

sey = e˙y + βey (17)

then we propose a Lyapunov function at 90

1 2
V= s >0 (18)
2 ey
Differentiating the above 91

V̇ = ṡey = sey (ëy + βėy ) (19)

We propose the following sliding mode controller , where β is a Constant 92

ëy + βėy = −k y arctan(sey ) (20)

where obtaining at τϕ and add a Sliding Mode 93

1 tan ϕ 2 ϕ̇
τϕ = cos2 ϕ − k y arctan(sey ) − βėy − 2 ϕ̇ ( g + r ) − 2 ṙ (21)
g+r cos2 ϕ cos2 ϕ

− tan ϕr̈ − ν̈y − k3 y(3)

6. Desired modes for the X-axis dynamics of the horizontal displacement 94

The following value is proposed for the thrust control input on the X-axis: 95

m[ g + r ]
u=− (22)
cos θ cos ϕ

In (1) and (22) can be rewritten as follows: 96

tan θ ( g + r )
ẍ = (23a)
cos ϕ

Assuming that cos ϕ must have a value close to 0 we obtain: 97

ẍ = tan θ ( g + r ) (23b)

From (4) it follows 98

ẍ = tan θ d ( g + r ) + e′x ( g + r ) (23c)

where 99

e′x = tan θ − tan θ d (24)

where tanθ is considered as the virtual control input and tandθ is the desired virtual control 100

input. 101
Version October 11, 2022 submitted to Journal Not Specified 6 of 8

Let us define the variable 102

νx = ẋ + k4 ( x − xd ) (25a)

and also by defining the variable s x 103

ν˙x = ẍ + k4 ẋ (25b)

Subsequently, the same Y-axis meteodology is performed to obtain ex , ėx and ëx on the 104

X-axis. 105

ex = tan θ ( g + r ) + νx + k4 ẋ + Γ x (26a)

Differentiating the above 106

θ̇
ėx = ( g + r ) + tan θ ṙ + ν̇x + k4 ẍ + Γ x (26b)
cos2 θ
Differentiating again and introducing (4) it follows 107

τθ tan θ θ̇
ëx = 2
( g + r ) + 2 2 θ̇ 2 ( g + r ) + 2 2 ṙ + tan θ r̈ + ν̈x + k4 x (3) + Γ x (27)
cos θ cos θ cos θ

7. Control of the orientation angle θ 108

In view of (27) we can compute τθ so that the equation for the error e satisfies: 109

sex ≜ e˙x + βex (28)

then we propose a Lyapunov function at 110

1 2
V= s >0 (29)
2 ex
Differentiating the above 111

V̇ = ṡex = sex (ëx + βėx ) (30)

We propose the following sliding mode controller, 112

ëx + βėx = −k x arctan(sex ) (31)

Where obtaining at τθ and add a Sliding Mode 113

1 tan θ 2 θ̇
τθ = cos2 ϕ − k x arctan(sex ) − ėx − 2 2
θ̇ ( g + r ) − 2 ṙ (32)
g+r cos θ cos2 θ

− tan θ r̈ − ν̈x − k4 x (3)


Version October 11, 2022 submitted to Journal Not Specified 7 of 8

8. Numerical simulation results 114

The performance of the proposed control algorithm has been studied in numerical simula- 115

tions. We have considered the following initial conditions for the UAV system which are 116

shown in Table 1. 117

Table 1. Simulation parameters 118

Initial conditions Value


y0 1[ m]
ẏ0 0.1[ m/s]
x0 1[ m]
ẋ0 0.1[ m/s]
z0 0.1[ m]
ż0 0.1[ m/s]
θ0 0.1[rad]
θ̇0 0[rad/s]
ϕ0 0.1[rad]
ϕ̇0 0[rad/s]

As for the controller parameters, we have chosen the following as shown in Table 2. 119

Table 2. Simulation parameters for counters

Initial conditions Constant


ky 2
kx 2
k1 1
k2 1
k3 1
k4 1
α 1
β 1
γ 1

The behaviour of the proposed control algorithm is shown in figures 2 through 5. The 120

lateral displacement converges to the origin and the altitude reaches the desired altitude to 121

3m as can be seen in Figure 2. The Figure 3 presents the angular displacement θ. It can be 122

seen that θ converges to 0 and that it is always far away from the singular points ± π2 .The 123

control inputs u and τ are given in figure 4 . 124

9. Discussion 125

The purpose of this paper is to present a UAV model, where a sliding mode control 126

with constant exponential coefficient is used for the altitude control and a sliding mode 127

control for the X-Y axis trajectories of a nonlinear system, ensuring that the system can go 128

exponentially to the desired trajectory. Simulation results show that it is possible to keep 129

the yaw angle constant. The SMC controller has been tested in other numerical simulations 130

and indicates zzzzzz. Adding that all the results show a great performance of the controller 131

based on proposed smoothing modes... 132


Version October 11, 2022 submitted to Journal Not Specified 8 of 8

X(m)
2

1
4

Y(m)
2

1
4

Z(m)
2

0
0 10 20 30 40 50 60
Time (Sec)

Figure 1. Lateral displacement response of X , Y and altitude response of Z.

2
(rad)

-2

-4
0 10 20 30 40 50 60

2
(rad)

-2
0 10 20 30 40 50 60

Figure 2. Control input behavior τθ y τϕ

4
u(N/m)

0
(rad)

-0.5

-1
0.5
(rad)

-0.5

-1
Time (Sec)

Figure 3. Behavior of control input (u), angle response in θ y ϕ

You might also like