Skip to content

Gautham-8066/Learning-Basic-3-Axis-Attitude-Control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 

Repository files navigation

3-Axis Spacecraft Attitude Controller

A Python-based simulator that uses a PID (Proportional-Integral-Derivative) control loop to stabilize a rigid-body spacecraft in 3D space.

Project Overview

This project simulates the rotational dynamics of a spacecraft and implements a feedback control system to bring the vehicle from an initial "error" state (offset orientation) to a target "nadir-pointing" state (0, 0, 0 degrees).

Features

  • Physics Engine: Models rigid body dynamics using Euler integration.
  • PID Control: Separate gains for Roll, Pitch, and Yaw axes to handle varying moments of inertia.
  • Headless Visualization: Automatically generates and saves flight telemetry graphs as PNG files.

๐Ÿ“ The Physics

The simulator solves the rotational version of Newton's Second Law: $$\tau = I \alpha$$ Where:

  • $\tau$ (Torque) is the control effort from the PID.
  • $I$ (Inertia) represents the mass distribution of the craft.
  • $\alpha$ (Acceleration) is the resulting change in rotational speed.

Simulation

stabilization.mp4

The graph below shows the Step Response of the 3-axis PID controller over a 10-second simulation window.Key Observations: Convergence: All three axes (Roll, Pitch, and Yaw) successfully converge to the target state ($0^\circ$) from their initial offsets ($10^\circ, -10^\circ, 5^\circ$). stabilization_results

About

A Python-based simulator that uses a PID (Proportional-Integral-Derivative) control loop to stabilize a rigid-body spacecraft in 3D space.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors