You are on page 1of 17

Nonlinear Complementary Filters on the Special

Orthogonal Group
R. Mahony, Tarek Hamel, Jean-Michel Pflimlin

To cite this version:


R. Mahony, Tarek Hamel, Jean-Michel Pflimlin. Nonlinear Complementary Filters on the Special
Orthogonal Group. IEEE Transactions on Automatic Control, Institute of Electrical and Electronics
Engineers, 2008, 53 (5), pp.1203-1217. �10.1109/TAC.2008.923738�. �hal-00488376�

HAL Id: hal-00488376


https://hal.archives-ouvertes.fr/hal-00488376
Submitted on 1 Jun 2010

HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est


archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents
entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non,
lished or not. The documents may come from émanant des établissements d’enseignement et de
teaching and research institutions in France or recherche français ou étrangers, des laboratoires
abroad, or from public or private research centers. publics ou privés.
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 1

Non-linear complementary filters on the special


orthogonal group
Robert Mahony, Member, IEEE, Tarek Hamel, Member, IEEE, and Jean-Michel Pflimlin, Member, IEEE

Abstract—This paper considers the problem of obtaining good There is a considerable body of work on attitude recon-
attitude estimates from measurements obtained from typical low struction for robotics and control applications (for example
cost inertial measurement units. The outputs of such systems [1]–[4]). A standard approach is to use extended stochastic
are characterised by high noise levels and time varying additive
biases. We formulate the filtering problem as deterministic linear estimation techniques [5], [6]. An alternative is to use
observer kinematics posed directly on the special orthogonal deterministic complementary filter and non-linear observer
group SO(3) driven by reconstructed attitude and angular ve- design techniques [7]–[9]. Recent work has focused on some
locity measurements. Lyapunov analysis results for the proposed of the issues encountered for low cost IMU systems [9]–
observers are derived that ensure almost global stability of the [12] as well as observer design for partial attitude estimation
observer error. The approach taken leads to an observer that we
term the direct complementary filter. By exploiting the geometry [13]–[15]. It is also worth mentioning the related problem of
of the special orthogonal group a related observer, termed the fusing IMU and vision data that is receiving recent attention
passive complementary filter, is derived that decouples the gyro [16]–[19] and the problem of fusing IMU and GPS data [9],
measurements from the reconstructed attitude in the observer [20]. Parallel to the work in robotics and control there is
inputs. Both the direct and passive filters can be extended to a significant literature on attitude heading reference systems
estimate gyro bias on-line. The passive filter is further developed
to provide a formulation in terms of the measurement error that (AHRS) for aerospace applications [21]. An excellent review
avoids any algebraic reconstruction of the attitude. This leads to of attitude filters is given by Crassidis et al. [22]. The recent
an observer on SO(3), termed the explicit complementary filter, interest in small low-cost aerial robotic vehicles has lead to a
that requires only accelerometer and gyro outputs; is suitable renewed interest in lightweight embedded IMU systems [8],
for implementation on embedded hardware; and provides good [23]–[25]. For the low-cost light-weight systems considered,
attitude estimates as well as estimating the gyro biases on-line.
The performance of the observers are demonstrated with a set linear filtering techniques have proved extremely difficult
of experiments performed on a robotic test-bed and a radio to apply robustly [26] and linear single-input single-output
controlled unmanned aerial vehicle. complementary filters are often used in practice [25], [27]. A
Index Terms—Complementary filter, nonlinear observer, atti- key issue is on-line identification of gyro bias terms. This
tude estimates, special orthogonal group. problem is also important in IMU callibration for satellite
systems [5], [21], [28]–[31]. An important development that
I. I NTRODUCTION came from early work on estimation and control of satellites
was the use of the quaternion representation for the attitude
T HE recent proliferation of Micro-Electro-Mechanical
Systems (MEMS) components has lead to the devel-
opment of a range of low cost and light weight inertial
kinematics [30], [32]–[34]. The non-linear observer designs
that are based on this work have strong robustness properties
measurement units. The low power, light weight and po- and deal well with the bias estimation problem [9], [30].
tential for low cost manufacture of these units opens up a However, apart from the earlier work of the authors [14],
wide range of applications in areas such as virtual reality [35], [36] and some recent work on invariant observers [37],
and gaming systems, robotic toys, and low cost mini-aerial- [38] there appears to be almost no work that considers the
vehicles (MAVs) such as the Hovereye (Fig. 1). The signal formulation of non-linear attitude observers directly on the
output of low cost IMU systems, however, is characterised matrix Lie-group representation of SO(3).
by low-resolution signals subject to high noise levels as well In this paper we study the design of non-linear attitude
as general time-varying bias terms. The raw signals must be observers on SO(3) in a general setting. We term the proposed
processed to reconstruct smoothed attitude estimates and bias- observers complementary filters because of the similarity of
corrected angular velocity measurements. For many of the the architecture to that of linear complementary filters (cf. Ap-
low cost applications considered the algorithms need to run pendix A), although, for the non-linear case we do not have
on embedded processors with low memory and processing a frequency domain interpretation. A general formulation of
resources. the error criterion and observer structure is proposed based
on the Lie-group structure of SO(3). This formulation leads
R. Mahony is with Department of Engineering, Australian National Uni- us to propose two non-linear observers on SO(3), termed the
versity, ACT, 0200, Australia. e-mail: Robert.Mahony@anu.edu.au.
T. Hamel is with I3S-CNRS, Nice-Sophia Antipolis, France. e-mail: direct complementary filter and passive complementary filter.
thamel@i3s.unice.fr. The direct complementary filter is closely related to recent
J.-M. Pflimlin is with Department of Navigation, work on invariant observers [37], [38] and corresponds (up
Dassault Aviation, Saint Cloud, Paris. France. e-mail:
Jean-Michel.Pflimlin@dassault-aviation.com. to some minor technical differences) to non-linear observers
Manuscript received November 08, 2006; revised August 03, 2007. proposed using the quaternion representation [9], [30], [32].
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 2

Fig. 1. The VTOL MAV HoverEye°


c
of Bertin Technologies.

We do not know of a prior reference for the passive comple- A suite of experimental results, obtained during flight tests
mentary filter. The passive complementary filter has several of the Hovereye (Fig. 1), are provided in Section VI that
practical advantages associated with implementation and low- demonstrate the performance of the proposed observers. In
sensitivity to noise. In particular, we show that the filter can addition to the conclusion (§VII) there is a short appendix on
be reformulated in terms of vectorial direction measurements linear complementary filter design and a second appendix that
such as those obtained directly from an IMU system; a provides the equivalent quaternion formulation of the proposed
formulation that we term the explicit complementary filter. The observers.
explicit complementary filter does not require on-line algebraic
reconstruction of attitude, an implicit weakness in prior work
on non-linear attitude observers [22] due to the computational II. P ROBLEM F ORMULATION AND N OTATION .
overhead of the calculation and poor error characterisation of
the constructed attitude. As a result the observer is ideally A. Notation and mathematical identities
suited for implementation on embedded hardware platforms. The special orthogonal group is denoted SO(3). The asso-
Furthermore, the relative contribution of different data can be ciated Lie-algebra is the set of anti-symmetric matrices
preferentially weighted in the observer response, a property
that allows the designer to adjust for application specific so(3) = {A ∈ R3×3 | A = −AT }
noise characteristics. Finally, the explicit complementary filter
remains well defined even if the data provided is insufficient For any two matrices A, B ∈ Rn×n then the Lie-bracket (or
to algebraically reconstruct the attitude. This is the case, for matrix commutator) is [A, B] = AB − BA. Let Ω ∈ R3 then
example, for an IMU with only accelerometer and rate gyro we define
sensors. A comprehensive stability analysis is provided for  
all three observers that proves local exponential and almost 0 −Ω3 Ω2
global stability of the observer error dynamics, that is, a stable  
Ω× =  Ω3 0 −Ω1  .
linearisation for zero error along with global convergence
−Ω2 Ω1 0
of the observer error for all initial conditions and system
trajectories other than on a set of measure zero. Although
For any v ∈ R3 then Ω× v = Ω × v is the vector cross product.
the principal results of the paper are presented in the matrix
The operator vex : so(3) → R3 denotes the inverse of the Ω×
Lie group representation of SO(3), the equivalent quaternion
operator
representation of the observers are presented in an appendix.
The authors recommend that the quaternion representations are
vex (Ω× ) = Ω, Ω ∈ R3 .
used for hardware implementation.
vex(A)× = A, A ∈ so(3)
The body of paper consists of five sections followed by a
conclusion and two appendices. Section II provides a quick For any two matrices A, B ∈ Rn×n the Euclidean matrix
overview of the sensor model, geometry of SO(3) and in- inner product and Frobenius norm are defined
troduces the notation used. Section III details the derivation
n
X
of the direct and passive complementary filters. The develop-
hhA, Bii = tr(AT B) = Aij Bij
ment here is deliberately kept simple to be clear. Section IV
i,j=1
integrates on-line bias estimation into the observer design and v
uX
provides a detailed stability analysis. Section V develops the p u n
explicit complementary filter, a reformulation of the passive ||A|| = hhA, Aii = t A2ij
i,j=1
complementary filter directly in terms of error measurements.
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 3

The following identities are used in the paper Accelerometer: Denote the instantaneous linear acceleration
T 3 of {B} relative to {A}, expressed in {A}, by v̇. An ideal
(Rv)× = Rv× R , R ∈ SO(3), v ∈ R
accelerometer, ‘strapped down’ to the body-fixed-frame
(v × w)× = [v× , w× ] v, w ∈ R3 {B}, measures the instantaneous linear acceleration of
1 {B} minus the (conservative) gravitational acceleration
v T w = hv, wi = hhv× , w× ii, v, w ∈ R3
2 field g0 (where we consider g0 expressed in the inertial
1 frame {A}), and provides a measurement expressed in
v T v = |v|2 = ||v× ||2 , v ∈ R3
2 the body-fixed-frame {B}. In practice, the output a from
hhA, v× ii = 0, A = AT ∈ R3 , v ∈ R3 a MEMS component accelerometer has added bias and
tr([A, B]) = 0, A, B ∈ R3×3 noise,
a = RT (v̇ − g0 ) + ba + µa ,
The following notation for frames of reference is used
where ba is a bias term and µa denotes additive measure-
• {A} denotes an inertial (fixed) frame of reference.
ment noise. Normally, the gravitational field g0 = |g0 |e3
• {B} denotes a body-fixed-frame of reference.
where |g0 | ≈ 9.8 dominates the value of a for low
• {E} denotes the estimator frame of reference.
frequency response. Thus, it is common to use
Let Pa , Ps denote, respectively, the anti-symmetric and
a
symmetric projection operators in square matrix space va = ≈ −RT e3
|a|
1 1
Pa (H) = (H − H T ), Ps (H) = (H + H T ). as a low-frequency estimate of the inertial z-axis ex-
2 2
pressed in the body-fixed-frame.
Let (θ, a) (|a| = 1) denote the angle-axis coordinates of Magnetometer: The magnetometers provide measurements of
R ∈ SO(3). One has [39]: the magnetic field
R = exp(θa× ), log(R) = θa× m = RT A m + Bm + µb
1
cos(θ) = (tr(R) − 1), Pa (R) = sin(θ)a× . where A m is the Earths magnetic field (expressed in
2
the inertial frame), Bm is a body-fixed-frame expres-
For any R ∈ SO(3) then 3 ≥ tr(R) ≥ −1. If tr(R) = 3 then
sion for the local magnetic disturbance and µb denotes
θ = 0 in angle-axis coordinates and R = I. If tr(R) = −1
measurement noise. The noise µb is usually quite low
then θ = ±π, R has real eigenvalues (1, −1, −1), and there
for magnetometer readings, however, the local magnetic
exists an orthogonal diagonalising transformation U ∈ SO(3)
disturbance can be very significant, especially if the IMU
such that U RU T = diag(1, −1, −1).
is strapped down to an MAV with electric motors. Only
For any two signals x(t) : R → Mx , y(t) : R → My
the direction of the magnetometer output is relevant for
are termed asymptotically dependent if there exists a non-
attitude estimation and we will use a vectorial measure-
degenerate function ft : Mx × My → R and a time T such
ment
that for any t > T m
vm =
|m|
ft (x(t), y(t)) = 0.
in the following development
By the term non-degenerate we mean that the Hessian of ft
The measured vectors va and vm can be used to construct
at any point (x, y) is full rank. The two signals are termed
an instantaneous algebraic measurement of the rotation A
BR :
asymptotically independent if for any non-degenerate ft and
{B} → {A}
any T there exists t1 > T with ft (x(t1 ), y(t1 )) 6= 0. ¡ ¢
Ry = arg min λ1 |e3 − Rva |2 + λ2 |vm ∗
− Rvm |2 ≈ A BR
R∈SO(3)
B. Measurements ∗
where vm is the inertial direction of the magnetic field in
The measurements available from a typical inertial mea- the locality where data is acquired. The weights λ1 and λ2
surement unit are 3-axis rate gyros, 3-axis accelerometers and are chosen depending on the relative confidence in the sensor
3-axis magnetometers. The reference frame of the strap down outputs. Due to the computational complexity of solving an op-
IMU is termed the body-fixed-frame {B}. The inertial frame timisation problem the reconstructed rotation is often obtained
is denoted {A}. The rotation R = A B R denotes the relative in a suboptimal manner where the constraints are applied in
orientation of {B} with respect to {A}. sequence; that is, two degrees of freedom in the rotation matrix
Rate Gyros: The rate gyro measures angular velocity of {B} are resolved using the acceleration readings and the final
relative to {A} expressed in the body-fixed-frame of degree of freedom is resolved using the magnetometer. As a
reference {B}. The error model used in this paper is consequence, the error properties of the reconstructed attitude
Ry can be difficult to characterise. Moreover, if either mag-
Ωy = Ω + b + µ ∈ R3
netometer or accelerometer readings are unavailable (due to
where Ω ∈ {B} denotes the true value, µ denotes local magnetic disturbance or high acceleration manoeuvres)
additive measurement noise and b denotes a constant (or then it is impossible to resolve the vectorial measurements into
slowly time-varying) gyro bias. a unique instantaneous algebraic measurement of attitude.
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 4

C. Error criteria for estimation on SO(3) as a non-linear approximation of the error between R and
Let R̂ denote an estimate of the body-fixed rotation matrix R̂ as measured from the frame of reference associated with
R = A R̂. In practice, it will be implemented as an error between a
B R. The rotation R̂ can be considered as coordinates
for the estimator frame of reference {E}. It is also associated measured estimate Ry of R and the estimate R̂.
with the frame transformation The goal of the observer design is to find a simple expres-
sion for ω that leads to robust convergence of R̃ → I. In prior
R̂ = A
E R̂ : {E} → {A}. work [35], [36] the authors introduced the following correction
The goal of attitude estimate is to drive R̂ → R. The term
estimation error used is the relative rotation from body-fixed- ω := vex(Pa (R̃)) = vex(Pa (R̂T Ry )) (7)
frame {B} to the estimator frame {E} This choice leads to an elegant Lyapunov analysis of the
T
R̃ := R̂ R, R̃ = E filter stability. Differentiating the storage function Eq. 2 along
B R̃ : {B} → {E}. (1)
trajectories of Eq. 5 yields
The proposed observer design is based on Lyapunov stabil- 1 ˙ kP ³ T ´
ity analysis. The Lyapunov functions used are inspired by the Ėtr = − tr(R̃) = − tr ω× R̃
2 2
cost function kP h i kP h T i
1 ³ ´ T
1 = − tr ω× (Ps (R̃) + Pa (R̃)) = − tr ω× Pa (R̃)
Etr := kI3 − R̃k2 = tr (I3 − R̃)T (I3 − R̃) 2 2
4 4 kP
1 = − hhω× , Pa (R̃)ii = −kP |ω|2 (8)
= tr(I3 − R̃) (2) 2
2 In Mahony et al. [35] a local stability analysis of the filter
One has that dynamics Eq. 5 is provided based on this derivation. In Section
1 IV a global stability analysis for these dynamics is provided.
Etr = tr(I − R̃) = (1 − cos(θ)) = 2 sin(θ/2)2 . (3)
2 We term the filter Eq. 5 a complementary filter on SO(3)
where θ is the angle associated with the rotation from {B} to since it recaptures the block diagram structure of a classical
frame {E}. Thus, driving Eq. 2 to zero ensures that θ → 0. complementary filter (cf. Appendix A). In Figure 2: The ‘R̂T ’


III. C OMPLEMENTARY FILTERS ON SO(3)
R Maps angular velocity
RΩ
In this section, a general framework for non-linear comple- into correct frame of reference

mentary filtering on the special orthogonal group is introduced. (RΩ)×


Maps angular velocity
onto TI SO(3).
The theory is first developed for the idealised case where R(t) Difference operation
on SO(3)
and Ω(t) are assumed to be known and used to drive the filter R R̃ + ˙ R̂
R̂T R Pa (R̃) k +A R̂ = AR̂
dynamics. Filter design for real world signals is considered in Maps error R̃ System
later sections. onto TI SO(3). kinematics

The goal of attitude estimation is to provide a set of R̂T


dynamics for an estimate R̂(t) ∈ SO(3) to drive the error Inverse operation
on SO(3)
rotation (Eq. 1) R̃(t) → I3 . The kinematics of the true system
are Fig. 2. Block diagram of the general form of a complementary filter on
Ṙ = RΩ× = (RΩ)× R (4) SO(3).

where Ω ∈ {B}. The proposed observer equation is posed


operation is an inverse operation on SO(3) and is equivalent to
directly as a kinematic system for an attitude estimate R̂ on
a ‘−’ operation for a linear complementary filter. The ‘R̂T Ry ’
SO(3). The observer kinematics include a prediction term
operation is equivalent to generating the error term ‘y − x̂’.
based on the Ω measurement and an innovation or correction
The two operations Pa (R̃) and (RΩ)× are maps from error
term ω := ω(R̃) derived from the error R̃. The general form
space and velocity space into the tangent space of SO(3);
proposed for the observer is
operations that are unnecessary on Euclidean space due to the
˙ identification Tx Rn ≡ Rn . The kinematic model is the Lie-
R̂ = (RΩ + kP R̂ω)× R̂, R̂(0) = R̂0 , (5)
group equivalent of a first order integrator.
where kP > 0 is a positive gain. The term (RΩ + kP R̂ω) ∈ To implement the complementary filter it is necessary to
{A} is expressed in the inertial frame. The body-fixed-frame map the body-fixed-frame velocity Ω into the inertial frame. In
angular velocity is mapped back into the inertial frame A Ω = practice, the ‘true’ rotation R is not available and an estimate
RΩ. If no correction term is used (kP ω ≡ 0) then the error of the rotation must be used. Two possibilities are considered:
rotation R̃ is constant, direct complementary filter: The constructed attitude Ry is
R̃˙ =R̂T (RΩ)T R + R̂T (RΩ) R
× ×
used to map the velocity into the inertial frame
=R̂T (−(RΩ)× + (RΩ)× ) R = 0. ˙
(6) R̂ = (Ry Ωy + kP R̂ω)× R̂.
The correction term ω := ω(R̃) ∈ {E} is considered to A block diagram of this filter design is shown in Figure
be in the estimator frame of reference. It can be thought of 3. This approach can be linked to observers documented
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 5

in earlier work [30], [32] (cf. Appendix B). The approach the architecture shown in Figure 5. The passive complementary
has the advantage that it does not introduce an additional filter avoids coupling the reconstructed attitude noise into the
feedback loop in the filter dynamics, however, high predictive velocity term of the observer, has a strong Lyapunov
frequency noise in the reconstructed attitude Ry will stability analysis, and provides a simple and elegant realisation
enter into the feed-forward term of the filter. that will lead to the results in Section V.
Ωy Ωy
Ry Ωy (Ω)×

Ry Ry R̂
(Ry Ωy )× ˙
R̂T R Pa (R̃) k R̂ = R̂A

R̃ + ˙ R̂
R̂T Ry Pa (R̃) k +A R̂ = AR̂
R̂T

R̂T Fig. 5. Block diagram of the simplified form of the passive complementary
filter.
Fig. 3. Block diagram of the direct complementary filter on SO(3).

passive complementary filter: The filtered attitude R̂ is used IV. S TABILITY A NALYSIS
in the predictive velocity term In this section, the direct and passive complementary filters
˙ on SO(3) are extended to provide on-line estimation of time-
R̂ = (R̂Ωy + kP R̂ω)× R̂. (9)
varying bias terms in the gyroscope measurements and global
A block diagram of this architecture is shown in Figure 4. stability results are derived. Preliminary results were published
The advantage lies in avoiding corrupting the predictive in [35], [36].
angular velocity term with the noise in the reconstructed For the following work it is assumed that a reconstructed
pose. However, the approach introduces a secondary rotation Ry and a biased measure of angular velocity Ωy are
feedback loop in the filter and stability needs to be available
proved.
Ry ≈ R, valid for low frequencies, (11a)
Ωy
R̂Ωy
Ωy ≈ Ω + b for constant bias b. (11b)
The approach taken is to add an integrator to the compensator
(R̂Ωy )×
term in the feedback equation of the complementary filter.
Ry R̃ + ˙ R̂ Let kP , kI > 0 be positive gains and define
R̂T Ry Pa (R̃) k +A R̂ = AR̂
Direct complementary filter with bias correction:
³ ´
˙
R̂T R̂ = Ry (Ωy − b̂) + kP R̂ω R̂, R̂(0) = R̂0 , (12a)
×
˙
Fig. 4. Block diagram of the passive complementary filter on SO(3). b̂ = −kI ω, b̂(0) = b̂0 ,
(12b)
T
A key observation is that the Lyapunov stability analysis in ω = vex(Pa (R̃)), R̃ = R̂ Ry . (12c)
Eq. 8 is still valid for Eq. 9, since
Passive complementary filter with bias correction:
1 ˙ 1 ³ ´
E˙tr = − tr(R̃) = − tr(−(Ω + kP ω)× R̃ + R̃Ω× ) ˙
2 2 R̂ = R̂ Ωy − b̂ + kP ω , R̂(0) = R̂0 , (13a)
1 kP ×
T
= − tr([R̃, Ω× ]) − tr(ω× R̃) = −kP |ω|2 , ˙
2 2 b̂ = −kI ω, b̂(0) = b̂0 , (13b)
using the fact that the trace of a commutator is zero, T
ω = vex(Pa (R̃)), R̃ = R̂ Ry . (13c)
tr([R̃, Ω× ]) = 0. The filter is termed a passive complimentary
filter since the cross coupling between Ω and R̃ does not The non-linear stability analysis is based on the idea of an
contribute to the derivative of the Lyapunov function. A global adaptive estimate for the unknown bias value.
stability analysis is provided in Section IV. Theorem 4.1: [Direct complementary filter with bias
There is no particular theoretical advantage to either the correction.] Consider the rotation kinematics Eq. 4 for a
direct or the passive filter architecture in the case where exact time-varying R(t) ∈ SO(3) and with measurements given
measurements are assumed. However, it is straightforward to by Eq. 11. Let (R̂(t), b̂(t)) denote the solution of Eq. 12.
see that the passive filter (Eq. 9) can be written Define error variables R̃ = R̂T R and b̃ = b − b̂. Define
U ⊆ SO(3) × R3 by
˙ n o
R̂ = R̂(Ω× + kP Pa (R̃)). (10)
U = (R̃, b̃) tr(R̃) = −1, Pa (b̃× R̃) = 0 . (14)
This formulation suppresses entirely the requirement to repre-
sent Ω and ω = kP Pa (R̃) in the inertial frame and leads to Then:
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 6

1) The set U is forward invariant and unstable with respect We verify that Eq. 19 is also a general solution of Eqn’s 15
to the dynamic system Eq. 12. and 12b. Differentiating tr(R̃) yields
2) The error (R̃(t), b̃(t)) is locally exponentially stable to
d
(I, 0). tr(R̃) = −tr(b̃× exp(−tb̃× )R̃0 )
dt à !
3) For almost all initial conditions (R̃0 , b̃0 ) 6∈ U the trajec-
tory (R̂(t), b̂(t)) converges to the trajectory (R(t), b). (b̃× R̃0 + R̃0 b̃× )
= tr exp(−tb̃× )
2
Proof: Substituting for the error model (Eq. 11), Equation ³ ´
12a becomes = tr exp(−tb̃× )Pa (b̃× R̃0 ) = 0,
³ ´
˙
R̂ = R(Ω + b̃) + kP R̂ω R̂. where the second line follows since b̃× commutes with
×
exp(b̃× ) and the final equality is due to the fact that
Differentiating R̃ it is straightforward to verify that Pa (b̃× R̃0 ) = 0, a consequence of the choice of initial
conditions (R̃0 , b̃0 ) ∈ U. It follows that tr(R̃(t)) = −1 on
solution of Eq. 19 and hence ω ≡ 0. Classical uniqueness
R̃˙ = −kP ω× R̃ − b̃× R̃. (15)
results verify that Eq. 19 is a solution of Eqn’s 15 and 12b. It
remains to show that such solutions remain in U for all time.
Define a candidate Lyapunov function by
The condition on R̃ is proved above. To see that Pa (b̃× R̃) ≡ 0
1 1 1 we compute
V = tr(I3 − R̃) + |b̃|2 = Etr + |b̃|2 (16)
2 2kI 2kI d
Pa (b̃× R̃) = −Pa (b̃2× R̃) = −Pa (b̃× R̃b̃T× ) = 0
dt
Differentiating V one obtains
as R̃ = R̃T . This proves that U is forward invariant.
1 ˙ 1 ˙ Applying LaSalle’s principle to the solutions of Eq. 12 it
V̇ = − tr(R̃) − b̃T b̂
2 kI follows that either (R̃, b̃) → (I, 0) asymptotically or (R̃, b̃) →
1 ³ ´ 1 ˙ (R̃∗ (t), b̃0 ) where (R̃∗ (t), b̃0 ) ∈ U is a solution of Eq. 18.
= tr kP ω× R̃ + b̃× R̃ − hb̃, b̂i
2 kI To determine the local stability properties of the invariant
−kP sets we compute the linearisation of the error dynamics. We
= hhω× , Pa (R̃) + Ps (R̃)ii
2 will prove exponential stability of the isolated equilibrium
1 1 ˙ point (I, 0) first and then return to prove instability of the
− hhb̃× , Pa (R̃) + Ps (R̃)ii − hb̃, b̂i
2 kI set U. Define x, y ∈ R3 as the first order approximations of
1 ˙ R̃ and b̃ around (I, 0)
= −kP hω, vex(Pa (R̃))i − hb̃, vex(Pa (R̃)i − hb̃, b̂i
kI
R̃ ≈ (I + x× ), x× ∈ so(3) (20a)
˙ b̃ = −y.
Substituting for b̂ and ω (Eqn’s 12b and 12c) one obtains (20b)
The sign change in Eq. 20b simplifies the analysis of the
V̇ = −kP |ω|2 = −kP |vexPa (R̃)|2 (17) ˙
linearisation. Substituting into Eq. 15, computing b̃ and dis-
Lyapunov’s direct method ensures that ω converges asymptoti- carding all terms of quadratic or higher order in (x, y) yields
√ Ã ! Ã !Ã !
cally to zero [40]. Recalling that ||Pa (R̃)|| = 2 sin(θ), where x −kP I3 I3 x
d
(θ, a) denotes the angle-axis coordinates of R̃. It follows that = (21)
ω ≡ 0 implies either R̃ = I, or log(R̃) = πa× for |a| = 1. dt y −kI I3 0 y
In the second case one has the condition tr(R̃) = −1. Note For positive gains kP , kI > 0 the linearised error system is
that ω = 0 is also equivalent to requiring R̃ = R̃T to be strictly stable. This proves part ii) of the theorem statement.
symmetric. To prove that U is unstable, we use the quaternion formu-
It is easily verified that (I, 0) is an isolated equilibrium of lation (see Appendix B). Using Eq. 49, the error dynamics of
the error dynamics Eq. 18. the quaternion q̃ = (s̃, ṽ) associated to the rotation R̃ is given
From the definition of U one has that ω ≡ 0 on U. We will by
prove that U is forward invariant under the filter dynamics
1
Eqn’s 12. Setting ω = 0 in Eq. 15 and Eq. 12b yields s̃˙ = (kP s̃|ṽ|2 + ṽ T b̃), (22a)
2
˙ ˙
R̃˙ = −b̃× R̃, b̂ = 0. (18) b̃ = kI s̃ṽ, (22b)
1
ṽ˙ = − (s̃(b̃ + kP s̃ṽ) + b̃ × ṽ), (22c)
For initial conditions (R̃0 , b̃0 ) = (R̃0 , b̃0 ) ∈ U the solution of 2
Eq. 18 is given by It is straightforward to verify that the invariant set associated
to the error dynamics is characterised by
R̃(t) = exp(−tb̃× )R̃0 , b̃(t) = b̃0 , (R̃0 , b̃0 ) ∈ U. n o
(19) U = (s̃, ṽ, b̃) s̃ = 0, |ṽ| = 1, b̃T ṽ = 0
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 7

Define y = b̃T ṽ, then an equivalent characterisation of U is error variables R̃ = R̂T R and b̃ = b − b̂. Assume that Ω(t) is
given by (s̃, y) = (0, 0). We study the stability properties a bounded, absolutely continuous signal and that the pair of
of the equilibrium (0, 0) of (s̃, y) evolving under the filter signals (Ω(t), R̃) are asymptotically independent (see §II-A).
dynamics Eq. 12. Combining Eq. 22c and 22b, one obtains Define U0 ⊆ SO(3) × R3 by
the following dynamics for ẏ n o
U0 = (R̃, b̃) tr(R̃) = −1, b̃ = 0 . (23)
˙
ẏ = ṽ T b̃ + b̃T ṽ˙
Then:
= kI s̃|ṽ|2 − 12 s̃|b̃|2 − 12 kP s̃2 y 1) The set U0 is forward invariant and unstable with respect
Linearising around small values of (s̃, y) one obtains to the dynamic system 13.
à ! à !à ! 2) The error (R̃(t), b̃(t)) is locally exponentially stable to
s̃˙ 1
2 kP
1
2 s̃ (I, 0).
=
ẏ kI − 12 |b̃0 |2 0 y 3) For almost all initial conditions (R̃0 , b̃0 ) 6∈ U0 the tra-
jectory (R̂(t), b̂(t)) converges to the trajectory (R(t), b).
Since KP and KI are positive gains it follows that the lineari-
Proof: Substituting for the error model (Eq. 11) in Eqn’s
sation is unstable around the point (0, 0) and this completes
13 and differentiating R̃, it is straightforward to verify that
the proof of part i).
The linearisation of the dynamics around the unstable set is R̃˙ = [R̃, Ω ] − k ω R̃ − b̃ R̃,
× P × × (24a)
either strongly unstable (for large values of |b̃0 |2 ) or hyperbolic ˙
(both positive and negative eigenvalues). Since b̃0 depends on b̃ = kI ω (24b)
the initial condition then there there will be trajectories that The proof proceeds by differentiating the Lyapunov-like func-
converge to U along the stable centre manifold [40] associated tion Eq. 16 for solutions of Eq. 13. Following an analogous
with the stable direction of the linearisation. From classical derivation to that in Theorem 4.1, but additionally exploiting
centre manifold theory it is known that such trajectories are the cancellation tr([R̃, Ω× ]) = 0, it may be verified that
measure zero in the overall space. Observing in addition that
U is measure zero in SO(3) × R3 proves part iii) and the full V̇ = −kP |ω|2 = −kP |vex(Pa (R̃))|2
proof is complete. where V is given by Eq. 16. This bounds V (t) ≤ V (0), and
The direct complimentary filter is closely related to quater- it follows b̃ is bounded. LaSalle’s principle cannot be applied
nion based attitude filters published over the last fifteen years directly since the dynamics Eq. 24a are not autonomous. The
[9], [30], [32]. Details of the similarities and differences is function V̇ is uniformly continuous since the derivative
given in Appendix B where we present quaternion versions of ³ ´
the filters we propose in this paper. Apart from the formulation V̈ = −kP Pa (R̃)T Pa ([R̃, Ω× ]) − Pa ((kP ω − b̃)× )R̃
directly on SO(3), the present paper extends earlier work is uniformly bounded. Applying Barbalat’s lemma proves
by proposing globally defined observer dynamics and a full asymptotic convergence of ω = vex(Pa (R̃)) to zero.
global analysis. To the authors best understanding, all prior Direct substitution shows that (R̃, b̃) = (I, 0) is an equilib-
published algorithms depend on a sgn(θ) term that is discon- rium point of Eq. 24. Note that U0 ⊂ U (Eq. 14) and hence
tinuous on U (Eq. 14). Given that the observers are not well ω ≡ 0 on U (Th. 4.1). For (R̃, b̃) ∈ U0 the error dynamics
defined on the set U the analysis for prior work is necessarily Eq. 24 become
non-global. However, having noted this, the recent work of
˙
Thienel et al. [30] provides an elegant powerful analysis that R̃˙ = [R̃, Ω× ], b̃ = 0.
transforms the observer error dynamics into a linear time-
The solution of this ordinary differential equation is given by
varying system (the transformation is only valid on a domain Z t
on SO(3) × R3 − U) for which global asymptotic stability is
R̃(t) = exp(−A(t))R̃0 exp(A(t)), A(t) = Ω× dτ.
proved. This analysis provides a global exponential stability 0
under the assumption that the observer error trajectory does Since A(t) is anti-symmetric for all time then exp(−A(t)) is
not intersect U. In all practical situations the two approaches orthogonal and since exp(−A(t)) = exp(A(t))T it follows R̃
are equivalent. is symmetric for all time. It follows that U0 is forward invariant
The remainder of the section is devoted to proving an anal- under the filter dynamics Eq. 13. We prove by contradiction
ogous result to Theorem 4.1 for the passive complementary that U0 ⊂ U is the largest forward invariant set of the closed-
filter dynamics. In this case, it is necessary to deal with loop dynamics Eq. 13 such that ω ≡ 0. Assume that there
non-autonomous terms in the error dynamics due to passive exits (R̃0 , b̃0 ) ∈ U − U0 such that (R̃(t), b̃(t)) remains in U
coupling of the driving term Ω into the filter error dynamics. for all time. One has that Pa (b̃× R̃) = 0 on this trajectory.
Interestingly, the non-autonomous term acts in our favour to Consequently,
disturb the forward invariance properties of the set U (Eq. 14)
d
and reduce the size of the unstable invariant set. Pa (b̃× R̃) = Pa (b̃× [R̃, Ω× ]) − P(b̃× R̃bT× )
Theorem 4.2: [Passive complementary filter with bias dt
correction.] Consider the rotation kinematics Eq. 4 for a = Pa (b̃× [R̃, Ω× ])
time-varying R(t) ∈ SO(3) and with measurements given by 1³ ´
=− (b̃ × Ω)× R̃ + R̃(b̃ × Ω)× = 0, (25)
Eq. 11. Let (R̂(t), b̂(t)) denote the solution of Eq. 13. Define 2
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 8

where we have used passive dynamics by the independent driving term Ω provides
a disturbance that ensures that the adaptive bias estimate
2Pa (b̃× R̃) = b̃× R̃ + R̃b̃× = 0, (26) converges to the true gyroscopes’ bias, a particularly useful
several times in simplifying expressions. Since (Ω(t), R̃(t)) property in practical applications.
are asymptotically independent then the relationship Eq. 25
must be degenerate. This implies that there exists a time T V. E XPLICIT ERROR FORMULATION OF THE PASSIVE
such that for all t > T then b̃(t) ≡ 0 and contradicts the COMPLEMENTARY FILTER
assumption. A weakness of the formulation of both the direct and passive
It follows that either (R̃, b̃) → (I, 0) asymptotically or and complementary filters is the requirement to reconstruct an
(R̃, b̃) → (R̃∗ (t), 0) ∈ U0 . estimate of the attitude, Ry , to use as the driving term for the
Analogously to Theorem 4.1 the linearisation of the error error dynamics. The reconstruction cannot be avoided in the
dynamics (Eq. 24) at (I, 0) is computed. Let R̃ ≈ I + x× direct filter implementation because the reconstructed attitude
and b̃ ≈ −y for x, y ∈ R3 . The linearised dynamics are the is also used to map the velocity into the inertial frame. In this
time-varying linear system section, we show how the passive complementary filter may be
à ! à !à !
d x −kP I3 − Ω(t)× I3 x reformulated in terms of direct measurements from the inertial
= unit.
dt y −kI I3 0 y
Let v0i ∈ {A}, i = 1, . . . , n, denote a set of n known
Let |Ωmax | denote the magnitude bound on Ω and choose inertial directions. The measurements considered are body-
fixed-frame observations of the fixed inertial directions
α2 (|Ωmax |2 + kI )
α2 > 0, α1 > , vi = RT v0i + µi , vi ∈ {B} (29)
kP
α1 + kP α2 α1 + kP α2 |Ωmax |α2
< α3 < + where µi is a noise process. Since only the direction of the
kI kI kI measurement is relevant to the observer we assume that |v0i | =
Set P, Q to be matrices 1 and normalise all measurements to ensure |vi | = 1.
µ ¶ µ ¶ Let R̂ be an estimate of R. Define
α1 I3 −α2 I3 kP α1 − α2 kI −α2 |Ωmax |
P = ,Q=
−α2 I3 α3 I3 −α2 |Ωmax | α2 v̂i = R̂T v0i
(27)
It is straightforward to verify that P and Q are positive to be the associated estimate of vi . For a single direction vi ,
definite matrices given the constraints on {α1 , α2 , α3 }. Con- the error considered is
sider the cost function W = 21 ξ T P ξ, with ξ = (x, y)T .
Ei = 1 − cos(∠vi , v̂i ) = 1 − hvi , v̂i i
Differentiating W yields
Ẇ = − (kP α1 − α2 kI )|x|2 − α2 |y|2 which yields

+ y T x(α1 + kP α2 − α3 kI ) + α2 y T (Ω × x) (28) Ei = 1 − tr(R̂T v0i v0i


T
R) = 1 − tr(R̃RT v0i v0i
T
R)

It is straightforward to verify that For multiple measures vi the following cost function is con-
à ! sidered
d ¡ T ¢ |x| n n
ξ P ξ ≤ −2(|x|, |y|) Q . X X
dt |y| Emes = ki Ei = ki − tr(R̃M ), ki > 0, (30)
i=1 i=1
This proves exponential stability of the linearised system at
(I, 0). where
n
X
The linearisation of the error dynamics on a trajectory in
U0 are also time varying and it is not possible to use the M = RT M0 R with M0 = T
ki v0i v0i (31)
i=1
argument from Theorem 4.1 to prove instability. However,
note that V (R̃∗ , b̃∗ ) = 2 for all (R̃∗ , b̃∗ ) ∈ U0 . Moreover, Assume linearly independent inertial direction {v0i } then the
any neighbourhood of a point (R̃∗ , b̃∗ ) ∈ U0 within the set matrix M is positive definite (M > 0) if n ≥ 3. For n = 2
SO(3) × R3 contains points (R̃, b̃) such the V (R̃, b̃) < 2. then M is positive semi-definite with one eigenvalue zero.
Trajectories with these initial conditions cannot converge to U0 The weights ki > 0 are chosen depending on the relative
due to the decrease condition derived earlier, and it follows that confidence in the measurements vi . For technical reasons in the
U0 is unstable. Analogous to Theorem 4.1 it is still possible proof of Theorem 5.1 we assume additionally that the weights
that a set of measure zero initial conditions, along with very ki are chosen such that M0 has three distinct eigenvalues λ1 >
specific trajectories Ω(t), such that the resulting trajectories λ2 > λ 3 .
converge to to U0 . This proves part iii) and completes the Theorem 5.1: [Explicit complementary filter with bias
proof. correction.] Consider the rotation kinematics Eq. 4 for a time-
Apart from the expected conditions inherited from Theo- varying R(t) ∈ SO(3) and with measurements given by Eqn’s
rem 4.1 the key assumption in Theorem 4.2 is the indepen- 29 and 11b. Assume that there are two or more, (n ≥ 2)
dence of Ω(t) from the error signal R̃. The perturbation of the vectorial measurements vi available. Choose ki > 0 such
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 9

that M0 (defined by Eq. 31) has three distinct eigenvalues. We prove next Eq. 35 implies either R̃ = I or tr(R̃) = −1.
Consider the filter kinematics given by Since R̃ is a real matrix, the eigenvalues and eigenvectors
³ ´ of R̃ verify
˙
R̂ = R̂ (Ωy − b̂)× + kP (ωmes )× , R̂(0) = R̂0 (32a)
˙ R̃T xk = λk xk and xH H H
k R̃ = λk xk (36)
b̂ = −kI ωmes (32b)
Xn where λH k (for k = 1 . . . 3) represents the complex conjugate
ωmes := ki vi × v̂i , ki > 0. (32c) of the eigenvalue λk and xH k represents the Hermitian trans-
i=1 pose of the eigenvector xk associated to λk . Combining Eq. 35
and let (R̂(t), b̂(t)) denote the solution of Eqn’s 32. Assume and Eq. 36, one obtains
that Ω(t) is a bounded, absolutely continuous signal and that xH H H
k R̃M xk = λk xk M xk
the pair of signals (Ω(t), R̃T ) are asymptotically independent
(see §II-A). Then: xH T H H H
k M R̃ xk = λk xk M xk = λk xk M xk

