# ON A GENERALIZATION OF TUPPER’S FORMULA FOR $m$ COLOURS AND $n$ DIMENSIONS

Sai Teja Somu  Vidyanshu Mishra

###### Abstract

Tupper’s formula
$\frac{1}{2}<\bigg{\lfloor}\bmod\bigg{(}\lfloor\frac{y}{17}\rfloor
2^{-17\lfloor x\rfloor-\bmod(\lfloor y\rfloor,17)},2\bigg{)}\bigg{\rfloor}$
has an interesting property that for any monochrome image that can be
represented by pixels in a two dimensional array of dimensions $106\times 17$,
there exists a natural number $k$ such that the graph of the equation in the
range $0\leq x<106$ and $k\leq y<k+17$, is that image. In this paper, we give
a generalization for $m$ colours and $n$ dimensions. We give $m$ formulae
consisting of $n$ free variables, with the property that, for any $n$
dimensional object of $m$ colours $C_{1},\cdots,C_{m}$, that can be
represented by hypervoxels(multidimensional analogue of pixel) in a $n$
dimensional array of dimensions $A_{1}\times\cdots\times A_{n}$, there exists
a natural number $k$ such that, when the first formula is graphed using colour
$C_{1}$, second formula is graphed using colour $C_{2}$,$\cdots$, $m$th
formula is graphed using colour $C_{m}$ in the range $0\leq
x_{1}<A_{1}$,$0\leq x_{2}<A_{2},\cdots,0\leq x_{n-1}<A_{n-1},k\leq
x_{n}<k+A_{n}$, the union of all graphs is that $n$-dimensional object.

##  1 Introduction

In [2], Tupper introduced a formula

$\frac{1}{2}<\bigg{\lfloor}\bmod\bigg{(}\big{\lfloor}\frac{y}{17}\big{\rfloor}2^{-17\lfloor
x\rfloor-\bmod(\lfloor y\rfloor,17)},2\bigg{)}\bigg{\rfloor},$ (1)

which has an interesting property that for any monochrome image that can be
represented in pixels in a two dimensional array of dimensions $106\times 17$,
there exists a natural number $k$ such that the graph of the equation for
$0\leq x<106$ and $k\leq y<k+17$ is that image( see Lemma 1 of [3] for a
proof). Since the formula given by Tupper can be drawn in a $106\times 17$
grid, there exists a value of $k$ for which the graph of the formula in $0\leq
x<106$ and $k\leq y<k+17$ is an image of Tupper’s formula. While graphing (1)
in Figure 1, we are painting all ordered pairs $(x,y)$ that satisfy the
inequality with black.

Figure 1: Graph of (1) in the range $0\leq x<106$ and $k\leq y<k+17$ for a
known value of $k$

Now a question arises, can we generalize this property for images consisting
of multiple colours by considering multiple formulae? There is a
generalization. Suppose we have to graph multiple formulae (2), (3), (4),

$\displaystyle\frac{1}{2}<\bigg{\lfloor}\bmod\bigg{(}\left\lfloor\frac{y}{68}\right\rfloor
2^{-68^{2}\lfloor x\rfloor-68\bmod(\lfloor
y\rfloor,68)-1},2\bigg{)}\bigg{\rfloor},$ (2)
$\displaystyle\frac{1}{2}<\bigg{\lfloor}\bmod\bigg{(}\left\lfloor\frac{y}{68}\right\rfloor
2^{-68^{2}\lfloor x\rfloor-68\bmod(\lfloor
y\rfloor,68)-2},2\bigg{)}\bigg{\rfloor},$ (3)
$\displaystyle\frac{1}{2}<\bigg{\lfloor}\bmod\bigg{(}\left\lfloor\frac{y}{68}\right\rfloor
2^{-68^{2}\lfloor x\rfloor-68\bmod(\lfloor
y\rfloor,68)-3},2\bigg{)}\bigg{\rfloor},$ (4)

in the range $0\leq x<50$ and $k\leq y<k+15$ such that $(x,y)$ satisfying
inequality (2) will be painted with the colour blue, $(x,y)$ satisfying (3)
will be painted with the colour red, and $(x,y)$ satisfying inequality (4)
will be painted with the colour green then for any image consisting of three
colours red, blue, green, there exists a natural number $k$ such that the
union of the three graphs (2), (3) and (4) will be that image. For instance,
there exist natural numbers $k_{1},k_{2}$ such that union of graphs of (2),
(3), (4) in $0\leq x<50$ and $k_{1}\leq y<k_{1}+15$ is Figure 2 and union of
graphs of (2), (3), (4) in $0\leq x<50$ and $k_{2}\leq y<k_{2}+15$ is Figure
3.

Figure 2: Graph of (2) in blue, (3) in red, (4) in green in the range $0\leq
x<50$ and $k_{1}\leq y<k_{1}+15$ for a determinable value of $k_{1}$ Figure 3:
Graph of (2) in blue, (3) in red, (4) in green in the range $0\leq x<50$ and
$k_{2}\leq y<k_{2}+15$ for a determinable value of $k_{2}$

We prove this generalization for $m$ colours, and $n$ dimensions in the form
of this theorem.

######  Theorem 1.

For any given positive integers $n\geq 2,m,A_{1},A_{2},\cdots,A_{n}$ let
$R=A_{1}+\cdots+A_{n}+m$ and for $1\leq i\leq m$ define

$f_{i}(x_{1},\cdots,x_{n})=\bigg{\lfloor}\bmod\bigg{(}\bigg{\lfloor}\frac{x_{n}}{R}\bigg{\rfloor}2^{-R^{n}\lfloor
x_{1}\rfloor-R^{n-1}\lfloor x_{2}\rfloor-\cdots-R^{2}\lfloor
x_{n-1}\rfloor-R\bmod(\lfloor x_{n}\rfloor,R)-i},2\bigg{)}\bigg{\rfloor},$

then for any $m$ pairwise disjoint subsets $S_{1},\cdots,S_{m}$ of
$S=[0,A_{1})\times\cdots\times[0,A_{n})\cap\mathbb{Z}^{n},$ there exists a
natural number $k$ given by

$k=R\sum_{j=1}^{m}\sum_{(m_{1},\cdots,m_{n})\in
S_{j}}2^{R^{n}m_{1}+R^{n-1}m_{2}+\cdots+Rm_{n}+j}$ (5)

such that

$\\{(x_{1},x_{2},\cdots,x_{n}):\frac{1}{2}<f_{i}(x_{1},\cdots,x_{n})\text{ and
}(x_{1},\cdots,x_{n-1},x_{n}-k)\in[0,A_{1})\times\cdots\times[0,A_{n})\\}\\\
=\\{(x_{1},x_{2},\cdots,x_{n}):(\lfloor x_{1}\rfloor,\lfloor
x_{2}\rfloor,\cdots,\lfloor x_{n-1}\rfloor,\lfloor x_{n}-k\rfloor)\in
S_{i}\\},$

for all $1\leq i\leq m$.

Formulae (2), (3), and (4) are special cases of Theorem 1 when $A_{1}=50,$
$A_{2}=15$, $m=3$, $n=2$. For any $n$ dimensional object of $m$ colours
$C_{1},\cdots,C_{m}$, that can be represented by hypervoxels in a $n$
dimensional array of dimensions $A_{1}\times\cdots\times A_{n}$, let $S_{1}$
be the set of tuples corresponding to colour $C_{1}$ for that object,
$\cdots$, let $S_{m}$ be the set of tuples corresponding to colour $C_{m}$ for
that object. Then for the value of $k$ given by (5), when the graph of
$\frac{1}{2}<f_{1}$ is coloured using colour $C_{1}$, the graph of
$\frac{1}{2}<f_{2}$ is coloured using colour $C_{2}$, $\cdots$, the graph of
$\frac{1}{2}<f_{m}$ is coloured using colour $C_{m}$ in the range $0\leq
x_{1}<A_{1},\cdots,0\leq x_{n-1}<A_{n-1},k\leq x_{n}<k+A_{n}$ we get that
$n$-dimensional object.

##  2 Proof of Theorem 1

We will prove Theorem 1 using some lemmas.

######  Lemma 2.

For $k$ given by (5), if $x_{n}-k\in[0,A_{n})$ then

$\bigg{\lfloor}\frac{x_{n}}{R}\bigg{\rfloor}=\sum_{j=1}^{m}\sum_{(m_{1},\cdots,m_{n})\in
S_{j}}2^{R^{n}m_{1}+R^{n-1}m_{2}+\cdots+Rm_{n}+j},$

and

$\bmod(\lfloor x_{n}\rfloor,R)=\lfloor x_{n}-k\rfloor.$

###### Proof.

As $R=A_{1}+\cdots+A_{n}+m$, we have $R>A_{n}$ and as $x_{n}-k\in[0,A_{n})$ we
have $0\leq\frac{x_{n}-k}{R}<1$. As
$\frac{x_{n}}{R}=\frac{k}{R}+\frac{x_{n}-k}{R}$, as $\frac{k}{R}\in\mathbb{Z}$
and $\frac{x_{n}-k}{R}\in[0,1)$ we have

$\bigg{\lfloor}\frac{x_{n}}{R}\bigg{\rfloor}=\frac{k}{R}=\sum_{j=1}^{m}\sum_{(m_{1},\cdots,m_{n})\in
S_{j}}2^{R^{n}m_{1}+R^{n-1}m_{2}+\cdots+Rm_{n}+j}.$

For the second part as $\lfloor x_{n}\rfloor=\lfloor x_{n}-k\rfloor+k$, and
$k$ is a multiple of $R$ and $0\leq\lfloor x_{n}-k\rfloor<A_{n}<R$, we have

$\bmod(\lfloor x_{n}\rfloor,R)=\lfloor x_{n}-k\rfloor.$

∎

######  Lemma 3.

If $\alpha=\sum_{i=1}^{k}2^{n_{i}}$ for distinct integers $n_{1},\cdots,n_{k}$
then

$\frac{1}{2}<\lfloor\bmod(\alpha,2)\rfloor\text{ if and only if
}0\in\\{n_{1},\cdots,n_{k}\\}.$

###### Proof.

Let $N$ be the subset of $A=\\{n_{1},\cdots,n_{k}\\}$ consisting of all
negative integers of $A$, $P$ be the subset of $A$ consisting of all positive
integers of $A$. Note that

$\alpha=\sum_{a\in N}2^{a}+\sum_{a\in P}2^{a}+\epsilon,$

