 Open access peer-reviewed chapter

# Optimal Trajectory Synthesis and Tracking Control for Spacecraft Large Attitude Manoeuvers

Written By

Ranjan Vepa

Submitted: January 28th, 2019 Reviewed: April 24th, 2019 Published: January 15th, 2020

DOI: 10.5772/intechopen.86498

From the Edited Volume

## Advances in Spacecraft Attitude Control

Edited by Timothy Sands

Chapter metrics overview

View Full Metrics

## Abstract

The classical approach to the problem of synthesizing an optimal attitude manoeuver trajectory, involves the use of the calculus of variations and the use Lagrange multipliers or co-states. The nonlinear large attitude manoeuver trajectory is controlled by a set of nonlinear evolving co-states. In this paper, following a review of the methodologies available for trajectory synthesis followed by tracking control, the optimal trajectory for a typical optimal attitude manoeuver is synthesized by solving for the states and co-states defined by a two point boundary value problem. Gravity gradient torques are included as a matter of course. Following the synthesis of the optimal attitude-rate trajectory, tracking control laws are synthesized by re-formulating the optimal control as a feedback law. The approximate linear tracking feedback controls are evaluated by relating the optimal state and co-state vector by a linear relation. The control laws are synthesized numerically. The problem of optimal attitude orientation trajectory synthesis is also addressed. The methodologies are applied to typical sample problems and results are presented. Quantitative comparisons of the results of the methods are made to the results obtained by the application of other linear and nonlinear methods, to illustrate the key features of the methodologies.

### Keywords

• attitude manoeuvers
• optimal manoeuver trajectory
• trajectory optimization
• trajectory tracking
• feedback control laws

## 1. Introduction

The need for designing fast attitude and angular rate acquisition manoeuvers for a spacecraft with restricted or low actuation torqueing capacity arises in many space recent applications. Spacecraft are usually equipped with an attitude control system (ACS), which operates in one of two modes; the first mode involves maneuvering for attitude or angular rate acquisition while the second is to ensure stability. In the first mode, the ACS is responsible for acquiring and tracking an attitude or an angular rate state trajectory which could include a steady state. The requirements for this mode are set by the need to remotely capture an orbiting body, de-tumble a spacecraft, synchronize with another orbiting body or point at a specific direction in space. Although a large number of publications have appeared before the end of the last millennium on the subject of attitude stabilization and feedback control, a few recent papers have focused on the construction of optimal maneuvering trajectories synthesis for attitude or angular rate acquisition. There have been some publications related to the synthesis of optimal maneuvering trajectories for attitude or angular rate acquisition during the last two decades of the preceding millennium. Yet some significant advances have been made in the early part of this century. This includes papers by Lee et al. , Yoshida et al. , Aghili [3, 4], Yang and Wu , Liu et al. , and Zhang et al. , who have considered the maneuvering for attitude or angular rate acquisition problems using classical methodologies. Sharma and Tewari  have addressed the issue of nonlinear tracking of spacecraft attitude manoeuvers while Hegrenas et al.  have considered the maneuvering for attitude or angular rate acquisition problem by means of explicit model predictive control, via a nonlinear programming approach.

In dealing with the optimal attitude trajectory synthesis, several real world effects such as gravity gradient torques are generally neglected. Neglecting the gravity gradient torques can have a serious effect on the trajectory synthesis problem as (i) the gravity gradient torques can influence the stability of the spacecraft and (ii) they tend to couple the attitude rate dynamics with the quaternion kinematics. For this reason, it is not always advisable to ignore these torques on grounds of “smallness” as even the smallest of these perturbations can not only trigger instability but also induce the bifurcation of the orbit. It is the gravity that is primarily responsible for the orbital motion and the attitude stability of a spacecraft. The importance of gravity gradient torques has also been underscored by Lobo et al. .

The classical methodologies for trajectory synthesis compare well with other nonlinear and deterministic artificial intelligence approaches such as those developed by Sands et al. , Nakatani and Sands  and Baker et al. .

