Lecture 23
Lecture 23
(AE4313-20)
Course Instructor
Dr.ir. E. van Kampen
1
The Attitude Determination and Control System
2
• Previous lecture
– Course Introduction
– Kinematics
• Direction Cosine Matrices
• Euler angles: ordered sequential rotations
• Today:
– Eigenaxis rotations
• Quaternions
• Modified Rodrigues Parameters
– Kinematic differential equations
3
Euler’s eigenaxis rotation theorem
Euler’s eigenaxis rotation states that by rotating a rigid body about an axis
that is fixed to the body and stationary in an inertial reference frame, the
rigid-body attitude can be changed from any given orientation to any other
orientation. Such an axis of orientation, whose orientation relative to both
inertial reference frame and the body remains unchanged throughout the
motion, is called the Euler axis or eigenaxis.
e e1a1 e2 a2 e3a3
e1b1 e2b2 e3b3
where ei are the direction cosines of the Euler eigenaxis relative to both A
and B. The Euler eigenaxis rotation is defined in Fig. 2.2.
4
a3 e
b3
b2
a2
a1
b1 Fig. 2.2 Euler eigenaxis rotation
5
Since ei are the direction cosines,
if a1' is aligned with the Euler eigenaxis e , we have a1' e1a1 e2 a2 e3a3
7
Same holds for other two axes if they are selected to be the eigenaxes.
Step 2
Rotate both frames A and A' as a rigid body around direction e through
an angle . After this eigenaxis rotation, the reference frame A will be aligned
with the reference frame B with basis vectors b1 , b2 , b3 , and A' will
''
become another reference frame A via the rotation matrix
1 0 0
C A'' / A'
C1 0 cos sin
0 sin cos
8
a3
a1' e
a2
a1
9
It is important to notice that the relative orientation between A'' and B is the
same as the relative orientation between A' and A, i.e., C A / B C A / A R .
'' '
1
3) Rotate A'' through an inverse matrix R R , then the reference frame
T
b1 a1
B/ A
b
2 C a 2
b3 a3
where
C B / A C B / A C A / A C A / A C A / A C1 C A / A RT C1 R
'' '' ' ' ' '
10
Substituting the definitions of these two matrices, we obtain the elements of
B/ A
the total direction cosine matrix C as:
C11 e12 R212 R312 cos
C12 e1e2 R21 R22 R31 R32 cos R21 R32 R22 R31 sin
C13 e1e3 R21 R23 R31 R33 cos R21 R33 R23 R31 sin
C33 e32 R232 R332 cos
In order to parameterise the direction cosine matrix in terms of only e1 , e2 , e3
and the rotation angle , the properties of the direction cosine matrix have to
be applied. The first property to be applied is the orthonormality of the matrix:
e1 R21 R31 e1 e2 e3 1 0 0
RT R e2 R22 R32 R21 R22 R23 I 0 1 0
e3 R23 R33 R31 R32 R33 0 0 1
11
we obtain the following results from this property
e12 R21
2
R31
2
1
e22 R22
2
R32
2
1
e32 R23
2
R33
2
1
e1e2 R21 R22 R31 R32 0
e1e3 R21 R23 R31 R33 0
e2 e1 R22 R21 R32 R31 0
e2 e3 R22 R23 R32 R33 0
e3e1 R23 R21 R33 R31 0
e3e2 R23 R22 R33 R32 0
We also have known that the direction cosine matrix elements can be
expressed using their cofactors:
e1 R22 R33 R23 R32 ; e2 R23 R31 R21R33 ; e3 R21R32 R22 R31
12
Using all these relationships, we have the following results:
e1 R21 R31 1 0 0 e1 e2 e3
RT C1 R e2 R22 R32 0 cos sin R21 R22 R23
e3 R23 R33 0 sin cos R31 R32 R33
C11 e12 R21 cos R31 sin R21 R21 sin R31 cos R31
e12 R212 R312 cos
e12 1 e cos
2
1
C13 e1e3 R21 cos R31 sin R23 R21 sin R31 cos R33
e1e3 R21 R23 R31 R33 cos R21 R33 R23 R31 sin
e1e3 e1e3 cos e2 sin
e1e3 1 cos e2 sin
C21 e2 e1 R22 cos R32 sin R21 R22 sin R32 cos R31
e2 e1 R21 R22 R31 R32 cos R22 R31 R21 R32 sin
e2 e1 e2 e1 cos e3 sin
e2 e1 1 cos e3 sin
14
C22 e22 R22 cos R32 sin R22 R22 sin R32 cos R32
e22 R222 R322 cos
e22 1 e cos
2
2
C23 e2 e3 R22 cos R32 sin R23 R22 sin R32 cos R33
e2 e3 R22 R23 R32 R33 cos R22 R33 R23 R32 sin
e2 e3 e2 e3 cos e1 sin
e2 e3 1 cos e1 sin
Students may derive the last row the direction cosine matrix C.
15
Finally, the direction cosine matrix in terms of e1 , e2 , e3 and has the form:
By defining
e1 0 e3 e2
e e2 ; E e3 0 e1
e3 e2 e1 0
C11e1 C12e2 C13e3 cos e12 1 cos e1 e1e2 1 cos e3 sin e2 e1e3 1 cos e2 sin e3
e1 cos e1e12 1 cos e1e22 1 cos e2e3 sin e1e32 1 cos e2e3 sin
e1 cos e1 1 cos e12 e22 e32 e1
C21e1 C22 e2 C23e3 e2 e1 1 cos e3 sin e1 cos e22 1 cos e2 e2 e3 1 cos e1 sin e3
e2 e12 1 cos e1e3 sin e2 cos e2 e22 1 cos e2 e32 1 cos e1e3 sin
e2 cos e2 1 cos e12 e22 e32 e2
C31e1 C32e2 C33e3 e3e1 1 cos e2 sin e1 e3e2 1 cos e1 sin e2 cos e32 1 cos e3
e3e12 1 cos e1e2 sin e3e22 1 cos e1e2 sin e3 cos e3e32 1 cos
e3 cos e3 1 cos e12 e22 e32 e3
17
So applying the rotation C, defined by going from frame A to frame B,
on the vector e will not change the orientation of e!
a3 e
e1 C11 C12 C13 e1
e C C23 e2
b3
2 21 C22
b2 e3 C31 C32 C33 e3
a2
a1
b1 18
We may also obtain
E
1
2 sin
C T C ; 0, , 2 , ... (See Matlab example)
e1 C23 C32
e e2 C C
1 (tip: check if this is true using the
2 sin 31 13
highlighted equation on slide 16)
e3 C12 C21
C11 C22 C33 cos 1 cos e12 cos 1 cos e22 cos 1 cos e32
3 cos 1 cos e12 e22 e32
3 cos 1 cos
2 cos 1
19
Consider two successive eigenrotations to A” from A represented by
These two successive Euler eigen axis rotation can also be represented by
an equivalent single eigenaxis rotation to A” from A as follows
C e, : A'' A
where
C e, I cos 1 cos ee E sin
T
and
C e, C e2 , 2 C e1 ,1
20
The equivalent eigenangle θ can be determined as
1
cos trC 1
2
trC cos1 cos 2 cos1 cos 2
1 cos1 1 cos 2 cos 2 2sin 1 sin 2 cos
C e, C e2 , 2 C e1 ,1
With the half angle theorem we can obtain the following for convenience
1 2 1 2
cos cos cos sin sin cos
2 2 2 2 2
21
The equivalent eigenaxis of the rotation e can also be found as
1 2 2 1 1 2
e sin e1 sin cos e2 sin cos e1 e2 sin sin
2 2 2 2 2 2 2
where
e1 e 2 E1 e 2
Consider the Euler’s eigenaxis rotation about an arbitrary axis which is fixed in
a body-fixed reference frame B and stationary in an inertial reference frame A.
We define the four Euler parameters or quaternions as
q4 cos / 2
due to e1 e2 e3 1 .
2 2 2
23
By substituting the definition of quaternions, direction cosine matrix elements
in terms of quaternions can be found 𝛼
cos𝛼 = 1 − 2sin2
2
Using the half-angle identities: 𝛼
1 − cos𝛼 = 2sin2
2
𝛼 𝛼
sin𝛼 = 2sin cos
2 2
C11 cos e12 1 cos 1 2 sin 2
2
2e12 sin 2
2
1 2 1 e12 sin 2
2
1 2 e22 e32 sin 2
2
1 2 q22 q32
C12 e1e2 1 cos e3 sin 2e1e2 sin 2 2e3 sin cos
2 2 2
2 e1 sin e2 sin e3 sin cos 2q1q2 q3q4
2 2 2 2
C13 e1e3 1 cos e2 sin 2e1e3 sin 2 2e2 sin cos
2 2 2
2 e1 sin e3 sin e2 sin cos 2q1q3 q2 q4
2 2 2 2
24
Note that for deriving these results one may apply these equalities:
sin 2 sin cos
2 2
2 2 2 2
cos cos sin 2 cos 1 1 2 sin
2 2 2 2
Finally, we may write down the direction cosine matrix in terms of quaternions:
2 q3q1 q2 q4 2 q3q2 q1q4 1 2 q12 q22
25
Quaternions can also be written in terms of elements of direction cosine matrix
C11 C22 C33 1 2 q22 q32 1 2 q12 q32 1 2 q12 q22
3 4q2
1
q22 q32 3 4 1 q42 4q42 1
1
q4 C11 C22 C33 1
2
C23 C32 2q2 q3 q1q4 2q3q2 q1q4 4q1q4
q1
1
C23 C32
4 q4
C31 C13 2q3q1 q2 q4 2q1q3 q2 q4 4q2 q4
q2
1
C31 C13
4q4
C12 C21 2q1q2 q3q4 2q2 q1 q3q4 4q3q4
q3
1
C12 C21
4q4
26
Using the following definitions
q1 0 q3 q2
q q2 , Q q3 0 q1
q3 q2 q1 0
C q42 q q I 2qq 2q4Q
T T
C23 C32
1
C31 C13
1
q q4 C11 C22 C33 1
4q4 2
C12 C21
1
q4 C11 C22 C33 1 0
2
C11 C22 C33 1 Use slide 16 for conversion from C to e,
'
C q , q4' : A' A
C q , q : A'' A'
'' ''
4
C q, q4 : A'' A
We have
C q, q4 C q , q4" C q , q4'
" '
The same relationship has been obtained earlier for the case of Euler eigen-
axis rotation
C e, C e2 , 2 C e1 ,1
29
With the definition of quaternions:
q1' q1''
q q2' e1 sin 1 ; q q2'' e 2 sin 2
' ''
2 2
q3' q3''
1 2
q4' cos ; q4'' cos
2 2
We can obtain
q q q q q q q ;
''
4
' '
4
'' ' ''
q4 q q q
' ''
4 4 ' T
q
''
1 2 2 1 1 2
q e sin e1 sin cos e 2 sin cos e1 e 2 sin sin
2 2 2 2 2 2 2
q4" q q4' q q ' q
' " "
30
So the quaternion for composite rotations becomes:
q4 q3 q2 q1 q4 q3 q2 q1
q q4 q1 q2 q3 q4 q1 q2
3
q2 q1 q4 q3 q2 q1 q4 q3
q1 q2 q3 q4 q1 q2 q3 q4
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
32
Relation between quaternions and Euler angles (depends on order!!!)
1 2 3 1 2 3
sin cos cos cos sin sin
q1 2 2 2 2 2 2
3 3
q cos sin cos sin cos sin
1 2 1 2
2 2 2 2 2 2 2
q3 1 2 3 1 2 3
cos cos sin sin sin cos
2 2 2 2 2 2
q4 2 3 1 2 3
cos cos cos sin sin sin
1
2 2 2 2 2 2
1 0 0
sin 2 2 0
0 sin
2 sin 3 Each rotation axis is
0
0
2 considered as an Euler
1 cos 3
2
cos 2 2 cos 2 eigenaxis.
33
q1 q4''' q3''' q2''' q1''' q4'' q3'' q2'' q1'' q1'
Using q '''
2 q3 q4''' q1''' q2''' q3'' q4'' q1'' q2'' q2'
q3 q2''' q1''' q4''' q3''' q2'' q1'' q4'' q3'' q3'
'''
q4 q1 q2''' q3''' q4''' q1'' q2'' q3'' q4'' q4'
1 1 2
cos 0 0 sin cos 2 0 sin 0 0
q1 2 2 2 2
1 1 2 2 0
q 0 cos sin 0 0 cos 0 sin
2 2 2 2 2 sin 3
q3 1 1 2
0 sin cos 0 sin 2 0 cos 0 2
2 2 2 2 3
q4 1 2 2 cos 2
sin 1 0 0 cos 0 sin 0 cos
2 2 2 2
1 2 3 1 2 3
sin cos cos cos sin sin
q1 2 2 2 2 2 2
q cos 1 sin 2 cos 3 sin 1 cos 2 sin 3
2 2 2 2 2 2 2
q3 1 2 3 1 2 3
cos cos sin sin sin cos
2 2 2 2 2 2
q4 2 3 1 2 3
cos 1
cos cos sin sin sin
2 2 2 2 2 2
34
Modified Rodrigues Parameters
q4 1 q12 q22 q32 cos
2
35
Using this fact, the CRPs are defined as follows:
sin
2
1e
q1 cos
2 e
1 tan
q4 2
1 sin
2 e
q 2 e tan
2 2
2 2
q
3 cos
4
q3 2
e3 tan
q4 sin
2
e3 2
cos
2
These equations contain the holonomic constraint by definition. But they introduce
a new problem. We clearly see that a singularity occurs when 180o , as the
tangent goes to infinity as q4 approaches zero. To solve this, one can easily modify
the CRPs. This gives us the new parameters referred to as the Modified Rodrigues
Parameters (MRPs).
36
Derivation of the MRPs
The MRPs are defined by adding 1 to the denominator of the definition of the
CRPs. This implies that when q4 approaches zero, there is no singularity.
By doing this, we postpone the singularity to when q4 = −1, which only
occurs at 360o :
qi
i
1 q4
qi ei sin
i 2
1 q4 1 cos
2
From trigonometry:
cos cos 2 sin 2 , sin 2sin cos
2 2 2 2
37
The above equation can be simplified to give:
ei 2sin cos
i 4 4
1 cos2 sin 2
4 4
ei 2sin cos
4 4
sin 2 cos2 cos2 sin 2
4 4 4 4
ei 2sin
4 e tan
i
4
2 cos
4
As such the definition for the MRPs becomes:
q1
e1 tan
1 q4
1
4
q2
2 e2 tan
1 q 4
3 4
q3
e3 tan 4
1 q4 38
As mentioned, the MRPs experience singularity at 360 . Now one would think,
o
fine we could just modify the Rodrigues parameters again to experience singularity
at 720o and so on. This is possible, defining parameters called Higher-Order
Rodrigues Parameters (HORPs). The problem though is that they reintroduce
singularities in the kinematics rewritten for these HORPs at 360o and the
kinematics are no longer described by simple second-order polynomials further
increasing the computational load. It is therefore decided to stick with the MRPs as
they conveniently only experience singularities when 360o and consists of 3
parameters instead of 4. It should be noted that singularities may be avoided all
together using the MRPs by applying the shadow parameter technique. But let’s
first define the direction cosine matrix in terms of MRPs.
The previously determined direction cosine matrix C was given in quaternions as:
2 q3q1 q2 q4 2 q3q2 q1q4 1 2 q12 q22
39
We will need to redefine the direction cosine matrix in terms of MRPs. Before
we can do so, we must find the relation between quaternions and MRPs. Given
equations in page 37 we define for 1 2 3 T as follows:
1 q4
1 2 3 2
2 1 q42
1 q4 1 q4 1 q4
1 q4
2
1 q4
2
1 q4
1
2
q4
1
2
40
Now we may redefine the direction cosine matrix in terms of MRPs by inserting
the relations provided in page 38:
1 2 2 8 2 8 2
2 3
8 1 2 4 3 1
2
8 1 3 4 2 1
2
C B/ A C
1
8 2 1 4 3 1 2
1 8 8 8
2 2 2 2
4 1
2
2 1 3 2 3 1
1
2
8 4 1 2
3 1 2 8 4 1 1
3 2 1
2 2 2
8 8
2
1
2
2
As an example, the first element of the direction cosine matrix C in terms of MRPs
can be obtained simply with:
2 2 2 2
C1,1 1 2 q q 1 2
2 2 2
2
3
2
1 1
2 3
1 8
2 2 2
2 8 32
1 2 2
41
Kinematic differential
equations
42
Time derivatives of vectors
b b
1 1
2
b b2
b b
3 3
Since the norm of bi will be fixed to 1, bi will only make a circle due to .
bi sin i
bi bi sin i
a3
bi
m
bi
bi bi sin i bi
i
bi
b sin b
i i i
a2
bi bi
a1
43
Transport theorem: motion of a point r, due to a rotation of frame b
We define now
dr dr
| N r ; |B r1b1 r2b2 r3b3
dt dt
We have
dr dr
|N |B r
dt dt
44
Kinematic differential equations in terms of direction cosines
Consider two reference frames A and B which are moving relative to each
other. The angular velocity vector of reference frame B with respect to
reference frame A is denoted by B / A , and it is expressed in terms of
basis vectors of B as follows:
b1 a1
a
b
2 C 2
b3 a3
which can also be written as
a1 b1 b1
a C 1 b C T b
2 2 2
a3 b3 b3
45
Taking the time derivative of above relation in A results in:
b
0 b1 1 b1 b1
0 C T b C T b2 C T
b2
T
2 b
2 C
0 b3 b3 b3 b3
b1 0 3 2 b1
C T b2 C T 3 0 1 b2
b3 2 1 0 b3
where
C T C T 0; C C 0; T
C C C ;
31 2 11 1 21 C C C ;
32 2 12 1 22 C 33 2C13 1C23
47
Kinematic differential equations in terms of Euler angles
C3 3 : A' A
C2 2 : A '' A '
C1 1 : B A ''
The time derivatives of Euler angles, called Euler rates, are denoted by
1 ,2 ,3 . These three successive rotations can also be represented as
A' / A
: A' A
A'' / A'
: A'' A'
B / A''
: B A ''
48
and B / A are aligned with different
''
The angular velocity vectors , A' / A A'' / A'
A' / A
3 a3 3 a3'
A'' / A'
2 a2' 2 a2''
B / A''
1a1'' 1b1
B/ A
B / A''
A'' / A'
A' / A
1b1 2 a2'' 3a3'
or
50
This matrix equation can be solved by inverting the associated matrix.
51
Kinematic differential equations in terms of quaternions
C C 0; CC T
0 3 2 C11 C12 C13 C11 C21 C31
3 0 1 C21 C22 C23 C12 C22 C32
2 1 0 C31 C32 C33 C13 C23 C33
1 C21C31 C22C32 C23C33
2 C31C11 C32C12 C33C13
3 C11C21 C12C22 C13C23
Substituting the direction cosines matrix elements in terms of quaternions,
(slide 25) the kinematic equations in terms of quaternions can be derived:
1 2q1q4 q 2 q3 q3q2 q 4 q1
2 2q 2 q4 q3q1 q1q3 q 4 q2
3 2q3q4 q1q2 q 2 q1 q 4 q3
52
q q q42 q12 q22 q32 q42 1
T
Differentiating the quaternion constraint
0 2q1q1 q 2 q2 q3 q3 q 4 q4
These four differential equations can be written in the matrix form as
1 q4 q3 q2 q1 q1
q q4 q1 q2 q 2
2 3
2
3 q2 q1 q4 q3 q3
0 q1 q2 q3 q4 q 4
q1 q4 q3 q2 q1 1 0 3 2 1 q1
q q q4 q1 q2 2 1 3 0 1 2 q2
31
2
q3 2 q2 q1 q4 q3 3 2 2 1 0 3 q3
4
q q1 q2 q3 q4 0 1 2 3 0 q4
q
1
2
q4 q
1
2
q4 q ;
1
2
1 T
q4 T q q
2 53
An alternative derivation is using the relation between quaternions and
elements of the associated direction cosine matrix
1
q4 C11 C22 C33 1
2
C23 C32
1
q C31 C13
4q4
C12 C21
q3
C 12
C21 q4 C12 C21 q4
4q42
q2
C 31
C13 q4 C31 C13 q4
4q42
q1
C23
C32 q4 C23 C32 q4
4q42 54
Substituting the time derivatives of the direction cosine matrix elements
C C C ;
31 2 11 1 21 C C C ;
32 2 12 1 22 C 33 2C13 1C23
55
Similar results can be obtained for other quaternions by using the elements
of direction cosine matrix in terms of quaternions
q3
C 12
C21 q4 C12 C21 q4
C
12 C21 qq
3 4
2
4q4 4q4 q4
1
3C22 2C32 3C11 1C31 4q3q4
4q4
1
4q4
3 1 2 q12 q32 22 q3q2 q1q4 3 1 2 q22 q32
1
21 q3q1 q2 q4 2q3 q11 q22 q33
4q4
q
1
2
q4 q q4 q ; q4 T q q
1
2
1
2
1 T
2
56
Kinematics differential equations in terms of MRPs
q1 0 3 2 1 q1
q 0 1 2 q2
1
3
2
q3 2 2 1 0 3 q3
4
q 1 2 3 0 q4
qi
i
1 q4
we obtain
qi 1 q4 qi q4 qi qi q4 qi q4
i i
1 q4
2
1 q4 1 q4 1 q4 1 q4 1 q4
57
By taking the kinematic differential equations in terms of quaternions in slide 56
and dividing on each side by 1 q4 we are able to solve relations between i and
i :
q4 1 q q q 1
1 1 2 2 3 3 1 1 2 2 3 3
1 q4 2 1 q4 1 q4 1 q4 2
1 q 1
q1 q q
1 q4 1 q4 2
1
3 2 2 3 1 4 3 2 2 3 1 1
1 q4 2 1 q4 2
2
1 q 1
q2 q q 1 2
3 1 1 3 2 4 3 1 1 3 2 1
1 q4 2 1 q4 1 q4 1 q4 2 2
1 q 1
q3 q q
1 q4 1 q4 2
1
2 1 1 2 3 4 2 1 1 2 3 1
1 q4 2 1 q4 2
2
58
Now the kinematic differential equations in terms of MRPs in matrix form can
be written as:
1 1 2
2 2
2 3 2 1 2 2 2 2 1 3 1
1 2 2
1
2
2 3 2
2 4 3
2
1 2 1 2 2 2 1 2
3 2
2 2 2
1 3 2 1 2
2 3 1 2
2 3
3
For simplicity, the kinematic differential equations are often written in the form
1
N
4
where
1 1 2 2 12 2 3 2 1 2 2 2 2 1 3 1
2 , N 2 3 2 1 2 1 2 22
2
2 1 2 2 3 , 2
3 3
2 2 2 1 3 2 1 2 2 3 1 2 32
2
(AE4313)
Course Instructor
Dr.ir. E. van Kampen
Tel.: 015-2787147
E-mail [email protected]
60