Upload
satishreddy
View
227
Download
0
Embed Size (px)
Citation preview
8/11/2019 Full Text 22
1/108
8/11/2019 Full Text 22
2/108
8/11/2019 Full Text 22
3/108
ThesisD
escription:Thepurposeofthe
thesisistoinvestigatedifferen
tmethodsforunmannedaerial
vehicles
(UAV)autopilotdesign.
T
his
includes
path-generation,path-following
controland
regulation.
Computersimulationsshouldbeusedtoevaluatethe
performanceofthedifferent
guidance
-controllersystems.
Thefollo
wingitemsshouldbeconsidered:
1.
L
iteraturestudyonUAVflightcontrolsystems.Giveanoverviewofdifferentmethodsfound
in
theliteraturefortakeoff,altitudecontrolandturningcontrol.BothdecoupledandMIMO
designtechniquesshouldbereviewed.
2.
D
efinethescopeofthethesisan
dclarifywhatyourcontributionsare.
3.
C
hooseanUAVmodelforcomp
utersimulationsandgraphical
visualizationinX-plane.
4.
D
esignautopilotsystemsforautomatictakeoff,altitudecontrol
andturningcontrol.
5.
D
esignguidancesystemforpath
-following.
6.
In
vestigatehow
goodtheautop
ilotsystem
isforcoupledmaneuvers,varyingpayloadand
w
inddisturbances.
7.
C
oncludeyourresults.
Startdate:
2012-01-1
6
Duedate:
2012-06-1
1
Thesispe
rformedat:
Departmen
t
of
Engineering
Cybernetics,
NTNU
Supervisor:
Professor
Thor
I.
Fossen,
Dept.
of
Eng.
Cybernetics,
NTNU
8/11/2019 Full Text 22
4/108
8/11/2019 Full Text 22
5/108
Thisthesiswillpresentadesignofaguidanceandcontrolsystemtouseon
aircra
fts,primar
ilyon
UAVs.
On
econtrolmet
ho
dfor
head
ingcontrolan
d
twoforp
itchan
daltitu
decontro
lw
illbe
invest
igated
.Thecontrolmet
h-
odsar
eProportional-I
ntegral-D
erivat
ive
(PID)an
dsl
iding
mo
decontrol
.
PIDw
illbetestedon
bot
hhead
ingan
dp
itchan
daltitudecontrol
,w
hile
sliding
mo
dew
illon
lybeapplie
dtop
itchan
daltitu
de.
Th
erew
illbepresente
dapat
h-f
ollow
ingmet
ho
d,
Lin
eof
Sight,
for
hea
din
ggu
idancean
da
kinemat
iccontrol
ler
foraltitu
dereference
.
Th
epresente
dmet
ho
dsareim
plemente
dinMat
labSim
ulin
kw
hilethe
aircra
ftmo
deluse
dcomes
from
the
flightsimu
lator
X-Pla
ne.
X-P
lane
is
alsouse
dtov
isual
izetheper
formanceoftheautop
ilot
design
.
PIDan
dsl
idingmo
decontro
laretested
infour
differentscenar
ios
toinvestigatew
hichcontrol
lerw
ho
hasthe
bestper
forma
nce
.Afterthe
simula
tions,
itwasobservedtha
tthe
PIDhad
betterperf
ormancesthan
sliding
mo
decontrol
.
iii
8/11/2019 Full Text 22
6/108
8/11/2019 Full Text 22
7/108
Idenn
eoppgavenvildetblipresentertetstyrings-ogkon
trol-systemfor
bru
ki
enautop
ilot
for
fly,
frstog
fremst
foru
bemannedefl
y.Detv
ilvre
enregu
latormeto
de
forpos
isjonogtometo
der
for
hy
dereg
ulering.
Regu-
leringsmeto
denesomv
ilblipresenterter
Proporsjonal-I
nteg
ral-Der
ivas
jons(
PID)-
regu
leringogsl
idingmo
de-reguler
ing.
PIDv
ilblibru
ktfor
badepos
isjon
oghy
deregu
lering,menssl
idingmo
de
kunv
ilblibru
ktfor
hy
de.
Et
styringssystemer
des
ignet
forap
lan
leggeen
baneogen
hy
dereferanse
soma
utop
ilotenskal
flge.
Lineof
Sighter
bru
kt
forap
lan
leggeen
bane
idet
hor
isonta
lep
lan
,nor
d-
st,
mensen
kinematis
kkontrol
lergir
hy
dere
feranse
.
Meto
denev
ilsa
bliimp
lemen
tert
iMat
labSimu
lin
k,m
ens
flymo
del
len
kommer
fra
flysimu
leringsprogra
mmet
X-P
lane.
X-P
lane
blirogsa
bru
kt
for
av
isual
isereopp
frselentila
utop
iloten
.
PIDogsl
idingmo
dev
iltils
lutt
blitestet
ifireu
likes
cenar
ioer
for
a
sehvilkenregu
latorsom
har
den
besteopp
frselen
.Ettersimu
leringene
kommer
det
framat
PIDharen
bedreopp
frselennsl
idin
gmo
de.
v
8/11/2019 Full Text 22
8/108
8/11/2019 Full Text 22
9/108
Thist
hesis,
andtheworkitpresents,
istheculmination
ofmymasters
degree
atthe
Departmentof
Engineering
Cy
bernet
icsof
the
Norweg
ian
Un
ivers
ityof
Sciencean
dTec
hnology
(NTNU).Iwou
ldlik
etothan
kmy
superv
isor
Thor
I.Fossenatth
eDepartmentof
Engineering
Cy
bernet-
ics
for
hispat
iencean
dhisgui
dance
forth
isreportand
inthe
fiel
dof
Gu
idance
,Nav
igat
ionan
dContro
lSystems.
Alsoagreatthan
kyouto
Kj
etilHope
Tu
ftelan
dan
dKare
Vistnes
for
goodd
iscuss
ions,
inputan
dfeedb
ack
.Than
ksgoesalsotoa
llthemem
bers
ofthe
unmannedve
hiclelaborat
orythe
lastcoup
leofmon
ths
formak
ing
agoo
dwor
kingenv
ironment.F
inal
ly,
Imustthan
ktoM
orten
Wol
lert
Nygren
forcorrectiveread
ing,a
ndTor
leifHagen
for
bein
gsuchagoo
d
helpw
hen
itcomesto
flight
detai
lsfor
Cessna.
vii
8/11/2019 Full Text 22
10/108
8/11/2019 Full Text 22
11/108
ThesisDescription
i
Abstract
ii
Samm
endrag
iv
Acknowledgments
vi
Listo
fAbbreviations
xiii
Listo
fFigures
xvii
Listo
fTables
xix
1Introduction
1
1.1
Mot
ivat
ion
......
...............
......
1
1.2
What
has
been
done.
...............
......
3
1.3
My
Contr
ibution
...
...............
......
6
2GuidanceTheory
7
2.1
Lineof
Sight
Gu
idance
for
Pat
h-F
ollow
ing
....
......
7
2.2
Kinemat
icControl
forA
ltitu
de
Gu
idance
....
......
11
3Co
ntrolTheory
13
3.1
PIDControl
......
...............
......
14
3.2
Sliding
Mo
de
Control.
...............
......
16
ix
8/11/2019 Full Text 22
12/108
5
CaseStudy
35
5.1
Without
disturba
ncesan
dpay
load
....
..........
37
5.1.1
PID
.................
..........
38
5.1.2
Sliding
Mo
de
............
..........
41
5.2
Withpay
load
................
..........
43
5.2.1
PID
.................
..........
44
5.2.2
Sliding
Mo
de
............
..........
47
5.3
WithWind20kn
ots
............
..........
49
5.3.1
PID
.................
..........
50
5.3.2
Sliding
Mo
de
............
..........
53
5.4
WithWind40kn
ots
............
..........
56
5.4.1
PID
.................
..........
56
5.4.2
Sliding
Mo
de
............
..........
59
5.4.3
Discuss
ion
..............
..........
62
6
ConclusionsandFurtherWork
65
6.1
Conclusions
.................
..........
65
6.2
Furt
her
Wor
k................
..........
66
Bibliography
69
A
DefinitionsandLem
mas
71
B
AttachmentDescrip
tionandMatlabCode
73
B.1
Attac
hment
Description
..........
..........
73
B.2
Mat
labCo
de
................
..........
75
x
8/11/2019 Full Text 22
13/108
xi
8/11/2019 Full Text 22
14/108
8/11/2019 Full Text 22
15/108
AUV
AutonomousUn
derwaterVehicle
GNC
Gu
idance
,Navig
ationan
dControl
HIL
Har
dware
inthe
Loop
LOS
Lineof
Sight
LP
Low
Pass
NED
North-E
ast-
Dow
n
NED
North-E
ast-
Dow
n
PID
Proportional-In
tegral-D
erivat
ive
SMC
Sliding
Mo
deControl
UAS
Unmanned
Aerial
System
UAV
Unmanned
Aerial
Veh
icle
UDP
User
Datagram
Protoco
l
xiii
8/11/2019 Full Text 22
16/108
8/11/2019 Full Text 22
17/108
1.1
UAVusedinsearchand
rescueoperations....
......
3
2.1
Illustrationof
LineofS
ightprincip
le.......
......
8
2.2
Lineofsight
......
...............
......
9
2.3
Nav
igat
ion
inxyp
lanew
ithcirc
leofacceptance.
......
10
2.4
Block
diagramofa
kine
mat
iccontrol
ler
.....
......
11
3.1
Controlsurfaceson
Ces
sna
172SP
........
......
14
3.2
Block
diagramofa
PID
control
ler
........
......
15
3.3
Sta
bilityof
PIDcontro
ller
.............
......
16
3.4
Slidingmo
dew
ithchattering
dueto
delay
incont
roller
...
20
3.5
Phaseportraitofsl
idingmo
dew
ithboun
dary
layer
.....
21
4.1
Block
diagramofa
Guid
ance
,Nav
igat
ionan
dControl
System
23
4.2
Block
diagramofgu
idancesystem
........
......
24
4.3
Block
diagramof
imple
mente
dkinemat
iccontro
lforalti-
tudegu
idance
.....
...............
......
26
4.4
1stor
der
LPfilter
..
...............
......
27
4.5
Block
diagramofcontrolsystem
.........
......
28
4.6
Block
diagramofa
PID
control
lerw
ithanti-w
indup
....
29
4.7
Illustrationof
Cessna1
72sp
inX
-plane
......
......
34
5.1
Simu
lin
kX
-Planecomm
un
icat
ion
.........
......
35
5.2
Simu
lin
kblock
diagram
,commun
icat
ionw
ithX-P
lane
...
36
5.3
North-E
astan
dAltitude
[m]w
ithout
disturbances
andpay-
load
,measure
dvs
desired
.............
......
38
5.4
Rol
l,p
itchan
dyawangle
[deg
]w
ithout
disturba
ncesan
d
pay
load
,measure
dvsdes
ired
...........
......
39
xv
8/11/2019 Full Text 22
18/108
5.10Rol
l,p
itchan
dyawangle
[deg
]w
ithpay
loa
d,
measure
dvs
des
ired
....................
..........
45
5.11Angleofattackan
dsi
desl
ipangle
[deg
]wit
hpay
load
,mea-
sure
dvs
des
ired
...............
..........
46
5.12North-E
astan
dAltitu
de
[m]w
ithpay
load
,measure
dvs
des
ired
....................
..........
47
5.13Rol
l,p
itchan
dyawangle
[deg
]w
ithpay
loa
d,
measure
dvs
des
ired
....................
..........
48
5.14Angleofattackan
dsi
desl
ipangle
[deg
]wit
hpay
load
,mea-
sure
dvs
des
ired
...............
..........
49
5.15North-E
astan
dA
ltitu
de
[m]w
ith20ktwin
d,
measure
dvs
des
ired
....................
..........
50
5.16Rol
l,p
itchan
dyawangle
[deg
]w
ith20ktw
ind
,measure
d
vs
des
ired
..................
..........
51
5.17Angleofattackan
dsi
desl
ipangle
[deg
]w
ith20ktw
ind
,
measure
dvs
desire
d
............
..........
52
5.18North-E
astan
dA
ltitu
de
[m]w
ith20ktwin
d,
measure
dvs
des
ired
....................
..........
53
5.19Rol
l,p
itchan
dyawangle
[deg
]w
ith20ktw
ind
,measure
d
vs
des
ired
..................
..........
54
5.20Angleofattackan
dsi
desl
ipangle
[deg
]w
ith20ktw
ind
,
measure
dvs
desire
d
............
..........
55
5.21North-E
astan
dA
ltitu
de
[m]w
ith40ktwin
d,
measure
dvs
des
ired
....................
..........
56
5.22Rol
l,p
itchan
dyawangle
[deg
]w
ith40ktw
ind
,measure
d
vs
des
ired
..................
..........
57
xv
i
8/11/2019 Full Text 22
19/108
xv
ii
8/11/2019 Full Text 22
20/108
8/11/2019 Full Text 22
21/108
3.1
Controlsurfaces....
...............
......
13
4.1
Cessna
Spec
ifications.
...............
......
33
xix
8/11/2019 Full Text 22
22/108
8/11/2019 Full Text 22
23/108
There
aremany
differentop
inio
nsofw
hatan
Unmanned
Aer
ialVeh
icle
(UAV)is
.Many
bel
ievethattheyareon
lyuse
dform
ilitarypurposes
,but
thisis
far
fromthetruth
.Themost
important
defin
itionof
anUAVisthat
itisanaerialve
hiclew
ithouta
pilot
,Unmanned
Aer
ialVeh
icleSystem
Assoc
iation
[2012b].Withoutp
ilotmeansthattheaerial
vehicledonot
havea
piloton
boardnorap
ilotonthegroun
dinacontrolcenter,re
ferred
toasa
Groun
dControl
Station.
Iftheaerialve
hiclehasap
ilotongroun
d
whocancommun
icatew
iththe
vehicle
,itisre
ferredtoa
sa
Unmanned
Aer
ial
System
(UAS).The
UAV
ispreprogrammedan
dissupposedto
do
theop
erat
ionan
dcome
bac
kw
ithout
human
interference,
whilean
UAS
isremotelyoperated
duringthe
operat
ion
.
In
the
dictionary,the
UAV
isdefinedas:Apowered,aerialvehicle
thatdoesnotcarryahumanoperator,usesaerodynamic
forcestopro-
videvehiclelift,canflyautonom
ously,canbeexpendable
orrecoverable,
andca
ncarryalethalornonleth
alpayload.Ballisticorsem
iballisticvehi-
cles,cruisemissiles,andartilleryprojectilesarenotconsideredunmanned
aerial
vehicles.
AlsocalledUAV.
The
Free
Dictionary
[201
2].
1.1
Motivation
Origin
allythe
UAVswere
designed
form
ilitaryoperat
ion
s,but
inthese
dayst
heyare
des
igned
fornonm
ilitaryoperat
ionsaswell.
The
UAVscan
beuse
dto:
1
8/11/2019 Full Text 22
24/108
andmanyothertaskwhereitisnotnecessarytohaveahumanpiloton
board
.The
UAVtechnologyw
illnot
beapp
lied
in
commercialav
iation
industry
inthenear
futureas
itishar
dforpeopletotrustamac
hine
without
hav
inga
humanp
ilotobserv
ing.
Therearemanyadvan
tages
forusing
UAVs,suc
has:
1.Lowcost
2.Nonee
dforqual
ified
pilots
3.Savetime
byusingt
woormore
UAVsatthes
ametime
4.Nonee
dtomake
humanconsi
derat
ionsw
hen
des
ign
ingthe
UAV
5.Canoperate
inareasthatare
dangerous
forhumans
6.Have
longoperat
ion
timew
ithout
loos
ingprec
ision
Unmanned
Aer
ialVeh
icle
System
Associat
ion
[2012a].Figure
1.1illus-
trates
howan
UAVcanb
euse
dforsearch
ing
inopenseas
.By
hav
ing
many
UAVswor
kingtogether
inasearchoperat
ions
,livescan
besave
d.
8/11/2019 Full Text 22
25/108
Figur
e1.1:UAVuse
dinsearch
andrescueoperat
ions,
Jo
hansen
[2011]
Ho
wever
,therearesome
disadvantagesofusingan
UA
Van
dsomeof
themare
listed
here:
1.Limitat
iononpay
load
2.Can
loosecontactw
ithgro
un
dbase,must
havea
backupp
lan
3.Easytocras
h
4.Ap
ilotcanmon
itorw
ider
areas
1.2
Whathasbeend
one
UAV
Inwart
ime,manygreat
inventionsaremade.
Thishol
ds
for
UAVstoo.
Duringthe
Amer
ican
CivilWar
(1861-1865)the
firstun
mannedaerial
vehiclewastested
.Itwasa
balloonthatcarr
iedexp
losive
san
ddropped
8/11/2019 Full Text 22
26/108
morethan900civilianswhileinjuring35
.000
.
Inthe
1960san
d70s
,the
Un
ited
State
developed
UAVsthatwere
launched
fromap
lanean
dremotelycontrol
ledby
operatorsw
ithinthe
plane.
Later
inthe
1970s
and80s,
Israel
developed
smal
ler
UAVs.
They
cou
ldtransm
itlivev
ideo
witha
360-degreev
iew
.S
incetheyweresmal
l
theywere
inexpensivetopro
ducean
ddifficu
lttoshoot
down
.
Althoughthe
UAVtec
hnology
hasgonethrough
ahuge
development
throughoutthe
20thcentury
,itwas
first
inthe
199
0sthat
itgot
its
big
breakthroughw
iththe
Pre
datormade
bythe
U.S.D
epartmentof
Defense
,
How
Stu
ffWor
ks
[2012].
The
first
UAVswaspro
grammedto
fly
inastra
ight
lineoracirc
leunti
l
itranoutof
fuelan
dfelldown
,muchthesameasd
rones
donow
.Later
theygotra
diocommunicationsan
dcou
ldremotelyo
peratethe
UAV
,an
d
nowtheyarepreprogramm
edw
ithon
boardcontrola
ndgu
idancesystems.
Thegoal
istocreate
UAV
sthatmake
dec
isionsby
themse
lves
,w
ithout
human
interference
.
Autopilot
Tomakean
UAVfly
itnee
dsanautop
ilot
.Thereare
different
kindsof
autop
ilots,
fromthesimpleonesuse
dinsmal
lprivat
eboatstomorecom-
plexsystemsuse
don
for
instancesu
bmar
ines
,oilt
ankersan
daircra
fts.
The
firstattemptatanautop
ilotwasash
ipan
d
airp
lanestab
ilizer
in
1914by
Elmer
Sperry
(1860-1930)an
dhiscompany
Sperry
Gyroscope
Company,
IEEEGlobal
History
Networ
k[2012]
.Spe
rryan
dNicholas
Mi-
norsky
(1855-1970),w
hoformu
late
dtheProportional-Integral-Derivative
control
Bennett
[1984]
,wo
rkedtogetheran
dmai
da
hugecontr
ibutionto
8/11/2019 Full Text 22
27/108
Theguidancesystemisanimpor
tantpartofanautopilot.Itdeterminesa
pat
ht
ofollow
basedoncomman
dedsignals,suchaswayp
oints
,altitu
de,
speed,
etc.given
byanoperator
.
Gu
idancemet
ho
dsmade
formar
inecraftscaneasily
beapp
liedto
aerial
vehicles,espec
iallymetho
ds
forautonomousunderwaterve
hicles
(AUV)sincetheytoooperatein
6degreesof
free
dom
.Brhaugan
dPet-
tersen
[2005]uses
Lineof
Sightmet
ho
dforcross-trac
kcon
trol
forun
der-
actuat
edautonomousve
hiclesonan
AUVan
dBre
ivikan
dFossen
[2008]
proposes
differentgu
idance
laws
for
AUVs.
Theseareal
lba
sedonstra
ight
linesb
etweencomman
dedwayp
oints
.Ifthepat
hdoesnotconsistsof
stra
ight
lines
,thepat
hhasto
be
parametrize
dan
da
kinem
aticcontrol
ler
canbe
app
lied
,Skjetneetal
.[2003]an
dFossen
[2011b].
Control
When
itcomestothecontrolsystem
inanautop
ilot
,thechoicesaremany.
Them
ostuse
dcontrol
ler
inthe
industry
isthethreeterm
,proportional-
integral-derivative(PID),contro
llerw
hichdates
bac
kto1
890s
,w
iththe
firstpract
icalexamp
lefrom
1911by
Elmer
Sperry
,Bennett
[1984]
.This
isalin
earcontrol
ler,
but
ithasb
eenuse
donnon
linearsystemssuchas
for
anUA
Vquadrotor
Sal
ihetal
.[2
010]an
dforan
UAVfixed
-wing
Albaker
andR
ahim[2011]
.Thesearedecoup
ledcontrol
lers
,givin
gyou
different
contro
llers
forspee
d,
altitu
de,p
itchangle,
hea
dingangle,
etc.
For
bas
ic
PIDt
heorysee
Balchenetal.
[2003]an
dPIDcontrol
fo
rmar
inecraft
Fossen
[2011b].
Slidingmo
decontrol
isanot
herw
idelyuse
dcontrol
ler.
Thisisanon-
linear
met
ho
dan
dw
illbemorero
bustw
henuse
donanon
linearsystem
.
8/11/2019 Full Text 22
28/108
y
g
other
.The
firstw
illbea
PIDcontrol
ler,muchused
inthe
industry
,an
d
thesecon
da
Sliding
Mode
control
ler.
The
lastcontr
oller
isnon
linearan
d
morero
bustthanthe
PID
.Slidingmo
dew
illon
lybeuse
dforp
itchan
d
altitu
decontrol
,w
hile
PID
willta
kecareofturn
ingcontrolaswel
lasp
itch
andaltitu
de.
Theautopilot
des
ign
issupposedto
ha
ndlevary
ingpay
load
andw
ind
.Thegu
idancesystemw
illmakeapat
hforthe
UAVto
follow
basedonwaypointsgiven
.
Theoutl
ineofth
isthes
isisas
follows:
InChapter2t
hetheoryofgu
idance
systemw
illbepresente
d.
Controlsystemtheory
is
descr
ibed
inChapter
3,w
hilethe
des
ignoftheoveral
lgu
idance
,nav
igatio
nan
dcontrolsystem
isinChapter
4.Simu
lati
onstu
diesan
dresu
lts
for
the
differentcontrol
strategiesproposed
ispresente
dinChapter
5.Conclusionan
dsuggestions
for
furt
herwor
kw
illbefo
un
dinChapter
6.
8/11/2019 Full Text 22
29/108
Toma
keanautop
ilot
,itisnec
essaryto
haveagoo
dgu
idancesystem
.
There
aremanywaysofmak
ing
agu
idancesysteman
ditisadvantageous
tokno
ww
hattheautop
ilot
issu
pposedto
dow
henchoosingthemet
ho
d.
Isitsupposedtotrac
katargetw
hichismov
ingorstan
dingst
ill,isit
suppose
dtotrac
katra
jectoryor
just
followapre
definedpat
h?Track
ing
atargetoratra
jectory
isoften
time
depen
dent,w
hilea
pat
h-f
ollow
ing
met
ho
distime
indepen
dent.
In
thisthes
isapat
h-f
ollowingmet
ho
dforgu
idance
isu
sed
.Sinceth
is
autop
ilot
issupposedtocontro
lanaerialve
hicle
,thegu
idancesystem
musth
andlethree
dimensions.Itw
illbe
decoup
ledintotwoparts
,one
for
hor
izonta
lmot
ion
,North-E
ast,a
ndone
forvert
icalmot
ion
,altitu
de.
The
guidan
cesystemw
illbemak
ing
thepat
hto
follow
inNort
h-E
ast-
Down
(NED)coor
dinates
,w
herex
isN
orth
,y
isEastan
dz
isdown
,oraltitu
de,
see
Ap
pen
dixA
.Thealtitu
deis
thenegat
iveof
down
.
2.1
LineofSightGuidanceforPath-Following
Lineo
fSight
(LOS)isagu
idanc
emet
ho
dw
hichcan
beus
edforal
lthree
scenar
iospresente
dabove;targe
ttrac
king,tra
jectorytrac
kingan
dpat
h-
follow
ing.
Themet
ho
disclassifiedasathree-pointgu
idanc
esc
heme,since
itinvo
lvesare
ferencepoint,the
UAVan
datargetoraset
pointthe
UAV
issupposedtogoto
.ThenameLineofSightcomes
from
theprincip
le
ofthe
met
ho
d.
Itissupposedto
followthe
line,
LOSve
ctor
,fromthe
7
8/11/2019 Full Text 22
30/108
Figure
2.1:Illustrationof
Lineof
Sight
princip
le
Consi
dertwowaypointspk=
[xk
yk]R2and
pk+1
=[x
k+1
yk+1
]
R2
andastra
ight
line
betweenthem
,Figure
2.2.Th
eaim
istomakethe
aircra
ftfollowth
isstra
ight
line,
bymak
ingthecross-t
rackerroreassmal
l
aspossi
ble:
lim
t
e(t)=
0
(2.1
)
wherethecross-trac
kerror
isgiven
by:
e(t)=
[x(t)xk
]sin(
k)+
[y(t)yk
]cos
(k
)
(2.2
)
andtheangle,k,
use
dto
rotatethenorth-a
xisinthepat
h-fi
xedre
ference
framew
ithor
igininp
n k,in
Figure
2.2,iswrittenas:
k:=atan
2(y
k+1yk,x
k+1xk
)S:
=[,
]
(2.3
)
Toensurethatthecross-t
rackerrore(t)
0forbot
hcases,enclosure-
basedor
lookahea
d-b
ased
steeringgu
idanceprinciplescan
beuse
d.
Since
the
lookahea
d-b
asedmeth
odhassevera
ladvantagesovertheenclosure-
basedmet
ho
d,
Fossen
[2011b],a
lookahea
d-b
aseda
pproac
hw
illbeuse
d
inth
isthes
is.
8/11/2019 Full Text 22
31/108
Figure
2.2:Line
ofsight,
Johansen
[2011]
Lookahead-Basedsteering
Thelo
okahea
d-b
asedapproac
hisaverysimp
leapproac
han
discom
bined
oftwo
parts:
d(e)
=
p+
r(e)
(2.4
)
where
p
=k
(2.5
)
from
E
quat
ion
2.3.
pisca
lled
thepath-tangentialangle
.Thevelocity-
pathrelativeangle
r(e)can
beimp
lemente
dasacontrol
laww
ithon
lya
proport
ionalaction:
r
(e)=
arctan
(K
pe)
(2.6
)
where
Kp
(t)
=1/(t)>
0an
d
isthe
lookahea
ddistance.
Th
econtrolsystemuses
head
ingangleinstea
dofcourseanglean
d
itisnecessarytotransformthecourseangletothe
hea
dingangle
by:
d=d
(2.7
)
where
isthesi
des
lipanglewh
ichcan
becompute
dby:
=
arcs
in(v U
)
(2.8
)
8/11/2019 Full Text 22
32/108
andyiseastfromtheNEDcoordinateframe.When
theaircraftisinside
acirc
lew
ithra
diusR
k+1
R1
aroun
dthepoint[xk+1
yk+1
],
ascan
beseen
inFigure
2.3,th
egu
idancesystemshould
changetothenext
waypoint.
Thepos
itionof
theaircra
fthastosatisfy:
[xk+1x
(t)]2+
[yk+1y(t)
]2R
2 k+1
(2.1
0)
attimettochangethewaypoint,
Fossen
[2011b].
Figure
2.3showsthec
ircleofacceptanceprincip
leinthetwo
dimen-
sionalp
lane.
Figure
2.3:Nav
igat
ion
inxyp
lanew
ithcircle
ofacceptance
8/11/2019 Full Text 22
33/108
tan
(w/u)andismeasuredpitchangle.=()iscalledtheflight
path.Donotm
ixth
isw
iththek
inLOS
.
Transform
ing
Equat
ion
2.11
tothe
des
iredsignalweget:
hd=U(
d
)
(2.1
2)
Thea
imistore
ducethe
difference
betweenmeasure
daltitu
dean
ddes
ired
altitud
etozero
,h
dh
0,by
feed
ingthecontrolsystem
des
iredp
itch
angle.
Thiscan
be
done
byapp
lyinga
P-c
ontrol
ler,more
descr
ibed
in
Chapt
er3,suchthatthe
des
ired
pitchangledbecomes:
d=
1 U(hd
K
p(h
dh))+
(2.1
3)
Kp
isacontrol
lerga
inan
disgiven
byK
p=
2>
0w
her
eisa
des
ign
param
eter
.h
disgiven
bythere
ferencemo
delw
hichw
illbe
descr
ibed
in
Section
4.1.Thiskinemat
iccont
roller
isillustrate
dinablock
diagram
in
Figure
2.4.
Figure
2.4:Block
diagramofa
kinemat
iccontrol
ler
8/11/2019 Full Text 22
34/108
8/11/2019 Full Text 22
35/108
Co
ntrolTheo
ry
An
UA
Visto
becontrol
ledinthismasterthes
is.
Inthesimu
lationpro-
gram
beinguse
d,
X-P
lane,thereareno
UAVflightmode
l.Instea
d,
the
contro
lsystem
des
igned
inth
ism
asterthes
isisapp
liedona
Cessna
172SP
.
ThisC
essna
has
fourcontrolsur
facesgiven
inTab
le3.1an
dillustrate
din
Figure
3.1.
Tab
le3.1:
Controlsurfaces
ControlSurface
Action
Motor
Spee
dforwar
d
Surge
Aileron
Ban
kedTurn
Roll
Elevator
Takeo
ff
Pitch
Ru
dder
Turn
ing
Yaw
13
8/11/2019 Full Text 22
36/108
Figure
3.1:Controlsurfaceson
Cessna
172SP
3.1
PIDControl
Inth
isthes
istwo
different
controlsystemsw
illbedes
igned
.The
firstone
isaregu
lar
Proportional-
Integral-D
erivat
ive
(PID)control
ler.
PIDisthe
mostw
idelyuse
dcontrol
ler
inthe
industry
because
itiseasyto
imp
le-
mentan
dmainta
in.
Thecontrol
ler
islinearan
dishe
reapp
liedtoa
highly
non
linearsystem
,but
itw
illwor
knonet
heless.
Theaimofa
PIDcontrol
ler
istomaketheerrorof
thesignal
,the
differ-
ence
betweenwante
dsignalan
dactualsignal
,assmal
laspossi
ble
,i.e.go
tozero
,bymak
ingcontro
lsignalstotheprocess:
lim
t
e=
lim
t
xdx
0
(3.1
)
Thiscan
be
donew
ith
four
differentcontrol
lers,
Balchenetal
.[2003]
Proportional
(P)con
trol
ler
Proportional-I
ntegra
l(PI)control
ler
Proportional-D
erivative
(PD)control
ler
Proportional-I
ntegra
l-Der
ivat
ive
(PID)contro
ller
8/11/2019 Full Text 22
37/108
contro
ller.isthecontrolsignal,whichwillbesenttotheprocess.
Th
eproportionaltermgivesa
noutputthat
isproportionaltotheerror.
Tooh
ighproportionalga
inK
pc
angiveanunstab
leprocess
.
Th
eintegralterm
isproportionalto
bot
hthe
durationo
ftheerroran
d
themagn
itu
deof
it.
The
integr
alterm
dea
lsw
ithstea
dy
-stateerror
by
acceleratethemovementoftheprocesstowar
dssetpoint.
It
cancontr
ibute
toan
overshoot
because
itrespon
dstoaccumu
late
derror
fromthepast
which
can
beso
lved
byad
dingt
he
der
ivat
iveterm
.
Th
eder
ivat
ivetermslowsdo
wntherateofchangeofthecontrolsig-
nalan
dmakestheovershootsm
aller.
Thecom
binedcontrol
ler-process
stab
ility
isimprove
dbythe
deriv
ativeterm
,but
itcou
ldmaketheprocess
unstab
lebecause
itissensitivetonoise
intheerrorsignal
,Wikiped
ia-
PID[2
012]
.
Figure
3.2showsa
block
diagramofaregu
lar
PIDcontrol
ler.
F
igure
3.2:Block
diagramofa
PIDcontrol
ler,
Johansen
[2011]
8/11/2019 Full Text 22
38/108
Figure
3.3:Stabi
lityof
PIDcontrol
ler,
Johansen
[2011]
3.2
SlidingModeControl
Sliding
Mo
de
Control
(SM
C)isaro
bust-n
onlinearcontrol
ler,muchuse
d
onmar
ineve
hicles,
Fossen
[2011b].Sincemar
ineveh
iclesan
daerialve
hi-
8/11/2019 Full Text 22
39/108
+
+(,)
(3)
where
xisse
lectedstates
from
=N
E
D
TR6
and=
UV
W
P
Q
RTR6,
depen
dentofw
hatshould
becontrol
led
.
uisth
econtrolsignal;motor
,ru
dder
,ai
leronorelevator,
M,
R,
Aor
Eres
pective
ly.
f(x,t
)isanon
linear
funct
ion
descr
ibing
the
dev
iation
from
linearity
intermsof
distur
bancesan
dunmo
deled
dynam
ics,
Fossen
[2011b
].
Letx=
Q
ZT
,w
here
Z=D
,an
du=E
,A
andBmatrix
becom
es:
A=
a11
a12
0
10
0
0U
0
0 ,
B=
b10 0
(3.5
)
forpit
chan
daltitu
decontrol
.T
he
feed
bac
kcontrol
lawis
writtenas:
u=
kx+u0
(3.6
)
where
kR3
isfeed
bac
kga
invector
,compute
dbypolep
lacement.
By
substituting
Equat
ion
3.6intoE
quat
ion
3.4weget:
x=Ax+B(
kx+u0
)+f(x,t
)
=(ABk
)x+Bu0
+f(x,t
)
=A
cx+Bu
0+f(x,t
)
(3.7
)
To
fin
dagoo
dcontrol
law,d
efinethesl
idingsurface
s=hx
(3.8
)
8/11/2019 Full Text 22
40/108
AssuminghB=0,ch
oosethenonlinearcontrollawas:
u0
=hB1[hxd
hf(x,t
)sgn
(s)]>
0
(3.1
0)
wheref(x,t
)istheestimateoff(x,t
)an
dsgn
(s)isthesignum
funct
ion:
s
gn(s)
= 1,
s>
0
0,
s=
0
1,s||h||||f(x,t
)||
(3.2
0)
where
||X||detonatesthenormofX
.
8/11/2019 Full Text 22
42/108
whenthetrajectoryreach
estheslidingsurface,s=
0,ina,itbeginsto
dri
ftaway
dueto
delay
be
tweenthetimesigntossw
itchesan
dthecon-
trol
lersw
itches
.Whenthe
control
lersw
itches
,thetr
ajectoryreversesan
d
themot
ionw
illbetowardsthesl
idingsurfaceagain
.
Figure
3.4:Slidingmo
dew
ithchattering
dueto
delay
incontrol
ler,
Khal
il
[2002] C
hatteringcan
leadto
lowcontrolaccuracy
,wear
andtearofactuators
andinworstcase
leadto
unmo
deled
high
-frequent
dynam
icsw
hichcan
leadtoworseper
formance
ofthesysteman
dunstab
ility.
8/11/2019 Full Text 22
43/108
Figure
3.5:Phaseportraitofsl
idingmo
dew
ithboun
dary
layer,
Fossen
[2011b
]
Thea
imofsl
idingmo
decontro
listomakeacontrol
lawthatensures
s
0
infin
itetime,
Figure
3.5.
Th
isisthe
bas
icidea
beh
indsl
idingmo
de,
butthereare
many
different
approac
hesofusingsl
idingmode
inautop
ilot
des
ign
foran
UAV
.
8/11/2019 Full Text 22
44/108
8/11/2019 Full Text 22
45/108
De
signofGN
CSystem
Anau
top
ilotconsistofa
Gu
idance
,Nav
igat
ionan
dContr
ol(GNC)Sys-
tem
,F
igure
4.1.Gu
idancetake
scareof
inputtothesys
tem
,inputsas
waypo
intsan
ddes
iredspee
d,a
nddeterm
inethe
des
ired
pat
hfromthe
curren
tlocationoftheaircra
fttothe
des
iredwaypoint.
Gu
idance
isof-
ten
de
coup
ledontore
ferencemo
delan
dgu
idancesystemw
herere
ference
mo
del
dea
lsw
ithcomman
dedsignalsan
dgu
idance
determ
inesthepat
h.
Nav
igat
ion
determ
inesthe
locat
ionan
daltitu
deoftheaircraftatagiven
time.
Thecontrolsystemensuresthattheaircra
ftfollowst
he
des
iredpat
h
andaltitu
de
byman
ipu
latingthecontrolsurfaces
.
Figure
4.1:Block
diagramofaG
uidance
,Nav
igat
ionan
dC
ontrol
System
23
8/11/2019 Full Text 22
46/108
Figure
4.2:B
lock
diagramofgu
idance
system
4.1.1
ReferenceModel
Signals
intothegu
idance
systemaregiven
bythere
ferencemo
del
.An
operator
determ
inesw
herethe
UAVissupposedto
goinNorth-E
astco-
ordinates
,atw
hichaltitu
dean
dspee
d.
Theseare
comman
dedsignals.
Sincethegu
idancesystem
foraltitu
de
doesnottoleratestepsas
inputs
,
there
ferencemo
del
hastosmoot
houtth
issignals.
Thiscan
be
done
by
ath
ird
-order
Low
Pass(L
P)filterw
iththestructure:
xd r(s)
=h
lp(s)
(4.1
)
wherexd
isdes
iredstate,
risthere
ferencesignalg
iven
byoperatoran
d
hlp
isthe
LPfilter
.Thechoiceof
filtershou
ldbebasedonthep
hysics
ofthesystem
itissuppos
edtowor
kon
,an
dformar
inecraftan
daerial
8/11/2019 Full Text 22
47/108
hdh
c=
3
s3+
(2+1)s2+
(2+
1)2s+3
(4.3
)
where
hc
isthecomman
dedaltitu
dean
dh
disthe
des
ired
altitu
dew
hich
willbesenttothegu
idancesyst
em.
Th
ecomman
dedaltitu
deis
set
byanoperator
bysp
ecify
ingw
hich
altitud
eisdes
iredatw
hattime.
Un
derta
keoff
,thealtitud
eissettozero
thefir
stsecon
ds,
becausetheU
AVnee
dsacertainspeed
tobeab
leto
liftoff.
Pos
ition
inNEDan
dspee
disse
nt
directlytogu
idance
,pos
itionasway-
points
andspee
dasavectorwithcomman
dedspee
dwante
dat
different
times,
asforaltitu
de.
4.1.2
GuidanceSystem
LOSforNorth-East
TheL
OSgu
idancemet
ho
dfor
calcu
lating
des
ired
hea
din
ganglewas
des
ign
edas
descr
ibed
inSection
2.1.Waypointsarecom
man
ded
byan
operat
orinthesimu
lation
fileSim
GNCSystem
.m,
Append
ixB
.Tosw
itch
fromo
newaypointtothenext,
acirc
leofacceptancetest
isapp
lied
,as
mentioned
.To
fin
dthera
diuso
fthecirc
le,
testsimu
lation
has
been
done
andth
eva
lue
has
beensettoR
k+1
=1600inEquat
ion
2.10
.
Whenca
lcu
latingthe
des
ired
hea
dingangle
fromcourse
anglegiven
by
theLO
Smet
ho
d,
Equat
ion
2.7,
itisnecessaryto
havethesi
des
lipangle
.
Th
isangle
isper
fect
lymeasure
dinthesimu
lationpro
gram
X-p
lane,
anddoesnotnee
dto
beca
lculate
d.
8/11/2019 Full Text 22
48/108
Figure
4.3:Block
diagram
ofimp
lemente
dkinemat
iccontrol
foraltitu
de
guidance
LPforSpeed
Sincethe
UAVdoesnot
han
dlestepsas
input,th
ecomman
dedspee
d
nee
dsto
besmoot
hed
.Th
iscan
be
done
byapp
lyinga
1stor
der
lowpass
filter:
UdU
c=
11+Ts
(4.4
)
whereU
disthe
des
iredspeedgiventothecontrolsystem
,Uc
iscomman
ded
spee
dan
dTisthetimeconstantgiven
byT
=1/
>0.The
LPfilter
is
imp
lemente
das
inFigure
4.4.
8/11/2019 Full Text 22
49/108
flectionsaresaturatedduetophysicallimitationsontheaircraft.Aileron,
elevatoran
dru
dder
doesnot
have
360degreesofoperat
ionarea
.
4.2
Navigation
Thenav
igat
ionsystem
issupposedto
determ
inethepos
itionoftheaircra
ft
atag
iventimet.
Itcou
ldinclu
dea
filter
for
filter
ingmeasurementnoise
caused
by
for
instancenoise
inse
nsors
,waves
,currentan
dw
ind
.Oftenan
observ
erisuse
dfor
filter
ingan
ds
tateestimat
iontoestimateunmeasura
ble
signalsorestimatestates
ifthesignals
dropsout.
In
thisthes
ishowever
,perfectmeasure
dsignalsareassumedan
dan
observ
eristhereforenotnecessary
.
4.3
ControlSystem
Thecontrolsystem
has
beenim
plemente
dfirstw
ithPID
control
,then
withslidingmo
decontrol
.ThePIDcontrol
ler
has
beenm
adetotestthe
guidan
cesystem
,han
dleturn
ing
operat
ionsan
dtocompareper
formance
withslidingmo
decontrol
.
4.3.1
PID
Thefirstcontrol
ler,
PIDcontrol
ler,was
imp
lemente
das
de
scri
bed
inSec-
tion
3.1.
Thecontrolsystemw
asdecoup
ledinto
fourparts
,forspee
d
contro
l,ro
llcontrol
,p
itchcontro
lan
dyawcontrol
,see
Fig
ure
4.5.
8/11/2019 Full Text 22
50/108
Figure
4.5:
Block
diagramofcontrolsystem
WithM,
A,
E,
Ras
inputtomotor
,ai
leron,
elevatoran
dru
dder
,
respective
ly,
andU,,,
asspee
d,
roll
,p
itchan
d
yaw
,respective
ly,
we
getthecontrolequat
ions
inEquat
ion
4.5:
M=K
p(U
dU(t))+
Ki
t 0(U
dU())d+Kd
d dt(
UdU(t))
A=K
p(
d(t))+K
i
t 0(
d())d+K
dd d
t(
d(t))
E=K
p(
d(t)
)+K
i
t 0(
d(
))d+K
dd dt
(d(t)
)
R=K
p(
d(t))+
Ki
t 0(
d())d+Kd
d dt(
d(t))
(4.5
)
Since
X-p
lane
haveperfectmeasurementsthere
isnonee
dtota
kethe
der
ivat
iveofthesignalsan
dthe
lastterm
intheequat
ionsabove,except
8/11/2019 Full Text 22
51/108
givea
satisfyingbehavior.
Anti-Windup
Anti-w
indup
isan
importantpartof
PIDcontrol
.Itisapp
liedto
PID
contro
ltopreventovershootma
de
bythe
integralterm
in
Equat
ion
4.5.
Theovers
hootmayoccurw
hen
alargechange
insetpointoccurs
,then
theintegraltermaccumu
latesa
sign
ificanterror
duringth
erise
,alsore-
ferred
toasw
indup
.Itthenovershootsan
dcontinuesto
increaseasthe
accum
ulate
derror
isoffset
byer
rors
intheot
her
direction
.
To
preventth
isasaturation
isapp
liedonthecontrolle
rsoutputan
d
thisis
subtracte
dfromthe
integra
lactionsignal
.Withanti-w
indup
,Fig
-
ure
3.2ischange
dto
Figure
4.6.
Figure
4.6:Block
diagramofa
PIDcontrol
lerw
ithan
ti-w
indup
8/11/2019 Full Text 22
52/108
Q Z
= a11
a12
0
1
0
0
0
U0
0 Q
Z
+ b10 0
E+
0 0
U0
(4.7
)
from
Equat
ion
3.4.
Theequat
ion
for
Qisfoun
dbysystem
identi
fica
tionan
d
=
Pcos()
sin()Q
(4.8
)
h
=
U0
sin
()+V
cos()sin
()+Wcos()cos()U0W(4
.9)
whereh
=Z
,V
=P
=0,
W
=U0an
dassumedsmal
lva
luesofan
d
.Slidingsurface
from
Equat
ion
3.8becomes:
s=h1
(Q
Qd
)+h2
(d)+h3
(ZZ
d)
(4.1
0)
From
Equat
ion
3.6:
u=kx+u0
=kx+hB1
[hxd
hf(x,t
)
sgn
(s)]
(4.1
1)
thep
itchan
daltitu
decon
trol
law
foru=Eis:
E=k1Qk3Z+
1h1b
1[h1
Qd+h2
d+h3
Zdh3f3sat
(s)](4
.12)
sgn
(s)isrep
lace
dbysat(s)toavoi
dchattering,as
exp
lained
inSection
3.2.
8/11/2019 Full Text 22
53/108
used,whereunknownparametersinalinearregressionmodelwillbees-
timate
d.
Consi
derkindepen
den
tvariab
lesx1,x2,,x
kan
dnobserva-
tionsy1,y2,,yn,
thisgivethe
mu
ltiplelinearregression
mo
del:
yi=
1x1i
+2x2i
+
+
kxki
+ii
=1,2,,n
and
n>k
(4.1
3)
which
willbeestimatedas:
yi=b1x1i
+b
2x2i
+
+bkxki
+ei
(4.1
4)
where
ian
dei
isran
domerroran
dresi
dualassociatedwiththeresponse
ofyiw
hilebiistheestimateo
f
iestimated
fromsamp
lesof
data
by
applying
leastsquaresystem
ide
nti
ficationmet
ho
d.
Th
emu
ltiplelinearregression
mo
delcan
bewrittenona
morecompact
forma
s:
y
=X
+
(4.1
5)
where: y
= y1y2 . . . yn
,
X=
x11
x21
xk1
x12
x22
xk2
. . .
. . .
. . .
x1n
x2n
xkn
,
= 1
2 . . .
k
(4.1
6)
No
wwewantto
fin
dabtha
tm
inimizes:
SSE
=
n i=1
e2i=
n i=1
(y1
b1x1ib2x2ibkxki
)2
=(yX
b)(yXb)
(4.1
7)
8/11/2019 Full Text 22
54/108
(
)
y
(
)
Walpole
[2002]
.
Forp
itchtheun
known
parametersarea11,a12a
ndb1inEquat
ion
4.7
suchthatthemu
ltiplelinearregressionmo
del
becom
es:
Q
=Q
E
a11
a12b1
(4.2
1)
whereQisp
itchrate
,isp
itchange
lan
dEisdesiredelevator
deflection
.
4.4
X-Plane
Tosimu
latetheautop
ilot,
itisnecessaryto
havea
goo
daircra
ftmo
del
.
Therearemanymet
hods
togetanaircra
ftmo
del;
makeone
inMat
lab
Simu
lin
kbasedonequationsofmot
ion
foranaircraft
,useamo
delalready
made
inMat
labSimu
link
or,
ashas
been
done
inth
isthes
is,
usea
flight
simu
latorprogram
.X
-Plane,
X-P
lane
9[2012]
,isas
imu
latormain
lyuse
d
tosimu
late
flights
byuseo
fpedalsan
djoyst
ickan
dto
des
ignnewaircra
fts.
Inth
isthes
isthe
flightsim
ulator
has
beenuse
dtosimu
latethe
des
igned
autop
ilot
.To
dothat
,the
data
fromtheautop
ilotsystem
has
beensentto
the
flightsimu
lator
byaU
ser
Datagram
Protoco
l(U
DP)block
inMat
lab
Simu
lin
kan
dan
inbu
iltp
lugin
inX
-Plane.
Beforethesignalsenters
X-P
lane,
ithas
beenal
locate
dto
fit
input
for
X-P
lane.
X-P
lane
isse
ttingmotor
,leftan
dright
aileron
,elevatoran
d
rudder
,butthecontrolsy
stem
isgivenoutmotor,
aileron
,elevatoran
d
rudder
.Thismeansthatthesignals
forai
leron
deflection
hasto
besp
lit
8/11/2019 Full Text 22
55/108
where
LAmeans
leftai
leronan
dR
Ameansrightai
leron
.Theru
dder
is
weighte
dlowsince
itisdes
irable
touseai
lerons
forturn
.
4.4.1
Cessna172SP
Asme
ntioned
inChapter
3,aC
essna,notan
UAV
,hasb
eenuse
dasan
aircra
ftmo
del
inth
isthes
is,
Fig
ure
4.7.The
Cessna
hast
hecontrolsur-
faces:
aileronon
bot
hw
ingsand
rudderonthetrai
lingedgeofthevert
ical
stab
ilizeruse
dfor
hea
ding,eleva
tor
bac
konthetrai
linge
dgeofthe
hor-
izonta
lstab
ilizer
forp
itchan
da
motor
for
forwar
dthrust
.Spec
ifications
for
Cessnacan
beseen
inTab
le
4.1.
Ta
ble4.1:Cessna
Spec
ificat
ions,
Cessna
Aircraft
Company
[2012]
Length
8.28m
Heig
ht
2.72m
Wingspan
11.0
0m
WingA
rea
16.2
0m2
Weig
ht
779kg
Max
Takeoff
Pay
load
378kg
Max
Takeo
ffWeight
1157kg
8/11/2019 Full Text 22
56/108
Figure
4.7:Illu
strationof
Cessna
172spi
nX
-plane
8/11/2019 Full Text 22
57/108
Ca
seStudy
Toma
kehar
dware
inthe
loop(
HIL)test
ingofthegu
idan
cean
dcontrol
system
des
ign
,the
flightsimulat
orX
-Plane
has
beenused
.Thegu
idance
andco
ntrolsystem
isdes
igned
in
Mat
labSimu
lin
kan
dthe
controlsignals
aresentto
X-P
lane
bya
X-P
lanep
lugin
,see
Figure
5.1for
X-P
lanecom-
municat
ion
.From
X-P
lane,themeasure
dsignalsaresenttothegu
idance
andco
ntrolsystem
inSimu
link,
see
Figure
5.2.
Figure
5.1:Simulin
kX
-Planecommun
icat
ion
35
8/11/2019 Full Text 22
58/108
Figure
5.2:Simu
lin
kb
lock
diagram
,commun
icationw
ithX
-Plane
Thecommun
icat
ionw
ithX
-Plane
isdone
byUDPprotoco
l.This
makes
itpossi
bletorunt
hesimu
lation
inMat
labS
imu
lin
kan
dX
-Plane
ontwo
differentcompute
rs.
However
,inth
isthesis
ital
lrunonone
computer.
Thesimu
lation
isdone
inrealtime.
Since
X-P
lane
isused
asflightmo
delan
dv
isua
lization
,thegu
idance
andcontrolsystem
has
be
entestedona
Cessna
insteadofan
UAV
.The
X-P
lanesimu
lator
hadno
UAVavai
lable
.As
longasthecontrolsignals
sent
fromthecontrolsystemget
distr
ibute
dtotherightcontrolsurfaces
ontheaircra
ft,
thegu
ida
ncean
dcontrolsystem
des
igned
inth
isthes
is
cou
ldbeapp
liedtoanyU
AVsorregu
laraircra
fts.
Thepurposeofth
isthe
siswasto
invest
igate
differ
entmet
ho
ds
for
UAV
autop
ilot
des
ign
.Twod
ifferentcontrol
lerswerec
hosen
,Proportional-
Integral-D
erivat
ive
(PID)
,an
dsl
idingmo
decontrol
.The
PIDisa
linear
control
lerw
hichdoesnot
nee
dmo
delparameter
in
format
ion
,w
hilethe
slidingmo
de
isbasedont
heaircra
ftmo
del
.Sliding
mo
de
ismorero
bust
thatcan
han
dlemo
deluncertainties
.PIDisw
idely
use
dan
disaper
fect
control
lertocompare
behav
iorw
ithot
hercontrolm
etho
ds.
An
UAVmust
beable
tooperateun
dercertaincon
ditions.
Itw
illbe
exposedtow
indan
dithasto
beab
letocarryapay
loadsuchascameras
,
sensorsan
dcommun
icatio
nequ
ipment.
Thegu
idancean
dcontrolsystem
willbetested
inthe
follow
ing
fourscenar
ios:
Without
disturbancesan
dpay
load
,Section
5.1
Withpay
load
,now
ind
,Section
5.2
8/11/2019 Full Text 22
59/108
g
,
g
10000
metersnorthan
d8000meterseast
.Whenreac
hing
analtitu
deof
500meters,
itw
illremainat
500
.
Whenthesimu
lationstarts,
des
iredaltitu
de
issettozerosothatthe
speedcontrol
ler
istheon
lyonew
orking.
Thisisbecausetheaircra
ftnee
ds
acertainspee
dto
beab
letota
keoffan
dth
iscon
ditionho
lds
foral
lfour
testca
ses.
Theta
keoffspee
dissetto
80knots,w
hilethe
cru
isespee
dis
setto
48knots.
Foreachcase
,sevenp
lotswi
llbepresente
d;pos
itionin
North-E
astvs
des
ired
,measure
daltitu
devsdesire
d,
measure
dro
ll,
pitch
andyawangle
vs
desired
,angleofattackan
dthesi
des
lipangle.
Th
esimu
lations
have
beend
one
inMat
labSimu
lin
ka
ndX
-plane
in-
terface
has
beenuse
dasaircraft
mo
delan
dv
isual
izat
ion,
Section
4.4.To
simula
te,
usethem
inigu
ide
inAppen
dixCforcomputer
setupan
drun
theattachedSimGNCSystem.m
file
.Makesureal
lfiles
listed
inAppen
dix
Bare
inthesame
folder
.
5.1
Withoutdisturbancesandpayload
Firstthe
UAVhas
beensimulate
dw
ithper
fectcon
dition
s,w
ithout
dis
-
turban
cessuchasw
indan
dwith
outpay
load
.
8/11/2019 Full Text 22
60/108
0
2000
4000
6000
8000
10000
12000
14000
20000
2000
4000
6000
East
North
Measured
Desired
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2x104
0
100
200
300
400
500
Time
Altitude
Figure
5.3:North-E
astan
dAltitu
de
[m]w
ithoutd
isturbancesan
dpay-
load
,measure
dvs
des
ired
Ascan
beseen
from
Figure
5.3,thecontrolsyste
mfollowsthe
des
ired
pat
h.
There
isasmal
lover
shootof
40meters
inheadi
ngatthe
firstturn
ing
maneuver,
butth
isisconsi
deredsmal
lenoughtono
tcausepro
blems.
8/11/2019 Full Text 22
61/108
0
0.5
1
1.5
2
x104
200
20
Time
PitchAngle
0.2
0.4
0.6
0.
8
1
1.2
1.4
1.6
1.8
2
x104
1000
100
Time
YawAngle
Measured
Desired
Figure
5.4:Rol
l,p
itchan
dyawangle
[deg
]w
ithout
dis
turbancesan
d
pay
loa
d,
measure
dvs
des
ired
From
Figure
5.4itisseenth
atthecontrolsystem
follo
wsthe
des
ired
roll,pitchan
dyawanglessatisfa
ctor
ily.
Allanglesare
ind
egrees
.
8/11/2019 Full Text 22
62/108
x104
Time
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
x104
2
1.5
1
0.50
0.51
Time
SideslipAngle
Figure
5.5:Angleofattac
kan
dsi
desl
ipangle
[deg]
without
disturbances
andpay
load
,measure
dvs
des
ired
Figure
5.5showsthe
angleofattackan
dsidesl
ipangle.
Angleof
attack
istheangle
betweenare
ference
lineonthea
ircraftan
dthevector
representingthere
lativem
otion
.Sides
lipangle
istheangle
betweenthe
aircra
ftcenterl
inean
dthe
vectorofre
lativew
indwo
rkingontheaircra
ft.
Theangleofattack
isvary
ingastheaircra
ftascend
san
dthenstab
ilizes
whentheaircra
ftisatthecru
isingaltitu
de.
Thes
ides
lipangle
issmal
l,
closetozerow
ithsmal
lsp
ikes
.
8/11/2019 Full Text 22
63/108
0
5000
10000
15
000
20000
2000
4000
East
Nort
Measured
Desired
0.5
1
1.5
2
x104
0
100
200
300
400
500
Time
Altitude
Figure
5.6:North-E
astan
dAltitu
de
[m]w
ithout
disturbancesan
dpay-
load
,measure
dvs
des
ired
In
Figure
5.6,thep
lot
foraltitu
de
istheon
lyoneof
in
terest
,because
thePI
Dcontrol
lersta
kescareof
hea
ding.
Thesl
idingmod
econtrol
ler
for
pitchan
daltitu
decontrol
isableto
follow
des
iredaltitudesatisfactori
ly.
Atthe
endofthesimu
lation
,sm
allosci
llat
ionsoccur.
8/11/2019 Full Text 22
64/108
0
0.5
1
1.5
2 x104
200
20
Time
PitchAngle
0
0.5
1
1.5
2
x104
1000
100
Time
YawAngle
Measured
Desired
Figure
5.7:Rol
l,p
itcha
ndyawangle
[deg
]w
itho
ut
disturbancesan
d
pay
load
,measure
dvs
desire
d
Rol
lan
dyawangleon
Figure
5.7arecontrol
led
by
PIDcontrolan
d
havethesame
behav
ioras
inFigure
5.4.Thep
itchangle
hasare
lative
ly
bigerror
inthe
beg
inning
andattheen
d.
Inthem
iddlethemeasure
d
pitch
followsthe
des
iredp
itch
.
8/11/2019 Full Text 22
65/108
0
05
5
x104
Time
0.2
0.4
0.6
0
.8
1
1.2
1.4
1.6
1.8
2
x104
2
1.5
1
0.50
0.51
Time
SideslipAngle
Figure
5.8:Angleofattackan
dsi
desl
ipangle
[deg
]w
ithout
disturbances
andpay
load
,measure
dvs
des
ire
d
Th
eangleofattack
inFigu
re5.8varies
inthe
begin
ningan
dthen
stab
ilizesw
hentheaircra
ftreac
hes
itscru
isingspee
d,as
itdidfor
PID
contro
l.Thesi
des
lipangle
isthesameas
for
PIDcontrol.
5.2
Withpayload
TheG
NCsystem
has
beenteste
dw
ithacertainamountofpay
load
.An
UAVmaycarrysensors
,cameras
,commun
icat
ionequipm
ent,etc.an
d
8/11/2019 Full Text 22
66/108
0
2000
4000
6000
8000
10000
12000
14000
20000
2000
4000
East
North
Desired
0
0.5
1
1.5
2
x104
1000
100
200
300
400
500
600
Time
Altitude
Figure
5.9:North-E
astan
dAltitu
de
[m]w
ithpayloa
d,
measure
dvs
de-
sire
d
The
PIDcontrol
hasnop
roblems
follow
ingthe
des
iredpat
horaltitu
de
whenpay
load
isad
ded
,as
can
beseen
from
Figure
5.9.Theovershootat
the
firstturn
ingmaneuver
isthesameas
forsimulat
ionw
ithout
distur-
bancesan
dpay
load
.
8/11/2019 Full Text 22
67/108
0.2
0.4
0.6
0.
8
1
1.2
1.4
1.6
1
.8
2
x104
200
20
Time
PitchAngle
0
0.5
1
1.5
2
x104
500
50
100
Time
YawAngle
Measured
Desired
Figure
5.10:
Rol
l,p
itchan
dyawangle
[deg
]w
ithpay
load
,measure
dvs
des
ired
From
Figure
5.10itcan
be
seenthatthep
itchcontro
ldonee
dto
wor
kh
arderw
hensimu
latingwithpay
loadthanw
ithout.T
hisy
ieldson
ly
during
takeoff
,an
dnotafterthe
aircra
fthasascen
dedtoc
ruisealtitu
de.
8/11/2019 Full Text 22
68/108
0
0.5
1
1.5
2
x104
Time
0
0.5
1
1.5
2
x104
2
1.5
1
0.50
0.51
Time
SideslipAngle
Figure
5.11:
Angleofatta
ckan
dsi
desl
ipangle
[deg
]w
ithpay
load
,mea-
sure
dvs
des
ired
Therearemoresp
ikes
inbot
hangleofattacka
ndthesi
des
lipangle
whenpay
load
isad
dedto
theaircra
ft.
Duringta
keo
ffan
dascen
ding,the
angleofattackvariesmore
andhavegreatersp
ikesth
antheprev
iouscase
.
8/11/2019 Full Text 22
69/108
2000
4000
600
0
8000
10000
12000
14000
16000
20000
East
0.5
1
1.5
2
x104
0
100
200
300
400
500
Time
Altitude
Figure
5.12:
North-E
astan
dAltitu
de
[m]w
ithpay
load
,m
easure
dvs
de-
sire
d
When
app
liedpay
load
,theslid
ingmo
decontrolosci
llatesa
bitmore,
Figure
5.12
.Itfollowsthe
desiredaltitu
deas
itascen
ds,butshowsome
oscillationsw
henreac
hingthea
ltitu
deof
500meters.
Whenturn
ing,at
time1
000to
1500
,itisab
leto
ke
epthealtitu
dew
ithoutosci
llat
ions.
This
isthesecon
dturn
,w
hilethe
first
isduringthecl
imbing.
After
fin
ishturn
,
ithas
someosci
llat
ionsthat
decreases
.
8/11/2019 Full Text 22
70/108
0
0.5
1
1.5
2
x104
200
20
Time
PitchAngle
0.2
0.4
0
.6
0.8
1
1.2
1.4
1
.6
1.8
2x104
1000
100
Time
YawAngle
Measured
Desired
Figure
5.13:
Rol
l,p
itcha
ndyawangle
[deg
]w
ithp
ayload
,measure
dvs
des
ired A
gain
,thesl
idingmod
econtrol
isnotab
leto
followthe
des
iredp
itch
angle
inthe
beg
inn
ingan
dattheen
d,
Figure
5.13
.Rol
lan
dyawangle
follow
des
iredangle.
8/11/2019 Full Text 22
71/108
0
05
5
x104
Time
0.5
1
1.5
2
x104
2
1.5
1
0.50
0.51
Time
SideslipAngle
Figure
5.14:
Angleofattackand
sidesl
ipangle
[deg
]w
ith
pay
load
,mea-
suredvs
des
ired
Th
eangleofattackan
dthe
sides
lipangle,
Figure
5.14
,arethesame
asfor
simu
lationw
ithoutpay
loa
dan
dw
inddisturbances.
5.3
WithWind20knots
Un
der
takeoff
itispre
fera
bleto
have
direct
hea
dw
ind.Therunway
is
directed
West-
Eastsotheappl
iedw
indiscom
ing
from
theeast
.The
applie
dw
indissetafter
discuss
ionw
ithanexper
ience
dCessnap
ilot
.
8/11/2019 Full Text 22
72/108
2000
4000
6000
8000
10000
120
00
14000
0
5000
10000
East
North
Measured
Desired
0
2000
400
0
6000
8000
10000
12000
14000
16000
18000
0
100
200
300
400
500
Time
Altitude
Figure
5.15:
North-E
astan
dAltitu
de
[m]w
ith20k
tw
ind
,measure
dvs
des
ired
8/11/2019 Full Text 22
73/108
0
2000
4000
6000
8000
10000
12000
14000
16000
18000
200
Time
RollAngle
0
2000
4000
6000
8000
10000
12000
14000
160
00
200
20
Time
PitchAngle
0
2000
4000
6000
8000
10000
12000
14000
16000
18000
1000
100
Time
YawAngle
Measured
Desired
Figure
5.16:
Rol
l,p
itchan
dyaw
angle
[deg
]w
ith20ktwin
d,
measure
dvs
des
ired
8/11/2019 Full Text 22
74/108
2000
4000
6000
8000
10000
12000
14
000
16000
2024
Time
AngleofAttack
2000
4000
6000
8000
10000
12000
1400
0
16000
2
1.5
1
0.50
0.51
Time
SideslipAngle
Figure
5.17:
Angleofattackan
dsi
desl
ipangle[
deg
]w
ith20ktw
ind
,
measure
dvs
des
ired
Therearea
lotofsp
ikes
inthemeasure
dangleofa
ttac
kan
dthesi
des
lip
angle
inFigure
5.17
.The
angleofattackstartspo
sitive
duringta
keoff
,
8/11/2019 Full Text 22
75/108
2000
4000
6000
8000
10000
12000
14000
16000
18000
0
5000
10000
East
North
Measur
ed
Desired
0
0.5
1
1.5
2
x104
0
100
200
300
400
500
Time
Altitude
Figure
5.18:
North-E
astan
dAltitu
de
[m]w
ith20ktwin
d,
measure
dvs
des
ired
8/11/2019 Full Text 22
76/108
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2x104
200
Time
RollAngle
0
0.5
1
1.5
2 x104
60
40
200
20
Time
PitchAngle
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2x104
1000
100
Time
YawAngle
Measured
Desired
Figure
5.19:
Rol
l,p
itchan
dyawangle
[deg
]w
ith20ktw
ind
,measure
dvs
des
ired T
heon
lyp
lotof
interest
isherethep
itchanglein
Figure
5.19
.Itnever
8/11/2019 Full Text 22
77/108
0.2
0.4
0.6
0
.8
1
1.2
1.4
1.6
1.8
x104
202
Time
AngleofAttac
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
x104
2
1.5
1
0.50
0.51
Time
SideslipAngle
Figure
5.20:
Angleofattackan
dsi
desl
ipangle
[deg
]w
ith20ktw
ind
,
measu
redvs
des
ired
An
gleofattackan
dthesi
deslipangle,
inFigure
5.20
,be
havesthesame
asfor
pure
PIDcontrol
inFigure
5.17
.On
lychange
isaso
mew
hat
bigger
angleofattack
inthe
beg
inn
ing,
atthestartofta
keoff
.T
he
hugesp
ikes
8/11/2019 Full Text 22
78/108
2000
4000
6000
8000
10000
12000
14000
16000
0
5000
10000
East
North
Measured
Desired
2000
4000
6000
8000
10000
12000
1400
0
16000
18000
0
100
200
300
400
500
Time
Altitude
Figure
5.21:
North-E
astan
dAltitu
de
[m]w
ith40k
tw
ind
,measure
dvs
des
ired
8/11/2019 Full Text 22
79/108
0
2000
4000
6000
8000
10000
12000
14000
16000
18000
200
20
Time
RollAngle
0
2000
4000
6000
8000
10000
12000
14000
16000
200
20
Time
PitchAngle
0
2000
4000
6000
8000
10000
12000
14000
16000
18000
1000
100
Time
YawAngle
Measured
Desired
Figure
5.22:
Rol
l,p
itchan
dyaw
angle
[deg
]w
ith40ktwin
d,
measure
dvs
des
ired
8/11/2019 Full Text 22
80/108
2000
4000
6000
8000
10000
12000
14000
16000
18000
2024
Time
AngleofAttack
2000
4000
6000
8000
10000
12000
14000
16000
18000
2
1.5
1
0.50
0.51
Time
SideslipAngle
Figure
5.23:
Angleofattackan
dsi
desl
ipangle[
deg
]w
ith40ktw
ind
,
measure
dvs
des
ired
Theangleofattack
is
slightly
biggeratthesta
rtoftheta
keoffan
d
decreasesastheaircra
fthits
itcru
isingspee
d,
Figure
5.23
,w
henthew
ind
8/11/2019 Full Text 22
81/108
0
2000
4000
6000
8000
10000
12000
14000
16000
20000
2000
4000
6000
8000
East
North
Measur
ed
Desired
2000
4000
6000
8000
10000
12000
14000
16000
18000
1000
100
200
300
400
500
Time
Altitude
Figure
5.24:
North-E
astan
dAltitu
de
[m]w
ith40ktwin
d,
measure
dvs
des
ired
Thes
lidingmo
decontrol
ler
for
pitchan
daltitu
de
doesn
otseemtoget
affecte
dbythe
increase
dw
ind.From
Figure
5.24itcanbeseenthatthe
8/11/2019 Full Text 22
82/108
0
0.5
1
1.5
2
x104
20
Time
2000
4000
6000
8000
10000
12000
140001
6000
18000
60
40
200
20
Time
PitchAngle
0
2000
4000
6000
8000
10000
12000
14000
16000
18000
1000
100
Time
YawAngle
Measured
Desired
Figure
5.25:
Rol
l,p
itchan
dyawangle
[deg
]w
ith40ktw
ind
,measure
dvs
des
ired W
ith40knotsw
inddis
turbancethep
itchcontroller
,Figure
5.25
,seems
tobehave
betterthan
itd
idw
ith20knotsw
ind
,Figure
5.19
.Itst
illhas
anhugeerror
inthe
beginn
ing
duetothep
hysica
llim
itat
ions,
butthe
error
issmal
ler
intheend
.However
,itisst
illnotsu
ccessfu
l.
8/11/2019 Full Text 22
83/108
2000
4000
6000
8000
10000
12000
14000
16000
18000
2
Time
A
2000
4000
6000
8000
10000
12000
14000
16000
18000
2
1.5
1
0.50
0.51
Time
SideslipAngle
Figure
5.26:
Angleofattackan
dsi
desl
ipangle
[deg
]w
ith40ktw
ind
,
measu
redvs
des
ired
Forsl
idingmo
decontrol
,the
angleofattack
,Figure
5.26
,issmoot
her
during
takeoffthan
itisfor
PID
control
,Figure
5.23
.It
startspos
itive
andco
nvergestoaconstantnega
tiveangleastheaircra
ftr
eachescru
ising
altitud
e,w
ithon
lysmal
lsp
ikesoccurr
ing.
Th
esi
des
lipangle
isthesam
eas
for
PIDcontrol
.Sides
lipanglecor-
respon
dsto
hea
dingcontrolwhich
ispre
formed
by
PIDco
ntrol
.
8/11/2019 Full Text 22
84/108
wind,hasanerrorof100and200meterswhen
flyingstraightnorth
atw
indspee
dof
20
knotsan
d40knots
fromt
heeast
,respective
ly.
Inhea
ding,
PIDcontrol
,there
isanovershootof
40meters
from
des
iredpat
hw
hentu
rning
insimu
lationsw
itho
utw
inddisturbances
andpay
loadan
dwit
hpay
load
.Theovershoot
increasestoapprox
i-
mately
400metersw
ith20knotsw
indspee
dan
d700w
ith40knots
windspee
d.
PIDhassmal
loscillat
ions
inaltitu
dew
henexposedtow
ind
.
PIDhassl
ightly
largerosci
llat
ionsw
henexpose
dto
40knotsw
ind
spee
dthanw
henexposedto
20knotsw
indspee
d.
Slidingmo
de
hasosci
llat
ions
inaltitu
de
inall
fourcases.
Slidingmo
de
hassam
eper
formancesw
henexposedto
20knotsw
ind
spee
dasw
henexpose
dto
40knotsw
indspeed
.
PIDfollows
des
iredro
ll,
pitchan
dyawanglen
icely
inal
lfourcases,
worstper
formanceinyaww
henexposedtowin
d.
Slidingmo
dealmostneverreac
hes
des
iredpitc
h.
Des
iredp
itch
is
somet
imesgreatert
hanthep
hysica
llim
itat
ion
sontheaircra
ft.
Angleofattack
issm
oot
her
forsl
idingmo
dethan
for
PIDcontrol
.
Sides
lipangle
isclos
etozero
duringal
lfourcases
,but
ithassome
spikes
.
8/11/2019 Full Text 22
85/108
8/11/2019 Full Text 22
86/108
8/11/2019 Full Text 22
87/108
Work
6.1
Conclusions
Inthis
thes
isa
Gu
idance
,Nav
iga
tionan
dControl
(GNC)sy
stem
foruse
in
autop
ilot
des
ign
foran
UAVhas
been
des
ignedan
dtested
witha
Cessna
172SP
flightmo
del
inX
-Planefl
ightsimu
lator.
The
flightmo
del
has
been
un
known
,a
black
box
,duringthesimu
lati