You are on page 1of 43

Aerospace Plant: 2-DOF Helicopter

Position Control
2-DOF Helicopter
Reference Manual
2-DOF Helicopter Reference Manual
Table of Contents
1. INTRODUCTION..........................................................................................................................................1
2. PREREQUISITES..........................................................................................................................................2
3. EXPERIMENT FILES OVERVIEW..................................................................................................................2
4. SYSTEM DESCRIPTION................................................................................................................................3
4.1. Components......................................................................................................................................3
4.1.1. 2-DOF Helicopter Components..............................................................................................................3
4.2. System Specifications.......................................................................................................................7
5. SYSTEM SETUP AND WIRING......................................................................................................................9
5.1. System Setup....................................................................................................................................9
5.2. Cale !omenclature.......................................................................................................................1"
5.3. #ypical Connections for t$e 2-DOF Helicopter.............................................................................11
5.4. %oystic& Description........................................................................................................................15
6. MODELING AND CONTROL DESIGN...........................................................................................................16
'.1. (o)elin*.........................................................................................................................................1'
'.2. Control Desi*n................................................................................................................................19
7. INLA! PROCEDURE................................................................................................................................21
7.1. 2-DOF Helicopter +irary..............................................................................................................21
7.2. Controller Simulation.....................................................................................................................23
7.2.1. O,ecti-es.............................................................................................................................................23
7.2.2. .roce)ure.............................................................................................................................................24
7.3. Open-loop /mplementation.............................................................................................................20
Document Number 658 / Revision 2. / !a"e i
2-DOF Helicopter Reference Manual
7.3.1. O,ecti-es.............................................................................................................................................20
7.3.2. .roce)ure.............................................................................................................................................29
7.4. Close)-loop .osition Control /mplementation..............................................................................32
7.4.1. O,ecti-es.............................................................................................................................................32
7.4.2. .roce)ure1 2-DOF Helicopter...............................................................................................................32
7.5. (o)el 2ali)ation /mplementation..................................................................................................37
7.5.1. O,ecti-es.............................................................................................................................................37
7.5.2. .roce)ure.............................................................................................................................................30
". REFERENCES...........................................................................................................................................4#
Document Number 658 / Revision 2. / !a"e ii
2-DOF Helicopter Reference Manual
1. Introduction
#$e 3uanser 2 DOF Helicopter e4periment5 s$o6n in Fi*ure 15 consists of a $elicopter mo)el mounte)
on a fi4e) ase 6it$ t6o propellers t$at are )ri-en y DC motors. #$e front propeller controls t$e
ele-ation of t$e $elicopter nose aout t$e pitc$ a4is an) t$e ac& propeller controls t$e si)e to si)e
motions of t$e $elicopter aout t$e ya6 a4is. #$e pitc$ an) ya6 an*les are measure) usin* $i*$-
resolution enco)ers. #$e pitc$ enco)er an) motor si*nals are transmitte) -ia a sliprin*. #$is eliminates
t$e possiility of 6ires tan*lin* on t$e ya6 a4is an) allo6s t$e ya6 an*le to rotate freely aout 3'"
)e*rees.
Figure 1: Quanser 2 DOF Helicopter
/n Section 4 t$e components composin* t$e 2 DOF Helicopter are )escrie) an) t$e system
specifications are *i-en. Section 5 e4plains $o6 to setup t$e system an) *i-es t$e 6irin* proce)ure.
#$e mo)elin* an) position control )esi*n of t$e $elicopter are summari7e) in Section '. /n Section75
se-eral proce)ures are outline) t$at s$o6 $o6 to simulate t$e position controller an) $o6 to run t$is
controller on t$e actual $elicopter plant. Furt$er5 t$is section e4plains $o6 to use t$e ,oystic& to
manually control t$e $elicopter.
Document Number 658 / Revision 2. / !a"e #
2-DOF Helicopter Reference Manual
2. Prerequisites
/n or)er to successfully carry out t$is laoratory5 t$e user s$oul) e familiar 6it$ t$e follo6in*1
2-DOF Helicopter main components 8e.*. actuator5 sensors95 t$e )ata ac:uisition car) 8e.*. 3095
an) t$e po6er amplifier 8e.*. ;.(95 as )escrie) in Section 45 <eference =1>5 an) <eference
=4>5 respecti-ely.
?irin* t$e 2-DOF Helicopter plant 6it$ t$e ;.( an) D@C )e-ice5 as )iscusse) in Section 5.
Desi*nin* a state-fee)ac& control usin* +inear-3ua)ratic <e*ulator5 i.e. +3<.
;sin* 3ua<C5 or anot$er e:ui-alent soft6are5 to control an) monitor a plant in real-time an) in
)esi*nin* a controller t$rou*$ Simulin&.
3. Experiment Files !er!ie"
#ale 1 elo6 lists an) )escries t$e -arious files supplie) 6it$ t$e 2-DOF Helicopter e4periment.
File Name Description
2-DOF Helicopter <eference
(anual.p)f
#$is manual is ot$ t$e user an) laoratory *ui)e for t$e 3uanser
2-DOF Helicopter specialty aerospace plant. /t contains
information aout t$e $ar)6are components5 specifications5
information to setup an) confi*ure t$e $ar)6are5 system mo)elin*5
control )esi*n5 as 6ell as t$e e4perimental proce)ure to simulate
an) implement t$e controller.
2-DOF Heli A:uations.m6s (aple 6or&s$eet use) to analytically )eri-e t$e state-space mo)el
in-ol-e) in t$e e4periment. ?aterloo (aple 95 or a later release5 is
re:uire) to open5 mo)ify5 an) e4ecute t$is file.
2-DOF Heli A:uations.$tml H#(+ presentation of t$e (aple ?or&s$eet. /t allo6s users to
-ie6 t$e content of t$e (aple file 6it$out $a-in* (aple 9
installe). !o mo)ifications to t$e e:uations can e performe) 6$en
in t$is format.
:uanser.in) an) :uanser.li #$e Quanser_Tools mo)ule )efines t$e *eneric proce)ures use) in
+a*ran*ian mec$anics an) resultin* in t$e )etermination of a *i-en
systemBs e:uations of motion an) state-space representation. /t also
contains )ata processin* routines to sa-e t$e otaine) state-space
matrices into a (atla-rea)ale file.
setupClaC$eliC2).m #$e main (atla script t$at sets t$e mo)el5 control5 an)
confi*uration parameters. R$% &'() *(+, -%+. &- ),&$/ &',
+01-20&-2..
setupC$eli2)Cconfi*uration.m <eturns t$e 2-DOF Helicopter mo)el parameters an) enco)er
caliration constants.
HA+/2DC@DCDCe:ns.m (atla script file *enerate) usin* t$e (aple 6or&s$eet 2-DOF
Document Number 658 / Revision 2. / !a"e 2
2-DOF Helicopter Reference Manual
File Name Description
Heli Equations.mws. /t sets t$e A5 5 !5 an) D matrices for t$e
state-space representation of t$e 2-DOF Helicopter open-loop
system.
)C$eli2)Cl:r.m (atla script t$at *enerates t$e position--elocity controller *ain E
usin* +3<.
)C$eli2)Cl:rCi.m (atla function t$at t$e position-inte*ral--elocity controller
*ain E usin* +3<.
$eliC2)Cli.m)l #$e supplie) Simulin& mo)els are lin&e) to t$e loc&s in t$is
Simulin& lirary.
sC$eliC2)CffCl:rCi.m)l Simulin& file t$at simulates t$e open-loop or close)-loop 2-DOF
Helicopter usin* a nonlinear mo)el of t$e system.
:C$eliC2)CffCl:rCi.m)l Simulin& file t$at implements t$e real-time position controller for
t$e 2 DOF Helicopter system.
:C$eliC2)CopenCloop.m)l Simulin& file t$at runs t$e 2 DOF Helicopter in open-loop5 i.e.
allo6s user to comman) -olta*e )irectly to motors.
Ta"le 1: Files supplie# wit$ t$e 2-DOF Helicopter e%periment.
#. $%stem &escription
#$e follo6in* is a listin* of t$e ma,or $ar)6are components use) for t$is e4periment1
P-3,2 A4/+(*(,21 3uanser ;.(-15"3 an) ;.(-24"55 or e:ui-alent.
D0&0 A56$()(&(-% !-0271 3uanser 345 305 or e:ui-alent.
8,+(5-/&,2 P+0%&1 3uanser 2-DOF Helicopter aerospace e4periment.
R,0+&(4, 5-%&2-+ )-*&302,1 .C e:uippe) 6it$ 3ua<C-Simulin& confi*uration.
9-.)&(5:1 &ogitec$ Attac'-( )* ,oystic&5 or anot$er 6in)o6s-
enale) ,oystic&.
See t$e references liste) in Section 0 for more information on t$ese components.
4.1. Components
Section 4.1.1 lists t$e components on t$e 2-DOF Helicopter plant an) Section 4.2 summari7es t$e
system specifications.
#.1.1. 2'&F (elicopter Components
#$e components comprisin* t$e 2-DOF Helicopter system are laele) in fi*ures 25 35 45 5 an) '5 are
Document Number 658 / Revision 2. / !a"e $
2-DOF Helicopter Reference Manual
)escrie) in #ale 2. #$e motors5 propeller assemlies5 an) enco)ers are )escrie) in more )etail
elo6.
ID # Description ID # Description
1 Dac& propeller 13 (etal s$aft 8rotates aout ya6 a4is9
2 Dac& propeller s$iel) 14 Slip rin*
3 Fa6Gac& motor 15 Fa6 enco)er
4 .itc$ enco)er 1' Dase platform
5 Fo&e 17 Front motor connector
' Helicopter o)y 10 <i*$t motor connector 8not use)9
7 Front propeller 19 Dac& motor connector
0 .itc$Gfront motor 2" Fa6 enco)er connector
9 Front propeller s$iel) 21 <oll enco)er connector 8not use)9
1" Anco)erGmotor circuit 22 .itc$ enco)er connector
11 Anco)er connector on circuit 8not
use)9
23
+eft motor connector 8not use)9
12 (otor connector on circuit
Ta"le 2: 2-DOF Helicopter components.
Document Number 658 / Revision 2. / !a"e %
2-DOF Helicopter Reference Manual
Figure 2: 2 DOF Helicopter components
Figure (: 2 DOF Helicopter +o'e components.
Figure ,: 2 DOF Helicopter "ase components.
Document Number 658 / Revision 2. / !a"e 5
2-DOF Helicopter Reference Manual
Figure -: 2 DOF Helicopter tail components.

Figure .: 2 DOF Helicopter /ront propeller
assem"l+ components.
4.1.1.1. DC Motors (Component #3 and #!
#$e 2-DOF Helicopter $as t6o DC motors1 t$e ya6 motor5 component H35 actuatin* t$e ac& propeller
an) t$e pitc$ motor5 component H05 rotatin* t$e front propeller.
#$e ya6 motor is a Faul$a"er *eries 20,2 1o#el 22.! motor. /t $as a terminal resistance of 1.' an)
a current-tor:ue constant of "."1"9 !.mG@. See <eference ='> for t$e full specifications of t$is motor.
#$e lar*er pitc$ motor is a 3ittman 1o#el 42(,. /t $as an electrical resistance of ".03 an) a current-
tor:ue constant of "."102 !mG@. #$e rate) -olta*e of t$e motor is 12 2 ut its pea& -olta*e can e
rou*$t up to 22 2 6it$out )ama*e. See <eference =5> for t$e full specifications of t$is motor.
4.1.1.2. Propellers (Component #1 and # "!
#$e pitc$ an) ya6 propeller assemlies are compose) of t$e actual propeller5 6$ic$ is )irectly
mounte) to t$e motor s$aft5 an) t$e aluminum propeller s$iel). #$e propellers use) for ot$ t$e pitc$
an) ya6 motors are Iraupner 2"G15 cm or 0G'J. #$e pitc$ motorGpropeller $as an i)entifie) t$rust-
force constant of ".1"4 !G2 an) t$e ya6 motorGpropeller $as a t$rust-force constant of ".43 !G2..
4.1.1.3. #ncoders (Components #4 and #1$!
#$e 2-DOF Helicopter e4periment $as t6o enco)ers1 t$e enco)er measurin* t$e pitc$ an*le5
component H45 an) t$e enco)er measurin* t$e ya6 an*le5 component H15. /n :ua)rature mo)e5 t$e
pitc$ enco)er $as a resolution of 4"9' counts per re-olution an) t$e ya6 enco)er $as a resolution of
0192 counter per re-olution. #$us t$e effecti-e position resolution is "."079 )e*rees aout t$e pitc$
a4is an) "."439 )e*rees aout t$e ya6 a4is
Document Number 658 / Revision 2. / !a"e 6
2-DOF Helicopter Reference Manual
4.2. %&stem %peci'ications
#ale 3 elo6 lists t$e main parameters associate) 6it$ t$e 3uanser 2-DOF Helicopter e4periment.
#$e parameters t$at are not use) )irectly in t$e mat$ematical mo)el of t$e system or in t$e la files
*i-en are s$a)e).
Symbol Matlab
Notation
Description Value Unit
<
m5p
<CmCp @rmature resistance of pitc$ motor.
".03

