Satellite Attitude Control Using Analytical Solutions to Approximations of the Hamilton-Jacobi Equation

The solution to the Hamilton-Jacobi equation associated with the nonlinear H ∞ control problem is approximated using a Taylor series expansion. A recently developed analytical solution method is used for the second-, third-, and fourth-order terms. The proposed controller synthesis method is applied to the problem of satellite attitude control with attitude parameterization accomplished using the modified Rodrigues parameters and their associated shadow set. This leads to kinematical relations that are polynomial in the modified Rodrigues parameters and the angular velocity components. The proposed control method is comparedwith existingmethods from the literature through numerical simulations. Disturbance rejection properties are compared by including the gravity-gradient and geomagnetic disturbance torques. Controller robustness is also compared by including unmodeled firstand second-order actuator dynamics, as well as actuation time delays in the simulation model. Moreover, the gap metric distance induced by the unmodeled actuator dynamics is calculated for the linearized system.The results indicated that a linear controller performs almost as well as those obtained using higher-order solutions for the Hamilton-Jacobi equation and the controller dynamics.


Introduction
The attitude control problem is critical for most satellite applications and has thus attracted extensive interest.While many control methods have been developed to address this problem, most of them are concerned primarily with the optimality of attitude maneuvers [1][2][3][4].In the present work, we shall focus on robust nonlinear control systems.We note that, throughout this paper, by nonlinear H ∞ we mean the L 2 -gain of a nonlinear system.
Control laws are generally developed based on mathematical models that are, at best, a close approximation of real-world phenomena.For such control methods to have any real practical value, they must be made robust with regard to unmodeled dynamics and disturbances that may act on the system.The study of robust control is therefore an essential part of the application of control theory to physical systems.In general, the development of an optimal nonlinear state feedback control law is characterized by the solution to a Hamilton-Jacobi partial differential equation (HJE) [5], while a robust nonlinear controller is obtained from the solution of one or more Hamilton-Jacobi equations [6][7][8][9].However, no general analytical solution has yet been obtained to solve this optimization problem.Solutions have thus far only been obtained under certain conditions: in the case of linear systems with a quadratic performance index, the HJE reduces to the well-known algebraic Riccati equation (ARE).It is noted that the concept of dissipativity, which is closely related to optimal and robust control, is characterized by a Hamilton-Jacobi inequality [10][11][12].
Extensive work has been carried out to approximate the solution of Hamilton-Jacobi equations through a Taylor series expansion [13][14][15][16][17].Although such a series expansion results in an infinite-order polynomial, finite-order approximations can be used to obtain suboptimal solutions to an HJE.We also note the work in [18,19] which uses series solution methods for nonlinear optimal control problems.It has been shown that a local solution to an HJE can be obtained by solving the ARE for the linear approximation of the system [6,7,20].Methods that have been developed over the past decades to attempt to solve this problem include the Zubov procedure [21,22], the state-dependent Riccati equation [23,24], the Galerkin method for the equivalent sequence of firstorder partial differential equations [25,26], and the use of symplectic geometry to examine the associated Hamiltonian system [27].However, one aspect that is lacking in all the above methods is an analytical solution to the approximate equations.
The primary purpose of this paper is to develop robust nonlinear controllers based on analytical expressions for approximate solutions to the Hamilton-Jacobi equation.In particular, we shall provide analytical expressions for the second-, third-, and fourth-order terms of the approximation solution.These controllers are then compared through numerical simulations with existing methods from the literature for spacecraft attitude regulation [1][2][3][4].Our objective is to examine the effects of different disturbances and uncertainties on the performance and robustness of the various controllers.More specifically, we include gravitygradient and geomagnetic torques, as well as unmodeled actuator dynamics and actuation time delays.Moreover, we make use of the gap metric [28] to characterize the difference in the input-output (IO) map of the system induced by the unmodeled actuator dynamics.However, since we cannot calculate the gap between two nonlinear systems, we calculate the gap metric distance for the linearized system only.In contrast with some of the methods used for comparison, which were developed specifically to address the attitude control problem, the method presented in this paper is a general controller synthesis method and has also been applied to spacecraft formation flying [29].
The outline of the paper is as follows.In Section 2, a detailed description of the general class of systems is given, along with the controller synthesis method that is proposed.This controller is the solution of an appropriate nonlinear H ∞ problem and is taken from the work of James et al. [9].Then, the nonlinear equations of motion for the satellite attitude dynamics are given in Section 3. Section 4 presents simulation results using the proposed controller and comparisons are made with existing methods.Finally, some conclusions and suggestions for future work are stated in Section 5. We note here that some of these results also appear in past conference proceedings [30,31] with the present paper containing improvements to the overall presentation.