1) There are three unstable equilibria of the filter charac- Note that for n ≥ 3, M > 0 is positive definite and
terised by xH H
k M xk > 0, ∀k = {1, 2, 3}. One has λk = λk for all k.
¡ ¢ In the case when n = 2, it is simple to verify that two of the
(R̂∗i , b̂∗i ) = U0 Di U0T R, b , i = 1, 2, 3,
three eigenvalues are real. It follows that all three eigenvalues
where D1 = diag(1, −1, −1), D2 = diag(−1, 1, −1) of R̃ are real since complex eigenvalues must come in complex
and D3 = diag(−1, −1, 1) are diagonal matrices with conjugate pairs. The eigenvalues of an orthogonal matrix are
entries as shown and U0 ∈ SO(3) such that M0 = of the form
U0 ΛU0T where Λ = diag(λ1 , λ2 , λ3 ) is a diagonal
matrix. eig(R̃) = (1, cos(θ) + i sin(θ), cos(θ) − i sin(θ)),
2) The error (R̃(t), b̃(t)) is locally exponentially stable to
(I, 0). where θ is the angle from the angle-axis representation. Given
3) For almost all initial conditions (R̃0 , b̃0 ) 6= (R̂∗i T
R, b), that all the eigenvalues are real it follows that θ = 0 or θ =
±π. The first possibility is the desired case (R̃, b̃) = (I, 0).
i = 1, . . . , 3, the trajectory (R̂(t), b̂(t)) converges to the
The second possibility is the case where tr(R̃) = −1.
trajectory (R(t), b).
When ωmes ≡ 0 then Eqn’s 32 and Eqn’s 13 lead to
Proof: Define a candidate Lyapunov-like function by
identical error dynamics. Thus, we use the same argument
n
X 1 2 1 as in Theorem 4.2 to prove that b̃ = 0 on the invariant set.
V = ki − tr(R̃M ) + b̃ = Emes + b̃2 To see that the only forward invariant subsets are the unstable
i=1
kI kI
equilibria as characterised in part i) of the theorem statement
The derivative of V is given by we introduce R̄ = RR̂T . Observe that
³ ´
˙ + R̃Ṁ − 2 b̃T b̂˙
V̇ = − tr R̃M R̃M = M R̃T ⇒ R̄M0 = M0 R̄T
kI
³ ´ 2 ˙
= −tr [R̃M, Ω× ] − (b̃ + kP ωmes )× R̃M − b̃T b̂ Analogous to Eq. 35, this implies R̄ = I3 or tr(R̄) = −1 on
kI the set ωmes ≡ 0 and R̄ = R̄T . Set R̄0 = U0T R̄U0 . Then
Recalling that the trace of a commutator is zero, the derivative
of the candidate Lyapunov function can be simplified to obtain R̄0 Λ − ΛR̄0 = 0 ⇒ 0
∀i, j (λi − λj )R̄ij =0
³ ´ µ µ ¶¶ 0
1 ˙ As M0 has three distinct eigenvalues, it follows that R̄ij =0
V̇ = kP tr (ωmes )× Pa (R̃M ) +tr b̃× Pa (R̃M ) − b̂× 0
for all i 6= j and thus R̄ is diagonal. Therefore, there are
kI
(33) four isolated equilibrium points R̄00 = U0 Di U0T , i = 1, . . . , 3
Recalling the identities in Section II-A one may write ωmes (where Di are specified in part i) of the theorem statement)
as and R̄0 = I that satisfy the condition ωmes ≡ 0. The case
Xn
ki R̄00 = I = U0 D4 U0T (where D4 = I) corresponds to the
(ωmes )× = (v̂i viT − vi vˆi T ) = Pa (R̃M ) (34) equilibrium (R̃, b̃) = (I, 0) while we will show that the other
i=1
2
three equilibria are unstable.
Introducing the expressions of ωmes into the time derivative We proceed by computing the dynamics of the filter in the
of the Lyapunov-like function V , Eq. 33, one obtains new R̄ variable and using these dynamics to prove the stability
properties of the equilibria. The dynamics associated to R̄ are
V̇ = −kP ||Pa (R̃M )||2 .
˙
The Lyapunov-like function derivative is negative semi- R̄˙ = ṘR̂T + RR̂T
definite ensuring that b̃ is bounded. Analogous to the proof = RΩ× R̂T − R(Ω + b̃)× R̂T − kP RPa (R̃M )R̂T
of Theorem 4.2, Barbalat’s lemma is invoked to show that = −Rb̃× R̂T − kP
R(R̃M − M R̃T )R̂T
2
Pa (R̃M ) tends to zero asymptotically. Thus, for V̇ = 0 one kP
has = −Rb̃× (RT R)R̂T − 2 R(R̂T M0 R − RT M0 R̂)R̂T
R̃M = M R̃T . (35) = −(Rb̃)× R̄ − kP
2 (R̄M0 R̄ − M0 )
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 10

Setting b̄ = Rb̃, one obtains The combined error dynamic linearisation in the primed coor-
dinates is
kP Ã ! Ã !Ã !
R̄˙ = −b̄× R̄ − (R̄M0 R̄ − M0 ). (37)
2 ẋ0 kP Ai Di x0
= , i = 1, . . . , 4.
The dynamics of the new estimation error on the bias b̄ are ẏ 0 kI Ai Di Ω0 (t)× y0
(39)
b̄˙ × = Ṙb̄× RT + Rb̄× ṘT + kI RPa (R̃M )RT To complete the proof of part i) of the theorem statement we
kI will prove that the three equilibria associated with (R̄∗i , b̄∗i )
= [(RΩ)× , b̄× ] + R(R̂T M0 R − RT M0 R̂)RT for i = 1, 2, 3 are unstable. The demonstration is analogous to
2
kI the proof of the Chetaev’s Theorem (see [40, pp. 111–112]).
= [(RΩ)× , b̄× ] + (R̄M0 − M0 R̄T ) (38) Consider the following cost function:
2
The dynamics of (R̄, b̄) (Eqn’s 37 and 38) are an alternative 1 1
S= kI x0T Ai x0 − |y 0 |2
formulation of the error dynamics to (R̃, b̃). 2 2
Consider a first order approximation of (R̄, b̄) (Eqn’s 37 and It is straightforward to verify that its time derivative is always
38) around an equilibrium point (R̄0 , 0) positive
Ṡ = kP kI A2i |x0 |2 .
R̄ = R̄0 (I3 + x× ), b̄ = −y.
Note that for i = 1, . . . , 3 then Ai has at least one element of
The linearisation of Eq. 37 is given by the diagonal positive. For each i = 1, . . . , 3 and r > 0, define
kP
R̄0 ẋ× = y× R̄0 − (R̄0 x× M0 R̄0 + R̄0 M0 R̄0 x× ), Ur = {ξ 0 = (x0 , y 0 )T : S(ξ 0 ) > 0, |ξ 0 | < r}
2
and thus and note that Ur is non-null for all r > 0. Let ξ00 ∈ Ur such
that S(ξ00 ) > 0. A trajectory ξ 0 (t) initialized at ξ 0 (0) = ξ00
kP will diverge from the compact set Ur since Ṡ(ξ 0 ) > 0 on Ur .
ẋ× = R̄0T y× R̄0 − (x× M0 R̄0 + M0 R̄0 x× ),
2 However, the trajectory cannot exit Ur through the surface
and finally S(ξ 0 ) = 0 since S(ξ 0 (t)) ≥ S(ξ00 ) along the trajectory.
Restricting r such that the linearisation is valid, then the trajec-
kP
U0T ẋ× U0 = Di (U0T y)× Di − ((U0T x)× ΛDi +ΛDi (U0T x)× ) tory must exit Ur through the sphere |ξ 0 | = r. Consequently,
2 trajectories initially arbitrarily close to (0, 0) will diverge. This
for i = 1, . . . , 4 and where Λ is specified in part i) of the proves that the point (0, 0) is locally unstable.
theorem statement. Define To prove local exponential stability of (R̄, b̄) = (I, 0) we
consider the linearisation Eq. 39 for i = 4. Note that D4 = I
A1 = 0.5diag(λ2 + λ3 , −λ1 + λ3 , −λ1 + λ2 )
and A4 < 0. Set KP = − k2P A4 and KI = − k2I A4 . Then
A2 = 0.5diag(λ2 − λ3 , λ1 − λ3 , λ1 + λ2 ) KP , KI > 0 are positive definite and Eq. 39 may be written
A3 = 0.5diag(−λ2 + λ3 , λ1 + λ3 , +λ1 − λ2 ) as à ! à !à !
A4 = 0.5diag(−λ2 − λ3 , −λ1 − λ3 , −λ1 − λ2 ) d x0 −KP I3 x0
=
dt y0 −KI Ω0 (t)× y0
Setting y 0 = U0T y and x0 = U0T x one may write the
linearisation Eq. 37 as Consider a cost function V = ξ 0T P ξ 0 with P given by Eq. 27.
Analogous to Eq. 28, the time derivative of V is given by
ẋ0 = kP Ai x0 + Di y 0 , i = 1, . . . , 4.
V̇ = − (KP α1 − α2 KI )|x0 |2 − α2 |y 0 |2
˙ Equation
We continue by computing the linearisation of b̄. + y 0T x0 (α1 + KP α2 − α3 KI ) − α2 x0T (Ω0 × y 0 ).
(38) may be approximated to a first order by
Once again, it is straightforward to verify that
kI Ã !
−ẏ× = [(RΩ)× , −y× ] + (R̄0 x× M0 + M0 x× R̄0 )
2 |x0 |
V̇ ≤ −2(|x0 |, |y 0 |)Q
and thus |y 0 |
kI where Q is defined in Eq. 27 and this proves local exponential
−U0T ẏ× U0 = [(U0T RΩ)× , −y×
0
]+ (Di x0× Λ + Λx0× Di ).
2 stability of (R̄, b̄) = (I, 0).
Finally, for i = 1, . . . , 4 The final statement of the theorem follows directly from the
above results along with classical dynamical systems theory
kI
U0T ẏ× U0 = − ((Di x0 )× Di Λ + ΛDi (Di x0 )× ) + [Ω0× , y×
0
]. and the proof is complete.
2 Remark: If n = 3, the weights ki = 1, and the measured
Rewriting in terms of the variables x0 , y 0 and setting Ω0 = directions are orthogonal (viT vj = 0, ∀i 6= j) then M = I3 .
U0T RΩ one obtains The cost function Emes becomes
ẏ 0 = kI Ai Di x0 + Ω0 × y 0 , for i = 1, . . . , 4. Emes = 3 − tr(R̃M ) = tr(I3 − R̃) = Etr .
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 11

