  This paper describes the development of a magnetic attitude control subsystem
for a 2U cubesat. Due to the presence of gravity gradient torques, the
satellite dynamics are open-loop unstable near the desired pointing
configuration. Nevertheless the linearized time-varying system is completely
controllable, under easily verifiable conditions, and the system's disturbance
rejection capabilities can be enhanced by adding air drag panels exemplifying a
beneficial interplay between hardware design and control. In the paper,
conditions for the complete controllability for the case of a magnetically
controlled satellite with passive air drag panels are developed, and simulation
case studies with the LQR and MPC control designs applied in combination with a
nonlinear time-varying input transformation are presented to demonstrate the
ability of the closed-loop system to satisfy mission objectives despite
disturbance torques.