Nonlinear Controller Synthesis Approach
This section provides the main results of our approach to robust nonlinear controller synthesis.We begin by describing the class of nonlinear systems with which we are concerned and define robustness in the gap metric.Then, the nonlinear H ∞ control problem is presented.Finally, the analytic solutions for the second-, third-, and fourth-order terms in the Taylor series approximation to the solution of the Hamilton-Jacobi equation (HJE) are stated.

Class of Nonlinear Systems.
Consider the nonlinear system shown in Figure 1.The plant is given by where a(x), b(x), and c(x) are assumed to be smooth (i.e.,  ∞ ) nonlinear functions of the plant states with a(0) = 0 and c(0) = 0 (i.e., x() = 0 is an equilibrium).The controller is described by where a  (x  ), b  (x  ), and c  (x  ) are smooth nonlinear functions of the controller states.Additionally, the following relations hold: In the above, x() ∈ R  is the plant state vector, x  () ∈ R   is the controller state vector, u 2 () ∈ R   is the control signal, u 0 () ∈ R   is the exogenous (disturbance) input, u 1 () ∈ R   is the actual plant input, y 1 () ∈ R   is the actual plant output, y 0 () ∈ R   is the reference and/or sensor noise signal, and y 2 () ∈ R   is the tracking error.The plant in (1) can be written as where The generalized system in ( 4) is shown in Figure 2. The first equation in ( 4) defines the plant dynamics with state variable x(), control input u(), and subject to a set of exogenous inputs w(), which includes disturbances (to be rejected), references (to be tracked), and/or noise (to be filtered).The second equation defines the penalty variable z() representing the outputs of interest, which may include a tracking error, a function of some of the exogenous variables w(), and a cost of the input u() needed to achieve the prescribed control goal.The third equation defines the set of measured variables y(), which are functions of the plant state x() and the exogenous inputs w().As we shall see next, we will be concerned with defining an upper bound on the L 2 -gain from the disturbance inputs w() to the outputs z() of the system in (4).

Robustness in the Gap Metric.
In general, the plant and controller are assumed to be causal mappings from their respective inputs and outputs; that is, P : U → Y and K : Y → U, which satisfy P0 = 0 and K0 = 0, where U and Y are appropriate signal spaces.In particular, these mappings can be represented by ( 1) and ( 2).Thus, in the feedback configuration of Figure 1, the signals u  belong to U and the signals y  belong to Y, where  ∈ {0, 1, 2}.The input-output relations describing the plant and controller can be represented by their respective graphs: where G P , G K ⊂ W = U × Y.For a plant P 0 with M 0 := G P 0 and a plant P 1 with M 1 := G P 1 , the -gap between these two plants is defined as [9,28]   (P 0 , P 1 ) = max { ⃗   (P 0 , P 1 ) , ⃗   (P 1 , P 0 )} , (7) where and ⃗   (P 1 , P 0 ) is similarly defined.The norm used here, ‖(⋅)‖, is defined in [9].
It has been shown [9,32] that, for a stable feedback pair (P 0 , K), if a system P 1 is such that then the feedback system (P 1 , K) is also stable.The symbol Π N‖M defines a parallel projection operator [32] and represents the closed-loop mapping from the disturbances w() to the outputs z() shown in Figure 2. The L 2 -gain of Π N‖M is the induced norm defined by where the L 2 -norm is defined by ‖z‖ 2 = √∫ ∞ 0 z  z .Thus, to minimize the effects of the disturbances w() on the outputs z(), which simultaneously achieves optimal robustness, the objective is to design a controller K such that ‖Π N‖M 0 ‖ ∞ is minimized.However, no closed-form solution exists to this optimal control problem.Instead, we shall be concerned with the suboptimal problem: given some constant scalar , design K such that ‖Π N‖M 0 ‖ ∞ < .Note that a -iteration procedure can be applied to obtain the optimal solution within an arbitrary tolerance.It will be shown that the controller that satisfies this objective can be obtained from the solution to a single Hamilton-Jacobi equation.

