![]() |
![]() |
|---|
H. Pereira, P. Lourenço, P. Batista, From singularity analysis to singularity avoidance: novel metric and convex allocation for spacecraft attitude control with control moment gyros, Acta Astronaut. 225 (2024) 41-54, https://doi.org/10.1016/j.actaastro.2024.08.047
This repository was used to generate the results reported in the paper above.
It contains a medium-fidelity astrodynamics simulator for satellites in Low Earth Orbit (LEO). Both the attitude and the orbit of the satellite are simulated (6 DoF) under the following assumptions:
- Decoupled attitude and orbit dynamics.
- Medium fidelity models for the orbital disturbances (gravity-gradient, atmospheric drag, solar radiation pressure).
- Earth is assumed to be spherical.
- The motion of the Earth around the Sun is not modelled.
On top of that, both the OBSW and the real-world models run in discrete-time at a rate of 10 Hz. The set of actuators used to steer the satellite is the triangle cluster of CMGs described in the paper. Additionally, a reaction wheel was added to the z-axis for full controlability. No navigation filter or estimation model was implemented in the OBSW. The star tracker and gyroscopes were modeled with additive Gaussian noise, and quantization effects due to the resolution of the gimbal encoders and the reaction-wheel tachometer were also taken into account.
Several scenario configuration files were created to reproduce the different comparisons presented in the paper. In particular, the scenarios differ on the allocation method and parameters they use. All the scenarios discussed in the paper can be found:
- MPC-based allocation with a horizon of one timestep and without the singularity term in the cost function.
- MPC-based allocation with a horizon of one timestep and with the singularity term in the cost function.
- MPC-based allocation with a horizon of five timesteps and without the singularity term in the cost function.
- MPC-based allocation with a horizon of five timesteps and with the singularity term in the cost function.
- Singularity robust inverse method.
To reproduce the results obtained for any of these scenarios, you must do the following:
- Open main.m.
- Select a scenario by uncommenting the variable scen.
- Select the list of desired plots in SelectPlots.m.
- Run main.m.
To run the repository, you will need:
- MATLAB R2023b (or newer)
- Control System Toolbox (control_toolbox)
- Optimization Toolbox (optimization_toolbox)
- Model Predictive Control Toolbox (mpc_toolbox)
- Statistics toolbox (statistics_toolbox)

