Reaction Wheel¶
Photo: Rocket Lab reaction wheels.
Accelerating a wheel transfers angular momentum to it and gives the spacecraft an equal and opposite change. Braking the wheel transfers momentum back. With no external torque, the total angular momentum is conserved.
For the coupled body and wheels, ADCS.satellite_hardware.satellite.satellite.Satellite.dynamics()
implements
Here, \(J_{\mathrm{noRW}}\) excludes the wheel spin inertias from the spacecraft inertia \(J_{\mathrm{COM}}\); \(A_{\mathrm{rw}}\) has the wheel axes as columns; \(D_{\mathrm{rw}}=\operatorname{diag}(J_{\mathrm{rw},1},\ldots,J_{\mathrm{rw},N})\); and \(\boldsymbol h^{\mathcal B}\) is the vector of stored wheel momenta. \(\boldsymbol\tau_c\) includes the torque applied to the body by the wheels. The cross product includes gyroscopic coupling to wheel momentum. The \(D_{\mathrm{rw}} A_{\mathrm{rw}}^{\mathsf T}\dot{\boldsymbol\omega}\) term accounts for the body’s acceleration in the wheel momentum state.
The controller commands body torque for 30 seconds, then reverses it. The wheel speeds up and slows down while the 3U body rotates in response. No disturbance torques are configured.
"""Accelerate one reaction wheel, then brake it; the 3U body reacts."""
import numpy as np
import ADCS
from ADCS.helpers.animations import animate_orbit_godot
class SpinWheel(ADCS.controller.Controller):
def __init__(self, satellite):
super().__init__(satellite)
self.step = 0
def find_u(self, x_hat, **_):
self.step += 1
return np.array([-3e-5 if self.step <= 30 else 3e-5 if self.step <= 60 else 0.0])
wheel = ADCS.RW(axis=np.array([0.0, 1.0, 0.0]), max_torque=3e-5,
J=5e-6, h=0.0, h_max=0.003)
satellite = ADCS.Satellite(
mass=4.0, J_0=np.diag([0.0333, 0.00667, 0.0333]),
actuators=[wheel],
)
orbit = ADCS.Orbital_State(
ephem=ADCS.Ephemeris(), J2000=0.22,
R=np.array([7000.0, 0.0, 0.0]), V=np.array([0.0, 7.5, 0.0]),
)
results = ADCS.simulate(
x=ADCS.State(w=np.zeros(3), q=np.array([1.0, 0.0, 0.0, 0.0]), h=np.array([0.0])),
satellite=satellite, os0=orbit, controller=SpinWheel(satellite), dt=1.0, tf=61.0,
)
ADCS.plot(results, ADCS.plots.WheelSpeedPlot(),
ADCS.plots.AngularVelocityPlotCombined(sources=["real"]),
layout=(2, 1), figsize=(8, 6))
animate_orbit_godot(results=results, overlays=[], graphics_quality="high")
Building a controller
Subclass ADCS.controller.Controller and implement find_u to return
one command per actuator. Use __init__(self, satellite) and
super().__init__(satellite) when storing setup data. simulate() passes
the current state as x_hat (the true state when no estimator is used).
Tips and tricks
Wheel speed is stored through momentum: \(\omega_{\mathrm{wheel}}=h^{\mathcal B}/J_{\mathrm{rw}}\).
speed = results.first().state_hist[-1].h[0] / wheel.J
Mission Recommendations
Align the wheel’s spin axis through the spacecraft centre of mass.
Mount the wheel near the centre of mass to limit its contribution to total inertia.
Choose wheel axes to provide control authority about the required pointing axes, especially the boresight, and account for the spacecraft’s largest inertia directions.