Nadir Pointing with Coupled Spacecraft Attitude and Fuel Slosh Dynamics using Hybrid Robust Adaptive Control
For my AE 544 Analytical Dynamics final project at Embry-Riddle Aeronautical University, I modeled a spacecraft whose attitude is coupled to sloshing propellant and designed a hybrid robust adaptive controller that keeps it pointing at Earth (nadir pointing) while the fuel drains. Slosh changes the dynamics the controller sees over the whole mission, so the controller has to adapt and stay provably bounded as the tank empties.
Challenge
Fuel slosh behaves differently at each stage of a mission:
- Early in the mission, a full tank gives a large slosh mass with a low natural frequency, strong coupling to attitude and significant disturbance torques.
- As fuel is used, the slosh mass shrinks, the slosh frequency rises and the coupling becomes more nonlinear.
- Near depletion, the slosh mode has a small amplitude but a high frequency, and it still causes small, repetitive disturbances.
- Once the tank is empty, the spacecraft behaves as a rigid body and the controller no longer needs to compensate for a moving mass.
This made the control problem hard in several ways:
- The coupled dynamics are nonlinear and time-varying (NLTV), because the slosh mass , the inertia and the slosh frequency all change as fuel burns.
- The plant is not linearly parameterizable, because of the term and the time-varying parameters, so a nonlinear MRAC design with a direct Lyapunov proof does not apply.
- The primary reaction wheel is limited to 0.5 N·m, so a thruster backup limited to 2.0 N·m has to cover larger demands and wheel saturation.
- The plant is also driven by gravity-gradient torque, and the disturbance model allows for actuator saturation loss and model mismatch.
I treated attitude as a single-axis rotation, modeled slosh as a pendulum analog, and modeled both actuators as ideal torque sources that enter as one combined control input.
Action
Orbit and pointing reference
For a circular orbit, the orbital rate is , so the nadir reference angle grows linearly as (offset by in the simulation). The gravity-gradient torque comes from the inertia asymmetry:
Lagrangian model of attitude and slosh
I defined an inertial frame and a body frame related by a direction cosine matrix for a rotation about , and placed a slosh pendulum of length at angle from . Working in a center-of-mass frame, the Lagrangian is
Lagrange's equations give the attitude equation (driven by the control torque ) and the slosh equation, both with terms in and that capture fuel depletion. Two generalized coordinates give a 4-state model, , in which the control enters the attitude rate with gain and the slosh rate with .
Actuator allocation
The reaction wheel supplies torque first, and the thruster supplies only what is left over:
Linearization and reference models
Because the plant is not linearly parameterizable, I used the Lyapunov indirect method. I linearized the model with its Jacobian about the origin to get a time-varying and . The reference model has two decoupled second-order blocks (attitude and slosh) and switches on the fuel fraction :
| Mode | Active when | ||
|---|---|---|---|
| Coupled | rad/s | (well damped) | |
| Rigid | rad/s | (moderately underdamped) |
Hybrid control law and adaptation
The gain-scheduled control law is . In coupled mode, the weights follow an adaptive law with σ-modification and projection to , and adaptation is frozen in rigid mode:
Lyapunov stability proof
I used the candidate with . Bounding the cross terms with Young's inequality gives (here is a decay rate, not the fuel fraction), provided
The closed loop is therefore uniformly ultimately bounded (UUB), with tracking error bound rad. For the fuel-depleted mode, I used with an integral state and leakage, which gives and , so that mode is also UUB.
Simulation
I simulated open-loop, PID and MRAC control over a 200 s window with Euler integration at a step of 0.05 s, with gravity-gradient torque injected into the plant and slosh parameters varying with . The main gains were:
| Parameter | Value |
|---|---|
| Feedback gains | [6 8 4 3] coupled, [10 12 6 5] rigid |
| Feedforward gain | 1.0 coupled, 0.7 rigid |
| Adaptation gain | (1/s) |
| Leakage | 0.01 1/s |
| Weight limit | 10 |
| PID gains | , , |
Result
- The MRAC controller tracked the nadir reference despite the nonlinear coupling and slosh, and it stayed inside the UUB bound for the full 200 s window after an initial overshoot to about 4 rad near 16 s.
- The PID controller swung with growing amplitude between about -13 and +12 rad, and the open-loop response drifted slowly upward.
- The commanded torque reached about ±4 N·m, so the reaction wheel saturated at ±0.5 N·m and the thruster covered the rest up to ±2 N·m. The oscillations shrank after about 150 s.
- Fuel mass fell from 2 kg to 1.2 kg (a fuel fraction of 0.6) during the window, so slosh stayed active and the adaptive mode ran throughout. The full depletion was modeled over about 500 s.
- The orbital rate is only about 0.0011 rad/s, so the reference moves about 0.55 rad (about 31°) in 500 s. That slow reference is why slow adaptation is enough.
- A well-tuned PID with anti-windup can win when the system is slowly varying, nearly LTI and lightly disturbed. The robust adaptive controller wins under strong parameter variation, nonlinear coupling, time-varying inertia and uncertainty, which is this problem.
- The UUB result is proven for the linearized system, so the nonlinear system is, under standard assumptions, at best locally bounded or practically stable.