closed-loop time-optimal attitude maneuvering of magnetically actuated spacecraft

17
The Journal of the Astronautical Sciences, Vol. 58, No.1, January-March 2011, pp. 81-97 Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft Pooya Sekhavat,t Hui Yan,2 Andrew Fleming,3 I. Michael ROSS,4 and Kyle T. Alfriend 5 Abstract This paper examines the performance of the pseudospectral optimal control scheme for closed-loop time-optimal attitude maneuvering of the NPSATI spacecraft, a magnetically actuated spacecraft designed and built at the Naval Postgraduate School. The closed-loop control is devised and implemented using the notion of Caratheodory-1T solutions: repeated computation and update of the complete open-loop control solution in real-time. The performance of the pseudospectral feedback-control scheme is compared to a standard state feedback-control technique. It is shown that the use of standard state feedback control leads to significantly slower convergence time and may lead to substantially lower performance metrics. The substantial performance gains when using closed-loop optimal control are attributed to the optimal scheme's ability to exploit the full maneuverability envelope of the spacecraft by applying bang-bang controls in all three directions. In contrast, traditional gain-based feedback control laws substantially limit the performance of the vehicle to well below its physical capabilities. The feasibility of each open-loop optimal control solution is verified by numerical propagation while Pontryagin's necessary conditions for optimality are used to verify the solution's optimality. Introduction Magnetic actuators have been used for momentum dumping of both low- and high-altitude satellites, and for attitude control of momentum-biased space- lTEES Research Scientist, Department of Aerospace Engineering, Texas A&M University, College Station, TX 77843. E-mail: [email protected]. 2Postdoctoral Research Associate, Department of Aerospace Engineering, Texas A&M University, College Station, TX 77843. 3Research Scientist-Aerospace Engineering, Leffler Consulting LLC, Chantilly, VA, 20151. 4Professor, Department of Mechanical and Astronautical Engineering, Code MElRo, Naval Postgraduate School, Monterey, CA 93943. E-mail: [email protected]. 5TEES Distinguished Research Chair Professor, Department of Aerospace Engineering, Texas A&M University, College Station, TX 77843. E-mail: [email protected]. 81

Upload: andrew-fleming

Post on 20-Mar-2017

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

The Journal of the Astronautical Sciences, Vol. 58, No.1, January-March 2011, pp. 81-97

Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated

Spacecraft

Pooya Sekhavat,t Hui Yan,2 Andrew Fleming,3 I. Michael ROSS,4 and Kyle T. Alfriend5

Abstract

This paper examines the performance of the pseudospectral optimal control scheme for closed-loop time-optimal attitude maneuvering of the NPSATI spacecraft, a magnetically actuated spacecraft designed and built at the Naval Postgraduate School. The closed-loop control is devised and implemented using the notion of Caratheodory-1T solutions: repeated computation and update of the complete open-loop control solution in real-time. The performance of the pseudospectral feedback-control scheme is compared to a standard state feedback-control technique. It is shown that the use of standard state feedback control leads to significantly slower convergence time and may lead to substantially lower performance metrics. The substantial performance gains when using closed-loop optimal control are attributed to the optimal scheme's ability to exploit the full maneuverability envelope of the spacecraft by applying bang-bang controls in all three directions. In contrast, traditional gain-based feedback control laws substantially limit the performance of the vehicle to well below its physical capabilities. The feasibility of each open-loop optimal control solution is verified by numerical propagation while Pontryagin's necessary conditions for optimality are used to verify the solution's optimality.

Introduction

Magnetic actuators have been used for momentum dumping of both low- and high-altitude satellites, and for attitude control of momentum-biased space-

lTEES Research Scientist, Department of Aerospace Engineering, Texas A&M University, College Station, TX 77843. E-mail: [email protected]. 2Postdoctoral Research Associate, Department of Aerospace Engineering, Texas A&M University, College Station, TX 77843. 3Research Scientist-Aerospace Engineering, Leffler Consulting LLC, Chantilly, VA, 20151. 4Professor, Department of Mechanical and Astronautical Engineering, Code MElRo, Naval Postgraduate School, Monterey, CA 93943. E-mail: [email protected]. 5TEES Distinguished Research Chair Professor, Department of Aerospace Engineering, Texas A&M University, College Station, TX 77843. E-mail: [email protected].

81

Page 2: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

82 Sekhavat et al.

FIG. 1. Artist's Rendition of NPSATl in Orbit

craft, primarily in low Earth orbit. Recently, magnetic actuators have been proposed as a sole means for attitude control for small, inexpensive spacecraft [1-6]. In this article, we examine the performance of a closed-loop optimal control scheme compared to a standard state-feedback scheme for attitude maneuvering of the NPSATl spacecraft. NPSATl (see Fig. 1) is a small experimental satellite, conceived, designed, and constructed at the Naval Postgraduate School. It is scheduled to orbit at an altitude of approximately 560 km. The satellite is a prolate nonspinning body that uses a three-axis active magnetic attitude control system.

A standard nonlinear control law for a generic spacecraft's attitude maneuvering is based on the linear feedback of the quaternion and angular velocity errors between the satellite's current and target values [7-9]. The inclusion of saturation functions in the control law enforces the practical limits on the actuation torques as well as constraints on the spacecraft slew rates [8]. To implement such maneuvers, the control torques are derived and issued to the spacecraft actuators. For a rigid-body spacecraft, this family of feedback control laws results in the spacecraft eigenaxis maneuver. For magnetically actuated spacecraft, the command torque should then be transformed into magnetic dipole moments whose interaction with the Earth's magnetic field generates the actuation torque [5-7, 9]. Because the Earth's magnetic field matrix is singular, obtaining the dipole moments from the desired torques by directly inverting the magnetic field matrix is not possible. One way of approximating the dipole moments from the desired torques is to assume that the magnetic dipole vector is always perpendicular to the Earth's magnetic vector (which is not always true) and find an approximation for the dipole moments [5, 7].

Closed-loop control design using an optimal control framework is a desirable alternative for minimum-time spacecraft reorientations. The minimum-time slew maneuver generally depends on the spacecraft orbital elements, its boundary conditions, as well as the actuation capability. Because the Earth's magnetic field is time-varying, the dynamic system is not autonomous. Junkins and Carrington

Page 3: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

Closed-Loop Time-Optimal Attitude Maneuvering 83

[10] studied the time-optimal magnetic attitude control problem. They developed formulations leading to a simple one-dimensional two-point boundary-value prob­lem and their numerical results suggested that the control structure was bang-bang. In May 1981, the NOVA-1 spacecraft was launched and several large-angle, minimum-time slew maneuvers were carried out by using ground-based computers to generate the commands using the Junkins and Turner [11] algorithms. Bilimoria and Wie [12] later reported that significant improvements can be obtained by solving the full problem and showed that eigenaxis maneuvers were not, in general, time-optimal.

Designing optimal control trajectories for highly nonlinear spacecraft systems has been considered a difficult task. For a generic magnetically actuated spacecraft, even open-loop optimal solutions are not easy to obtain using analytical tech­niques. Liang et al. [13] applied RIOTS, a numerical optimal control software package based on spline functions, to approximate controls and Runge-Kutta methods to integrate state equations, to solve time-optimal magnetic attitude control problems. They reported that the resulting bang-bang open-loop optimal control would slew the spacecraft 50 times faster than a PD-like controller and is obtained in five minutes on a Pentium 4 computer. They then implemented a closed-loop model predictive control algorithm to track the precalculated optimal trajectory. Such closed-loop implementation is based on repeated solving of the tracking open-loop optimal control problem, using current states of the plant as the initial state. However, it only applies to the first control value of the solution trajectory and assumes the control is constant until the next state sampling update. Such model predictive technique has also been applied on a linearized magnetically actuated spacecraft [14].

As a result of recent advancements in optimal control [15-22], it is now possible to rapidly design and update open loop optimal solutions for complex dynamic systems using pseudospectral methods [16, 19, 21, 22]. What distin­guishes pseudospectral methods from the other methods is the use of global orthogonal polynomials (such as Legendre and Chebyshev polynomials) as the trial functions. The basic idea is to seek polynomial approximations for the state, costate, and control functions in terms of their values at the Legendre­Gauss-Lobatto points [16] and solve the resulting discretized problem. The global orthogonality of approximation polynomials and the use of Gaussian quadrature nodes create simple rules for transferring the original underlying infinite dimension problem into a low-dimension system of algebraic equations with spectral convergence rates.

Following such groundbreaking advances, we recently proposed a new approach to closed-loop optimal slew maneuvering of spacecraft [21, 23, 24]. The underlying technology is the generation of CaratheodorY-1T solutions using pseudospectral optimal control theory. When open-loop controls are generated fast enough, it provides optimality as well as the feedback control that is shown to be able to counteract exogenous disturbances [23], parameters uncertainties [24] and delay-related problems [21] that exist in almost every practical scenario. The scheme has a built-in safety factor (compared to traditional feedback control) by its inherent feedforward capability in case of unexpected interruption in the feedback signal. Unlike the previously proposed model predictive control algorithms [13], the proposed pseudospectral feedback con­trol algorithm does not always try to enforce the tracking of a predetermined

Page 4: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

84 Sekhavat et al.

optimal trajectory that may no longer be optimal because of disturbance effects. Instead, by constantly updating the optimal trajectory, the CaratheodorY-7T feedback control technique takes advantage of potentially favorable exogenous disturbance torques that can result in a faster slew maneuver [24]. It has been shown that generation of such open-loop attitude maneuvering solutions as the fIrst stepping stone of the proposed method is also possible for spacecraft with other actuation mechanisms such as control moment gyroscopes [25].

In this article, we examine the Caratheodory-7T pseudospectral optimal control algorithm for closed-loop minimum-time spacecraft attitude maneuvering. The results are obtained for NPSATl and compared with a standard PD feedback law.

Dynamical Model of the System

The kinematic and dynamic equations of motion for the NPSA Tl spacecraft with gravity gradient torque are given by [7, 26]

ql(t) = 1/2[Wx(t)qit) - Wit)q3(t) + Wz(t)q2(t)]

(1)

. 11 -12 [ J.-L] 1 W3(t) = -/3- w\(t)wit) - 3 ?a C13C23 + ~ [Biq(t), t)ml(t) - Bx(q(t), t)m2(t)]

(2)