where $\epsilon=1$, if $0\in A$ and $\epsilon=0$ if $0\notin A$. As
$\sum_{a\in P}2^{a}$ is even and $0\leq\sum_{a\in N}2^{a}<1$ we have
$\bmod(\alpha,2)=\sum_{a\in N}2^{a}+\epsilon$. Now as, $0\leq\sum_{a\in
N}2^{a}<1$ we have $\lfloor\bmod(\alpha,2)\rfloor=\epsilon$. Therefore,
$\lfloor\bmod(\alpha,2)\rfloor=1>\frac{1}{2}$ if
$0\in\\{n_{1},\cdots,n_{k}\\}$ and
$\lfloor\bmod(\alpha,2)\rfloor=0\leq\frac{1}{2}$ if
$0\notin\\{n_{1},\cdots,n_{k}\\}$ which implies
$\frac{1}{2}<\lfloor\bmod(\alpha,2)\rfloor$ if and only if
$0\in\\{n_{1},\cdots,n_{k}\\}$. ∎

Now we are ready to prove Theorem 1.

###### Proof.

Let $(x_{1},\cdots,x_{n-1},x_{n})$ be a tuple such that
$(x_{1},\cdots,x_{n-1},x_{n}-k)\in[0,A_{1})\times\cdots\times[0,A_{n})$. As
$x_{n}-k\in[0,A_{n})$, from Lemma 2, we have

$\bigg{\lfloor}\frac{x_{n}}{R}\bigg{\rfloor}=\sum_{j=1}^{m}\sum_{(m_{1},\cdots,m_{n})\in
S_{j}}2^{R^{n}m_{1}+R^{n-1}m_{2}+\cdots+Rm_{n}+j},$ (6)

and

$\bmod(\lfloor x_{n}\rfloor,R)=\lfloor x_{n}-k\rfloor.$ (7)

Now using (6) and (7) for any $1\leq i\leq m$ we have

$\displaystyle f_{i}(x_{1},\cdots,x_{n})$
$\displaystyle=\bigg{\lfloor}\bmod\bigg{(}\bigg{\lfloor}\frac{x_{n}}{R}\bigg{\rfloor}2^{-R^{n}\lfloor
x_{1}\rfloor-R^{n-1}\lfloor x_{2}\rfloor-\cdots-R^{2}\lfloor
x_{n-1}\rfloor-R\bmod(\lfloor x_{n}\rfloor,R)-i},2\bigg{)}\bigg{\rfloor},$
$\displaystyle=\bigg{\lfloor}\bmod\bigg{(}\bigg{\lfloor}\frac{x_{n}}{R}\bigg{\rfloor}2^{-R^{n}\lfloor
x_{1}\rfloor-R^{n-1}\lfloor x_{2}\rfloor-\cdots-R^{2}\lfloor
x_{n-1}\rfloor-R\lfloor x_{n}-k\rfloor-i},2\bigg{)}\bigg{\rfloor},$
$\displaystyle=\bigg{\lfloor}\bmod\bigg{(}\sum_{j=1}^{m}\sum_{(m_{1},\cdots,m_{n})\in
S_{j}}2^{R^{n}(m_{1}-\lfloor x_{1}\rfloor)+R^{n-1}(m_{2}-\lfloor
x_{2}\rfloor)+\cdots+R(m_{n}-\lfloor
x_{n}-k\rfloor)+(j-i)},2\bigg{)}\bigg{\rfloor}.$

Therefore,

$f_{i}(x_{1},\cdots,x_{n})=\bigg{\lfloor}\bmod\bigg{(}\sum_{j=1}^{m}\sum_{(m_{1},\cdots,m_{n})\in
S_{j}}2^{R^{n}(m_{1}-\lfloor x_{1}\rfloor)+R^{n-1}(m_{2}-\lfloor
x_{2}\rfloor)+\cdots+R(m_{n}-\lfloor
x_{n}-k\rfloor)+(j-i)},2\bigg{)}\bigg{\rfloor}.$

Notice that in the above equation $R^{n}(m_{1}-\lfloor
x_{1}\rfloor)+R^{n-1}(m_{2}-\lfloor x_{2}\rfloor)+\cdots+R(m_{n}-\lfloor
x_{n}-k\rfloor)+(j-i)$ are distinct integers for different tuples
$(m_{1},m_{2},\cdots,m_{n})\in S_{j}$ as $R>m_{1},m_{2},\cdots,m_{n},j$. So
from Lemma 3, $\frac{1}{2}<f_{i}(x_{1},\cdots,x_{n})$ if and only if
$R^{n}(m_{1}-\lfloor x_{1}\rfloor)+R^{n-1}(m_{2}-\lfloor
x_{2}\rfloor)+\cdots+R(m_{n}-\lfloor x_{n}-k\rfloor)+(j-i)=0$ for some
$(m_{1},\cdots,m_{n})\in S_{j}$ and as $R^{n}(m_{1}-\lfloor
x_{1}\rfloor)+R^{n-1}(m_{2}-\lfloor x_{2}\rfloor)+\cdots+R(m_{n}-\lfloor
x_{n}-k\rfloor)+(j-i)=0$ if and only if $\lfloor x_{1}\rfloor=m_{1}$, $\lfloor
x_{2}\rfloor=m_{2}$,$\cdots$,$\lfloor x_{n-1}\rfloor=m_{n-1}$ and $\lfloor
x_{n}-k\rfloor=m_{n}$, $j=i$ we have $\frac{1}{2}<f_{i}(x_{1},\cdots,x_{n})$
if and only if $(\lfloor x_{1}\rfloor,\cdots,\lfloor x_{n-1}\rfloor,\lfloor
x_{n}-k\rfloor)\in S_{i}$. Therefore, for all $1\leq i\leq m$ we have,

$\\{(x_{1},x_{2},\cdots,x_{n}):\frac{1}{2}<f_{i}(x_{1},\cdots,x_{n})\text{ and
}(x_{1},\cdots,x_{n-1},x_{n}-k)\in[0,A_{1})\times\cdots\times[0,A_{n})\\}\\\
=\\{(x_{1},x_{2},\cdots,x_{n}):(\lfloor x_{1}\rfloor,\lfloor
x_{2}\rfloor,\cdots,\lfloor x_{n-1}\rfloor,\lfloor x_{n}-k\rfloor)\in
S_{i}\\}.$

∎

## References

  * [1] B. Haran and M. Parker, The ‘everything’ formula- numberphile..
  * [2] Jeff Tupper, Reliable two-dimensional graphing methods for mathematical formulae with two variables, Proceedings of the 28th Annual Conference on Computer Graphics and Interactive Techniques (New York, NY, USA), SIG-GRAPH’ 01, ACM, 2001, pp. 77-86.
  * [3] M. Fortman, K. Kupiec, M. Rawlings, E. Trevino, Walking on rational numbers and a self-referential formula, Elemente der Mathematik 73(2018),no. 4, 161-169.


# Attitude Tracking for Rigid Bodies Using Vector and Biased Gyro
Measurements∗

