Scientific-Technical Review,Vol.LV,No.1,2005
UDK: 629.7:629.072:519.688
COSATI: 17-07
Nomenclature
vector b with components in A1 frame
angular rate of A2 frame relative to A1
b A1
AA12A2
q3
q = [ q0 q1 q2 q3 ]
column matrix of quaternion vector
T
elements q3 = [ q1 q2 q3 ]
bib
0
-yA xA
( A )
Superscripts
~
^
approximated values
estimated values
Abbreviations
INS
SDINS
1)
DCM
i
b
Introduction
M.S.AHMED, D.UK: STRAPDOWN ATTITUDE ALGORITHMS USING QUATERNION TRANSITION MATRIX AND RANDOM INPUTS
sum of the inertially measurable angular rate and of the inertially non-measurable non-commutatively rate (coning) vector which causes the computational problems when numerically integrated direction cosine matrix. His formulation of
the orientation vector allows the coning contribution to be
isolated and treated separately and advantageously.
Miller in 1983 [3] developed application to the SDINS
attitude problem of the rotation vector concept. He obtained
a solution for the rotation vector and updated the attitude
quaternion separately.
The direction cosine matrix algorithms are used in many
aerospace systems to transform vectorial quantities from
one reference frame to another. Due to the computer errors
and errors introduced by mathematical algorithm the orthogonality property of DCM will be destroyed and should
be restored. Itzhack in 1969 [4] introduced three orthogonalization techniques to correct errors in the computed
DCM and restore the orthogonality property. In [5] the
same author proposed iterative optimal orthogonalization of
the DCM using the directional derivative method. By applying this method the closed form solution of the problem
of finding an optimal orthogonal matrix is easy derived.
An algorithm for solving the DCM by using digital differential approach was given by Bodanskiy in 1974 [6]. In
order to integrate the differential equations of a rigid body
angular motion given by the DCM two types of digital procedures were used. The first is digital computer of general
type with constant sampling interval and variable magnitude of the increments in angular position of the rigid body.
And the second is the digital differential approach when the
increments of the rigid body attitude are constant and the
sampling time is variable. The estimations of the errors for
these two types of algorithms were developed in the case of
arbitrary angular motion.
Savage in 1998 [7] used the two speed approach where
an analytically exact equation is used at moderate speed to
update the attitude parameters with input provided from a
high speed algorithm measuring the dynamic angular rate
and acceleration effects with the parameter update time interval (coning effect).
Waldmann in 2002 [8] investigated a variety of attitude
determination algorithms using DCM, quaternion and rotation vector as attitude parameters to access the tradeoffs between computational complexity and accuracy when it used
for terrestrial navigation. He found that in terms of navigation errors the relative quaternion parameterization is the
most adequate for pure inertial terrestrial navigation under
coning motion conditions. The same conclusion was obtained by Miller in 1983 [3].
Friedland in 1978 [9] presented basic equations of
SDINS using quaternion for attitude determination along
with the resulting equations for error analysis. His equations were mechanized in inertial reference frame which is
widely used in space flight application.
Shibata in 1986 [10] introduced the SDINS errors equations
based on quaternion for terrestrial navigation where the Earth
rotation should be considered. These equations will contribute
greatly to construction of hybrid navigation systems. The optimal control of the propagation of the quaternion errors in
spacecraft navigation was given by Vathsal [11] where the of
normalization of quaternion is required to meet the constraint
of unity condition. His algorithm can be implemented without
increasing very much the computer loading.
Because the closed from solution of the quaternion
propagation differential equation is unattainable this differential equation should be integrated numerically. One of the
(1)
where p q is the quaternion representation of the body angular rate p = bib and it has the following form
p q = 0 bib T
(2)
(3)
0 x y z
0
z y
W= x
x
y z 0
z y x 0
(4)
where
T
bib )
( bib )
(5)
with the skew symmetric matrix ( ) which is 3x3 matrix, that corresponding to the vector cross product
bib p = (bib )p .
The closed form solution of eq.(3) is unattainable and it
must be integrated numerically in order to update the quaternion. The signals of the angular rate taken from gyro-
M.S.AHMED, D.UK: STRAPDOWN ATTITUDE ALGORITHMS USING QUATERNION TRANSITION MATRIX AND RANDOM INPUTS
t* + ( i +1) t
dt
(12)
(6)
t* + it
(7)
where F ( t , t0 ) is the transition matrix of eq.(3). The transition matrix differential equation has a similar form of
eq.(3) [17]:
F ( t , t0 ) =
q0 (t0 + H ) = f t + H I +
)4
{ 0( 0
q3 (t0 + H )
1 W (t ) F (t , t )
[ ]
0
2
(8)
(13)
F (t , t0 ) = A (t ) F(t , t0 )
(14)
(15)
In order to find a solution for eq.(14) the method of successive approximations will be used for determination of
transition matrix. If t = t0 the transition matrix becomes
unity matrix
F(t0 , t0 ) = I4
(16)
The
successive
approximations
for
Fk (t , t0 ) ,
k = 1, 2,3,... , will be found from recursive relation
d Fk (t , t0 )
= A ( t ) Fk 1 (t , t0 )
dt
(17)
where k = 1,2,....
By solving the first approximation F0 (t , t0 ) is equal to
unity matrix I4 . From eq.(11) we can represent Fk (t , t0 ) in
the following form
t
f 0 (t ) f1 (t ) f 2 (t ) f 3 (t )
f (t ) f 0 (t )
f3 (t ) f 2 (t )
F ( t , t0 ) = 1
f (t ) f3 ( t ) f 0 (t )
f1 (t )
2
f3 (t ) f 2 (t ) f1 (t ) f 0 (t )
Fk (t , t0 ) = I4 + A(t ) Fk 1 (t , t0 ).
(9)
(18)
t0
where k = 1,2,.
In a such way, the successive approximations are
F0 (t , t0 ) = I4
F ( t , t0 ) = f 0 (t ) I4 + W ( f3 (t ) )
where f3 (t ) = [ f1 (t ) f 2 (t ) f 3 (t ) ]
tions are defined as
f 0 (t0 ) = 1
(10)
t0
f3 (t0 ) = 0
T
F1 (t , t0 ) = I4 + A(t ) dt
f 0 2 (t ) + f3 (t ) f3 (t ) = 1
(11)
t
t
F2 (t , t0 ) = I4 + A(t ) I4 + A(t ) dt dt =
t0
t0
t
t
t
F3 (t , t0 ) = I4 + A(t ) F2 (t , t0 ) dt
(19)
t0
t0
t0
t0
M.S.AHMED, D.UK: STRAPDOWN ATTITUDE ALGORITHMS USING QUATERNION TRANSITION MATRIX AND RANDOM INPUTS
[ t0 , t0 + H ]
for i = 2
for i = 1
1 =
0 =
which is given by
t* = t0 + st
for i = 0
(21)
1 =
and for i =1
22)
(t ) = 1 *m (t t* ) m
m = 0 m!
m
A(t ) = 1 A*m (t t* ) m
m = 0 m!
*m = m (t* )
A*m = 1 W (*m )
2
(23)
A(t ) dt +
t* st
t* + st
t* + st
(25)
0 =
(t ) dt
t* t
and
for i = 0
0 =
t* + t
(t ) dt
(26)
t*
If the algorithm is a second order ( s = 2 ), then the interval of the updating quaternion will be
H = 4t
(t ) dt
(t ) dt
(28)
t* + 2t
(t ) dt
t* + t
where
qib((00))
qib((tt0))
F ( t , t0 )
(29)
f3 =[ f1 f 2 f 3 ] in eq.(9)
By using the quaternion product the eq.(29) can be represented by chain rule as following
T
(30)
(31)
(32)
t*
(t ) dt
t* t
t* + t
2 =
t* 2t
t*
t*
t* t
(27)
(33)
(34)
M.S.AHMED, D.UK: STRAPDOWN ATTITUDE ALGORITHMS USING QUATERNION TRANSITION MATRIX AND RANDOM INPUTS
Substituting eq.(42) into eq.(39) and by integration the following results is obtained:
(t0 + H , t0 ) = (t0 + H , t0 ) + 1
2
(t , t0 ) =
m
(35)
of
( m + 1)!
(36)
fz ]
(37)
(m)
* =
(m)
( t t* )
(40)
( t* )
(41)
(49)
(50)
t* + it
+ 1 (t , t0 ) ( t ) dt
2 i t* it
(39)
m +1
m +1
*( m ) ( i + 1)
( i ) t m +1
(t0 + H , t0 ) =
m +1
m +1
= 1 *( m ) ( i + 1) ( i ) t m +1 +
i
m ( m + 1) !
= (t ) + 1 ((t )) (t )
2
( m + 1)!
(48)
(t ) = 1 *( m )
m m!
*( m ) (t t* ) m +1 (t0 t* ) m +1 (47)
(t0 + H , t0 ) = i +1
1
2
i +1 =
fy
(t , t0 ) (t ) dt (46)
where
f3 = [ f x
t0
t0 + H
f 0 = cos 0.5
sin 0.5
f1 = f x =
0.5x
0.5
sin 0.5
f2 = f y =
0.5y
0.5
sin 0.5
f3 = f z =
0.5z
0.5
(51)
*( 0) = (t* )
d
*(1) =
dt t = t*
(52)
where
(42)
( m + 1)!
*( m )
( t t* )
m +1
(43)
(44)
t* st t t* + 2 st where s = 1,2,....
(45)
M.S.AHMED, D.UK: STRAPDOWN ATTITUDE ALGORITHMS USING QUATERNION TRANSITION MATRIX AND RANDOM INPUTS
(53)
m =0
3
0 =
m=0
3
(54)
*( 0) t = 1 ( 0 + 1 )
2
*(1) t 2 = ( 1 0 )
(55)
(t0 + H , t0 ) = 0 + 1 + 1 (t , t0 ) (t ) dt (56)
2 i =1 t* it
( m + 1)!
1
( m + 1)!
where
(58)
t = t*
(59)
m +1
m+1
(1) t m+1
*( m ) ( 2 )
tl 1
2
3
(t )= *( 0) + *(1) ( t t* ) + 1 *( 2) ( t t* ) + 1 *( 3) ( t t* ) (57)
2
6
m +1
m +1
( 1) t m+1
*( m ) ( 0 )
The system of four equations in eq.(4.139) gives the solution for four unknowns parameters ( *( m) , m = 0,1,2,3) in
terms of 1 , 0 ,1 , 2 . Having in mind eq.(57) with solution for eq.(59) we can determine the rotation angle by using eq.(50) and f 0 and f3 for eq.(35) and eventually by
(B.5) and (B.6). The transition matrix is given by (10) in
terms of f 0 and f3 .
l =
m +1
m+1
( 2 ) t m+1
*( m ) ( 1)
m +1
m +1
1
( 0 ) t m+1
*( m ) (1)
m =0 ( m + 1) !
m= 0
1 = *( 0) t + 1 *(1) t 2
2
( m + 1)!
1 =
2 =
G
*( 0) = ( t* )
dm
*( m ) = m [(t ) ]
dt
1 =
d =
tl
i0
tl 1
i =1
b
ib d t = l ,i
(60)
M.S.AHMED, D.UK: STRAPDOWN ATTITUDE ALGORITHMS USING QUATERNION TRANSITION MATRIX AND RANDOM INPUTS
l = l + l 1,i0 l ,i0
(61)
where
l
[ , 0 ]
for x < 0
(62)
or
, 0] for x > 0
(63)
(64)
This error represents the error of the calculated inertial frame according to the exact position of inertial frame. Since
the expectations (the mean values) for the components
l1 and l are equal to
E l1 = 1 sign x (tl 1 )
2
(65)
E l = 1 sign x (tl )
2
(66)
0,
x (tl )x (tl 1 ) > 0
E l =
sign x (tl ) , x (tl )x (tl 1 ) < 0
(67)
l
Figure 4. Numerical simulation of the measured increment angular rate
As indicated in Fig.4 the approximated value of the increment of the angular rate is computed by multiplying the
integer number resulted form the FIX function by the gyroscope impulse ( ). The last incremental gyroscope output
obtained in current l cycle l is simply computed as the
l . The last incremental gydifference between l and
roscope output for the current l cycle is assigned to be the
impulse of the previous l cycle l 1 .
10
M.S.AHMED, D.UK: STRAPDOWN ATTITUDE ALGORITHMS USING QUATERNION TRANSITION MATRIX AND RANDOM INPUTS
Estimator Type-1
In this type of estimation, the estimated values of the increment of the angular rate l is given for one component for simplifying the analysis as
where ul and ul 1 are uniformly distributed random variables of last impulse l ,i0 1 for the current and the previous period of l cycle. This estimator of the second type is
shown in Fig.6.
l + 1 ( sign
l sign
l 1 )
l =
2
(68)
where
l - the estimated value of the current increment in the
l cycle.
l - the approximated value of the current increment in
the l cycle.
l 1 - the approximated value of the previous increment
in the l cycle.
(70)
0
+
2 2
(71)
Estimator type-2
This type of estimator is applied on the approximated
values of gyroscope increments to correct the increment
l during the interval t [tl 1 ,tl ] by adding
components
random variable ul with uniform distribution of estimated
impulse and the sign of the last impulse of the gyroscope
rate l ,i0 1 .This random variable are uniformly distributed
within the interval defined as [ 0 signl ,i0 1 ] .
t t 0 t t0
(72)
where
=2
2
2
2
( q1 ) + ( q2 ) + ( q3 )
(73)
(74)
(75)
(69)
(76)
11
M.S.AHMED, D.UK: STRAPDOWN ATTITUDE ALGORITHMS USING QUATERNION TRANSITION MATRIX AND RANDOM INPUTS
1000
1000
100
10
'
'
ref
| |/
0.1
Tl
0.005 0.01 0.02
No quanta effect
With quanta effect
With estimator type 1
0.01
1E-3
10
15
20
25
30
f [Hz]
0.1
0.01
'
'
| |/ ref
1E-3
100
10
1E-4
1
'
'
| |/ ref 0.1
Tl
1E-5
0.005 0.01
st
1 order algorithm
0.01
st
2 order algorithm
1E-6
1E-3
0
Tl
0.005 0.01 0.02
No quanta effect
With quanta effect
With estimator type 1
1E-4
1E-5
20
40
60
80
100
f [Hz]
Figure 9. Comparison of the drift obtained by first and second order
algorithms (f=5 Hz ,simulation time 100 s).
1E-6
10
15
20
25
30
f [Hz]
Figure 7. Effect of estimation on the drift using estimator type 1( s =2,
ref = 1o /hr )
Conclusion
A set of algorithms based on the transition matrix and
random inputs were developed. The quaternion representation was used in the development of these algorithms.
These algorithms are constraint-preserving integrators,
where the condition that the magnitude of the quaternion is
equal to unity, is preserved. They overcome the difficulty
reported in [14] where the algorithms need to compute the
second derivative of angular velocity.
The effects of quantization of the gyroscopes impulse on
the accuracy of the body attitude were studied. In order to
estimate the increment of the gyroscope sensors, two types
of estimators were proposed to estimate the integrated an-
12
M.S.AHMED, D.UK: STRAPDOWN ATTITUDE ALGORITHMS USING QUATERNION TRANSITION MATRIX AND RANDOM INPUTS
gular rate corrupted with uniformly distributed random impulses. A series of numerical experiments were conducted
to quantify the proposed estimators with quantization errors
for different motions frequencies.
The obtained results of the 2nd order algorithm showed
that the effect of quanta phenomena was especially obvious
for the motion of low frequency ( up to 5-10 Hz). The drift
results showed that the drift was increased as the sampling
time step increased. The results of the estimation of incremental gyroscope output using estimator type 1 showed that
as the sampling time step reduced the accuracy of the algorithm improved (the drift was reduced) especially for low
and moderate motion frequencies ( 2.5 to 10 Hz). The difference between two estimators for this algorithm can distinguished only at low sampling time and low frequency
motion.
The 1st order algorithm results have shown that the
quanta phenomena affects the accuracy only for low frequency motion at low sampling time. The estimation procedure in the case of 1st order algorithm has no effect on the
improvement of the accuracy.
where
q = [ q0 q1 q2 q3 ]
p = [ p0 p1 p2 p3 ]
(A.2)
S = [ s0 s1 s2 s3 ]
r p = [ p1 p2 p3 ]
(A.3)
rS = [ s1 s2 s3 ]
or,
s0 = q0 p0 -rqTr p
rs = q0r p + rq p0 + (rq )r p
(A.8)
rqT .r p = r pT .rq
(A.9)
Since;
(A.10)
(A.11)
s
=
S = 0 =
r
s q0r p + rq p0 (r p )rq
-r pT q0
0
= p0 I4x4 +
r p (r p ) rq
(A.12)
q1 q0
s3 q3 q2
p0 p1 p2 p3 q0
p
p0
p3 p2 q1
= 1
p2 p3
p0
p1 q2
p2 p1
p0 q3
p3
(A.13)
p0
p1
p =
2
p3 (A.14)
2 1 0
(A.4)
r t = (r )t
where
r = [ r1 r2 r3 ]
t = [t1 t2 t3 ]
(A.6)
f3 (t ) = 1 1 f1
2 48
) f + 13
1
(B.1)
f1 = 0 + 1
having in mind Eqs.(A.2), (A.3) and (A.4) the matrix equation (A.1) can be transformed :
(B.2)
0 -rqT p0
s
S = 0 = q0 I4x4 +
r
s
rq (rq ) r p
T
q p 0 rq r p
= 0 0 +
q0r p rq p0 + (rq )r p
q0 p0 -rqTr p
s
S = 0 =
r
s q0r p + rq p0 + (rq )r p
f 0 = (1 f3 )0.5 = 1 1 f3
2
2
1 f3
8
(B.3)
6
( t ) (time step of incremental for gyroscope output). It
M.S.AHMED, D.UK: STRAPDOWN ATTITUDE ALGORITHMS USING QUATERNION TRANSITION MATRIX AND RANDOM INPUTS
(B.4)
2
4
f3 (t ) = 1 1 f1 + 1 f1 f1 +
2 48
3840
2
+ 11 1 f1 ( 1 + 0 ) ( 1 + 2 ) +
(B.5)
45 120
+ 16 [ 1 ( 0 + 0 2 ) 2 ( 1 + 1 1 )]
45
4
1 f3 1 f3
8
16
(B.6)
References
[1] WILCOX,C.J.: New Algorithm for Strapped-Down Inertial Navigation, IEEE Trans. on Aerospace and Electronic Systems, September
1967, Vol.AES-3, No.5, pp 796-802.
[2] BORTZ,J.E.: A New Mathematical Formulation for Starpdown Inertial Navigation, IEEE Trans. on Aerospace and Electronic Systems,
January 1971, Vol.AES-7, No.1, pp 61-66.
[3] MILLER,R.B.: A New Strapdown Attitude Algorithm, Journal of
Guidance and Control, July-August 1983, Vol. 6, No. 4, pp 287-291.
[4] BAR-ITZHACK,I.Y.: Orthogonalization Techniques of Direction
Cosine Matrix, IEEE Trans. on Aerospace and Electronic Systems,
September 1969, Vol.AES-5, No.5, pp 798-804.
[5] BAR-ITZHACK,I.Y.: Iterative Optimal Orthogonalization of the
Starpdown Matrix, IEEE Trans. on Aerospace and Electronic Systems, January 1975, Vol.AES-11, No.1, pp 30-37.
13
[6] BODANSKIY,E.D.: Ob Oshibkah Opredelenya Orijentaciy s pomoshchju idealnogo Integrirujushchego datchika uglovoj Skorosti,
Mehanika Tverdogo Tela, No.4, 1974, pp 3-12. (in Russian).
[7] SAVAGE,P.G.: Strapdown Inertial Navigation Integration Algorithm, Part 1: Attitude Algorithms, Journal of Guidance, Control and
dynamics, January-February 1998, Vol.21, No.1, p19-28.
[8] WALDMANN,J.: Attitude Determination Algorithms, Computational Complexity, and the Accuracy of Terrestrial Navigation With
Strapdown Inertial Sensors, XIV Congress Brasileiro de Automatica,
September 2002, pp 2367-2373.
[9] FRIEDLAND,B.: Analysis Stradown Navigation using Quaternion,
IEEE Trans. on Aerospace and Electronic Systems, September 1978,
Vol.AES-14, No.5, pp 764-768.
[10] SHIBATA,M.: Error Analysis Strapdown Inertial Navigation Using
Quaternions, Journal of Guidance, control, and Dynamics, May-June
1986, Vol.9, No.3, pp 379-381.
[11] VATHSAL,S.: Optimal Control of Quaternion Propagation Errors
in Spacecraft Navigation, Journal of Guidance, control, and Dynamics, May-June 1986, Vol.9, No.3, pp 382-384.
[12] CHELNOKOV,YU.N.: Ob Opredelenii oriyentasii Objekta v Parametrakh Rodriga-Gamiltona po jego uglovoj Skrorsti, Mehanika
Tverdogo Tela, No. 3, 1977, pp 11-20. (in Russian)
[13] MAYO,R.A.: Relative Quaternion State Transition Relation, Journal
of Guidance and Control, 1979, Vol.2, No.1, pp 44-48. (in Russian)
[14] CHIOU,J.C., JAN,Y.W.: Family of Constraint-Preserving Integrators for Solving Quaternion Equations, Journal of Guidance, Control
and dynamics, January-February 2001, Vol.24, No.1, pp 72-78.
[15] TITTERTON,D.H. and WESTON,J.L.: Strapdown Inertial Navigation Technology, Peter Peregrinus Ltd on behalf of the Institute of
Electrical Engineers, London, 1997.
[16] LEBEDEV,D.V., TKACHENKO,A.I.: Sistemi Inertsialnogo
Upravleniya Algoritmicheskiya aspekti, Naukova dumka, Kiev,
1991(in Russian)
[17] GELB,A.: Applied Optimal Estimation, M.I.T Press, Cambridge,
Massachusetts, 1974.
[18] AHMED,S.M.: New Algorithms for the Determination of Kinematical Parameters of Strapdown Inertial Navigation Systems with Random Inputs, Ph.D Thesis, Faculty of Mechanical Engineering, Belgrade, 2004.
Received: 04.02.2005.
Kljune rei: mehanika leta, navigacija, navigacioni sistem, inercijalno navoenje, odreivanje poloaja, estimacija,
estimator, kvaternion, numeriki algoritam
14
S.A.MOHAMED, D.UK: STRAPDOWN ATTITUDE ALGORITHMS USING QUATERNION TRANSITION MATRIX AND RANDOM INPUTS
Mots cls: mcanique du vol, navigation, systme de navigation, guidage inertiel, prcision de position, estimation, estimateur, quaternion, algorithme numrique