Guidance and Control of Unmanned Autonomous Vehicles: Shashi Ranjan Kumar

You might also like

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

Guidance and Control of Unmanned Autonomous Vehicles

Shashi Ranjan Kumar

Assistant Professor
Department of Aerospace Engineering
Indian Institute of Technology Bombay
Powai, Mumbai- 400076

https://www.aero.iitb.ac.in/˜shashi
srk@aero.iitb.ac.in
Quadrotor: Attitude Control

• How to design overall controller for multicopters?


• Successive loop closure approach
• Outer loop controller provides the commands for inner loop controller.
• Outputs of horizontal position channel controller provides the reference
values for attitude control system.
• Attitude control objectives Design the torques of multirotors s.t.

lim ∥Θh (t) − Θhd (t)∥ = 0; lim ∥RR⊤


d − I3 ∥ = 0
t→∞ t→∞

• Constraints on convergence rate of inner loop


• Bandwidth of inner loop w.r.t outer loop
• Attitude control: Critical role in position control
⇒ Euler angle based approach
⇒ Rotation matrix based approach

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 1 / 34
Quadrotor: Euler angle based Approach

• Attitude control problem: Design control input τ s.t.


⊤
lim ∥eΘ (t)∥ = 0, eΘ ≜ Θ − Θd , Θ ≜ Θ⊤
hd ψd
t→∞

• Θ⊤
hd comes from the controller while ψd is the mission designer’s choice.

• Using Θ̇ = ω, desired angular velocity

ωd = −KΘ eΘ

• With assumption of Θ̇d = 0 and eω ≜ ω − ωd

lim ∥eω ∥ = 0 =⇒ lim ∥eΘ ∥ = 0


t→∞ t→∞

• Using J ω̇ = τ , desired torque to ensure ∥eω ∥ = 0, using PID controller


R
τd = −Kωp eω − Kωi eω − Kωd ėω

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 2 / 34
Quadrotor: Euler angle based Approach

• With assumption of ω̇d = 0,

lim ∥τ (t) − τd (t)∥ = 0 =⇒ lim ∥eω ∥ = 0 lim ∥eΘ ∥ = 0


t→∞ t→∞ t→∞

• Derivative term can be omitted for reduction of noise.


• Considering saturation effect, with both a10 , a11 ∈ R+
 Z 
eω = satgd (ω − ωd , a10 ) , τd = satgd −Kωp eω − Kωi eω − Kωd ėω , a11

• With symmetric thrust limit given by τmax , saturated attitude controller


 Z 
τd = satgd −Kωp eω − Kωi eω − Kωd ėω , τmax ∈ [−τmax , τmax ]

• How to design these controllers using rotation matrix approach?


• How to identify the necessary error in a matrix-based approach?

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 3 / 34
Quadrotor: Transformation matrix based Approach

• Attitude error matrix with desired rotation matrix as Rd

R̃ = R⊤ Rd

• When will this matrix be identity matrix? R = Rd


• Control objective of attitude controller: limt→∞ ∥R̃ − I3 ∥ = 0
• Attitude and angular velocity tracking errors
1
vex R⊤ ⊤ ⊤

eR ≜ d R − R Rd , eω ≜ ω − R Rd ωd
2
• For small angle assumption, ωd = Θ̇d ≈ 0, and thus eω = ω.
• PD controller: τd = −KR eR − Kω eω
• Nonlinear attitude controller, with all terms,

τd = −KR eR − Kω eω − J [ω]×R⊤ Rωd − R⊤ Rω̇d




• Necessary for aggressive maneuver flight of multirotors

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 4 / 34
Quadrotor: Control Allocation

• Control allocation: Allocate control command to the actuators, while


satisfying constraint condition of the actuators.
• A method to solve equations with constraints
• Given uv (t) ∈ Rn , find actuator inputs δ(t) that satisfy

uv (t) = g(δ)(t), g : Rm → Rn

• Linear control allocation problem

uv (t) = B(δ)(t)

• Actuator (position and rate) constraints

δmin,k ≤ δk ≤ δmax,k , δ̇min,k ≤ δ̇k ≤ δ̇max,k

• Control allocation module: Located after position and attitude control


modules, and before the propulsors.
• Inputs of control allocator: Total thrust and three-axis moments
• Outputs: Motion commands to propulsors.
Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 5 / 34
Quadrotor: Control Allocation

• Benefits of using control allocator: Safer operation of multirotors even in


case of failure of some propellers, adapt to different flight conditions
• For quadrotor, control allocation is unique, P4 = M4−1 . Multrotors?
• For multirotors, this allocation is nonunique, and uses pseudo-inverse
−1
Pnr = Mn†r = Mn⊤r Mnr Mn⊤r

• Propeller’s angular speeds


