Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2
Avoiding the Euler Angle Singularity
at ! = ±90°
!! Alternatives to Euler angles
-! Direction cosine (rotation) matrix
-! Quaternions
Propagation of direction cosine matrix (9 parameters)
H
! IB h B = !
" I H IB h B
Consequently # 0 !r ( t ) q ( t ) &
% (
H
! BI ( t ) = ! "" B ( t ) H BI ( t ) = ! % r ( t ) 0 ! p (t ) ( H BI ( t )
% (
%$ !q ( t ) p ( t ) 0 ( t ) (' B
H BI ( 0 ) = H BI (!0 ," 0 ,# 0 ) 3
4
Euler Rotation of a Vector
Rotation of a vector to an arbitrary new orientation
can be expressed as a single rotation about an axis
at the vector’s base
! a1 $
# & Orientation of rotation axis
a ! # a2 & :
# a & in reference frame
" 3 %
' : Rotation angle
! a1 $
# & Orientation of rotation axis
a ! # a2 & :
# a & in reference frame
" 3 %
' : Rotation angle
6
Rotation Matrix
Derived from
Euler’s Formula
( a r ) a = ( aa ) r
T
I
T
I
Rotation matrix
! ( a1 + $
! q1 $ # &
# & $ # sin ( ' 2 ) * a -
# q2 & ! q 3 $ ! sin ( ' 2 ) a * 2 -
&
q=# !# &=# &=# & ( 4 ! 1)
q3 & # q4 & # cos ( ' 2 ) & # * a3
)
-
, &
# & " % " % # &
#" q4 & cos ( ' 2 )
% #" &%
q T q = q12 + q2 2 + q32 + q4 2
= sin 2 ( ! 2 ) + cos 2 ( ! 2 ) = 1
8
Rotation Matrix Expressed with
Quaternion
From Euler’s formula
H BI = "# q4 2 ! ( q 3 T q 3 ) $% I 3 + 2q 3q 3T ! 2q4 q! 3
Rotation matrix from quaternion
H BI =
" q2 ! q2 ! q2 + q2 2 ( q1q2 + q3q4 ) 2 ( q1q3 ! q2 q4 ) %
$ 1 2 3 4
'
$ 2 ( q1q2 ! q3q4 ) !q12 + q22 ! q32 + q42 2 ( q2 q3 + q1q4 ) '
$ '
$ 2 ( q1q3 + q2 q4 ) 2 ( q2 q3 ! q1q4 ) !q12 ! q22 + q32 + q42 '
# &
9
d ! q 3 $ 1 ! q4 ' B ( '" B q 3 $
q! = # &= # & ( 4 ! 1)
dt # q4 & 2 # ('
' T
q3 &%
" % " B
! q!1 ( t ) $ ! 0 r ( t ) 'q ( t ) p ( t ) $ ! q1 ( t ) $
# & # & # &
dq ( t ) # q!2 ( t ) & 1 # 'r ( t ) 0 p (t ) q (t ) & # q2 ( t ) &
=# &= # & # &
dt # q! 3 ( t ) & 2 # q ( t ) ' p ( t ) 0 r (t ) & # q3 ( t ) &
#
#" q! 4 ( t ) && # ' p ( t ) 'q ( t ) 'r ( t )
#" 0 & #
&% B #" q4 ( t ) &&
% %
Digital integration to compute q(tk)
dq (" )
tk