Dynamics (MCEN90038) ·
University of Melbourne ·
Team of 3 ·
Semester 1, 2024
Simulated 3D animation (MATLAB)Physical gyroscope rig (lab footage)
Newton-Euler dynamicsMATLAB (symbolic + ode45)Sensor data validation3D animation
The Brief
For a graduate-level dynamics course, our team of three studied a three-axis gyroscope rig with two rigid bodies (axle and rotor) and three rotational degrees of freedom. The goal was to derive its full equations of motion from first principles, simulate the system numerically, and validate the simulation against real accelerometer/gyroscope data recorded from the physical rig in the lab.
My Role
I wrote the entire MATLAB implementation for the project — the symbolic derivation of the Newton-Euler equations of motion, the numerical ODE simulation, and the 3D animation reconstructing the rotor's precession — and co-authored the written report.
Engineering Highlights
Newton-Euler formulation: Derived inertia tensors for each rigid body analytically (modeled as homogeneous cylinders) and transferred them to a common reference point using the parallel axis theorem.
Symbolic derivation: Built the full symbolic model in MATLAB, wrote 12 Newton-Euler equations (linear + angular for each link), and eliminated constraint forces by substitution to isolate three independent equations of motion.
Decoupling & simulation: Used equationsToMatrix to solve explicitly for angular accelerations, converted the symbolic model to a numerical function, and integrated it with ode45.
Validation: Compared simulated angular velocities and linear accelerations against measured sensor data, tuning uncertain initial conditions (like rotor spin rate) to match observed behavior.
3D animation: Built a custom MATLAB animation of the gyroscope's motion from the simulated state trajectory, for direct visual comparison against the recorded lab video.
Results
The simulated and measured angular velocities showed strong agreement in period and phase across all three axes over the full 20-second test window — strong evidence the model correctly captured the dominant gyroscopic dynamics of the system. Remaining discrepancies were traced to sensor quantization (~0.1 rad/s resolution) and uncertainty in the rotor's initial spin rate, which couldn't be measured directly since the sensor was mounted on the axle rather than the spinning rotor.
CAD model with body-fixed reference frames used in the derivationSimulated vs. measured angular velocity — x-axisSimulated vs. measured angular velocity — y-axisSimulated vs. measured angular velocity — z-axis
Group project completed as part of MCEN90038: Dynamics, University of Melbourne.