2
 
ω̄d,1
2
 
 ω̄d,2
 = P nr f d


 ...  τd
2
ω̄d,n r

• In a particular allocation, some propeller angular speeds may exceed the


saturation value.
• Requirement of good allocation scheme.
• What would happen if some of the cT , cM coefficients are unknown?
Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 6 / 34
Quadrotor: Control Allocation

Control effectiveness matrix


 
cT cT ··· cT
 −d1 cT sin φ1 −d2 cT sin φ2 ··· −dnr cT sin φnr 
Mnr (cT , cM , d) =  
 d1 cT cos φ1 d2 cT cos φ2 ··· dnr cT cos φnr 
cM δ1 cM δ2 ··· cM δnr

• One can write

Mnr (cT , cM , d) = Pa Mnr (1, 1, 1)

Pa = diag(cT , dcT , dcT , cM )


• Inverse of Mnr

Mn†r (cT , cM , d) = Mn†r (1, 1, 1)Pa−1

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 7 / 34
Quadrotor: Control Allocation

• For a hexacopter, control effectiveness matrix


" cT c c cT c cT
#
√ T √ T √ T √
0 − 3dcT /2 − 3dcT /2 0 3dcT /2 3dcT /2
M6 (cT , cM , d) =
dcT dcT /2 −dcT /2 −dcT −dcT /2 dcT /2
cM −cM cM −cM cM −cM

 
1 0 2 1

1 − 3 1 −1

† 1  1 − 3 −1 1

M6 (1, 1, 1) =  
6 1 0 −2 −1
 √ 
1 3 −1 1

1 3 1 −1

• Angular speeds of multirotors


2
   
ω̄d,1 fd /cT
2
 
 ω̄d,2 † −1 f d τ dx /(dcT ) 
= M6† (1, 1, 1) 
  
 . . .  = M6 (1, 1, 1)Pa
 
τd  τdy /(dcT ) 
2
ω̄d,6 τdz /(cM )

• Unknown variables cT , cM , d can be compensated for by adjusting control


(PID) parameters.

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 8 / 34
Quadrotor: Motor Control

• Motors drive propellers, and thus the rigidly attached multicopters.


• High performance motor speed control: better attitude and position
control
• Motor control objective: To design throttle input σd,k s.t.

lim |ω̄k (t) − ωd,k (t)| = 0 ∀ k = 1, . . . , nr


t→∞

• Propulsor model with throttle command as input


1
ω̄k = (CR σk + ω̄b ) , σk ∈ [0, 1]
Tm s + 1
˜ = ω̄k − ω̄d,k
• Throttle controller (closed-loop), with error ω̄
Z
˜ − kω̄i
σk = −kω̄p ω̄ ˜˙ k ; kω̄p , kω̄i , kω̄d ∈ R
˜ − kω̄d ω̄
ω̄

• Throttle controller (open-loop)

σk = aω̄d,k + b ; a, b ∈ R
Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 9 / 34
UAV: Simulation Results using Euler Angles

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 10 / 34
UAV: Simulation Results using Euler Angles

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 11 / 34
UAV: Simulation Results using Euler Angles

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 12 / 34
UAV: Simulation Results using Euler Angles

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 13 / 34
UAV: Simulation Results using Rotation Matrix

KR = diag(1, 1, 1); Kω = diag(1, 1, 2.5)

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 14 / 34
UAV: Simulation Results using Rotation Matrix

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 15 / 34
UAV: Simulation Results using Rotation Matrix

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 16 / 34
UAV: Guidance Models

PC: Wikipedia

• Complex equations of motion for vehicle considering everything for design


purpose
• Necessity to develop significantly less mathematical complex design
models that capture essential behavior of the system.
• Approximation of the performance of closed-loop vehicle system to develop
reduced-order design models for higher-level guidance design

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 17 / 34
UAV: Autopilot Models

• Guidance models use a high-level representation of autopilot loops


• Airspeed and roll-hold loops, with bVa , bϕ > 0, are

V̇a = bVa (Vac − Va ) , ϕ̇ = bϕ (ϕc − ϕ)

• Constants bVa , bϕ depend on implementation of autopilot and estimation


techniques
• Altitude and course-hold loops, with bḣ , bχ̇ , bh , bχ > 0

ḧ = bḣ ḣc − ḣ + bh (hc − h)




χ̈ = bχ̇ (χ̇c − χ̇) + bχ (χc − χ)

• Load factor: Ratio of lift to the weight


• Autopilot-hold loop for flight path angle and load factor

γ̇ = bγ (γ c − γ) , η̇lf = bηlf ηlf


c

− ηlf , bγ > 0, bηlf > 0
Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 18 / 34
UAV: Kinematic Model of Controlled Flight

• How to obtain reduced-order guidance models?


• Simplification: eliminate force and moment balance equations of motion
• Elimination of their computations of complex aerodynamic forces acting
on the airframe
• Replacement with simpler kinematic equations for specific flight conditions
such as a coordinated turn and an accelerating climb
• Velocity of aircraft w.r.t. inertial frame
 
cos χ cos γ
Vgi = Vg  sin χ cos γ 
− sin γ

• Kinematics of vehicle
   
ṗn cos χ cos γ
 ṗe  = Vg  sin χ cos γ 
ḣ sin γ

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 19 / 34
UAV: Kinematic Model of Controlled Flight

• Control of airspeed and heading is common in practice.


• Using wind triangle, we have
     
ṗn cos ψ cos γa wn
 ṗe  = Va  sin ψ cos γa  +  we 
ḣ sin γa −wd
• In case of constant altitude and no upward component of wind,
     
ṗn cos ψ wn
 ṗe  = Va  sin ψ  +  we 
ḣ 0 0
• Commonly used kinematic model for UAV
Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 20 / 34
UAV: Kinematic Model of Controlled Flight: Coordinated Turn

• Coordinated turn: No lateral acceleration in body frame


• Bank angle set in a way to provide zero net side force acting on vehicle
• For coordinated turn,
g
χ̇ = tan ϕ cos (χ − ψ)
Vg
• Essential behavior of coordinated-turn: Aircraft must bank to turn (unlike
skid-to-turn)
• Wind triangle, (Va = Vg − Vw ), in component form
     
cos χ cos γ wn cos ψ cos γa
 sin χ cos γ  Vg −  we  =  sin ψ cos γa  Va
− sin γ wd − sin γa

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 21 / 34
UAV: Kinematic Model of Controlled Flight: Coordinated Turn

• On differentiation of both sides, we get


  
cos χ cos γ −Vg sin χ cos γ −Vg cos χ sin γ V̇g
 sin χ cos γ Vg cos χ cos γ −Vg sin χ sin γ   χ̇ 
− sin γ 0 − cos γ γ̇
  
cos ψ cos γa −Va sin ψ cos γa −Va cos ψ sin γa V̇a
=  cos ψ cos γa Va cos ψ cos γa −Va sin ψ sin γa   ψ̇ 
− sin γa 0 − cos γa γ̇a
• For constant altitude flight and no down component of wind

γ, γa , γ̇, γ̇a , wd = 0

V̇a V̇a Vg χ̇
V̇g = + Vg χ̇ tan(χ − ψ), ψ̇ = tan(χ − ψ) +
cos(χ − ψ) Va Va cos(χ − ψ)
• For constant airspeed, coordinated turn condition

Vg χ̇ g tan ϕ cos (χ − ψ) g
ψ̇ = = = tan ϕ
Va cos(χ − ψ) Va cos(χ − ψ) Va

• Equation true even in the presence of wind


Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 22 / 34
UAV: Kinematic Model of Controlled Flight: Accelerated Climb

• Pull up maneuver and aircraft climbs along


Accelerating climb
an arc
• Due to roll angle of ϕ, projection of lift
force in ib − kb plane: Flift cos ϕ
• Force balance:

Flift cos ϕ = mVg γ̇ + mg cos γ

 
g Flift cos ϕ
γ̇ = − cos γ
Vg mg
g
= (nlf cos ϕ − cos γ)
Vg

Flift
where load factor nlf ≜
mg

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 23 / 34
UAV Kinematic Model of Controlled Flight: Accelerated Climb

• For level wing, horizontal flight,

ϕ = γ = 0, nnf = 1

• Load factor: Representation of the


force experienced by aircraft during
climbing and turning maneuvers
• Check and flexibility about the
commands to aircraft within its
structural capability
• What would happen for constant
climb conditions?
• For constant climb, γ̇ = 0

cos γ
nlf =
cos ϕ

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 24 / 34
UAV Kinematic Guidance Model

• How to obtain guidance model in presence of wind?


• Difficult to model wind using a kinematic model, why?
• It introduces aerodynamic forces on aircraft
• These forces are expressed in the dynamic model in terms of Va , α, β
• Velocity vector of UAV
⇒ Airspeed, heading, and air-mass-referenced flight-path angle
⇒ Ground speed, course, and flight-path angle
• Control of airspeed, course angle, and flight-path angle
• Compute ground speed, heading, and air- mass-referenced flight path
angle using wind triangle
• Do you recall about how to compute these quantities?

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 25 / 34
UAV Kinematic Guidance Model

• Assumption: Control of airspeed, altitude, and course angle using


autopilots

Equations of motion

ṗn = Va cos ψ + wn
ṗe = Va sin ψ + we
χ̈ = bχ̇ (χ̇c − χ̇) + bχ (χc − χ)
ḧ = bḣ ḣc − ḣ + bh (hc − h)


