Introduction to Multicoptr Dsign and Control Lsson 05 Coordinat Systm and Attitud Rprsntation Quan Quan, Associat Profssor _uaa@uaa.du.cn BUAA Rlial Flight Control Group, http://rfly.uaa.du.cn/ Bihang Univrsity, China
Prfac What ar th thr attitud rprsntation mthods and th rlationship twn thir drivativs and th aircraft ody s angular vlocity? 2016/12/25 2
Outlin 1. Coordinat Systm 2. Attitud Rprsntation Eulr Angls Rotation matrix Quatrnion 3. Conclusion 2016/12/25 3
1. Coordinat Systm Right-Hand Rul Fig 5.1 Coordinat axs and th positiv dirction of a rotation using th right-hand rul As shown in th figur aov, th thum of th right hand points to th positiv dirction of th ox axis, th first fingr points to th positiv dirction of th oy axis and th middl fingr points to th positiv dirction of th oz axis. Furthrmor, as shown in th figur aov, in ordr to dtrmin th positiv dirction of a rotation, th thum of th right hand points th positiv dirction of th rotation axis and th dirction of th nt fingrs is th positiv dirction of rotation. 2016/12/25 4
o z EFCF and ABCF x y 1. Coordinat Systm o z x Fig 5.2 Th rlationship twn th ABCF and th EFCF Th Earth-Fixd Coordinat Fram (EFCF) is usd to study multicoptr s dynamic stat rlativ to th Earth s surfac and to dtrmin its 3D position. Th Earth s curvatur is ignord. Th initial position of th multicoptr or th cntr of th Earth is oftn st as th coordinat origin o, th axis ox points to a crtain dirction in th horizontal plan and th oz axis points prpndicularly to th ground. Thn, th oyaxis is dtrmind according to th right-hand rul. Th Aircraft-Body Coordinat Fram (ABCF) is fixd to th multicoptr. Th Cntr of Gravity (CoG) of th multicoptr is chosn as th origin o. Th ox axis points to th nos dirction in th symmtric plan of th multicoptr. Th axisoz is in th symmtric plan of th multicoptr, pointing downwards, prpndicular to th ox axis. Th o y axis is dtrmind according to th right-hand rul. Suscript rprsnts th Earth, suscript rprsnts th Body. y 2016/12/25 5
EFCF and ABCF o z x o y z Fig 5.2 Th rlationship twn th ABCF and th EFCF 1. Coordinat Systm x y Dfin th following unit vctors 1 0 0 1 0, 2 1, 3 0 0 0 1 In th EFCF, th unit vctors along th ox axis, oy axis and oz axis ar xprssd as 1, 2, 3, rspctivly. In th ABCF, th unit vctors along th oxaxis, o y axis and oz axis satisfy th following rlationship (Suprscript rprsnts th xprssion in ABCF of a vctor) 1 1, 2 2, 3 3 In th EFCF, th unit vctors along th axis, o y axis and oz axis ar xprssd as 1, 2,, 3 rspctivly. (Suprscript rprsnts th xprssion in EFCF of a vctor). 2016/12/25 6 ox
k 2 2 2. Attitud Rprsntation Eulr Angls (1) Dfinition Th rotation from th EFCF to th ABCF is composd of thr lmntal rotations aout, k, n axs y,, sparatly. 3 2 1 o o o 1 k 1 n 2 k 1 k2( n2) 3( k3) (a) Yaw angl () Pitch angl (c) Roll angl k 3 n 3 n 1 Fig 5.3 Eulr angls and fram transformation 2 n 3 3 n1( 1) 2016/12/25 7
2. Attitud Rprsntation Eulr Angls (1) Dfinition Fig 5.4 Intuitiv rprsntation of th Eulr angls (x axis is orang, y axis is grn, z axis is lu) 2016/12/25 8
2. Attitud Rprsntation x x Eulr Angls z (1) Dfinition o y Fig 5.5 Rprsntation of Eulr angls o z y Th angls twn th EFCF and th ABCF ar attitud angls, namly Eulr angls. Pitch angl :th angl twn th ody axis and th horizon plan. Th pitch angl is positiv whn th aircraft nos pitchs up. Yaw angl : th angl twn th projction of th ody axis in th horizon plan and th arth s axis. Th yaw angl is positiv whn th aircraft ody turns to right. Roll angl : th rotation angl of th aircraft symmtry plan around th ody axis. Th roll angl is positiv whn th aircraft ody rolls to right. 2016/12/25 9
2. Attitud Rprsntation Eulr Angls (1) Dfinition o x Roll angl y Yaw angl o x x z o x o x Pitch angl y Fig 5.6 Diagram of th Eulr angls o Th pitch angl shown in th lft figur is positiv; Th roll angl shown in th lft figur is ngativ; Th yaw angl shown in th lft figur is positiv. o z z 2016/12/25 10
2. Attitud Rprsntation Eulr Angls (2) Rlationship twn th attitud rat and th aircraft ody s angular vlocity Th angular vlocity of th aircraft ody s rotation is Thn ω x y z x y z T? 2016/12/25 11
Th angular vlocity of th aircraft ody s rotation is T ω x y z Thn 2. Attitud Rprsntation Eulr Angls (2) Rlationship twn th attitud rat and th aircraft ody s angular vlocity ω k n 3 2 1 x 1 0 sin y 0 cos cossin 0 sin coscos z Suprscript rprsnts th xprssion in ABCF of a vctor. 2016/12/25 12
Eulr Angls (2) Rlationship twn th attitud rat and th aircraft ody s angular vlocity Furthrmor whr Whn Θ 2. Attitud Rprsntation T, 0, on has Θ W ω 1 tan sin tancos W 0 cos sin 0 sin cos cos cos x y z 2 Singularity prolm 2016/12/25 13
2. Attitud Rprsntation Rotation Matrix (1) Dfinition Dfin th rotation matrix as Rotation matrix from th ABCF to th EFCF R 1 2 3 RR R R I T T 3 dt R 1 Th vctors in rotation matrix satisfy Not: dt() rprsnts th dtrminant R R, R R, R R 1 1 1 2 2 2 3 3 3 Suprscript rprsnts th xprssion in EFCF of a vctor. Suprscript rprsnts th xprssion in ABCF of a vctor. 2016/12/25 14
Rotation Matrix Th rotation from th EFCF to th ABCF is composd of thr lmntal stps whr (1) Dfinition 2. Attitud Rprsntation o o o 1 k 1 n 2 k 1 k2( n2) R x 1 1 1 1 1 k n n R y k n k 2 2 2 2 2 z R 3 k 3 3 n3 3 k 2 cos sin 0 cos 0 sin 1 0 0 Rz sin cos 0, y 0 1 0, x 0 cos sin R R. 0 0 1 sin 0 cos 0 sin cos 2 3( k3) (a) Yaw angl () Pitch angl (c) Roll angl k 3 n 3 n 1 2 n 3 3 n1( 1) 2016/12/25 15
2. Attitud Rprsntation Rotation Matrix (1) Dfinition Rx 1 1 1 1 1 k n n R y k n k 2 2 2 2 2 z R 3 k 3 3 n3 3 R 1 R R R R 1 1 1 y x z = R R R z y x cos cos cos sinsinsin cos cos sin cossin sin cos sin sin sinsin cos cos sin sincos cos sin. sin sincos coscos 2016/12/25 16
(1) Dfinition Calculat Eulr angls from th rotation matrix 2. Attitud Rprsntation Rotation Matrix R r r r r r r 11 12 13 r21 r22 r23 31 32 33 tan r r 21 11 sin r r32 tan r Whn, 2 0 sin cos R 0 cos sin. 1 0 0 33 31 Infinit numr of cominations r21 arctan r11 arcsin r r32 arctan r 2 Singularity prolm 33 31 It is assumd that 0 in this cas. 2016/12/25 17
2. Attitud Rprsntation Rotation Matrix (2) Rlationship twn th drivativ of th rotation matrix and th aircraft ody s angular vlocity Th cross product of two vctors is dfind as whr 0 az a y a 0 a x z ay a 0 aa x T a ax ay a z a a a sin n and T x y z 2016/12/25 18
2. Attitud Rprsntation Rotation Matrix (2) Rlationship twn th drivativ of th rotation matrix and th aircraft ody s angular vlocity If th rigid ody s rotation (without translation) is only considrd, 3 thn th drivativ of a vctor r satisfis (Similar to th circular motion) d r ω r ω d r dt dt whr th symol rprsnts th vctor cross product. On has r d 1 2 3 ω 1 ω 2 ω 3 dt Fig 5.7 Th drivativ of a vctor prsntd y th circular motion 2016/12/25 19
2. Attitud Rprsntation Rotation Matrix (2) Rlationship twn th drivativ of th rotation matrix and th aircraft ody s angular vlocity dr dt According to ω R ω and th proprty of th cross product R ω R 1 R ω R 2 R ω R 3 R ω 1 R ω 2 R ω 3 R ω 1 ω2 ω3 R ω Following proprty of th cross product is usd : for a rotation 33 matrix R dt R 1 and any two vctors a,, on has 2016/12/25 20 3 RaR R a Th us of th rotation matrix can avoid th singularity prolm. Howvr, sinc has nin unknown varials, th computational urdn of solving uation is havy.
2. Attitud Rprsntation Quatrnion (1) Dfinition Quatrnions ar normally writtn as whr 4 0 is th scalar part of and T 3 v 1 2 3 is th vctor part. For a ral numr s, th corrsponding uatrnion is dfind as s 0 T 13. For a 3 vctor v, th corrsponding uatrnion is T T 0 v. 0 v Fig 5.8 Quatrnion plau on Brougham (Broom) Bridg, Dulin, and th imag is from https://n.wikipdia.org/wiki/quatrnion It rads Hr as h walkd y on th 16th of Octor 1843 Sir William Rowan Hamilton in a flash of gnius discovrd th fundamntal formula for uatrnion multiplication & cut it on a ston of this ridg. i 2 = j 2 = k 2 = ijk = 1 2016/12/25 21
(2) Quatrnions asic opration ruls Addition and sutraction Multiplication p p p 0 0 0 0 pv v pv v p p p p T 0 0 0 0 v v pv v pvv p0v 0pv Multiplication proprtis (Not:, r, m ar uatrnions, s is a scalar, u, v ar column vctors) rm rm 2. Attitud Rprsntation Quatrnion rm r m rm s s0 s s v u T 0 0 uv v u v u v 2016/12/25 22
2. Attitud Rprsntation Quatrnion (2) Quatrnions asic opration ruls Conjugat 0 v 0 v Som proprtis: p p p p Norm 2 2 T 0 v v 2 2 2 2 0 1 2 3 Som proprtis: p p 2016/12/25 23
2. Attitud Rprsntation Quatrnion (2) Quatrnions asic opration ruls Invrs 1 1 0 31 According to th dfinition of, on has 1 Unit uatrnion For a unit uatrnion, it satisfis 1. Lt p 1. Thn p 1 1 2016/12/25 24
Quatrnion (3) Quatrnions as rotations 3 1 Assum that rprsnts a rotation procss and v rprsnts a vctor. Thn undr th action of, th 3 vctor v 1 is turnd into v 1. This procss is xprssd as Th first row 0 0 1 always stands v 1 v1 A unit uatrnion can always writtn in th form cos 2 v sin 2 Radrs can furthr rfr to: 2. Attitud Rprsntation [1] Shomak K. Quatrnions. Dpartmnt of Computr and Information Scinc, Univrsity of Pnnsylvania, USA, 1994 Fig 5.9 Physical maning of unit uatrnions 2016/12/25 25 x o z v v 1 v 1 y
2. Attitud Rprsntation v Quatrnion (3) Quatrnions as rotations Dfin two unit vctors v with ing th angl twn 0, v1 v1 v0 2 thm. Thrfor, on has T vv 0 1 cos 2 v0 v1 v0v1 v0v1 v 0 v1 v0 v1 sin sin 2 2 Dfin a unit uatrnion, on has cos 2 vv sin v v 2 T 0 1 0 0 0 v1 v1 v0 v0v1 vsin 2 v 0 2 v v 0 1 v 0 1 Fig 5.10 Rotation rprsntd y uatrnions v v 2 v 1 v 2 2016/12/25 26
2. Attitud Rprsntation Quatrnion (3) Quatrnions as rotations 0 0 1 v2 v0 * * 0 0 0 0 1 v2 v1 v0 v1 * * 0 0 0 0 v0 v 0 v1 v 1 0 0 0 0 v v v v * * 0 0 1 1 1 1 031 031 0 v 0 1 v0 * v2lis in th sam plan as v 0 and v1, as shown in th figur low, and also forms an angl 2 with. v 1 Why can uatrnions rprsnt th rotation? v 0 2 v v v 2 v 0 1 v 0 1 Fig 5.10 Rotation rprsntd y uatrnions v 1 v 2 2016/12/25 27
2. Attitud Rprsntation Quatrnion (3) Quatrnions as rotations Vctor rotation z 0 0 v v 1 1 v 1 1 Coordinat fram rotation 0 0 1 v 1 v1 x v v 1 o x v v1( v 1) y o y z z y x Pay attntion to th diffrnc! 2016/12/25 28
Quatrnion (4) Quatrnions and rotation matrix It is assumd that th rotation from th EFCF to th ABCF is rprsntd y th uatrnion 2. Attitud Rprsntation T 0 1 2 3, on has (Coordinat fram rotation) 0 1 0 0 1 2 3 0 1 2 3 r r 0 1 0 3 2 1 0 3 2 0 2 3 0 1 2 3 0 1 0 r r 1 3 2 1 0 3 2 1 0 r 2 2 2 2 0 1 2 3 2( 1 2 0 3) 2( 1 3 0 2) 2 2 2 2 r C( ) r C ( ) 2( 1 2 0 3) 0 1 2 3 2( 2 3 0 1) 2 2 2 2 2( 1 3 0 2) 2( 2 3 0 1) 01 2 3 R C( ) 2016/12/25 29
Quatrnion (5) Quatrnions and Eulr angls According to th rotation ordr of Eulr angls, on has x y z z y x cos sin 0 0 2 2 T cos 0 sin 0 2 2 cos 0 0 sin 2 2 2. Attitud Rprsntation T T 0 1 0 r r 1 0 zyx zyx r -1-1 0 = x y z y x r k 2 o o o 1 k 1 n 2 k 1 2 k2( n2) 3( k3) -1 z cos cos cos sin sin sin 2 2 2 2 2 2 sin cos cos cos sin sin 2 2 2 2 2 2 cos sin cos sin cos sin 2 2 2 2 2 2 cos cos sin sin sin cos 2 2 2 2 2 2 k 3 n 3 n 1 2 n 3 3 n1( 1) 2016/12/25 30
2. Attitud Rprsntation Quatrnion (5) Quatrnions and Eulr angls cos cos cos sin sin sin 2 2 2 2 2 2 sin cos cos cos sin sin 2 2 2 2 2 2 tan 2( ) 1 2 0 1 2 3 2 2 1 2 sin 2 arcsin 2 0 2 1 3 cos sin cos sin cos sin 2 0 3 2 2 2 2 2 2 1 2 tan arctan 2 2 2 2 1 22 3 1 2 2 cos cos sin sin sin cos 3 2 2 2 2 2 2 cos Infinit numr 2 2 Whn of cominations 2, th singularity prolm occurs. sin 2 2 2 It is assumd 2 0 2 1 3 1 2 0 2 1 3 1 2 cos 2 2 that 0. sin 2016/12/25 2 2 31 0 2 1 3 2 0 3 1 2 2( ) arctan 1 2 0 1 2 3 2 2 1 2
Quatrnion (6) Rlationship twn th drivativ of th uatrnions and th aircraft ody s angular vlocity According to th composit rotation uatrnion in th cas of rotating coordinat frams, on has whr 2. Attitud Rprsntation t t t 1 ω T 1 t 2 T Prturation Aircraft ody s angular vlocity Th drivativ of t is otaind as 2016/12/25 32 t tt t lim t 0 t t lim t 0 t t T 1 T t 1 ω t 2 t lim t 0 t 0 ω t I 2 ωt ωt lim t 0 t T 1 0 ω t 2 ω ω T 1 3 t t
t 2. Attitud Rprsntation Quatrnion (6) Rlationship twn th drivativ of th uatrnions and th aircraft ody s angular vlocity T 1 0 ω 2 ω ω t In practic, ω can masurd approximatly y a thr-axis gyroscop, thn th uation aov is linar! T 0 v T 1 2 1 2 T 0 v v 0I3 v ω Transformation R ω C( ) 2016/12/25 33
3. Conclusion Rlationship twn th Eulr angls and th aircraft ody s angular vlocity Θ W ω Rlationship twn th rotation matrix and th aircraft ody s angular vlocity dr dt R ω Singularity, Nonlinar Non-singularity, High dimnsion Rlationship twn th uatrnions and th aircraft ody s angular vlocity t T 1 0 ω 2 ω ω t Non-singularity, Lowr dimnsion Fig 5.11 Mutual transformations among thr rotation xprssions Most autopilots of multicoptrs us this rprsntation. Uniu Singularity Non-uniu Uniu 2016/12/25 34
Acknowldgmnt Dp thanks go to Yangguang Cai for matrial prparation. Jinrui Rn Xunhua Dai 2016/12/25 35
Thank you! All cours PPTs and rsourcs can downloadd at http://rfly.uaa.du.cn/cours For mor dtaild contnt, plas rfr to th txtook: Quan, Quan. Introduction to Multicoptr Dsign and Control. Springr, 2017. ISBN: 978-981-10-3382-7. It is availal now, plas visit http:// www.springr.com/us/ook/9789811033810 2016/12/25 36