0% found this document useful (0 votes)
113 views7 pages

Jurnal PID

This document describes modeling and control of a quadcopter using two approaches: 1) A pure mathematical model calculated using Euler-Lagrange formalism in Matlab/Simulink. 2) A physical model imported from Solidworks into Simscape multibody, which includes 3D simulation. Both models use cascaded PID controllers for attitude and position/altitude control. Finally, a processor-in-the-loop simulation using a Texas Instruments F28377s DSP platform verifies that the deployed C/C++ code matches the simulation design.

Uploaded by

Adi Mulyadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views7 pages

Jurnal PID

This document describes modeling and control of a quadcopter using two approaches: 1) A pure mathematical model calculated using Euler-Lagrange formalism in Matlab/Simulink. 2) A physical model imported from Solidworks into Simscape multibody, which includes 3D simulation. Both models use cascaded PID controllers for attitude and position/altitude control. Finally, a processor-in-the-loop simulation using a Texas Instruments F28377s DSP platform verifies that the deployed C/C++ code matches the simulation design.

Uploaded by

Adi Mulyadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Quadcopter Modelling, Control Design and PIL

Verification Based on DSP F28377s


Yassine El houm*, Ahmed Abbou, Ali Mousmi
Mohamed V University
Mohammadia Schools of Engineers
Street Ibn Sina B, P 765 Agdal Rabat, Morocco
Email: [email protected], [email protected], [email protected]

Abstract—This paper focuses on modeling and controlling for the physical modeling part. The final task focuses on a
a nonlinear quadcopter plant system using two different Processor-in-the-Loop simulation (PIL) which verify whether
approaches. The first represents a pure mathematical model the deployed C/C++ code in the hardware target matched the
calculated based on Euler Lagrange formalism using only
Matlab/Simulink environment, the second one shows a physical simulation design, for this purpose a LAUNCHXL-F28377s
model (CAD model) imported from Solidworks to Simscape DSP platform was chosen to accomplish this task.
multibody which include a 3d simulation environment. The
controller part of both models are constituted from two cascaded
loop, an inner-loop for attitude control and an outer-loop for II. M ATHEMATICAL M ODELING AND C ONTROL D ESIGN
position and altitude control. Finally, in order to make sure that
the result obtained in the simulation environment matched the This section presents the working principle of a 6 DOF
real implementation, the paper offers a processor-in-the loop quadcopter with a full detailed description of its dynamics, the
simulation using as a hardware target LAUNCHXL-F28377s.
mathematical model system is obtained using Euler-Lagrange
Keywords: Quadcopter, PD control, nonlinear control, position formalism with the assumption that:
control, attitude control, PIL simulation • The components of the system are rigid bodies.
• The body mass is concentrated at the center of gravity.
I. I NTRODUCTION • The body axes are the principal axes for the quadcopter.
Research in the field of drones is essentially • The rotational speed of the rotors relative to the ground
multidisciplinary. Indeed it involves very varied fields is not taken in consideration.
such as aerodynamics, signal and image processing, control • The lift and the drag are proportional to the square of the
design mechanics, composite materials, real-time computing, speed rotation of the motors.
etc. Recently the interest in drones seems to be increasing in
multiple applications such as agriculture, products and goods
transport or even for military applications and intervention
in hostile environments [1] [2] [3]. We can imagine a drone
that explores a contaminated building or tunnel and to make
a first observation before any human intervention.

The aim of this paper is to design a controller to track


a desired trajectory of a 6DOF quadcopter plant model [4]
and to perform a stable fly experience even in presence
of some sustained external disturbances. An inner loop PD
controller was chosen in first place to control the three
rotational angles φ, θ, ψ (attitude control), and an outer loop
PD position controller takeover of the x and y translational
variable. Altitude is separately controlled out of the rest by
a typical PID controller [5]. Since the plant model represent
many non-linear behaviors and some variables are coupled
due to natural factors like gyroscopic and inertial effects, in
order to enhance the overall system performance the paper
treat a nonlinear controller based on backstepping technique
[6] [7] to replace the PD attitude controller. The simulation
of the system is carried out in Matlab/Simulink environment Fig. 1. Quadcopter body frame with principal axis and forces
with the use of a CAD model imported from Solidworks

 
   

A. Mathematical Modeling 2) Expression of Kinetic and Potential Energy :
In order to define the quadcopter model we need to identify
Let [XY Z]
 an orthonormal base constituting a fixed refer-
the system with appropriate coordinate frames. The inertial
coordinate frame or earth reference frame is considered as ence frame. If the rigid body rotates three times according to
a fixed coordinate at the ground, while the body coordinate aeronautics angles, then by using equation 1 we have:
frame is attached to the center of the quadcopter and its axis ⎛ ⎞
x
are parallel with the earth reference frame. The transition rXY Z = R(φ, θ, ψ) ⎝ y ⎠ (3)
between the two coordinate frames is assured by introducing z
three elementary rotation angles φ, θ, ψ which are defined in
the following way fig.2:
rX = cos(ψ)cos(θ)x + [cos(ψ)sin(θ)sin(φ) − sin(ψ)cos(φ)]y
Rotation of φ(t) around the x-axis (angle: −π/2 ≤ φ ≤ π/2) + [cos(ψ)sin(θ)cos(φ) + sin(ψ)sin(φ)]z
Rotation of θ(t) around the y-axis (angle: −π/2 ≤ θ ≤ π/2) rY = sin(ψ)cos(θ)x + [sin(ψ)sin(θ)sin(φ) + cos(ψ)cos(φ)]y
Rotation of ψ(t) around the z-axis (angle: −π ≤ ψ ≤ π )
+ [sin(ψ)sin(θ)cos(φ) − sin(φ)cos(ψ)]z
The rotation matrices are given by :
⎛ ⎞ rZ = −sin(θ)x + cos(θ)sin(φ)y + cos(θ)cos(φ)z
1 0 0
R(x, φ) = ⎝ 0 cos(φ) −sin(φ) ⎠ By deriving and simplifying those equations, we obtain
0 sin(φ) cos(φ) the corresponding speed of rX , rY and rZ which can be
represented as :
⎛ ⎞
cos(θ) 0 sin(θ) ⎛ ⎞ ⎛ ⎞⎛ ⎞
νX (x, y, z) νxx ν xy ν xz x
R(y, θ) = ⎝ 0 1 0 ⎠
⎝ νY (x, y, z) ⎠ = ⎝ νyx νyy νyz ⎠ ⎝ y ⎠
−sin(θ) 0 cos(θ)
νZ (x, y, z) ν zx ν zy ν zz z
⎛ ⎞ The squared norm of the speed is calculated by:
cos(ψ) −sin(ψ) 0
2 2
R(z, ψ) = ⎝ sin(ψ) cos(ψ) 0 ⎠ νx,y,z = νX + νY2 + νZ2 ⎛ ⎞⎛ ⎞
0 0 1  x2 xy xz ν ix
νi2=X,Y,Z = ν ix ν iy ν iz ⎝ xy y2 yz ⎠ ⎝ νiy ⎠
By multiplying the three matrices, we obtain an orthogonal
xz yz z2 ν iz
matrix representing the transformation between two frames
in equation 1: By developing the expression and introducing inertial
⎛ ⎞
elements, the kinetic energy can be expressed in the following
c(ψ)c(θ) c(ψ)s(θ)s(φ) − s(ψ)c(φ) c(ψ)s(θ)c(φ) + s(ψ)s(φ) way:
R= ⎝ s(ψ)c(θ) s(ψ)s(θ)s(φ) + c(ψ)c(φ) s(ψ)s(θ)c(φ) − s(φ)c(ψ) ⎠ (1)
−s(θ) c(θ)s(φ) c(θ)c(φ) 1
2 1
2
T = Ix φ̇ − ψ̇sin(θ) + Iy θ̇cos(φ) + ψ̇sin(φ)cos(θ)
1) Euler Lagrange formalism: 2 2
Developing the mathematical model using Euler-Lagrange 1
2
+ Iz θ̇sin(φ) − ψ̇cos(φ)cos(θ)
formalism [8] [9] using kinetic and potential energies. The 2
1  2 2
1  2
general Lagrange equation is given by the equation 2: Ix = y + z dm; Iy = x + z 2 dm;
  2 2
d ∂L ∂L 1  2
Γi = − ; With L = T − V (2) Iz = x + y 2 dm
dt ∂ q˙i ∂qi 2
Ix , Iy andIz represents the moments of inertia of the system.
Γi : Generalized forces given by non-conservative forces.
The potential energy is calculated by the following equation:
qi : Generalized coordinates.
T : Total kinetic energy.
V = g (−sin(θ)x + sin(φ)cos(θ)y + cos(φ)cos(θ)z) dm
V : Total potential energy.

V = xdm (−gsin(θ)) + ydm (gsin(φ)cos(θ))

+ zdm (gcos(φ)cos(θ))

3) Developing Stat Model with Euler-Lagrange:

In order to determine the equations of each angle, we have


Fig. 2. The transition from the fixed frame to the body frame to exploit the kinetic and potential energy calculated recently,
using euler-lagrange formalism the equation of roll, pitch and ⎛ ⎞
yaw are given by: φ̇
⎜ a1 θ̇ψ̇ + a2 θ̇Ωr + b1 U2 ⎟
⎜ ⎟
  ⎜ ⎟
d ∂L ∂L ⎜ θ̇ ⎟
Γφ = − = τx ⎜ ⎟
dt ∂ φ̇ ∂φ ⎜ a3 φ̇ψ̇ − a4 φ̇Ωr + b2 U3 ⎟
  ⎜ ⎟
⎜ ψ̇ ⎟
d ∂L ∂L ⎜ ⎟
Γθ = − = τy ; With L=T −V ⎜ a5 θ̇φ̇ + b3 U4 ⎟
dt ∂ θ̇ ∂θ f (X, U ) = ⎜ ⎟ (7)
  ⎜ ż ⎟
d ∂L ∂L ⎜ ⎟
Γψ = − = τz ⎜ g − cosφcosθ 1 ⎟
⎜ m U1 ⎟
dt ∂ ψ̇ ∂ψ ⎜ ⎟
⎜ ẋ ⎟
⎜ (cosφsinθcosψ + sinφsinψ) 1 U1 ⎟
⎜ m ⎟
Considering the small angles hypothesis, equations after ⎝ ẏ ⎠
derivations and simplifications becomes: (cosφsinθsinψ − sinφcosψ) m 1
U1
Γφ = Ix ω˙x + (Iz − Iy ) ωy ωz ⎧  2
⎪ 2 2 2
Γθ = Iy ω˙y + (Ix − Iz ) ωx ωz ⎪ U1 = b Ω1 + Ω2 + Ω3 + Ω4

Γψ = Iz ω˙z + (Iy − Ix ) ωx ωy ⎨U = b Ω2 − Ω2

2
ωi : Represents the angular velocity in the body axes  42 2
2


⎪ U 3 = b Ω − Ω
⎪ 1 3
⎩U = d Ω2 + Ω2 − Ω2 − Ω2

Expression of non-conservative forces τx , τy and τz : 4 2 4 1 3
The lift of the motors created in the direction of the axes x
 torques τx , τy aregiven by:
and y, by a1 = (Iyy − Izz )/Ixx b1 = l/Ixx
τx = bl Ω24 − Ω22 , τy = bl Ω23 − Ω21 a2 = Irotor /Ixx
Where b, l and Ωi Are respectively a constant uniting
the thrust and the speed of rotation of the motor, the half a3 = (Izz − Ixx /Iyy b2 = l/Iyy
wingspan of the quadcopter and the rotor i speed rotation. a4 = Irotor /Iyy
a5 = (Ixx − Iyy )/Izz b3 = l/Izz
The drag of the propellers creates
a vertical torque: x1 =φ x7 = z
τz = d Ω21 + Ω23 − Ω22 − Ω24 where d is a constant
connecting the drag and the speed of rotation of a motor. x2 = x˙1 = φ̇ x8 = x˙7 = ż
x3 = θ x9 = x
Gyroscopic effect: as a result of a rotation of the propeller x4 = x˙3 = θ̇ x10 = x˙9 = ẋ
around the x or y axis, a non-intuitive effect appears and
x5 = ψ x11 = y
must be taken in consideration:
x6 = x˙5 = ψ̇ x12 = x˙11 = ẏ
τx = Irotor ωy (+Ω3 + Ω1 − Ω2 − Ω4 ) Stat and control vector from the model 7 are represented as
(4)
τy = Irotor ωx (−Ω3 − Ω1 + Ω2 + Ω4 ) follows:

Where Irotor represents the rotor inertia , X = [ φ φ̇ θ θ̇ ψ ψ̇ z ż x ẋ y ẏ ]T


and Ωr = (Ω2 + Ω4 − Ω1 − Ω3 ) U = [ U1 U 2 U3 U4 ]T
The resulted couples applied in each direction are shown in 5:
B. Control Design

τx = bl Ω24 − Ω22 + Irotor ωy (+Ω3 + Ω1 − Ω2 − Ω4 ) In this section the paper presents the control techniques
τy = bl Ω23 − Ω21 +  Irotor ωx (−Ω3 − Ω1 + Ω2 + Ω4 ) (5) used to design a position and attitude controller for a quad-
τz = d Ω21 + Ω23 − Ω22 − Ω24 copter model and stabilized it at quasi-stationary conditions.
Two control techniques are implemented, the PID controller is
The equation which describes the angular movement result used in first place, which consists of two cascaded loops: an
from 4 and 5: outer-loop for controlling position and altitude, which takes as
reference input the desired values of x, y and z and produces

Irotor θ̇ (+Ω3 + Ω1 − Ω2 − Ω4 ) (Iy − Iz ) bl Ω24 − Ω22 U1 as an altitude control input. Thus the position controller
φ̈ = + θ̇ψ̇ +
Ix Ix  Ix output generates the roll, pitch and yaw reference values for
Irotor φ̇ (−Ω3 − Ω1 + Ω2 + Ω4 ) (Iz − Ix ) bl Ω23 − Ω21
θ̈ = + φ̇ψ̇ + (6) the inner control loop (attitude control) which takes over
Iy  Iy Iy
(Ix − Iy ) d Ω21 + Ω23 − Ω22 − Ω24 the stabilization of the drone by feeding U2 , U3 and U4 as
ψ̈ = θ̇φ̇ +
Iz Iz an attitude control inputs for the quadcopter plant model. A
backstepping controller is used secondly instead of the inner
Based on the equation 6, the overall system can be described PID controller, the rest of the system is maintained unchanged.
as follows 7:
Quadcopter Simulink Model

Zero-Order <roll_des> Phi


Hold
<pitch_des>
Zero-Order Theta
Hold1 <yaw_des>

Psi
Zero-Order <z_des>
Hold2
<Phi>
X
<X> <Y> Zero-Order
References Position_Controller <Theta>
Hold3
Y

Inner Loop <Psi>

<Z> Z
Attitude_Controller Quadrotor System

Outer Loop

Fig. 3. Quadcopter plant model with the controller form Simulink environment

1) PID Control Design Approach: 2) Backstepping Control Design Approach:


Proportional, integral and derivative controller also known as The Lyapunov theory has been for a long period of time a very
PID controllers are commonly and widely used in multiple important tool in linear and nonlinear applications as well,
control design applications, this technique calculates an error however the use of this technique had been hampered by the
value e(t) as the difference between a desired set-point and a difficulties in finding a Lyapunov function for a given system.
measured process variable and applies a correction based on The invention of constructive tools for nonlinear control
proportional, integral, and derivative terms. This approach is design based on Lyapunov theory, such as Backstepping,
simple to tune and to implement, but in the flip-side the PID was thus received with open arms by the control community.
controllers are naturally linear. They can achieve a decent Here, a control law stabilizing the system is derived with a
performance in some nonlinear applications, however in many Lyapunov function to prove stability. The principle of this
cases where the system is heavily non linear and variate theory is to establish in a constructive way the control law of
rapidly, the use of this architecture without linearizing the the nonlinear system by considering some stat variables as
system around an operating point, seems to be unsuitable and virtual commands and designing intermediate control laws.
can result a poor performance in return.
Considering the stat representation in equation 7, the com-
As the figure 4 shows, the structure is composed from two mand inputs U2 , U3 and U4 can be calculated using this
cascaded controller loop. A position and altitude controller approach as follow:
receive as inputs the desired value of xr , yr and zr calculate
• Roll, pitch and yaw commands calculation:
the errors: e1 = xr − x, e2 = yr − y and e3 = zr − z.
The altitude controller result a control input U1 while the Let consider the error: ε1 = x1d − x1
position controller output the tree reference angles ( φr , θr the derivative of the error is: ε˙1 = x1d
˙ − x˙1 = x1d
˙ − x2
and ψr ) needed for the inner loop ( attitude control) which the new virtual command is considered as α1 = (x2 )d
calculate the errors and adjust the stat of the plant model using the Lyapunov theorem by considering the Lyapunov
by feeding it with tree control inputs U2 , U3 and U4 . The function ε1 positive definite and its time derivative negative:
parameters of each controller are tuned by defining the desired V1 (ε1 ) = 12 ε21 ⇒ V˙1 (ε1 ) = ε1 ε˙1
performance profile using a specific tool ”PID Tuner” built in V˙1 (ε1 ) = ε1 [x1d
˙ − x2 ] < 0
Matlab/Simulink.
In order to satisfy the negativity of the equation, we
have to consider [x1d ˙ − x2 ] = −c1 ε1 so the equation
xr + r U4

- PID Posion r PD Attude U3 becomes:


PLANT V˙1 (ε1 ) = −c1 ε˙1 2 ⇒ α1 = x1d
+
yr
-
Controller r Controller U2
˙ + c1 ε˙1
  

MODEL
zr +

-
PID Altude
Controller U1 Let consider the error: ε2 = x2 − α1 ⇒ ε˙2 = x˙2 − α˙1
x y z ⇒ ε˙2 = a1 x4 x6 + a2 x4 Ωr + b1 U2 − α˙1

The Lyapunov function of (ε1 , ε2 ) is given by the equation:


Fig. 4. Cascaded loop PID structure
V2 (ε1 , ε2 ) = V1 (ε1 ) + 21 ε22
V˙2 (ε1 , ε2 ) = V˙1 (ε1 ) + ε2 ε˙2 < 0 +ref PWM PWM

V˙1 (ε1 ) = ε1 [x1d


˙ − x2 ] = ε1 [α1 − c1 ε1 − x2 ] S PS -ref REF +
Voltage
Source Controlled PWM

⇒ V˙1 (ε1 ) = −c1 ε21 − ε1 ε2


Voltage REF

R
Motor

V˙2 (ε1 , ε2 ) = −c1 ε21 −ε1 ε2 +ε2 [a1 x4 x6 +a2 x4 Ωr +b1 U2 − α˙1 ]
REV

C
-
S PS
Voltage -

V˙2 (ε1 , ε2 ) = −c1 ε21 +ε2 [−ε1 +a1 x4 x6 +a2 x4 Ωr +b1 U2 − α˙1 ]
Source1
BRK
Mechanical
Subsystem Rotational Subsystem1
H-Bridge Reference

Reference

To satisfy the negativity of the equation, we have to


Fig. 5. Linkage between the physical model and the controller
consider: [−ε1 + a1 x4 x6 + a2 x4 Ωr + b1 U2 − α˙1 ] = −c2 ε2
⇒ U2 = b11 [ε1 − a1 x4 x6 − a2 x4 Ωr − c2 ε2 + α˙1 ]

We know that: α1 = x1d


˙ + c1 ε1 ⇒ α˙1 = x¨1d + c1 ε˙1 The 3D CAD model was imported to Simscape
⇒ α˙1 = x¨1d + c1 [x1d
˙ − x2 ] = x¨1d + c1 [α1 − c1 ε1 − x2 ] Multibody(formerly SimMechanics) and linked to the
⇒ α˙1 = x¨1d − c1 [c1 ε1 + ε2 ] controller part modeled in Simulink Fig.5.

The control input U2 for Roll command is obtained B. Processor-In-the-Loop (PIL) Simulation
with the assumption of x¨1d = 0 and V˙2 (ε1 , ε2 ) < 0:
⇒ U2 = b11 [ε1 − a1 x4 x6 − a2 x4 Ωr − c2 ε2 − c1 (c1 ε1 + ε2 )] The design of any controller requires the mathematical
development of the model in question followed by adjustments
The same structure was used to calculate Pitch and of its parameters which depend on the structure and nature
Yaw commands with the consideration of: of the plant model. However, the real implementation of this
ε3 = x3d − x3 controller takes into account several variables that can affect
ε4 = x4 − x3d
˙ − c 3 ε3 the performance of the system, meaning that the deployed
ε5 = x5d − x5 code will not necessarily behave as the simulated one. The
ε6 = x6 − x5d
˙ − c 5 ε5 PIL technique makes it possible to verify if the implemented
c/c++ code on a processor target correspond well to the result
⇒ U3 = 1 obtained during the simulation.
b2 [ε3 − a3 x2 x6 − a4 x2 Ωr − c4 ε4 − c3 (c3 ε3 + ε4 )]
1 PIL requires drivers to communicate the computer platform
⇒ U4 = b3 [ε5 − a5 x2 x4 − c6 ε6 − c5 (c5 ε5 + ε6 )]
with the aimed hardware. The resulting object code generated
in the PC links with other test-management functionality and
The outer loop command is maintained as the previous
is then downloaded, typically to an off-the-shelf evaluation
section with a PID controller of position and altitude.
board with the target processor. The simulation tool, running
III. P HYSICAL M ODELING AND PIL S IMULATION on the PC machine, then communicates with the downloaded
A. Physical Modeling software, typically via a serial communication link.
Physical modeling or simscape multibody simulation
environment for 3d mechanical systems is considered one of
the strongest tools which simplify the build up of dynamic Plant Model
systems and integrates with others physical modeling libraries +
in Matlab/Simscape environment, making dynamic system PIL Block
modeling much easier without the need of deriving equations
which differs from the standard Simulink modeling approach
Matlab/Simulink envirement
and is particularly suited to simulate systems that consist of
real physical components [10]. Unlike Simulink input/output
connection based design, the component models in simscape
have physical connections which enable modeling physical PC Serial port

systems by assembling a physical schematic. Connection


between components enable a bidirectional flow of energy Jtag communication
which means that simscape can determine the system level of
equations for a given model.
Controller running
Quadcopter model: Modeling the parts and assembly was
carried out under SolidWork 3D design system. This platform on the target C/C++
guarantees a favorable environment for volume 3D modeling
and offers several advantages by decreasing design time Embedded controller DSP F28377s
and integrating by default the different characteristics of the
material, like inertia, mass, rigidity, etc. Fig. 6. Processor-In-the-Loop (PIL) schematic
IV. E XPERIMENTS R ESULTS phi ref :1[1] 0.6
theta ref :1[1]
theta :1[2]

phi :1[2]
0.6
0.4
0.4
This section discusses some simulation results of the 6DOF
0.2 0.2
quadcopter model and the process of the verification under the
0 0
real C2000 processor. All the shown figures were taken from
-0.2
Matlab/Simulink envirement. -0.2

-0.4
-0.4
-0.6
TABLE I
-0.6
-0.8
Q UADCOPTER PARAMETERS
0 20 40 60 0 20 40 60

Parameters Value
Ix 7.2 × 10−3 kg.m2 Fig. 8. Roll command Fig. 9. Pitch command
Iy 7.2 × 10−3 kg.m2 1
30
1.1 × 10−2 kg.m2
0.9 Y ref:1[1]
Iz Yaw ref:1[1]
yaw :1[2]
Y :1[2]
0.8
25
Jr 6.3 × 10−5 kg.m2 0.7
20
l 0.2 m 0.6

0.5
g 9.81 m/s2 0.4
15

m 0.55 kg 0.3 10

2.93 × 10−5 kg.m


0.2
b 5
0.1

d 7.2 × 10−7 kg.m2 0 0

0 20 40 60 80 0 20 40 60 80

A. PID Control Approach Results Fig. 10. Forced yaw to 1 Fig. 11. X command
1
The parameters of the controller are shown in the table: 30

0.9
X ref:1[1]
X :1[2] Yaw ref:1[1]
25 0.8 yaw :1[2]

0.7

Loop Controller Parameters Value 20


0.6

Kpφ 280.55 15
0.5

0.4
Kdφ 6.15 10 0.3

Kpθ 53.39 0.2


Inner Loop Attitude controller 5
0.1
Kdθ 1.43
0
0
Kpψ 25.52 0 20 40 60 0 20 40 60 80

Kdψ 0.95
Kpx 10 Fig. 12. Y command Fig. 13. Z command
Kdx 3
Position controller
Kpy 10
Outer Loop B. Backsteping Controller Approach Results
Kdy 3
Kpz 2.83 × 105
Altitude controller
Kdz 6.15 × 103 The parameters of the Backsteping attitude controller are in
TABLE II the table:
PARAMETERS OF THE CONTROLLER
TABLE III
BACKSTEPING CONTROLLER PARAMETERS
The desired trajectory of the quadcopter is as follow:
Parameters Value
30 X
c1 27.79
20

10
c2 285.74
0 c3 4.70
30 Y

20
c4 45.02
10 c5 4.55
0
c6 21.67
0 20 40 60 8

Z
4

0 The results obtained from the backsteping control


technique are quite similar to the results from the PID
Fig. 7. Desired trajectory approach technique which gives a very decent performance
according to the recent shown result. The only noticeable
Results of the simulation using Table II parameters: difference comes from the overshooting rate and stabilization
time from some hard profiles where many variations occur in to be a simple PID linear controller for each inner and outer
a short period of time , in fact with the nonlinear controller loop, the second one was a nonlinear backstepping controller.
we were able to decrease the overshooting rate even further The results of both controllers were quite similar, this is due to
more without pushing the system to the instability zone. the simplifications and the assumptions taken in consideration
The figure 14 shows a plotting of XY simulation for the when designing the mathematical model. In fact, to simulate
a given trajectory design for each PID and Backstepping the reality more additional effects and uncertainties should be
controllers: taken into account leading to a more complicated system, thus
the need to a robust controller technique based on nonlinear
controller. The proposed verification process using a DSP
target hardware was a helpful step in order to make sure that
the generated code work properly in the hardware target, since
the future work intended to build a real quadcopter system
with a standalone controller and to perform a stable fly in
such disturbed and uncertain environment.
ACKNOWLEDGMENT
The author would like to express his sincere appreciation
and acknowledgment as regards the financial support of the
national center for scientific and technical research in morocco
Fig. 14. XY trajectory plotting of PID and Backstepping techniques
(CNRST).
R EFERENCES
[1] P. N. Patel, M. A. Patel, R. M. Faldu, and Y. R. Dave, “Quadcopter for
C. PIL Execution Time and Profiling agricultural surveillance,” Advance in Electronic and Electric Engineer-
ing, vol. 3, no. 4, pp. 427–432, 2013.
[2] J. A. Paredes, J. Acevedo, H. Mogrovejo, J. Villalta, and R. Furukawa,
The PIL verification process was carried out with Simulink “Quadcopter design for medicine transportation in the peruvian amazon
rainforest,” in Electronics, Electrical Engineering and Computing (IN-
embedded coder for TI C2000 processors, the running code TERCON), 2016 IEEE XXIII International Congress on. IEEE, 2016,
in the target processor F28377s matched perfectly the results pp. 1–6.
of the simulation. The execution profiling time shown in [3] R. Williams, B. Konev, and F. Coenen, “Multi-agent environment ex-
ploration with ar. drones,” in Conference Towards Autonomous Robotic
figure 15 gives some details about the execution time profile. Systems. Springer, 2014, pp. 60–71.
[4] M. Khan, “Quadcopter flight dynamics,” International Journal of Sci-
ence and Technology Research, pp. 130–135, 2014.
[5] P. E. Pounds and A. M. Dollar, “Stability of helicopters in compliant
contact under pd-pid control,” IEEE Transactions on Robotics, vol. 30,
no. 6, pp. 1472–1486, 2014.
[6] J. Wang, T. Raffler, and F. Holzapfel, “Nonlinear position control
approaches for quadcopters using a novel state representation,” in AIAA
F28377S controller profiling Guidance, Navigation and Control Conference, 2012.
step [0.001 0]
[7] T. Madani and A. Benallegue, “Backstepping control for a quadrotor
helicopter,” in Intelligent Robots and Systems, 2006 IEEE/RSJ Interna-
tional Conference on. IEEE, 2006, pp. 3255–3260.
[8] R. Ortega, J. A. L. Perez, P. J. Nicklasson, and H. Sira-Ramirez,
Passivity-based control of Euler-Lagrange systems: mechanical, electri-
Profiling initialisation
cal and electromechanical applications. Springer Science & Business
Media, 2013.
[9] T. Luukkonen, “Modelling and control of quadcopter,” Independent
research project in applied mathematics, Espoo, 2011.
[10] R. F. Gordon, P. Kumar, and R. Ruff, “Simulating quadrotor dynamics
using imported cad data,” AIAA Modeling and Simulation Technologies
(MST) Conference Boston, 2013.

Fig. 15. Executing time in hardware target

V. C ONCLUSION

This paper shows a methodological approach of designing


a six degree of freedom quadcopter model based on Euler-
Lagrange theory. The controller part was chosen in first place

You might also like