In this paper, the optimal trajectory for a typical attitude rate manoeuver is synthesized by solving for the states and co-states defined by a two point boundary value problem. Gravity gradient torques are included as a matter of course. Following the synthesis of the optimal attitude-rate trajectory, tracking control laws are synthesized by re-formulating the optimal control as a feedback law. The approximate linear tracking feedback controller gains are evaluated by relating the optimal state and co-state vector by a linear relation. The feedback control laws are synthesized numerically. The problem of optimal attitude orientation trajectory synthesis is also addressed. The optimization methodologies are applied to typical sample problems and results are presented. Quantitative comparisons of the results of the optimization method are made to the results obtained by the application of other linear and nonlinear control methods, to illustrate the key features of the methodologies.

## 2. Spacecraft attitude dynamics and quaternion kinematics

In matrix form, when the inertia matrix is not diagonal the equations of attitude motion of chaser spacecraft are

I ω ̇ + ΩIω = M + M gg + M d , E1

where I is the moment of inertia matrix which is assumed to be

I = I 11 I 12 I 13 I 12 I 22 I 23 I 13 I 23 I 33 , ω ω 1 ω 2 ω 3 , Ω = 0 ω 3 ω 2 ω 3 0 ω 1 ω 2 ω 1 0 E2

M d are the disturbance torques and M gg are the gravity gradient torques.

It is important to emphasize that the targets dynamics are irrelevant to us as there is little or no chance of acquiring the target’s inertia properties. However the target’s angular velocity vector is assumed to be given by ω d , its attitude quaternion relative to the chaser’s body frame is assumed to be q d or its relative attitude quaternion Δ q , relative to the chaser’s body frame, can in principle be measured from within the chaser spacecraft.

Expressions for the gravity gradient moment are obtained assuming that z axis of the spacecraft body is nominally pointing to the Earth. The direction vector the center of gravity of the spacecraft pointing to the Earth is given by the last column of T BR , the transformation from the Earth orbiting frame to the body fixed frame of the spacecraft as

c = c 1 c 2 c 3 T . E3

The corresponding cross product operator c × is defined as

c × = 0 c 3 c 2 c 3 0 c 1 c 2 c 1 0 . E4

Hence the gravity gradient moments acting on the spacecraft and manipulator body are:

M gg = 3 n 2 c × Ic 3 n 2 c × Ic = L gg M gg N gg T . E5

Thus,

M gg = L gg M gg N gg = 3 n 2 c 2 c 1 I 31 + c 2 2 I 32 + c 2 c 3 I 33 I 22 c 3 c 1 I 21 c 3 2 I 23 c 3 c 1 I 11 I 33 + c 2 c 3 I 12 + c 3 2 I 13 c 1 2 I 31 c 1 c 2 I 32 c 1 2 I 21 + c 1 c 2 I 22 I 11 + c 1 c 3 I 23 c 2 2 I 12 c 2 c 3 I 13 . E6

If we express the transformation from the orbiting frame to the body coordinates in terms of an attitude quaternion of the chaser spacecraft with components ε 1 , ε 2 , ε 3 and η as

T BR q = η 2 + ε 1 2 ε 2 2 ε 3 2 2 ε 1 ε 2 + ε 3 η 2 ε 1 ε 3 ε 2 η 2 ε 1 ε 2 ε 3 η η 2 ε 1 2 + ε 2 2 ε 3 2 2 ε 2 ε 3 + ε 1 η 2 ε 1 ε 3 + ε 2 η 2 ε 2 ε 3 ε 1 η η 2 ε 1 2 ε 2 2 + ε 3 2 , E7

then from the last column, the Earth pointing direction vector is:

c = c 1 c 2 c 3 = 2 ε 1 ε 3 ε 2 η 2 ε 2 ε 3 + ε 1 η η 2 ε 1 2 ε 2 2 + ε 3 2 . E8

The quaternion kinematics satisfies

d q dt = 1 2 A ω ω q , q T q = 1 E9

where the quaternion q = ε 1 ε 2 ε 3 η T , consists of a vector part, ε = ε 1 ε 2 ε 3 T and the scalar η so,

q = ε η and A ω = Ω ω ω ω T 0 , Ω ω = 0 ω 3 ω 2 ω 3 0 ω 1 ω 2 ω 1 0 . E10

