A Geodesic Feedback Law to Decouple the Full and Reduced Attitude1footnote 11footnote 1This research was supported in part by the Swedish Foundation for Strategic Research and by the Royal Swedish Academy of Sciences.

# A Geodesic Feedback Law to Decouple the Full and Reduced Attitude111This research was supported in part by the Swedish Foundation for Strategic Research and by the Royal Swedish Academy of Sciences.

Johan Markdahl, Jens Hoppe, Lin Wang, Xiaoming Hu Luxembourg Centre for Systems Biomedicine, University of Luxembourg, Belval, Luxembourg
Department of Mathematics, KTH Royal Institute of Technology, Stockholm, Sweden
Department of Automation, Shanghai Jiao Tong University, Shanghai, China
###### Abstract

This paper presents a novel approach to the problem of almost global attitude stabilization. The reduced attitude is steered along a geodesic path on the -sphere. Meanwhile, the full attitude is stabilized on . This action, essentially two maneuvers in sequel, is fused into one smooth motion. Our algorithm is useful in applications where stabilization of the reduced attitude takes precedence over stabilization of the full attitude. A two parameter feedback gain affords further trade-offs between the full and reduced attitude convergence speed. The closed loop kinematics on are solved for the states as functions of time and the initial conditions, providing precise knowledge of the transient dynamics. The exact solutions also help us to characterize the asymptotic behavior of the system such as establishing the region of attraction by straightforward evaluation of limits. The geometric flavor of these ideas is illustrated by a numerical example.

###### keywords:
Attitude control, reduced attitude, geodesics, exact solutions, special orthogonal group.
journal: System & Control Letters

## 1 Introduction

The attitude tracking problem for a rigid-body is well-known in the literature. It is interesting from a theoretical point of view due to the nonlinear state equations and the topology of the underlying state space . Application oriented approaches to attitude control often make use of parameterizations such as Euler angles or unit quaternions to represent . The choice of parameterization is not without importance since it may affect the limits of control performance (mayhew2011quaternion, ; chaturvedi2011rigid, ; bhat2000topological, ). An often cited result states that global stability cannot be achieved on by means of a continuous, time-invariant feedback (bhat2000topological, ). It is however possible to achieve almost global asymptotic stability through continuous time-invariant feedback (chaturvedi2011rigid, ; sanyal2009inertia, ), almost semi-global stability (LeeSC, ), or global stability by means of a hybrid control approach (mayhew2011quaternion-based, ). These subjects have also been studied with regards to the reduced attitude, i.e., on the -sphere (bullo1995control, ; chaturvedi2011rigid, ). The problem of pose control on is strongly related to the aforementioned problems. Many of the previously referenced results can be combined with position control algorithms in an inner-and-outer-loop configuration to achieve pose stabilization (roza2012position, ).

Like (LeeSC, ; mayhew2011quaternion-based, ; chaturvedi2011rigid, ; sanyal2009inertia, ), this paper provides a novel approach to the attitude stabilization problem. The generalized full attitude is stabilized on . Meanwhile, the generalized reduced attitude is steered along a geodesic path on the -sphere. The motion of the reduced attitude is decoupled from the remaining degree of freedom of the full attitude but not vice versa. An action consisting of two sequential manoeuvres is thus fused into one smooth motion. This algorithm is of use in applications where the stabilization of the reduced attitude takes precedence over that of the full attitude. A two parameter feedback gain affords further trade-offs regarding the full and reduced attitude convergence speed. The kinematic model is suited for applications in the field of visual servo control (chaumette2006visual, ; chaumette2007visual, ). Consider a camera that is tracking an object. The goal is to keep the camera pointing towards the object whereas the roll angle is of secondary importance. The proposed algorithm solves this problem by steering the principal axis directly towards the object while simultaneously stabilizing the roll angles without resorting to a non-smooth control consisting of two separate motions.

While literature on the kinematics and dynamics of -dimensional rigid-bodies (e.g., (hurtado2004hamel, )) may primarily be theoretically motivated, the developments also provide a unified framework for the cases of . The generalized reduced attitude encompasses all orientations in physical space: the heading on a circle, the reduced attitude on the sphere, and the unit quaternions on the -sphere. Relevant literature includes works concerning stabilization (maithripala2006almost, ), synchronization (lageman2009synchronization, ), and estimation (lieobserver, ) on . It also includes the previous work (markdahl2014analytical, ; markdahl2013analytical, ) of the authors. Note that work on for is not only of theoretical concern; it also finds applications in the visualization of high-dimensional data (thakur2008, ).

Exact solutions to a closed-loop system yields insights into both its transient and asymptotic behaviors and may therefore be of value in applications. The literature on exact solutions to attitude dynamics may, roughly speaking, be divided into two separate categories. First, there are a number of works where the exact solutions are obtained during the control design process, e.g., using exact linearization (dwyer1984exact, ), optimal control design techniques such as the Pontryagin maximum principle (spindler1998optimal, ), or in the process of building an attitude observer (attitudeobserver, ). Second, there are studies of the equations defining rigid-body dynamics under a set of specific assumptions whereby the exact solutions become one of the main results (elipe2008exact, ; doroshin2012exact, ; ayoubi2009asymptotic, ). This paper belongs to the second category. The closed-loop kinematics on are solved for the states as functions of time and the initial conditions, providing precise knowledge of the workings of the transient dynamics.

Recent work on the problem of finding exact solutions to closed-loop systems on includes (markdahl2014analytical, ; markdahl2013analytical, ). Related but somewhat different problems are addressed in (elipe2008exact, ; doroshin2012exact, ; ayoubi2009asymptotic, ). Earlier work (markdahl2012exact, ) by the authors is strongly related but also underdeveloped; its scope is limited to the case of . This paper concerns a generalization of the equations studied in (markdahl2012exact, ; markdahl2013analytical, ). The results of (markdahl2013analytical, ) is also generalized in (markdahl2014analytical, ), partly towards application in model-predictive control and sampled control systems and without focus on the behavior of the reduced attitude. The work (markdahl2015automatica, ) addresses the problem of continuous actuation under discrete-time sampling. The exact solutions provide an alternative to the zero-order hold technique. The algorithm alternates in a fashion that is continuous in time between the closed-loop and open-loop versions of a single control law. The feedback law proposed in this paper can also be used in such applications by virtue of the exact solutions.

## 2 Preliminaries

Let . The spectrum of is written as . Denote the transpose of by and the complex conjugate by . The inner product is defined by and the Frobenius norm by The outer product of two vectors is defined as . The commutator of two matrices is and the anti-commutator is .

The special orthogonal group is . The special orthogonal Lie algebra is . The -sphere is . The geodesic distance between is given by . An almost globally asymptotically stable equilibrium is stable and attractive from all initial conditions in the state space except for a set of zero measure. The terms attitude stabilization, reduced attitude stabilization, and geodesic path refer to the stabilization problem on , the -sphere, and curves that are geodesic up to parametrization respectively.

Real matrix valued, real matrix variable hyperbolic functions are defined by means of the matrix exponential, e.g., is given by for all . Let denote the principal logarithm, i.e., , where and . Let denote the principal inverse hyperbolic tangent, i.e., . Note that satisfies for all . Extend these definitions to the extended real number line and the Riemann sphere by letting , , etc. (rudin1987real, ).

## 3 Problem Description

### 3.1 Stabilization and Tracking

The orientation or attitude of a rigid body is represented by a rotation matrix that transforms the body fixed frame into a given inertial fixed frame. Let denote this rotation matrix. The kinematics of a rigid body dictates that , where is a skew-symmetric matrix representing the angular velocity vector of the rigid body. The attitude stabilization problem is the problem of designing a feedback law that stabilizes a desired frame which without loss of generality can be taken to be the identity matrix.