where (ql' q2' q3' q4) are the quaternion used to describe the orientation of the spacecraft in the orbit frame, (WI' W 2 , w3) are the rotation rate of the body frame with respect to the inertial frame, expressed in the body frame, and, (wx , wy ,

wz ) are the rotation rate of the body frame with respect to the orbit frame, expressed in the body frame.

In equation (2), Cij(q) is the quaternion-parameterized ir element of the direction cosine matrix

[ qi - q~ - q~ + q~ 2(q\q2 + q3q4) 2(qlq3 - q2q4) 1

C(q) = 2(q\q2 - q3q4) q~ - qi - q~ + q~ 2(q2q3 + qlq4) 2(q\q3 + q2q4) 2(q2q3 - qlq4) q~ - qi - q~ + q~

(3)

The parameters (/\' 12 , 13 ) = (5, 5.1, 2) kg·m2 are the principal moments of inertia of NPSATl and ro = 6938 km is the distance from the center of NPSATl to the center of the Earth (a constant for a circular orbit).

Page 5: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

Closed-Loop Time-Optimal Attitude Maneuvering 85

Assuming no orbit regression and inclination rate change, the two sets of angular velocities are related according to

( WI(t)) (WxCt)) (C12) W2(t) = W/t) - Wo C22

W3(t) WZ(t) C32

(4)

where Wo is the orbital angular velocity with respect to the inertial frame. The dynamic modeling assumptions can be removed without any impact on applica­bility of the proposed numerical optimal control framework.

The control vector (m 1 (t), m2(t), m3(t)) is comprised of the magnetic dipole moments of the torque rods aligned with the principal axes and B = (Bx(q, t), B/q, t), Biq, t)) are the components of the Earth's magnetic field in the body frame obtained from

(BxCq, t)) (BI(t)) By(q, t) = C(q) Bit) Bz(q, t) B3(t)

(5)

where (B 1 (t), B2(t), B3(t)) are the components of the Earth's magnetic field in the orbit frame.

Without loss of generality, the Earth magnetic field in the orbit frame is approximated by the following time-varying dipole model detailed in reference [27]. Similar results can be obtained using higher order International Geomagnetic Reference Field models in the pseudo spectral feedback control algorithms

M BI(t) = roe [cos(Wot)[cos(t:)sin(i) - sin(t:)cos(i)cos(wet)] - sin(wot)sin(t:)sin(wet)]

M B2(t) = - roe [cos(t:)cos(i) + sin(t:)sin(i)cos(Wet)] (6)

2M B3(t) = ro e [sin(uJot)[cos(t:)sin(i) - sin(t:)cos(i)cos(wl)] + 2 cos(Wot)sin(t:)sin(wl)]

where f.L = 3.98601 X 1014 m3/s2 is the Earth gravitational constant; Me = 7.943 X 1015 Wbom is the Earth magnetic dipole moment; i = 35.40 is the NPSATl orbit inclination; t: = 11.70 is the magnetic dipole tilt; and We = 7.29 X 10-5 rad/s is the spin rate of the Earth.

Closed-Loop CaratheodorY-1T Algorithm

The basic idea proposed and implemented in this paper is conducting the closed-loop time-optimal attitude maneuvering of NPSATI using the notion of CaratheodorY-7T solutions [21, 23]. Feedback is achieved quite simply by closing the loop with repeated numerical regeneration of the open-loop optimal solution in real-time. Feedback controls obtained in this manner are nontradi­tional in the sense that they do not have a recognizable analytical representation that maps the state vector x(t) to the control vector met). Nevertheless, the problem can be viewed as a feedback control design problem where mapping

Page 6: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

86

exogenous disltubance