The quaternion kinematics may also be compactly expressed as

d q dt = d dt ε η = 1 2 Γ q ω , E11
Γ q = η I 3 × 3 + S ε ε T , S ε = 0 ε 3 ε 2 ε 3 0 ε 1 ε 2 ε 1 0 , E12

where I 3 × 3 is the 3 × 3 unit matrix. These relations may be inverted as

ω = 2 η I 3 × 3 + S T ε ε ε ̇ η ̇ T = 2 Γ 1 q ε ̇ η ̇ T . E13

The desired attitude quaternion relative to the chaser’s body frame which is assumed to be q d and the relative attitude quaternion Δ q , relative to the chaser’s body frame are related to the chasers attitude by

q d = Δ q q . E14

Given two quaternions, Δ q = Δ q 1 Δ q 2 Δ q 3 Δ q 4 T , q = ε 1 ε 2 ε 3 η T , the quaternion product q d = Δ q q is defined as

q d = q 1 d q 2 d q 3 d q 4 d = η ε 3 ε 2 ε 1 ε 3 η ε 1 ε 2 ε 2 ε 1 η ε 3 ε 1 ε 2 ε 3 η Δ q 1 Δ q 2 Δ q 3 Δ q 4 = Δ q 4 Δ q 3 Δ q 2 Δ q 1 Δ q 3 Δ q 4 Δ q 1 Δ q 2 Δ q 2 Δ q 1 Δ q 4 Δ q 3 Δ q 1 Δ q 2 Δ q 3 Δ q 4 ε 1 ε 2 ε 3 η . E15

Hence it is expressed in matrix form as

q d = C 0 Δ q , C 0 = η ε 3 ε 2 ε 1 ε 3 η ε 1 ε 2 ε 2 ε 1 η ε 3 ε 1 ε 2 ε 3 η , C 0 = η I 3 × 3 + S T ε q 1 : 3 q 1 : 3 η . E16

Similarly,

q d = q 1 d q 2 d q 3 d q 4 d = Δ q 4 Δ q 3 Δ q 2 Δ q 1 Δ q 3 Δ q 4 Δ q 1 Δ q 2 Δ q 2 Δ q 1 Δ q 4 Δ q 3 Δ q 1 Δ q 2 Δ q 3 Δ q 4 ε 1 ε 2 ε 3 η = Δ q 4 I 3 × 3 + S Δ q 1 : 3 Δ q 1 : 3 Δ q 1 : 3 Δ q 4 q . E17

The traditional method of defining the attitude of a spacecraft is by the use of Euler angle sequences. The conversion of Euler angles defined as Euler angle sequences, may be converted to an equivalent quaternion set, using well-known conversion formulae, such as, those given by Smeresky et al. .

## 3. Formulation of the optimal angular rate trajectory synthesis problem

The first task is to formulate the optimal control problem, so it can be solved numerically. This is briefly reviewed. The attitude equations of the spacecraft may be expressed in state space form as

d q dt = 1 2 A ω ω q , q T q = 1 , E18
I ω ̇ + ΩIω = M c + M gg + M d , E19

where M c is the control torque vector acting on the spacecraft. For our purposes it will be assumed that it can be expressed as, M c = I T W u , where T is the scalar magnitude of the specific torque or torque per unit inertia, W is a symmetric, positive-definite, torque transformation weighting matrix and u defines the direction of the torque vector. It is the attitude steering control input to the spacecraft. Thus Eq. (19) is

ω ̇ = I 1 M gg q I 1 ΩIω + T W u , E20

with

u = sin α cos β cos α cos β sin β T . E21

When one is interested in the problem of finding the steering control

u = u t , t 0 t t f , E22

the torque direction time history is sought, such that it minimizes the cost functional:

J = 0.5 ω t ω d T Q f ω t ω d t = t f = Φ ω t t = t f , E23

subject to, Eqs. (18), (20) and (21).

Introducing the single state vector, x = q T ω T T , so the Eqs. (18), (20) and (22) are expressed as

d dt x T = d dt q T ω T = f T , q T q 1 g = 0 E24