In this case, the explicit complementary filter (Eqn’s 32) and Eqn’s 29 (for a single measurement v1 = va ) and Eq. 11b. Let
the passive complementary filter (Eqn’s 13) are identical. ¤ (R̂(t), b̂(t)) denote the solution of Eqn’s 32. Assume that Ω(t)
Remark: It is possible to weaken the assumptions in Theo- is a bounded, absolutely continuous signal and (Ω(t), va (t))
rem 5.1 to allow any choice of gains ki and any structure of the are asymptotically independent (see §II-A). Define
matrix M0 and obtain analogous results. The case where all T
U1 = {(R̃, b̃) : v0a R̃v0a = −1, b̃ = 0}.
three eigenvalues of M0 are equal is equivalent to the passive
complementary filter scaled by a constant. The only other case Then:
where n > 2 has 1) The set U1 is forward invariant and unstable under the
closed-loop filter dynamics.
M0 = U0 diag(λ1 , λ1 , λ2 )U0T 2) The estimate (v̂a , b̂) is locally exponentially stable to
for λ1 > λ2 ≥ 0. (Note that the situation where n = 1 (va , b).
is considered in Corollary 5.2.) It can be shown that any 3) For almost all initial conditions (R̃0 , b̃0 ) 6∈ U1 then
symmetry R̄∗ = exp(πa∗× ) with a∗ ∈ span{v01 , v02 } satisfies (v̂a , b̂) converges to the trajectory (va (t), b).
ωmes ≡ 0 and it is relatively straightforward to verify that this Proof: The dynamics of v̂a are given by
set is forward invariant under the closed-loop filter dynamics. v̂˙ a = −(Ω + b̃ + kP va × v̂a ) × v̂a (40)
This invalidates part i) of Theorem 5.1 as stated, however,
it can be shown that the new forward invariant points are Define the following storage function
unstable as expected. To see this, note that any (R̄∗ , b̄∗ ) in 1
V = Emes + b̃2 .
this set corresponds to the minimal cost of Emes on U0 . kI
Consequently, any neighbourhood of (R̄∗ , b̄∗ ) contains points The derivative of V is given by
(R̃, b̃) such that V (R̃, b̃) < V (R̄∗ , b̄∗ ) and the Lyapunov V̇ = −kP ||(va × R̂T v0a )× ||2 = −2kP |va × v̂a |2
decrease condition ensures instability. There is still a separate
isolated unstable equilibrium in U0 , and the stable equilibrium, The Lyapunov-like function V derivative is negative semi-
that must be treated in the same manner as undertaken in the definite ensuring that b̃ is bounded and va × v̂a → 0. The
formal proof of Theorem 5.1. Following through the proof set va × v̂∗a = 0 is characterised by va = ±v̂∗a and thus
T T
yields analogous results to Theorem 5.1 for arbitrary choice v̂∗a va = ±1 = v0a R̂∗T Rv0a = v0a
T
R̃∗ v0a .
of gains {ki }. ¤
Consider a trajectory (v̂∗a (t), b∗ (t)) that satisfies the filter
The two typical measurements obtained from an IMU unit
dynamics and for which v̂∗a = ±va for all time. One has
are estimates of the gravitational, a, and magnetic, m, vector
fields d
a0 m0 (va × v̂∗a ) = 0
va = R T , vm = R T . dt
|a0 | |m0 | = −(Ω × va ) × v̂∗a − va × (Ω × v̂∗a )
In this case, the cost function Emes becomes − va × (b̃∗ × v̂∗a ) − kP va × ((va × v̂∗a ) × v̂∗a )
Emes = k1 (1 − hv̂a , va i) + k2 (1 − hv̂m , vm i) = ±va × (b̃∗ × va ) = 0.
The weights k1 and k2 are introduced to weight the confidence Differentiating this expression again one obtains
³ ´
in each measure. In situations where the IMU is subject (Ω × va ) × (b̃∗ × va ) + va × (b̃∗ × (Ω × va )) = 0
to high magnitude accelerations (such as during takeoff or
landing manoeuvres) it may be wise to reduce the relative Since the signals Ω and va are asymptotically independent it
weighting of the accelerometer data (k1 << k2 ) compared to follows that the functional expression on the left hand side is
the magnetometer data. Conversely, in many applications the degenerate. This can only hold if b̃∗ ≡ 0. For v̂∗a = −va , this
IMU is mounted in the proximity to powerful electric motors set of trajectories is characterised by the definition of U1 . It is
and their power supply busses leading to low confidence in straightforward to adapt the arguments in Theorems 4.1 and
the magnetometer readings (choose k1 >> k2 ). This is a very 4.2 to see that this set is forward invariant. Note that for b̃∗ = 0
common situation in the case of mini aerial vehicles with then V = Emes . It is direct to see that (v̂∗a (t), b∗ (t)) lies on a
electric motors. In extreme cases the magnetometer data is local maximum of Emes and that any neighbourhood contains
unusable and provides motivation for a filter based solely on points such that the full Lyapunov function V is strictly less
accelerometer data. than its value on the set U1 . This proves instability of U1 and
completes part i) of the corollary.
The proof of part ii) and part iii) is analogous to the proof
A. Estimation from the measurements of a single direction
of Theorem 5.1 (see also [15]).
Let va be a measured body fixed frame direction associated An important aspect of Corollary 5.2 is the convergence of
with a single inertial direction v0a , va = RT v0a . Let v̂a be an the bias terms in all degrees of freedom. This ensures that, for
estimate v̂a = R̂T v0a . The error considered is a real world system, the drift in the attitude estimate around
the unmeasured axis v0a will be driven asymptotically by a
Emes = 1 − tr(R̃M ); M = RT v0a v0a
T
R
zero mean noise process rather than a constant bias term. This
Corollary 5.2: Consider the rotation kinematics Eq. 4 for a makes the proposed filter a practical algorithm for a wide range
time-varying R(t) ∈ SO(3) and with measurements given by of MAV applications.
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 12

50
VI. E XPERIMENTAL RESULTS
In this section, we present experimental results to demon-

roll φ (°)
strate the performance of the proposed observers. 0

Experiments were undertaken on two real platforms to


φmeasure
demonstrate the convergence of the attitude and gyro bias φpassive
φ
estimates. −50
0 10 20 30 40 50
direct
60

1) The first experiment was undertaken on a robotic ma-


nipulator with an IMU mounted on the end effector and 60

supplied with synthetic estimates of the magnetic field 40

measurement. The robotic manipulator was programmed 20

pitch θ (°)
to simulate the movement of a flying vehicle in hover- 0

θmeasure
ing flight regime. The filter estimates are compared to −20 θpassive
θdirect
orientation measurements computed from the forward −40

kinematics of the manipulator. Only the passive and −60


0 10 20 30 40 50 60

direct complimentary filters were run on this test bed.


2) The second experiment was undertaken on the VTOL 200

MAV HoverEye° c
developed by Bertin Technologies 150

(Figure 1). The VTOL belongs to the class of ‘sit 100

yaw ψ (°)
on tail’ ducted fan VTOL MAV, like the iSTAR9 and 50 ψmeasure
ψpassive

Kestrel developed respectively by Allied Aerospace [41] 0 ψdirect

and Honeywell [42]. It was equipped with a low-cost −50

IMU that consists of 3-axis accelerometers and 3-axis −100


0 10 20 30
time (s)
40 50 60

gyroscopes. Magnetometers were not integrated in the


MAV due to perturbations caused by electrical motors. Fig. 6. Euler angles from direct and passive complementary filters
The explicit complementary filter was used in this ex-
periment. 10
best−direct (°/s)

0
For both experiments the gains of the proposed filters were b1

chosen to be: kP = 1rad.s−1 and kI = 0.3rad.s−1 . The inertial


−10 b2
b3
−20
data was acquired at rates of 25Hz for the first experiment and 0 10 20 30
time (s)
40 50 60

50Hz for the second experiment. The quaternion version of the 10


b1
best−passive (°/s)

b2
filters (Appendix B) were implemented with first order Euler 5
b3

numerical integration followed by rescaling to preserve the 0

unit norm condition. −5


0 10 20 30
time (s)
40 50 60

Experimental results for the direct and passive versions of


the filter are shown in Figures 6 and 7. In Figure 6 the only Fig. 7. Bias estimation from direct and passive complementary filters
significant difference between the two responses lies in the
initial transient responses. This is to be expected, since both
filters will have the same theoretical asymptotic performance. manoeuvre, before returning to the initial heading and landing
In practice, however, the increased sensitivity of the direct the vehicle. After landing, the vehicle is placed by hand at its
filter to noise introduced in the computation of the measured initial pose such that final and initial attitudes are the identical.
rotation Ry is expected to contribute to slightly higher noise Figure 8 plots the pitch and roll angles (φ, θ) estimated
in this filter compared to the passive. directly from the accelerometer measurements against the
The response of the bias estimates is shown in Figure 7. estimated values from the explicit complementary filter. Note
Once again the asymptotic performance of the filters is similar the large amounts of high frequency noise in the raw attitude
after an initial transient. From this figure it is clear that the estimates. The plots demonstrate that the filter is highly
passive filter displays slightly less noise in the bias estimates successful in reconstructing the pitch and roll estimates.
than for the direct filter (note the different scales in the y-axis). Figure 9 presents the gyros bias estimation verses the
predicted yaw angle (φ) based on open loop integration of the
Figures 8 and 9 relate to the second experiment. The gyroscopes. Note that the explicit complementary filter here
experimental flight of the MAV was undertaken under remote is based solely on estimation of the gravitational direction.
control by an operator. The experimental flight plan used was: Consequently, the yaw angle is the indeterminate angle that is
First, the vehicle was located on the ground, initially headed not directly stabilised in Corollary 5.2. Figure 9 demonstrates
toward ψ(0) = 0. After take off, the vehicle was stabilized that the proposed filter has successfully identified the bias of
in hovering condition, around a fixed heading which remains the yaw axis gyro. The final error in yaw orientation of the
close the initial heading of the vehicle on the ground. Then, microdrone after landing is less than 5 degrees over a two
o
the operator engages a ' 90 -left turn manoeuvre, returns minute flight. Much of this error would be due to the initial
o
to the initial heading, and follows with a ' 90 -right turn transient when the bias estimate was converging. Note that the
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 13

second part of the figure indicates that the bias estimates are into the estimator frame of reference. The resulting ob-
not constant. Although some of this effect may be numerical, server kinematics are considerably simplified and avoid
it is also to be expected that the gyro bias on low cost IMU coupling of constructed attitude error into the predictive
systems are highly susceptible to vibration effects and changes velocity update.
in temperature. Under flight conditions changing engine speeds Explicit complementary filter: A reformulation of the passive
and aerodynamic conditions can cause quite fast changes in complementary filter in terms of direct vectorial measure-
gyro bias. ments, such as gravitational or magnetic field directions
obtained for an IMU. This observer does not require on-
line algebraic reconstruction of attitude and is ideally
suited for implementation on embedded hardware plat-
forms. Moreover, the filter remains well conditioned in
the case where only a single vector direction is measured.
The performance of the observers was demonstrated in a
suite of experiments. The explicit complementary filter is now
implemented as the primary attitude estimation system on
several MAV vehicles world wide.

A PPENDIX A
A R EVIEW OF C OMPLEMENTARY F ILTERING
Complementary filters provide a means to fuse multiple
independent noisy measurements of the same signal that
have complementary spectral characteristics [11]. For example,
Fig. 8. Estimation results of the Pitch and roll angles. consider two measurements y1 = x + µ1 and y2 = x + µ2 of a
signal x where µ1 is predominantly high frequency noise and
µ2 is a predominantly low frequency disturbance. Choosing a
100 pair of complementary transfer functions F1 (s) + F2 (s) = 1
50
with F1 (s) low pass and F2 (s) high pass, the filtered estimate
is given by
φ (deg)

−50 φ (yaw angle) from gyros


X̂(s) = F1 (s)Y1 +F2 (s)Y2 = X(s)+F1 (s)µ1 (s)+F2 (s)µ2 (s).
φ from the estimator

−100
50 60 70 80 90 100 110 120 130 140 The signal X(s) is all pass in the filter output while noise
time (s)
components are high and low pass filtered as desired. This type
0.04 of filter is also known as distorsionless filtering since the signal
0.02
x(t) is not distorted by the filter [43]. Complementary filters
are particularly well suited to fusing low bandwidth position
b (rd/s)

0
bx
measurements with high band width rate measurements for
−0.02
b
y
bz
first order kinematic systems. Consider the linear kinematics
−0.04
50 60 70 80 90 100 110 120 130 140 ẋ = u. (41)
time (s)

Fig. 9. Gyros bias estimation and influence of the observer on yaw angle. with typical measurement characteristics

yx = L(s)x + µx , yu = u + µu + b(t) (42)

VII. C ONCLUSION where L(s) is low pass filter associated with sensor character-
istics, µ represents noise in both measurements and b(t) is a
This paper presents a general analysis of attitude observer deterministic perturbation that is dominated by low-frequency
design posed directly on the special orthogonal group. Three content. Normally the low pass filter L(s) ≈ 1 over the
non-linear observers, ensuring almost global stability of the frequency range on which the measurement yx is of interest.
observer error, are proposed: The rate measurement is integrated ysu to obtain an estimate of
Direct complementary filter: A non-linear observer posed on the state and the noise and bias characteristics of the integrated
SO(3) that is related to previously published non-linear signal are dominantly low frequency effects. Choosing
observers derived using the quaternion representation of
SO(3). C(s)
F1 (s) =
Passive complementary filter: A non-linear filter equation that C(s) + s
takes advantage of the symmetry of SO(3) to avoid s
F2 (s) = 1 − F1 (s) =
transformation of the predictive angular velocity term C(s) + s
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 14

with C(s) all pass such that L(s)F1 (s) ≈ 1 over the band- Abusing notation for the noise processes, and using x̃ = (x −
width of L(s). Then x̂), and b̃ = (b0 − b̂), one has
µu (s) + b(s) d
X̂(s) ≈ X(s) + F1 (s)µx (s) + L = −kP |x̃|2 − µu x̃ + µx (b̃ − kx̃)
C(s) + s dt
Note that even though F2 (s) is high pass the noise µu (s)+b(s) In the absence of noise one may apply Lyapunov’s direct
is low pass filtered. In practice, the filter structure is imple- method to prove convergence of the state estimate. LaSalle’s
mented by exploiting the complementary sensitivity structure principal of invariance may be used to show that b̂ → b0 .
of a linear feedback system subject to load disturbance. When the underlying system is linear, then the linear form of
Consider the block diagram in Figure 10. The output x̂ can the feedback and adaptation law ensure that the closed-loop
system is linear and stability implies exponential stability.
yu

A PPENDIX B
yx + x̂
C(s)
R Q UATERNION REPRESENTATIONS OF OBSERVERS
+ +
- The unit quaternion representation of rotations is commonly
used for the realisation of algorithms on SO(3) since it offers
considerable efficiency in code implementation. The set of
Fig. 10. Block diagram of a classical complementary filter.
quaternions is denoted Q = {q = (s, v) ∈ R × R3 : |q| = 1}.
The set Q is a group under the operation
be written
" #
C(s) s yu (s) s1 s2 − v1T v2
x̂(s) = yx (s) + q1 ⊗ q2 =
s + C(s) C(s) + s s s1 v2 + s2 v1 + v1 × v2
yu (s)
= T (s)yx (s) + S(s) with identity element 1 = (1, 0, 0, 0). The group of quater-
s
nions are homomorphic to SO(3) via the map
where S(s) is the sensitivity function of the closed-loop
system and T (s) is the complementary sensitivity. This archi- F : Q → SO(3), 2
F (q) := I3 + 2sv× + 2v×
tecture is easy to implement efficiently and allows one to use
classical control design techniques for C(s) in the filter design. This map is a two to one mapping of Q onto SO(3) with
The simplest choice is a proportional feedback C(s) = kP . In kernel {(1, 0, 0, 0), (−1, 0, 0, 0)}, thus, Q is locally isomorphic
this case the closed-loop dynamics of the filter are given by to SO(3) via F . Given R ∈ SO(3) such that R = exp(θa× )
then F −1 (R) = {±(cos( θ2 ), sin( θ2 )a)} Let Ω ∈ {A} de-
x̂˙ = yu + kP (yx − x̂). (43) note a body-fixed frame velocity, then the pure quaternion
The frequency domain complementary filters associated with p(Ω) = (0, Ω) is associated with a quaternion velocity.
kP
this choice are F1 (s) = s+k and F2 (s) = s+k s
. Note that Consider the rotation kinematics on SO(3) Eq. 4, then the
P P
the crossover frequency for the filter is at kP rad.s−1 . The gain associated quaternion kinematics are given by
kP is typically chosen based on the low pass characteristics 1
of yx and the low frequency noise characteristics of yu to q̇ = q ⊗ p(Ω) (45)
2
choose the best crossover frequency to tradeoff between the
Let qy ≈ q be a low frequency measure of q, and Ωy ≈ Ω + b
two measurements. If the rate measurement bias, b(t) = b0 ,
(for constant bias b) be the angular velocity measure. Let q̂
is a constant then it is natural to add an integrator to the
denote the observer estimate and quaternion error q̃
compensator to make the system type I
" #
kI −1 s̃
C(s) = kP + . (44) q̃ = q̂ ⊗ q =
s ṽ
A type I system will reject the constant load disturbance b0
from the output. Gain design for kP and kI is typically based Note that
on classical frequency design methods. The non-linear devel- 1
2s̃ṽ = 2 cos(θ/2) sin(θ/2)a = (sin θ)a = vex(Pa (R̃))
opment in the body of the paper requires a Lyapunov analysis 2
of closed-loop system Eq. 43. Applying the PI compensator,
where (θ, a) is the angle axis representation of R̃ = F (q̃).
Eq. 44, one obtains state space filter with dynamics
The quaternion representations of the observers proposed in
˙
x̂˙ = yu − b̂ + k(yx − x̂), b̂ = −kI (yx − x̂) this paper are:
Direct complementary filter (Eq. 12):
The negative sign in the integrator state is introduced to
indicate that the state b̂ will cancel the bias in yu . Consider 1
q̂˙ = q̂ ⊗ p(R̃(Ωy − b̂) + 2kP s̃ṽ) (46a)
the Lyapunov function 2
˙
1 1 b̂ = −2kI s̃ṽ (46b)
L= |x − x̂|2 + |b0 − b̂|2
2 2kI
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 15

Passive complementary filter (Eq. 13): This demonstrates that the quaternion filter Eqn’s 51 is ob-
1 tained from the standard form of the complimentary filter
q̂˙ = q̂ ⊗ p(Ωy − b̂ + 2kP s̃ṽ) (47a) proposed Eq. 12 with the correction term Eq. 12c replaced
2
˙ by
b̂ = −2kI s̃ṽ (47b)
ωq = sgn(s̃)ṽ, q̃ ∈ F −1 (R̂T R).
Explicit complementary filter (Eq. 32):
à n ! Note that the correction term defined in Eq. 12c can be written
X ki ω = 2s̃ṽ. It follows that
ωmes = − vex (vi vˆi T − v̂i viT ) (48a)
2 sgn(s̃)
i=1 ωq = ω
1 2s̃
q̂˙ = q̂ ⊗ p(Ωy − b̂ + kP ωmes ) (48b)
2 The correction term for the two filters varies only by the
˙ positive scaling factor sgn(s̃)/(2s̃). The quaternion correction
b̂ = −kI ωmes (48c)
term ωq is not well defined for s̃ = 0 (where θ = ±π) and
The error dynamics associated with the direct filter expressed these points are not well defined in the filter dynamics Eq. 51.
in the quaternion formulation are It should be noted, however, that |ωq | is bounded at s̃ = 0
1³ ´ and, apart from possible switching behaviour, the filter can
q̃˙ = − p(b̃ + kP s̃ṽ) ⊗ q̃ . (49) still be implemented on the remainder of SO(3) × R3 . An
2
The error dynamics associated with the passive filter are argument for the use of the correction term ωq is that the
resulting error dynamics strongly force the estimate away from
1³ ´
the unstable set U (cf. Eq. 14). An argument against its use is
q̃˙ = q̃ ⊗ p(Ω) − p(Ω) ⊗ q̃ − p(b̃ + kP s̃ṽ) ⊗ q̃ . (50)
2 that, in practice, such situations will only occur due to extreme
There is a fifteen year history of using the quaternion rep- transients that would overwhelm the bounded correction term
resentation and Lyapunov design methodology for filtering ωq in any case, and cause the numerical implementation of
on SO(3) (for example cf. [9], [30], [32]). To the authors the filter to deal with a discontinuous argument. In practice,
knowledge the Lyapunov analysis in all cases has been based it is an issue of little significance since the filter will general
around the cost function work sufficiently well to avoid any issues with the unstable
Φ(q̃) = (|s̃| − 1)2 + |ṽ|2 . set U. For s̃ → 1, corresponding to θ = 0, the correction term
ωq scales to a factor of 1/2 the correction term ω. A simple
Due to the unit norm condition it is straightforward to show scaling factor like this is compensated for the in choice of filter
that gains kP and kI and makes no difference to the performance
Φ(q̃) = 2(1 − |s̃|) = 2 (1 − | cos(θ/2)|) of the filter.
The cost function proposed in this paper is Etr = (1 −
cos(θ)) (Eq. 3). It is straightforward to see that the quadratic R EFERENCES
approximation of both cost functions around the point θ = 0 is [1] J. Vaganay, M. Aldon, and A. Fournier, “Mobile robot attitude estimation
the quadratic θ2 /2. The quaternion cost function Φ, however, by fusion of inertial data,” in Proceedigns of the IEEE Internation
Conference on Robotics and Automation ICRA, vol. 1, 1993, pp. 277–
is non-differentiable at the point θ = ±π while the cost 282.
tr(I − R̃) has a smooth local maxima at this point. To the [2] E. Foxlin, M. Harrington, and Y. Altshuler, “Miniature 6-DOF inertial
authors understanding, all quaternion filters in the published system for tracking HMD,” in Proceedings of the SPIE, vol. 3362,
Orlando, Florida, 1998, pp. 214–228.
literature have a similar flavour that dates back to the seminal [3] J. Balaram, “Kinematic observers for articulated robers,” in Proceddings
work of Salcudean [32]. The closest published work to that of the IEEE International Conference on Robotics and Automation,
undertaken in the present paper was published by Thienel in 2000, pp. 2597–2604.
[4] J. L. Marins, X. Yun, E. R. Backmann, R. B. McGhee, and M. Zyda, “An
her doctoral dissertation [44] and transactions paper [30]. The extended kalman filter for quaternion-based orientation estimation using
filter considered by Thienel et al. is given by marg sensors,” in IEEE/RSJ International Conference on Intelligent
Robots and Systems, 2001, pp. 2003–2011.
1
q̂˙ = q̂ ⊗ p(R̃(Ωy − b̂ + kP sgn(s̃)ṽ)) (51a) [5] E. Lefferts, F. Markley, and M. Shuster, “Kalman filtering for spacecraft
2 attitude estimation,” AIAA Journal of Guidance, Control and Navigation,
˙ vol. 5, no. 5, pp. 417–429, September 1982.
b̂ = −kI sgn(s̃)ṽ (51b) [6] B. Barshan and H. Durrant-Whyte, “Inertial navigation systems for
mobile robots,” IEEE Transactions on Robotics and Automation, vol. 44,
The sgn(s̃) term enters naturally in the filter design from the no. 4, pp. 751–760, 1995.
d d
differential, dt |s̃| = sgn(s̃) dt s̃, of the absolute value term [7] M. Zimmerman and W. Sulzer, “High bandwidth orientation measure-
ment and control ased on complementary filtering,” in Proceedings of
in the cost function Φ, during the Lyapunov design process. Symposium on Roboitcs and Control, SYROCO, Vienna, Austria, 1991.
Consider the observer obtained by replacing sgn(s̃) in Eqn’s 51 [8] A.-J. Baerveldt and R. Klang, “A low-cost and low-weight attitude
by 2s̃. Note that with this substitution, Eq. 51b is transformed estimation system for an autonomous helicopter,” Intelligent Engineering
Systems, 1997.
into Eq. 46b. To show that Eq. 51a transforms to Eq. 46a it is [9] B. Vik and T. Fossen, “A nonlinear observer for gps and ins integration,”
sufficient to show that R̃ṽ = ṽ. This is straightforward from in Proceedings of teh IEEE Conference on Decisioin and Control,
Orlando, Florida, USA, December 2001, pp. 2956–2961.
2s̃R̃ṽ = R̃(2s̃ṽ) = R̃vex(Pa (R̃)) [10] H. Rehbinder and X. Hu, “Nonlinear state estimation for rigid body
motion with low-pass sensors,” Systems and Control Letters, vol. 40,
= vex(R̃Pa (R̃)R̃T ) = vex(Pa (R̃)) = 2s̃ṽ no. 3, pp. 183–190, 2000.
IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. XX, NO. XX, MONTH YEAR 16