X(tk- ll x(t) ."'--'--'-------'

Sekhavat et al.

x(t)

FIG. 2. Block Diagram of CaratModory-1T Closed-Loop Optimal Control Algorithm

x(t) ~ o(t) is achieved via "designer functions" [21]. Such "designer func­tions" can be computed using pseudospectral methods within fractions of a second to a few seconds, well under the Lipschitzian limits of the dynamical system [23, 28, 29] . In this paper, the sequence of pseudospectral open-loop solutions are obtained using the optimal control software DIDO [30]. The Covector Mapping Theorem [31] (CMT) embedded in the DIDO software allows dualization to commute with discretization so that the necessary con­ditions for optimality can be verified.

Figure 2 shows a block diagram of the proposed closed-loop algorithm. Open-loop optimal solutions for the complete maneuver that take the system from state X(tk- 1) to state x(t/) over the time interval tk- 1 ~ tl are repeatedly calculated using the most recent measurement or estimate of the current system state sampled at time instant tk - 1 as the maneuver's initial conditions. Unlike model predictive control algorithms [13], the complete open-loop control trajectory is time-tagged and applied to the system while waiting for the next open-loop solution update. During the time interval ~ = tk - tk-) when a new open-loop optimal solution is being calculated, the system is maneuvering under the last most recent optimal solution. When the next open-loop control becomes available, the first ~ = tk - t k - 1 seconds of it must be truncated since the system has moved away (under the influence of the previous optimal solution) from the initial conditions fed to the open-loop design engine ~ seconds ago. The remainder of the entire new open-loop trajectory, o(tk ) ~

O(t/) , is then implemented on the spacecraft and the current system state is sampled to provide the initial conditions for the next update. This process continues until the spacecraft reaches the target attitude.

Following the above description, it is necessary to generate an open-loop optimal solution for the entire maneuver before the maneuver starts (off-line) in order to initialize the closed-loop control re-computation process. This solution is used as a basis for subsequent runs and accounts for the fact that the sampled system states always lag behind the control re-computation clock by one sampling interval. According to Bellman's Principle of Optimal­ity, for an ideal system, the closed-loop trajectory computed in this fashion will coincide with the initial open loop optimal solution. Under more realis­tic operating conditions, the actual system output may not exactly follow the initial open-loop solution. In this latter case, the feedback mechanism that is created by measuring the system state and regenerating the optimal control solution can be exploited to ensure that the desired final conditions are met [21, 24] .

Page 7: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

Closed-Loop Time-Optimal Attitude Maneuvering 87

Underlying Open-loop Optimal Control Problem

As discussed in the previous section, the underlying concept in the CaratheodorY-1T algorithm is repeated solving of the open-loop optimal control problem in real-time. The open-loop control problem addressed here is to find the minimum-time optimal control solution for a magnetically actuated space­craft undergoing a rest-to-rest reorientation. Therefore, defining the state vector, x = (qI' q2' Q3' Q4, WI' W2, w3), the open-loop optimal control problem is formulated as

Minimize J[x('), u( . ), tj] = tj - to

Subject to x(t) = J(x(t), u(t» XL :::; x(t) :::; XU

uL :::; u(t) :::; U U

x(to) = Xo x(tj ) = xf

(7)

where the dynamic equations are comprised of equations 0-6) and the boundary conditions and state and control constraints are defined by the specifics of the mission and spacecraft hardware.

Pseudospectral Solution Method

The most significant element for successful implementation of CaratheodorY-1T method is the rapid computation of open-loop control trajec­tories. Thanks to recent advancements in pseudospectral optimal control [16, 19, 22], we can now solve many complex open-loop control problems well within the time constant needed for successful closed loop implementation of the CaratheodorY-1T algorithm [23, 28, 29]. The pseudospectral (PS) method is a direct method for solving optimal control problems where the state trajecto­ries are approximated by }fh order Lagrange interpolating polynomials, :0'(t). The interpolating polynomials are evaluated at the Legendre-Gauss-Lobatto (LGL) nodes. The non-uniformily distributed nodes are dense near the end points, which effectively inhibits the Runge phenomena and improves the rate of convergence of the discretized solution to the actual continuous-time optimal solution.

In the PS discretization approach, the time history of the approximate state trajectory is given by

N

x(t) = xN(t) = L x/eMt) (8) i=O

where x.r: is the value of the approximant at node tk and <Pk(t) is the Lagrange interpolating polynomial. The time-derivatives of the state trajectories are obtained straightforwardly from

Page 8: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

88 Sekhavat et al.

N

x(t) = XN(tk) = L DkjXN (t) j~O

where D is a N + 1 X N + 1 differentiation matrix with constant elements

LN( 1'k) 1 ----- if k* j LN( 1j) 1'k - 1'j

N(N + 1) if k=j= 0 2

D k·=-- 4 1 tf - to

N(N + 1) if k=j=N

4

0 otherwise

(9)

(10)

In equation (10), LN is the ~ order Legendre polynomial. The PS approxima­tion of the state trajectories and their derivatives allows the continuous time optimal control problem to be transformed into a discrete problem, which can be solved by spectral algorithm [32]. Additional details on the PS method can be found in [16, 19, 22].

Open-Loop Optimal Solution for a Rest-to-Rest Maneuver

To demonstrate the method, an example problem is defined as the rest-to-rest maneuvering of the NPSATl spacecraft in the orbit frame. Thus, the initial and final angular rates are

(11)

or

(12)

where to is the initial time and t.t is the final time. The maneuver is defined as a 100° maneuver about the Euler axis e = (0.3365

0.3365 -0.8794) with initial and final quaternions formulated as

(q,(to), q2(tO), q3(tO), qito») = (0.2578,0.2578, -0.6737,0.6428)

(q,(tf ), q2(tf ), q3(tf ), qitf )) = (0,0,0, 1) (13)

The constraints on the dipole moments are obtained from the NPSAT1 torque rod data sheets as

Imil :::; 30 A'm2

and the slew rate is constrained to

i = 1, ... ,3

i = 1, ... ,3

(14)

(15)

Page 9: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

Closed-Loop Time-Optimal Attitude Maneuvering

• DIDO - Propagated

08

-0.8

-,

.-. • DIDO - Propagated

'."

-. . .

89

o 50 '00 '50 200 250 300 350 -'O'--~50--,~00--'50~~2oo"-----'2~50'---"""3OO~--,J350 1(,) t(S)

FIG. 3. Open-Loop Time-Optimal State Trajectories

or,

I (WX(t)) (Cl2) I Wy(t) - Wo C22 ::::; 1 deg/s wz(t) C32

i = 1, ... ,3 (16)

The problem is solved for the above maneuver with the tolerance of 0.002 on each final quaternions and 0.0115 deg/s on final angular rates (WI' W 2 , w3). The open loop optimal solution candidate is obtained by way of pseudospectral (PS) methods using the software package, DIDO [30]. The optimal maneuver completes in 312.6 s and, as expected, the control solution is bang-bang control. Figures 3 and 4 show the resulting state and control trajectories. We have plotted the (wx, wY' wz) trajectories to show that the boundary conditions in equation (11) are satisfied. The dotted lines in Fig. 3 are the discrete state trajectories produced using pseudospec­tral method (i.e., DIDO) with 80 nodes and the solid lines are the results of independent propagation of the spacecraft dynamics using Runge-Kutta method under the control profile depicted in Fig. 4. Using more nodes will result in better capturing of the sharp bangs in the control profile. Propagation of the states using the obtained control trajectory confirms the feasibility of the maneuver under such

30 ----- -----_.- . -- ,...........,.. I

I

20 : I I : l : 1 :

Ne 10

ci.

g 0

E -10

-20

-30

, : I

~ I I

I :

l;~ : ___ m,

: --m2

: m3 ...-

o 50 100 150 200 250 300 350 t (s)

FIG. 4. Open-Loop Time-Optimal Control Trajectory

Page 10: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

90 Sekhavat et al.

control solution. Figure 4 clearly illustrates that the obtained solution satisfies control constraints in equation (14).

Necessary Conditions for Optimality

One of the main advantages of using a pseudospectral algorithm to solve the open-loop optimal control problem is that it provides, through the covector mapping theorem [22, 31, 33], the values of all the states, costates and the Hamiltonian. These values allow Pontryagin's necessary conditions for optimality to be used as a verification that the extremal solution obtained is, indeed, optimal.

To be able to verify Pontryagin's necessary conditions, the control Hamiltonian [34] for the magnetically actuated spacecraft is derived as

(17)

where A denote the costates and the relation between (WI' W 2 , w3 ) and (wx , wY' wz)

is given in equation (12). Next, the lower Hamiltonian is defined by [34]

'1Je(A, x) : = min H(A, x, m) mEIJ

The connection between the lower Hamiltonian and the control Hamiltonian is via the Hamiltonian evolution equation [34]

d'1Je aH dt at

It is clear from equation (17) that aHiat and, hence, d'1Je/dt are time-varying functions. Furthermore, for a time-optimal maneuver, the Hamiltonian value condition requires that

aE(tf , x(tf )) '1Je(A(tf), x{tf)) = - a

tf

where E(tf' x(tf )) is the end-point Lagrangian and equal to E(tf, x(tf)) tp Hence

Page 11: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

Closed-Loop Time-Optimal Attitude Maneuvering 91

Or---~-----.----~----r---~-----'----,

-0.2

-0.4

-0.6

c -0.8 .!!!

g -1 'E co I -1 .2

-1 .4

-1 .6

-1 .8

t (s)

FIG. 5. Hamiltonian Evolution of the Time-Optimal Maneuver

This means that for a solution to be time optimal, the lower Hamiltonian must be equal to -1 at the end of the maneuver. Figure 5 obtained from DIDO demonstrates that this necessary condition is indeed met.

Inspection of the switching functions derived from complementarity conditions and their relationship to the control behavior would be another test to verify that the control-constraint pair meets the Karush-Kuhn-Tucker (KKT) conditions [34, 35]. Additional details of switching function analysis for the magnetically actuated spacecraft can be found in [36].

Closed-loop Caratheodory-7T Solution

Upon successful generation and examination of the open-loop optimal solution, the next step in the Caratheodory-7T algorithm is to use the open-loop solutions as the building blocks of the closed-loop scheme. As explained in the Closed-Loop Caratheodory-7T Algorithm section, open loop solutions are repeatedly obtained to slew the spacecraft from its current conditions x(t) to the desired final states, x(tr) = xf· When a new open-loop solution is available, the current states of the spacecraft are sampled and the new reoptimized optimal control trajectory is applied to the spacecraft. The sampled spacecraft states are then fed into the

0.8

0.6

0 .•

0.2 a

-02

-0 .•

-0.6

-08

- 1 0

.. - - ...

- ... _-_ ... - .. ---*----

50 100 150 200 250 300 350 t(s)

0.8

0.6

0 ••

i 0.2 Eo.,. ...... a '

-0.2

-0.6

-0.8

_ _ .WI

-"', ."

-'0L-~50---,~00---'~50---:::2ooe:---2::":50:---:300~---:-!350 t(s)

FIG. 6. Closed-Loop State Trajectories for a Time-Optimal Maneuver

Page 12: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

92 Sekhavat et al.

30

20

Ne 10

ci. E 0 ~ E -10

-20

-30

0 50 100 150 200 250 300 350 t (s)

FIG. 7. Closed-Loop Control Trajectory for a Time-Optimal Maneuver

optimal control generation engine to generate the next optimal control update and this process is repeated until the maneuver is completed.

Figures 6 and 7 show that using the CaratModorY-7T optimal strategy, the spacecraft completes the maneuver (within the tolerance of 0.002 on final quaternions and 0.0115 deg/s on final angular rates) in the same 312.6 s. In the absence of a major source of external disturbance or parameter uncertainty, the closed-loop trajectory closely follows the first open-loop time optimal response shown in Figs. 3 and 4. This is expected according to Bellman's Principle of Optimality. It is useful to note that each open-loop solution was obtained using 32 nodes and computation times for open-loop solution computations on a Windows-based laptop with Matlab overhead is shown in Fig. 8. The results show that by implementing the complete open-loop control trajectory at each update, the maneuver can be successfully completed even with an average computation time of 2.7 s.

10ro----~------~----~------r-----,-----_,

9

" 8

~~----~20------~40------~L------~~----~100----~1~

Feedback Number

FIG. 8. Hamiltonian Evolution of the Time-Optimal Maneuver

Page 13: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

Closed-Loop Time-Optimal Attitude Maneuvering 93

Figures 6 and 7 also show that the Caratheodory-7T algorithm successfully incorporates any state constraint (in this case angular rate of less than 1 degls) or control limitations (in this case Ilmlloo ::::::: 30 A·m2).

Comparison to a Standard State-Feedback Control Scheme

To better understand the performance improvement of the PS-based Caratheodory-7T scheme, we also examine the performance of a standard state­feedback scheme in the literature [8] when used for the same maneuver. The closed-loop algorithm is based on calculating the output torques needed to ma­neuver the spacecraft using a proportional-derivative state feedback scheme. For an unconstrained system, such linear state feedback controller has the following form [5, 8]

Ts/c = -Kqe - Cw (19)

where, T s/c = (T1, T2, T3), is the output torque on the spacecraft, qe = 2(qlq4' q2 q4' q3q4) is the error quatemion vector between satellite's current orientation q = (Ql, Q2' Q3' Q4) and desired final orientation (0, 0, 0, 1), and w = (wx' wy , wz) is the error angular velocity vector that, for a rest-to-rest maneuver, is equal to the spacecraft's instantaneous angular velocity. The matrices K and C are feedback gains that can be determined using standard LQR approach.

For a magnetically actuated spacecraft, the output torque, T sic' is generated as a result of the interaction between the spacecraft dipole moments, m, and the Earth's magnetic field, B

(20)

Because the matrix above is singular, the commanded torque cannot be directly converted to dipole moment commands by inverting this matrix. By assuming that m is always perpendicular to the Earth's magnetic field, B, it can be approximated by [7],

(21)

where T r is the requested torque. Since the maximum dipole moment that can be generated by a magnetic torque rod cannot exceed mmax' the control law is modified according to the saturation control logic

mapplied = sat (m) mm",

where sat is the saturation function defined as

I mmax sat (m) = -mmax

mmax m

Combining equations (20) and (21) yields

if m 2: mmax if m::::::: -mmax otherwise

(22)

(23)

Page 14: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

94

~: -----------------r:~ 1

0.2K-~--~______ --q. <7 or ~ __ -",,--::..a.. _____ ~

-0.2

-0.4

-0.6

-0.8

-1

o 1000 2000 3000 4000 5000 5000 7000 1(5)

-;;-

0.8

0.6

0.4

go 0.2

~ 0"" --9 ,,--0.2 .\

-0.4

-0.6

-0.8

Sekhavat et al.

-1 '!-0-----:-,ooo=-----::2ooo=-----::3OOO=......"4000=.....,,,5OOO~.....,,,6000~~7000-1(5)

FIG. 9. State Trajectories of State-Feedback Magnetic Spacecraft Reorientation

where

-BxBy B}+B}

