Dynamics and Stability of Spacecraft Attitude Systems
The Objective
To computationally model and analyze the stability of complex rotational systems. The project was divided into two core phases: verifying the stability of the principal axes for a torque-free rigid body under small perturbations (ε << 1), and modeling the precession, nutation, and spin of a heavy top using Euler angle kinematics.
The Execution
I developed a comprehensive MATLAB simulation framework to solve the exact equations of motion. For the torque-free rigid body, the script simulated both exact equilibrium and perturbed trajectories across the major, minor, and intermediate axes. To ensure physical realism, I implemented a validation layer that continuously calculated Kinetic Energy (T) and Angular Momentum magnitude squared (||H||2), proving conservation laws were maintained throughout the integration.
Implementation Highlight: Custom ODE Constraints
For the spinning top simulation, the physical constraints dictated that the integration should stop if the top "fell" past a certain angle. Rather than running a blind simulation and trimming the data afterward, I integrated a custom event-tracking function directly into MATLAB's ode45 solver to halt execution the exact millisecond the nutation angle (θ) reached 95 degrees.
% Configure ODE solver to listen for the nutation limit event
options_part2 = odeset('RelTol', 1e-8, 'AbsTol', 1e-8, 'Events', @nutation_event);
[t2, X] = ode45(@(t,X) top_dynamics(t, X, It, Ia, mgl), tspan_part2, X0, options_part2);
% ... [Dynamics function omitted for brevity] ...
% Custom event function to halt integration at 95 degrees
function [value, isterminal, direction] = nutation_event(~, X)
target_theta = deg2rad(95); % Target limit in radians
theta = X(2); % Current nutation angle
value = theta - target_theta; % Zero-crossing triggers the event
isterminal = 1; % 1 = Stop the integration
direction = 0; % Detect all zero-crossings
end
The Result
The simulation successfully mapped the stability profiles of all three principal axes and accurately modeled the non-linear nutation of the heavy top. By explicitly separating handwritten physics logic from AI-assisted data visualization routines, the project maintained absolute academic integrity while delivering highly polished, professional-grade telemetry plots.
View Full Technical Report (PDF) →