To solve the optimization problem, seven Lagrangian multipliers or co-states are introduced given by the two vectors λ q t and λ ω t , and a scalar λ c denoted by a single column vector, λ t . Following Bryson and Ho , a Hamiltonian function is defined as

H = λ T t f T t g T . E25

Hence,

H = λ q T 1 2 A ω ω q + λ ω T I 1 M gg q I 1 ΩIω + λ ω T T W u + λ c g . E26

The necessary conditions (Bryson and Ho , Conway ) for the first variation of J to be zero include the co-state differential equations

d dt λ T t = H x . E27

Explicitly the co-state equations are

λ ̇ q i t = H q i = λ q T 1 2 A ω ω q i q + λ ω T I 1 q i M gg q , E28
λ ̇ ω i t = H ω i = λ q T 1 2 ω i A ω ω q λ ω T I 1 ω i ΩIω , E29
λ ̇ c = 0 . E30

The optimality conditions are

H α = λ ω T T W cos α cos β sin α cos β 0 T = 0 , E31

and

H β = λ ω T T W sin α sin β cos α sin β cos β T = 0 . E32

Hence,

W λ ω = W λ ω sin α cos β cos α cos β sin β T = W λ ω u . E33

Thus the two-parameter control vector u , can be expressed as

u = W λ ω / W λ ω . E34

The choice of the sign in Eq. (34) will depend on the direction of the desired torque, forward or reverse torque. Thus the closed-loop equations of motion are

d dt x = f , q T q 1 g = 0 , u = W λ ω / W λ ω . E35

To complete the definition of the optimal solution, the boundary conditions at t = t f for the co-state system are found by applying the transversality conditions.

The transversality conditions ensure that the initial and final states are selected optimally within the feasible regions of the states. For the transversality conditions, one may write

λ q t f = ∂Φ ω t q t = t f = 0 , E36
λ ω t f = ∂Φ ω t ω t = t f = Q f ω t f ω d . E37
λ c t f = 0 . E38

Thus, λ c t = 0 is a feasible solution. If it can be ensured that the constraint on the quaternion, q T q 1 g = 0 is satisfied at each and every integration time step, λ c t could be set to zero for all time.

The solution to the state and co-state equations, subject to the optimal control defined by Eq. (34) and the boundary conditions defined by Eqs. (36) and (37), may be found by solving a two point boundary value problem (TPBVP). This can be done using MATLAB’s function, bvp4c.m.

Re-considering Eq. (34), the control input vector may be expressed as

u = W λ ω / W λ ω = r 1 B T λ , E39

where B T is a projection matrix relating λ to W λ ω and r = W λ ω . It is important to recognize that the weighting matrix W also needs to be chosen. On one hand it provides a set of free parameters so one can construct an optimal solution, while on the other it makes the solution much harder to obtain. Its choice is discussed further in Section 8.

## 4. Feedback implementation of optimal co-states

Of interest at this stage is to be able to implement the controller, obtained in the last section, as a feedback control law. Thus, inspired by linear optimal control, it can be assumed that, locally, the co-state vector λ is proportional to the state vector x . Hence one may express

λ = Px . E40

Furthermore it is assumed that the matrix P is slowly varying and hence does not change appreciably as the time t changes from the current time t to t ± Δ t and to t ± n Δ t , n = 2 , 3 , 4 . Thus the matrix P may be obtained by evaluating λ and x in Eq. (40) at the times t ± n Δ t , n = 0 , 1 , , 4 , where Δ t is a reasonably small time step, over which both λ and x change appreciably. The solution for the matrix P is obtained by differencing the data and solving an over determined system of linear equations by a least squares approach over a moving time window. The matrix P is also constrained to be a symmetric non-negative definite matrix. Moreover x is expressed as

x = x x ref + x ref , E41

where x ref is the optimal transfer trajectory for x obtained by solving the system of equations for the states, parameters and co-states defined in Section 3, which together constitute a TPBVP. By solving the system of equations for the states, parameters and co-states defined in Section 3, one also seeks the trajectory coordinates of the reference trajectory and the total transfer time. It is important that the spacecraft’s attitude controller is able to track the reference trajectory. Consequently the control input is expressed as