-ByEz (24)

The off-diagonal terms of ~ have an average value of zero [5]. The diagonal terms have average values that are a function of orbit inclination. Therefore, multiplying the components of Ts/c in (19) by reciprocals of diagonal values of ~ yields an average value of Ts/c equal to Tr [5] that can then be inserted into equations (21) and (22) to generate the control toque implemented by magnetic torque rods.

State-Feedback Control Results for the Same Rest-to-Rest Maneuver

We applied the standard state-feedback control scheme expressed in equations (19-24) to NPSATl to maneuver it from the initial to the final conditions expressed in equations (12) and (13). The gains in equation (19) are selected using the LQR method with Q chosen as the 6 X 6 identity matrix and R as a 3 X 3 diagonal matrix with the diagonal elements of (0.01, 0.01, and 0.0001) tuned to achieve the best performance.

The resulting rest-to-rest maneuver is shown in Figs. 9 and 10. The maneuver is completed in 6900 s (with the tolerance of 0.002 on each final quatemions and 0.0115 deg/s on final angular rates) which is 22 times slower than the

~~-~-~-~-~-~-.~_-_-_~T~I

200

150

E ~100 I-

_T,

T, -

:~~--~~--------~ -5O~-~-~-~-~-~-~-~

o 1000 2000 3000 4000 5000 6000 7000 t (8)

30

20

-20

-30

.. ·II"~·~I-· ;-I'''I''I~· ,., It :II:~ .. :. :'::: :1.: :' It .::" , ::.:.:." I~ I ': ',I " 11:' " I' .. I ,

'.' I II. I I' I .' I r, I " I,', II. I I III I ,I I r. I

": • : I III I " I I I 11:: ,t

I :: 1:1 I I • I .\ I,' "1 I

I • I "I,' IIj I , I It I I "I,' IIj I .1 I I' • I .It I,' -r, I .: I Ii • I .\ I,' l'l' I I ,I • I "I,' lij I ,. I II '_' l.,',' ,fi I_I~ __ __ ,

,000 2000 3000 4000 5000 6000 7000 t (5)

FIG. 10. Control Trajectories of State-Feedback Magnetic Spacecraft Reorientation

Page 15: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

Closed-Loop Time-Optimal Attitude Maneuvering 95

2

\

1 \ , til Cij Q) 0 C-

" .... ,,-- ..... , " , .. " ,"

\ .... ' , " , , " /

al " , " .' .... --,. -1

'. '"

-3~--~----~--~----~--~~--~--~

o 1000 2000 3000 4000 5000 6000 7000 t(S)

FIG. 11. Variation of Earth Magnetic Field Throughout the Standard Feedback Maneuver

Caratheodory-7T closed-loop maneuver. Considering that NPSA T1 has less than 550 s coverage time (at 560 Km altitude), these results show that, using a standard feedback control law, reaching the final (nadir) orientation within the coverage time is not possible. Variation of the Earth's magnetic field throughout the 6900 s maneuver is depicted in Fig. 11.

Conclusions

Using NPSATI as the platform, this paper addresses the minimum-time attitude maneuvering of magnetically actuated spacecraft in low Earth orbit. The closed­loop response under Caratheodory-7T pseudospectral feedback control scheme was compared with the response from a standard state-feedback control logic. The results show that traditional state-feedback control schemes that are not based on true optimality considerations can limit the performance of the system to well under its true capabilities. The superior performance of closed-loop pseudospectral optimal control is due to the fact that the optimal scheme exploits the full maneuverability envelope of the spacecraft. In addition, the performance gains obtained by using a closed-loop optimal control scheme may be exploited to reduce actuator sizing during the design phase.

Acknowledgment

We thank Professor Barry Leonard of the Naval Postgraduate School for fruitful discussions and assistance he has provided throughout the NPSA Tl project.

References

[l] ALFRIEND, K.T. "Magnetic Attitude Control System for Dual-Spin Satellites," AIAA Journal, Vol. 13, No.6, June 1975, pp. 817-822.

[2] MAKOVEC, K.L., TURNER, A.J., and HALL, C.D. "Design and Implementation of a Nanosatellite Attitude Determination and Control System," presented as paper AAS

Page 16: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

96 Sekhavat et al.

01-311 at the 2001 AASIAJAA Astrodynamics Specialists Conference, Quebec, QC, Can­ada, July 30-August 2, 2011.

[3] HUR, P., MELTON, RG., and SPENCER, D.B. "Attitude Detennination and Control of a Nanosatellite Using the Geomagnetic Field Data and Sun Sensors," presented as paper AAS 04-144 at the 2004 AASIAJAA Astrodynamics Specialist Conference, Kilei, Maui, HI, February 7-10, 2004.

[4] PSIAKl, M.L. "Magnetic Torquer Attitude Control via Asymptotic Periodic Linear Quadratic Regulation," Journal of Guidance, Control, and Dynamics, Vol. 24, No.2, 2001, pp. 386-394.

[5] LEONARD, B.S. "NPSATl Magnetic Attitude Control System", Proceedings of the 16th Annual AJAA/USU Conference on Small Satellites, 2001, pp. 105-108.

[6] WINSNIEWSKI, R. "Linear Time-Varying Approach to Satellite Attitude Control Using Only Electromagnetic Actuation," Journal of Guidance, Control, and Dynamics, Vol. 23, No.4, 2000, pp. 640-647.

[7] SIDI, M.J. "Spacecraft Dynamics and Control," Cambridge University Press, New York, NY, 1997.

[8] WIE, B. "Space Vehicle Dynamics and Control," AIAA Education Series, 1998. [9] LOVERA, M. and ASTOLFI, A. "Global Magnetic Attitude Control of Spacecraft in the

Presence of Gravity Gradient," IEEE Transactions on Aerospace and Electronic Systems, Vol. 42, No.3, 2006, pp. 796-805.

[10] JUNKINS, J.L. and CARRINGTON, C.K. "Time-Optimal Magnetic Attitude Maneuvers," Journal of Guidance, Control, and Dynamics, Vol. 4, No.4, 1981, pp. 363-368.

[11] JUNKINS, J.L. and TURNER, J.D. (1986) Optimal Spacecraft Rotational Maneuvers. Elsevier. Amsterdam, The Netherlands.

[12] BILIMORIA, K.D. and WIE, B. ''Time-Optimal Three-Axis Reorientation of a Rigid Spacecraft," Journal of Guidance, Control, and Dynamics, Vol. 16, No.3, 1993, pp. 446-452.

[13] LIANG, J., FULLMER, R., and CHEN, Y. Time-Optimal Magnetic Attitude Control for Small Spacecraft, Proceedings of 43rd IEEE Conference on Decision and Control, Vol. 1, Dec. 2004, pp. 255-260.

[14] SILANI, E. and LOVERA, M. "Magnetic Spacecraft Attitude Control: A Survey and Some New Results," Control Engineering Practice, Vol. 13, 2005, pp. 357-371.

[15] MORDUKHOVICH, B.S. and SHVARTSMAN, I. "The Approximate Maximum Princi­ple in Constrained Optimal Control," SIAM Journal of Control and Optimization, Vol. 43, No.3, 2004, pp. 1037- 1062.

