This project investigates the use of a bang-bang B-Dot magnetic control law for detumbling a 3U CubeSat following deployment from a launch vehicle. A full six degree-of-freedom simulation environment was developed in Python including orbital propagation, environmental disturbance torques and magnetic actuation.
CubeSats released from launch vehicles typically begin their operational life with substantial angular velocity. Deployment springs and separation dynamics introduce rotational disturbances that must be damped before precision attitude control can begin.
Small satellites frequently rely on magnetorquers for initial detumbling. By interacting with the Earth's magnetic field these coils generate torques that dissipate rotational kinetic energy.
The objective of this project is to construct a numerical simulation environment capable of evaluating the performance of a magnetic B-Dot detumbling controller.
The rotational dynamics of the spacecraft are governed by Euler's rigid body equation.
where
The net torque acting on the spacecraft includes both magnetic control torque and gravity gradient disturbance.
The spacecraft orbit is propagated using the classical two-body gravitational model.
where the gravitational parameter of Earth is
Magnetorquer actuation relies on the interaction between the spacecraft magnetic dipole and the Earth's magnetic field.
In this simulation the magnetic field is approximated using a dipole model.
Typical field magnitudes in low Earth orbit range between 25 and 60 microtesla.
Because Earth’s gravitational field varies across the spacecraft structure, a restoring torque arises whenever the spacecraft inertia axes are misaligned with the radial direction.
The B-Dot controller commands a magnetic dipole moment that opposes the time derivative of the measured magnetic field.
The magnetic field rate is approximated using the spacecraft angular velocity.
The control law becomes
In this project a bang-bang implementation is used.
The spacecraft dynamics and control law are integrated using the SciPy ODE solver. Each subsystem of the simulation corresponds directly to the governing equations described earlier.
This function implements the two-body gravitational equations of motion.
The cross product approximates the magnetic field time derivative. The commanded dipole moment is then saturated to the maximum magnetorquer capability.
Simulation results show that the B-Dot controller gradually dissipates rotational kinetic energy, reducing the spacecraft angular velocity over approximately one orbital period.