Eduardo Espíndola and Yu Tang ∗ This work was supported in part by CONACyT
under grant 253677 and PAPIIT-UNAM IN112421, and carried out in the National
Laboratory of Automotive and Aerospace Engineering LN-INGEA.E. Espíndola
(e-mail<EMAIL_ADDRESS>and Y. Tang (corresponding author,
e-mail<EMAIL_ADDRESS>are with the Faculty of Engineering, National Autonomous
University of Mexico, Mexico City, 04510 México.

###### Abstract

The rigid-body attitude tracking using vector and biased gyro measurements
with unknown inertia matrix is studied in this note. First, a gyro-bias
observer with global exponential stability is designed. Then, an attitude
tracking controller based on this observer is devised, ensuring almost global
asymptotic stability and almost semiglobal exponential stability. A separation
property of the combined observer-controller is proved. Lastly, an adaptive
attitude tracking controller relying on a modified gyro-bias observer and with
no over-parametrization is developed to deal with the unknown inertia matrix.
The proposed control schemes require neither an explicit attitude
representation nor any attitude estimation, but only the measurement of at
least two non-collinear known inertial reference vectors and biased gyro rate,
which can be obtained by common low-cost IMU sensors. Simulations are included
to illustrate the proposed adaptive controller under noisy measurements.

###### Index Terms:

Adaptive control, attitude tracking, gyro bias estimation, vector
measurements.

##  I Introduction

The attitude control for rigid bodies has been studied for decades under the
assumption that attitude measurements are available [1, 2, 3]. In practice,
the attitude is commonly estimated from vector measurements provided by
inertial measurement units (IMUs) (see, e.g., [4, 5, 6, 7]). However, use of
attitude estimation in closed loop with a controller must be analyzed to
ensure overall stability. Several approaches have been proposed to address
attitude control using vector measurements since the pioneering work [8],
which can be categorized as direct and indirect. In the direct approach, no
representation of the attitude and therefore no estimation of the attitude is
needed, thus, inertial vector measurements are used directly in the control
synthesis [8, 9, 10]. In the indirect approach, on the other hand, the
attitude is estimated for control purposes [11, 12, 13, 14]. A combined
approach is presented in [15]. The direct approach has advantages that it
simplifies the stability analysis, and most importantly reduces the undesired
equilibria introduced by the attitude observer in the closed loop. For the
attitude stabilization problem, vector measurements are sufficient [8, 13].
When the attitude tracking is considered, gyro-rate measurements are also
needed [9, 15], and the gyro bias must be corrected [12, 14]. The problem
becomes even more complicated if in addition the inertia matrix is unknown,
thus the gyro bias and the inertia matrix must be estimated simultaneously,
arising a nonlinear parameterization issue. To overcome the nonlinear
parameterization, over-parameterization is often employed (see, e.g., [12, 14]
and the references cited therein).

The rigid-body attitude tracking using vector and biased gyro measurements
with unknown inertia matrix is studied in this note. The organization and
contributions are stated as follows. A globally exponentially stable gyro-bias
observer is designed in Section III. In Section IV, two attitude tracking
controllers, nonadaptive and adaptive, using vector and biased gyro
measurements, are designed using the direct approach. The attitude tracking
problem is formulated as an alignment problem between the vector measurements
and their desired values, with the alignment errors defined by the inner
product and the cross-product between them. The closed-loop system contains,
in addition to a set of undesired equilibria, the desired attitude as its
equilibrium. By exploiting the relationship between these error variables near
the undesired equilibria, a strict Lyapunov function is proposed, which allows
achieving almost global asymptotic stability (AGAS) and almost semiglobal
exponential stability (ASGES) of the desired equilibrium in contrast to only
AGAS in [8, 12, 13, 9]. Moreover, the proposed gyro-bias observer allows to
prove a separation property in the combined observer and the nonadaptive
controller. When the inertia matrix is unknown, a modified version of the
gyro-bias observer avoids over-parametrization in the adaptive controller, in
contrast with those adaptive controllers in [12, 14]. In Section V, the
proposed adaptive controller is simulated under noisy measurements. Finally,
Section VI draws the conclusions. Appendix A gives the proof of some technical
results.

##  II Preliminaries

###  II-A Notations

The vector norm is denoted by $\|x\|$ $=$ $(x^{T}x)^{1/2}$ for
$x\in\mathbb{R}^{n}$, while for a matrix $A\in\mathbb{R}^{n\times n}$, its
norm is $\|A\|=\lambda_{\max}^{1/2}(A^{T}A)$. If in addition $A$ is symmetric,
then $A=A^{T}>0$ indicates a positive definite matrix with $A^{T}$ denoting
its transpose, and $\lambda_{\max}(A)$ and $\lambda_{\min}(A)$ are its maximum
and minimum eigenvalues, respectively. $I_{n}$ denotes the identity matrix of
$n\times n$, $0_{n\times m}$ a zero matrix of $n\times m$.
$S(\cdot)\in\mathbb{R}^{3\times 3}$ is the cross-product operator
$S(u)v=u\times v$, which satisfies $S(u)v=-S(v)u$,
$S(u)S(v)-S(v)S(u)=S(S(u)v)$, and $\|S(u)v\|\leq\|u\|\|v\|$, $\forall
u,v\in\mathbb{R}^{3}$. A unit sphere of dimension $n-1$ embedded in
$\mathbb{R}^{n}$ is denoted by
$\mathcal{S}^{n-1}=\\{x\in\mathbb{R}^{n}|x^{T}x=1\\}$. A closed unit ball is
expressed as $\mathcal{B}^{n-1}=\\{x\in\mathbb{R}^{n}|x^{T}x\leq 1\\}$.

###  II-B Rotational Kinematics and Dynamics

The attitude of a rigid body is represented by a rotation matrix $R\in SO(3)$
that transforms the body-fixed frame into an inertial frame. Commonly, unit
quaternions $q=\left[q_{0},\ q^{T}_{v}\right]^{T}\in\mathcal{S}^{3}$ are
employed to represent the attitude, where $q_{0}\in[-1,1]$ and
$q_{v}\in\mathcal{B}^{2}$ are the scalar part and vector part of the
quaternion, respectively, and $\mathcal{S}^{3}$ denotes the quaternion group
with $\hat{1}=\left[1,0_{1\times 3}\right]^{T}$ as the identity quaternion. A
rotation matrix $R$ is related to a unit quaternion $q$ through Rodriguez
formula

$R(q)=I_{3}+2q_{0}S(q_{v})+2S^{2}(q_{v}).$ (1)

The rotational kinematics and dynamics of a rigid body are

$\dot{R}=RS\left(\omega\right),$ (2) $M\dot{\omega}=S(M\omega)\omega+\tau,$
(3)

where $\omega\in\mathbb{R}^{3}$ and $\tau\in\mathbb{R}^{3}$ are the angular
velocity and the applied torque, respectively.
$M=[m_{ij}]_{i,j=1}^{3,3}=M^{T}>0$ is the inertia matrix with lower and upper
bands $\underline{m}I_{3}\leq M\leq\overline{m}I_{3}$, where
$\overline{m}\vcentcolon=\lambda_{\max}(M)$, and
$\underline{m}\vcentcolon=\lambda_{\min}(M)$. All are expressed in the body
frame.

###  II-C Measurements

It is assumed that $n\geq 2$ reference vectors in the inertia frame
$r_{i}\in\mathcal{S}^{2}$, $i=1,2,...,n$ are known and their measurements in
the body frame $v_{i}\in\mathcal{S}^{2}$, are accessible for all $t\geq 0$.
These unit vectors are related through

$\displaystyle v_{i}=R^{T}r_{i},\quad i=1,2,\cdots,n.$ (4)

Furthermore, a biased gyro-rate measurement $\omega_{g}$

$\omega_{g}=\omega+b,$ (5)

is available, where $b\in\mathbb{R}^{3}$ is the constant gyro bias.

The following assumptions are made.

  * •

Assumption A1: Among the $n$ inertial reference vectors $r_{i}$, there are at
least two noncollinear vectors.

  * •

Assumption A2: Gyro bias is a constant unknown vector with a known bound,
i.e., $\|b\|\leq\theta_{b}$, with $\theta_{b}$ known.

Note that, for each pair of noncollinear vector measurements
$v_{1},v_{2}\in\mathcal{S}^{2}$, a third virtual vector measurement
$v_{3}=S(v_{1})v_{2}/\|S(v_{1})v_{2}\|$ can be obtained, which satisfies (4)
with $r_{3}=S(r_{1})r_{2}/\|S(r_{1})r_{2}\|$.

##  III Gyro Bias Observer

The estimated angular velocity $\hat{\omega}:=\omega_{g}-\hat{b}$ can be
obtained by the gyro-rate measurement $\omega_{g}$ and the gyro-bias estimate
$\hat{b}$, which is given by the following observer

$\displaystyle\dot{\bar{b}}$
$\displaystyle=K_{f}\hat{\omega}+\gamma_{f}\sum_{i=1}^{n}k_{i}S(\Lambda_{i}v_{i})\big{(}v_{i}-v_{f_{i}}\big{)},$
(6) $\displaystyle\hat{b}$
$\displaystyle=\bar{b}-\sum_{i=1}^{n}k_{i}S^{T}(v_{f_{i}})\Lambda_{i}v_{i},$
(7)

where $0<\Lambda_{i}=\Lambda^{T}_{i}\in\mathbb{R}^{3\times 3}$ is a constant
matrix gain, $k_{i}>0$ is the weight assigned to each vector measurement
according to its confidence level,
$K_{f}:=\sum_{i=1}^{n}k_{i}S^{T}(v_{f_{i}})\Lambda_{i}S(v_{i})$, and
$v_{f_{i}}$ is the filtered $v_{i}$

$\dot{v}_{f_{i}}=\gamma_{f}\left(v_{i}-v_{f_{i}}\right),\;v_{f_{i}}(0)=v_{i}(0),\;\forall
i=1,2,\ldots,n,$ (8)

with $\gamma_{f}>0$ the filter gain.

The following technical lemma [16] is needed for the design of the bias
observer.

###### Lemma III.1

_(Linear filter):_ Consider the linear filter (8). Then,
$\forall\epsilon_{f}>0$, there exists a
$\underline{\gamma}_{f}:=\omega_{\max}/\epsilon_{f}$, being
$\omega_{\max}<\infty$ the bandwidth of the overall system, such that
$\|v_{i}-v_{f_{i}}\|<\epsilon_{f}$ for $i=1,2,...,n$ and $t\geq 0$ provided
that $\gamma_{f}>\underline{\gamma}_{f}$.

###### Theorem III.2

_(Globally exponentially stable gyro-bias observer):_ Let
$\Lambda_{i}=\Lambda^{T}_{i}>0$, $k_{i}>0$, for $i=1,2,\cdots,n$, and
$\gamma_{f}>0$ be chosen according to Lemma III.1 such that
$\lambda_{o}\vcentcolon=\lambda_{\min}(K_{o})-\epsilon_{f}\sum_{i=1}^{n}k_{i}\lambda_{\max}(\Lambda_{i})>0$,
where $K_{o}:=\sum_{i=1}^{n}k_{i}S^{T}(v_{i})\Lambda_{i}S(v_{i})$ Then, the
gyro-bias observer (6)-(7) drives $\hat{b}\to b$ exponentially
$\forall\hat{b}(0)\in\mathbb{R}^{3}$.

###### Proof:

It follows from (4) and (2) that $\dot{v}_{i}=S(v_{i})\omega$. Let the bias-
estimation error be defined as $\tilde{b}:=\hat{b}-b$. Its time derivative, by
using (6), (7), (8) and $K_{f}$ is

$\dot{\tilde{b}}=\dot{\bar{b}}-\frac{d}{dt}\sum_{i=1}^{n}k_{i}S^{T}(v_{f_{i}})\Lambda_{i}v_{i}=K_{f}\left(\hat{\omega}-\omega\right)=-K_{f}\tilde{b},$

which can be expressed by adding $\pm K_{o}$ as

$\dot{\tilde{b}}=-K_{f}\tilde{b}=-K_{o}\tilde{b}-\left(\sum_{i=1}^{n}k_{i}S^{T}(v_{f_{i}}-v_{i})\Lambda_{i}S(v_{i})\right)\tilde{b}.$
(9)

Note that $K_{o}=K_{o}^{T}>0$ under Assumption A1 (Lemma 2, [13]).

Consider the Lyapunov function candidate $V_{1}=\frac{1}{2}\|\tilde{b}\|^{2}$.
Its time evolution along (9) is

$\displaystyle\dot{V}_{1}$
$\displaystyle=-\tilde{b}^{T}K_{o}\tilde{b}-\tilde{b}^{T}\left(\sum_{i=1}^{n}k_{i}S^{T}(v_{f_{i}}-v_{i})\Lambda_{i}S(v_{i})\right)\tilde{b}$
$\displaystyle\leq-\lambda_{\min}(K_{o})\|\tilde{b}\|^{2}+\|\sum_{i=1}^{n}k_{i}S^{T}(v_{f_{i}}-v_{i})\Lambda_{i}S(v_{i})\|\|\tilde{b}\|^{2}$
$\displaystyle\leq-\lambda_{\min}(K_{o})\|\tilde{b}\|^{2}+\sum_{i=1}^{n}k_{i}\|v_{f_{i}}-v_{i}\|\|\Lambda_{i}\|\|\tilde{b}\|^{2}$
$\displaystyle\leq-\Big{(}\lambda_{\min}(K_{o})+\epsilon_{f}\sum_{i=1}^{n}k_{i}\lambda_{\max}(\Lambda_{i})\Big{)}\|\tilde{b}\|^{2}$
$\displaystyle=-\lambda_{o}\|\tilde{b}\|^{2}=-2\lambda_{o}V_{1}.$ (10)

Therefore, $\tilde{b}\to 0_{3\times 1}$ exponentially for any initial
condition $\tilde{b}(0)\in\mathbb{R}^{3}$ with decaying rate $\lambda_{o}$. ∎

######  Remark III.3 (Gyro-bias observer)

The gain condition on $\lambda_{o}$ stated in Theorem III.2 is different from
the high-gain conditions in observer designs (Sec. 14.5, [17]), since
$\epsilon_{f}$ can be arbitrarily small by a sufficiently large filter gain
$\gamma_{f}$ according to Lemma III.1. Note that a sufficiently large
$\gamma_{f}$ also implies that the knowledge of the bandwidth of the overall
system $\omega_{\max_{i}}$ is not needed. Note that the vector measurement
noise may be amplified by the matrix gain $\Lambda_{i}$ due to the second
right-side term in (7) which depends on the vector measurements. Nonetheless,
the weights $k_{i}$ can be assigned to reduce this effect.

##  IV Attitude Control Design

In this section, an attitude tracking controller is first designed based on
the bias observer (6)-(7) and assuming known the inertia matrix. The
exponential stability, ASGES and AGAS of the desired equilibrium, as well as a
separation property of the combined observer and the controller are proved.
Then an adaptive control is devised when the inertia matrix is unknown, and
AGAS of the adaptive control is ensured. Relying on a modified bias estimator,
only six parameters of the inertia matrix are estimated, and thus no over-
parameterization is needed. In both controllers, the vector measurements
$v_{i}$ in (4) and the gyro-rate measurement $\omega_{g}$ with bias estimation
$\hat{b}$ are employed directly in the control law without attitude
estimation.

###  IV-A Control objective and error variables

Let $R_{d}\in SO(3)$ be a desired attitude related to a differentiable desired
angular velocity $\omega_{d}\in\mathbb{R}^{3}$ through
$\dot{R}_{d}=R_{d}S(\omega_{d})$. Define the attitude error as
$R_{e}=RR^{T}_{d}$, which is associated with its quaternion parameterization
$e=\left[e_{0},e^{T}_{v}\right]^{T}\in\mathcal{S}^{3}$ by Rodriguez formula
$R_{e}=R(e)$ in (1). The control objective is to design a control law to
achieve asymptotic convergence of the attitude tracking error
$e\rightarrow\pm\hat{1}=[\pm 1,0_{1\times 3}]^{T}$ and the angular velocity
error $\omega-\omega_{d}\rightarrow 0_{3\times 1}$.

To relate the quaternion error $e=[e_{0},e_{v}^{T}]^{T}$ with the vector
measurements, two error variables are defined: the weighted inner product
between $v_{i}$ in (4) and its desired value $v_{d_{i}}:=R^{T}_{d}r_{i}$

$e_{R}=\frac{1}{2}\sum^{n}_{i=1}k_{i}\|v_{i}-v_{d_{i}}\|^{2},$ (11)

where $k_{i}>0$ are given in the observer (6)-(7), and the weighted cross
product between $v_{i}$ and $v_{d_{i}}$

$z=\sum^{n}_{i=1}k_{i}S(v_{i})v_{d_{i}}.$ (12)

Some useful results for the subsequent analysis are given in the following
lemma. Its proof is given in Appendix A.

###### Lemma IV.1

_(Properties of error variables $e_{R}$ and $z$):_

  1. 1)

The error $e_{R}$ in (11) can be expressed as

$e_{R}=\sum^{n}_{i=1}k_{i}\left(1-v^{T}_{i}v_{d_{i}}\right)=2e^{T}_{v}We_{v},$
(13)

where $W\vcentcolon=-\sum^{n}_{i=1}k_{i}S^{2}(r_{i})=W^{T}>0$ under Assumption
A1. Furthermore, $0\leq e_{R}\leq 2\sum^{n}_{i=1}k_{i}$. $e_{R}=0$ implies
$v_{i}=v_{d_{i}}$ and $e=\pm\hat{1}$; while $e_{R}=2\sum^{n}_{i=1}k_{i}$
implies $v_{i}=-v_{d_{i}}$. Besides, $e_{R}=2\lambda_{w,1}$ provided that
$e_{v}=v_{w,1}$, where $v_{w,j}$, $j=1,2,3$, are the unit eigenvectors of $W$
associated with the eigenvalues $\lambda_{w,j}$, i.e.,
$Wv_{w,j}=\lambda_{j}v_{w,j}$, ordered as
$\lambda_{w,1}\geq\lambda_{w,2}\geq\lambda_{w,3}>0$.

  2. 2)