The attitude tracking problem concerns the design of an that rotates into a desired moving frame . Assume that is generated by , where is known. Furthermore assume that the relative rotation error is known to the feedback algorithm. Note that rotating into is equivalent to rotating into . Moreover,

 ˙R =˙X⊤dX+X⊤d˙X=(ΩdXd)⊤X+X⊤dΩX=−X⊤dΩdXdR+X⊤dΩXdR (1)

where . The kinematic level attitude tracking problem in the case of known can hence be reduced to the attitude stabilization problem. It is also clear that attitude stabilization is a special case of attitude tracking.

From a mathematical perspective it is appealing to strive for generalization. Consider the evolution of a positively oriented -dimensional orthogonal frame represented by . The dynamics are given by

 ˙R =UR, (2)

where . The kinematic level generalized attitude stabilization problem concerns the design of an that stabilizes the identity matrix on . It is assumed that can be actuated along any direction of its tangent plane at the identity . Note that is invariant under the kinematics (2), i.e., any solution to (2) that satisfies remains in for all .

### 3.2 The Reduced Attitude

It is sometimes preferable to only consider of the degrees of freedom on . In the case of , these correspond to the reduced attitude (chaturvedi2011rigid, ). The reduced attitude consists of the points on the unit sphere . It formalizes the notion of pointing orientations such as the two degrees of rotational freedom possessed by objects with cylindrical symmetry. The reduced attitude is also employed in redundant tasks like robotic spray painting and welding that only require the utilization of two of the usual three degrees of rotational freedom in physical space (siciliano2008springer, ).

Reduced attitude control by means of kinematic actuation is a special case of control on the unit -sphere, . The generalized reduced attitude can be used to model all physical rotations. The heading of a two-dimensional rigid-body is an element of , the pointing direction of a cylindrical rigid-body is an element of , and the full attitude can be parametrized by through a composition of two maps via the unit quaternions .

Let be a vector expressed in the body-fixed frame of an -dimensional rigid body. The reduced attitude is defined as the inertial frame coordinates of , i.e., . The reduced attitude stabilization problem is solved by a feedback algorithm that can turn into any desired value . Note that . Assume that satisfies . Set . Turning into is equivalent to turning into . Moreover, , where , like in the case. The evolution of is controllable on (brockett1973lie, ).

Note that due to . The set has more than enough degrees of freedom to fully actuate . It suffices to express in terms of a control by letting . Then,

 ˙r (3)

where the identity for any is used. Since is arbitrary, can be actuated in any direction along its tangent plane , i.e., the hyperplane of vectors orthogonal to . The generalized kinematic level reduced attitude stabilization problem concerns the design of an that stabilizes .

Note that by setting , the dynamics (3) moves in the steepest descent direction of the geodesic distance in the case of a constant ,

 argminu∈Sn˙ϑ=argmaxu∈Snddt⟨v,r⟩=argmaxu∈Sn⟨v,(I−r⊗r)u⟩=v.

We say that a feedback is geodesic if it controls the system along a path of minimum length in the state-space, i.e., if there is a reparametrization of time that turns the state trajectory into a geodesic curve.

### 3.3 Problem Statement

This paper concerns the formulation and proof of stability of a control law that solves the problem of stabilizing the full attitude almost globally while simultaneously providing a geodesic feedback for the reduced attitude. In other words, we design a control signal such that is an almost globally asymptotically stable equilibrium of the full attitude and the reduced attitude moves towards along a great circle. Moreover, on , which is the most interesting case for application purposes, we also solve the closed-loop equations generated by the proposed algorithm for as a function of time, the initial condition, and two gain parameters.

## 4 Control Design

This section presents an algorithm that stabilizes the identity matrix on . The proposed algorithm is also shown to stabilize the generalized reduced attitude along a geodesic curve on the -sphere from all initial conditions except a single point.

###### Algorithm 1.

Let the feedback be given by

 U (4)

where , i.e., is a constant orthogonal projection, , and .

###### Remark 2..

The control gain is introduced to afford a trade-off between the reduced and full attitude convergence rates. Note that a second feedback gain parameter can be introduced by multiplying by some positive constant. This is equivalent to scaling time, wherefore a single parameter suffices.

The resulting closed loop system is

 ˙R =UR=P−RPR+kRQ(R⊤−R)Q. (5)

Note that is also an orthogonal projection matrix, i.e., and . Moreover, and satisfy the relations and ..

Consider the case of , where denotes the standard basis of . This is equivalent, up to a change of coordinates, to the case of . The dynamics of the reduced attitude are given by

 ˙r=e1−⟨e1,r⟩r, (6)

i.e., equation (3) with . This feedback results in moving towards along a great circle. The case of is further explored in Section 5 and 7.

The first skew-symmetric difference in (4) is designed to steer to . If , this control action suffices to stabilize the identity matrix. Otherwise, when is sufficiently small, the second skew-symmetric term kicks in to steer to . Intuitively speaking, in the case of , this can be interpreted as stabilization on followed by stabilization on , where the two control actions have been fused into one smooth motion. Since , if and , then .

###### Remark 3..

The algorithm of (markdahl2012exact, ) as well as the two algorithms of (markdahl2013analytical, ) are special cases of Algorithm 1. In (markdahl2012exact, ), and . In (markdahl2013analytical, ), , and or for the two respective algorithms. This paper explores the general case of and , with focus on projection matrices that satisfy . The case of is considerably simpler.

## 5 The Reduced Attitude

Let us show that (4) is a geodesic feedback for the reduced attitude in the special case of , which is equivalent to the case of up to a change of coordinates. Our objective is to turn the unit vector into by means of a continuous rotation about a constant axis. A stability proof in the case of a general orthogonal projection matrix is also given.

###### Proposition 4.

Set in Algorithm 1. The equilibrium of (6) is almost globally exponentially stable on . The unstable manifold corresponds to a single point that is antipodal to the desired equilibrium. Moreover, evolves from its initial value to along a great circle.

###### Proof.

Define a candidate Lyapunov function by

 V =12∥r−e1∥22=1−⟨e1,r⟩.

Then by (6). The equilibrium is almost globally asymptotically stable by application of LaSalle’s invariance principle and Lyapunov’s theorem. Local exponential stability follows from on the hemisphere .

The Euclidean metric and intrinsic arc length metric for any are related by for all . It follows that the gradients of and , defined using the metric tensor induced by the inner product in Euclidean space, are negatively aligned. Moreover, , so only moves in the steepest decent direction of , i.e., is a geodesic curve up to parametrization which makes a geodesic feedback.∎

###### Remark 5..

The problem of geodesic feedback as well as other control problems on the sphere such as dynamic level control and tracking on the -sphere are addressed in (bullo1995control, ). The work (brockett1973lie, ) explores the problems of controllability, observability, and minimum energy optimal control on the -sphere.

Consider the case of a general orthogonal projection matrix . Postmultiply by to find that

 ˙RP =P−(RP)2, (7)

where the -term in (5) is canceled due to . Note that and satisfy the following relations , where and denote matrix variable, matrix valued hyperbolic functions defined by replacing the exponential function in their scalar variable, scalar valued analogues by the matrix exponential. The matrix is nonsingular since .

###### Proposition 6.

The unique solution to as a trajectory in the homogeneous space

 H={H∈\mathdsRn×n|H=RP,R∈SO(n)} (8)

with initial condition is given by

 H(t)= [sinh(Pt)+cosh(Pt)H0][cosh(Pt)+sinh(Pt)H0]−1. (9)
###### Proof.

A proof of global existence and uniqueness is given by Lemma 23 in Appendix A. Denote , where , . It can be shown that is well-defined for all . Note that and . The proof is by verification that satisfies (7),

 ˙H(t) =˙X(t)Y(t)−1−X(t)Y(t)−1˙Y(t)Y(t)−1 =PY(t)Y(t)−1−X(t)Y(t)−1PX(t)Y(t)−1 =P−H(t)PH(t)=P−H(t)2.

