Challenge

Week 3 - Solving second order ODEs

Creating Animation And Simulation of simple pendulum by solving second oder odes in MATLAB

AIM :-

To simulate and animate the motion of transient behavior of system or simple pendulum

In engineering ode is used to describe the transient behavior of system and simple example is pendulum

The way of pendulum moves depends on Newtons second law. When this law is written down we get a second order differential equation that describes the position of the ball with respect to time

Similarly there are hundreds of ODEs that describe key phenomena and if you have the ability to solve these equations then you will be able to simulate any of these system.

Your objectives is to be write a program that solve the following ODE this ODE represents the equation of motion of simple pendulum with damping.

Here the given parameters of odes

L = 1 metre,

M = 1 kg,

b = 0.05.

g = 9.81 m/s2.

Angular velocity = 3 rad/sec

Motion simulation time = 0 – 20 sec

Step 1 :-

Script functions used ode

Step 2 :-

Write program as follows.

Step 3 :-

Creating simulation and animation of pendulum in MATLAB

Output :-

Output video link :-

https://www.youtube.com/watch?v=zwjrl6z-87w

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.