The time derivative of $e_{R}$ is

$\dot{e}_{R}=z^{T}(\omega-\omega_{d}).$ (14)

  3. 3)

The error variable $z$ in (12) can be expressed as

$z=2R^{T}_{d}\Big{(}e_{0}I_{3}-S(e_{v})\Big{)}We_{v}.$ (15)

Furthermore, $z=0_{3\times 1}$ implies that $e=\pm\hat{1}$, or
$e=[0,v^{T}_{w,j}]^{T}$, $j=1,2,3$.

  4. 4)

The dynamics of $z$ is described by

$\dot{z}=J(\omega-\omega_{d})+S(z)\omega_{d},$ (16)

where $J=\sum^{n}_{i=1}k_{i}S^{T}(v_{d_{i}})S(v_{i})$, with
$\|J\|\leq\sum^{n}_{i=1}k_{i}$.

  5. 5)

For any $\alpha_{1}>0$, there exists $\beta>0$, such that

$\alpha_{1}e_{R}\leq\frac{\beta}{2}\|z\|^{2},\ \ \forall t\geq 0,$ (17)

for all $e\in\mathcal{S}^{3}\backslash\bigcup B_{j}$, where $\bigcup
B_{j}\vcentcolon=B_{1}\cup B_{2}\cup B_{3}$, and

$B_{j}\vcentcolon=\left\\{e\in\mathcal{S}^{3}\;|\;e=\left[-\rho,\sqrt{1-\rho^{2}}v^{T}_{w,j}\right]^{T},\
\rho\in[0,\epsilon]\right\\},$

is a closed ball with center in
$e_{j}\vcentcolon=\left[0,v^{T}_{w,j}\right]^{T}$, and (arbitrarily small)
radius $\epsilon>0$, for $j=1,2,3$.

###  IV-B Attitude tracking controller

Define the reference velocity $\omega_{r}:=-\lambda_{c}z+\omega_{d}$ and the
composite tracking error $\sigma:={\omega}-\omega_{r}$, where $\lambda_{c}>0$
is a design parameter. Note that the control objective is achieved if $z(t)$
and $\sigma(t)\rightarrow 0_{3\times 1}$ asymptotically. The following control
law is proposed

$\tau=M\dot{\hat{\omega}}_{r}-S(M\hat{\omega})\omega_{r}-K_{c}{{{{{\hat{\sigma}}}}}}-\left(\alpha_{1}I_{3}+\alpha_{2}J^{T}\right)z,$
(18)

where
$\dot{\hat{\omega}}_{r}=-\lambda_{c}J\left(\hat{\omega}-\omega_{d}\right)-\lambda_{c}S(z)\omega_{d}+\dot{\omega}_{d}$,
${{{{{\hat{\sigma}}}}}}=\hat{\omega}-\omega_{r}$,
$\hat{\omega}=\omega_{g}-\hat{b}$, with $\hat{b}$ given by the gyro-bias
observer (7). $K_{c}\in\mathbb{R}^{3\times 3}$, $K_{c}=K^{T}_{c}>0$ and
$\alpha_{1},\alpha_{2}>0$ are design parameters.

###### Theorem IV.2

_(Exponential stability):_ Let the design parameters be chosen as follows:

  * •

Gyro-bias observer: $\Lambda_{i}=\Lambda^{T}_{i}>0$, $k_{i}>0$, for
$i=1,2,\cdots,n$, and $\gamma_{f}>0$ according to Theorem III.2,

  * •

Controller: $K_{c}=K^{T}_{c}>0$, $\lambda_{c}>0$ , $\alpha_{1}>0$,
$\alpha_{2}>0$,

such that

$\lambda_{a}\vcentcolon=\alpha_{1}-\alpha_{2}\sum^{n}_{i=1}k_{i}>0,$ (19)
$\lambda_{o}\vcentcolon=\lambda_{\min}(K_{o})-\epsilon_{f}\sum_{i=1}^{n}k_{i}\lambda_{\max}(\Lambda_{i})>\frac{\|G\|^{2}}{4\lambda_{\min}(K_{c})},$
(20)

where $G\vcentcolon=K_{c}-S(\omega_{r})M+\lambda_{c}MJ$, which is bounded in
light of the boundedness of $z$ and $\omega_{d}$. Then the attitude controller
(18) and the gyro-bias observer (6)-(7), in closed loop with the system
(2)-(3), have the following properties: for $j=1,2,3$

  1. (i)

The set of equilibria for
$\big{(}e,\sigma,\tilde{b}\big{)}\in\mathcal{S}^{3}\times\mathbb{R}^{3}\times\mathbb{R}^{3}$
is $\big{\\{}\big{(}\pm\hat{1},0_{3\times 1},0_{3\times
1}\big{)},\big{(}e_{j},0_{3\times 1},0_{3\times 1}\big{)}\big{\\}}$.

  2. (ii)

The equilibrium $\big{(}\pm\hat{1},0_{3\times 1},0_{3\times 1}\big{)}$ is
exponentially stable
$\forall\big{(}e(0),\sigma(0),\tilde{b}(0)\big{)}\in\mathcal{X}:=\mathcal{S}^{3}\backslash
B_{e}\times\mathbb{R}^{3}\times\mathbb{R}^{3}$, where
$B_{e}:=\\{e\in\mathcal{S}^{3}|\ e_{R}<2\lambda_{\omega,3}\\}$.

  3. (iii)

The three undesired equilibria $\big{(}e_{j},0_{3\times 1},0_{3\times
1}\big{)}$ are unstable.

###### Proof:

The proof starts with calculating the dynamics of the error state
$x_{1}:=[z^{T}\ \sigma^{T}\ \tilde{b}^{T}]^{T}$ in closed loop with the
control law (18). By (16), the dynamics of $z$ is rewritten as

$\dot{z}=J\sigma-\lambda_{c}Jz+S(z)\omega_{d}.$ (21)

The dynamics of $\sigma$ can be calculated by the definition of $\omega_{r}$
and its time derivative
$\dot{\omega}_{r}=-\lambda_{c}J(\omega-\omega_{d})-\lambda_{c}S(z)\omega_{d}+\dot{\omega}_{d}$,
the definition of $\dot{\hat{\omega}}_{r}$, the fact
$\hat{\omega}-\omega=-\tilde{b}$, the property of the skew-symmetric matrix,
and the control law (18) as follows

$\displaystyle
M\dot{\sigma}=M(\dot{\omega}-\dot{\omega}_{r})=S(M\omega)\omega+\tau-M\dot{\omega}_{r}$
$\displaystyle=$ $\displaystyle
S(M\omega)\sigma+\tau-M\dot{\omega}_{r}+S(M\omega)\omega_{r}$ $\displaystyle=$
$\displaystyle S(M\omega)\sigma-
K_{c}\sigma+G\tilde{b}-\left(\alpha_{1}I_{3}+\alpha_{2}J^{T}\right)z.$ (22)

The error dynamics of the closed-loop system is completed by the dynamics of
the bias-estimation error in (9). Note that $x_{1}=0_{9\times 1}$ is the only
equilibrium of the closed loop system (21), (IV-B), and (9). Therefore,
according to item (3) of Lemma IV.1, the set of equilibria for
$\big{(}e,\sigma,\tilde{b}\big{)}\in\mathcal{S}^{3}\times\mathbb{R}^{3}\times\mathbb{R}^{3}$
is given in item (i).

To prove item (ii), consider the following Lyapunov function candidate

