SpaceStationControl:

Path: Missions/SpaceStation

% Implements the space station control system
 The control system has three modes. Data is passed in and out of the
 function via a structure. This controls the attitude to LVLH using mode 2
 of PID3Axis. The actuation is distributed between the thrusters and
 wheels and momentum is unloaded.

 The control system is initialized with unit inertia so that the
 controller generates a control angular acceleration 
--------------------------------------------------------------------------
   Form:
   d = SpaceStationControl(mode,d,x,t)
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   mode  (1,:) Function mode: 'data structure' 'initialize' 'update'
   d     (.)   Data structure
                .inr     (3,3)  Inertia matrix
                .dT      (1,1)  Timestep, for control system (s)
                .dTMU    (1,1)  Timestep, for momentum unloading
                .uRWA    (3,:)  RWA unit vectors
                .inrRWA  (1,1)  RWA inertia
                .useThruster (1)   Boolean for using thrusters
                .uThruster   (3,:) Thruster force unit vectors
                .rThruster   (3,:) Thruster positions
                .cM          (3,1) Spacecraft center of mass location
                .tMUNext (1,1)  Time for next unloading command (s)
                .aCSOn (1)  Flag for ACS on/off
                .mUOn  (1)  Flag for momentum unloading on/off
   x     (:,1) State
   t     (1,1) Time

   -------
   Outputs
   -------
   d     (.)   Data structure, updated
      on 'initialize':
               .dC    (.)   Control data for PID3Axis
               .pInvU (:,3) Pseudoinverse of uRWA
               .kMU   (1,1) Gain for momentum unloading
               .aThruster (3,:) Constraint matrix (torque) for thrusters
               .cThruster (1,:) Cost matrix for thrusters
      on 'update':
               .torqueRWA (3,:) Commanded wheel torque
               .fThruster (1,:) Commanded thruster force
               .m         (3,1) Commanded magnetic dipole for unloading
               .dC         (.)  Control state from PID3Axis

--------------------------------------------------------------------------
  See also: PID3Axis, PIDMIMO, Simplex, MomentumUnloading
--------------------------------------------------------------------------

Children:

AerospaceUtils: Coord/QLVLH
CubeSat: AttitudeControl/MomentumUnloading
SC: Control/PID3Axis
Common: Control/PIDMIMO
Common: Quaternion/QForm
Math: Analysis/Simplex
Math: Linear/Cross

Back to the Missions Module page