Nonlinear H ∞ Control Problem.
As indicated in the previous subsection, we are concerned with rendering ‖Π N‖M 0 ‖ ∞ < .In other words, we wish to bound the L 2gain from the disturbance inputs w() to the outputs z() of the system in (4).Without providing the details, it is noted that the HJE corresponding to (4) is dependent on  and the quadratic term is sign-indefinite (i.e., is neither positive definite nor negative definite).However, by performing a certain transformation [9,33], the generalized system can be written in a form where the outputs z() are not explicit functions of the disturbances w().The resulting HJE is no longer dependent on  and is sign-definite.The system resulting from this transformation is described by where  = √1 −  −2 .Now, the HJE corresponding to the system in (11) is given by where ∇(x) is the Jacobian matrix of the storage function (x) and is defined as with row  {⋅} denoting a row matrix in the index  ∈ {1, 2, . . ., }.For the system in (11), we have the parameters [9] A (x) = a (x) , The name used in the literature for the HJE in ( 12) is not uniform.In the context of robust control, it is sometimes referred to as the Hamilton-Jacobi-Isaacs equation and when used in nonlinear optimal control it is often referred to as the Hamilton-Jacobi-Bellman equation.In [9] it is referred to as the Hamilton-Jacobi-Bellman-Isaacs equation.We will simply call it the HJE.It is shown in [9] that the controller K that solves the suboptimal H ∞ problem for the plant P ⋆ (i.e., renders ‖Π N‖M 0 ‖ ∞ < ) is related to that (call it K) which solves the same problem for the modified plant P ⋆ as follows: K = K.We now construct this K. Denote by  + (x) the unique smooth solution to the HJE (12) that satisfies  + (x) ≥ 0 and  + (0) = 0, with asymptotically stable.Similarly, we denote by  − (x) the unique smooth solution to the HJE that satisfies  − (x) ≤ 0 and  − (0) = 0, with asymptotically stable.Following the approach of James et al. [9], a local solution to the nonlinear H ∞ control problem for the plant in ( 4) is obtained if the following conditions are satisfied.
(2) There exists a  3 negative-definite function  − (x) defined in a neighbourhood of the origin with  − (0) = 0 that satisfies the HJE (12), and additionally satisfies where (3) There exists a  2 function G 2 (x) such that in a neighbourhood of the origin.
The resulting nonlinear controller is given by In the next subsection, we shall examine how to obtain analytical expressions for the approximate solution to the HJE in (12) required for this control law.

