Skip to content

MATLAB/Simulink project for constrained satellite attitude control using semidefinite programming.

License

Notifications You must be signed in to change notification settings

shavykashyap/satellite-attitude-sdp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ฐ๏ธ SDP-Based Satellite Attitude Control

Constrained spacecraft attitude control using Semidefinite Programming (SDP) with quaternion dynamics. The controller tracks a desired orientation while respecting geometric keep-in/keep-out cones and actuator limits. Simulations are in MATLAB/Simulink; optimization is solved via MOSEK through YALMIP or CVX.

๐Ÿš€ Overview

  • Method: SDP (MOSEK via YALMIP or CVX)
  • States: Unit quaternions (q), body rates (\omega)
  • Constraints: Keep-in/keep-out cones, bounds on (|\omega|) and torque (u), terminal state
  • Env: MATLAB & Simulink

๐Ÿ“‚ Features

  • Rigid-body (Euler) rotational dynamics + quaternion kinematics
  • Exact cone constraints via SDP
  • Plots for boresight on sphere, constraint margins, attitude/rate histories
  • Baseline PD vs. SDP-guided tracking comparison

๐Ÿงฎ Dependencies

  • MATLAB R2021b+ and Simulink
  • Modeling: YALMIP or CVX
  • Solver: MOSEK (installed, licensed, on MATLAB path)
    • Using CVX? Set cvx_solver mosek.

๐Ÿ› ๏ธ How to run

  1. Open the repo in MATLAB and set the current folder to the repo root.
  2. Add paths: Home โ†’ Set Path โ†’ Add with Subfoldersโ€ฆ โ†’ select repo root โ†’ Save.
  3. Configure a scenario: edit Code/initialize_satellite_simulation.m (desired quaternion, torque/rate limits, cone angles).
  4. Solve (SDP): run initialize_satellite_simulation (calls solveSDPControl.m). Results are written to Results/<run_name>.
  5. Plot: run plot_SDPsim_results.m (or plot_SDP_sim_results.mlx) to save figures in Results/<run_name>.
  6. (Optional) Simulink tracking: open CubeSat_SDP_PD_Attitude.slx, select SDP reference (or baseline PD), and Run.
    • What Simulink does: a quaternion-PD feedback regulator compares measured attitude to the SDP reference, calculates the error caused by the model uncertainities, and tries to minimise it, by appling control torque.

๐Ÿ“œ License

MIT License


Made with โ˜• and ๐Ÿš€ by Shavy Kashyap

About

MATLAB/Simulink project for constrained satellite attitude control using semidefinite programming.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages