Flight Lab / Experiment 01

A small satellite.
A delicate balancing act.

Give it a target. Knock it off course. See what it takes to keep pointing in the right direction.

ATTITUDE CONTROLT+ 00.0 s
01 / SINGLE AXISOrbital backdrop is illustrative
Pointing error45.0°
Angular velocity0.0°/s
Wheel momentum0%
Pointing error °LAST 30 SECONDS

Try this

A few ways to break the calm.

  1. Feel the feedback. Nudge the satellite, then reduce damping. Watch the pointing error cross zero and oscillate.
  2. Lose a sensor. Drop the primary stream. After its data expires, the backup takes over. Lose both and the controller stops commanding torque.
  3. Find the limit. Apply persistent external torque. The wheel stores momentum until it cannot oppose the disturbance any further.
The model, the assumptions, and the limits

This is an educational single-axis rigid-body model with an ideal reaction wheel. It simulates orientation, not orbital motion. The Earth and stars provide visual context.

τ = clamp(Kp × wrapped angle error − Kd × angular rate)
I × dω/dt = τ + τexternal
dh/dt = −τ

Body inertia: 0.02 kg·m². Wheel inertia: 0.00002 kg·m². Wheel torque limit: 3 mN·m. Momentum capacity: ±0.012 N·m·s. Response and damping controls are Kp in mN·m/rad and Kd in mN·m·s/rad. The nudge adds 0.004 N·m·s of angular impulse.

The PD controller samples at 50 Hz; physics advances in fixed 10 ms steps with semi-implicit Euler integration. The display runs independently. Long rendering gaps are discarded; hiding the tab pauses simulated time. On devices requesting reduced motion, the simulation starts paused.

Two ideal sensors provide angle and rate. A dropout stops new samples; data older than 100 ms is rejected. Fresh primary data is preferred, otherwise a fresh backup is selected. With neither available, commanded wheel torque is zero. This demonstrates detectable dropouts, not disagreement resolution or arbitrary faulty measurements.

There is no sensor noise, state estimator, three-axis coupling, flexible structure, orbital dynamics, or momentum-unloading actuator. Parameters are illustrative, not specifications for a flight vehicle. Tests check settling, angular-momentum conservation, actuator limits, and sensor failover.

Background reading: NASA: Small Spacecraft Guidance, Navigation, and Control ↗. Related: You can’t pull over a satellite →