MULTIPLE SHOOTING TECHNIQUE FOR OPTIMAL ATTITUDE CONTROL OF A SPACECRAFT WITH MOMENTUM AND CONTROL CONSTRAINTS
arXiv:1509.04521v1 [cs.SY] 15 Sep 2015
KARMVIR SINGH PHOGAT, DEBASISH CHATTERJEE, AND RAVI BANAVAR
Abstract. This article addresses an optimal control problem arising in attitude control of a spacecraft under state and control constraints. The attitude dynamics model is first derived in discrete time using discrete mechanics. Then the energy optimal control problem is posed in discrete time and first order necessary conditions are derived using variational analysis. Since both the control and the states are subject to inequality constraints, the boundary value problem obtained as first order necessary conditions is subject to inequality constraints on the states and the Lagrange’s multipliers corresponding to the state inequality constraints. This boundary value problem cannot be solved using classical multiple shooting techniques, so we propose a modified multiple shooting algorithm that can handle the state inequality constraints. We also demonstrate how the discrete time model derived using discrete mechanics reduces the dimension of the problem.
1. Introduction Typical space applications require reorienting a spacecraft or a satellite in order to facilitate the positioning of star sensors (attitude estimation sensors) towards deep space, pointing a camera in a desired direction for imaging purposes, positioning solar panels for effective tracking of the sun for optimal energy harvesting, etc [26]. These orientation manoeuvres are popularly known as attitude manoeuvres. The class of attitude manoeuvres which optimize a certain objective are termed optimal attitude manoeuvres. The most common performance indices discussed in the literature deal with minimization of time, fuel and energy. Various researchers have contributed to the time optimal attitude control problems [26, 24, 28, 9]. Fuel or energy optimal manoeuvres are of great interest since onboard energy sources are precious and there is a need to use them in an optimal manner [3]. Early work on the energy optimal control problem, in particular, momentum manoeuvres of the asymmetric body has been explored in [2]. Later the energy optimal reduced attitude manoeuvres with free time were considered in [14], which uses the Krotov-Bellman sufficiency condition to arrive at a closedform solution. The fuel optimal attitude control problem for the axisymmetric body is discussed in [8]; large angle rest to rest manoeuvres are considered there, and Pontryagin’s maximum principle is applied to the continuous time model and an explicit solution is obtained. This work has been generalized to the case where only two actuators available in [15]. In this case, the optimal trajectory is generated as a concatenation of the single axis manoeuvres along the available actuator axes. These manoeuvres can be demanded in scenarios where one of the actuators fails. The optimal control problems addressed in these references considers Date: September 16, 2015. Key words and phrases. optimal control, multiple shooting, state constraints, attitude manoeuvres, discrete mechanics. 1
2
K. S. PHOGAT, D. CHATTERJEE, AND R. BANAVAR
the continuous time model to come up with first order necessary conditions using Pontryagin’s maximum principle. The boundary value problem is solved using the shooting method or neighborhood extremal methods which are highly sensitive to initial conditions [27]. A nice survey on optimal control problems related to aerospace applications can be found in [27]. Geometric treatment to the energy optimal attitude control problem is given in [18]. Unlike other approaches, in [18] a discrete time model is obtained by employing discrete mechanics, and discrete variational analysis is used to come up with first order necessary conditions. This discrete time model is more accurate than other discretization schemes such as like Euler’s step because it preserves certain invariance properties of the rigid body like kinetic energy, momentum, etc. The boundary value problem obtained from the first order necessary conditions is solved using shooting methods. The present article addresses a more general version of the problem addressed in [18], where in addition to the control constraints, momentum constraints are also considered. The presence of momentum constraints makes the problem more challenging because the boundary value problem obtained from the first order necessary conditions is subject to inequality constraints on the momentum. This constrained boundary value problem cannot be solved using the classical multiple shooting method due to the presence of inequality constraints. A non-classical multiple shooting technique has been proposed in [10] which can be employed to solve the constrained boundary value problem arising in optimal control problems with state constraints. The complementary slackness conditions arising due to inequality constraints on the states are represented in the form of equality constraints using the Fischer-Burmeister function. Since the Fischer-Burmeister function is not smooth, a non-smooth Newton’s method is used for the solution of the boundary value problem. The approach followed in [10] can be highly inefficient in terms computation because it considers all the inequality constraints at each iteration irrespective of them being active or inactive. The algorithm proposed in the present article is more efficient in terms of the memory and time complexity than the algorithm discussed in [10] since the inequality constraints do not directly contribute to the problem as equality constraints. Representing the inequality constraints on the states as equality constraints as in [10] increases the dimension of the boundary value problem by twice the number of inequality state constraints. We know that the size of the matching conditions in the multiple shooting method increases exponentially with the dimension of the boundary value problem. The proposed algorithm deals with state inequality constraints in such a way that the dimension of the boundary value problem remains the same even when the state inequality constraints are active, making it more efficient in terms of time and memory complexity. Moreover, the discrete time model obtained using discrete mechanics results in a boundary value problem that can be reduced to the difference equation model with momentum and comomentum dynamics only. The dimension of the reduced difference equation model is half of the original one. Hence the boundary value problem reduced to momentum and comomentum dynamics contributes to an exponential reduction in memory and time needed for computation as compared to the original boundary value problem. The article is organized as follows: In §2 we give an introduction to discrete mechanics and employ it to derive a discrete time model of the attitude dynamics. In §3 the energy optimal control problem is posed as a discrete optimal control problem and first order necessary conditions are obtained using variational analysis. Then we discuss scaling of the variables and reduction of the dynamics to momentum and co-momentum variables in §4. §5 has an introduction to the multiple shooting
OPTIMAL ATTITUDE CONTROL OF A SPACECRAFT WITH STATE CONSTRAINTS
3
method and further provides solution to the system of difference equations represented in momentum variables in §4. §6 presents the numerical simulations for large angle manoeuvres with momentum and control constraints followed by conclusion and future direction in §7. The proofs of our results are presented in a consolidated fashion in the Appendices. 2. Discrete time modeling using discrete mechanics This section contains the modeling of the attitude dynamics of the spacecraft using discrete mechanics [21]. In most optimal control problems involving mechanical systems, some sort of discretization is performed in order to employ numerical techniques. In this approach the variation description is directly discretized and discrete time equations are obtained. This approach is advantageous in comparison to the usual discretization of the continuous time model because it preserves certain invariants of the system such as momentum and energy. For ease of understanding, an introduction to discrete mechanics is described here followed by the discrete time modeling of the attitude dynamics of the spacecraft. 2.1. Introduction. Consider a mechanical system with the configuration space Q as a smooth manifold. Then the velocity vectors lie on the tangent bundle T Q of the manifold Q and the Lagrangian for the system can be defined as L : T Q → R [20]. In discrete mechanics, the velocity phase space T Q is replaced by Q × Q which is locally isomorphic to T Q. Let us consider an integral curve q(t) in the configuration space such that q(0) = q0 and q(h) = q1 , where h represents the integration step. Then the discrete Lagrangian Ld : Q × Q → R which is an approximation of the action integral along the integral curve segment between q0 and q1 can be defined as [22] Z h Ld (q0 , q1 ) ≈ (2.1) L (q(t), q(t)) ˙ dt. 0
Pick h > 0; this plays the role of step length. Let us consider a grid of the time domain T = N h as {tk = kh|k = 0, 1, . . . , N } and the corresponding discrete path space Pd (Q) := qd : {tk }N k=0 → Q . The discrete trajectory qd ∈ Pd (Q) is such that qd (tk ) = qk [22] . Now we define the discrete action sum Gd as Gd (qd ) :=
N −1 X
Ld (qk , qk+1 ) .
k=0
Let us assume that qd (0) = q0 and qd (tN ) = qN are fixed. Then we define the variations δ(qd ) such that δ(qd (tk )) = δ(qk ) ∈ Tqk Q which vanishes at the end points (i.e. δ(q0 ) = δ(qN ) = 0). A discrete path qd is a stationary point of the discrete action sum if Dqd Gd (qd )δ(qd ) = 0 for all δ(qd ) [13, p. 21]. This is equivalent of saying that the points {qk } of the path qd satisfies the discrete Euler-Lagrange equations i.e. (2.2)
D2 Ld (qk−1 , qk ) + D1 Ld (qk , qk+1 ) = 0
for all k = 1, 2, . . . , N − 1
where Di is the derivative of the function with respect to ith argument. Notice that (2.2) involves qk−1 , qk and qk+1 at kth instant of time, which means the difference equations obtained will be of second order. To come up with the discrete time model with first order difference equations, one needs to use the discrete time analogue of the Hamiltonian formulation. To serve this purpose, we now discuss the discrete Hamiltonian formulation. The continuous time Legendre transform is a map FL from the Lagrangian state space T Q to the Hamiltonian
4
K. S. PHOGAT, D. CHATTERJEE, AND R. BANAVAR
phase space T ∗ Q. Similarly, the discrete time Legendre transform F+ Ld , F− Ld : Q × Q → T ∗ Q [21] can be defined as F+ Ld (qk , qk+1 ) 7→ (qk+1 , pk+1 ) = (qk , D2 Ld (qk , qk+1 )) , F− Ld (qk , qk+1 ) 7→ (qk , pk ) = (qk , −D1 Ld (qk , qk+1 )) , which is a map from the discrete Lagrangian state space Q × Q to the discrete Hamiltonian phase space T ∗ Q. The map F+ Ld is the forward discrete Legendre transform which relates (qk , qk+1 ) to Tq∗k+1 Q. Similarly, the map F− Ld is the backward discrete Legendre transform which relates (qk , qk+1 ) to Tq∗k Q. Let the discrete Lagrangian map FLd : Q × Q → Q × Q be defined as FLd (qk , qk+1 ) = (qk+1 , qk+2 ) which defines the evolution of the dynamics on the discrete state space. Then the corresponding discrete Hamiltonian map F˜Ld : T ∗ Q → T ∗ Q can be defined in the following equivalent ways [21] −1 −1 F˜Ld := F± Ld ◦ FLd ◦ F± Ld = F+ Ld ◦ F− Ld which is quite clear from the commuting diagram shown in Figure 1. The discrete
(qk , qk+1 ) F− Ld
(qk , pk )
F Ld
(qk+1 , qk+2 )
F+ Ld F− Ld F˜Ld
(qk+1 , pk+1 )
F+ Ld F˜Ld
(qk+2 , pk+2 )
Figure 1. Flow of the discrete Lagrangian and Hamiltonian map Hamiltonian map can be defined in coordinates as follows: (2.3) ( (qk , pk ) 7→ F˜Ld (qk , pk ) := (qk+1 , pk+1 )
where
pk = −D1 Ld (qk , qk+1 ) pk+1 = D2 Ld (qk , qk+1 )
2.2. Attitude dynamics in discrete time. We now apply the ideas introduced in §2.1 to obtain the discrete equations of the attitude dynamics of the spacecraft. First we describe the Lagrangian in continuous time. Then we take an approximation of the continuous time Lagrangian to define the discrete Lagrangian (2.1). Further, we define the discrete time attitude dynamics using discrete Hamiltonian formulation (2.3). Consider a rigid body with a fixed point typically chosen to be center of mass. In order to define the orientation of a rigid body two coordinate systems are considered with the origin at the fixed point. One frame fixed to the rigid body is known as the body frame, the other is a frame fixed in space and is known as the spatial frame. Let X be the position of the mass element in the body frame. Then the position of the mass element in reference frame x is related to the body frame coordinates X by the rotation matrix R(t) as x(t) = R(t)X. Let B be the region occupied by the body in its reference frame. Let ρ(X) be the density of the rigid body in the body coordinates at point X. Then the kinetic energy of the rigid body is [13, p. 243]: Z 1 2 K= ρ(X) kxk ˙ d3 X 2 B
OPTIMAL ATTITUDE CONTROL OF A SPACECRAFT WITH STATE CONSTRAINTS
5
which can be rewritten, in view of the left-invariance of the kinetic energy [6, p. 275], as Z Z
2
1 1
˙ 2 3
˙ K= ρ(X) RX d X = ρ(X) R−1 RX
d3 X. 2 B 2 B We know that the spatial angular velocity vector Ω can be represented in terms of the body angular velocity vector ω as Ω = R−1 ω. Then (2.4)
˙ Ω × X = R−1 ω × R−1 x = R−1 (ω × x) = R−1 x˙ = R−1 RX
b = R−1 R. ˙ So, the kinetic energy From (2.4) we conclude the kinematic relation Ω can be represented in terms of the spatial frame angular velocity as Z 1 b b > d3 X = 1 tr ΩJ b dΩ b> , K= ρ(X) tr (ΩX)( ΩX) 2 B 2 where Jd =
1 2
Z
ρ(X)XX > d3 X.
B
The body moment of inertia matrix J := the following equation [19]
1 2
R B
b > Xd b 3 X is related to Jd by ρ(X)X
J = tr (Jd ) I3×3 − Jd . If the dissipative and potential forces are absent then the Lagrangian L : T SO(3) → R for the system is given by [13, p. 245]; 1 b b > L(R, Ω) := K = tr ΩJ dΩ 2 ˙ So, the b given above, we know that Ω b = R> R. By the kinematic relation R˙ = RΩ Lagrangian can be written as ˙ = 1 tr R> RJ ˙ d R˙ > R . (2.5) L(R, R) 2 We now proceed to discretize the Lagrangian (2.5). Considering the time in discrete domain tk = kh for k = 0, 1, . . . such that R(tk ) = Rk and the approximation ˙ k ) ≈ (Rk+1 −Rk ) for t ∈ [tk , tk+1 ] [19], the discrete Lagrangian Ld : SO(3) × R(t h SO(3) → R can be defined as: (Rk+1 − Rk ) Ld (Rk , Rk+1 ) ≈ hL Rk , h > h Rk (Rk+1 − Rk ) (Rk+1 − Rk )> Rk = tr Jd 2 h h 1 tr (Rk> Rk+1 − I3×3 )Jd (Rk> Rk+1 − I3×3 ) = 2h 1 (2.6) = tr ((I3×3 − Fk ) Jd ) , h where Fk = Rk> Rk+1 . Comment: Note that under the discretization technique employed, the discrete Lagrangian, like the continuous counterpart, is invariant under the action of the SO(3) group. This property will be useful later on when momentum equations alone are solved and the rotation sequence constructed based on the momentum history. Our objective is to come up with the first order difference equations describing the attitude dynamics of the spacecraft. By the left trivialization of the cotangent bundle of a Lie group, T ∗ SO(3) can be represented as SO(3)×so(3)∗ [1, p. 254]. We
6
K. S. PHOGAT, D. CHATTERJEE, AND R. BANAVAR
now proceed to find the discrete time Hamiltonian map (2.3) F˜Ld : SO(3)×so(3)∗ → SO(3) × so(3)∗ such that ( b b k = Rk+1 , Π b k+1 , where Πk = −D1 Ld (Rk , Rk+1 ) F˜Ld Rk , Π and Πk ∈ R3 b k+1 = D2 Ld (Rk , Rk+1 ) Π b k and Π b k+1 we first define the variations in Rk in terms of ηbk ∈ To find the Π so(3) and later find the expressions D1 Ld (Rk , Rk+1 ) and D2 Ld (Rk , Rk+1 ) using the duality product on so(3) [20, p. 290]. For a given ∈ R and ηk ∈ R3 , the variation in Rk can be defined as d δRk := Rk e(bηk ) = Rk ηbk , where ηbk ∈ so(3); (2.7) d =0 b k ∈ so(3)∗ and ηbk ∈ so(3) is defined as then the duality product of Π D E 1 1 b > d b Ld (Rk , Rk+1 ) = tr δRk> Rk+1 Jd tr Πk ηbk =: Πk , ηbk = − 2 d =0 h 1 1 = tr ηbk> Rk> Rk+1 Jd = tr Fk Jd ηbk> . h h Hence 1 1 b tr Πk − Fk Jd ηbk> = 0 for all ηbk ∈ so(3) h 2 {z } | Ck
which means Ck is a symmetric matrix and hence its skew-symmetric part is zero, and this leads to c k = Fk Jd − Jd F > hΠ k
(2.8)
b k+1 ∈ so(3)∗ and ηbk+1 ∈ so(3) gives, Similarly the duality product of Π D E 1 b 1 > b k+1 , ηbk+1 = d tr Πk+1 ηbk+1 =: Π Ld (Rk , Rk+1 ) = tr − Rk> δRk+1 Jd 2 d =0 h 1 1 > = − tr Rk> Rk+1 ηbk+1 Jd = tr Jd Fk ηbk+1 h h Hence 1 1 > b tr Πk+1 − Jd Fk ηbk+1 = 0 for all ηbk+1 ∈ so(3) h 2 | {z } Dk
which means Dk is a symmetric matrix and hence its skew-symmetric part is zero. Hence (2.9)
> > b k Fk = F\ b k+1 = Jd Fk − Fk Jd = Fk> Π Π k Πk h
which gives the following update equation for the momentum (2.10)
Πk+1 = Fk> Πk .
In the presence of control input (2.10) modifies to: (2.11)
Πk+1 = Fk> Πk + huk ,
OPTIMAL ATTITUDE CONTROL OF A SPACECRAFT WITH STATE CONSTRAINTS
7
where uk is the input at kth instant of time. Hence we write the rigid body equations in discrete time as follows: Rk+1 = Rk Fk Rigid Body Πk+1 = Fk> Πk + huk Dynamics d hΠk = Fk Jd − Jd Fk> 3. Optimal control of discrete time attitude dynamics Now we address the optimal control problem arising in executing energy optimal attitude manoeuvres of a spacecraft. The configuration of the spacecraft has three actuators, each aligned along the principal moment of inertia axes. Each actuator has individual saturation limits. The objective is to find the energy optimal control profile for orienting the spacecraft from an initial configuration to a desired configuration obeying the momentum bounds. First we pose this problem as an optimal control problem and then we derive the first order necessary optimality conditions using discrete variational analysis. Later the boundary value problem obtained as a first order necessary conditions will be solved using the multiple shooting method. 3.1. Problem description. Our objective is to find the energy optimal control law to manoeuvre a spacecraft from the initial configuration (Ri , Πi ) to the final configuration (Rf , Πf ) in N discrete time steps satisfying the following constraints: (1) uik ≤ ci k = 0, 1, . . . , N − 1 and i = 1, 2, 3. i i (2) Πk ≤ d k = 1, 2, . . . , N − 1 and i = 1, 2, 3. This problem can be posed as an optimal control problem in discrete time as follows: (3.1)
minimize J := {uk }
N −1 X k=0
1 2 kuk k2 2
subject to (3.2) Rk+1 = Rk Fk system of equations Πk+1 = Fk> Πk + huk d hΠk = Fk Jd − Jd Fk> (3.3) boundary conditions
with
(R0 , Π0 ) = (Ri , Πi ), (RN , ΠN ) = (Rf , Πf ) and
(3.4) ( constraints
2 2 uik ≤ ci for all k = 0, 1, . . . , N − 1 and i = 1, 2, 3. 2 2 Πik ≤ di for all k = 1, 2, . . . , N − 1 and i = 1, 2, 3.
Comment: Note that the optimal control problem (3.1) has both control and state inequality constraints. While the individual control inputs are constrained in magnitude, the performance measure reflects a 2-norm on the control action at each stage. 3.2. Necessary optimality conditions. First we represent the variations of Fk in terms of variations in Πk and then the first order necessary conditions are derived. • Representation of the variations: Using (2.7) the variations for the matrix Rk> Rk+1 is defined as (3.5) δ Rk> Rk+1 = δRk> Rk+1 + Rk> δRk+1 = −ηbk Rk + Rk ηbk+1
8
(3.6)
K. S. PHOGAT, D. CHATTERJEE, AND R. BANAVAR
[ >x = F >x Using the property F bF , (3.5) simplifies to ∧ δ Rk> Rk+1 = Fk −Fk> ηk + ηk+1 Similarly for a given ξk ∈ R3 we define the variation in Fk ∈ SO(3) as
(3.7)
δFk = Fk ξbk . dk = Fk Jd − Jd F > in (3.2) gives the relation between The implicit form hΠ k momentum and change in orientation at kth time instance. So, the relation between the variations in momentum δΠk and δFk can be obtained from the implicit equation as [18] >[ [k = δFk Jd − Jd δFk> = R [ hδΠ k ξk Rk Jd + Jd Rk Rk ξk ∧
can be further simplified using x bA + A> x b = ({tr[A]I3×3 − A} x) to [k = ((tr (Fk Jd ) I3×3 − Fk Jd ) Rk ξk )∧ hδΠ
Lemma 3.1. The matrix (tr (Fk Jd ) I3×3 − Fk Jd ) is invertible if s 2d3 + d2 − d1 kζk , < cos 2 2(d3 + d2 ) where Fk = eζ , d3 . b
ζ ∈ R3 and Jd = diag(d1 , d2 , d3 ) such that 0 < d1 ≤ d2 ≤
We present a proof of Lemma 3.1 in Appendix A. Armed with Lemma 3.1, we represent the vector ξk in terms of the variations in momentum i.e. δΠk [18] as ξk = Bk δΠk
(3.8)
−1
where Bk = hFk> (tr (Fk Jd ) I3×3 − Fk Jd ) . Now we derive the necessary optimality conditions. • Necessary optimality conditions: Let χk ∈ R3 and λk ∈ R3 be the Lagrange multipliers corresponding to the equality constraints (3.2) Rk+1 − Rk Fk = 0 and Πk+1 − Fk> Πk − huk = 0 respectively. Similarly 0 ≤ αki ∈ R and 0 ≤ βki ∈ R are the La2 grange multipliers corresponding to the inequality constraints uik ≤ i 2 i 2 i 2 c and Πk ≤ d . Before defining the augmented performance index let us justify why we choose the Lagrange multiplier χk ∈ R3 corresponding the rotational kinematics Rk+1 − Rk Fk = 0. Rotational kinematics can be rewritten as Rk> Rk+1 − Fk = 0, where Fk can be identified by its skew symmetric part which can identified by a vector in R3 [16]. Claim 3.2. Consider the equality Rk> Rk+1 = Fk . If we assume that the step length h is small enough such that the relative orientation Rk> Rk+1 , between two adjacent time instances k, k + 1 is less than π2 i.e. kζk k
Rk+1 = eζk , 2
ζk ∈ R3 ,
then equality is satisfied if and only if the skew symmetric parts of both sides are identical.
OPTIMAL ATTITUDE CONTROL OF A SPACECRAFT WITH STATE CONSTRAINTS
9
Now the augmented performance index can be defined as minimize Ja := |uik |≤ci
N −1 X k=0
1 huk , uk i + λk , −Πk+1 + Fk> Πk + huk 2
∨ 1 ∨ 1 > + χk , Fk − Fk> − Rk> Rk+1 − Rk+1 Rk 2 2 +
N −1 X 1 1 hαk , uk uk − c ci + hβl , Πl Πl − d di 2 2 l=1
where c = c1
c2
c3
>
,
d = d1
d2
d3
>
x y = x1 y 1
,
x2 y 2
x3 y 3
>
Using (3.6), (3.7) and (3.8) we define the infinitesimal variation of the augmented performance index as follows: δJa :=
N −1 X
{hδuk , uk i +
k=0
Dχ
k
2
, δ Fk − Fk>
∨
> − δ Rk> Rk+1 − Rk+1 Rk
∨ E
+ λk , −δΠk+1 + δFk> Πk + Fk> δΠk + hδuk + hδuk , αk uk i}
+
N −1 X
hδΠl , βl Πl i
l=1
where αki , βli ≥ 0
(3.9)
for all i = 1, 2, 3.
with the complementary slackness conditions (3.10) βli (Πil )2 − (di )2 = 0 and αki (uik )2 − (ci )2 = 0 ∧
Employing the property that x bA + A> x b = {(tr[A]I3×3 − A) x} and the variation on the boundary is zero i.e. η0 = ηN = 0, δΠ0 = δΠN = 0. We rearrange the terms of the expression δJa and get the following expression after algebraic manipulations: δJa =
N −1 X
hδuk , uk + hλk + αk uk i
k=0
+
N −1 D X k=1
+
E ηk , Fk (tr (Fk ) I3×3 − Fk ) χk − (tr (Fk−1 ) I3×3 − Fk−1 ) χk−1 2
N −1 D X
E >Π δΠk , −λk−1 + Fk − Bk> F\ λk k k
k=1
(3.11)
+
N −1 X k=1
1 δΠk , βk Πk + Bk> (tr (Fk ) I3×3 − Fk ) χk 2
By the first order necessary condition of optimality, i.e., δJa = 0 along all possible variations δuk , ηk , δΠk , we obtain the co-state equations from (3.11) as: (3.12) ( (Fk ) I3×3 − Fk ) χk = 0 Co-state (tr (Fk−1 ) I3×3 − Fk−1 ) χk−1 − Fk (tr 1 > >Π Dynamics βk Πk − λk−1 + Fk − Bk> F\ k λk + 2 Bk (tr (Fk ) I3×3 − Fk ) χk = 0 k
10
K. S. PHOGAT, D. CHATTERJEE, AND R. BANAVAR
and the optimality condition for the control as (3.13)
u ˜k + hλk + αk u ˜k = 0.
From (3.10) we know that if u ˜ik lies in the interior then αki = 0. So, i by (3.13) we have hλk = −˜ uk . On the other hand if u ˜ik = ci then by i i i i (3.13),(3.9) we have hλk = −c (1 + αk ) ≤ −c . Similarly for u ˜ik = −ci , we i i i i have hλk = c (1 + αk ) ≥ c . Hence the optimal control can be written in a compact form as (3.14) u ˜ik = − min ci , hλik sgn(λik ) Now we represent the state and co-state dynamics in terms on momentum and costate corresponding to momentum variables. This approach will reduce the model of the system and hence the algorithm will perform better in terms of memory and time requirement. 4. Scaling and model reduction In order to reduce the dynamics of the system to the momentum variables, we solve the orientation dynamics. Then the orientation boundary constraints (R0 , RN ) = (Ri , Rf ) can be represented in terms of Fk which can be computed for a given Πk using the implicit form dk = Fk Jd − Jd F > . (4.1) hΠ k
First we represent orientation constraints in terms of Fk and then we discuss an approach for computing Fk for a given value of Πk . 4.0.1. Representing orientation constraints in terms of momentum. We now represent the boundary constraints on orientation (R0 , RN ) = (Ri , Rf ) (3.3) in terms of Fk . Then using (3.2) we reconstruct the orientation Rk variables, we see that Rf can be represented in terms of Fk for k = 1, 2, . . . , N − 1 as follows: Rf = RN = Ri F0 F1 F2 . . . FN −1 The boundary constraints of orientation can be rewritten as: (4.2)
Ri> Rf = F0 F1 F2 . . . FN −1
To represent the constraints (4.2) in vector form, we will have nine equations however in order to implement the Newton’s method for finding roots of the nonlinear algebraic equations the number of free variables has to be equal to the boundary conditions. From (3.12) we know that the number of free variables corresponding to orientation kinematics are three: χ0 ∈ R3 . So the boundary conditions (4.2) have to be represented in to three independent constraints. Let us define logm( · ) : SO(3) → so(3) and ( · )∨ : so(3) → R3 , then the boundary condition (4.2) is satisfied if the following condition holds ∨ (4.3) Orientation constraints Cornt := logm Rf> Ri F0 F1 F2 . . . FN −1 =0 For implementation of the Newton’s algorithm, we need to compute the gradient of the orientation constraints (4.3) w.r.t. momentum Πk as follows: From (4.3), we know that ∧ eCornt = Rf> Ri F0 F1 . . . Fk . . . FN −1 then ∧ ∧ eCornt DΠik Cornt = Rf> Ri F0 F1 . . . DΠik (Fk ) . . . FN −1 . After algebraic manipulations we get ∧ DΠik Cornt = FN>−1 FN>−2 . . . Fk> DΠik (Fk )Fk+1 . . . FN −1 ,
OPTIMAL ATTITUDE CONTROL OF A SPACECRAFT WITH STATE CONSTRAINTS
11
> x = A> x using the property Ad ˆA we conclude that ∨ DΠik Cornt = FN>−1 FN>−2 . . . Fk> DΠik Fk .
Hence the gradient of the orientation constraints (4.3) w.r.t. momentum Πk is (4.4) DΠk Cornt = DΠ1k Cornt DΠ2k Cornt DΠ3k Cornt We notice that the orientation constraints (4.3) can be computed only when we construct the matrix Fk for a given value of the momentum vector Πk . Similarly, the gradient of the orientation constraints (4.4) can be computed only when we find the derivative of Fk w.r.t. Πik for k = 1, 2, . . . , N − 1 and i = 1, 2, 3. Now we find Fk and its derivative w.r.t. Πik for a given value of Πk . 4.0.2. Determining Fk and DΠik Fk in terms of momentum Πk . In this subsubsection we find Fk in terms of Πk in order to calculate the orientation constraints (4.3). We know that the Fk can be obtained from Πk by solving the implicit form (4.1). For solving this implicit form we choose quaternions to parameterize the matrix Fk . Let 2 q0 + q12 − q22 − q32 2q1 q2 − 2q0 q3 2q1 q3 + 2q0 q2 q02 − q12 + q22 − q32 2q2 q3 − 2q0 q1 , Fk := 2q1 q2 + 2q0 q3 2q1 q3 − 2q0 q2 2q2 q3 + 2q0 q1 q02 − q12 − q22 + q32 and the inertia matrix J and Jd are defined as: x x −I + Iy + Iz I 0 0 1 y 0 0 , Jd := J := 0 I 2 0 0 0 Iz
0 Ix − Iy + Iz 0
0 . 0 x y z I +I −I
> be the momentum of the body at the kth instance and Let Πk := Π1k Π2k Π3k > q = (q0 , q1 , q2 , q3 ) ; then (4.1) can be represented in the form of nonlinear algebraic equations as follows: 2q2 q3 (Iz − Iy ) + 2q0 q1 Ix − hΠ1k 2q1 q3 (Ix − Iz ) + 2q0 q2 Iy − hΠ2 k g (q(Πk ), Πk ) := (4.5) 2q1 q2 (Iy − Ix ) + 2q0 q3 Iz − hΠ3k = 0 q02 + q12 + q22 + q32 − 1 For a fixed value of momentum Πk , the system of equation (4.5) has quaternions as unknown parameters which can be numerically found using Newton’s method at each instant of time. Since Fk is represented in terms of quaternions, we first need to find the variations of the quaternions in terms of the momentum vector Πk which can be obtained by taking derivative of (4.5) w.r.t. Πk as follows Dq g (q(Πk ), Πk ) DΠk q(Πk ) + DΠk g (q(Πk ), Πk ) = 0; this results in ∂q0
(4.6)
∂Π1 ∂q1k ∂Π1 k Dq g (q(Πk ), Πk ) ∂q21 ∂Πk ∂q3 ∂Π1k
|
∂q0 ∂Π2k ∂q1 ∂Π2k ∂q2 ∂Π2k ∂q3 ∂Π2k
{z
DΠk q(Πk )
∂q0 ∂Π3k ∂q1 ∂Π3k ∂q2 ∂Π3k ∂q3 ∂Π3k
}
h 0 0 0 h 0 = 0 0 h 0 0 0
12
K. S. PHOGAT, D. CHATTERJEE, AND R. BANAVAR
where 2q1 Ix 2q2 Iy Dq g (q(Πk ), Πk ) = 2q3 Iz 2q0
2q0 Ix 2q3 (Ix − Iz ) 2q2 (Iy − Ix ) 2q1
2q3 (Iz − Iy ) 2q2 (Iz − Iy ) 2q0 Iy 2q1 (Ix − Iz ) . y x 2q1 (I − I ) 2q0 Iz 2q2 2q3
The matrix DΠk q can be obtained by solving the linear system (4.6). Hence the derivative of the matrix Fk w.r.t. Πik is obtained using the chain rule as follows: DΠik Fk =
(4.7)
3 X
Dqn Fk
n=0
∂qn . ∂Πik
We now discuss the reduction of the difference equation model (3.2), (3.12) to the momentum and comomentum dynamics respectively and later the reduced model is scaled by change of variables so as to make the model invariant under change in the step length h. Invariance of the difference equation model means that for a particular manoeuvre the optimal trajectory and corresponding Lagrange multipliers remain identical for different step lengths h. This matter is quite essential because it largely affects the region of convergence and order of convergence of the algorithm [11]. 4.0.3. Scaling and model reduction. First we discuss about model reduction and later scaling of the reduced model by appropriate change of variable. Let us define a new variable ζk := 2h−2 (tr (Fk ) I3×3 − Fk ) χk then (3.12) can be written as Nk >Π (4.8) ζk = 0 βk Πk − λk−1 + Fk − hNk F\ k λk + k h (4.9) ζk−1 − Fk ζk = 0 where Nk =
> Bk h .
The backward difference equation (4.8) can be rewritten as a >Π forward difference equation in λ only if the matrix Fk − hNk F\ is invertible. k k > Lemma 4.1. The matrix Fk − hNk F\ k Πk is invertible if and only if the matrix
(tr (Fk Jd ) I3×3 − Fk Jd ) is invertible. A proof of Lemma 4.1 is provided in Appendix C. From (4.9) we conclude ζk = Q> k ζ0 such that Qk = F1 F2 . . . Fk . So (4.8), (3.2) can be further reduced to the following system of difference equation (4.10) ! Πk+1 − Fk> Πk − h˜ uk −1 = 0. Q> k+1 ζ λ + F − hN F >\ Π β Π −λ +N k+1
k+1
k+1 k+1
k+1
k+1
k+1
k
k+1
h
0
We now discuss the scaling of the system of equations (4.10). Assume for the moment vector u ˜k saturates i thati for a manoeuvre the ith element of the control i (i.e. u ˜k = c ) at kth instant of time. Clearly from (3.14) λik ≥ ch . Hence choosing the step length h small, λik will take very large values which makes the difference equations (4.10) highly skewed. To avoid this situation, let us define a variable γk = hλk . Then the system of difference equations (4.10) modifies to ! Πk+1 − Fk> Πk − h˜ uk −1 (4.11) = 0, \ > Ξk+1 + hFk+1 − h2 Nk+1 Fk+1 Πk+1 βk+1 Πk+1 where (4.12)
u ˜ik = − min ci , γki sgn(γki ),
OPTIMAL ATTITUDE CONTROL OF A SPACECRAFT WITH STATE CONSTRAINTS
13
−1 Nk = tr Jd Fk> I3×3 − Jd Fk> Fk , −1 −1 > > > \ > Ξk+1 = γk+1 − Fk+1 − hNk+1 Fk+1 Πk+1 γk + Fk+1 Nk+1 Qk+1 ζ0 . Note that Fk and its gradient with respect to momentum can be obtained as discussed in §4.0.2. In the following section we employ multiple shooting method to solve the system of difference equations (4.11) with boundary conditions (3.3) and constraints (3.4).
5. Multiple Shooting Method Shooting method was mainly developed for solving ordinary differential equations or system of difference equations with boundary conditions. An initial guess is taken for the unknown initial values of the differential or difference equation variables. Then the variables value is computed at the terminal time and is compared with the known value of the variables at boundary. Then the initial guess is improved at each iteration to match with the known boundary values. In the multiple shooting method the time domain is divided into sub-intervals (time domain decomposition) and the boundary value problem is solved for each sub-interval with the condition that the boundary value of the adjacent intervals is the same. Multiple shooting is just a generalization of the shooting method in the sense that multiple shooting with a single time interval is equivalent to the shooting method [12]. Multiple shooting method has many advantages over the single shooting method. Multiple shooting method is stable and hence can be applied to the highly instable problems as well. Second, the time domain decomposition allows one to introduce the initial guess to the problem with prior knowledge. Multiple shooting method allows one to compute the solution of the differential equation at individual intervals which can be very efficient in computation using parallel architecture [12]. 5.1. Introduction to multiple shooting. Multiple shooting method is a generalization of the single shooting method in which the two point boundary value problem is solved at each iteration for the subintervals of time domain simultaneously. Let (5.1) (5.2)
x ∈ Rn
x˙ = f (x, t) n
n
n
B :R ×R →R
with boundary conditions
such that B(x(a), x(b)) = 0.
Let the time domain be decomposed into N sub-interval as follows: t0 = τ0 < τ1 . . . τN −1 < τN = tf and let us consider (N + 1) variables s0 , s1 , . . . , sn known as the multiple shooting variables. These multiple shooting variables are the guessed initial values of the dependent variable x defined in (5.1) at the specified time instants. Now we define initial vaule problem for each sub-interval as follows: (5.3)
x˙ k = f (xk , t)
such that xk : [τk , τk+1 ] → Rn with
xk (τk ) = sk for k = 0, 1, . . . , (N − 1). Now, we can notice that the solution xk ( · , sk ) : k = 0, 1, . . . , (N − 1) to the initial value problems (5.3) can be a solution to the boundary value problem (5.1) only if the solution xk of the interval [τk , τk+1 ] matches with the initial condition for the next interval i.e. xk (τk+1 , sk ) = sk+1 . This condition is known as the matching (5.4)
14
K. S. PHOGAT, D. CHATTERJEE, AND R. BANAVAR
condition. These matching conditions for each interval can be combined together and can be represented in the mathematical form as follows: s1 − x0 (τ1 , s0 ) s2 − x1 (τ2 , s1 ) .. (5.5) F (s) := =0 . sN − xN −1 (τN , sN −1 ) B(x(a), x(b)) with xk ( · , sk ) be the solution of IVP (5.3) and s := s0 , s1 , . . . , sN . The system of algebraic equations (5.5) can be solved using Newton’s type algorithm for multivariable functions. Newton’s iterates can be defined as follows: Let s0 ∈ Rn be the initial guess, then update:
sm+1 = sm + ∆sm
for m = 0, 1, 2, . . .
Where ∆sm is the solution of the system DF (sm )∆sm = −F (sm ). Terminate the algorithm once the difference between the two consecutive updates i.e. {sm and sm+1 } is less then the pre-specified tolerance. 5.2. Multiple shooting method for attitude dynamics. The system dynamics (4.11) with the boundary conditions (4.3) and (Π0 , ΠN ) = (Πi , Πf ) (3.3) have to be solved with additional inequality constraints (Πik )2 ≤ (di )2 (3.4) alongwith the complimentary slackness conditions (3.10) as defined below: Πk+1 − Fk> Πk − h˜ uk = 0 −1 (5.6) Dynamics Ξ + hF − h2 N F >\ Π β Π =0 k+1
k+1
k+1 k+1
k+1
(5.7)
( Cmtm = 0 boundary conditions Cornt = 0
(5.8)
slackness conditions βki (Πik )2 − (di )2 = 0,
k+1
βki ≥ 0,
k+1
(Πik )2 ≤ (di )2
where u ˜ik = − min ci , γki sgn(γki ) −1 Nk = tr Jd Fk> I3×3 − Jd Fk> Fk −1 −1 > > > \ > Ξk+1 = γk+1 − Fk+1 − hNk+1 Fk+1 Πk+1 γk + Fk+1 Nk+1 Qk+1 ζ0 ΠN − Πf Cmtm := Π0 − Πi First we consider the case in which state constraints are not active (i.e. βk = 0 for all k). So, (5.8) is trivially satisfied. If state constraints are not active then the necessary conditions are defined by (5.6) with βk = 0 for all k and (5.7). We now represent the matching and boundary condition for the system of difference equations (5.6) and (5.7) in terms of Πk , γk and ζ0 and solve the system of nonlinear algebraic equations comprises of matching conditions. 5.2.1. Matching conditions for multiple shooting method. The system of difference equations (5.6) along with the boundary conditions (5.7) will result in to the following set of matching conditions further which can be solved using the Newton’s root finding algorithm with quadratic convergence rate [23].
OPTIMAL ATTITUDE CONTROL OF A SPACECRAFT WITH STATE CONSTRAINTS
Σ1 Ξ1 .. .
15
Σk Ξk M(X) := . = 0, .. ΣN ΞN Cmtm Cornt
(5.9)
where X := Π0
γ0
...
Πk
γk
...
ΠN
γN
ζ0
>
,
Fk> Πk
Σk := Πk+1 − − h˜ uk , −1 −1 > > > \ > Ξk := γk+1 − Fk+1 − hNk+1 Fk+1 γk + Fk+1 Πk+1 Nk+1 Qk+1 ζ0 , We define the gradient of the matching conditions (5.9) −G1 A1 0 ... 0 0 −G A . . . 0 2 2 .. .. .. .. .. . . . . . (5.10) DX M(X) := 0 0 0 . . . −G N −1 0 0 0 . . . 0 Bi 0 0 ... 0 H0 H1 H2 . . . HN −2
as follows: 0 0 .. .
0 0 .. .
AN −1 −GN 0 HN −1
0 AN Bf HN
D1 D2 .. .
, DN −1 DN 0 0
where
−DΠk−1 Σk −Dγk−1 Σk I3×3 0 Gk := , Ak := , Hk := DΠk Cornt 0 , 0 −Dγk−1 Ξk DΠk Ξk I3×3 0 0 I3×3 0 0 i f B := DΠ0 Cmtm = , B := DΠN Cmtm = , Dk := . I3×3 0 0 0 Dζ0 Ξk Notice that u ˜k defined in (4.12) is not differentiable, however the function is Lipschitz continuous. So, we take the generalized gradient [7] which is defined as ( i −1 if γk ≤ ci (Dγk u ˜k )ii = for i = 1, 2, 3. 0 otherwise Theorem 5.1. The Jacobian matrix DX M(X) is non-singular if the following assumptions hold (1) There exist a time instant k such that the control u ˜k is not saturated. (2) X := WN Z−1 Q has full rank. where W0 = H0 ,
Wi = Hi + Ti−1 G−1 i Ai ,
−1 −1 Z = Bf + Bi G−1 1 A1 G2 A2 . . . GN AN ,
M1 = G−1 1 , Q = Bi
N X i=1
−1 Mi = G−1 1 . . . Ai−1 Gi , !
Mi Di
.
16
K. S. PHOGAT, D. CHATTERJEE, AND R. BANAVAR
A proof of the Theorem 5.1 is given in Appendix D. Now the nonlinear algebraic equations (5.9) can be solved using a non-smooth version of Newton’s method [25], and this is illustrated with the help of the flowchart shown in Figure 2.
Start
Initialize X and the Error Tol δ > 0
update X = X + ∆X
Evaluate ∆X by solving the Linear System: DX M(X)∆X = −M(X)
Evaluate the Matching Conditions M(X) and its gradient DX M(X)
No
Is kM(X)k∞ ≤ δ?
Yes Stop Figure 2. Newton’s Root finding algorithm
5.2.2. Multiple Shooting Method with State Constraints. Now we discuss the more general case where the Momentum constraints are active. By the complementary slackness conditions (5.8), it is clear that if the momentum constraints are not active then βki = 0 for all i = 1, 2, 3, and k = 1, 2, . . . , N − 1. On the other hand, if the slack variable βki > 0 then the momentum variable Πik corresponding to that slack variable βki lies on the boundary (i.e., Πik = ±di ) [5]. The original Newton’s root finding algorithm cannot handle momentum inequality constraints; we propose for a modified strategy handling the momentum inequality constraints. Let Λ := X ∈ R6N +9 | Πik ≤ di be the feasible region. Since Λ is the intersection of the two half spaces X + := X|Πik ≤ di and X − := X|Πik ≥ −di , hence a convex set. Let PΛ : R6N +9 → Λ be the projection onto the feasible region Λ and ˜ M(X) represent the active constraints. Then the following steps are followed:
OPTIMAL ATTITUDE CONTROL OF A SPACECRAFT WITH STATE CONSTRAINTS
17
Algorithm 1 Modified Multiple Shooting Method ˜ procedure Root of the function M(X) such that X ∈ Λ Choose appropriate initial guess X and the error tolerance bound δ > 0. Projection ˜ 0 γ0 . . . Π ˜ k γk . . . Π ˜ N γN ζ0 > 4: Compute X 7→ PΛ (X) := Π ˜ i = sgn(Πi ) min di , Πi . where Π k k k 5: Evaluate ( i −˜ uik if u ˜k < ci i γ˜k−1 = , i γk−1 elsewhere 1: 2: 3:
where u ˜k = 6: 7:
8: 9:
10:
11: 12: 13: 14: 15: 16:
˜k − F> Π ˜ Π k−1 k−1
h
(using (5.6)).
˜ i = di then if Π k Compute the slack variable i ˜ k )Ξk−1 (Π ˜ k , γ˜k , γ˜k−1 , ζ0 ) Z(Π , βki = ˜i Π k where >Π Z(Πk ) = hFk − h2 Nk F\ (using (5.6)). k k end if Define active constraints ˜ ˜ 1 . . . Σk Ξ ˜k . . . M(X) = Σ1 Ξ where ( Πi − di if β i > 0 i k k ˜ Ξk := Ξik elsewhere
ΣN
˜N Ξ
Cmtm
Cornt
>
˜ X) ˜ and its gradient D ˜ M( ˜ X) ˜ Evaluate the matching conditions M( X > ˜ := Π ˜ 0 γ˜0 . . . Π ˜ k γ˜k . . . Π ˜ N γ˜N ζ0 . where X
˜ ˜ if M(X) < δ then Stop. ∞ end if ˜ by solving the linear system D ˜ M( ˜ X)∆ ˜ X ˜ = −M( ˜ X). ˜ Calculate ∆X X ˜ ˜ Update the value of X = X + ∆X. goto Projection. end procedure
18
K. S. PHOGAT, D. CHATTERJEE, AND R. BANAVAR
Start Initialize X and the Error Tol δ > 0
˜ + ∆X ˜ update X = X
Evaluate PΛ (X), γ˜k , βk
Define active con˜ ˜ straints M(X) and X ˜ by solving Evaluate ∆X the Linear System: ˜ X)∆ ˜ X ˜ = −M( ˜ X) ˜ DX M(
No
Evaluate the Matching ˜ X) ˜ and Conditions M( ˜ X) ˜ its gradient D ˜ M( X
Is
˜ ˜
M(X) ≤ ∞ δ?
Yes Stop Figure 3. Modified multiple shooting algorithm for problems with state constraints
6. Numerical Simulations and Results The following data has been considered for the simulations: Principal Moment of inertia of the satellite (Ix , Iy , Iz )=(800, 1200, 1000) kgm2 , Sampling time (T ) = 0.1 s, Range of angles (θ) can vary between [10◦ , 90◦ ] about any axis, Maximum torque or control bound (c) = (20, 20, 20) Nm, maximum momentum (d) = (70, 70, 70) Nms, time duration (tmax ) can range from 5 s to 30 s. An open loop optimal control for a manoeuvre of reorienting the satellite for 90◦ profile is obtained 1 1 1 about axis √3 , √3 , √3 from initial momentum Πi = (−30, −10, 10) Nms to desired momentum Πf = (0, 0, 0) Nms in 19 s. The optimal control profile alongwith the momentum and co-state vectors is shown in Figure 4.
OPTIMAL ATTITUDE CONTROL OF A SPACECRAFT WITH STATE CONSTRAINTS
Optimal Control
19
Momentum
20 x
u
Π
60
uy
10
x
Πy
uz
Πz
40 0 20 −10 0 −20 0
5
10
15
0
5
CoMomentum γ
x
ζ
0
γy
ζy −50
γz
10
15
CoRotation
x
20
10
ζz
−100
0
−150 −10 −200 −20 0
5
10
15
Figure 4. Rotation of 90◦ about
0
5
√1 , √1 , √1 3 3 3
10
15
axis with ini-
tial momentum Πi = (30, −10, 10) Nms, desired momentum Πf = (0, 0, 0) Nms, time duration = 19 s.
It is clear from the Figure 4 that the control saturates when absolute value of the co-state vector corresponding to the momentum is more than the control bound. If the momentum saturates then the control along that axis goes to zero.
7. Conclusion and Future Direction Optimal control of a spacecraft attitude manoeuvres under control and momentum constraints is presented. We used discrete mechanics to discretize the model which has many advantages over the conventional discretization schemes like Euler’s steps. The model obtained preserves the conserved quantities of the body like momentum and energy. It is efficient in numerics because the model reduces to the momentum dynamics only. A new multiple shooting algorithm is proposed to solve the system of difference equations obtained as a first order necessary condition using variational analysis. This algorithm can be used to solve optimal control problems with state inequality constraints. In future, the convergence results for the modified multiple shooting method can be explored. The multiple shooting method uses Newton’s root finding algorithm at each step for finding the roots of the matching conditions. Newtons’s method has quadratic rate of convergence in the neighborhood of the solution, and therefore it is worth exploring the convergence rates of our algorithm in a neighborhood of the matching conditions.
20
K. S. PHOGAT, D. CHATTERJEE, AND R. BANAVAR
Appendix A. Proof of Lemma 3.1 (See page 8) Lemma 3.1. The matrix (tr (Fk Jd ) I3×3 − Fk Jd ) is invertible if s kζk 2d3 + d2 − d1 cos < , 2 2(d3 + d2 ) where Fk = eζ ,
ζ ∈ R3 and Jd = diag(d1 , d2 , d3 ) such that 0 < d1 ≤ d2 ≤ d3 .
b
Proof. If tr (Fk Jd ) = 0 then the matrix (tr (Fk Jd ) I3×3 − Fk Jd ) is invertible. If tr (Fk Jd ) 6= 0 then(tr (Fk Jd ) I3×3 − Fk Jd ) is invertible if and only if the mar-
Fk Jd is invertible. Using Banach lemma [17, p. 193], the matrix tix I3×3 − tr(F k Jd )
Fk Jd Fk Jd I3×3 − tr(F is invertible if
tr(Fk Jd ) < 1. k Jd )
Fk Jd kFk Jd k kJd k
tr (Fk Jd ) = |tr (Fk Jd )| ≤ |tr (Fk Jd )|
Fk Jd kζk < 1 holds if kJ k < |tr (F J )|. Now we show that if cos Then tr(F
kζk q0 = cos 2 and (q1 , q2 , q3 ) = ζe sin kζk , the vector ζe represent the unit 2 vector corresponding to vector ζ. Then |tr (Fk Jd )| = d1 (q02 + q12 − q22 − q32 ) + d2 (q02 − q12 + q22 − q32 ) + d3 (q02 − q12 − q22 + q32 )
≥ d1 (q02 + q12 − q22 − q32 ) + d2 (q02 − q12 + q22 − q32 ) + d3 (q02 − q12 − q22 + q32 ) = d1 + d2 + d3 − 2 (d1 + d2 )q12 + (d2 + d3 )q22 + (d3 + d4 )q32 ≥ d1 + d2 + d3 − 2f ∗
(A.1) where (A.2)
f ∗ = maximize (d1 + d2 )x + (d2 + d3 )y + (d3 + d4 )z x,y,z
subject to x + y + z = 1 − q02 x ≥ 0, y ≥ 0, z ≥ 0. The optimization problem defined in (A.2) is a linear programing problem and hence the optimum value will be attained on the vertices of the feasible region. Without loss of generality, Thenf ∗ = (d3 + d2 )(1 − q02 ). assume qthat 0 < d1 ≤ d2 ≤ d3 .
Given that cos q02
Rk+1 = Fk . If we assume that the step length h is small enough such that the relative orientation Rk> Rk+1 , between two adjacent time instances k, k + 1 is less than π2 i.e. π b kζk k < where Rk> Rk+1 = eζk , ζk ∈ R3 , 2
OPTIMAL ATTITUDE CONTROL OF A SPACECRAFT WITH STATE CONSTRAINTS
21
then equality is satisfied if and only if the skew symmetric parts of both sides are identical. Proof. This claim can be proved using the Rodrigues’s formula. Let A := Rk> Rk+1 ∈ SO(3) and B := Fk ∈ SO(3) then there exist vectors a, b ∈ R3 such that A = e(kakbae )
(B.1)
and B = e(kbkbe ) b
where xe is a unit vector corresponding to the vector x ∈ R3 . Using the Rodrigues’s formula [4] A = e(kakbae ) := I3×3 + sin(kak)b ae + (I3×3 − b ae b a> e )(cos(kak) − 1) we obtain, the skew-symmetric parts of A and B as A − A> B − B> = sin(kak)b ae and S(B) := = sin(kbk)bbe . 2 2 Given that S(A) = S(B) and since we know that so(3) ∼ R3 from (B.2) we have (B.2)
(B.3)
S(A) :=
sin(kak)ae = sin(kbk)be
case 1: If kbk = 0 then from (B.3) sin(kak)ae = 0 iff a = 0 which means a = b because kak ≤ π2 . Using the exponential map (B.1) one can conclude that A = B. case 2: If kbk = 6 0 then from (B.3) sin(kak) a e = be sin(kbk) which is true iff (B.4)
be = ae
and
(B.5)
sin(kak) = 1. sin(kbk)
The map sin :] − π2 , π2 [→] − 1, 1[ is bijective. Given that kbk < (B.5) that (B.6)
π 2,
we conclude from
kbk = kak
From (B.4) and (B.6) it is clear that a = b. Using the exponential map (B.1) one can conclude that A = B. Appendix C. Proof of Lemma 4.1 (See page 12) > Lemma 4.1. The matrix Fk − hNk F\ k Πk is invertible if and only if the matrix (tr (Fk Jd ) I3×3 − Fk Jd ) is invertible. >d > Proof. We know that F\ k hΠk = Fk hΠk Fk . Then using the implicit equation \ T > d hΠk = Fk Jd − Jd Fk , the matrix Fk − hNk Fk Πk can be rewritten as >d > Fk − hNk F\ k Πk = Fk − Nk Fk hΠk Fk −1 dk Fk = Nk Fk> Fk (Nk ) − hΠ dk Fk = Nk Fk> tr Jd Fk> I3×3 − Jd Fk> − hΠ
(C.1)
= Nk Fk> (tr (Fk Jd ) I3×3 − Fk Jd ) Fk −1 = tr Jd Fk> I3×3 − Jd Fk> (tr (Fk Jd ) I3×3 − Fk Jd ) Fk
22
K. S. PHOGAT, D. CHATTERJEE, AND R. BANAVAR
By (C.1) it is obvious to conclude that the matrix (tr (Fk Jd ) I3×3 − Fk Jd ) is invert\ > ible if and only if the matrix F − hN F Π is invertible. k
k
k
k
Appendix D. Proof of Theorem 5.1 (See page 15) Theorem 5.1. The Jacobian matrix DX M(X) is non-singular if the following assumptions hold (1) There exist a time instant k such that the control u ˜k is not saturated. (2) X := WN Z−1 Q has full rank. where W0 = H0 ,
Wi = Hi + Ti−1 G−1 i Ai ,
−1 −1 Z = Bf + Bi G−1 1 A1 G2 A2 . . . GN AN ,
M1 = G−1 1 , Q = Bi
N X
−1 Mi = G−1 1 . . . Ai−1 Gi , !
M i Di
.
i=1
f Proof. The matrix DX M(X) is similar to the upper triangular matrix DX M(X) which is obtained using the elementary row transformations. −G1 A1 0 ... 0 0 0 D1 0 −G2 A2 . . . 0 0 0 D2 .. .. .. .. .. .. .. .. . . . . . . . . f := 0 (D.1) DX M(X) 0 0 . . . −GN −1 AN −1 0 DN −1 0 0 0 ... 0 −GN AN DN 0 0 0 ... 0 0 Z Q 0 0 0 ... 0 0 0 X f Assuming that X has full rank, it is easy to conclude that the matrix DX M(X) is invertible if and only if Gi is invertible for i = 1, 2, . . . , N and Z is invertible. First we prove that Gi is invertible. −DΠk−1 Σk −Dγk−1 Σk Gi = 0 −Dγk−1 Ξk > \ > hDγk u ˜k Fk − hNk Fk Πk = (D.2) −1 \ > 0 Fk+1 − hNk+1 Fk+1 Πk+1 > By Lemma 4.1, we know that the matrix Fk − hNk F\ is invertible. Hence k Πk from (D.2) it is easy to conclude that the matrix Gi is invertible. Let us define the inverse to the matrix Gi as > −1 −1 > >Π ak −ak bk ak+1 ak = Fk − hNk F\ , k −1 k Gi := where 0 a> k+1 b = hD u ˜ k
γk k
Taking the first order approximation in h, the matrix Z can be approximated as −1 −1 Z = Bf + Bi G−1 1 A1 G2 A2 . . . GN AN I 0 (D.3) ≈ 3×3 ∗ s P N −1 −1 > where s = −r0−1 i=1 ri+1 bi ri+1 such that ri = aN aN −1 . . . ai . Now it is clear
from (D.3) that the matrix Z is invertible if the matrix s is invertible. Since ai is invertible for all i = 0,1,. . . ,N, the matrix ri is invertible. So it is enough to
OPTIMAL ATTITUDE CONTROL OF A SPACECRAFT WITH STATE CONSTRAINTS
23
PN −1 −1 > prove that the matrix i=1 ri+1 bi ri+1 is invertible for s being invertible. Now the matrix bi is a negative semidefinite matrix for i = 1, 2, . . . , N − 1. Assuming that there exist a time instant k such that the control u ˜k is P not saturated means that bk N −1 −1 > is negative definite. So we conclude that the matrix i=1 ri+1 bi ri+1 is negative definite and hence invertible. References [1] A. A. Agrachev and Y. L. Sachkov, Control Theory from the Geometric Viewpoint, Springer-Verlag New York, September 2003. [2] M. Athans, P. Falb, and R. Lacoss, Time-, fuel-, and energy-optimal control of nonlinear norm-invariant systems, Automatic Control, IEEE Transactions on, 8 (1963), pp. 196–202. [3] S. Bhatt, N. Bedrossian, K. Longacre, and L. Nguyen, Optimal propellant maneuver flight demonstrations on ISS, Guidance, Navigation, and Control (GNC) Conference AIAA, (2013). [4] A. M. Bloch, P. E. Crouch, J. E. Marsden, and T. S. Ratiu, The symmetric representation of the rigid body equations and their discretization, Nonlinearity, 15 (2002), p. 1309. [5] S. Boyd and L. Vandenberghe, Convex optimization, Cambridge University Press, March 2004. [6] F. Bullo and A. D. Lewis, Geometric control of mechanical systems - modeling, analysis, and design for simple mechanical control systems, Springer-Verlag New York, March 2005. [7] F. H. Clarke, Generalized gradients of lipschitz functionals, Advances in Mathematics, 40 (1981), pp. 52 – 67. [8] M. V. Dixon, T. N. Edelbaum, J. Potter, and W. E. Vandervelde, Fuel optimal reorientation of axisymmetric spacecraft, Journal of Guidance, Control, and Dynamics, AIAA, 7 (1970), pp. 1345–1351. [9] A. Fleming, P. Sekhavat, and I. M. Ross, Minimum-time reorientation of a rigid body, Journal of Guidance, Control, and Dynamics, AIAA, 33 (2010), pp. 160–170. [10] M. Gerdts, Global convergence of a nonsmooth newton method for control-state constrained optimal control problems, SIAM Journal on Optimization, 19 (2008), pp. 326–350. [11] P. E. Gill, W. Murray, and M. H. Wright, Practical Optimization, Academic Press, March 1997. [12] H. K. Hesse, Multiple shooting and mesh adaptation for PDE constrained optimization problems, PhD thesis, Ruprecht-Karls-University, Heidelberg, June 2008. [13] D. Holm, T. Schmah, C. Stoica, and D. Ellis, Geometric Mechanics and Symmetry: From Finite to Infinite Dimensions, OUP Oxford, October 2009. [14] I. Ioslovich, Arbitrary fuel-optimal attitude maneuvering of a non-symmetric space vehicle in a vehicle-fixed coordinate frame, Automatica, (2003), pp. 557 – 567. [15] D. Kim, D. Kim, and J. D. Turner, Suboptimal asymmetric spacecraft maneuvers using two controls, Journal of Guidance, Control, and Dynamics, AIAA, 36 (1995), pp. 1855–1860. [16] T. L., M. Leok, and N. McClamroch, Time optimal attitude control for a rigid body, American Control Conference, (2008), pp. 5210–5215. [17] P. Lax, Functional Analysis, John Wiley & Sons, August 2014. [18] T. Lee, M. Leok, and N. McClamroch, Optimal attitude control of a rigid body using geometrically exact computations on so(3), Journal of Dynamical and Control Systems, 14 (2008), pp. 465–487. [19] T. Lee, N. H. McClamroch, and M. Leok, A lie group variational integrator for the attitude dynamics of a rigid body with applications to the 3d pendulum, IEEE Conference on Control Applications, (2005), pp. 962–967. [20] J. E. Marsden and T. S. Ratiu, Introduction to Mechanics and Symmetry: A Basic Exposition of Classical Mechanical Systems, Springer-Verlag New York, May 2010. [21] J. E. Marsden and M. West, Discrete mechanics and variational integrators, Acta Numerica, 10 (2001), pp. 357–514. ¨ baum, O. Junge, and J. E. Marsden, Discrete mechanics and optimal control: [22] S. Ober-Blo An analysis, ESAIM: Control, Optimisation and Calculus of Variations, 17 (2011), pp. 322– 352. [23] B. T. Polyak, Newton’s method and its use in optimization, European Journal of Operational Research, 181 (2007), pp. 1086–1096. [24] R. Proulx and I. Ross, Time-optimal reorientation of asymmetric rigid bodies, Advances in the Astronautical Sciences, AAS, (2002), pp. 1207–1227. [25] L. Qi and J. Sun, A nonsmooth version of newton’s method, Mathematical Programming, 58 (1993), pp. 353–367.
24
K. S. PHOGAT, D. CHATTERJEE, AND R. BANAVAR
[26] R. C. Scrivener, Sandra L.and Thompson, Survey of time-optimal attitude maneuvers, Journal of Guidance, Control, and Dynamics, AIAA, 17 (1994), pp. 225–233. ´lat, Optimal control and applications to aerospace: some results and challenges, [27] E. Tre Journal of Optimization Theory and Applications, 154 (2012), pp. 713–758. [28] P. Tsiotras, M. Corless, and J. M. Longuski, A novel approach to the attitude control of axisymmetric spacecraft, Automatica, IFAC, 31 (1995), pp. 1099–1112. Systems & Control Engineering, IIT Bombay, Mumbai – 400076, India E-mail address, K. S. Phogat:
[email protected] E-mail address, D. Chatterjee:
[email protected] URL, D. Chatterjee: http://www.sc.iitb.ac.in/~chatterjee E-mail address, R. Banavar:
[email protected] URL, R. Banavar: http://http://www.sc.iitb.ac.in/~banavar