Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

Forced and Damped Pendulum

Name/ Surname: Dionysios Zelios

Email: dionisis.zel@gmail.com

Course: Computational Physics (FK8002)

Date of submission: 31/03/2014

CONTENTS

Description of the problem


i.
ii.

Introduction3
Runge-Kutta method4

Results
i.
ii.
iii.
iv.
v.
vi.
vii.

Undamped pendulum..5
Stable case9
Unstable case11
Maximum amplitude frequency.18
Poincar points19
Power spectrum.23
Butterfly effect25

References

Description of the problem

i.

Introduction

Consider an idealized pendulum; a light rod (negligible mass), with length l and a mass m
(negligible extension) in one end. The other end is fixed and the pendulum swings in one plane. We
assume that the friction force is proportional to u and that the pendulum is driven by an external
periodic force, Fd cos(d t ) .
We know that three forces , gravitational, the damping force and the periodic driving force are
responsible for producing the motion of the pendulum. Starting from Newtons second law, we
have:

F ma (1)
F mg sin( ) ku Fd cos(d t ) (2)

, where k is the friction constant

Assuming a rigid pendulum (its length is fixed), the mass can move only in a circle of a radius l. The
position along this circle is given by l. The acceleration therefore is given by a l
velocity u l

d
. From equations (1), (2), we have:
dt

mg sin( ) kl

d
d 2
Fd cos(d t ) ml 2
dt
dt

d 2
and the
dt 2

(3) , where is (t)

This second order differential equation can be transformed to two coupled differential equations:

d
(t ) (4)
dt
F cos(d t )
d (t )
mg sin( ) kl (t ) Fd cos(d t )
d (t )
g
k
(5)

sin( ) (t ) d
dt
ml
ml
ml
dt
l
m
ml

We want to write a program that solves this equation. The friction constant k, and driving force
parameters, Fd and d have to be read in. The parameters l and m were set equal to 1. For the
solution we will use a fourth order Runge-Kutta.

ii.

Runge-Kutta method

Fourth order Runge-Kutta method is very popular for solving the ordinary differential
equations, however, it solves only the first order differential equations. Hence, the higher
ordered differential equations have to be converted into first order
differential equations. Let an initial value problem can be specified as follows.

y ' f (t , y )

y (t0 ) y0

For a particular case, the initial conditions are given y(1) = = 0 and y(2)==1 at t=0. The
fourth order Runge-Kutta method for this problem is given by the following equations:
1
yi 1 yi (k1 2k2 2k3 k4 ) O (t 5 )
6

ti 1 ti t

