Simple Pendulum

Simple Pendulum

1. Introduction

Consider a pendulum composed of an object of mass m and mass less string of constant length l in a constant gravitational field with acceleration g as shown in Figure 1.

The motion of the pendulum can be completely described by a single generalized coordinate θ. The angle θ is measured from the negative y-axes. The position of the mass of the pendulum is given as

[1.1]

[1.2]

Figure 1: Simple Pendulum

2. Lagrange’s Equations of motion for Simple Pendulum

The kinetic and potential energies of the pendulum are given as follows

[2.1]

[2.2]

Where zero potential energy point is chosen at the point θ = 0. The Lagrangian is given as

[2.3]

The Lagrange’s equations for the generalized coordinate θ is given by

[2.4]

Thus one gets the equations of motion for simple pendulum is

[2.5]

The natural frequency of the simple pendulum is given by

[2.6]

3. Numerical Integration of Equation

The simple pendulum equation (2.5) can be time integrated to know the trajectory/ position of the mass using methods like Euler method, Runge-Kutta method etc,. Runge-Kutta method is better and more accurate. To time integrate the equation it is transferred to first order differential equations as follows:

[3.1]

Equation (3.1) defines the state of the system. Its first order time derivative is given by

[3.2]

To solve the above first order differential equations initial values are required i.e. are required.

4. Code for Simple Pendulum

A code is written in MATLAB for simple pendulum motion. The equation is solved using ODE45 of the MATLAB. Animation of the simple pendulum motion is plotted. Phase plane plot and evolution of displacement w.r.t time of the simple pendulum motion are plotted in the same animation plot. The following are the values used in the code and can be changed accordingly.

Mass of the bob, M = 10 N

Length of the pendulum, L = 1 m

Acceleration due to gravity, g = 9.81 m/s2

The following are the initial values used in the code

Initial values can be changed accordingly to the requirement. The following picture shows the plots obtained for the spring pendulum with the above values run for 60 seconds.

Figure 2: Simulation of Simple Pendulum

The values of the simple pendulum can be changed and the motion of simple pendulum can be studied.

The following video shows the animation of the simple pendulum: