SimMechanics is used to simulate a pendulum at the tip of a rotating arm, called a furuta pendulum. The equation of motion are then simulated by ode45 to show they are the same. All nonlinear dynamics are simulated (only one on file exchange I've seen that does that), so the equations can be used to design swing up controller. Also shows how to use function handles so to use ode with a single file.
Simulation does NOT include friction or inertia besides the axial inertia.
File still works without SimMechanics, but cannot show comparison. If there's interest for a mat file with an example output, just let me know.
Alan Jennings (2022). Furuta (rotary) Pendulum (https://www.mathworks.com/matlabcentral/fileexchange/34521-furuta-rotary-pendulum), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!