Analytical Solutions to HJE Approximation.
Our approach for the synthesis of nonlinear controllers is based on the Taylor series approximation of the solution to the Hamilton-Jacobi equation, where each order of the controller is built using the previous orders.The following notation will be used: row  {⋅} denotes a row matrix with index , col  {⋅} denotes a column matrix with index , and mat  {⋅} denotes a matrix with row index  and column index .It should be emphasized that the symbols , , and  used here are dummy indices.In general,  (,) refers to the (, )th entry of the matrix A. We will denote the positive-semidefinite solution  + (x) of the HJE (12) simply by (x).
Consider the nonlinear system in (1).We begin by making the assumptions that b(x) = B and c(x) = Cx, where B and C are constant matrices.From these assumptions, R(x) is a constant matrix, which we will denote simply by R = BB  , and Q(x) is a quadratic form, which we will write as x  Qx, where Q = C  C. Thus, the only nonlinearities present are in the system a(x) matrix.For the purpose of the results to be presented, this nonlinear function will be approximated to fourth order.It should be noted that some of these terms may be zero, depending on the system considered.Therefore, we have the following approximation: where and the summations run from 0 to .Here, A 1 , A 2 , A 3 , and A 4 are families of × square matrices.We shall also find it useful to define the column matrices a 2 = col  { (,) 2 } and a 3 = col  { (,) 3 } whose entries can be used to form A 2 and A 3 , respectively.
Additionally, consider a storage function (x) for which where Here, P 1 , P 2k , P 3 , and P 4 are families of  ×  square matrices.In general,  (,) refers to the (, )th entry of the matrix P. We shall also find it useful to define the column matrices p 2 = col  { (,) 2 } and p 3 = col  { (,) 3 } whose entries can be used to form P 2 and P 3 , respectively.
It is important to recognize that, while a  (x) may be zero for some , the corresponding ∇  (x) is not necessarily zero as well.This is because the present method involves a Taylor series expansion of the nonlinear solution to the HJE.Substituting ( 21) and ( 23) into the HJE in (12) and grouping terms of the same order yields for  ≥ 3, where for  ≥ 2. Thus, at each order , the objective is to solve for the unknown ∇ (−1) .Note that in (26) the summation term is equal to zero for  = 3, since  >  − 2.
We now present the general expressions to compute the unknowns ∇ (−1) in (23).The first-order solution, P 1 = P   1 , is obtained by solving the ARE corresponding to (25), which is given by where it has been noted that R = BB  and Q = C  C. We will assume that (A 1 , B) is controllable and (C, A 1 ) is observable so that P 1 is positive definite.Then, the higher-order solutions are obtained by solving (26) recursively for increasing values of .
The second-order solution is given by where the column matrices p 2 and a 2 were defined above.We emphasize that the multiplications indicated in (28) are standard matrix multiplications.The third-order solution is given by where a 2 = a 2 − (1/2)BB  p 2 .Here, mat  { (,) 3 } consists of a square matrix (with row index  and column index ) containing the (, )th entries of each P  for given  and .Again, all of the indicated multiplications are standard matrix multiplications.
The fourth-order solution is given by where a 3 = a 3 − (1/2)BB  p 3 .Similar comments on the multiplications involved above apply here.The negative-semidefinite solution of the HJE,  − (x), can be determined using ( 23)- (30) with the proviso that the matrix P 1 is replaced with the negative-definite solution of the Riccati equation in ( 27) which we will denote by Q 1 and A 1 is replaced by A 1 = A 1 − BB  Q 1 .The matrices corresponding to those in (24) will be denoted by Q 1 , Q 2 , Q 3 , and Q 4 and they are obtained by solving ( 27)- (30) with Q 1 replacing P 1 , q 2 replacing p 2 , and so forth.In the next section, the satellite attitude dynamics are presented.

Attitude Dynamics and Control
3.1.The Attitude Dynamics and Kinematics.The attitude dynamics of a rigid spacecraft are given by Euler's equation: where  = [ 1  2  3 ]  are the body angular velocities, I is the moment of inertia matrix, and u 1 = [ 1  2  3 ]  are the body torques.The notation  × is the matrix representation of the cross product and is defined as While many representations are possible to define the spacecraft attitude kinematics, the modified Rodrigues parameters (MRPs) are chosen here because they are polynomial in the states, which fit nicely with the present controller synthesis approach, and they possess neither singularities nor norm constraints when used in conjunction with the shadow parameters.The MRP vector  = [ 1  2  3 ]  can be defined in terms of the principal rotation axis ê = [ 1  2  3 ]  and principal rotation angle Φ of Euler's theorem according to ) .
The attitude kinematics using MRPs are defined by where 1 is the identity matrix.Upon closer inspection of (33), it is seen that the MRPs encounter a singularity for rotations of Φ = ±2 rad.This corresponds to a complete rotation in either direction about the principal axis.To circumvent this, another set of MRPs, called the shadow parameters and denoted by   , is used in conjunction with the regular MRPs.By switching from one set to the other at rotations of Φ = ± rad, it is possible to avoid any singularities.The parameter switching occurs on the surface defined by The kinematics are identical for both the regular and the shadow parameters.However, when the switching surface is encountered, both the MRPs and their rates must be converted from one set to the other.This can be accomplished with the following relations: More details can be found in the text by Schaub and Junkins [34].Defining the state vector and grouping terms of the same order, the attitude dynamics in (31) and kinematics in (34) can be expressed as where and the second-and third-order terms are given by respectively.It should be noted that these third-order attitude dynamics are exact so that we may take a 4 (x) = 0 and hence A 4 = 0.

The Attitude Controller.
In this section, the proposed controller synthesis methods will be applied to the satellite attitude dynamics given by ( 37)-(39).For simplicity, we shall assume that the dynamics are formulated in principal axes so that the inertia matrix is given by I = diag{ 1 ,  2 ,  3 }.Let us begin by comparing the definitions of a 2 and a 3 in ( 22) with the specific ones given in (39).From this, we identify the nonzero elements of the matrices A 2 and A 3 as follows: where (41) Given the definitions of A 1 , B, and C in (38), the positivedefinite solution of the algebraic Riccati equation in ( 27) is easily determined.The nonzero elements are given by The negative-definite solution (nonzero elements) is given by The corresponding closed-loop matrices A 1 = A 1 − BB  P 1 and A 1 = A 1 − BB  Q 1 are readily determined: Using the above quantities, the entries in P 2 (via p 2 ), P 3 , and P 4 can be calculated using ( 28), (29), and (30).The same equations can be used to determine Q 2 (via q 2 ), Q 3 , and Q 4 with P 1 replaced with Q 1 and A 1 replaced with A 1 .The dynamic controller in (20) can be made specific to the attitude control problem: where a(x  ) is determined using (22) in conjunction with (40) and (41) and ∇  + (x  ) is determined using (24) and the solutions in ( 27)- (30).The observer gain G  (x  ) which is defined by ( 19) can be determined as follows.Since,  2 (x) =  −2  + (x) +  2  − (x), we have used (24): Using this in (19) yields the following expression for the observer gain: The condition in (17) needs to be satisfied in a region of the origin.Using the lowest order terms in the expansions for A = a(x), ∇ + , ∇ − , and ∇ 2 , the Hessian matrix defined by ( 17) is given by which must be negative definite.This condition limits the chosen value of .In the sequel, we shall refer to the controller in (45) as the H ∞ controller of order , where  is the order of the approximation adopted for a(x), ∇ + , ∇ − , and ∇ 2 in determining G 2 .

Numerical Example and Comparisons
In this section, the nonlinear controller presented above is compared through numerical simulations with existing methods from the literature for spacecraft attitude regulation.The purpose of these comparisons is to examine the effects of different disturbances and uncertainties on the performance and robustness of the various controllers.In particular, we include gravity-gradient and geomagnetic torques, as well as unmodeled actuator dynamics and actuation time delays.
In addition to these comparisons, we make use of the gap metric [28] to characterize the difference in the input-output (IO) map of the system induced by the unmodeled actuator dynamics.
The simulation parameters are as follows.The satellite is in a circular orbit with an inclination of  = 87 degrees and a longitude of the ascending node of Ω = 0.The initial value of the argument of latitude is zero.The altitude is 700 km and we take   = 6378.14km for the Earth's radius.These orbital parameters will be used to determine the gravity-gradient and geomagnetic disturbance torques acting on the spacecraft.The spacecraft position in the geocentric inertial frame, r  (), is determined using a simple Keplerian model.The gravitygradient torque is then given by u 0 = 3(/ 5 )r ×  Ir  , where  is the geocentric gravitational parameter,  = √r   r  , and r  = C  r  , where the rotation matrix relating the body-fixed frame to the inertial frame may be expressed in terms of the MRPs as For the purposes of the geomagnetic disturbance torque, the satellite is assumed to generate a magnetic dipole of m = [0.1 0.1 0.1]  A⋅m 2 .The magnetic field model is the tilted dipole model, B  (r  ), presented in [35], where B  are the geomagnetic field components expressed in the geocentric inertial frame.The geomagnetic disturbance torque is given by u 0 = m × C  B  .The satellite inertia matrix is given by I = diag{10.0,6.3, 8.5} kg⋅m 2 .In all comparisons, we consider the regulation problem only, hence y 0 = 0 and the input to the controller is y 2 = −y 1 = −Cx = −x.Hence, we assume perfect measurements of the state.
In the case of the disturbance rejection comparisons, the simulations start from the desired attitude and we compare the ability of the different controllers to maintain that attitude.For all other comparisons, the initial states are chosen from Schaub et al. [2] to be (0) = [1.40.9 0.8]  rad/s and (0) = [0.870 0]  .These initial conditions have the satellite oriented almost  rad from the desired attitude with large angular velocities moving it towards this upside-down attitude.All simulations will be performed for one orbit using a 4th-order Runge-Kutta numerical integration method with a step-size Δ = 0.01 s.The H ∞ controllers are designed with  = 4.0, which was chosen to satisfy the linear version of the condition in (17); that is, such that the matrix in ( 48) is negative definite.
The methods to be used, in addition to the H ∞ controllers of the previous section, are the linear and nonlinear proportional-derivative (PD) laws of Tsiotras [1], the openloop (OL) optimal control method by Schaub et al. [2], the closed-loop (CL) optimal nonlinear method of Tewari [3], and the sum of squares (SOS) approach of Gollu and Rodrigues [4].In order to gauge the performance and properly compare the different controllers, we will use the following metrics: where is the orbital period,  rms is the RMS tracking error, and  rms is the RMS control torque (note that −u 2 are the control torques).

Existing Control Methods.
We now provide a brief overview of the controller synthesis methods to be used for comparisons with our method.The interested reader is referred to the appropriate literature for a more detailed exposition of these methods.

Proportional-Derivative Controllers.
Tsiotras [1] developed two proportional-derivative (PD) control laws for the attitude control problem.The linear PD controller is given by while the nonlinear version is given by

Open-Loop Optimal Control.
The optimal control method presented by Schaub et al. [2] is designed to minimize the cost function where  1 and  3 are scalar weights, K 2 , K 4 , and R are weighting matrices, and The Hamiltonian relating to this optimal control problem is defined as where we have used the plant model in ( 1) and the second relation of ( 3) with y 1 = 0.The costates, denoted by Λ, have dynamics Note that the costates are specified at some final time   , not the initial time.The optimal control law for this problem is determined from which yields The primary disadvantage of this method from a practical point of view is that it requires the solution of a two-point boundary value problem (TPBVP) and results in an openloop control strategy.For the simulation results presented below, the following weighting parameters are used:  1 = 5.0, K 2 = 5.01,  3 = 1.0,K 4 = 1, and R = 1.Moreover, the maneuver is optimized for a final time   = 60 s.

Closed-Loop Optimal Controller.
The optimal control method presented by Tewari [3] is based on obtaining an exact analytical solution to the Hamilton-Jacobi equation.Consider the HJE in ( 12) with parameters [2] ] [2] ] , where the inertia matrix is defined as I = diag  {  }, R = diag  {  } is symmetric and positive definite, Q is symmetric and positive semidefinite, and It is assumed that (x) has the same form as Q(x); thus, [2] ]  [ P 11 P 12 P 21 P 22 ] ⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟ P [ x x [2] ] , where P is symmetric and positive definite.The state feedback controller is given by where ∇  (x) = P 11 x + 2diag  {  } P 12 x + P 12 x [2]   + 2diag  {  } P 22 x [2] . (61) The matrix P is obtained as follows.First, P 11 is calculated from the algebraic Riccati equation in (27) corresponding to the parameters in (58), that is, with R in (27) replaced by BR −1 B  and Q in (27) replaced by Q 11 .Then, the equations in (26) with  = 3, . . ., 6, are solved simultaneously for the remaining unknowns.In particular, the nonzero elements of the matrices P 12 and P 22 are where, as before, For the simulation results presented below, the following weighting parameters are used [3]: We now make a few remarks regarding the characteristics of the synthesis method of Tewari [3].Like the controller presented in this paper, Tewari's closed-loop optimal method results in a polynomial feedback controller.However, his solution is derived specifically for the attitude control problem.In contrast, the method developed in the present paper is applicable to a wider class of systems.

Sum of Squares Controller.
A multivariate polynomial (x) is a sum of squares (SOS) if there exist some polynomials   (x),  = 1, . . ., , such that The SOS controller synthesis approach relaxes the search for positive-or negative-definite functions to a search for SOS functions.It should be noted, however, that the use of sums of squares is conservative, since (x) being SOS implies that (x) ≥ 0, while the converse is not true in general.Also, it can be shown that if k  P(x)k is SOS for k ∈ R  , then P(x) ≥ 0 for all x ∈ R  [36].
In applying the SOS controller synthesis method, we first rewrite the system in (1) as where we have used the second relation of ( 3) with y 1 = 0. Note that the matrix A(x) is not unique.The SOS state feedback controller for this problem is given by [4] where we note that P is now taken to be constant (state independent).Consider the Lyapunov function Taking the time derivative of this function along the trajectories of the system in (65) with the controller of (66) yields Using the change of variables x = Pk, this last expression can be written as The conditions (x) > 0 and V(x) < 0 can be replaced by the conditions that P is positive definite and − V(x) is SOS.The second of these conditions will be strengthened to −[ V(x) + (x)] being SOS, where (x) is some SOS function.This semidefinite programming (SDP) problem can then be written as follows: find P, K (x) ,  (x) This optimization problem can be solved using the SOS-TOOLS software package [37].

Disturbance Rejection.
We begin by comparing the controllers presented in this paper with the methods from the literature with regard to disturbance rejection.The two disturbances considered here are the gravity-gradient and geomagnetic torques.For the purposes of this comparison, the simulations start from the desired attitude (i.e., y 0 = 0) and we compare the ability of the different controllers to maintain that attitude over one complete orbit.Table 1 presents values of the performance metrics for the different controllers.
The optimal control method of Schaub et al. [2] is not included in the table because it is unable to reject any disturbances, which is entirely due to its open-loop nature.There is no apparent difference in performance between the linear and nonlinear PD controllers.There is also very little difference between any of the nonlinear H ∞ controllers developed using the present method.This is due to the very small magnitude of these disturbance torques, which the linear term in the controller can effectively overcome.With regard to disturbance rejection, the present H ∞ controllers do not perform as well as the existing methods.

Response to Initial Conditions.
In this and the following subsections, the disturbance torques are set to zero and the nonzero initial conditions noted at the beginning of this section are applied.All of the resulting controllers described previously are stable.
The resulting attitude and control torques when the fourth-order H ∞ controller is applied are given in Figures 3 and 4. The MRP switching can clearly be seen in Figure 3, where we also note that it requires several rotations for the controller to sufficiently slow down the spacecraft.This is due to the small torques applied, as seen in Figure 4.It is important to note that the control torques are continuous, which is a result of the dynamic aspect of the controller developed in this paper.Once again, there is little to distinguish the behaviour of the H ∞ controllers of varying order of approximation.This will be discussed further after the robustness of these controllers has been assessed.

Robustness to Actuation Time Delay.
The robustness properties of the different controllers are now examined with regard to a time delay in the actuation.Such a delay could represent the finite time required by a satellite on-board computer to take the sensor measurements and calculate the required control signal.The time delay is made equal to an integer number of the numerical integration step-size Δ.Table 2 indicates the maximum allowable time delay, ℎ max , for each controller such that the desired attitude maneuver is achieved within one orbit.As can be seen from these results, the four H ∞ controllers are more robust with regard to this effect than the other control methods.In particular, the present fourth-order H ∞ controller is the most robust.We also note that the open-loop method of Schaub et al. [2] has no robustness to this effect; the time delay results in a    nonzero final angular velocity such that the system will rotate endlessly.

Robustness to Unmodeled Actuator Dynamics.
The robustness properties of the different controllers are now examined with regard to unmodeled actuator dynamics.For the purposes of this study, we make use of first-and secondorder actuator models.In practice the actuator dynamics may be far more complex than the ones used here.However, we use these simple models here for the purposes of studying the capabilities of the different control methods.Evidently, as the actuator bandwidth decreases, it becomes harder for the controller to stabilize the system.Thus, we are able to infer the relative robustness properties of the different controllers by examining Figures 5-8.In particular, the farther a line reaches towards the left-hand side of the graph, the more robust that controller is with regard to the unmodeled actuator dynamics.As we shall see, the present H ∞ controllers are always more robust than the other methods.4.5.1.Unmodeled 1st-Order Actuator Dynamics.We begin by examining the robustness of the controllers with regard to unmodeled first-order actuator dynamics.This shall be accomplished by including the following first-order dynamics model in each component ( = 1, 2, 3) of the controller output: where   is the actuator bandwidth.Figures 5 and 6 show  rms and  rms , respectively, as a function of the actuator bandwidth.It is noted from these figures that all four H ∞ controllers provide nearly the same tracking error and control effort.Moreover, while the closed-loop optimal control law provides better tracking error compared with the H ∞ controllers, the trade-off is that it requires more control effort.Similarly, the SOS controller yields very low tracking error at the expense of greater control effort.The two PD laws, on the other hand, have a higher tracking error and control effort than the other methods.

