  Spacecraft attitude control using only magnetic torques is a periodic
time-varying system as the Earth magnetic field in the spacecraft body frame
changes periodically while the spacecraft circles around the Earth. The optimal
controller design therefore involves the solutions of the periodic Riccati
differential or algebraic equations. This paper proposes an efficient algorithm
for the periodic discrete-time Riccati equation arising from a linear periodic
time-varying system $(\A,\B)$, which explores and utilizes the fact that $\A$
is time-invariant and only $\B$ is time-varying in the system, a special
properties associated with the problem of spacecraft attitude control using
only magnetic torques.
