You are on page 1of 11

Time-Optimal and Closed-Loop CMG Steering Laws

James Carrillo
University of Washington
AA 528: Spacecraft Dynamics and Control
March 20, 2013
AbstractThis report reviews the article Implementation
of Shortest-Time Maneuvers for Generic CMG Steering Laws
by Karpenko et al. It outlines the authors achievements,
their approach, and the underlying theory. Simulations of
simple systems utilizing the authors fundamental principles
are demonstrated and observed from an objective viewpoint.
Finally, the overall benets and shortcomings of the approach
are summarized.
I. INTRODUCTION
Control moment gyroscopes (CMGs) have been consid-
ered as an ideal torque-generating actuator for attitude con-
trol systems of space vehicles.[1] A CMG consists of a
spinning rotor which can be gimbled to change the direction
of its angular momentum. The gyroscopic reaction torque
created from this rotor is orthogonal to both the gimbal
and rotor spin axes. The ability to control the gimbal angle
results in a large amplication of the input torque and a fa-
vored approach to controlling precision pointing and tracking
spacecraft. While CMGs are successfully employed in many
spacecraft applications, there are still a variety of practical
and theoretical issues with their use. A recent approach
Karpenko et al. [2] addresses two of these issues: singularity
avoidance and optimal CMG steering logic design.
II. ARTICLE OVERVIEW
A. Accomplishments
Karpenko et al. introduced an invigorating approach to
increasing the efciency of heritage closed-loop attitude
control architectures while maintaining singularity robust
time-optimal maneuvers. They approach the problem of
optimizing spacecraft reorientation by identifying gimbal
rates as the limiting constraint of the system. The absence
of this constraint can cause the gimbal angles to deviate
signicantly during the maneuver. This CMG steering con-
straint is utilized by the authors to calculate a Shortest-
Time Maneuver (STM) that is compatible with the current
closed-loop control systems. This novel approach[3] has the
possibility to decrease reorientation time orbiting spacecrafts
by as much as 50 percent.[4]
B. Approach
The spacecraft testbed used for the approach was the NPS
Recongurable Spacecraft Autonomy Testbed (R-Sat). It
allows for 45-deg. of rotation about the pitch and roll axes
and unconstrained rotation about the yaw axis. The system
uses four CMGs arranged in a standard pyramidal array
similar to Fig.6. Pyramid arrays such as this are advantageous
if each CMG has the same angular momentum about its spin-
rotor axis and a skew angle, =54.7deg. This conguration
allows for a spherical momentum envelope resulting in an
almost uniform momentum capability. The authors discuss
Fig. 1. Momentum Envelope of 4-Single Gimbal CMGs, = 54.7, h =
1Nms [5]
typical CMG attitude control systems as shown in Fig. 2
They go on to discuss how the optimal open-loop STM
Fig. 2. Block diagram of a typical CMG attitude control system [2]
problem was solved by Fleming et al[6] and demonstrate
problem formulation, simulation, results analysis, inclusion
of inertial uncertainty, and explanation of deviations. An
example of the block diagram for the spacecraft model can be
seen in Fig.3. Finally, Karpenko et al modied their approach
Fig. 3. Block diagram of spacecraft model for optimal control[2]
for agile CMG maneuvers. They compare the two control
methods and highlight key features of their gimbal rates
and CMG output torques. The determination of the primary
issue with the optimal control approach was the open-loops
inability to force the gimbal rate commands to lie along the
the torque and gimbal rate spaces. This can be observed
by analyzing Fig. 4. Utilizing the robustness of the optimal
Fig. 4. Open-loop and closed-loop attitude control of a CMG spacecraft:
(a) open-loop gimbal commands; (b) open-loop CMG output torque; (c)
closed-loop torque commands; (d) gimbal commands from steering law; (e)
closed-loop CMG output torque.[2]
controller, the authors steering constraints for shortest-time
CMG maneuvers were successfully applied to a closed-loop
attitude control system. A block diagram of their nal model
is shown in Fig. 5.
Fig. 5. Open-loop and closed-loop attitude control of a CMG spacecraft:
(a) open-loop gimbal commands; (b) open-loop CMG output torque; (c)
closed-loop torque commands; (d) gimbal commands from steering law; (e)
closed-loop CMG output torque.[2]
III. UNDERLYING THEORY
A mathematical model of the R-SAT testbed can be
resonably simulated using the equations of motion for a
rigid body spacecraft controlled with an array of momentum
exchange devices (e.g. CMGs). The rotational equation of
motion is therefore given by [1]

