Simulink / STK Satellite Attitude Control

Information

 
Notes/Code
This example shows how a simple satellite with 3-axis attitude control built in Simulink can be integrated with STK.  An STK scenario is used to generate pointing data for the Simulink satellite model (truth data).  A level-2 s-function block is used to host the STK application.  The attitude is controlled by 3 rate integrating gyros built in Simulink, including the effects of band limited white noise to the gyros input position.   The gyro models are developed after the examples found in Atmospheric and Space Flight Dynamics, Ashish Tewari, Birkhauser Boston 2007.
 
The gains for this model are very loose to exaggerate the dampening time and overshoot.  Users can change the gains in the rate gyro blocks and adjust the transfer functions to match the inertia of their satellite.
 
Requirements  
Instructions for use
  • Open SatelliteAttitudeControl.slx in Simulink
  • Run the Simulation
  • Reset the STK scenario and playback the result.  Create graphs to visualize the attitude rates over time.
 
Additional notes
The s-function block relies on the SatelliteAttitudeControl_sFunction.m function to interact with the STK scenario.  The STK scenario is started and built with the code that can be found in SatelliteAttitudeControl_FullInitFunction.m.  This code is then copied into the s-function’s InitFcn callback (right click on the s-function block, select Properties, and then Callbacks tab).  The user might also wish to build a scenario outside of Simulink and have that loaded upon start of the simulation.  This might be done with something similar to the code found in SatelliteAttitudeControl_InitFcn.m.