V̇a = bVa (Vac − Va )

• Control inputs: hc , Vac , χc


• Heading angle of UAV, with γa = 0

−wn sin χ + we cos χ


 
ψ = χ − sin−1
Va

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 26 / 34
UAV Kinematic Guidance Model

• Can we also have some other alternatives?


• Roll angle as the input command
• Control of heading angle through roll angle by using coordinated-turn
condition

Equations of motion

ṗn = Va cos ψ + wn
ṗe = Va sin ψ + we
g
ψ̇= tan ϕ
Va
ḧ = bḣ ḣc − ḣ + bh (hc − h)


V̇a = bVa (Vac − Va )


ϕ̇= bϕ (ϕc − ϕ)

• Control inputs: hc , Vac , ϕc

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 27 / 34
UAV Kinematic Guidance Model

• For longitudinal motion, the altitude is indirectly controlled by flight path


angle
• Flight path angle and course angle both taken as states as they are
references in inertial frame

Equations of motion

ṗn = Va cos ψ cos γa + wn


ṗe = Va sin ψ cos γa + we
ḣ= Va sin γa − wd
g
χ̇= tan ϕ cos (χ − ψ)
Vg
γ̇= bγ (γ c − γ)
V̇a = bVa (Vac − Va )
ϕ̇ = bϕ (ϕc − ϕ)

• Control inputs: γac , Vac , ϕc


• Other variables can be computed using these states using wind triangle
Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 28 / 34
UAV Kinematic Guidance Model

• Some autopilots control load factor, rather than flight path angle
• Use accelerating climb conditions

Equations of motion

ṗn = Va cos ψ cos γa + wn


ṗe = Va sin ψ cos γa + we
ḣ = Va sin γa − wd
g
ψ̇= tan ϕ
Va
g
γ̇= (nlf cos ϕ − cos γ)
Vg
V̇a = bVa (Vac − Va )
ϕ̇ = bϕ (ϕc − ϕ)
ṅlf = bn nclf − nlf


• Control inputs: nclf , Vac , ϕc


• Other variables (Va , γa , ψ) can be computed using wind triangle
Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 29 / 34
UAV Dynamic Guidance Model

• Reduced-order guidance models: based on kinematic relations between


positions and velocities
• Based on first-order differential equations to model closed-loop response of
commanded states
• Advantage of conditions for coordinated turn to eliminate lift force from
equations of motion
• Airspeed as a controlled quantity and thus no force balance along
body-fixed ib axis

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 30 / 34
UAV Dynamic Guidance Model

• Using Newton’s law


Fthrust Fdrag
V̇g = − − g sin γ
m m
cos γ Flift
• Course angle, using nlf = = , is given by
cos ϕ mg
g g sin ϕ cos(χ − ψ) Flift sin ϕ cos(χ − ψ)
χ̇ = tan ϕ cos(χ − ψ) = nlf =
Vg Vg cos γ mVg cos γ

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 31 / 34
UAV Dynamic Guidance Model

Equations of motion

ṗn = Va cos ψ cos γ


ṗe = Va sin ψ cos γ
ḣ = Va sin γ
Fthrust Fdrag
V̇g = − − g sin γ
m m
Flift sin ϕ cos(χ − ψ)
χ̇ =
mVg cos γ
Flift g
γ̇ = cos ϕ − cos γ
mVg Vg

• Lift and drag forces:


1 2 1
Llift = ρVa SCL , Dlift = ρVa2 SCD , CD = CD0 + KCL2
2 2

• Control inputs: Thrust, lift coefficient, and bank angle


Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 32 / 34
UAV Dynamic Guidance Model

• Popularity of this point-mass model: Models aircraft behavior in response


to inputs used by pilot
• Control inputs used by pilot: engine thrust, lift from the lifting surfaces,
and bank angle
• In the absence of wind, Vg = Va , γ = γa and χ = ψ

Equations of motion

ṗn = Va cos ψ cos γ


ṗe = Va sin ψ cos γ
ḣ = Va sin γ
Fthrust Fdrag
V̇a = − − g sin γ
m m
Flift sin ϕ
ψ̇=
mVa cos γ
Flift g
γ̇ = cos ϕ − cos γ
mVa Va

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 33 / 34
Text/Reference

Reference

1. Quan Quan, “Introduction to Multicopter Design and Control”,


Springer, 2017.
2. Randal Beard and Timothy W. McLain, “Small Unmanned
Aircraft: Theory and Practice”, Princeton University Press, 2012

Thank you for your attention !!!

Shashi Ranjan Kumar (IITB) Guidance and Control of Unmanned Autonomous Vehicles Quadrotor Lecture 15 34 / 34

You might also like