where the term yi+1 is the fourth order Runge-Kutta approximation of y(ti+1), and
k1 t [ f (ti , yi )]
k
t
, yi 1 )]
2
2
k2
t
k3 t [ f (ti , yi )]
2
2
k4 t [ f (ti t , yi k3 )]
k2 t [ f (ti

where t is the size of the interval.


The next value of yi+1 is determined by the present value of yi plus the product of the size
of the interval and an estimated slope. The slope is a weighted average of the slopes k1, k2,
k3 and k4. More precisely, k1 is the slope at the beginning of the interval, k2 is the slope at
the midpoint of the interval using k1, k3 is again the slope at midpoint but it uses k2 and k4 is
the slope at the end of the interval that uses k3.
The error in executing this step can be characterized as the fifth order in the step size, thus
this method is accurate to the fourth order.

Results

To begin with, we check the case of the undamped oscillation, with Fd k 0 .


In an undamped oscillation, the equation of motion (3) reduces to:
d 2
g
d 2
g
sin 2 , with a small angle approximation and general solution
2
dt
l
dt
l

(t ) A sin(0t ) .
Below, we show the graphs of (t) against t, as well as (t)-t and the phase diagram.
The initial conditions (,)=(0,1) and the plots were generated in the time interval of [0,50]with
time step 0,01 at 5000 iterations.

As far as the phase diagram is concerned, we know that for a pendulum obeying a linear
differential equation, the trajectory should appear as a closed curve such as an ellipse,

which repeats itself over and over. This indicates that the pendulum returns to the same
point in phase-space at the beginning of each drive cycle and the trajectory is repeated.
We also check the case of Fd 0 and k 0,1 kg/s . We notice that just a small force of friction
is able to change our initial results. The graphs are given below:

For Fd 0 and k 0,5kg / s , we have:

We also tried different step-sizes in our program and noticed that we get the same results.

In order to find a stable solution, we set the driving force Fd 2 N , the angular frequency

d 2rad / s and the constant friction k 0,5kg / s . In this case, our initial conditions become
(,)=(0,0) and the graphs were generated in the time interval of [0,50]with time step 0,01 at 5000
iterations.

We notice that we found an initial unstable region, but after some time the oscillations are
stable.
Below, we change the driving force and we notice that the more we increase the
amplitude, the more unstable the system becomes. Let us set Fd 4.8 N , keeping the same
values for the other variables.

For Fd 7 N , we get:

Now, we change the driving frequency, keeping all the other variables as they were in the
stable solution. For d 0.1rad / s , the graphs are:

For d 8rad / s :

Now, we change the constant friction, keeping all other variables as they were in the
stable case.
For k = 0,2 kg/s:

For k = 10 kg/s:

As we increase the friction, for constant force, the phase diagram is becoming similar to
that of the undamped pendulum, as expected.
Then, we vary the driving frequency in order to find a resonant behavior. One possibility is
to set the parameters as they were in the stable case (driving force Fd 2 N and constant
friction k 0,5kg / s ), vary the driving frequency in the interval [0.1 , 5]and plot the maximum
amplitude. The result is given below:

For k = 3 kg/s:

We notice that as we increase the friction, the maximum amplitude is decreasing. In


addition, for k=0.5 kg/s, the amplitude is maximum for the driving frequency equal to 3,
but for k= 3 kg/s, the amplitude is maximum for d 2.3rad / s . Hence, as we increase the
friction, the amplitude is maximum for smaller frequencies.

In our next step, we want to find the Poincar points. We plot the local maxima of our
solution for a number of 100 cycles. ( time interval [0, 314] sec, step size 0.01)
For the undamped pendulum:

For the stable state ( Fd 2 N , d 2rad / s and k 0,5kg / s ):

Changing only the driving force to Fd 6 N :

For Fd 10 N :

We notice that in the case of undamped pendulum and in the stable case, the Poincar
points are the same. However, as we vary the driving force the system acquires chaotic
behavior and the Poincar points appear random.

Now, we want to plot the Poincar points as a function of the driving force and map out
the transitions between the types of behavior. We vary the driving force in the interval
[1 , 6], with d 2rad / s and k 0,5kg / s .

Now, we want to further analyze our system, using the power spectrum of (t).
While we have already looked at the motion of the pendulum in the time domain,
we will try to analyze our system in the frequency domain.
The power spectrum shows the frequency space version of the motion for the
pendulum and it is a measure of how much of the energy associated with the timedependent behavior stored in each mode.
Using a Fast Fourier algorithm in Matlab, we take the Fourier transform of our
solutions. We know that the power spectrum will be the square absolute value of
those solutions.

For the undamped pendulum, we have :

We observe two very sharp peaks and all the other components are very close to
zero. The two sharp peaks correspond to the natural frequency of the oscillation and
its reflection. This result is due to the purely oscillatory nature of the motion; since
there is one frequency that is relevant to the motion, we get one frequency in the
power spectrum.
In the case of a pendulum with driving force and friction, we will plot the power
spectrum as a function of frequency in order to get more physical information.
In order to do that, we use the fact that

Hence :

Nt
k

and

k=N-1

2 ( N 1)
,
Nt

where N is the number of measurements and t is the time interval that we are working on
[0,50] seconds.

In case that Fd d 2 and k=0.5:

The maximum power corresponds to = 2,4 rad/sec.


In case that Fd 4 N :

The maximum power corresponds to = 2,7 rad/sec.

In case that Fd 4.7 N :

The maximum power corresponds to =2,41 rad/sec. We notice that in the chaotic
case, the system still has an influence from the initial driving frequency, but there is
no other significant peak in the graph.
Butterfly effect
Chaotic systems exhibit high sensitivity to initial conditions( butterfly effect). Small
differences in (0) and (0) can lead to very different final positions. That means
that each point in such a system is arbitrarily closely approximated by other points
with significantly different future trajectories. Thus, an arbitrarily small perturbation
of the current trajectory may lead to significantly different future behavior. A
consequence of sensitivity to initial conditions is that if we start with only a finite
amount of information about the system (as is usually the case in practice), then
beyond a certain time the system will no longer be predictable.
We change the initial conditions in a far decimal place (the change is extremely little)
and we can observe that series diverge in time. For example, we plot the case that
the undamped pendulum has initial conditions [1,0] and [1.009 0]. We used 0.01
time step and we run our program in the interval [0, 10] sec, in order to get a clearer
picture of the phenomenon.

As expected, a small change in the initial conditions (position from 1 to 1.009), gives
slightly different results, hence our numerical treatment is only accurate for
specified initial conditions. In order to show better this phenomenon we show the
diagrams for F= 6N, k=0.5 and =2 rad/sec and initial conditions [0,0] and [0.009, 0].
We have let our system to run in the time interval [0,500] sec in order to get clearer
results.

References

1. Mathematical methods for physicists


Arfken, Weber, Harris
2. Introduction to computation and modeling for differential equations
Lennart Edsberg
3. Lecture notes, computational physics course (FK8002)
Eva Lindroth
4. Numerical Recipes
Press, Teukolsky, Vetterling, Flannery

You might also like