[11] E. R. Bachmann, J. L. Marins, M. J. Zyda, R. B. Mcghee, and X. Yun, [36] T. Hamel and R. Mahony, “Attitude estimation on SO(3) based on
“An extended kalman filter for quaternion-based orientation estimation direct inertial measurements,” in International Conference on Robotics
using MARG sensors,” 2001. and Automation, ICRA2006, 2006.
[12] J.-M. Pflimlin, T. Hamel, P. Soueeres, and N. Metni, “Nonlinear attitude [37] S. Bonnabel and P. Rouchon, Control and Observer Design for Non-
and gyroscoples bias estimation for a VTOL UAV,” in Proceedings of linear Finite and Infinite Dimensional Systems, ser. Lecture Notes in
the IFAC world congress, 2005. Control and Information Sciences. Springer-Verlag, 2005, vol. 322, ch.
[13] H. Rehbinder and X. Hu, “Drift-free attitude estimation for accelerated On Invariant Observers, pp. 53–67.
rigid bodies,” Automatica, 2004. [38] S. Bonnabel, P. Martin, and P. Rouchon, “A non-linear symmetry-
[14] N. Metni, J.-M. Pflimlin, T. Hamel, and P. Soueeres, “Attitude and gyro preserving observer for velocity-aided inertial navigation,” in American
bias estimation for a flying UAV,” in IEEE/RSJ International Conference Control Conference, Proceedings of the, June 2006, pp. 2910–2914.
on Intelligent Robots and Systems, August 2005, pp. 295–301. [39] R. Murray, Z. Li, and S. Sastry, A mathematical introduction to robotic
[15] ——, “Attitude and gyro bias estimation for a VTOL UAV,” in Control manipulation. CRC Press, 1994.
Engineering Practice, 2006, p. to appear. [40] H. Khalil, Nonlinear Systems 2nd edition. New Jersey: Prentice Hall,
[16] J. Lobo and J. Dias, “Vision and inertial sensor cooperation using gravity 1996.
as a vertical reference,” IEEE Transactions on Pattern Analysis and [41] L. Lipera, J. Colbourne, M. Tischler, M. Mansur, M. Rotkowitz, and
Machine Intelligence, vol. 25, no. 12, pp. 1597–1608, Dec. 2003. P. Patangui, “The micro craft istar micro-air vehicle: Control system
[17] H. Rehbinder and B. Ghosh, “Pose estimation using line-based dynamic design and testing,” in Proc. of the 57th Annual Forum of the American
vision and inertial sensors,” IEEE Transactions on Automatic Control, Helicopter Society, Washington DC, USA, May 2001, pp. 1–11.
vol. 48, no. 2, pp. 186–199, Feb. 2003. [42] J. Fleming, T. Jones, P. Gelhausen, and D. Enns, “Improving control
[18] J.-H. Kim and S. Sukkarieh, “Airborne simultaneous localisation and system effectiveness for ducted fan vtol uavs operating in crosswinds,”
map building,” in Proceedings of the IEEE International Conference on in Proc. of the 2nd “Unmanned Unlimited” System. San Diego, USA:
Robotics and Automation, Taipei, Taiwan, September 2003, pp. 406–411. AIAA, September 2003.
[19] P. Corke, J. Dias, M. Vincze, and J. Lobo, “Integration of vision and [43] R. G. Brown and P. Y. C. Hwang, Introduction to Random Signals and
inertial sensors,” in Proceedings of the IEEE International Conference Applied Kalman Filtering, 2nd ed. New York, NY: John Wiley and
on Robotics and Automation, ICRA ’04., ser. W-M04, Barcellona, Spain, Sons, 1992.
April 2004, full day Workshop. [44] J. Thienel, “Nonlinear observer/controller dsigns for spacecraft attitude
[20] R. Phillips and G. Schmidt, System Implications and Innovative Ap- control systems with uncalibrated gyros,” PhD, Faculty of the Graduate
plications of Satellite Navigation, ser. AGARD Lecture Series 207. School of the University of Maryland, Dep. Aerospace Engineering,,
help@sti.nasa.gov: NASA Center for Aerospace Information, 2004.
1996, vol. 207, ch. GPS/INS Integration, pp. 0.1–0.18.
[21] D. Gebre-Egziabher, R. Hayward, and J. Powell, “Design of multi-sensor
attitude determination systems,” IEEE Transactions on Aerospace and
Electronic Systems, vol. 40, no. 2, pp. 627–649, April 2004. Robert Mahony is currently a reader in the De-
[22] J. L. Crassidis, F. L. Markley, and Y. Cheng, “Nonlinear attitude filtering partment of Engineering at the Australian National
methods,” Journal of Guidance, Control,and Dynamics, vol. 30, no. 1, University. He received a PhD in 1995 (systems
pp. 12–28, January 2007. engineering) and a BSc in 1989 (applied mathemat-
[23] M. Jun, S. Roumeliotis, and G. Sukhatme, “State estimation of an ics and geology) both from the Australian National
autonomous helicopter using Kalman filtering,” in Proc. 1999 IEEE/RSJ University. He worked as a marine seismic geo-
International Conference on Robots and Systems (IROS 99), 1999. physicist and an industrial research scientist before
[24] G. S. Sukhatme and S. I. Roumeliotis, “State estimation via sensor completing a two year postdoctoral fellowship in
modeling for helicopter control using an indirect kalman filter,” 1999. France and a two year Logan Fellowship at Monash
[25] G. S. Sukhatme, G. Buskey, J. M. Roberts, P. I. Corke, and S. Sari- University in Australia. He has held his post at ANU
palli, “A tale of two helicopters,” in IEEE/RSJ, International Robots since 2001. His research interests are in non-linear
and Systems,, Los Vegas, USA, Oct. 2003, pp. 805–810, http://www- control theory with applications in robotics, geometric optimisation techniques
robotics.usc.edu/ srik/papers/iros2003.pdf. and learning theory.
[26] J. M. Roberts, P. I. Corke, and G. Buskey, “Low-cost flight control
system for small autonomous helicopter,” in Australian Conference on
Robotics and Automation, Auckland, 27-29 Novembre, 2002, pp. 71–76.
[27] P. Corke, “An inertial and visual sensing system for a small autonomous Tarek Hamel received his Bachelor of Engineering
helicopter,” J. Robotic Systems, vol. 21, no. 2, pp. 43–51, February 2004. from the University of Annaba, Algeria, in 1991.
[28] G. Creamer, “Spacecraft attitude determination using gyros and quater- He received his PhD in Robotics in 1995 from the
nion measurements,” The Journal of Astronautical Sciences, vol. 44, University of technology Compiègne (UTC), France.
no. 3, pp. 357–371, July 1996. After two years as a research assistant at the UTC,
[29] D. Bayard, “Fast observers for spacecraft pointing control,” in Proceed- he joined the “Centre d’Etudes de Mècanique d’Iles
ings of the IEEE Conference on Decision and Control, Tampa, Florida, de France” in 1997 as an associate professor. Since
USA, 1998, pp. 4702–4707. 2003, he has been a Professor at the I3S UNSA-
[30] J. Thienel and R. M. Sanner, “A coupled nonlinear spacecraft attitude CNRS laboratory of the University of Nice-Sophia
controller and observer with an unknow constant gyro bias and gyro Antipolis, France. His research interests include non-
noise,” IEEE Transactions on Automatic Control, vol. 48, no. 11, pp. linear control theory, estimation and vision-based
2011 – 2015, Nov. 2003. control with applications to Unmanned Aerial Vehicles and Mobile Robots.
[31] G.-F. Ma and X.-Y. Jiang, “Spacecraft attitude estimation from vector
measurements using particle filter,” in Proceedings of the fourth Inter-
nation conference on Machine Learning and Cybernetics, Guangzhou,
China, August 2005, pp. 682–687.
Jean-Michel Pflimlin graduated from Supaero, the
[32] S. Salcudean, “A globally convergent angular velocity observer for rigid
French Engineering school in Aeronautics and Space
body motion,” IEEE Trans. Auto. Cont., vol. 36, no. 12, pp. 1493–1497,
in 2003. He conducted his Ph.D. research at the Lab-
Dec. 1991.
oratory for Analysis and Architecture of Systems,
[33] O. Egland and J. Godhaven, “Passivity-based adaptive attitude control
LAAS-CNRS, in Toulouse, France and received the
of a rigid spacecraft,” IEEE Transactions on Automatic Control, vol. 39,
PhD degree in automatic control from Supaero in
pp. 842–846, April 1994.
2006. He is currently working at Navigation de-
[34] A. Tayebi and S. McGilvray, “Attitude stabilization of a four-rotor aerial
partment of Dassault Aviation in Saint Cloud, Paris.
robot: Theory and experiments,” To appear in IEEE Transactions on
His research interests include nonlinear control and
Control Systems Technology, 2006.
filtering, advanced navigation systems and their ap-
[35] R. Mahony, T. Hamel, and J.-M. Pflimlin, “Complimentary filter design
plications to Unmanned Aerial Vehicles.
on the special orthogonal group SO(3),” in Proceedings of the IEEE
Conference on Decision and Control, CDC05. Seville, Spain: Institue
of Electrical and Electronic Engineers, December 2005.

You might also like