$V_{2}(x_{1},t)=\frac{1}{2}\sigma^{T}M\sigma+\frac{1}{2}\|\tilde{b}\|^{2}+\frac{\alpha_{2}}{2}\|z\|^{2}+\alpha_{1}e_{R},$
(23)

$\forall
x_{1}=[z^{T},\sigma^{T},\tilde{b}^{T}]^{T}\in\mathbb{R}^{3}\times\mathbb{R}^{3}\times\mathbb{R}^{3}$.
Note that in the region $\mathcal{X}$ the equilibrium $x_{1}=0_{9\times
1}\implies e=\pm\hat{1}$ because $2\lambda_{w,3}\|e_{v}\|^{2}\leq
2e_{v}^{T}We_{v}=e_{R}<2\lambda_{\omega,3}$ implies $\|e_{v}\|<1$, and
therefore the undesired equilibria are excluded from the region $\mathcal{X}$.
$V_{2}$ is bounded by

$\displaystyle\gamma_{1}\|x_{1}\|^{2}$ $\displaystyle\leq
V_{2}(x_{1},t)\leq\gamma_{2}\|x_{1}\|^{2},$ (24)

with
$\gamma_{1}=\frac{1}{2}\min\left\\{\lambda_{\min}(M),1,\alpha_{2}\right\\}$,
and
$\gamma_{2}=\frac{1}{2}\max\left\\{\lambda_{\max}(M),1,\alpha_{2}+\beta\right\\}$
for some $\beta>0$ according to item (5) of Lemma IV.1.

The time derivative of (23) along the error dynamics (21), (IV-B), and (9),
and the time derivative of $e_{R}$ in (14) written as
$\dot{e}_{R}=z^{T}(\omega-\omega_{d})=z^{T}\sigma-\lambda_{c}z^{T}z$, is

$\displaystyle\dot{V}_{2}$
$\displaystyle=\sigma^{T}M\dot{\sigma}+\tilde{b}^{T}\dot{\tilde{b}}+\alpha_{2}z^{T}\dot{z}+\alpha_{1}\dot{e}_{R}$
$\displaystyle=-\sigma^{T}K_{c}\sigma+\sigma^{T}G\tilde{b}-\tilde{b}^{T}K_{f}\tilde{b}-\lambda_{c}z^{T}\left(\alpha_{1}I_{3}+\alpha_{2}J\right)z$
$\displaystyle=-x_{1}^{T}Q_{1}x_{1}\leq-\lambda_{\min}(Q_{1})\|x_{1}\|^{2}\leq-\frac{\lambda_{\min}(Q_{1})}{\gamma_{2}}V_{2},$
(25)

where

$Q_{1}=\left[\begin{array}[]{ccc}\lambda_{c}\left(\alpha_{1}I_{3}+\alpha_{2}J\right)&0&0\\\
&K_{c}&-\frac{1}{2}G\\\ 0&-\frac{1}{2}G&K_{f}\end{array}\right],$ (26)

is positive definite under conditions (19) and (20). Therefore, by Theorem
4.10 of [17] it follows that

$\|x_{1}(t)\|\leq\left(\frac{\gamma_{2}}{\gamma_{1}}\right)^{1/2}\|x_{1}(t_{0})\|\mathrm{e}^{-\left(\frac{\lambda_{\min}(Q_{1}}{2\gamma_{2}})\right)(t-t_{0})}.$

Then the equilibrium $x_{1}=0_{9\times 1}$ is globally exponentially stable
$\forall
x_{1}(0)=[z^{T}(0),\sigma^{T}(0),\tilde{b}^{T}(0)]^{T}\in\mathbb{R}^{3}\times\mathbb{R}^{3}\times\mathbb{R}^{3}$.
This implies that
$\big{(}e,\sigma,\tilde{b}\big{)}=\big{(}\pm\hat{1},0_{3\times 1},0_{3\times
1}\big{)}$ is (locally) exponentially stable for
$\big{(}e(0),\sigma(0),\tilde{b}(0)\big{)}\in\mathcal{X}$.

To prove item (iii), that is, the instability of the undesired equilibria
$e=e_{j}$, $j=1,2,3$, the Lyapunov function $V_{2}$ near the equilibrium
$e=e_{j}$ is analyzed. With little notation abuse, denote $V_{2}(x_{1},t)$ by
$V_{2}(e,\omega_{e},\tilde{b})$. It is sufficient to show, by Chetaev’s
Theorem (Theorem 4.3, [17]), that if
$V_{2}\left(e^{*}_{j},\sigma^{*},\tilde{b}^{*}\right)<V_{2}\left(e_{j},0_{3\times
1},0_{3\times 1}\right)$, for some
$\left(e^{*}_{j},\sigma^{*},\tilde{b}^{*}\right)$ arbitrarily close to the
undesired equilibrium $\left(e_{j},0_{3\times 1},0_{3\times 1}\right)$, then
the equilibrium $\left(e_{j},0_{3\times 1},0_{3\times 1}\right)$ is unstable
since $V_{2}$ is a non-increasing function.

Following (43) in Appendix A, a small rotation on $e_{j}$ is given by

$e^{*}_{j}=\left[\begin{array}[]{c}0\\\
v_{w,j}\end{array}\right]\otimes\left[\begin{array}[]{c}\sqrt{1-\epsilon^{2}}\\\
\epsilon v_{w,j}\end{array}\right]^{T}=\left[\begin{array}[]{c}-\epsilon\\\
\left(\sqrt{1-\epsilon^{2}}\right)v_{w,j}\end{array}\right],$ (27)

for an arbitrarily small $1>\epsilon>0$, where $\otimes$ denotes the
quaternion product.

Define $\Delta
V\vcentcolon=V_{2}\big{(}e^{*}_{j},\sigma^{*},\tilde{b}^{*}\big{)}-V_{2}\big{(}e_{j},0_{3\times
1},0_{3\times 1}\big{)}$. By (23), (27), and (44)-(45) in Appendix A, it has

$\displaystyle\Delta V_{2}$
$\displaystyle=\frac{1}{2}\sigma^{*T}M\sigma^{*}+\frac{1}{2}\tilde{b}^{*T}\tilde{b}^{*}+2\alpha_{2}\epsilon^{2}\lambda^{2}_{j}\left(1-\epsilon^{2}\right)$
$\displaystyle\quad+2\alpha_{1}\left(1-\epsilon^{2}\right)\lambda_{j}-2\alpha_{1}\lambda_{j}$
$\displaystyle=\frac{1}{2}\sigma^{*T}M\sigma^{*}+\frac{1}{2}\tilde{b}^{*T}\tilde{b}^{*}+2\alpha_{2}\epsilon^{2}\lambda^{2}_{j}\left(1-\epsilon^{2}\right)-2\alpha_{1}\lambda_{j}\epsilon^{2}$
$\displaystyle=\frac{1}{2}\sigma^{*T}M\sigma^{*}+\frac{1}{2}\tilde{b}^{*T}\tilde{b}^{*}-2\lambda_{j}\left(\alpha_{1}-\alpha_{2}\lambda_{j}\left(1-\epsilon^{2}\right)\right)\epsilon^{2}$
$\displaystyle<0,$

for
$\frac{1}{4\lambda_{j}\left(\alpha_{1}-\alpha_{2}\lambda_{j}\left(1-\epsilon^{2}\right)\right)}\left(\sigma^{*T}M\sigma^{*}+\tilde{b}^{*T}\tilde{b}^{*}\right)<\epsilon^{2}$.
Therefore, under the condition (19) and $\forall\epsilon>0$, there always
exists $\left(e^{*}_{j},\sigma^{*},\tilde{b}^{*}\right)$ arbitrarily close to
the undesired equilibrium $\left(e_{j},0_{3\times 1},0_{3\times 1}\right)$,
such that
$V_{2}\left(e^{*}_{j},\sigma^{*},\tilde{b}^{*}\right)<V_{2}\left(e_{j},0_{3\times
1},0_{3\times 1}\right)$. This shows the instability of the three undesired
equilibria. ∎

Note that the attraction region in item (ii) of Theorem IV.2 may be enlarged
to cover almost the entire space of
$\mathcal{S}^{3}\times\mathbb{R}^{3}\times\mathbb{R}^{3}$, as the following
corollary states.

######  Definition IV.3 (Almost global asymptotic stability (AGAS) and almost
semi-global exponential stability (ASGES)) [15])

Let the origin be an equilibrium of a dynamic system. The equilibrium is of:

  * i)

AGAS, if it is asymptotically stable and the set of initial states that do not
converge to the origin has zero Lebesgue measure.

  * ii)

ASGES, if it is asymptotically stable and for almost all initial states, there
exist finite controller parameters such that the corresponding trajectory
exponentially converges to the origin.

###### Corollary IV.4

_(ASGES and AGAS):_ The equilibrium $\big{(}\pm\hat{1},0_{3\times
1},0_{3\times 1}\big{)}$ is of AGAS
$\forall\big{(}e(0),\sigma(0),\tilde{b}(0)\big{)}\in\mathcal{S}^{3}\backslash\\{e_{j}\\}\times\mathbb{R}^{3}\times\mathbb{R}^{3}$,
and ASGES
$\forall\big{(}e(0),\sigma(0),\tilde{b}(0)\big{)}\in\mathcal{S}^{3}\backslash\bigcup
B_{j}\times\mathbb{R}^{3}\times\mathbb{R}^{3}$, where $e_{j}$ and $B_{j}$ are
defined in item 5) of Lemma III.1.

###### Proof:

For $e\in\mathcal{S}^{3}$, the inequality (17) is no longer held, nor the
upper bound on the Lyapunov function $V_{2}$ in (23). It follows from the
proof of Theorem IV.2 that $\dot{V}_{2}<0$, which shows the asymptotic
stability of $x_{1}=0_{9\times 1}$. Since the Lebesgue measure of the unstable
set $\\{(e_{j},0_{3\times 1},0_{3\times 1})\\}$ is zero, the equilibrium
$\big{(}\pm\hat{1},0_{3\times 1},0_{3\times 1}\big{)}$ is AGAS. On the other
hand, $\forall\epsilon>0$, the proof of item (ii) in Theorem IV.2 holds for
$e\in\mathcal{S}^{3}\backslash\bigcup B_{j}$. Note that the set
$\mathcal{S}^{3}\backslash\bigcup B_{j}$ can be arbitrarily enlarged for a
given $\alpha_{1}$ and any arbitrarily small $\epsilon>0$ by a sufficiently
large $\beta$ in item (5) of Lemma III.1 to cover almost entire
$\mathcal{S}^{3}$, the equilibrium $\big{(}\pm\hat{1},0_{3\times 1},0_{3\times
1}\big{)}$ is thus ASGES. ∎

######  Remark IV.5 (Comparison with some reported controllers)