H
s
+ H
s
= T
ext
(1)
where H
s
is the angular momentum vector with respect to the
xed body frame (i.e. control axes). T
ext
represents external
torques (e.g. gravity-gradient, solar pressure, aerodynamic
torques) expressed in the same body-xed control axes.
Due to the R-SAT testbeds mass-balance mechanism, the
simulator can be tuned to align the center of rotation with
the system center of mass. This allows the simulation to
neglect external torques and obtain
(J +

h) + (J +h) = 0 (2)
where J is the inertial matrix of the total system expressed in
the spacecraft body-xed control axes. The transformation of
each CMGs individual momentum vector h
i
to the pyramid
reference frame is represented as
h
i
= J
s,i

i
_
_
cos(
i
)cos()sin(
i
) +sin()cos(
i
)
sin(
i
)cos()sin(
i
) +cos()cos(
i
)
sin()sin(
i
)
_
_
(3)
where is the rotor spin rate and J
s
is the rotor inertia about
the spin axis. Angle represents the skew angle from the
horizontal while denotes the base circle spacing angle as
shown in Fig.7. Using a rotation matrix R
p
to relate the CMG
pyramid frame to the body xed frame, the CMG angular
momentum vector with respect to the body xed frame is
h = R
p
4

i=1
h
i
(4)
and the time derivative of the CMG angular momentum
vector is obtained by

h = R
p
4

i=1

h
i
= R
p
4

i=1
a
i
(
i
)

i
= R
p
A()

(5)
which represents the torques acting on the spacecraft body.
Given a commanded control torque input u, the momentum
rate,

h, command can be selected as

h =u h (6)
where a gimbal rate command

can be acquired with the ap-
plication of various types of singularity robust pseudoinverse
logic

= A
+

h = A
T
(AA
T
)
1

h (7)
Other than the obvious control mechanism, these steering
laws are required to avoid singular states. These states occur
when all CMG torque output vectors are mutually perpen-
dicular to the commanded torque direction[1], resulting in
an inability to control attitude along an axis (i.e. gimbal
lock). Quaternions are a common method for controlling
attitude due to their compact and nonsingular representation
of attitude which yields algebraic (rather than trigonometric)
expressions[7]. Their ease of combination for successive
rotations makes them esspecially attractive for spacecraft
applications. Quaternions are parameterized as
q = [e
1
sin(

2
), e
2
sin(

2
), e
3
sin(

2
), cos(

2
)]
T
(8)
where e = [e
1
e
2
e
3
]
T
is the Euler axis and is the rotation
angle around the Euler axis. The time differential of the
quaternion is represented as
q =
1
2
( q) =
1
2
S()q (9)
where the skew-symmetric matrix S() is
S() =
_

_
0
3

2

1

3
0
1

2

2

1
0
3

1

2

3
0
_

_
(10)
The time variance of the quaternion allows for a complete
mathematical model of the spacecraft dynamics. The typical
controls application of these dynamics are illustrated in Fig.
2 and are commonly known as quaternion feedback control
logic[1]. Feedback control logic is a result of the differential
quaternion and angular velocity Lyapunov functions evalu-
ated along the closed-loop trajectory. The selection of proper
gains, K and C, will determine the stability of this closed-
loop system while the attitude control is acheived with the
application of a spacecraft control torque

c
=Ke
q
C + (Jmathb f omega+h) (11)
where the quaternion attitude error of the body frame, e
q
,
is calculated using quaternion algebra and the following
equation
e
q
= q
f

q = q
f
(4)q+q(4)q
f
+q
f
q (12)
where q
f

is the conjugate transpose of the desired quater-


nion and the right side q and q
f
represent only the vector
component. The steering law shown in Fig. 2 proportionally
applies the commanded torque to each CMG and determines
the required gimabal rates,

c
to generate this torque. The
optimal control approach shown in Fig.3 formulates the
shortest time maneuver problem as follows
(STM)
_