Moreover, .∎

Introduce the set of rotation matrices with partly negative spectrum,

 N={R∈SO(n)|−1∈σ(R)}.

Observe that is a set of zero measure in . One can show that in the case of , but such a relation does not hold in higher dimensions as illustrated by the matrix

which belongs to for all , where .

###### Proposition 7.

The system over the homogeneous space given by (8) converges to the equilibrium manifold . The equilibrium is almost globally asymptotically stable.

###### Proof.

Consider the candidate Lyapunov function . Since

 ˙V=−tr(P−H2)=−p+p∑i=1λ2i=−p+p∑i=1a2i−b2i,

where and for are eigenvalues of (the eigenvalue zero has at least algebraic multiplicity ). Note that , where is the spectral radius of , implies . It follows that

 ˙V≤−p+p∑i=11−b2i−b2i=−2p∑i=1b2i,

which is negative semidefinite. The spectrum of converges to as time goes to infinity by LaSalle’s invariance principle.

Note that if is an eigenpair of with , then , . Let be a linearly independent set of eigenvectors with that maximizes . Since is normal, there is a basis of where are eigenpairs of with for and for . Clearly, if and

 (P−H2)vi=(1−λ2)v=0

if . The matrix maps a basis of to zero, and is therefore zero. It follows that converges to .

Lemma 24 in Appendix A tells us that implies . Suppose . Proposition 6 and some calculations yield

 limt→∞PR(t)P= limt→∞P[tanh(t)I+PR0P][I+tanh(t)PR0P]−1=P, limt→∞QR(t)P= limt→∞QR0P[cosh(Pt)+sinh(Pt)R0P]−1=0,

which implies since . The matrix is an almost global attractor due to being a set of zero measure in . ∎

## 6 The Full Attitude

To establish almost global asymptotic stability poses a challenge since the set of undesired equilibria is spread out through . The proof consists of four parts: (i) LaSalle’s invariance principle is used to characterize the set of all equilibria ; (ii) the local stability properties of each equilibria is studied using the indirect method of Lyapunov; (iii) by normal hyperbolicity of , it is shown that the -limit set of any system trajectory is a singleton; and finally, by (ii) and (iii) it becomes possible to draw conclusions regarding the global behavior of the system based on a local analysis of all .

### 6.1 LaSalle’s Invariance Principle

Let us show that converges to an equilibrium set consisting of symmetric rotation matrices.

###### Proposition 8.

The closed-loop dynamics generated by Algorithm 1 converges to the set of equilibria given by

 M={R∈SO(n)|R⊤=R,[R,P]=0}⊂{I}∪N.
###### Proof.

Consider the candidate Lyapunov function whose time-derivative satisfies

 ˙V =−trP2+⟨P,R2⟩−k∥QRQ∥2F+ktr(QRQ)2 =−∥P∥2F+⟨P,R2⟩−k∥QRQ∥2F+k⟨QR⊤Q,QRQ⟩. (10)

The inequality , where and denotes the nuclear norm, implies that . The Cauchy-Schwarz inequality gives , i.e., is negative semidefinite.

The matrix converges to the largest invariant set satisfying and by LaSalle’s invariance principle. The latter equality gives whereas the former yields after some calculations. To that end, let , where , express the spectral decomposition of . Then implies which requires , i.e., , due to being diagonal and .

Let us show that the closed loop system converges to a set of equilibria. Proposition 7 implies that asymptotically, which implies . Substitute to obtain , whereby

 RPR=PRPR=(R⊤PR⊤P)⊤=(RPRP)⊤=P.

From and it follows that given by (5) is the zero matrix, i.e., the system converges to a set of equilibria.

Take any eigenpair of . Since gives , it follows that

 λ∥Pv∥22 =λ⟨Pv,Pv⟩=⟨λPv,v⟩=⟨PRv,v⟩=⟨R⊤Pv,v⟩

