Overview
This project is a set of physics simulations for three classic systems. A double pendulum. A spring pendulum. And an inverted pendulum. I started from scratch and wrote out the math myself instead of using a built in model. For each system, I chose the variables to describe the motion. I wrote the forces and energy relationships. Then I derived the differential equations that control how the system moves over time.
After that, I implemented the equations in MATLAB. I used numerical solving to simulate the motion step by step. Then I plotted the results and created animations so the motion is easy to see. I also built the same systems in Simulink using block diagrams. This made it easy to change parameters and starting conditions and immediately see the effect in the simulation.
Double Pendulum Simulation
Spring Pendulum Simulation
Inverted Pendulum Control Simulation
Technologies
Classical MechanicsDifferential EquationsDynamics ModelingDeriving Equations of MotionNumerical MethodsODE SolversMATLABSimulinkBlock Diagram ModelingParameter SweepsData VisualizationAnimation / Simulation Rendering