Unmodeled 2nd-Order
Actuator Dynamics.The robustness properties of the different controllers are now examined with regard to unmodeled second-order actuator dynamics.This shall be accomplished by including the following second-order dynamics model in each component ( = 1, 2, 3) of the controller output: where  is the actuator damping ratio and   is the actuator bandwidth.All simulations were performed with a damping ratio  = 0.5.Figures 7 and 8 show  rms and  rms , respectively, as a function of the actuator bandwidth.It is seen from these figures that the various control methods follow the same trends as in the case of the first-order actuator dynamics.

Robustness in the Gap Metric (Revisited).
We now make use of the gap metric [28] to characterize the difference in the input-output (IO) map of the system induced by the unmodeled actuator dynamics.However, since we cannot calculate the gap between two nonlinear systems, we calculate the gap metric distance for the linearized system only.As the actuator bandwidth and damping ratio change, the value of the gap metric will also vary. Figure 9 shows the gap metric value with respect to the first-order actuator bandwidth.
Figure 10 shows the gap metric value with respect to the second-order actuator bandwidth for a damping ratio  = 0.5  as used in the above numerical simulations.As the damping ratio varies, the curve of this figure moves to the left or right slightly, although there does not appear to be any discernible trend.Moreover, it should be noted that as the actuator bandwidth approaches infinity, the effects of the actuator in the controller input-output map become negligible.This is to be expected and is seen in both Figures 9 and 10, where the gap metric approaches zero with increasing actuator bandwidth.
We now return for a moment to the question of controller robustness in the gap metric.From (9) we have the following small-gain-type stability criterion:   (P 0 , P 1 ) ⋅      Π N‖M 0     ∞ ⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟ ≤ < 1. (73) In the numerical simulations performed with  = 4, it was determined that the closed-loop system is stable in the presence of the unmodeled second-order actuator with bandwidth as low as   = 0.3 rad/s.With this actuator bandwidth, the calculation of the gap between the linear attitude dynamics with and without the actuator results in a value of   = 0.522, which does not satisfy the condition of (73).This could be explained by the conservativeness of the small-gain criterion and the fact that it is a sufficient (but not necessary) condition for stability.However, it can also be attributed to the nonlinear effects of the dynamics not taken into account in the gap calculation here.This emphasizes the need for a method to calculate the gap metric for nonlinear systems.

4.7.
Overall Assessment of the H ∞ Controllers.The previous sections show that the methodology presented here can be used to develop very robust attitude controllers.However, their performance was not as good as some of the other techniques to which it was compared.We have not demonstrated significant benefits for the higher-order terms in the controller which, while disappointing, is an important contribution to the literature.The fact that a linear controller can perform very closely to the higher-order ones is a strong vindication of the most popular approach used for actual attitude control: linear feedback of angular velocity and attitude information.This is consistent with [38] which showed that a linear combination of angular velocity and quaternion (Euler parameter) feedback solves the state feedback nonlinear (suboptimal)-H ∞ control problem for rigid spacecraft attitude control.Our results are entirely consistent with this and we strongly suspect that results analogous to [38] can be obtained for the case of angular velocity and MRPs.

Conclusions
The results presented here clearly show the trade-off between performance and robustness.Existing methods from the attitude control literature typically focus on performance.In contrast, the method developed in this paper emphasizes robustness.In particular, while the methods from the literature are better at disturbance rejection, the new nonlinear controllers have overall better robustness properties.In general, there is still a need to characterize the trade-off between these two properties.In addition to the results presented in this paper, there is still much room for improvement and many more areas to be explored.Some topics that could be explored in future work include analytical solutions to higher-order terms in the approximation and the effects of varying  on the closed-loop response.The need for methods to calculate the gap metric between nonlinear systems was also motivated.

Figure 5 :
Figure 5: RMS tracking error with respect to 1st-order actuator bandwidth.

Figure 7 :
Figure 7: RMS tracking error with respect to 2nd-order actuator bandwidth.

Figure 9 :
Figure 9: Gap metric with respect to 1st-order actuator bandwidth.

Figure 10 :
Figure 10: Gap metric with respect to 2nd-order actuator bandwidth.

Table 2 :
Robustness to actuation time delay.