By exploiting the relationship between the error variables $z$ and $e_{R}$
near the equilibria characterized by item (i) of Theorem IV.2 as established
in item 5) of Lemma III.1, it allows one to propose a strict Lyapunov function
(23) for the desired equilibrium. This in turn enables the controller (18) to
achieve AGAS and ASGES under the conditions stated in Theorem IV.2,
contrasting with only AGAS in [8, 12, 13, 9].

######  Remark IV.6 (A separation property)

Note that the bias observer (6)-(7) is used in the control loop without
modifications. This implies that the bias observer (6)-(7) and controller (18)
may be designed separately provided that the convergence rate $\lambda_{o}$ in
(20) of the observer is sufficiently large. This condition may also be
obtained through finite-time convergence, e.g., [7].

######  Remark IV.7 (Controller tuning)

The controller and the observer can be tuned as follows to satisfy the
conditions in Theorem IV.2: 1) assign the weights $k_{i}$ to the observer
(6)-(7) according to the confidence level of each sensor, 2) choose the
controller gains $K_{c}=K^{T}_{c}>0$, $\lambda_{c}>0$ , $\alpha_{1}>0$,
$\alpha_{2}>0$ such that the condition (19) holds, 3) choose the filter gain
$\gamma_{f}$ as in Lemmas III.1 and the matrix gain $\Lambda_{i}$ in (6)-(7)
such that the condition (20) holds.

###  IV-C Adaptive Attitude Tracking Controller

To deal with the unknown inertia matrix, the first two terms in the control
law (18) are replaced by an adaptive compensation in the following proposed
adaptive control law:

$\tau=Y(\hat{\omega},h)\hat{\theta}-K_{c}\hat{\sigma}-\left(\alpha_{1}I_{3}+\alpha_{2}J^{T}\right)z,\\\
$ (28)

where $\hat{\sigma}=\hat{\omega}-\omega_{r}$, and the controller gains
$K_{c},\ \alpha_{1},\ \alpha_{2}$ are the same as in the control law (18),
$Y(\hat{\omega},h)$ is the regressor

$\displaystyle Y$
$\displaystyle(\hat{\omega},h):=S(\hat{\omega})F_{1}(\hat{\omega})+F_{1}(h),$
(29) $\displaystyle h$
$\displaystyle:=-\lambda_{c}\Big{(}J\big{(}\hat{\omega}-\omega_{d}\big{)}+S(z)\omega_{d}\Big{)}+\dot{\omega}_{d}+\big{(}\alpha_{1}I_{3}+\alpha_{2}J^{T}\big{)}z,$

$F_{1}(u)$, for a vector $u=\left[u_{1},u_{2},u_{3}\right]^{T}$, is defined as

$\displaystyle F_{1}(u)$
$\displaystyle\vcentcolon=\left[\begin{array}[]{cccccc}u_{1}&0&0&0&u_{3}&u_{2}\\\
0&u_{2}&0&u_{3}&0&u_{1}\\\ 0&0&u_{3}&u_{2}&u_{1}&0\end{array}\right],$

and $\hat{\theta}(t)$ is the parameter estimation of the inertia matrix
entries
$\theta=\left[m_{11},m_{22},m_{33},m_{23},m_{13},m_{12}\right]^{T}\in\mathbb{R}^{6}$,
which is updated according to

$\displaystyle\dot{\hat{\theta}}=$ $\displaystyle-\Gamma
Y^{T}(\hat{\omega},h)\hat{\sigma},$ (30)

where $\Gamma\in\mathbb{R}^{6\times 6}$, $\Gamma=\Gamma^{T}>0$ is the
adaptation gain. The estimated gyro bias $\hat{b}$ used to calculate
$\hat{\omega}=\omega_{g}-\hat{b}$ is obtained by the following modified
observer

$\hat{b}=\mu_{b}\mathrm{Tanh}\left(\bar{b}\right)-\sum_{i=1}^{n}k_{i}S^{T}(v_{f_{i}})\Lambda_{i}v_{i},$
(31)
$\dot{\bar{b}}=\frac{1}{\mu_{b}}\mathrm{Cosh}^{2}\left(\bar{b}\right)\left(K_{f}\hat{\omega}+\sum_{i=1}^{n}k_{i}S(\Lambda_{i}v_{i})\dot{v}_{f_{i}}-\left(\alpha_{1}I_{3}+\alpha_{2}J^{T}\right)z\right),$
(32)

where $\mu_{b}\geq\theta_{b}$ with $\theta_{b}$ the bound on $\|b\|$ in
Assumption A2. The hyperbolic functions are defined entry-wise:

$\displaystyle\mathrm{Tanh}(\bar{b})$
$\displaystyle\vcentcolon=[\tanh{(\bar{b}_{1})},\tanh{(\bar{b}_{2})},\tanh{(\bar{b}_{3}))}]^{T}\in\mathbb{R}^{3},$
$\displaystyle\mathrm{Cosh}(\bar{b})$
$\displaystyle\vcentcolon=\mathrm{diag}\\{\cosh{(\bar{b}_{1})},\cosh{(\bar{b}_{2})},\cosh{(\bar{b}_{3})}\\}\in\mathbb{R}^{3\times
3},$ $\displaystyle\mathrm{Sech}(\bar{b})$
$\displaystyle\vcentcolon=\mathrm{diag}\\{\mathrm{sech}{(\bar{b}_{1})},\mathrm{sech}{(\bar{b}_{2})},\mathrm{sech}{(\bar{b}_{3})}\\}\in\mathbb{R}^{3\times
3}.$

Note that $\hat{b}$ in (31) is bounded by
$\|\hat{b}\|\leq\sqrt{3}\mu_{b}+\sum_{i=1}^{n}k_{i}\lambda_{max}(\Lambda_{i})$.
The stability of the proposed adaptive controller is summarized in the
following theorem.

###### Theorem IV.8

_(Adaptive controller):_ Let the design parameters be chosen as follows:

  * •

Gyro-bias observer: $\Lambda_{i}=\Lambda^{T}_{i}>0$, $k_{i}>0$, for
$i=1,2,\cdots,n$, and $\gamma_{f}>0$, $\mu_{b}\geq\theta_{b}$,

  * •

Adaptive controller: $K_{c}=K^{T}_{c}>0$, $\lambda_{c}>0$ , $\alpha_{1}>0$,
$\alpha_{2}>0$, $\Gamma=\Gamma^{T}>0$,

such that condition (19) is satisfied and

$\displaystyle\lambda_{o}=\lambda_{\min}(K_{o})-\epsilon_{f}\sum_{i=1}^{n}k_{i}\lambda_{\max}(\Lambda_{i})>0,$
(33)
$\displaystyle\lambda_{\min}(K_{c})>\frac{\|H\|^{2}}{4\lambda_{o}}+\|S(\tilde{b})M\|,$
(34)

where
$H\vcentcolon=M\left(K_{f}+\lambda_{c}J\right)+S(M\omega_{r})-S(\tilde{b}+\omega_{r})M$,
which is bounded. Then the adaptive controller (28), the gyro-bias observer
(31), and the adaptation law (30), in closed loop with the system (2)-(3),
have the following properties, for $j=1,2,3$:

  1. (i)

All variables are bounded, and
$\left(e,\hat{\sigma},\tilde{b}\right)\rightarrow\left(\pm\hat{1},0_{3\times
1},0_{3\times 1}\right)$ almost globally asymptotically
$\forall\left(e(0),\hat{\sigma}(0),\tilde{b}(0),\tilde{\theta}(0)\right)\in\mathcal{X}_{a}\vcentcolon=\mathcal{S}^{3}\backslash\bigcup
B_{j}\times\mathbb{R}^{3}\times\mathbb{R}^{3}\times\mathbb{R}^{6}$, where
$\tilde{\theta}=\hat{\theta}-\theta$ is the parameter estimation error.

  2. (ii)

The three undesired equilibria $\big{(}e_{j},0_{3\times 1},0_{3\times
1},0_{6\times 1}\big{)}$ are unstable.

###### Proof:

Let $x_{2}:=[z^{T}\ {\hat{\sigma}}^{T}\ \tilde{b}^{T}\
\tilde{\theta}^{T}]^{T}$ denote the state of the closed loop system with the
control law (28). Its dynamics is calculated as follows.

The dynamics of the bias estimation error by (31) and (32) is

$\displaystyle\dot{\tilde{b}}$
$\displaystyle=\dot{\hat{b}}-\dot{b}=\mu_{b}\mathrm{Sech}^{2}\left(\bar{b}\right)\dot{\bar{b}}-K_{f}\omega-\sum_{i=1}^{n}k_{i}S(\Lambda_{i}v_{i})\dot{v}_{f_{i}}$
$\displaystyle=-K_{f}\tilde{b}-\left(\alpha_{1}I_{3}+\alpha_{2}J^{T}\right)z.$
(35)

The dynamics of $\hat{\sigma}=\hat{\omega}-\omega_{r}$, in view of (5) and
(IV-C), is now given by

$\displaystyle M\dot{\hat{\sigma}}$
$\displaystyle=M\dot{\hat{\omega}}-M\dot{\omega}_{r}=M\dot{\omega}-M\dot{\omega}_{r}-M\dot{\hat{b}}$
$\displaystyle=$ $\displaystyle S(M\omega)\omega+\tau-
Mh+M\left(K_{f}+\lambda_{c}J\right)\tilde{b}$ $\displaystyle=$
$\displaystyle-\Big{(}S(\omega)F_{1}(\omega)+F_{1}(h)\Big{)}\Theta+M\left(K_{f}+\lambda_{c}J\right)\tilde{b}+\tau$
$\displaystyle=$
$\displaystyle-Y(\omega,h)\Theta+M\left(K_{f}+\lambda_{c}J\right)\tilde{b}+\tau.$

Adding and subtracting $Y(\hat{\omega},h)\theta$ gives

$\displaystyle M\dot{\hat{\sigma}}$
$\displaystyle=-Y(\omega,h)\theta+Y(\hat{\omega},h)\theta-Y(\hat{\omega},h)\theta$
$\displaystyle\quad+M\left(K_{f}+\lambda_{c}J\right)\tilde{b}+\tau$
$\displaystyle=S(\hat{\omega})M\hat{\omega}-S(\omega)M\omega-Y(\hat{\omega},h)\theta$
$\displaystyle\quad+M\left(K_{f}+\lambda_{c}J\right)\tilde{b}+\tau$
$\displaystyle=\left(S(M\hat{\sigma})-S(\hat{\sigma})M+S(M\omega_{r})-S(\tilde{b}+\omega_{r})M\right)\tilde{b}$
$\displaystyle\quad-Y(\hat{\omega},h)\theta+M\left(K_{f}+\lambda_{c}J\right)\tilde{b}+\tau$
$\displaystyle=-S(\tilde{b})M\hat{\sigma}-S(\hat{\sigma})M\tilde{b}-Y(\hat{\omega},h)\theta+H\tilde{b}+\tau,$