it either holds that or . Consider the latter case. Then whereby . So , whereby . Let denote a spectral factorization of . Clearly , i.e., is symmetric. Moreover, implies that .∎

###### Remark 9..

It can be shown that , where is given by (10), which bounds the -norm of as .

###### Proposition 10.

The equilibrium set in Proposition 8 admits a decomposition as a finite union

 M =⎛⎝⋃i∈E(n)Mi∩P⎞⎠∪{I},

where

 Mi ={R∈SO(n)|R⊤=R,V(R)=2i}, P ={A∈\mathdsRn×n|[A,P]=0},

, and . Each differentiable manifold is path connected and separated by a continuous function from the others. The -limit set of any solution to (5) either equals or is a subset of for some .

###### Proof.

The elements of the set are symmetric by Proposition 8. Let have algebraic multiplicity . Then , i.e., .

Let . Form a curve from to by . Since , we need to use a non-principal matrix logarithm to calculate . Let the branch-cut of be non-real. We may write , since and have real non-principal matrix logarithms (culver1966existence, ). Note that is a symmetric rotation matrix; each factor is a matrix function of a symmetric matrix and hence symmetric (higham2008functions, ),

 Z⊤(t)= exp[t2logY]⊤exp[(1−t)logX]⊤exp[t2logY]⊤ = exp[t2logY]exp[(1−t)logX]exp[t2logY]=Z(t), Z⊤(t)Z(t)= exp[−t2logY]exp[−(1−t)logX]exp[−t2logY]⋅ exp[t2logY]exp[(1−t)logX]exp[t2logY]=I, detZ(t)= etrtlogYetr(1−t)logX=1,

for all . Since is symmetric, it follows that . The trace function is continuous but only assumes integer values on the set of symmetric rotation matrices, i.e., for all implying that . Moreover, by (higham2008functions, ) wherefore , thereby establishing that is path connected.

Let denote the -limit set of a solution of (5) and suppose for some . Recall that decreases in time, as is clear by (10) and that for any . Since is separated by from and , there exists some finite time at which is close enough to that it cannot come arbitrarily close to for any such that at a later time without violating the decreasingness of , i.e., . Likewise, for all such that or else by repetition of the same reasoning with replaced by . It follows that or by Proposition 8 and 10.∎

LaSalle’s invariance principle is used in Proposition 8 to establish convergence to a set of equilibria. It remains to determine the region of attraction of the identity matrix . Since decreases in time by (10) and achieves its minimum at , it is clear that due to . On , wherefore . The trace function achieves its global minimum over on . The general case of is less straightforward since contains many saddle points of the trace function, as is illustrated by Example 11.

###### Example 11.

Any with is a global minimizer of the trace function, a fact that can be used for stability analysis. By contrast, consider a sequence where

 σ(Ri)={exp(iϑ),exp(−iϑ),exp(iφ),exp(−iφ)}.

The sequence of spectra obtained by setting , converges to as goes to infinity with

 tr(Ri)=2(cos1n−cos1n+1),

which approaches zero from below. It follows that is not even a local minimizer of the trace function.

### 6.2 The Indirect Method of Lyapunov

A first step towards characterizing the global stability properties of the closed-loop system (5) is to study local stability by linearizing the dynamics on . The indirect method of Lyapunov can then be used to determine stability and instability.

###### Proposition 12.

The linearization on of the closed-loop system given by (5) at an equilibrium is

 ˙X=−XPR−RPX+kRQ(X⊤−X)Q, (11)

where for some .

###### Proof.

Consider a smooth perturbation of a solution given by , where and . The perturbed solution is required to be a smooth function that satisfies (5) with . Then represents the part of the perturbed solution that is linear in . The linearizion on at is given by

 ˙X= d2dtdεR(t,ε,S)∣∣ε=0=d2dεdtR(t,ε,S)∣∣ε=0=ddε˙R(t,ε,S)∣∣ε=0 = ddε{P−exp(εS)R