[16] ROSS, I.M. and FAHROO, F. "Legendre Pseudo spectral Approximations of Optimal Control Problems," Lecture Notes in Control and Information Sciences, Vol. 295, Springer-Verlag, New York, 2003, pp. 327-342.

[17] KANG, W., ROSS, I.M., and GONG, Q. "Pseudospectral Optimal Control and Its Convergence Theorems," Analysis and Design of Nonlinear Systems, Springer, Berlin, November 2007, pp. 109-124.

[18] VINTER, R.B. Optimal Control, Birkhiiuser, Boston, MA, 2000. Chapters 1, 6, 9, 11 and 12.

[19] ROSS, I.M. and FAHROO, F. "Issues in the Real-Time Computation of Optimal Control," Mathematical and Computer Modelling, Vol. 43, Issues 9-10, May 2006, pp. 1172-1188. (Special Issue: Optimization and Control for Military Applications).

[20] CLARKE, F. "Lyapunov Functions and Feedback in Nonlinear Control," Optimal Control, Stabilization and Nonsmooth Analysis, eds. M.S. de Queiroz, M. Malisoff, and P. Wolen­ski, Lecture Notes in Control and Information Sciences, Vol. 301, Springer-Verlag, New York, NY, 2004, pp. 267-282.

[21] ROSS, I.M., SEKHAVAT, P., FLEMING, A., and GONG, Q. "Optimal Feedback Control: Foundations, Examples and Experimental Results for a New Approach," Journal of Guidance, Control, and Dynamics, Vol. 31, No.2, 2008, pp. 307-321.

[22] ROSS, I.M. and GONG, Q. Emerging Principles in Fast Trajectory Optimization, Elissar Publications, Monterey, CA 2008.

[23] SEKHA VAT, P., FLEMING, A., and ROSS, I.M. "Time-Optimal Nonlinear Feedback Control for the NPSATI Spacecraft," Proceedings of IEEEIASME International Confer­ence on Advanced Intelligent Mechatronics, 2005, pp. 843-850.

[24] FLEMING, A., SEKHAVAT, P., and ROSS, I.M. "Minimum-Time Reorientation of a Rigid Body," Journal of Guidance, Control, and Dynamics, Vol. 33, No.1, 2010, pp. 160-170.

Page 17: Closed-Loop Time-Optimal Attitude Maneuvering of Magnetically Actuated Spacecraft

Closed-Loop Time-Optimal Attitude Maneuvering

[25] FLEMING, A. and ROSS, I.M. "Minimum-Time Maneuvering of CMG-Driven Space­craft," presented as paper AAS 07-355 at the 19th AAS/AIAA Astrodynamics Specialist Conference, Mackinac Island, MI, August 19-23, 2007.

[26] WERTZ, J.R. (ed.), Spacecraft Attitude Determination and Control, D. Reidel, Boston, 1978, pp. 779-786.

[27] WHEELER, P.e. Magnetic Attitude Control of Rigid, Axially Symmetric Spinning Satel­lites in Circular Earth Orbits, Department of Aeronautics and Astronautics, Stanford University, Stanford, CA, SUDAER No. 224, April 1965.

[28] BOLUNO, K., ROSS, I.M., and DOMAN, D. "Optimal Nonlinear Feedback Guidance for Reentry Vehicles," presented as Paper AIAA-2006-6074 at the AIAA Guidance, Navigation, and Control Conference, Keystone, CO, August 21-24, 2006.

[29] HURNI, M.A., SEKHA V AT, P., and ROSS, I.M. "Pseudo spectral Optimal Control Algoritbm for Real-Time Trajectory Planning," presented as paper AAS 07-355 at tbe AASIAIAA Astrodynamics Specialist Conference, Savannah, GA, February 8-12, 2009.

[30] ROSS, I.M. "A Beginners Guide to DIDO: A MATLAB Application Package for Solving Optimal Control Problems," Elissar Technical Report TR 711, Monterey, CA, www.elissarllc.com. 2007.

[31] GONG, Q., ROSS, I.M., KANG, W., and FAHROO, F. "On the Pseudospectral Covector Mapping Theorem for Nonlinear Optimal Control," Proceedings of 45th IEEE Conference on Decision and Control, Dec. 13-15,2006, pp. 2679-2686.

[32] GONG, Q., FAHROO, F., and ROSS, I.M. "A Spectral Algoritbm for Pseudospectral Methods in Optimal Control," Journal of Guidance, Control and Dynamics, Vol. 31, No. 3, 2008, pp. 460-471.

[33] ROSS, I.M. "A Historical Introduction to the Covector Mapping Principle," Advances in the Astronautical Sciences, Vol. 123, Univelt, San Diego, CA, 2006, pp. 1257-1278, presented as paper AAS 05-332 at tbe AAS/AIAA Astrodynamics Specialist Conference, Tahoe, NV, August 8-11, 2005.

[34] ROSS, I.M. A Primer on Pontryagin 's Principle in Optimal Control, Collegiate Publishers, San Francisco, CA, November 2009.

[35] BAZARAA, M.S., SHERALI, H.D., and SHETTY, C.M. Nonlinear Programming: The­ory and Algorithms, John Wiley and Sons, Inc., 2006.

[36] FLEMING, A. Real-time Optimal Slew Maneuver Design and Control, Astronautical Engineers Thesis, US Naval Postgraduate School, 2004.

97