_
Minimize J[x(), u(), t] =t
f
Subject to x(t) = f(x, u, t)
x
0
= [e
0
sin(

0
2
), cos(

0
2
),
0
,
0
]
T
x
f
= [e
f
sin(

f
2
), cos(

f
2
),
f
,
f
]
T
h(x, u, t) 0
(13)
The optimal gimabal rates act as the controller, u =

c
, to its
commanded nal attitude in minimum time.
Fig. 6. Pyramid mounting arrangement of four CMGs [1]
IV. SIMULATION
A simulation was performed to demonstrate the typical
CMG attitude control system (Fig. 2) using a pyramid
arrangement. The system was governed by a quaternion
feeback control law and utilized proportional and derivative
(PD) control. It was assumed that no external forces were
acting on the spacecraft and gimbal rate limits could be ig-
nored. The steering law design was adopted from Bedrossian,
et al [8]. The following are the results and discussion of that
analysis.
Fig. 7. CMG and momentum vector, h, with respect to xed spacecraft
body frame, p [2]
A. Simulation of Closed-Loop CMG Control System
The initial intention for simulation was to re-produce the
STM maneuver for optimal gimbal rates as demonstrated
by Karpenko et al [2]. Upon further investigation and un-
familiarity with optimal control methods, it was determined
to apply knowledge gained from AA 528 to the pyramid
CMG conguration at with a skew angle of 54.7 deg.
Internal elliptical and hyperbolic singularity were identied
and validated (values indicated in appendices code). Other
near-singularity points were also observed using a Moore-
Penrose pseudoinverse logic to calculate steering laws as
shown in Fig. 10 and 11. To avoid these near-singularities
impact, the steering law was replaced with a singularity
robust inverse logic [8].

c
= A
T
[AA
T
+I]
1

c
(14)
where is a small positive value. One obvious observation
is this controllers negligence to account for the limits of
spacecraft hardware, e.g. maximum gimbal rates. Future
analyses should incorporate this constraint into the controller
and observe its effects.
B. Observed Near-Singularities
Initial models with higher precision returned warnings of
near-singularity results. These near-singularities can cause
hardware failures and signicant operational and mission
objective violations. This led to the application of Eq.(14)
within the demonstrated simulation. See results from near-
singularity observations post-references.
V. CONCLUSIONS
The ability to retro-t heritage closed-loop spacecraft
controllers with optimal time maneuvers has many potential
benets. Karpenko et al demonstrated impressive simulations
utilizing this idea. While it is hard to argue with most of their
work, a few key aspects were not addressed. According to
B. Wie[1], no CMG pyramid array can escape the internal
elliptical singularity. The authors failed to intentionally in-
duce this orientation to quantify robustness. Another issue
absent from the authors discussion was the effect of mis-
aligned CMGs. A 10% uncertainty was included for inertial
uncertainty, but due to the gimbals operating a near optimal
rates, a misaligned CMG could have a signicant impact on
Fig. 8. Closed loop simulation with gains K=1 and C=1. Gimbal rate
commands were calculated using 14
the maneuver. Overall however, the article Implementation
of Shortest-Time Maneuvers for Generic CMG Steering
Laws by Karpenko et al. enables the design of time-optimal
maneuvers with robust singularity avoidance.
APPENDIX
See attached Matlab code detailing simulation.
REFERENCES
[1] Wie, Bong (2008). Space Vehicle Dynamics and Control (2nd Edition).
(pp: 462). American Institute of Aeronautics and Astronautics.
[2] Karpenko, Mark and Ross, Michael I., (2012). Implementation of
Shortest-Time Maneuvers for Generic CMG Steering Laws, presented
at AIAA/AAS Astrodynamics Specialist Conference, Minneapolis,
MN, August 13-16, 2012, Chapter DOI: 10.2514/6.2012-4959
Fig. 9. Closed loop simulation with gains K=1 and C=3. Gimbal rate
commands were calculated using 14
[3] Ross, I.M., Lee, D., and Karpenko, M., Method of Contingency Guid-
ance of a CMG-Actuated Spacecraft, U.S. Patent: US 61/652,774, 29
May 2012 (pending).
[4] Bedrossian, N., Overclock My Satellite, IEEE Spectrum, IEEE.org,
October,2012.http://beta.spectrum.ieee.org/aerospace/satellites/
overclock-my-satellite. Accessed 3/09/2012
[5] V.J. Lappas et al, Practical Results on the Development of a Control
Moment Gyro based Attitude Control System for Agile Small Satel-
lites, Surrey Space Centre, University of Surrey, Guildford, Surrey
GU2 5XH,UK
[6] Fleming, A. and Ross. I. M, (2005) Singularity-Free Optimal Steering
of Control Moment Gyros, presented at AIAA/AAS Astrodynamics
Specialist Conference, Lake Tahoe, CA, August 7-11, 2005, AAS
Paper 07-355.
[7] Tewari, A., Atmospheric and Space Flight Dynamics. Boston, MA:
Birkhuser 2007, pp. 25-405
[8] Bedrossian, N.S.et al Steering Law Design for Redundant Single-
Gimbal Control Moment Gyroscope, Journal of Guidance, Control,
and Dynamics, vol. 13, no. 6, 1990.
Fig. 10. Gimbal angles near singularity behavior. A Moore-Penrose pseudoinverse logic was applied to calculate gimbal rate commands.
Fig. 11. Gimbal rates while experiencing near singularity behavior. A Moore-Penrose pseudoinverse logical was applied to calculate gimbal rate commands.
1
%AA 528 Project
%James Carrillo
% Rigid body reorientation simulation
%Assuming no external torques
clear;close all
global qf K C
%Gains
K = eye(3);C = 3*eye(3);
% Initial conditions of the body frame
w10 = [0 0 0]';
%q10 = [0.5234 0.5318 -0.3917 0.5383]';
q10 = [0.2755 -0.8378 -0.4611 0.0976]';
%q10 = [0.6991 -0.0224 0.4592 -0.5476]';
%Initial Gimbal Angles
D10= [0.5236;0.5236;0.5236;0.5236]; %Initial Gimbal Angles
%D10=[-90;0;90,0] %elliptic singularity along first axis (CAN'T BE ESCAPED)
%D10=[90;180;-90;0] %hyperbolic singularity also along the first axis
%Desired Attitude qf
qf=[-0.1135 0.6029 0.4238 0.6664]';
%qf = [0.2100 -0.6260 0.4707 0.5852]';
% Solving ode
[T,Y] = ode45(@CMGcontrol,[0 100],[q10; w10; D10]);
GimRate1=diff(Y(:,8))./diff(T);
GimRate2=diff(Y(:,9))./diff(T);
GimRate3=diff(Y(:,10))./diff(T);
GimRate4=diff(Y(:,11))./diff(T);
%Plots
%Single Plots
figure(1)
plot(T,Y(:,1:4));title('Unit Quaternions','FontSize',14);
f1=legend('q_1','q_2','q_3','q_4');set(f1,'FontSize',14);
xlabel('Time (s)')
% plotting angular velocities
figure(2)
plot(T,Y(:,5:7));title('Angluar Velocities','FontSize',14);
f2=legend('\omega_1 (rad/s)','\omega_2 (rad/s)','\omega_3 (rad/s)');
set(f2,'FontSize',14);
xlabel('Time (s)')
% plotting gimbal angles
figure(3)
plot(T,Y(:,8:11).*180/pi);title('Gimbal Angles','FontSize',14);
f2=legend('\delta_1 (deg.)','\delta_2 (deg.)','\delta_3 (deg.)',...
'\delta_4 (deg.)');set(f2,'FontSize',14);
xlabel('Time (s)')
% plotting gimbal rates
2
figure(4)
plot(T(1:size(T)-1), GimRate1.*180/pi,T(1:size(T)-1), GimRate2.*180/pi,...
T(1:size(T)-1), GimRate3.*180/pi, T(1:size(T)-1), GimRate1.*180/pi);
title('Gimbal Rates','FontSize',14);
f2=legend('\delta_1/dt (deg./s)','\delta_2/dt (deg./s)',...
'\delta_3/dt (deg./s)','\delta_4/dt (deg./s)');set(f2,'FontSize',14);
xlabel('Time (s)')
% %Subplots
% figure(1)
% subplot(4,1,1)
% plot(T,Y(:,1:4));title('Unit Quaternions','FontSize',14);
% f1=legend('q_1','q_2','q_3','q_4');set(f1,'FontSize',14);
% xlabel('Time (s)')
% % plotting angular velocities
% subplot(4,1,2)
% plot(T,Y(:,5:7));title('Angluar Velocities','FontSize',14);
% f2=legend('\omega_1 (rad/s)','\omega_2 (rad/s)','\omega_3 (rad/s)');
%set(f2,'FontSize',14);
% xlabel('Time (s)')
% % plotting gimbal angles
% subplot(4,1,3)
% plot(T,Y(:,8:11).*180/pi);title('Gimbal Angles','FontSize',14);
% f2=legend('\delta_1 (deg.)','\delta_2 (deg.)','\delta_3 (deg.)',...
%'\delta_4 (deg.)');set(f2,'FontSize',14);
% xlabel('Time (s)')
% % plotting gimbal rates
% subplot(4,1,4)
% plot(T(1:size(T)-1), GimRate1.*180/pi,T(1:size(T)-1), GimRate2.*180/pi,...
% T(1:size(T)-1), GimRate3.*180/pi, T(1:size(T)-1), GimRate1.*180/pi);
% title('Gimbal Rates','FontSize',14);
% f2=legend('\delta_1/dt (deg./s)','\delta_2/dt (deg./s)','\delta_3/dt ...
%(deg./s)','\delta_4/dt (deg./s)');set(f2,'FontSize',14);
% xlabel('Time (s)')
3
4
1
%Closed loop CMG attitude control model
%Assumes four CMGs positioned in a pyramid arrangement
function Xdot = CMGcontrol(t,X)
%Constants
global qf K C
%D=[-90;0;90,0] is an elliptic singularity along first axis Cannot be
%escaped with null motion
%D=[90;180;-90;0] is a hyperbolic singularity also along the first axis
B=54.73*pi/180; %rad, this configuration maximizes momentum envelope of
%4-SGCMG pyramid
J=diag([4;7.5;8.5]);%principal inertia tensor (kg.m^2) Tewari p403
%SCALED DOWN
Y=2; %small positive constant to avoid singularity
%Unpack & Initialize!
q=X(1:4); %attitude
w=X(5:7); %angular velocity
D=X(8:11); %gimbal angle
Q = [0 w(3) -w(2) w(1);
-w(3) 0 w(1) w(2);
w(2) -w(1) 0 w(3);
-w(1) -w(2) -w(3) 0];
%Attitude Controller
qdot=0.5*Q*q; %differential quaternion
qe = qf(4)*q(1:3) + q(4)*qf(1:3)+ cross(qf(1:3),q(1:3)); %Quaternion Error
%Commanded momentum trajectory
h=[-cos(B)*sin(D(1)); cos(D(1)); sin(B)*sin(D(1))]...
+[-cos(D(2)); -cos(B)*sin(D(2)); sin(B)*sin(D(2))]...
+[cos(B)*sin(D(3)); -cos(D(3)); sin(B)*sin(D(3))]...
+[cos(D(4)); cos(B)*sin(D(4)); sin(B)*sin(D(4))];
u=-K*qe-C*w +skew(w)*(J*w+h); %control torque
%Pseudoinverse steering law
%Jacobian 3x4 Matrix
A=[-cos(B)*cos(D(1)) sin(D(2)) cos(B)*cos(D(3)) -sin(D(4));
-sin(D(1)) -cos(B)*cos(D(2)) sin(D(3)) cos(B)*cos(D(4));
sin(B)*cos(D(1)) sin(B)*cos(D(2)) sin(B)*cos(D(3)) sin(B)*cos(D(4))];
% n=null(A,'r'); %Jacobiaan null vector
% m=sqrt(A*A.'); %singularity measure, also
%called CMG gain
hdot=-u-skew(w)*h; %differential CMG angular
%momentum B. Wie 7.147
Ddot=A.'*inv(A*A.'+ Y*eye(3))*hdot; %gimbal rate, singularity
%robust inverse logic,
%M. Karpenko et. al
2
wdot=inv(J)*(u-skew(w)*J*w); %angular acceleration of S/C
%B. Wie 7.140a solved omega dot
Xdot=[qdot;wdot;Ddot];
Error using CMGcontrol (line 16)
Not enough input arguments.
Published with MATLAB 7.14

You might also like