Spacecraft Attitude Control with a Torque Limit
Consider a simplified single-axis spacecraft attitude model. The controller commands a torque, but the real actuator can only deliver torque within a finite physical range.
The physical actuator constraint is:
Real spacecraft do not.
Why PD Control Can Hit Physical Limits
A PD controller uses attitude error and angular velocity:
A high \(K_p\) can make the response faster in an ideal model, but it can also demand torque that the actuator cannot deliver. Once the actuator clips the command, the actual spacecraft response no longer follows the ideal controller design.
Why PID Adds a New Risk
PID adds accumulated error:
The integral term is useful because it can remove steady-state error caused by bias or disturbance. But when the actuator is saturated, the integral term may keep growing even though the actuator cannot deliver the requested torque.
What Saturation Means
Saturation means the controller asks for one torque, but the actuator applies a clipped torque.
In real spacecraft control, this difference is critical:
The torque plot in the interactive demo makes this visible by showing both the commanded torque and the clipped applied torque.
When Integral Action Stores Too Much Error
If the actuator is already saturated, adding more integral action cannot produce more applied torque. The integral term may continue growing, storing excess control demand.
When the spacecraft finally approaches the target, this stored integral energy can cause overshoot, oscillation, slow recovery, or degraded pointing behaviour.
integral grows \( \rightarrow \) overshoot and delayed recovery
Do Not Integrate While Saturated
A simple anti-windup method is conditional integration: stop accumulating the integral term while the actuator is saturated.
if (!isSaturated) {
integralError += error * dt;
}
This does not make the actuator stronger. It simply prevents the controller from building an unrealistic internal command that the actuator cannot physically apply.
Compare PD, PID, and PID with Anti-Windup
Select a controller mode and adjust the gains. The simulation includes disturbance torque and actuator saturation. Watch the attitude response, pointing error, torque clipping, integral growth, and engineering metrics update automatically.
Compare All Modes
This comparison uses the same gains, disturbance, and torque limit for PD, PID, and PID with anti-windup. The key visual moment is the difference between uncontrolled integral growth and controlled integral behaviour.
Automatic Control Diagnostics
The page computes practical diagnostic metrics that matter in real actuator-limited systems.
Waiting for simulation...
Waiting for simulation...
Waiting for simulation...
Waiting for simulation...
Waiting for simulation...
What This Problem Shows
Can be stable, but high gains may demand torque beyond actuator authority.
Can reduce bias, but saturation can cause integral windup and overshoot.
Prevents unrealistic integral growth and improves recovery under torque limits.
The final engineering lesson is:
It must respect physical limits.