Академический Документы
Профессиональный Документы
Культура Документы
linear velocity V B = [u, v, w]T , and the angular velocity B. Kinematics and Dynamics
B T
= [p,
ωature, q, r]angles
. 2.2 The
Kinematics
I
Euler
T
are used and the attitude is described by: Kinematics&ofDynamics
the quadrotor relate state variables on
= [φ, θ, ψ] are
ΘQuadrotors . The body-fixed
aircraft that frame is used towith
are equipped define theidenti-
four linear Thedifferent coordinate
kinematics frames.
and dynamics Equation
of the 1 relates
quadrotor can be de position
summa-
B T B
velocity, V = [u, v, w] , the angular velocity,
cal rotors in a cross configuration. BAs shown on Figure ω = [p, q, r]T ,
1(a),
the forces, usually named thrust, F = [Fx , Fy , Fz ]T , and the
rized
vector ΓI with (1-4)
in equations in accordance
the linear [9]: V B , and equation 2
velocitytovector
the blades are paired and each pair rotates in a different di-
torques of the vehicle, τ B = [τx , τy , τz ]T . relates the attitude vector ΘI with the angular velocity vector
rection. Motorshave (1) four
and (3) have rotors,
a counter-clockwise Γ̇ I = RΘ V B (1)
each of them isrotation,
B
Quadrotors identical respon- ω .
and
siblemotors (2) and
for a certain (4) of
amount have
forceclock-wise
and torque rotation.
around itsAlthough
center of
rotation. As shown Θ̇ I = TΘ ω B (2)
the quadrotors haveonsix Figure 1, theof
degrees propellers
freedomare(DOF),
paired and
theyeachare
pair rotates in a different direction. Motors (1) and (3) have to a Γ̇I = RΘ V B (1)
only equipped with four propellers, so it is not possible
counter-clockwise rotation when looked from above whilst motors F B = m(V̇ B + ω B × V B ) (3)
control all the 6 DOF, but only 4. However, thanks to its
(2) and (4) have a clockwise rotation. Since the quadrotor is an Θ̇I = TΘ ω B (2)
structure, it is trivial
underactuated system,to ie,chose
althoughtheitvariables
is a system towith
control.
6 DOF These
1
, it τ B
= I ω̇ B + ω B × (Iω B ) (4)
four
onlyvariables
has 4 motors,correspond to the
so it is not four to
possible basic movements
directly of the
control all the In these equations, RΘ is the rotation matrix and TΘ is
6 DOF, which
vehicle, but only 4. However,
allow to reachdue to the vehicle
a desired altitudestructure, it is
and attitude. Equations (1) and (2) represent the kinematics of the vehicle
the transformation matrix, defined as:
relatively
To obtain simple to choose thethe
these movements, variables
angular to speed
be controlled. These
of the motors and relate state variables on different coordinate frames. Equa-
variables correspond to T the four basic movements which enable tion 1 defines the linear movement of the quadrotor as the deriva-
Ω = [Ω1 , Ω2 , Ω3 , Ω4 ] are adjusted (Figure 2). It follows the
the vehicle to reach a certain altitude and attitude (Figure 2).To
tive of the position
description of these movements:
obtain this maneuvers the speed of each motor is adjusted. The
cψ cθandcequation (2) definessψthe
ψ sθ sφ − sψ cφ cφ angular
+ cψ sθ velocity
cφ
as derivative of
angular speeds of the motors are written Ω = [Ω1 , Ω2 , Ω3 , Ω4 ]T . RΘ = sattitude.
ψ cθ cψ cφ + sψ sθ cφ sψ sθ cφ − cψ sφ (3)
Equations (3) and (4) represent the dynamics of the vehicle.
−s
Both equations wereθ derived fromcθ sφNewton’s second cθlaw
cφ and relate
the forces and moments applied with state variables of the vehicle.
The relation between these forces1 sand φ tθmoments
cφ tθ with the angular
velocity of the motors TΘis =
shown
0 in equations
cφ −s(5)
φ
-(7). (4)
0 sφ /cθ cφ /c
θ
(a) (c) (e) (g) Fx 0 0
In the
previous T
equations notation
the following
F B = Fy + 0 has(5)been
0 et ≡
= sRΘ≡ sin(k)
adopted:ck≡ cos(k),
tan(k).
k k
The dynamics −mgcan be described
Fz of the quadrotor U1 in equa-
tions (5-6), using Newton’s
τx secondU2law:
(d) (f) (h) τB =
τy B = BU3
(6)
(b)
F = mV̇ + ω × (mV B )
B
(5)
τz U4
Positive Thrust Negative Pitch B 2B 2 B 2
Negative Thrust Positive Pitch
U1 τ = b(Ω I ω̇1 ++Ωω 2 +Ω + Ω24B))
×3 (Iω (6)
Negative Roll Negative Yaw U2 b l(Ω24 − Ω22 )
Positive Roll Positive Yaw
where m[Kg]
is = mass of the quadrotot and
the I[N.m.s(7)2 ] is
U3 b l(Ω23 − Ω21 )
the inertia matrix, which is considered diagonal due to the
Fig. 2: Figure 2: Basic Maneuvers [10].
Quadrotor Basic Movements [9]. d(Ω22 + Ω24 + Ω21 + Ω23 )
symmetry ofUthe4 vehicle.
• Thrust - U1 [N ] - This maneuver is obtained by equally In The
theseprevious
equationsequations
RΘ is the relate
rotationthe
matrix andand
forces TΘ moments
is the
augmenting or diminishing the angular speed of all motors, transformation
applied withmatrix,
state which are defined
variables of theas:vehicle. The relation
• Thrust [N ]: 2(a) and (b).
U1Figure
as shown- on
between these cψforces
cθ cψand
sθ sφ moments
− sψ cφ swith
ψ sφ +the
cψ sangular
θ cφ velocity
• The
Roll vertical
- U2 [N.m]movement is obtained
- The roll motion by increasing
corresponds (or
to a rotation of the
motors are shown in equations (7-9).
decreasing) all the propeller B R = s c
Θ ψ θ c c +s s s
ψ φ s s c −c s
ψ θ φ ψ θ φ ψ φ
of the quadrotor around the xspeeds by the
axis and same amount
is obtained when
Ω2 shown
as increases
on(or decreases)
Figure 2(a) eand(b).Ω4 decreases (or increases). −sθ F
c s
0 cθ cφ
B x
θ φ
0 (8)
This -maneuver
• Roll U [N.m]: is shown on Figure 2(c) and (d).
2 F 1= sF φ tyθ =cφtθR−1 0 + 0 (7)
• The Θ
Pitchroll 3 [N.m] - The
- Umovement pitch motiontocorresponds
corresponds a rotationtoofa ro-
the
tation of the quadrotor B
Babout the y and is obtained when TΘ =
0
F
cφz −sφ
−mg U1
quadrotor about the x axis, it is obtained by increasing
Ω1 increases (or decreases) and Ω3 decreases (or increases). 0 sφ /cθ cφ /c
(or decreasing) Ω2 and by
This maneuver is shown
decreasing (or increasing) Ω4 .
on Figure 2(e) and (f). τx
U2
θ
This movement is shown on Figure 2(c) e (d). where ck ≡ cos k, sk ≡ τ Bsin ke t
= τ k ≡
= tan
U3k. The inertia ma- (8)
• Yaw - U4 [N.m] - The yaw motion corresponds to a rotation y
• Pitch - U3 [N.m]: trix I[N.m.s2 ] is diagonal due to the symmetry of the quadrotor,
of the quadrotor about the z B and is obtained when the pair τz U4
−2
The
Ω1 - pitch movement
Ω3 increases corresponds
(or decreases) and Ωto2 -a Ωrotation the m[Kg] is the mass of the quadrotor, g[m.s ] is the gravitational
of (or
4 decreases
acceleration l[m]is the
distance between the center of the quadro-
quadrotor
increases). about the y B axis,
This maneuver it is obtained
is shown on Figureby increasing
2(g) and (h).
b(Ω21 + Ω222+ 2
Ω24 ) coefficient
tor and the centerUof1 a propeller, b[N.s ] isΩthe
3 +thrust
(or decreasing)
1 Degrees Ω1 and by decreasing (or increasing) Ω3 . and d[N.m.s2 ] isU bl(Ω24 − Ω22 )
the
2 moment
Of Freedom coefficient.
This movement is shown on Figure 2(e) e (f). U3 = 2 2 (9)
bl(Ω3 − Ω1 )
• Yaw - U4 [N.m]:
Henrique R. D. da Silva U4 d(Ω22 + Ω24 − Ω21 − Ω23 )April 2012
The yaw movement corresponds to a rotation of the
quadrotor about the z B axis, it is obtained by increasing where g[m.s−2 ] is the gravitational acceleration, b[N.s2 ]
(or decreasing) the pair Ω1 − Ω3 and by decreasing (or is the thrust coefficient, d[N.m.s2 ] is the drag coefficient and
increasing) the pair Ω2 − Ω4 . This movement is shown l[m] the distance between the center of the propeller and the
on Figure 2(g) e (h). center of the quadrotor.
C. Control It is now possible to write the three controllers in the
In this section are presented two controllers, that will Laplace domain:
be implemented in the simulator which is based on the
theoretical model of the quadrotor, and which will allow a
Kiφ
first phase of tests of the proposed identification methods. U2 = Kpφ + eφ (s) − sKdφ φ .Ixx
s
In this thesis it is used a modified Proportional-Integral-
Derivative (PID) controller, because the traditional PID struc-
Kiθ
ture presents a drawback. A sharp movement can saturate U3 = Kpθ + eθ (s) − sKdθ θ .Iyy
the actuators and push away the system from a linear zone s (13)
[10]. For this reason, the PID architecture shown in Figure
Kiψ̇
3, presents the derivative action of the system output. This
modified PID structure can be written according to the U4 = Kpψ̇ + eψ̇ (s) − sKdψ̇ ψ̇ .Izz
s
equations:
d
Kd
dt Ω1
Ω2
Outer Loop Inner Loop
Ω3 Quadrotor Model
Controller Controller
Fig. 3: PID Modified Structure. Ω4
Z t
d
u(t) = Kp e(t) + Ki e(τ )dτ − Kd y(t) (10) Fig. 5: Position Control.
0 dt
It can be seen from the figure that there are two controllers:
Inner Loop Controller and Outer Loop Controller. The first
Ki one is constituted by the stability and altitude control (Z).
u(s) = (Kp + )e(s) − sKd y(s) (11)
s The second one controls de horizontal position (X, Y ). In the
1) Stability Control: Figure 4 shows the architecture of Outer Loop Controller the pitch and roll angles are used to
the stability control. control position in xI and y I . Assuming hovering conditions
as before, and according to [11] and [12], by linearizing
Ω1 equation 1 one obtains the equations used in control:
Ω2
Remote
Control
Controller Ω3 Quadrotor Model
Ω4 Ẍ
= θr cψ + φr sψ
1
Ÿ = θr sψ − φr cψ (14)
U1
Z̈ = −g + (cθ cφ )
m
Fig. 4: Stability Control. It is now possible to write the two Outer Loop controller
in the Laplace domain:
It can be seen in the figure, that this controller is associated
with a remote control as will later be used in the simulator.
Ki
Since we want the quadrotor to work near hovering con- Ẍ = KpX + X eX (s) − sKdX X
s
ditions (θ ≈ 0◦ and φ ≈ 0◦ ), the Coriolis effects can be
neglected, and by substituting equation 8 in equation 6, one
(15)
Ki
obtains the equations used in control: Ÿ = KpY + Y eY (s) − sKdY Y
s
U2
φ̈ =
I xx and the last Inner Loop Controller:
U3
θ̈ =
" #
(12) KiZ
m
Iyy U1 = K( pz ) + eZ (s) − sKdZ Z + g .
U4 s cφ cθ
ψ̈ =
Izz (16)
III. Q UADROTOR I DENTIFICATION Black-Box
Model
A. Black-Box Identification
Roll
When a process is too complex to be described by some Dynamics
Experiment design is an important step in identification, • Time constant Tp - Characterize the speed of response
in which it is decides which signals to measure, and in of a system. It is a measure of the time necessary for a
which the input signals are selected. The next step is data process to adjust to a change in the input.
acquisition, the actual collection of the data needed for In this thesis it was used the System Identification
identification, and model selection. After identification, a ToolboxTM [15] of the Matlab
R
software, to run the Process
validation is needed, where a comparison is made between Models, which allows the user to create different types
the obtained model and the real system. A new input signal is of transfer functions to approximate the system dynamics.
applied to both and their outputs are compared. One way to Figure 8, shows the graphical environment of the toolbox.
compare the result of two identification methods, is applying
the root mean square error:
r Pn
2
i=1 (ŷi − yi )
RM SE = (17)
n
The method that presents a lower RMSE value may be
considered more effective. In the case of obtaining similar
values, it is necessary to resort to other types of analysis,
such as the computational load of each method.
To apply the black-box identification to the quadrotor, it
is essential to identify the system inputs. Since the vehicle
is maneuvered by remote control, the system inputs are the
commands sent. In the case of the quadrotor, used in the
thesis, the signals sent by the remote control are the desired
roll angle φr , the desired pitch angle θr , the desired yaw
angle rate ψ˙r and the thrust U1 . Therefore, the system can
be decoupled into four subsystems which will be identified Fig. 8: Process Models of the System Identification
separately [14](Figure 7). ToolboxTM .
Z-1 PG
The equation 26 is new prediction for a new input, and Z-2
Z-1
Z-2
equation 27 is the uncertainty of the prediction.
Z-1 PG
The goal is to use the GP to model dynamic systems. Z-2
Z-1 = (sin( sin( + cos( sin( cos(
1
1 1
1
Given the model of equation 20, where: 1
= (−cos( sin( + sin( sin( cos( Γ
Z-2
1
Z-1 PG = − + (cos( cos(
-2
Z
Z-1
Z-2
x(t) = [y(t − 1), y(t − 2), ..., y(t − L), u(t − 2), ..., u(t − L)] ,
1 1
(28) Z-1
Z-2
PG
Z-1
is the state vector at t, composed of the previous outputs y Z-2
Pilot ~= 0 Task
RCInput
(Figure 10). Constant
Switch State Vector
Omega
Stability Control
In1 Out1
( )
State Vector' State Vector StateVector Omega Vector
Rate Transition1
( − 1)
Ζ -1
Position Control Sensors
Dynamics
Rate Transition2
.. State Vector
.
( − ) Gaussian Process ( ) 3D View
Ζ -L
Model State Vector
Data
( − 1)
Ζ -1
V. E XPERIMENTAL P LATFORM
( − 2) The vehicle in which it is intended to identify the system,
Ζ -2
is a quadrotor developed by UAVision
3 R
company. It was
..
. acquired the model UX-4001 Mini (Figure 13).
( − )
Ζ -L
B. Results
of corresponded features measurements is known as the The procedure used was similar to that used in the
absolute orientation problem. Given two corresponding point simulation. It was acquired two distinct data sets, one for
sets {mi } e {di }, i = 1, ..., N , such that they are related by: system identification and the other to make predictions and
validate the model. Figures 15-18 , shows the error between
di = Rmi + T + Vi , (29) the two models predictions and the real values.
N
X
2 0.02
Σ2 = di − R̂mi − T̂ (30)
Error [rad]
0
i=1
-0.02
To estimate the rotation matrix R̂, the point sets {mi } and -0.04
1 PN -0.08
d¯ = di , dci = di − d¯
N i=1 -0.1
0 5 10 15 20 25 30 35 40 45 50 55
(31) Time [s]
1 PN
m̄ = mi , mci = mi − m̄ Fig. 15: Roll error GP vs PM.
N i=1
Equation 30 can be rewritten and reduced to:
0.1
2 GP Error
2
PN
PM Error
Σ = i=1
di − R̂mi
0.08
PN (32)
T T T 0.06
= i=1 (dci dci + mci mci − 2dci R̂mci )
0.04
0
where H is the correlation matrix defined by:
-0.02
N
X
mci dTci
-0.04
H= (33)
-0.06
i=1
0.15 1
0.1
0.5
0.05
Error [rad.s-1]
-0.05
-0.5
-0.1
-0.15 -1
-0.2
-1.5
-0.25
0 5 10 15 20 25 30 35 40 45 50 55 -2
5 10 15 20 25 30 35 40 45 50 55
Time [s] Time [s]
Fig. 17: Yaw rate error GP vs PM. Fig. 19: X Acceleration error GP vs PM.
3
GP Error 2
PM Error GP Error
PM Error
2 1.5
1
1
0.5
Error [N]
-0.5
-1
-1
-2
-1.5
-3
5 10 15 20 25 30 35 40 45 50 55 -2
5 10 15 20 25 30 35 40 45 50 55
Time [s]
Time [s]
Fig. 18: Thrust error GP vs PM. Fig. 20: Y Acceleration error GP vs PM.
It can be observed from the data that for both methods, In the case of the acceleration in the z, the Gaussian Process
the predictions of roll, pitch and yaw dynamics approximates model shows a better result. This result matches the fact that
quite well the real quadrotor behaviour. Concerning the thrust the prediction of the thrust is better using this method. The
prediction, the Gaussian process is more effective. thrust prediction is more prevalent in the calculation of the
C. Validation acceleration in z axis than in the other axes.