which in closed loop with the controller (28) gives

$\displaystyle M\dot{{{{{\hat{\sigma}}}}}}$
$\displaystyle=Y(\hat{\omega},h)\tilde{\theta}-\left(K_{c}+S(\tilde{b})M\right)\hat{\sigma}-S(\hat{\sigma})M\tilde{b}$
$\displaystyle\quad-\left(\alpha_{1}I_{3}+\alpha_{2}J^{T}\right)z+H\tilde{b}.$
(36)

The error state dynamics is completed with the following

$\displaystyle\dot{z}$
$\displaystyle=J\hat{\sigma}-\lambda_{c}Jz+S(z)\omega_{d}+J\tilde{b},$ (37)
$\displaystyle\dot{\tilde{\theta}}$ $\displaystyle=-\Gamma
Y^{T}(\hat{\omega},h)\hat{\sigma}.$ (38)

Note that the state $x_{2}$ of the closed-loop system (37), (IV-C), (IV-C),
and (38) has the only equilibrium at $x_{2}=0_{15\times 1}$. To determine its
stability, consider the following Lyapunov function candidate

$V_{3}=\frac{1}{2}\hat{\sigma}^{T}M\hat{\sigma}+\frac{1}{2}\|\tilde{b}\|^{2}+\frac{1}{2}\tilde{\theta}^{T}\Gamma^{-1}\tilde{\theta}+\frac{\alpha_{2}}{2}\|z\|^{2}+\alpha_{1}e_{R},$
(39)

$\forall
x_{2}\in\mathbb{R}^{3}\times\mathbb{R}^{3}\times\mathbb{R}^{3}\times\mathbb{R}^{6}$
and $e\in\mathcal{S}^{3}\backslash\bigcup B_{j}$.

The time evolution of (39) along the closed-loop dynamics, by using the fact
that $\dot{e}_{R}=z^{T}\hat{\sigma}-\lambda_{c}z^{T}z+z^{T}\tilde{b}$, is
given by

$\displaystyle\dot{V}_{3}$
$\displaystyle=\hat{\sigma}^{T}M\dot{\hat{\sigma}}+\tilde{b}^{T}\dot{\tilde{b}}+\tilde{\theta}^{T}\Gamma^{-1}\dot{\tilde{\theta}}+\alpha_{2}z^{T}\dot{z}+\alpha_{1}\dot{e}_{R}$
$\displaystyle=-\hat{\sigma}^{T}(K_{c}+S(\tilde{b})M)\hat{\sigma}+\hat{\sigma}^{T}H\tilde{b}-\tilde{b}^{T}K_{f}\tilde{b}$
$\displaystyle\quad-\lambda_{c}z^{T}\left(\alpha_{1}I_{3}+\alpha_{2}J\right)z$
$\displaystyle\leq-\bar{x}^{T}Q_{2}\bar{x},$ (40)

where
$\bar{x}\vcentcolon=\left[\|z\|,\|\hat{\sigma}\|,\|\tilde{b}\|\right]^{T}$,
and

$Q_{2}=\left[\begin{array}[]{ccc}\lambda_{c}\lambda_{a}&0&0\\\
0&\lambda_{\min}(K_{c})-\|S(\tilde{b})M\|&-\frac{1}{2}\|H\|\\\
0&-\frac{1}{2}\|H\|&\lambda_{o}\end{array}\right],$ (41)

which is semipositive definite under conditions (34)-(33), and
$\dot{V}_{3}\leq 0$. This implies that the state $x_{2}$ bounded. Next, it is
straightforward to verify that $\ddot{V}_{3}$ is bounded, and then
$\left(z,\hat{\sigma},\tilde{b}\right)\rightarrow\left(0_{3\times
1},0_{3\times 1},0_{3\times 1}\right)$ asymptotically by invoking Barbalat’s
Lemma. Moreover, $z\rightarrow 0_{3\times 1}$ implies that
$\left(e,\hat{\sigma},\tilde{b}\right)\rightarrow\left(\pm\hat{1},0_{3\times
1},0_{3\times 1}\right)$ almost globally asymptotically, and $\tilde{\theta}$
remains bounded. Furthermore, the three undesired equilibria
$(e_{j},0_{3\times 1},0_{3\times 1},0_{6\times 1})$ are unstable by the same
arguments as in the proof of Theorem IV.2. ∎

######  Remark IV.9 (The Adaptive Controller)

Compared to some similar adaptive control laws for attitude tracking of rigid
bodies, the proposed scheme does not require an attitude estimation procedure,
a property leveraged from the nonadaptive design in the previous subsection.
Moreover, in the proposed adaptive controller only 6 parameters of the unknown
inertia matrix are estimated compared with the over-parameterization required
in [12, 14]. Furthermore, in the adaptation law, neither restrictions on the
smoothness of the desired trajectory nor parameter projections are needed as
opposed to those used in [14]. Note that when a persistent excitation
condition on $Y\left(\hat{\omega},h\right)$, the exponential convergence of
$\tilde{\theta}\to 0_{6\times 1}$ can be established as in classical adaptive
control designs [18].

######  Remark IV.10 (Tuning procedure)

The design parameters may be tuned to verify conditions (19) and (33)-(34) as
follows: 1) Assign the weight $k_{i}$ according to the confidence of each
vector measurement $v_{i}$. 2) Choose the observer gains
$\Lambda_{i}=\Lambda^{T}_{i}>0$, $\gamma_{f}>0$ to verify condition (33).
Likewise, the observer bound $\mu_{b}>0$ is chosen to be
$\mu_{b}\geq\theta_{b}$ according to Assumption A2. 3) The controller gains
$\alpha_{1}>0$ and $\alpha_{2}>0$ are selected to fulfill the condition (19).
4) Fix a controller gain $\lambda_{c}>0$, and choose $K_{c}=K^{T}_{c}>0$ to
verify (34). 5) The design parameter $\Gamma=\Gamma^{T}>0$ in the adaptive law
may be set independently of the design parameters of the observer and the
controller.

##  V Simulations

The adaptive controller (28) under noisy measurements was simulated. Three
inertial reference vectors $r_{1}=\left[0,0,1\right]^{T}$,
$r_{2}=\left(1/\sqrt{3}\right)\left[1,1,1\right]^{T}$ and $r_{3}=r_{1}\times
r_{2}/\|r_{1}\times r_{2}\|$ were considered. The desired trajectory was
chosen as in [12] given by
$\omega_{d}=[\cos(t)+0.5\cos(0.2t),\;0.75\sin(2t),\;\sin\left(5t\mathrm{e}^{-0.001t}\right)+\cos(0.5t)]^{T}$
(rad/s). The initial conditions were $q(0)=[-1,0,0,0]^{T}$,
$\omega(0)=[0,0,0]^{T}$ (rad/s), $q_{d}(0)=[0.8,0,0.6,0]^{T}$, and
$\omega_{d}(0)=[1.5,0,1]^{T}$ (rad/s).

The parameters are as follows. The inertia parameter vector was
$\theta=\left[0.0360,0.0869,0.0935,0.0004,0.0015,-0,0007\right]^{T}$ (Kgm2).
The vector measurement weights were $k_{i}=0.1$, and the observer gains were
$\Lambda_{i}=10I_{3}$ for $i=1,2,3$, $\gamma_{f}=1000$, $\mu_{b}=1$. The
adaptive controller gains were $K_{c}=3I_{3}$, $\lambda_{c}=1$,
$\alpha_{1}=0.1$, $\alpha_{2}=0.01$, $\Gamma=I_{6}$.

The gyro bias was $b=[0.2,0.1,-0.1]^{T}$ (rad/s). Noise was introduced in the
vector measurements and gyro measurements as follows. Vector measurements:
$v_{m,i}=(v_{i}+m_{v}\bar{\nu}_{i})/\|v+m_{v}\bar{\nu}_{i}\|$,
$\bar{\nu}_{i}=\nu_{i}/\|\nu_{i}\|$, where $\nu_{i}\in\mathbb{R}^{3}$ are
zero-mean Gaussian distributions with unitary variance, for $i=1,2,3$, and
$m_{v}\in[0,0.1]$ is a uniform distribution; Gyro rate measurement:
$\omega_{m}=\omega+m_{w}\nu_{w}+b$, with $\nu_{w}\in\mathbb{R}^{3}$ a zero-
mean Gaussian distributions and unit-variance, and $m_{w}\in[0,0.1]$ a uniform
distribution.

The tracking error $e=q\otimes q_{d}^{-1}$ is shown in Fig. 1(a), where the
convergence of $e_{0}$ to the set $[-0.99,-1]$ is observed. The norm of the
error variable $\|z\|$ is displayed in Fig. 1(b), which remains in the set
$[0,0.02]$ after $20$ (s). Besides, the bias estimation error $\|\tilde{b}\|$
and the estimated composite error $\|\hat{\sigma}\|$ are depicted in Fig.
1(c)-(d). Note that they converge to the set $[0,0.2]$, corresponding to the
sum of the maximum noise levels in the vector and gyro measurements. Fig. 1(e)
draws the norm of the estimation error $\|\tilde{\theta}\|$, which converges
to the set $[0,0.02]$ under the excitation provided by the desired trajectory.
The control effort is shown in Fig. 1(f), which is maintained in $[0,1]$ (Nm).

Figure 1: Performance of the adaptive controller (28) in the presence of noisy
measurements.

##  VI Conclusion

In this note, attitude tracking using vector and biased gyro measurements was
considered. First, a globally exponentially convergent bias observer was
designed. Then, an attitude tracking controller based on the bias observer was
developed which is almost globally asymptotically stable and almost semiglobal
exponentially stable. A separation property of the combined observer-
controller was proved. Lastly, an adaptive controller was devised to deal with
the unknown inertia matrix, which estimates only the inertia parameters
without over-parameterization thanks to a modified bias observer. Almost
global asymptotic stability was demonstrated. Numerical simulations were
included to illustrate the theoretical results and verify the robustness of
the adaptive controller in the presence of measurement noise. In addition, by
directly using the vector measurement, the proposed attitude controllers do
not require attitude estimation, which avoids both the undesired critical
points introduced by an attitude observer and the unwinding phenomenon in
quaternion-based designs.

##  Appendix A Proof of Lemma IV.1

  1. 1)

Recall the attitude error $R_{e}=RR^{T}_{d}$, which is associated with its
quaternion parameterization
$e=\left[e_{0},e^{T}_{v}\right]^{T}\in\mathcal{S}^{3}$ by Rodriguez formula
$R_{e}=R(e)$ in (1). Then it follows from (13), $v_{i}=R^{T}r_{i}$, and
$v_{d_{i}}=R_{d}^{T}r_{i}$ that

$\displaystyle e_{R}$
$\displaystyle=\sum^{n}_{i=1}k_{i}\left(1-v^{T}_{i}v_{d_{i}}\right)=\sum^{n}_{i=1}k_{i}\left(1-r^{T}_{i}R_{e}r_{i}\right)$
$\displaystyle=\sum^{n}_{i=1}k_{i}\big{(}1-r^{T}_{i}\left(I_{3}+2e_{0}S(e_{v})+2S^{2}(e_{v})\right)r_{i}\Big{)}$
$\displaystyle=-\sum^{n}_{i=1}k_{i}\left(r^{T}_{i}\left(2S^{2}(e_{v})\right)r_{i}\right)$
$\displaystyle=2e^{T}_{v}\left(-\sum^{n}_{i=1}k_{i}S^{2}(r_{i})\right)e_{v}=2e^{T}_{v}We_{v}.$

Clearly, $0\leq e_{R}=\sum^{n}_{i=1}k_{i}\left(1-v^{T}_{i}v_{d_{i}}\right)\leq
2\sum^{n}_{i=1}k_{i}$. Furthermore, $e_{R}=0\iff v_{i}=v_{d_{i}}\iff e=[\pm
1,0_{1\times 3}]^{T}$; $e_{R}=2\sum_{i=1}^{n}k_{i}\iff v_{i}=-v_{d_{i}}$. In
particular, $e_{R}=2e^{T}_{v}We_{v}=2\lambda_{w,1}\iff e_{v}=v_{w,1},$ where
$v_{w,j}$, $j=1,2,3$, are the unit eigenvectors of $W$ associated with the
eigenvalues $\lambda_{w,j}$, i.e., $Wv_{w,j}=\lambda_{j}v_{w,j}$, ordered as
$\lambda_{w,1}\geq\lambda_{w,2}\geq\lambda_{w,3}>0$.

  2. 2)

By $\dot{v}_{i}=S(v_{i})\omega$ and $\dot{v}_{d_{i}}=S(v_{d_{i}})\omega_{d}$,
the time derivative of
$e_{R}=\sum^{n}_{i=1}k_{i}\left(1-v^{T}_{i}v_{d_{i}}\right)$ is

$\displaystyle\dot{e}_{R}$
$\displaystyle=-\sum^{n}_{i=1}k_{i}\left(v^{T}_{i}S(v_{d_{i}})\omega_{d}+v^{T}_{d_{i}}S(v_{i})\omega\right)$
$\displaystyle=-\sum^{n}_{i=1}k_{i}\left(v^{T}_{d_{i}}S(v_{i})(\omega-\omega_{d})\right)$
$\displaystyle=z^{T}(\omega-\omega_{d}).$

  3. 3)

The proof is given by Lemma 1 and Lemma 3 of [13].

  4. 4)

By the property of the skew-symmetric matrix, the time derivative of the error
variable $z$ in (12) is

$\displaystyle\dot{z}$
$\displaystyle=\sum^{n}_{i=1}k_{i}\left(S(v_{i})\dot{v}_{d_{i}}-S(v_{d_{i}})\dot{v}_{i}\right)$
$\displaystyle=\sum^{n}_{i=1}k_{i}\left(S(v_{i})S(v_{d_{i}})\omega_{d}-S(v_{d_{i}})S(v_{i})\omega\right)$
$\displaystyle=\sum^{n}_{i=1}k_{i}\big{(}\left(S(v_{i})S(v_{d_{i}})-S(v_{d_{i}})S(v_{i})\right)\omega_{d}$
$\displaystyle\quad-\left(S(v_{d_{i}})S(v_{i})\right)(\omega-\omega_{d})\big{)}$
$\displaystyle=\sum^{n}_{i=1}k_{i}\big{(}S\left(S(v_{i})v_{d_{i}}\right)\omega_{d}\big{)}+J(\omega-\omega_{d})$
$\displaystyle=S(z)\omega_{d}+J(\omega-\omega_{d}).$

  5. 5)

By (15) the norm $\|z\|^{2}=z^{T}z$ is given by

$\displaystyle\frac{1}{2}\|z\|^{2}$
$\displaystyle=\frac{1}{2}\left(2e^{T}_{v}W\left(e_{0}I_{3}+S(e_{v})\right)R_{d}\right)$
$\displaystyle\quad\quad\quad\left(2R^{T}_{d}\left(e_{0}I_{3}-S(e_{v})\right)We_{v}\right)$
$\displaystyle=2e^{T}_{v}W^{2}e_{v}-2\left(e^{T}_{v}We_{v}\right)^{2}.$ (42)

It is easy to see that the equality of (17) holds when
$e=[e_{0},e^{T}_{v}]=[\pm 1,0_{1\times 3}]$, which corresponds to $R=R_{d}$.
Now, consider the undesired equilibria $e_{j}=[0,v^{T}_{w,j}]^{T}$, being
$v_{w,j}$, $j=1,2,3$, the $j$-th unit-eigenvector of $W$. Given any
$1>\epsilon>0$, applying an arbitrarily small rotation
$\delta_{j}=\left[\left(\sqrt{1-\epsilon^{2}}\right),\epsilon
v^{T}_{w,j}\right]^{T}$ to $e_{j}$ yields

$e^{*}_{j}=[e^{*}_{0,j},\;e^{*T}_{v,j}]=e_{j}\otimes\delta_{j}=\left[-\epsilon,\left(\sqrt{1-\epsilon^{2}}\right)v^{T}_{w,j}\right]^{T}.$
(43)

Then, the error variable $z$ in (15) and $e_{R}$ in (11) evaluated at
$e^{*}_{j}$ and $e^{*}_{i}$ respectively, are

$\displaystyle\frac{1}{2}\|z^{*}\|^{2}$
$\displaystyle=2e^{*T}_{v,j}W^{2}e^{*}_{v,j}-2\left(e^{*T}_{v,j}We^{*}_{v,j}\right)^{2}$
$\displaystyle=2\epsilon^{2}\lambda^{2}_{w,j}\left(1-\epsilon^{2}\right),$
(44) $\displaystyle e^{*}_{R}$
$\displaystyle=2e^{*T}_{v,i}We^{*}_{v,i}=2\left(1-\epsilon^{2}\right)\lambda_{w,i}.$
(45)

Therefore, $\forall i,j=1,2,3$, and

$\displaystyle\forall\beta\geq
2\frac{\lambda_{w,1}}{\epsilon^{2}\lambda^{2}_{w,3}}\alpha_{1}$
$\displaystyle\implies\frac{\beta}{2}2\epsilon^{2}\lambda^{2}_{w,j}\left(1-\epsilon^{2}\right)\geq\alpha_{1}2\left(1-\epsilon^{2}\right)\lambda_{w,i},$
$\displaystyle\implies\frac{\beta}{2}\|z^{*}\|^{2}\geq\alpha_{1}e^{*}_{R}.$

Since this is the worst case for the inequality (17) to be held, this
inequality fulfills for all $z\neq 0_{3\times 1}$, which is equivalent to
$e\in\mathcal{S}^{3}\backslash\bigcup B_{j}$.

## References

  * [1] J.-Y. Wen and K. Kreutz-Delgado, “The attitude control problem,” _IEEE Transactions on Automatic control_ , vol. 36, no. 10, pp. 1148–1162, 1991.
  * [2] A. Tayebi, “Unit quaternion-based output feedback for the attitude tracking problem,” _IEEE Transactions on Automatic Control_ , vol. 53, no. 6, pp. 1516–1520, 2008.
  * [3] C. G. Mayhew, R. G. Sanfelice, and A. R. Teel, “Quaternion-based hybrid control for robust global attitude tracking,” _IEEE Transactions on Automatic control_ , vol. 56, no. 11, pp. 2555–2566, 2011.
  * [4] A. Tayebi and S. McGilvray, “Attitude stabilization of a vtol quadrotor aircraft,” _IEEE Transactions on control systems technology_ , vol. 14, no. 3, pp. 562–571, 2006.
  * [5] R. Mahony, T. Hamel, and J.-M. Pflimlin, “Nonlinear complementary filters on the special orthogonal group,” _IEEE Transactions on automatic control_ , vol. 53, no. 5, pp. 1203–1218, 2008.
  * [6] X. Tong, M. Chen, and F. Yang, “Passive and explicit attitude and gyro-bias observers using inertial measurements,” _IEEE Transactions on Industrial Electronics_ , vol. 68, no. 9, pp. 8942–8952, 2020.
  * [7] R. Hamrah, R. R. Warier, and A. K. Sanyal, “Finite-time stable estimator for attitude motion in the presence of bias in angular velocity measurements,” _Automatica_ , vol. 132, p. 109815, 2021.
  * [8] P. Pounds, T. Hamel, and R. Mahony, “Attitude control of rigid body dynamics from biased imu measurements,” in _2007 46th IEEE Conference on Decision and Control_. IEEE, 2007, pp. 4620–4625.
  * [9] J. R. Forbes, “Passivity-based attitude control on the special orthogonal group of rigid-body rotations,” _Journal of Guidance, Control, and Dynamics_ , vol. 36, no. 6, pp. 1596–1605, 2013.
  * [10] D. Thakur and M. R. Akella, “Gyro-free rigid-body attitude stabilization using only vector measurements,” _Journal of Guidance, Control, and Dynamics_ , vol. 38, no. 4, pp. 811–818, 2015.
  * [11] A. Khosravian and M. Namvar, “Rigid body attitude control using a single vector measurement and gyro,” _IEEE Transactions on Automatic Control_ , vol. 57, no. 5, pp. 1273–1279, 2011.
  * [12] T. H. Mercker and M. R. Akella, “Rigid-body attitude tracking with vector measurements and unknown gyro bias,” _Journal of guidance, control, and dynamics_ , vol. 34, no. 5, pp. 1474–1484, 2011.
  * [13] A. Tayebi, A. Roberts, and A. Benallegue, “Inertial vector measurements based velocity-free attitude stabilization,” _IEEE Transactions on Automatic Control_ , vol. 58, no. 11, pp. 2893–2898, 2013.
  * [14] A. Benallegue, Y. Chitour, and A. Tayebi, “Adaptive attitude tracking control of rigid body systems with unknown inertia and gyro-bias,” _IEEE Transactions on Automatic Control_ , vol. 63, no. 11, pp. 3986–3993, 2018.
  * [15] T. Lee, “Global exponential attitude tracking controls on so(3),” _IEEE Transactions on Automatic Control_ , vol. 60, no. 10, pp. 2837–2842, 2015.
  * [16] E. Espíndola-López and Y. Tang, “Global exponential attitude tracking for spacecraft with gyro bias estimation,” _ISA transactions_ , 2021.
  * [17] H. K. Khalil, “Nonlinear systems third edition,” _Patience Hall_ , vol. 115, 2002.
  * [18] P. A. Ioannou and J. Sun, _Robust adaptive control_. Courier Corporation, 2012.