<
m5y
<CmCy @rmature resistance of ya6 motor. 1.'"

E
t5p
ECtCp Current-tor:ue constant of pitc$ motor.
"."102
!.mG@
E
t5y
ECtCy Current-tor:ue constant of ya6 motor. "."1"9 !.mG@
%
m5p
%CmCp <otor moment of inertia of pitc$ motor.
1.91A-""'
&*.m
2
%
m5y
%CmCy <otor moment of inertia of ya6 motor. 1.37A-""4
&*.m
2
E
f5p
ECfCp .itc$ propeller force-t$rust constant 8foun)
e4perimentally9.
".1"37 !G2
E
f5y
ECfCy Fa6 propeller force-t$rust constant 8foun)
e4perimentally9.
".420 !G2
E
pp
ECpp #$rust force constant of ya6
motorGpropeller.
".2"4 !.mG2
E
yy
ECyy #$rust tor:ue constant actin* on ya6 a4is
from ya6 motorGpropeller
"."72 !.mG2
E
py
ECpy #$rust tor:ue constant actin* on pitc$ a4is
from ya6 motorGpropeller.
".""'0 !.mG2
E
yp
ECyp #$rust tor:ue constant actin* on ya6 a4is
from pitc$ motorGpropeller
"."219 !.mG2
D
e:5p
DCe:Cp A:ui-alent -iscous )ampin* aout pitc$
a4is.
".0"" !G2
D
e:5y
DCe:Cy A:ui-alent -iscous )ampin* aout ya6
a4is.
".310 !G2
m
$eli
mC$eli #otal mo-in* mass of t$e $elicopter 8o)y5
t6o propellers assemlies5 etc.9.
1.3072 &*
m
m5p
mCmotorCp (ass of pitc$ motor. ".292 &*
m
m5y
mCmotorCy (ass of ya6 motor. ".120 &*
m
s$iel)
mCs$iel) (ass of propeller s$iel). ".1'7 &*
Document Number 658 / Revision 2. / !a"e &
2-DOF Helicopter Reference Manual
Symbol Matlab
Notation
Description Value Unit
m
props
mCprops (ass of pitc$ an) ya6 propellers5 propeller
s$iel)s5 an) motors.
".754 &*
m
o)y5p
mCo)yCp (ass mo-in* aout pitc$ a4is. ".'33 &*
m
o)y5y
mCo)yCy (ass mo-in* aout ya6 a4is. ".''7 &*
m
s$aft
mCs$aft (ass of metal s$aft rotatin* aout ya6
a4is.
".151 &*
+
o)y
+Co)y #otal len*t$ of $elicopter o)y. ".403 m
l
cm
lCcm Center of mass len*t$ alon* $elicopter
o)y from pitc$ a4is.
".10' m
+
s$aft
+Cs$aft +en*t$ of metal s$aft rotatin* aout ya6
a4is.
".20" m
%
o)y55p
%CmCp (oment of inertia of $elicopter o)y aout
pitc$ a4is.
"."123 &*.m
2
%
o)y55y
%CmCy (oment of inertia of $elicopter o)y aout
ya6 a4is.
"."129 &*.m
2
%
s$aft
%Cs$aft (oment of inertia of metal s$aft aout ya6
a4is en) point.
".""39 &*.m
2
%
p
%Cp (oment of inertia of front motorGs$iel)
assemly aout pitc$ pi-ot.
"."170 &*.m
2
%
y
%Cy (oment of inertia of ac& motorGs$iel)
assemly aout ya6 pi-ot.
".""04 &*.m
2
%
e:5p
%Ce:Cp #otal moment of inertia aout pitc$ a4is. "."304 &*.m
2
%
e:5y
%Ce:Cy #otal moment of inertia aout ya6 a4is. "."432 &*.m
2
* * Ira-itational constant. 9.01
mGs
2
E
AC5+!5#
EC+!CAC
C#
Fa6 enco)er resolution 8in :ua)rature
mo)e9.
0192 countsGre-
E
AC5+!5.
EC+!CAC
C.
.itc$ enco)er resolution 8in :ua)rature
mo)e9.
4"9' countsGre-
E
AC5F
ECACCF Fa6 enco)er caliration *ain. 7.'7A-"4 ra)Gcounts
E
AC5.
ECACC. .itc$ enco)er caliration *ain. 1.5"A-"3 ra)Gcounts
Ta"le (: 2-DOF Helicopter s+stem speci/ications.
Document Number 658 / Revision 2. / !a"e 8
2-DOF Helicopter Reference Manual
). $%stem $etup and *irin+
Section 5.1 )escries $o6 to assemle an) setup t$e 3uanser 2-DOF Helicopter specialty plant. #$e
cales use) to connect t$e $elicopter system are summari7e) in Section 5.2 an) t$e stan)ar) 6irin*
proce)ure is *i-en in Section 5.3. +astly5 t$e ,oystic& t$at can e use) to control t$e $elicopter is
)iscusse) in Section 5.4.
$.1. %&stem %et(p
Follo6 t$ese steps for t$e mec$anical setup of t$e 3uanser 2-DOF Helicopter )e-ice1
1. .lace t$e support ase5 component H1' s$o6n in Fi*ure 25 on a tale or on t$e floor.
2. Dy $ol)in* t$e front an) ac& of $elicopter o)y5 component H'5 place t$e yo&e5 component H5
in Fi*ure 25 on t$e top of t$e ase. Ansure t$e 6$ite arro6 laels on t$e circuit oar)5 /D H1" in
in Fi*ure 45 an) t$e frame are ali*ne). Once fitte)5 ti*$ten t$e t6o t$um scre6s.
3. Connect t$e '-pin-D/! to '-pin-D/! motor cale protru)in* from t$e $elicopter o)y to t$e
connector laele) K(O#O<J on t$e $elicopter circuit5 component H12 s$o6n in Fi*ure 3.
CAUTION; O%5, &', 1-7. (%)&0++,7 -% &', )$//-2& 10),< %,=,2 +(*& &', ).)&,4 *2-4 &',
',+(5-/&,2 1-7.. A+30.) 5022. &', ).)&,4 *2-4 &', 10), 3(&' -%, '0%7 0%7 )&01(+(>, &',
1-7. 3(&' &', -&',2 '0%7. N,=,2 0//+. ,?&2,4, +-07) (% &', =,2&(50+ 7(2,5&(-%@
4. #$e stan)ar) setup an) startin* position for t$e 2-DOF Helicopter system is )epicte) in Fi*ure
25 ao-e.
CAUTION; E?/-),7 4-=(%A /02&). E%)$2, 0++ -1)&2$5&(-%) &'0& 40. (%&,2*,2, 3(&' &',
5-4/+,&, 36#7,A2,, 0?(0+ 4-&(-% -* &', ',+(5-/&,2 02, 2,4-=,7 1,*-2, /,2*-24(%A 0%.
,?/,2(4,%&.
Document Number 658 / Revision 2. / !a"e '
2-DOF Helicopter Reference Manual
$.2. Ca)le *omenclat(re
#ale 45 elo65 pro-i)es a )escription of t$e stan)ar) cales use) in t$e 6irin* of t$e 2-DOF
Helicopter system.
Cable Designation Description
Figure 5 6From Digital-To-Analog6 !a"le
5-pin-D/!
to
<C@
#$is cale connects an analo* output of t$e
)ata ac:uisition terminal oar) to t$e po6er
mo)ule for proper po6er amplification.
Figure 0: 6To &oa#6 !a"le o/ gain (.
4-pin-D/!
to
'-pin-D/!
#$is cale connects t$e output of t$e po6er
mo)ule5 after amplification5 to t$e )esire)
actuator 8e.*.5 propeller motor9. One en) of
t$is cale contains a resistor t$at sets t$e
amplification *ain. ?$en carryin* a lael
s$o6in* L3L5 at ot$ en)s5 t$e cale $as t$at
particular amplification *ain.
Figure 4 6To &oa#6 !a"le O/ 7ain -
4-pin-D/!
to
'-pin-D/!
#$is cale connects t$e output of t$e po6er
mo)ule5 after amplification5 to t$e )esire)
actuator 8e.*.5 propeller motor9. One en) of
t$is cale contains a resistor t$at sets t$e
amplification *ain. ?$en carryin* a lael
s$o6in* L5L5 at ot$ en)s5 t$e cale $as t$at
particular amplification *ain.
Document Number 658 / Revision 2. / !a"e #
2-DOF Helicopter Reference Manual
Cable Designation Description
Figure 12 6Enco#er6 !a"le
5-pin-stereo-
D/!
to
5-pin-stereo-
D/!
#$is cale carries t$e enco)er si*nals
et6een an enco)er connector an) t$e )ata
ac:uisition oar) 8to t$e enco)er counter9.
!amely5 t$ese si*nals are1 M52DC po6er
supply5 *roun)5 c$annel @5 an) c$annel D.
#ale 4 Cale !omenclature
$.3. +&pical Connections 'or t,e 2-DOF
Helicopter
#$e ya6 an) pitc$ enco)ers are connecte) )irectly to t$e )ata-ac:uisition oar). #$is pro-i)es t$e
position fee)ac& necessary to control t$e $elicopter. #$e )ata-ac:uisition oar)5 i.e. D@CD5 outputs a
control -olta*e t$at is amplifie) an) )ri-es t$e front an) ac& motors. #$e front motor is )ri-en y a
3uanser ;ni-ersal .o6er (o)ule 24"55 i.e. ;.(-24"55 6$ic$ is capale of )eli-erin* a ma4imum
-olta*e of t242 to t$e motors. #$e ac& motor is connecte) to a ;.(-15"35 6$ic$ can )eli-er up to
t152.
CAUTION; P(&5' 4-&-2 (%/$&; B24V< 5A /,0:< 3A 5-%&(%$-$).
Y03 4-&-2; B15V< 3A /,0:< 1A 5-%&(%$-$).
#$is section )escries t$e typical calin* connections t$at are use) y )efault for t$e 3uanser 2-DOF
Helicopter system. Fi*ures 115 125 135 an) 14 illustrate5 respecti-ely5 t$e 6irin* of t$e t$e 30 #erminal
Doar)5 t$e Helicopter ase5 t$e ;.( )ri-in* t$e front motor5 an) t$e ;.( )ri-in* t$e ac& motor.
#$e connections are )escrie) in )etail in t$e proce)ure elo6 an) summari7e) in #ale 5.
Follo6 t$ese steps to connect t$e 2-DOF Helicopter system1
1. /t is assume) t$at t$e 3uanser 34 or 30 oar) is alrea)y installe) as )iscusse) in t$e
<eference =1>. /f anot$er )ata-ac:uisition )e-ice is ein* use)5 e.*. !/ (-Series oar)5 t$en *o
to its correspon)in* )ocumentation an) ensure it is properly installe).
2. (a&e sure e-eryt$in* is po6ere) off efore ma&in* any of t$ese connections. #$is inclu)es
turnin* off your .C an) t$e ;.(s.
3. Connect t$e 5-pin-D/! to <C@ cale from t$e Analog Output !$annel 82 on t$e D@C oar)
to t$e From D9A !onnector on a ;.(-24"5. See cale H1 s$o6n in Fi*ure 11 an) Fi*ure 13.
#$is carries t$e attenuate) *2-%& motor -olta*e control si*nal5 u
p
GE
a5p
5 6$ere E
a5p
is t$e
;.(-24"5 amplifier *ain.
4. Connect t$e 5-pin-D/! to <C@ cale from t$e Analog Output !$annel 81 on t$e D@C oar)
to t$e From D9A !onnector on a ;.(-24"5. See t$e cale H2 s$o6n in Fi*ure 11 an) Fi*ure
14. #$is carries t$e attenuate) 105: motor -olta*e control si*nal5 u
y
GE
a5y
5 6$ere E
a5y
is t$e
;.(-15"3 amplifier *ain.
5. Connect t$e 4-pin-stereo-D/! to '-pin-stereo-D/! t$at is laele) G0(% 5 from To &oa# on t$e
Document Number 658 / Revision 2. / !a"e ##
2-DOF Helicopter Reference Manual
;.(-24"5 to t$e Front 1otor connector. See connection H3 s$o6n in Fi*ure 12 an) Fi*ure
13. #$is cale sets t$e *ain of t$e amplifier to 5 an) t$e connector on t$e ;.(-si)e is *ray in
colour. #$e cale transmits t$e amplifie) -olta*e t$at is applie) to t$e *2-%& motor5 )enote)
:
m;p
.
ATTENTION; #$e 3uanser UPM24#5 is capale of pro-i)in* t$e re:uire) po6er to t$e 2-
DOF Helicopter motors. Ho6e-er5 it s$oul) e use) in con,unction 6it$ a "To Load" 501+, -*
A0(% 5 8i.e. 4-pin-D/!-to-'-pin-D/! cale95 as )escrie) in #ale 55 elo6. See <eference =4>
for more )etail.
'. Connect t$e 4-pin-stereo-D/! to '-pin-stereo-D/! t$at is laele) G0(% 3 from To &oa# on t$e
;.(-15"3 to t$e ac' 1otor connector. See connection H4 s$o6n in Fi*ure 12 an) Fi*ure 14.
#$e cale carries t$e amplifie) 105: motor -olta*e an) is represente) y t$e -ariale :
m;+
.
ATTENTION; #$e 3uanser UPM15#3 is capale of pro-i)in* t$e re:uire) po6er to t$e 2-
DOF Helicopter ac& motor. Ho6e-er5 it s$oul) e use) in con,unction 6it$ a "To Load"
501+, -* A0(% 3 8i.e. 4-pin-D/!-to-'-pin-D/! cale95 as )escrie) in #ale 55 elo6. See
<eference =4> for more )etail.
7. Connect t$e 5-pin-stereo-D/! to 5-pin-stereo-D/! cale from t$e 3itc$ Enco#er connector on
t$e 2-DOF Helicopter ase to Enco#er <nput 82 on t$e terminal oar). See connection H5 in
Fi*ure 11 an) Fi*ure 12. #$is carries t$e pitc$ an*le measurement 6$ic$ is represente) y
-ariale .
0. Connect t$e 5-pin-stereo-D/! to 5-pin-stereo-D/! cale from t$e =aw Enco#er connector on
t$e 2-DOF Helicopter ase to Enco#er <nput 81 on t$e terminal oar)5 as )epicte) y
connection H' in Fi*ure 11 an) Fi*ure 12. #$is carries t$e ya6 an*le measurement an) is
)enote) y t$e -ariale .
CAUTION; @ny enco)er s$oul) e )irectly connecte) to t$e 3uanser terminal oar) 8or
e:ui-alent9 usin* a stan)ar) 5-pin D/! cale. DO NOT 5-%%,5& &', ,%5-7,2 501+, &- &',
UPM@
9. /f you are usin* are usin* t$e +o*itec$ @ttac& 3 ;SD ,oystic& s$o6n in Fi*ure 1'5 t$en
connect t$e ;SD cale from t$e ,oystic& to a ;SD port on t$e .C 6$ile it is runnin*. #$e
system s$oul) )etect t$e ,oystic& an) automatically install t$e )ri-er 8you 6ill e prompte)9.
See t$e &ogitec$ <nstallation 1anual for more information on t$e setup proce)ure. See Section
5.4 for more information on system re:uirements of t$e +o*itec$ ,oystic& an) $o6 to use t$e
>ate !omman# &no.
Document Number 658 / Revision 2. / !a"e #2
2-DOF Helicopter Reference Manual
Figure 11: !onnection on t$e terminal "oar#.
Figure 12: !onnection on "ase o/ 2-DOF Helicopter.
Document Number 658 / Revision 2. / !a"e #$
2-DOF Helicopter Reference Manual
Figure 1(: !onnection on )31-2,2- /or
pitc$ motor.
Figure 1,: !onnection on )31-1-2( /or
+aw motor.
Cable # From To Signal
1 #erminal Doar)1
D@C H"
Front-;.( LFrom DG@L
connector
Control si*nal to t$e front ;.(
2 #erminal Doar)1
D@C H1
Dac&-;.( LFrom DG@L
connector
Control si*nal to t$e ac& ;.(
3 ;.(-24"5 L#o
+oa)L connector
2-DOF Helicopter
LFront (otor DG@ "L
connector
.o6er lea)s to t$e 2-DOF HelicopterBs front
DC motor 8propeller9. C01+, -* A0(% 5.
4 ;.(-15"3 L#o
+oa)L connector
2-DOF Helicopter
LDac& (otor DG@ 1L
connector
.o6er lea)s to t$e 2-DOF HelicopterBs ac&
DC motor 8propeller9. C01+, -* A0(% 3.
5 2-DOF Helicopter
LFa6 Anco)er
A!C "L connector
#erminal Doar)1
Anco)er C$annel H"
2-DOF HelicopterBs ya6 an*le fee)ac&
si*nal to t$e )ata ac:uisition car)
' 2-DOF Helicopter
L.itc$ Anco)er
A!C 1L connector
#erminal Doar)1
Anco)er C$annel H1
2-DOF HelicopterBs pitc$ an*le fee)ac&
si*nal to t$e )ata ac:uisition car)
#ale 5 2-DOF Helicopter system 6irin* summary
Document Number 658 / Revision 2. / !a"e #%
2-DOF Helicopter Reference Manual
$.4. -o&stic. Description
#$e 3uanser 2-DOF Helicopter e4periment is supplie) 6it$ eit$er an analo* ,oystic&5 s$o6n in Fi*ure
155 or a +o*itec$ @ttac& 3 ;SD ,oystic&5 s$o6n in Fi*ure 1'. #$ey are use) to *enerate a )esire)
position instea) of comman)in* it -ia t$e Simulin& mo)el loc&s 8see la proce)ure later9.
Figure 1.: &ogitec$ Attac'-( )* ?o+stic'.
#$e setup proce)ure for t$e ;SD ,oystic& is )escrie) in Section 5.3. #$e rate comman) &no s$o6n
in Fi*ure 1' c$an*es t$e rate at 6$ic$ a comman) is *enerate) y t$e ,oystic&. #$e rate is at its
*reatest 6$en t$e &no is turne) fully to6ar) t$e ,oystic& $an)le.
#$e system re:uirements for t$e +o*itec$ @ttac&-3 ;SD ,oystic& are1
.C 6it$ .entium .rocessor or compatile
'4 (D <@(
;SD port
?in)o6s 905 2"""5 (e5 or Np
Document Number 658 / Revision 2. / !a"e #5
Figure 1-: Analog ?o+stic'.
2-DOF Helicopter Reference Manual
,. Modelin+ and Control &esi+n
#$e mat$ematical mo)el )e-elope) for t$e 2-DOF Helicopter system is summari7e) in Section '.1. /n
Section '.25 t$e fee)ac& system use) to control t$e position of t$e $elicopter is )escrie).
/.1. Modelin0
#$e free-o)y )ia*ram of t$e 2-DOF Helicopter is illustrate) in Fi*ure 17 an) it accompanies t$e
(aple 6or&s$eet name) 2-DOF Helicopter Equations.mws or its H#(+ e:ui-alent 2-DOF Helicopter
Equations.$tml. #$e e:uations can e e)ite) an) re-calculate) y e4ecutin* t$e 6or&s$eet usin*
(aple 9.
Figure 15: *imple /ree-"o#+ #iagram o/ 2-DOF Helicopter.
#$e 6or&s$eet *oes t$rou*$ t$e &inematics of t$e system. #$us t$e Cartesian coor)inates of t$e center-
of-mass are e4presse) relati-e to t$e ase coor)inate system5 as s$o6n in Fi*ure 10. #$ese resultin*
e:uations are use) to fin) t$e potential ener*y an) translational &inetic ener*y.
Document Number 658 / Revision 2. / !a"e #6
2-DOF Helicopter Reference Manual
Figure 10: @inematics o/ t$e 2-DOF Helicopter.
#$e t$rust forces actin* on t$e pitc$ an) ya6 a4es from t$e front an) ac& motors are t$en )efine).
;sin* t$e Auler-+a*ran*e formula5 t$e nonlinear e:uations of motion of t$e 2-DOF Helicopter system
are )eri-e). #$ese e:uations are lineari7e) aout 7ero an) t$e linear state-space mo)el 8@5D5C5D9
)escriin* t$e -olta*e-to-an*ular ,oint position )ynamics of t$e system is foun). Ii-en t$e state-space
representation

t
% + A % u
=2>
an)
Document Number 658 / Revision 2. / !a"e #&
2-DOF Helicopter Reference Manual

t
+ + ! + D u
=3>
t$e state -ector for t$e 2-DOF Helicopter is )efine)
%
T

1
]
1
1
5 5 5

t
=4>
an) t$e output -ector is
+
T
= > 5
=5>
6$ere an) are t$e pitc$ an) ya6 an*les5 respecti-ely. #$e correspon)in* $elicopter state-space
matrices 8as )eri-e) in t$e (aple 6or&s$eet9 are
A

1
]
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
" " 1 "
" " " 1
" "

p
+ A
eq_p
m
$eli
l
cm
2
"
" " "

+
+ A
eq_+
m
$eli
l
cm
2
5
='>

1
]
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
" "
" "
@
pp
+ A
eq_p
m
$eli
l
cm
2
@
p+
+ A
eq_p
m
$eli
l
cm
2
@
+p
+ A
eq_+
m
$eli
l
cm
2
@
++
+ A
eq_+
m
$eli
l
cm
2
5
=7>
!

1
]
1
1
1 " " "
" 1 " "
5 an)
=0>
D

1
]
1
1
" "
" "
.
=9>
#$e mo)el parameters use) in t$e 8@5D9 matrices are )efine) in #ale 3.
Document Number 658 / Revision 2. / !a"e #8
2-DOF Helicopter Reference Manual
/.2. Control Desi0n
/n t$is section a linear proportional-inte*ral-)eri-ati-e5 i.e. ./D5 controller is )esi*ne) to re*ulate t$e
ele-ation an) tra-el an*les of t$e 2-DOF Helicopter to )esire) positions. #$e ./D control *ains are
compute) usin* t$e +inear-3ua)ratic <e*ular al*orit$m. #$e state-fee)ac& controller enterin* t$e
front motor5 u
f
5 an) t$e ac& motor5 u

5 is )efine)

1
]
1
1
1
1
u
p
u
+
+ + @
3D
8 9 %
#
% :
i

1
]
1
1
1
u
//
"
5
=1">
6$ere
@
3D

1
]
1
1
1
1
'
5 1 1
'
5 1 2
'
5 1 3
'
5 1 4
'
5 2 1
'
5 2 2
'
5 2 3
'
5 2 4
=11>
is t$e proportional-)eri-ati-e control *ain5
%
#
T
= >

#
" "
=12>
is t$e )esire) state5 4 is t$e state )efine) in A:uation =4>5
:
i

1
]
1
1
1
1
1
1
1
1
+ #

(
(
'
5 1 5
8 9 %
5 # 1
%
1
t #

(
(
'
5 1 '
8 9 %
5 # 2
%
2
t
+ #

(
(
'
5 2 5
8 9 %
5 # 1
%
1
t #

(
(
'
5 2 '
8 9 %
5 # 2
%
2
t
=13>
is t$e inte*ral control5 an)
u
//
@
//
m
$eli
g l
cm
8 9 cos %
5 # 1
@
pp
=14>
is t$e nonlinear fee)-for6ar) control5 6$ic$ compensates for t$e *ra-itational tor:ue. #$e -ariales
)
an)
)
5 are t$e pitc$ an) ya6 setpoints5 i.e. t$e )esire) an*les of t$e $elicopter. /n state-space5 t$e
)esire) pitc$ is an*le 4
)51
an) t$e )esire) ya6 is 4
)52
. #$e *ains &
151
an) &
152
are t$e front motor control
proportional *ains an) t$e *ains &
251
an) &
252
are t$e ac& motor control proportional *ains. !e4t5 &
153
an) &
154
are t$e front motor control )eri-ati-e *ains an) &
253
an) &
254
are t$e ac& motor control
)eri-ati-e *ains. #$e inte*ral control *ains use) in t$e front motor control are &
155
an) &
15'
an) t$e
inte*ral *ains &
255
an) &
25'
are use) in t$e ac& motor re*ulator.
#$e ./D control *ains are compute) usin* t$e +inear-3ua)ratic <e*ular sc$eme. #$e system state is
first au*mente) to inclu)e t$e inte*rals of t$e pitc$ an) ya6 states5
%
i
T

1
]
1
1
5 5 5 5 5

t
p

t
#

( t #

( t
.
=15>
;sin* t$e fee)ac& la6
Document Number 658 / Revision 2. / !a"e #'
2-DOF Helicopter Reference Manual
u @ %
i
5
=1'>
t$e 6ei*$tin* matrices
Q

1
]
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2"" " " " " "
" 15" " " " "
" " 1"" " " "
" " " 2"" " "
" " " " 5" "
" " " " " 5"
=17>
an)
>

1
]
1
1
1 "
" 1
5
=10>
an) t$e state-space matrices 8@5D9 foun) pre-iously5 t$e control *ain
@

1
]
1
1
10.9 1.90 7.40 1.53 7."3 ".77"
-2.22 19.4 -".45 11.9 -".77" 7."3
=19>
is calculate) y minimi7in* t$e cost function
A #

(
(
(
"

+ %
i
T
Q %
i
u
T
> u t =2">
6it$ t$e (atla &Q> comman). /n terms of t$e ./D control *ains )escrie) earlier5 t$e full control
*ain is e4presse)
@

1
]
1
1
1
1
'
5 1 1
'
5 1 2
'
5 1 3
'
5 1 4
'
5 1 5
'
5 1 '
'
5 2 1
'
5 2 2
'
5 2 3
'
5 2 4
'
5 2 5
'
5 2 '
.
=21>
#$e $elicopter system runs t$e ris& of inte*rator 6in)up. #$at is5 *i-en a lar*e error in t$e et6een t$e
measure) an) )esire) pitc$ an*le5 -
)
5 or et6een t$e measure) an) )esire) ya6 an*le5 -
)
5 t$e
inte*rator outputs a lar*e -olta*e t$at can saturate t$e amplifier. Dy t$e time t$e measure) an*le
reac$es t$e )esire) an*le t$e inte*rator uilt-up so muc$ ener*y t$at it remains saturate). #$is can
cause lar*e o-ers$oots an) oscillations in t$e response. #o fi4 t$is5 an inte*ral 6in)up protection
al*orit$m is use). Fi*ure 19 illustrates t$e anti-6in)up sc$eme implemente) to control t$e pitc$.
Document Number 658 / Revision 2. / !a"e 2
2-DOF Helicopter Reference Manual
Figure 14: Anti-win#up loop.
#$e inte*rator input s$o6n in t$e 6in)up loop is
e
i
+ + '
5 1 5
8 9
#
'
5 1 '
8 9
#

u B
T
r
.
=21>
?$en t$e inte*rator output -olta*e5 B5 is lar*er t$an t$e impose) inte*ral saturation t$en t$e saturation
error ecomes ne*ati-e5 e
s
O ". #$e saturation error *ets )i-i)e) y t$e reset time5 #
r
5 an) its result is
a))e) to t$e inte*rator input. #$is effecti-ely )ecreases t$e inte*rator input an) 6in)s-)o6n t$e
inte*rator. /n t$e simulation an) e4perimental results t$e saturation limit of t$e inte*rator is set to 5
2olts an) t$e reset time to 1 secon) for ma4imum 6in)-)o6n spee).
-. In'.ab Procedure
".1. 2-DOF Helicopter 1i)rar&
#$e $eliC2) li.m)l Simulin& mo)el s$o6n in Fi*ure 2" is t$e 3uanser 2 DOF Helicopter Simulin&
lirary an) it contains -arious susystem t$at are use) in t$e supplie) Simulin& mo)els liste) in #ale
1. #$e 2DOF HE&<: FFC&Q>C< !ontroller susystem implements t$e fee)-for6ar) control an) t$e
+3< ./D position controller )iscusse) in Section '.2. #$e 2DOF HE&<: FFC&Q> !ontroller is a fee)-
for6ar) an) proportional-)eri-ati-e control. #$us it is t$e same as t$e FFM+3<M/ al*orit$m )e-elope)
e4cept t$ere is no inte*ral action. #$e nonlinear fee)-for6ar) control is constructe) in t$e 3itc$ /ee#-
/orwar# controller loc&. #$e 2DOF HE&<: Donlinear 1o#el contains t$e nonlinear mo)el
summari7e) in Section '.1.
Document Number 658 / Revision 2. / !a"e 2#
2-DOF Helicopter Reference Manual
Figure 22: 2-DOF Helicopter *imulin' li"rar+.
#$e interior of t$e 2DOF HE&<: FFC&Q>C< !ontroller susystem is )isplaye) in Fi*ure 21. @s )is-
cusse) in Section '.25 t$e position an) -elocity states are multiplie) y t$e correspon)in* elements of
control *ain E. #$e state inclu)es t$e inte*ral of t$e pitc$ an) ya6 an*les an) t$ose are multiplie) y
t$e inte*ral *ains in E. Furt$er t$e anti-6in)up sc$eme s$o6n in Fi*ure 19 is implemente) in t$e 3itc$
<ntegral Antiwin#up an) =aw <ntegral Antiwin#up loc&s. #$e 3itc$ /ee#-/orwar# controller an)
2DOF HE&<: FFC&Q> !ontroller susystems loc&s are lin&e) to 2-DOF Helicopter Simulin& lirary.
Document Number 658 / Revision 2. / !a"e 22
2-DOF Helicopter Reference Manual
Figure 21: *u"s+stem t$at implements t$e FFC&Q>C< controller.
".2. Controller %im(lation
-.2.1. b/ecti!es
/n-esti*ate t$e close)-loop position control performance of t$e FFM+3< an) FFM+3<M/ usin*
a nonlinear mo)el of t$e 2-DOF Helicopter system.
Ansure t$e controller )oes not saturate t$e actuator.
Document Number 658 / Revision 2. / !a"e 2$
2-DOF Helicopter Reference Manual
-.2.2. Procedure
Follo6 t$ese steps to simulate t$e close)-loop response of t$e 2-DOF Helicopter1
1. +oa) t$e (atla soft6are.
2. Open Simulin& mo)el s_$eli_2#_//_lqr_i.m#l s$o6n in Fi*ure 22.
Figure 22: *imulin' #iagram use# to simulate 2-DOF Helicopter s+stem.
3. #$e susystem laele) Desire# Angle /rom 3rogram is use) to *enerate a )esire) pitc$ an) ya6
an*le 6$ile t$e Desire# :oltage loc& fee)s open-loop -olta*es. #$e !ontroller *witc$ loc&
implements t$e follo6in* s6itc$in* lo*ic1
8a9 s6itc$ P 11 FFM+3< close)-loop control.
89 s6itc$ P 21 FFM+3<M/ close)-loop control.
8c9 s6itc$ P 31 @pply open-loop -olta*e to pitc$ motor.
8)9 s6itc$ P 41 @pply open-loop -olta*e to ya6 motor.
?$en t$e s6itc$ is 1 or 2 t$e system runs in close)-loop an) 6$en it is 3 or 4 t$e user can
comman) -olta*es )irectly to t$e actuators. ?$en t$e s6itc$ is ma)e from t$e close)-loop
mo)e to open-loop mo)e t$e controller -olta*e -alues are latc$e) an) t$e Desire# :oltage
loc& s$o6n in Fi*ure 22 is enale). #$is is particularly useful 6$en performin* mo)el
-ali)ation an) parameter tunin*
Document Number 658 / Revision 2. / !a"e 2%
2-DOF Helicopter Reference Manual
4. #$e interior of t$e 2DOF Helicopter - !lose#-loop *+stem *imulation susystem is s$o6n in
Fi*ure 23. #$e +3< an) +3<M/ control loc&s alon* 6it$ t$e nonlinear mo)el are all lin&e) to
t$e 2 DOF Helicopter &i"rar+ an) are )escrie) in Section 7.1. #$e !ontroller *witc$
susystem implements t$e lo*ic to s6itc$ et6een t$e FFM+3< an) FFM+3<M/ controllers an)
et6een t$e pitc$ an) ya6 open-loop mo)es.
Figure 2(: !lose#-loop simulation o/ 2-DOF Helicopter.
5. Open t$e (atla script calle) setup la $eli 2).m. #$is script sets t$e mo)el parameters5 control
*ains5 amplifier limits5 an) so on t$at are use) in t$e 2 DOF Helicopter Simulin& mo)els
supplie)5 suc$ as sC$eliC2)Cl:r i.m)l. Dy )efault5 E C@D+A .5 E C@D+A F5 2(@N ;.( .5
2(@N ;.( F5 E AC .5 an) E AC F is set to matc$ t$e confi*uration use) in Section 5.3. /f5
for e4ample5 a *ain cale of 3 is use) 6it$ t$e ;.(-24"5 instea) of 5 t$en t$e script parameter
E C@D+A . must e c$an*e) to 3. #$e parameter t$etaC" initiali7es t$e inte*rator laele)
t$eta in t$e 2DOF HE&< Donlinear 1o#el susystem t$at calculates t$e pitc$ position.
'. #$e saturation limit of t$e inte*rators t$at are use) in t$e FFM+3<M/ controller are set usin* t$e
-ariales S@#C/!#CA<<C./#CH an) S@#C/!#CA<<CF@?. #$e reset time of t$e anti-
6in)up loop can e c$an*e) usin* #rCp an) #rCy. For more information on t$e anti-6in)up
al*orit$m see Section '.2.
7. Ansure t$e CO!#<O++A< #F.A is set to B+3< @;#OB to *enerate t$e controller
automatically. Set t$e fee)-for6ar) *ain E
ff
P 1 2G2 an) t$e +3< an) +3<M/ 3 an) <
6ei*$tin* matrices as alrea)y *i-en in t$e script.
0. <un t$e (atla script setup_la"_$eli_2#.m to loa) t$e state-space mo)el matrices5 control
*ains5 an) -arious ot$er parameters into t$e (atla 6or&space. #$e +3< an) +3<M/ controls
*ains s$oul) e )isplaye) in t$e (atla Comman) ?in)o6.
9. Open t$e susystem laele) Desire# Angle /rom 3rogram; s$o6n in Fi*ure 245 elo6
Document Number 658 / Revision 2. / !a"e 25
2-DOF Helicopter Reference Manual
Figure 2,: Desire# Angle /rom 3rogram su"s+stem.
1". Ansure t$e pitc$ scope5 t$eta E#egF5 t$e ya6 scope5 psi E#egF; an) t$e motor input -olta*e scope5
:m_sim E:F5 are open. /f not5 *o into t$e *copes susystem an) )oule-clic& on t$ose sin&s.
11. #o *enerate a )esire) pitc$ step of 2"." )e*rees at "."5 H7 fre:uency5 set t$e Amplitu#e: 3itc$
E#egF *ain loc& to 7.5 )e*rees an) Frequenc+ input o4 in t$e *ignal 7enerator: EleBation
loc& to "."5 H7.
12. Clic& on t$e *tart simulation utton5 or on t$e *tart item in t$e *imulation menu5 to run t$e
close)-loop system usin* +3<M/ an) t$e scopes s$oul) rea) as s$o6n in fi*ures 255 2'5 an) 27.
/n eac$ scope5 t$e simulate) pitc$ an) ya6 an*les 8purple trace9 s$oul) trac& t$e correspon)in*
)esire) position si*nals 8yello6 trace9. @lso5 e4amine t$e -olta*e in t$e :m_sim E:F scope an)
ensure t$e front 8yello6 plot9 an) ac& motor 8purple plot9 are not saturate). <ecall t$at t$e
ma4imum pea& -olta*e t$at can e )eli-ere) to t$e front motor y t$e ;.(-24"5 is Q24 2 an)
to t$e ac& motor y t$e ;.(-15"3 is Q15." 2.
Document Number 658 / Revision 2. / !a"e 26
2-DOF Helicopter Reference Manual
Figure 2-: *imulate# pitc$ response un#er pitc$
re/erence step using &Q>C<.

Figure 2.: *imulate# +aw response un#er pitc$
re/erence step using &Q>C<.
Figure 25: *imulate# /ront an# "ac' motor Boltage
un#er pitc$ re/erence step using &Q>C<.
13. #o *enerate a )esire) ya6 step of 1"" )e*rees at "."5 H7 fre:uency set t$e Amplitu#e: =aw
E#egF loc& to 5"." )e*rees an) t$e Frequenc+ input o4 in t$e *ignal 7enerator: =aw loc& to
"."5 H7.
14. <un t$e simulation an) t$e responses s$o6n in fi*ures 205 295 an) 3" s$oul) e otaine). #$e
ya6 -olta*e saturates t$e ac& amplifier at -15 2
Document Number 658 / Revision 2. / !a"e 2&
2-DOF Helicopter Reference Manual
Figure 20: *imulate# pitc$ response un#er a #esire#
+aw re/erence step using &Q>C<.

Figure 24: *imulate# +aw response un#er a #esire# +aw
step using &Q>C<.
Figure (2: *imulate# /ront an# "ac' motor Boltage
un#er +aw re/erence step using &Q>C<.
15. #ry c$an*in* t$e )esire) ele-ation an) tra-el an*les to familiari7e yourself 6it$ t$e controller.
Oser-e t$at rate limiters are place) in t$e )esire) position si*nals to eliminate any $i*$-
fre:uency c$an*es. #$is ma&es t$e control si*nal smoot$er 6$ic$ places less strain on t$e
actuator.
".3. Open-loop 2mplementation
-.3.1. b/ecti!es
#$e o,ecti-es of runnin* t$e 2-DOF Helicopter in open-loop are to1
Iain an intuition on t$e )ynamics of t$e system5 in particular t$e couplin* effect t$at e4ists
et6een t$e pitc$ an) ya6 actuators.
Otain an i)ea on $o6 )ifficult it is to control t$e apparatus in or)er to compare $uman
operator performance 6it$ computer control.
Document Number 658 / Revision 2. / !a"e 28
2-DOF Helicopter Reference Manual
-.3.2. Procedure
1. +oa) (atla.
2. Open Simulin& mo)el q_$eli_2#_open_loop.m#l s$o6n in Fi*ure 31. #$e mo)el runs your
actual 2-DOF Helicopter plant y )irectly interfacin* 6it$ your $ar)6are t$rou*$ t$e 3ua<C
loc&s5 )escrie) in <eference =2>.
Figure (1: *imulin' #iagram to run 2-DOF Helicopter in open-loop wit$ Qua>!.
3. C-%*(A$2, ),&$/ )52(/&1 Open t$e )esi*n file setup_la"_$eli_2#.m an) ensure e-eryt$in* is
confi*ure) properly. #$e EC%OFS#/CEC2CN an) EC%OFS#/CEC2CF parameters control t$e
rate t$at a -olta*e comman) is *enerate). #$e %OFS#/CECNCDR an) %OFS#/CECFCDR
specify t$e )ea)7one of t$e ,oystic&. #$e )ea)7one is use) to remo-e ne*li*ile ,oystic&
outputs )ue to noise or from small motions in t$e ,oystic& $an)le.
4. A4ecute t$e setup_la"_$eli_2#.m (atla script to setup t$e 6or&space efore compilin* t$e
)ia*ram an) runnin* it in real-time 6it$ 3ua<C.
5. Open t$e 2DOF HE&< susystem. /ts contents are s$o6n in Fi*ure 32. #$is susystem contains
t$e 3ua<C loc&s t$at interface 6it$ t$e $ar)6are of t$e actual plant. #$e @nalo* Output loc&
sen)s t$e -olta*e compute) y t$e controller to t$e D@CD 6$ic$ )ri-es t$e actuators an) t$e
Anco)er /nput loc& rea)s t$e enco)er measurements.
'. C-%*(A$2, DAQ1 Doule-clic& on t$e H/+ /nitiali7e loc& in t$e Simulin& )ia*ram an) ensure
it is confi*ure) for t$e D@3 )e-ice t$at is installe) in your system. Dy )efault t$e loc& s$o6n
in Fi*ure 32 is setup for t$e 3uanser 30 $ar)6are-in-t$e-loop oar).
Document Number 658 / Revision 2. / !a"e 2'
2-DOF Helicopter Reference Manual
Figure (2: 2DOF HE&< su"s+stem contains Qua>! "loc's t$at inter/ace wit$ $ar#ware.
7. #$e -olta*e sent to t$e @nalo* Output loc& is amplifie) y t$e ;.(s an) applie) to t$e po6er
amplifierBs attac$e) motor. !ote t$at t$e control input is )i-i)e) y t$e amplifier *ain5
ECC@D+A5 efore ein* sent to t$e D@CD. #$is 6ay5 t$e amplifier *ain )oes not $a-e to e
inclu)e) in t$e mat$ematical mo)el as t$e -olta*e output from t$e controller is t$e -olta*e
ein* applie) to t$e motor. #$e ;.( an) D@CD saturation loc&s limit t$e amount of -olta*e
t$at can e fe) to t$e motor. /n t$is case5 since ECC@D+AC. P 5 an) ECC@D+ACF P 35 t$e
-olta*e is only saturate) y t$e ;.( an) not y t$e D@CD.
0. Open t$e t$eta E#egF5 psi E#egF5 an) :m E:F scopes in t$e *copes fol)er. #$ese scopes )isplay
Document Number 658 / Revision 2. / !a"e $
2-DOF Helicopter Reference Manual
ot$ t$e )esire) an) measure) an*les of t$e Helicopter as 6ell as t$e -olta*es ein* applie) to
t$e front an) ac& motors.
9. Ansure t$e $elicopter $as een setup an) all t$e connections $a-e een ma)e as instructe) in
Section 5.
1". #urn t$e po6er of t$e t6o ;ni-ersal .o6er @mplifiers on. #$e re) +AD on t$e upper-left
corner of t$e eac$ ;.( s$oul) e lit.
11. /n t$e q_$eli_2#_open_loop Simulin& )ia*ram5 ma&e sure t$e 3rogram9Ao+stic' loc& s$o6n in
Fi*ure 31 is set to 2 in or)er to *enerate t$e )esire) -olta*e from t$e ,oystic&.
12. Clic& on 3uarc S Duil) to compile t$e co)e from t$e Simulin& )ia*ram.
13. Select 3uarc S Start to e*in runnin* t$e controller.
NOTE; C+(5: -% &', STOP 1$&&-% -% &', S(4$+(%: &--+ 102 0& 0%. &(4, &- )&-/ 2$%%(%A
&', 5-%&2-++,2.
14. #ry to rin* t$e $elicopter o)y to a $ori7ontal y pullin* t$e ,oystic& $an)le to6ar) you. #$is
supplies a positi-e -olta*e to t$e pitc$ motor an) causes t$e pitc$ an*le to increase
15. @s )epicte) in Fi*ure 335 you 6ill notice t$at t$e ya6 an*le mo-es cloc&6ise in t$e positi-e
)irection as t$e -olta*e in t$e pitc$ motor increases. Compensate for t$is couplin* effect y
mo-in* t$e ,oystic& arm to t$e left an) apply a ne*ati-e -olta*e to t$e ya6 motor. @s
illustrate)5 t$e pitc$ is e-entually staili7e) at aout " )e*rees 6$en t$e pitc$ motor -olta*e is
appro4imately 12.5 2 an) t$e ya6 e*ins to staili7e 6$en fee)in* a -olta*e of aout -'." 2 to
t$e ya6 motor. #$e -olta*e )oes not surpass t$e limit of t$e po6er amplifiers1 Q24 2 for
;.(-24"5 an) Q15 2 for ;.(-15"3.
Figure ((: E//ect o/ pitc$ on +aw.
1'. From t$is point5 no6 try )ecreasin* t$e ya6 -olta*e an) oser-e its effect on t$e pitc$ an*le.
17. @s )epicte) in Fi*ure 345 applyin* a ne*ati-e -olta*e to t$e ya6 motor causes t$e pitc$ an*le to
)ecrease5 i.e. t$e $elicopter nose *oes )o6n. Similarly to t$e effect t$e pitc$ motor $as on t$e
ya6 motion5 t$e -olta*e applie) to t$e ya6 motor *enerates a tor:ue on t$e pitc$ a4is
Document Number 658 / Revision 2. / !a"e $#
2-DOF Helicopter Reference Manual
Figure (,: E//ect o/ +aw on pitc$.
10. Ira)ually rin* t$e $elicopter ac& to startin* position.
19. Clic& on t$e *top utton on t$e Simulin& )ia*ram tool ar 8or select 3uarc S Stop from t$e
menu9 to stop runnin* t$e controller.
2". /f t$e laoratory session is complete5 po6er off ot$ ;.( units.
".4. Closed-loop Position Control
2mplementation
-.#.1. b/ecti!es
#$e o,ecti-es of runnin* t$e 2 DOF Helicopter in close)-loop are to1
/n-esti*ate t$e close)-loop performance et6een t$e FFM+3< an) t$e FFM+3<M/ controllers
runnin* on t$e actual 2 DOF Helicopter plant.
Compare t$e measure) close)-loop response 6it$ t$e simulate) response
-.#.2. Procedure0 2'&F (elicopter
Follo6 t$is proce)ure to run t$e FFM+3< an) t$e FFM+3<M/ controllers on t$e actual $elicopter plant1
1. +oa) (atla.
2. Open Simulin& mo)el q_$eli_2#_//_lqr_i.m#l s$o6n in Fi*ure 35 t$at implements t$e close)-
loop +3< an) +3<M/ position controllers.
Document Number 658 / Revision 2. / !a"e $2
2-DOF Helicopter Reference Manual
Figure (-: *imulin' mo#el use# wit$ Qua>! to run t$e close#-loop controller on t$e 2-DOF Helicopter.
3. C-%*(A$2, ),&$/ )52(/&1 Open t$e )esi*n file setup_la"_$eli_2#.m an) ensure e-eryt$in* is
confi*ure) properly.
4. A4ecute t$e setup_la"_$eli_2#.m (atla script to setup t$e 6or&space efore compilin* t$e
)ia*ram an) runnin* it in real-time 6it$ 3ua<C. #$is file loa)s t$e mo)el parameters of t$e 2-
DOF Helicopter system5 calculates t$e +3< an) +3<M/ fee)ac& *ains5 an) sets -arious ot$er
parameters t$at are use) suc$ as t$e filter cutoff fre:uencies5 amplifier *ain5 enco)er
sensiti-ities5 an) t$e ;.( an) D@CD limits.
Document Number 658 / Revision 2. / !a"e $$
2-DOF Helicopter Reference Manual
5. Open t$e 2-DOF HE&< susystem s$o6n in Fi*ure 3'. /t contains t$e 3ua<C loc&s t$at
interface 6it$ t$e $ar)6are of t$e actual plant. #$e @nalo* Output loc& outputs t$e -olta*e
compute) y t$e controller to t$e D@CD an) t$e Anco)er /nput loc& rea)s t$e enco)er
measurements.
'. C-%*(A$2, DAQ1 Doule-clic& on t$e H/+ /nitiali7e loc& locate) in t$e 2 DOF Helicopter G
!lose#-loop Actual *+stem T 2 DOF HE&< susystem5 s$o6n in Fi*ure 325 ao-e5 an) ensure it
is confi*ure) for t$e D@3 )e-ice t$at is installe) in your system. Dy )efault t$e loc& is setup
for t$e 3uanser 30 $ar)6are-in-t$e-loop oar).
7. Ansure t$e $elicopter $as een setup an) all t$e connections $a-e een ma)e as instructe) in
Section 5.
0. #urn t$e po6er of t$e t6o ;ni-ersal .o6er @mplifiers on. #$e re) +AD on t$e upper-left
corner of t$e eac$ ;.( s$oul) e lit.
9. /n t$e q_$eli_2#_//_lqr_i Simulin& )ia*ram5 ma&e sure t$e 3rogram9Ao+stic' loc& s$o6n in
Fi*ure 35 is set to 1 in or)er to *enerate t$e )esire) an*le from Simulin&.
1". Clic& on 3uarc S Duil) to compile t$e co)e from t$e Simulin& )ia*ram.
11. Select 3uarc S Start to e*in runnin* t$e controller. #$e pitc$ propeller s$oul) start turnin*
li*$tly.
NOTE; C+(5: -% &', STOP 1$&&-% -% &', S(4$+(%: &--+ 102 0& 0%. &(4, &- )&-/ 2$%%(%A
&', 5-%&2-++,2.
12. /nitially t$e $elicopter pitc$ an*le is -3"." )e*rees. /nsi)e t$e Desire# Angle /rom 3rogram
susystem5 set t$e Amplitu#e: 3itc$ E#egF to 1" an) t$e 3itc$: !onstant E#egF to ". Set t$e pitc$
constant *ra)ually5 i.e. increment it y steps of 1" )e*rees. #$e $elicopter s$oul) e trac&in*
t$is reference position aout its $ori7ontal.
13. Open t$e t$eta E#egF5 psi E#egF5 an) :m_actual E:F scopes in t$e *copes fol)er. /n t$e t$eta
E#egF scope5 t$e )esire) pitc$ position is t$e yello6 line5 t$e measure) pitc$ position is t$e
purple plot5 an) t$e simulate) pitc$ position is li*$t lue trace. Similarly in t$e ya6 scope5 psi
E#egF5 yello6 is t$e )esire) ya65 purple is t$e measure) ya65 an) li*$t lue is t$e simulate)
ya6. #$e :m_actual E:F scope plots t$e -olta*e ein* applie) to t$e pitc$ motor in yello6 an)
ya6 motor in purple.
14. Fi*ure 3' )epicts t$e typical measure) an) simulate) pitc$ an) ya6 response un)er a )esire)
step pitc$ an*le. #$e measure) response is t$e soli) re) line 8-95 t$e simulation is t$e )as$e)
lue line 8--95 an) t$e reference is t$e soli) *reen line 8-9. !otice in ot$ t$e measure) an)
simulate) responses t$e pitc$ an*le $as a stea)y-state error.
Document Number 658 / Revision 2. / !a"e $%
2-DOF Helicopter Reference Manual
Figure (.: !lose#-loop &Q> response un#er pitc$ re/erence step.
15. /nsi)e t$e Desire# Angle /rom 3rogram set t$e Amplitu#e: 3itc$ E#egF to " an) t$e Amplitu#e:
=aw E#egF to 5". #$e $elicopter s$oul) trac&in* t$e comman)e) ya6 an*le.
1'. Fi*ure 37 )epicts t$e typical measure) an) simulate) pitc$ an) ya6 response *i-en a )esire)
step ya6 an*le. #$ere is a stea)y-state error in t$e ya6 an*le.
Figure (5: !lose#-loop &Q> response un#er +aw re/erence step.
Document Number 658 / Revision 2. / !a"e $5
2-DOF Helicopter Reference Manual
17. Set Amplitu#e: =aw E#egF to ". Dot$ t$e pitc$ an) ya6 comman)s s$oul) no6 e 7ero.
10. #$e stea)y-state error can e remo-e) usin* inte*ral action. S6itc$ to t$e FFM+3<M/ control
y settin* t$e control s6itc$ source loc& to 2. #$e pitc$ an) ya6 an*le s$oul) ot$5
e-entually5 con-er*e to " )e*ree.
19. Set t$e Amplitu#e: 3itc$ E#egF to 12 an) t$e 3itc$: !onstant E#egF to 2 to oser-e t$e +3<M/
response un)er a step pitc$ reference. #$e result s$oul) e similar to t$e response s$o6n in
Fi*ure 30. !ote t$at t$e stea)y-state error is remo-e).
Figure (0: !lose#-loop &Q>C< response un#er pitc$ re/erence step.
2". Set t$e Amplitu#e: 3itc$ E#egF to " an) Amplitu#e: =aw E#egF to 5" oser-e t$e +3<M/
response un)er a )esire) ya6 step. #$e otaine) response s$oul) e similar to Fi*ure 39. #$ere
is no stea)y-state error ut t$e controller saturates t$e ya6 amplifier )ue to t$e lar*e step
reference.
Document Number 658 / Revision 2. / !a"e $6
2-DOF Helicopter Reference Manual
Figure (4: !lose#-loop &Q>C< response un#er +aw re/erence step.
21. @lternati-ely5 t$e )esire) an*le can e *enerate) usin* t$e ,oystic&5 as )escrie) in Section 5.4.
#o use t$e ,oystic&5 set t$e 3rogram9Ao+stic' s6itc$ s$o6n in Fi*ure 35 to 2. #$e rate at 6$ic$
t$e )esire) an*le increases or )ecreases *i-en a ,oystic& position can e c$an*e) usin* t$e
EC%OFS#/CECN an) EC%OFS#/CECF -ariales t$at are set in t$e setup_la"_$eli_2#.m script
file an) t$e usin* t$e >ate !omman# &no. ?$en startin*5 set t$e >ate !omman# &no on t$e
,oystic& to t$e mi)point position.
CAUTION; D- %-& )3(&5' *2-4 &', P2-A204 &- &', 9-.)&(5: C*2-4 1 &- 2D 3',% &',
5-%&2-++,2 () 2$%%(%A. Set t$e pro*ramG,oystic& s6itc$ to 2 efore startin* 3ua<C if t$e
,oystic& is to e use).
22. Ira)ually rin* t$e $elicopter ac& to startin* position.
23. Clic& on t$e *top utton on t$e Simulin& )ia*ram tool ar 8or select 3uarc S Stop from t$e
menu9 to stop runnin* t$e co)e.
24. .o6er off t$e t6o ;.(s.
".$. Model 3alidation 2mplementation
-.).1. b/ecti!es
#$e o,ecti-es of runnin* t$e mo)el -ali)ation controller on t$e 2 DOF Helicopter are to1
2erify t$at t$e nonlinear mo)el5 6$ic$ is summari7e) in Section '.15 represents t$e actual
)e-ice 6it$ reasonale accuracy.
<ou*$ly i)entify t$e rotary -iscous friction parameter aout pitc$ an) ya6 a4is.
Document Number 658 / Revision 2. / !a"e $&
2-DOF Helicopter Reference Manual
-.).2. Procedure
Follo6 t$is proce)ure to i)entify t$e -iscous rotary friction on t$e ya6 a4is an) )o mo)el -ali)ation of
t$e pitc$1
1. Follo6 t$e steps 1 to 11 *i-en in Section 7.4 to run t$e q_$eli_2#_//_lqr_i 3ua<C controller.
#$e $elicopter s$oul) e at t$e startin* point5 i.e. pitc$ of -3" )e*rees an) ya6 of " )e*rees.
2. <un t$e +3<M/ controller y settin* t$e control s6itc$ source loc& to 2.
3. /nsi)e t$e Desire# Angle /rom 3rogram set t$e Amplitu#e: 3itc$ E#egF to " an) t$e 3itc$:
!onstant E#egF to ". #$e $elicopter s$oul) e staili7e) aout a pitc$ an) ya6 an*le of 7ero.
4. /n t$e *copes susystem5 )oule-clic& on t$e t$eta E#egF5 psi E#egF5 an) :m Actual E:F sin&s. /n
t$e t$eta E#egF scope5 t$e )esire) pitc$ position is t$e yello6 line5 t$e measure) pitc$ position is
t$e purple plot5 an) t$e simulate) pitc$ position is li*$t lue trace. Similarly for t$e ya6 psi
E#egF scope. #$e :m_actual E:F scope plots t$e -olta*e ein* applie) to t$e pitc$ motor in
yello6 an) ya6 motor in purple.
5. #o i)entify t$e -iscous rotary friction parameter in t$e ya6 a4is a -olta*e step comman) must
e applie) to t$e ya6 motor. /n t$e Desire# :oltage susystem5 set t$e *ignal 7enerator: =aw
E:F loc& to 2.5.
'. C$an*e t$e control s6itc$ to 4. #$e ya6 input motor -olta*e is no6 t$e control -olta*e use) to
staili7e t$e ya6 an*le5 u
U
l:r5y
5 a))e) to t$e comman)e) open-loop -olta*e5 i.e. 2
m5p
P u
U
l:r5y
M
2.5. #$e plot s$oul) resemle Fi*ure 4".
Figure ,2: <#enti/+ing t$e Biscous #amping a"out t$e +aw a%is.
7. For calculatin* t$e -iscous )ampin* parameter D
y
5 consi)er t$e linear e:uation )escriin* t$e
ya6 motion in t$e 2-DOF Helicopter (aple 6or&s$eet 8or its H#(+ e:ui-alent9. Ii-en t$at
t$e $elicopter is rotatin* more or less at a constant spee)5 it can e assume) t$at t$e
acceleration is 7ero5 t$us
Document Number 658 / Revision 2. / !a"e $8
2-DOF Helicopter Reference Manual

#
#
2
t
2
8 9 t "
.
=22>
Settin* t$e acceleration to 7ero as 6ell as t$e pitc$ an*le to 7ero an) t$en sol-in* for t$e
-iscous )ampin* term *i-es t$e e4pression

+
+ @
++
:
5 m +
@
+p
:
5 m p

_
,

#
#
t
8 9 t
aBg
=23>
6$ere t$e ottom term is t$e a-era*e -elocity of t$e ya6 an*le. From Fi*ure 4"5 t$e -olta*e
an) a-era*e -elocity foun) are1
:
5 m +
7.'5 = > :
5
=24>
:
5 m p
11.3' = > :
5
=25>

_
,

#
#
t
8 9 t
aBg
".9401

1
]
1
1
ra#
s
5
=2'>
an) t$e parameter E
yy
an) E
yp
are )efine) in #ale 3. Sustitutin* t$ese -alues into A:uation
=23> *i-es t$e e:ui-alent -iscous )ampin* actin* aout t$e ya6 a4is1

+
".319

1
]
1
1
D m s
ra#
.
0. Drin* t$e $elicopter ac& to 8 P "5 P "9 y settin* t$e control s6itc$ loc& to 2 to run t$e
+3<M/ controller.
9. #o apply a -olta*e )irectly to t$e pitc$ motor set t$e control s6itc$ source loc& to 3.
1". /n t$e Desire# :oltage susystem5 set t$e fre:uency of t$e *ignal 7enerator: 3itc$ E:F loc& to
".4 Hert75 t$e Amplitu#e: 3itc$ E:F *ain loc& to ".25 an) t$e !onstant 3itc$ E:F to ".
11. @s s$o6n in Fi*ure 415 t$e measure) an) simulate) pitc$ an*les are :uite close. #$e pitc$
-iscous )ampin* term D
p
6as estimate) y tunin* its -alue online as t$e controller is runnin*.
#o )o t$is enter a -alue for D
p
in t$e (atla comman) 6in)o65 for e4ample D
p
P ".0. Decause
t$e parameter c$an*e is ma)e in (atla 8an) not )irectly in t$e Simulin& mo)el95 t$e controller
t$at is runnin* must e up)ate) for t$e c$an*es of t$is parameter to ta&e effect. #$e c$an*e can
e applie) y clic&in* on t$e E#it menu in t$e Simulin& mo)el an) selectin* t$e )p#ate
Diagram item. @lternati-ely5 controller parameters can e up)ate) y use t$e &eystro&e C#<+-
D 6$ene-er t$e Simulin& mo)el is acti-e.
Document Number 658 / Revision 2. / !a"e $'
2-DOF Helicopter Reference Manual
Figure ,1: Open-loop pitc$ step.
12. Ira)ually rin* t$e $elicopter ac& to startin* position.
13. Clic& on t$e *top utton on t$e Simulin& )ia*ram tool ar 8or select 3uarc S Stop from t$e
menu9 to stop runnin* t$e co)e.
14. (a&e sure ot$ t$e ;.(-15"3 an) ;.(-24"5 are po6ere) off if t$e session is complete.
1. References
=1> 3uanser. Q,9Q0 )ser 1anual.
=2> 3uanser. Qua>! )ser 1anual 8type doc quarc in (atla to access9.
=3> 3uanser. Qua>! <nstallation 1anual.
=4> 3uanser. )31 )ser 1anual.
=5> .ittman. 3ittman &O !O7 D! *erBo 1otor *eries 0222; 4222; an# 1,222.
='> Faul$aer. Faul$a"er *eries 20,2 1o#el 22.! motor.
Document Number 658 / Revision 2. / !a"e %

You might also like