ThreeAxisControl:

Path: SC/Control

% Implements and simulates a spacecraft with reaction wheels and thrusters.
 The control system is designed for either Earth pointing or inertially fixed
 attitude. It does not allow attitude maneuvers. Thrusters can be used for
 attitude control. Thrusters are pulsewidth modulated and off-pulse for either
 east/west or north/south stationkeeping. The simulation also includes a single
 liquid apogee engine.

 It is assumed that an IMU/Star tracker package is available that outputs a
 valid attitude quaternion in all modes.

 The simulation propagates the attitude and the reaction wheel
 rates. The reaction wheels are assume to take torque commands and produce that
 torque. 
   
 The controller is a simple PID controller in all modes. The inertia
 matrix is for the deployed mode.

 The wheels are Honeywell HR0610 wheels with 12 NMs max momentum at
 6000 rpm. Max torque is 0.055 Nm.

 The thrusters are EADS monopropellant thrusters:

   http://www.space-propulsion.com/spacecraft-propulsion/hydrazine-thrusters/1n-thruster.html

   CHT 0.5 0.5 N (north, east west)
   CHT 20 N (base panel)
   
 The apogee engine is a 400 N "S400-12":
   http://www.space-propulsion.com/spacecraft-propulsion/apogee-motors/index.html

   S400-12 420 N 318 sec

 We put all properties into this script to make it self-contained.
 For more elaborate models they would be put in databases, etc.

  See also Inertias, PIDMIMO, QError, QLVLH, U2Q, Constant, TimeHistory, 
  CosD, RK4, Date2JD, ThrusterCommand, RHSReactionWheel, Plot2D, Figui
--------------------------------------------------------------------------
%
--------------------------------------------------------------------------
  Copyright (c) 2007-2025 Princeton Satellite Systems, Inc. 
  All rights reserved.
--------------------------------------------------------------------------
  2025.1 Revised to use RHSReactionWheel. Orbit dynamics were removed.
--------------------------------------------------------------------------

Children:

AerospaceUtils: Coord/QLVLH
Orbit: OrbitMechanics/Period
Orbit: OrbitSim/RVFromKepler
SC: Control/ThrusterCommand
SC: Dynamics/RHSReactionWheel
Common: Control/PIDMIMO
Common: GUIs/Figui
Common: Graphics/Plot2D
Common: Graphics/TimeHistory
Common: Graphics/TimeLabl
Common: MassProperties/Inertias
Common: Quaternion/QError
Common: Quaternion/U2Q
Common: Time/Date2JD
Math: Integration/RK4
Math: Trigonometry/CosD

Back to the SC Module page