u = r 1 B T P x x ref + r 1 B T λ ref , λ ref = Px ref . E42

The second of Eq. (42) is used to obtain the matrix, P. Like in Eq. (34), the choice of the sign in the first of Eq. (42) will depend on the direction of the desired torque, forward or reverse torque.

## 5. Simplified formulation of the optimal angular rate trajectory synthesis problem

Some authors (for example, see Aghili ) have formulated the attitude rate acquisition problem without including the gravity gradient torques. Thus the quaternion kinematics could be ignored. Thus in this case one could set λ q t 0 , which results in considerable simplification of the trajectory synthesis problem. The downside of the approach is that the quaternion kinematics is ignored and consequently the quaternion attitude could be quite arbitrary. Quite often after a de-tumbling manoeuver, a precise orientation must be acquired. The required attitude could be acquired in an independent manoeuver and the methodology for this is developed in the next section. The associated tracking problem, which involves tracking the complete state vector set point, must then be separately addressed. Typically this is done by using a barrier Lyapunov function as illustrated by Vepa .

## 6. Optimal attitude orientation acquisition trajectory synthesis

To begin with the quaternion kinematics is given by Eqs. (9) and (11), and can be expressed in one of two alternate forms as.

d q dt = 1 2 A ω ω q = 1 2 Γ q ω . E43

In Eq. (43), the angular velocity vector is treated as a control variable and expressed as

ω = ω max u , E44

where the direction vector u is parametrized by an equation similar to Eq. (21). Thus,

u = sin α cos β cos α cos β sin β T . E45

When one is interested in the problem of finding the directional control

u = u t , t 0 t t f , E46

the angular velocity direction time history is sought, such that it minimizes the cost functional:

J = 0.5 q t q d T Q f q t q d t = t f = Φ q t t = t f , E47

subject to, Eqs. (43), (44) and (45). The corresponding Hamiltonian function is

H = λ q T 1 2 A ω ω q = λ q T 1 2 Γ q ω = ω max 2 λ q T Γ q u . E48

The corresponding co-state differential equations are

d dt λ q T t = H q = 1 2 λ q T A ω ω . E49

By using an argument similar to the one used in developing Eqs. (31)(34), the optimal control is given by

u = Γ T q λ q / Γ T q λ q = Γ q λ q / Γ q λ q . E50

For the co-state boundary conditions one has

λ q t f = ∂Φ q t q t = t f = Q f q t f q d . E51

Once the control is found from Eqs. (50) and (44) is used to define the angular velocity vector and Eqs. (19) and (20) to define the optimal input control torque.

## 7. Shape based optimal trajectory synthesis

An alternative approach to the optimization based on the integration of co-states is to use a shape based approach as outlined by Caubet and Biggs [18, 19]. For purposes of comparison the shape based approach serves as a useful alternative. In a shape based approach, each of the quaternion components are expressed as a summation of polynomials in terms of a time variable, multiplied by coefficients which may be determined by applying the relevant boundary conditions at the initial and final values of the time variable over a finite time frame. Thus, for example, the quaternion components are expressed as

q i = q i 0 + q ̇ i 0 t f t t f + q ̇ i 0 q ̇ i t = t f t f t t f 2 1 t t f + q if q i 0 q ̇ i 0 t f t 2 t f 2 3 2 t t f + j = 5 N + 4 e ¯ ij 4 j 4 t t f 2 j 3 t t f 3 + t t f j 1 , E52

where the coefficients e ¯ ij 4 are yet to be determined. They are determined by minimizing the cost function

J = 0 1 q 1 2 + q 2 2 + q 3 2 + q 4 2 1 d t t f 2 . E53

Once all the coefficients of the quaternion components q i are determined, the angular velocity vector is defined by the inverse of the relation given by Eq. (43) which is

ω = q 4 q 3 q 2 q 1 q 3 q 4 q 1 q 2 q 2 q 1 q 4 q 3 q ̇ 1 q ̇ 2 q ̇ 3 q ̇ 4 . E54

The angular velocity vector ω is evaluated for a range of non-dimensional time values between 0 and 1. From the ratio of the maximum of this set, defining the angular velocity time history in terms of the non-dimensional time variable, and the maximum allowable angular velocity magnitude, the length of the time frame t f over which the control torques must be applied may be found. From the angular velocity vector ω the torques that must be applied to the satellite including the gravity gradient torques may be found. From a range of choices for N (say 1 N 6 ) in the Eq. (52) defining the quaternion, the one that gives the lowest value for t f is selected.

## 8. Typical simulation examples

The first example considered the attitude dynamics is defined by Eqs. (18) and (19). Thus the gravity gradient torques acting on the spacecraft are included in the dynamic model and they are responsible for coupling the attitude quaternion kinematics and the angular velocity dynamics. The objective is to spin the spacecraft so the final angular velocity vector is given by ω = 1 1 1 T rads / s . The initial angular velocity vector is ω = 0 0 0 T . The spacecraft is fitted with magnetic torque actuators and the maximum three axis torques are limited to T c = 0.62 1 1 T Nm . The diagonal non-zero elements of the weighting matrix W in Eq. (34) and the principal moment of inertia of the spacecraft are respectively given by

W diag = 0.24 0.9 1 , I = 2.27293 3.27331 0.3989 kgm 2 . E55

In all examples the solution of the TPBVP is done using MATLAB’s function, bvp4c.m. Whenever there was a need to solve an initial value problem, the equations were integrated using MATLAB’s ode45.m.

In all cases, the time variable was made non-dimensional so it raged from [0–1]. The integration time step was chosen to be relatively small initially ( Δ t = 0.0001 ), and automatically and iteratively reduced linearly as the final time was approached. The iterations were terminated when no further improvement in the accuracy of the predicted final time was feasible.

Figure 1 shows the time history of the reference quaternion components and Figure 2 shows the corresponding angular velocities (p, q, r). Figures 3 and 4 show the corresponding, actual, quaternion components and the corresponding angular velocity components, where an approximate optimal linear feedback law based on Eq. (42) is used to track the reference trajectory. Figure 1.Time history of the reference quaternion components for the first example. Figure 2.Time history of the corresponding reference velocity components for the first example. Figure 3.Time history of the actual quaternion components tracked by the feedback controller for the first example. Figure 4.Time history of the actual velocity components tracked by the feedback controller for the first example.

In the next example, the simplified attitude dynamics is used with the gravity gradient torques neglected. This decouples the angular rate dynamics from the attitude quaternion dynamics, which need to be considered for synthesizing the reference trajectories. The reference angular velocities are then integrated to obtain the spacecraft’s quaternion attitude time history. Figure 5 shows the reference angular velocity components. Figure 5.Time history of the reference velocity components for the second example.

Figure 6 shows the errors in the actual angular velocity components when compared with corresponding reference values and Figure 7 the corresponding quaternion components. Figure 8 shows the attitude in terms of the Euler axis and the Euler principal angle components. Figure 6.Time history of the errors in the actual velocity components corresponding to Figure 5, tracked by the feedback controller. Figure 7.Time history of the corresponding quaternion components tracked by the feedback controller for the second example. Figure 8.Time history of the attitude components in terms of the Euler axis and the Euler principal angle components for the second example.

In the final example it is desired to alter the attitude quaternion of the spacecraft, so as to point the spacecraft in a desired direction. In this case on the quaternion kinematics defined by Eq. (44) are used. The maximum angular velocity of the spacecraft is assumed to be limited to 0.001 rad/s. The desired pointing direction is specified as a yaw, roll pitch Euler angle sequence given by ψ θ ϕ = 22 ° 25 ° 30 ° corresponding to the components of the quaternion q d = 0.2068 0.2518 0.1682 0.9303 .

In Figure 9 are shown the reference optimal quaternion components and in Figure 10 are shown the corresponding angular velocity components. The optimum torque components required to affect the attitude change are shown in Figure 11. These include compensation for the gravity gradient torques. They show that they could be easily achieved by low thrust electric actuators such as electro-spray thrusters. Figure 9.Time history of the reference quaternion components for the final example. Figure 10.Time history of the corresponding reference velocity components for the final example. Figure 11.Time history of the corresponding reference torque components for the final example.

When small reaction wheels are used Eq. (19) may be modified to include the momentum of the wheels and the control inputs to the wheels could also be estimated. If reaction wheels are used much larger torques are possible and the time over which they are used could be shortened. In Figure 12 are shown the attitude time history components in terms of the Euler axis and Euler principal angle components. Figure 12.Time history of the attitude components in terms of the Euler axis and the Euler principal angle components for the final example.

This example is also solved using the shape based approach discussed briefly in Section 7. In Figure 13 are shown the required applied torque components obtained by the shape based approach with N = 1 in Eq. (52). The time frame over which the control must be applied is t f = 733.3 s , which is the lowest for all N considered and is about the same as the time required by the approach based on the integration of co-states. However the reference torque components shown in Figure 13, are much larger than those plotted in Figure 11, and for this reason, they are not referred to as ‘optimum torques.’ The corresponding gravity gradient torques, acting on a satellite orbiting the Earth at the geostationary orbit radius, are also shown in Figure 14. Although the gravity gradient torques are of the same orders of magnitude as the reference optimum torque components in Figure 11, they are much smaller than the corresponding torque components obtained by the shape based approach and shown in Figure 13. It must be recognized that the gravity gradient torques become much larger as the spacecraft orbits the Earth at a much closer orbit radius. Figure 13.Time history of the applied torque components for the final example, obtained by the shape based approach. Figure 14.Time history of the gravity gradient torque components for the final example, obtained by the shape based approach.

## 9. Discussion and conclusions

A close examination of the results in Figures 9 and 12 shows that while the quaternion component time histories are not linearly varying, the Euler axis and Euler principal angle components are almost linear. This allows for linear extrapolation of the trajectories if when desired. It is also observed that the acquisition of the Euler axis is relative fast in comparison with growth rate of the Euler angle which is relatively slower. The kinematics of the Euler axis seems to represent a fast sub-system while the growth of the Euler angle represents the slow sub-system. This observation, facilitates the construction of approximate sub-optimal trajectories where in the Euler axis is acquired instantly and the Euler angle increases or decreases linearly with time. Once a sub-optimal solution can be defined in terms of interpolating polynomial it can also be further optimized by using Eq. (13) and shape based methods as those proposed by Caubet and Biggs [18, 19], quite rapidly and if need be, by the pseudo spectral method, or other direct collocation methods. The advantage of further optimization using shape based methods is that the precise shape of the desired output could be achieved avoiding overshoot. However depending on the choice of the output shape function, the control could be restrictive and so the magnitudes of the torques required could be much larger in comparison with the co-states approach.

For the preceding example, where a set angular velocity components were desired, the velocity components and the corresponding quaternion components are shown in Figures 5, 6, 7 as they vary with time. Figure 8 also shows that the Euler axis and Euler principal angle components are varying as quadratic functions of time. A similar conclusion cannot be drawn as far as the angular velocity components and the components of the quaternion. This again is extremely useful in applying low order polynomials for developing formulae for extrapolating the optimal trajectories, by converting the quaternion components to the domain of the Euler axis and Euler principal angle components. It also facilitates the integration of various optimal segments into a single trajectory over an extended time frame.

From the first example, comparing Figures 1 and 2 with Figures 3 and 4, it is seen that the optimum tracking feedback control law obtained by linearly approximating the relationship between the states and co-states by Eq. (40), performs well. The errors between these two sets of trajectories, the reference trajectory and the actual tracked trajectory, are always within 5% of the corresponding reference value, over the time frame of the plots.

In this paper, either the simplest form of the attitude dynamics or the basic kinematic equations alone are used to construct the optimal trajectories. The required control torques are obtained from the inverse dynamic relations. The usefulness of transforming the attitude representation to the Euler axis and Euler principal angle components, as it facilitates the application of low order polynomials for the construction of approximate sub-optimal trajectories, is demonstrated. Furthermore it is shown how optimal feedback control laws may be constructed from the solution for the optimal trajectories, for tracking the reference trajectories.