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

Chapter 11

Damped Harmonic Motion -


Oscillatory Pendulum

11.1 Lecture - Simple Pendulum Motion


In this lesson, we will continue our study of simple harmonic motion. Instead of looking
at a linear oscillator, we will study an angular oscillator – the motion of a pendulum. In
our study of the linear motion of a spring-mass system, we observed that friction dissipated
energy of the system after a large number of oscillatory periods, such that the system would
eventually come to rest. We will see in this lesson that a similar phenomena takes place
in angular motion as well. In lecture this week, we will solve two problems: Problem A -
analysis of the motion of a simple pendulum using Newton’s Laws of motion in the absence
of friction and Problem B - analysis of the dissipation of the total mechanical energy of a
simple pendulum using the work and energy theorem.
During lab we will be introduced to a new sensor - the angular encoder. The encoder is
a device that can be affixed to a rotating shaft to measure the angular position of the shaft.
We will collect data for the angular position of a pendulum as a function of time and then
save this data to a text file.
During studio we will compare the laboratory data to the theoretical models developed
during lecture and continue our skills development with the MATLAB software environment.

11.1.1 Problem A. Formulate


State the Problem
We are given a mass m suspended from a rigid rod of length R. The rod is mounted on a
bearing assembly such that it is able to pivot about a point at the origin. In a system like
this, the mass at the end of the rod is often called the “bob.” The bob is initially manually
displaced through some angle ✓0 and released from rest.
Use Newton’s laws to develop an expression for the angular position of the bob as a
function of time.

363
State the Known Information

m = Known [kg] Mass of bob (Constant) (11.1)


R = Known [m] Length of Pendulum (11.2)
✓0 = Known [radians] Initial Displacement of bob (11.3)
!
V0 = 0 [m/s] Initial Velocity of bob (11.4)

State the Desired Information

✓(t) = ? [radians] ↵ Displacement of m vs. time (11.5)

11.1.2 Problem A. Assume

mrod ⇡ 0 [N ] Neglect mass of rod (11.6)


m
Wi!f ⇡0 [J] Neglect frictional work (11.7)
Qm
i!f ⇡ 0 [J] Neglect heat transfer (11.8)

11.1.3 Problem A. Chart


The schematic diagram and free body diagrams are shown below in Figure 11.1.

11.1.4 Problem A. Execute


Recall the governing equations:
X!
If : F = 0 T hen : ! a =0 Newton’s 1st Law (11.9)
X ! d(m! V)
F = Newton’s 2nd Law (11.10)
dt
! !
F Action = F Reaction Newton’s 3rd Law (11.11)
!
Fg =g·m# Newton’s Law of Gravity near Earth (11.12)
E2 E1 = Q1!2 W1!2 Work Energy Theorem (11.13)

From the schematic diagram and FBD we observe that there is a tension T in the rod of
length R. The tangential force due to gravity has a magnitude mg sin ✓, and it acts to
decrease the magnitude of the angle |✓|. It is common nomenclature to describe the arc
length with the symbol s measured from the lowest position of the pendulum. Using our
knowledge of trigonometry and geometry we can write s = R✓, , where ✓ is in radians. Notice
from the FBD that the radial force due to gravity will be balanced by the tension in the

364
Figure 11.1: Schematic diagram of pendulum experiment and free body diagram of bob at
end of pundulum.

rod. The motion of the pendulum is forced by the tangential component of the force due to
gravity. From the FBD we can write Newton’s Second Law in the tangential direction as
X d2 s
Ftangential = mg sin ✓ = m or (11.14)
dt2
d2 s
= g sin ✓ or, since s = R✓ (11.15)
dt2
d2 s s
2
= g sin (11.16)
dt R
[m] [m]
2
= 2 [ ] Units
[s ] [s ]
From calculus, it is known that the sine of an angle (in radians) can be expressed by the
series:
✓3 ✓5 ✓7
sin ✓ = ✓ + + ··· (11.17)
3! 5! 7!
3 5 7
When the angle ✓ is a small angle, then |✓| >> | ✓3! | >> | ✓5! | >> | ✓7! | · · · , and we can use the
small angle approximation that sin ✓ ⇡ ✓. Using the small angle approximation for the sine
function in Equation 11.16 allows us to write:
d2 s s g
⇡ g = s= !2s (11.18)
dt2 R R

365
where we have defined the natural frequency as ! 2 ⌘ g/R. The solution of the Ordinary
Di↵erential Equation (ODE) 11.18 will be studied in a later course on di↵erential equations.
The solution is presented here, without derivation, as:
s = s0 cos(!t) (11.19)
where s0 = R✓0 is the initial (maximum) displacement measured along the arc of the circle
shown in the schematic diagram. While the derivation of Equation 11.19 is beyond the scope
of this course, you can take the first and second derivative of Eq. 11.19 and substitute the
results into Equation 11.18 to show that it is indeed a solution of the ordinary di↵erential
equation. The period of the harmonic motion of the simple frictionless pendulum with small
initial angle displacements is
2⇡ 2⇡
T = = pg (11.20)
! R
[radians/period] [radians/period]
[s] = = q Units
[radians/s] [m]
[m/s2

Notice that the period of the pendulum is independent of the mass of the bob! Also, the
period of the pendulum depends only upon length of the rod and the acceleration of gravity.
Thus, using a simple time piece, and carefully measuring the length of the rod provides
us with a highly accurate method to experimentally estimate the acceleration of gravity.
Earlier in this class, we used a high speed data acquisition system to measure the position
of an object falling through the air. Such elaborate equipment was not available in the time
of Newton. However, it was perfectly reasonable to estimate the period of oscillation of a
large pendulum and to measure its length. As an exercise, you may use your pendulum
observations as an alternative means of estimating the local acceleration of gravity at the
surface of the Earth.
A graphical representation of the harmonic motion of the ideal pendulum in the absence
of friction is shown in Figure 11.2.

11.1.5 Problem A. Test


The units of our analysis are correct. The period of a simple pendulum is independent of
the mass of the pendulum bob. This can be confirmed experimentally. As the length, R, of
the rod increases the period T of the pendulum increases. This makes intuitive sense. Our
confidence is high.

11.1.6 Problem B. Formulate


State the Problem
Building upon the analysis presented in Part A, we now wish to incorporate an analysis of
the e↵ects of friction on simple harmonic motion. Both the pendulum of the current lesson
and the spring-mass system of the previous lesson exhibit characteristics of harmonic motion.

366
Figure 11.2: Angular position of a simple pendulum as a function of time in the absence of
friction.

Given a mechanical system operating in harmonic motion, estimate the energy dissipation
due to an average friction force which acts in opposition to and is directly proportional to
the velocity of motion. Use the work and energy theorem to develop an expression for the
decay in the total mechanical energy of a system.

State the Known Information


We start with the knowledge that the motion of an ideal pendulum in the absence of friction
may be described using the results from Part A:

s(t) = s0 cos(!t) [m] Arc Displacement (No friction) (11.21)


✓(t) = ✓0 cos(!t) [radians] Angular Displacement (No friction) (11.22)

We know that the pendulum is released from rest from an initial angle ✓0 as was given
previously in Equation 11.3. Since the initial speed of the pendulum is zero, the total initial
mechanical energy present in the system at time zero is simply the gravitational potential
energy of the bob:

E0 = P E0 = mgR(1 cos ✓0 ) [J] Initial Energy (11.23)

where the datum for elevation, z = 0, is chosen to be at the bottom of the pendulum arc as
illustrated in the schematic diagram of Figure 11.1.

367
State the Desired Information
We expect friction to do work always against the motion of the system. Thus, the mechanical
energy stored in the pendulum system is always working to overcome the frictional resistance
due to the bearings and air resistance. We expect this friction to dissipate eventually all of
the mechanical energy in the system. We are to develop an expression for predicting the
total mechanical energy E(t) in the system as a function of time:

E(t) = ? [J] ↵ Total Energy vs. Time (11.24)

11.1.7 Problem B. Assume


We make an assumption that the friction force always acts in opposition to the motion of
the pendulum, and is directly proportional to the magnitude of the velocity:
! !
F f riction = b V [N ] Friction Force (11.25)
Qi!f ⇡ 0 [J] Neglect Heat Transfer (11.26)

Equation 11.25 is a common engineering model for frictional damping in mechanical systems.
While the actual instantaneous friction is dependent the velocity, it is also common to report
an average friction force over a single period of oscillation of a harmonic system. The
coefficient b describes the amount of friction in a system. When b ! 0 there is no friction
in the system. As b ! 1 then the frictional resistance to motion is infinite and the system
’seizes’, or ’locks up’. Equation 11.26 states that there is no heat transfer to or from the
system during the time interval of interest. This is consistent with the analysis of Part A.
For Part B, we will use the average friction force acting during one period of oscillation to
estimate the work done by the system to overcome friction. This analysis is mathematically
not quite perfect, but it is certainly sufficient to provide us with an engineering understanding
about the influence of frictional damping on simple harmonic motion.

11.1.8 Problem B. Chart


The schematic diagram and free body diagrams were already presented for Problem A.

11.1.9 Problem B. Execute


Recall the governing equations:
X!
If : F = 0 T hen : ! a =0 Newton’s 1st Law (11.27)
X ! d(m V ) !
F = Newton’s 2nd Law (11.28)
dt
! !
F Action = F Reaction Newton’s 3rd Law (11.29)

368
!
Fg =g·m# Newton’s Law of Gravity near Earth (11.30)
E = E2 E1 = Q1!2 W1!2 Work Energy Theorem (11.31)

We used Newton’s laws in Part A to model the motion of the pendulum in the absence of
friction. Now, we will use the work and energy theorem to evaluate the influence of friction
upon the system. The total mechanical energy E of the system at any instant of time t is
given by:
Total E Kinetic E Grav. Pot. E Elastic Pot. E
z}|{ z }| { z }| { z }| {
E(t) = KE(t) + P E(t) + SE(t) [J] Total Energy (11.32)

For the pendulum, we neglect the elastic potential energy since there are no springs present
in the system. If we were to analyze the friction present in a spring-mass system similar
to that studied in the previous lesson, then clearly the elastic potential energy would be
significant. For the pendulum, we have
Total E Kinetic E Grav. Pot. E
z}|{ z }| { z }| {
E(t) = KE(t) + P E(t) [J] Total Energy (11.33)

At time t = 0 we know that the system starts from rest at an initial angular displacement of
✓0 from the vertical as illustrated in schematic. The total mechanical energy in the system
at time t = 0 is:

E0 = E(t = 0) = P E(t = 0) = mgR(1 cos ✓0 ) [J] Initial Energy (11.34)

The total mechanical energy in the system at any instant of time t is:
mV 2
E(t) = + mgR(1 cos ✓) [J] Total Energy (11.35)
2
From our earlier work with the spring-mass system, we observed that the mechanical energy
in the system is continuously traded back and forth. For the spring/mass system, we had to
consider SE, KE, and P E. For the simple pendulum, we only need to consider only KE
and P E. The average value of kinetic energy and potential energy during a single period of
the pendulum motion is one half the total energy at the beginning of each period:
E
(KE)ave = (P E)ave = [J] Average KE and P E (11.36)
2
We can use the average kinetic energy of the pendulum during one period of oscillation to
estimate the average speed of the pendulum during a period (the instantaneous speed varies
from zero at the peak of the motion to a maximum value at the bottom of the arc):
1
(KE)ave = m(V 2 )ave [J] Average KE (11.37)
2
2 2E E
(V 2 )ave = (KE)ave = = [J] Average Speed (11.38)
m m2 m

369
We introduced the assumption that the instantaneous friction force is directly proportional
to and in the opposite direction of the velocity, as given by Equation 11.25. Since work is
the dot product of force with displacement, we can write the instantaneous work done by
friction as:
!
Wf = F f riction · !
x [J] Instantaneous Work Done by Friction (11.39)

The RATE at which friction does work Ẇf is called the frictional power dissipation, and it
may be approximated by
! d!x ! ! [J]
Ẇf = F f riction · = F f riction · V Instantaneous Power Dissipation by Friction
dt [s]
(11.40)

Our assumption for the friction force, Equation 11.25, may be used in Equation 11.40 to
yield
! ! [J]
Ẇf = bV · V = bV 2 Instantaneous Power Dissipation by Friction (11.41)
[s]
The average frictional power dissipation rate during one period of oscillation may be approx-
imated by:

f riction [J]
Ẇave = b(V 2 )ave Average Power Dissipation by friction (11.42)
[s]
The work done by the PENDULUM is the opposite sign of the work done by the FRICTION:

P endulum [J]
Ẇave = +b(V 2 )ave Average Power Expended by Pendulum to Overcome Friction
[s]
(11.43)

Now, using our assumption of negligible heat transfer (Equation 11.26) in the work energy
theorem of Equation 11.31 allows us to write:

E= W1!2 Simplified Work Energy Theorem (11.44)

If we divide both sides of Equation 11.44 by t and using Equations 11.38 and 11.43 we get:
E W1!2 P endulum b
= = Ẇave = b(V 2 )ave = E Rate Form of Work & Energy
t t m
(11.45)

If we take the limit as t ! 0, then the ordinary di↵erential equation describing the energy
of a simple harmonic oscillator working to overcome friction is thus given by
dE b
= E Simple Oscillator with Friction ODE for Energy (11.46)
dt m
370
The solution of Equation 11.46 is
(b/m)t
E(t) = E0 e Energy vs. Time (11.47)

where E0 = (P E)0 = mgR(1 cos ✓0 ). The solution of Equation 11.46 is beyond the scope
of this course, but will be studied in your later course on di↵erential equations. You can
take the first derivative of Equation 11.47 and substitute into Eq. 11.46 to demonstrate that
we do indeed have a valid solution.
We know from the schematic diagram that the P E of the pendulum is proportional to
the maximum angle of displacement. If the P E decays exponentially, then it follows that
the maximum angle will also decay exponentially. Thus, we hypothesize that the maximum
angular displacement of a pendulum moving in the presence of friction should obey:
(b/m)t
✓max (t) = ✓0 e Maximum Angle vs. time (11.48)

A graphical representation of Equation 11.48 is shown in Figure 11.3. As time goes to infinity,

Figure 11.3: Decay in maximum angle of deflection due to the energy dissipated in overcom-
ing friction.

we realize that the motion of the pendulum will cease and come to rest at ✓ = 0, which is
the minimum potential energy condition. In fact, this idea of minimum potential energy is
a very powerful driver in nature. This natural tendency towards minimum energy systems
forms the foundation of an entire branch of mathematics known as “variational calculus”
and is used by engineers to solve problems in solid body mechanics, heat transfer, energy
systems, bio-mechanical systems and a host of other application areas.

371
11.1.10 Problem B. Test
The units of our analysis are correct. As the amount of friction increases, the pendulum
motion will dampen out more rapidly. The coefficient b must be estimated experimentally.

11.1.11 Combining Harmonic Motion with Frictional Damping


In Problem A, we developed Equation 11.20 to describe the undamped harmonic motion of
an ideal pendulum in the absence of friction. In Problem B, we developed Equation 11.48 to
describe the decay in the maximum angle of displacement as a function of time, due to the
work done by the pendulum in overcoming the friction forces in the bearing and atmosphere.
Since the energy is dissipated continuously during motion, as the pendulum works to
overcome friction, the amplitude of the oscillation will decay over time. We can combine the
angular decay term describing the amplitude of the pendulum oscillation with the harmonic
response term. The combined response of undamped oscillations being dampened by the
energy decay term is illustrated in Figure 11.4.

Figure 11.4: Combination of angular decay and undamped harmonic motion to predict the
damped harmonic motion of a pendulum in the presence of friction.

372
The angular position of the pendulum will obey the expression
(b/m)t
✓(t) = ✓0 e cos(!t) (11.49)
p
where the natural frequency is given by ! = g/R and the damping constant b must
be determined experimentally. Derivation of the solution shown in Equation 11.49 will be
studied in your later class on ordinary di↵erence equations. The coefficient in the exponential
term is called the damping ratio or coefficient, and it is defined as ⇠ ⌘ b/m. The symbol ⇠ is
the lower case Greek letter Xi. The damped harmonic motion of a pendulum is illustrated
in Figure 11.5.

Figure 11.5: Damped harmonic motion of a pendulum in the presence of friction.

373
11.2 Lab - Simple Pendulum Motion
11.2.1 Scope
This week you will investigate the transient response of a simple pendulum with variable
mass and variable length when subjected to an initial disturbance. The resulting motion is
a perfect example of damped harmonic motion.

11.2.2 Goal
The goals of this laboratory experiment are to

1. validate the work - energy theorem,

2. understand the oscillatory response of a harmonic system in the presence of frictional


damping, and

3. begin to understand the physics of angular motion.

11.2.3 Units of Measurement to Use


All reports shall be presented in the SI system of units. Raw data may be collected in a
variety of units.

Table 11.1: Units of measurement to be used for damped oscillatory pendulum system.
Quantity Basic units Derived units
Length [m] [m]
Mass [kg] [kg]
Time [s] [s]
Velocity [m/s] [m/s]
Force [kgm/s2 ] [N ]
Energy [kgm2 /s2 ] [J] or [N ][m]
Angle [radians] [radians]
Frequency [radians/s] [radians/s]
Period [s] [s]
Work [kgm2 /s2 ] [J] or [N ][m]

11.2.4 Reference Documents


Review the lab videos for this week, and pay close attention to the proper installation and
use of the rotary encoder. Also, you may find the tutorial on rotary encoders on Wikipedia
to be of use, at http://en.wikipedia.org/wiki/Rotarye ncoder.

374
11.2.5 Terminology
The following terms must be fully understood in order to achieve the educational objectives
of this laboratory experiment.
Energy Displacement Force
Kinetic Energy Velocity Work
Gravitational Potential Energy Speed Pendulum
Arc Angle Frequency
Period Damping Friction
Bearing Decay Super-position
Encoder Radians Degrees

11.2.6 Summary of Test Method


On the myCourses site for this course you will find links to one or more videos on YouTube
for this week?s exercise. Watch all of the available videos, and complete the online lab quiz
for the week. The videos are your best reference for the specific tasks and procedures to
follow for completing the laboratory exercise.

11.2.7 Calibration and Standardization


By now in this course, students should be in a position to conduct independent calibrations
of hardware, and properly configure the use of all hardware, without having detailed instruc-
tions. Note that you will treat the USB encoder device as a primary instrument, and thus
will not calibrate it. The only requirement is to use the interface software to set the zero
angle of the encoder at the position when the pendulum bob hangs at rest.

11.2.8 Apparatus
All required apparatus and equipment components are described and demonstrated in the
instructional videos for this exercise, or will be familiar from common or previous use.

11.2.9 Measurement Uncertainty


The encoder device in use for this investigation is capable of representing each full revolution
of its shaft with 2048 digital pulses that are captured by the control electronics and the
software program that interfaces to the system. Therefore, knowing that each revolution is
360 [degrees], and treating the device as a primary instrument, the instrument least count
of the rotational position measurement (the encoder) becomes 360 [degrees]/2048 = 0.176
[degrees]. In turn, the uncertainty of the encoder as a primary instrument is then taken to
be:

375
1 1
✏encoder = ± ILCencoder ⇡ ± 0.176[degrees] ⇡ ±0.089[degrees] (11.50)
2 2

11.2.10 Sampling, Test Specimens


The transient response of the pendulum will depend upon the applied mass, its location on
the shaft, and the initial angle from which the mass is released to initiate motion. Every
group member should run and record his/her own set of trials, for at least two di↵erent
masses and locations on the shaft, following the overall guidelines noted in the videos for
maximum angle and so forth. It is always recommended that every student run several trials
to ensure that at least one good data set will result for each setup.

11.2.11 Preparation of Apparatus


All required equipment for conducting the laboratory exercise is made available either within
one or both of the drawers attached to the lab bench, or available from the laboratory instruc-
tor. You are expected to bring all other necessary materials, particularly your logbook and a
flash drive for storing electronic data as appropriate. You are to follow the general specifica-
tions for team roles within the lab. Although there are specific, individual expectations for
each role, you are each responsible overall to ensure that the objectives and requirements of
the laboratory exercise are met, and that all rules and procedures are followed at all times,
especially any that are related to safety in the lab. When finished, all equipment is to be
returned to the proper location, in proper working order.
subsectionProcedure - Lab Portion

Record all observations and notes about your lab experiment in


your logbook.

The instructional videos for this exercise cover the specific procedures to follow as you set
up the apparatus to make measurements, and for actually collecting data with the various
devices and software interfaces. More generally, you should always observe the following
general procedures as you conduct any of the exercises in this laboratory.

1. Come prepared to lab, having watched the videos in detail, then completing the asso-
ciated lab quiz and preparing your logbook before you arrive to class.

2. Follow the basic outline of elements to include in your logbook related to headers,
footer, and signatures.

3. As you conduct the exercise, please pay attention to the following safety concerns:

• Watch for tripping hazards, due to cables and moving elements.

376
• Watch for pinch points, during assembling and disassembly.

• Be careful of shock hazards while connecting and operating electrical components

4. Every week, for every exercise, your logbook will minimally contain background notes
and information that you collect before the lab, at least one schematic of the apparatus,
various standard tables for recording the organization of your roles and equipment
used, the actual data collected and/or notes related to the data collected (if done
electronically for instance), and any other information relevant to the reporting and
analysis of the data and understanding of the exercise itself.

5. All students should create and complete a table indicating the staffing plan for the
week (that is, the roles assumed by each group member), as shown in Table 1.2.

6. All students should create and complete a table listing all equipment used for the exer-
cise, the location (from where was it obtained: top drawer, bottom drawer, instructor?)
and all identifying information that is readily available. If the manufacturer and se-
rial number are available, then record both (this would be an ideal scenario). If not,
record whatever you can about the component. In some, cases, there will be no specific
identifying information whatsoever either because of the simplicity of the component,
or because of its origin. In these cases, just identify the component as best you can,
perhaps as “Manufactured by RITME.” The point here is to give as much information
as possible in case someone was to try to reproduce or verify what you did. Refer to
Table 1.3.

7. For the Lab Manager only: create a key sign-out/sign-in table for obtaining the
key to the equipment drawers, as shown in Table 1.4.

8. All students should create a table or series of tables as appropriate to collect his/her
own data for the exercise, as well as any specific notes related to the data collection
activities. In those cases where data collection is done electronically, there may not be
any data tables required.

9. Many of the laboratory exercises will require the use of a specific software interface
for measurements and/or control. In all cases, these will be made available on the
myCourses site unless stated otherwise.

10. The Scribe (or a designated alternative) should take a photo of each group member
performing some aspect of the laboratory exercise for inclusion in the lab report
that will be generated during the studio session. Refer to the example lab report for
more details.

11. Record all relevant data and observations in your logbook, even those that may not
have been explicitly requested or indicated by the textbook or videos. If in doubt
about any measurements, it is better to make the measurement rather than not.

377
12. When you are finished with all lab activities, make sure that all equipment has been
returned to the proper place. Log out of the computer, and straighten up everything
on the lab bench as you found it. Put the lab stools back under the bench and out of
the way.

13. Prepare for the upcoming studio session for the week by carefully read and understand
sub-Section 3 of the textbook, and complete the Studio pre-work prior to your arrival
at Studio.

378
11.3 Studio - Matlab Simulation of Damped Harmonic
Motion
This week in Studio you will complete an analysis of damped pendulum motion. You will
create two plots for angular displacement: one theoretical and one experimental. The ex-
perimental plot will be derived directly from data obtained in lab and read from a file into
your MATLAB code. The theoretical curve will use an experimental estimate for damping
ratio and the experimentally observed initial displacement along with the theoretical value
natural frequency. Ideally, the experiment plot should lay on top of the theory, but there
will be some di↵erences that accumulate over time. You will investigate the e↵ect of these
di↵erences and discuss them as part of your analysis.
Now that you have been introduced to the MATLAB environment, you are ready to take
the next step, and write some code on your own. The commands will be very similar to
those employed in last weeks Studio. It is convenient to store code and re-use it time and
time again. As part of your studio exercise, we will ask you to vary some of your input
parameters to predict results of future experiments.

11.3.1 Calculation and Interpretation of Results


Our theoretical expression for damping says that the maximum angular displacement is given
by
⇠t
✓max (t) = ✓0 e which can provide (11.51)
✓2 = ✓1 e ⇠(t2 t1 ) or (11.52)
ln(✓2 /✓1 )
⇠= (11.53)
t1 t2
The term ⇠ is the damping ratio, and you will need this value for your studio exercise.
Other equations needed for Studio this week were derived in the lecture portion of the text.
You will need equation 11.49, which is provided here for reference
⇠t
✓(t) = ✓0 e cos(!t) equation 11.49

11.3.2 Procedure - Studio Portion


Your pre-work for Studio this week includes two portions: tasks that you will complete in
your logbook to prepare for Studio, and a MATLAB activity that will help you spend your
time more productively upon arrival in Studio.

Studio Pre-work (Logbook portion)


Prior to arriving at Studio, you should have acquired the necessary data in lab, recorded
data in your logbook and stored your experimental data on a thumb drive. You should also

379
have a corresponding schematic drawing in your logbook that clearly identifies where each
measurement was made in symbolic notation. After Lab and before Studio, please
complete the following tasks.

1. Refer to the measurements that you made during the Lab experiment and record the
pendulum rod length R in your logbook.

2. Refer to the measurements that you made during the Lab experiment and record the
pendulum bob mass m in your logbook.

3. Visually inspect your raw data to observe one peak value of ✓ near the beginning of the
oscillatory motion. We refer to this as “Peak 1.” Determine the value of the angular
displacement at Peak 1 and record the value as ✓1 in your logbook. Determine the
time at which Peak 1 occurs and record this value as t1 in your logbook.

4. Visually inspect your raw data to observe the next successive peak value of ✓ following
Peak 1. We refer to this as “Peak 2.” Determine the value of the angular displacement
at Peak 2 and record the value as ✓2 in your logbook. Determine the time at which
Peak 2 occurs and record this value as t2 in your logbook.

5. Use Equation 11.53 to estimate the value of the damping ratio ⇠ and record this value
in your logbook.

6. Finally, inspect your data set to see what the final time is and record this value in your
logbook. We will refer to this value as tf .

7. Be sure to save the data file as a Tab Delimited format; this will enable MATLAB to
read the data file.

Studio Pre-work (MATLAB Portion)


After Lab and before Studio, please complete the following MATLAB exercise.
Please upload the MATLAB portion of studio pre-work to your individual drop-box for the
corresponding week, using a filename of the format Lastname Studio11Prework.m. Re-
member that MATLAB script files cannot have spaces or dashes in their file
names. You will receive a quiz grade based on the completeness of your submission.
Write a MATLAB script to do the following tasks. Be sure to include title block and
comments in your script file indicate the purpose of each line and section you write.

1. Create a first array using the variable name x, fill it with whole number values from
1 to 15, and display the array results to the screen. We will use a new function in
MATLAB this week to do this. Type: linspace(1, 15, 20);. This creates an array
starting at one, ending at 15, and having 20 elements. This is a very convenient way
to define “vector” arrays (i.e., 1-D matrices). Note that this will be a row vector
(i.e., 15 columns wide x 1 row long). Typically, when data is read from files it will

380
be in columnar format, and when manipulating array variables in MATLAB like in
equations or plots, it is necessary to have the arrays in the same format. Therefore, we
will transpose the x array by typing the following on the next line: x = x’;. This is
another example of how handling matrix or array type variables is extremely convenient
in MATLAB.

2. Add some lines to your existing script to accomplish the following task. Create a
second array using the variable name y and fill it with zeros to initialize it. Refer back
to last week’s script for details on how to do this. Be sure to define the dimensions of
y as 15 rows by 1 column to match that of x. Run the script to make sure it is working
properly.

3. Add some lines to your existing script to accomplish the following task. Create a scalar
variable with the name k and assign a numerical value of k = 3.5. Echo the result to
the screen. Recall that any line in a script file that does not end with a semicolon will
echo its result to the screen. Run the script to make sure it is working properly. Then,
edit the script so that the intermediate results are no longer echoed to the screen. Run
the script to make sure it is working properly. Demonstrate that you understand how
to enable and disable screen echo for any portion of a script that you desire.

4. Add some lines to your existing script to accomplish the following task. Now that you
have initialized x, y, and k, write a MATLAB expression to fill the array of y values
with a computed result y = k ln(x). Run the script to make sure it is working properly.

5. Add some lines to your existing script to accomplish the following task. Create an xy
plot with your script file, showing that you know how to plot an array of dependent
variables (y) as a function of an array of independent variables (x). Use your data for
y = k ln(x) to plot the result over the interval 1  x  15. Recall from last week that
you need to have the figure function followed by the plot(x,y) function. Run the
script to make sure it is working properly.

6. Now, edit your script, to change the value of k in whole numbers, to create a plot for
y = k ln(x) where 1  x  15, and 1  k  8. Run the script at least eight times
(changing the value of k and running it once for each value of k) to make sure it is
working properly. This is a tedious process, but will begin to demonstrate the value of
a scripting language to conduct “parametric studies.” A parametric study is when we
perform a series of simulations of a physical phenomena to better understand how an
engineering system will behave over a range of operating conditions.

7. You can appreciate that manually re-running the simulation as a parametric study can
become rather tedious, particularly if each simulation takes quite a while to execute.
We can use the “for loop” structure in MATLAB to help us do these repetitive tasks.
Now, edit your script, to change the value of 1  k  8 in whole numbers using a “for
loop” around the main body of your script, so that you create a series of eight plots

381
with a single run of your simulation. That is, write your “for loop” such that the script
does the entire parametric study. You need to include the calculation of y and plotting
of xvs.y in the loop. Be sure you have x defined and have the ”figure” command prior
to the for loop. Run the script to make sure it is working properly. You will only see
the final plot value when you run this because we redraw the plot every time it cycles
through the loop. To prevent the plot from redrawing itself, we will use the ”hold”
function. In your script, type a line that is hold on right after the figure line. This
will tell MATLAB to preserve the plot figure while adding new plots to it. Be sure to
type hold off after the loop. Run the script again, and now you should see all eight
plots on the graph.

Videos
You may wish to review the video “Getting Started with MATLAB” found in the Week 10
Content page in myCourses. Recall that this video demonstrates how to use the MATLAB
engineering analysis tool in “interactive mode.” You can see examples of how to do many
of the tasks requested in the Studio pre-work. Also, you may want to review the example
script that was provided for Studio last week. If you get stuck on the “for loop” task, then
use the MATLAB on-line resources or the MATLAB You Tube channel to find an example
of how to write a “for loop” in an m-file script. If you find videos that your believe are
particularly useful, please suggest them to your Studio instructor, and we will add a list of
video resources to this section over time.

11.3.3 Steps to Complete Studio Analysis


1. CREATE A SCRIPT FILE: from within the MATLAB environment, use the pull-down
command to execute “File - New - Script.” After the script editor window opens, use
the pull down command to execute “File - Save As” and save this file to your thumb
drive, in a folder named studio11 and a file named Lastname damped pendulum.m.
Note, you can also use the script file from last week as a starting point to save a little
time. Just be sure to save it as a new file for this week right after opening it, and pay
special attention to changing all details for this week’s script.

2. CREATE A TITLE BLOCK: In the script editor window, create a title block for your
computer simulation program. In the ME department, your title block should always
include the name of the author, the academic term, the name of the course, and a
descriptive title. You may add comments to explain the use and limitations of your
scripts. Over your career, as you develop a library of scripts, this will be an important
way for you to build upon previous knowledge. In MATLAB, the special character
% is used to indicate that any text on the current line to the right of the character
is considered a comment, and is not considered a command to MATLAB. It is good
practice to start each script with commands to clear all variables from workspace
memory, and to clear the contents of the command window.

382
% Author: R.N. Carter, Term 2155
% Example program for MECE-102
% This program is not intended to be copied electronically
% Students should manually re-type this script to help learn MATLAB
% Any text (like this) following a percent sign is a comment

clear % clear up the workspace


clc % clear command window

3. CREATE A LIST OF KNOWN INFORMATION: In the script editor window, create


a number of scalar variables that contain known information for numerical simulation.
These expressions should look similar to those shown below, but should be replaced
with numerical values appropriate for your experiment. By using the same table of
constants as your experiment, you will be able to compare your simulated oscillation
plots with your experimental measurements.
The semicolon at the end of each line inhibits MATLAB from printing intermediate
results to the screen. It is good engineering practice to include a comment on each
line, indicating the engineering units associated with each assignment statement. Note
that it is your responsibility, as the engineer, to verify that the units of every equation
and constant are correct, since the simulation tools (both Excel and MATLAB) and
the program have no concept of units associated with the mathematical expressions
and assignment statements. Note that all the items shown as “XXX” represent
ones that you need to insert the numbers that you measured from your lab
data.

% Set the known information and simulation parameters


% for the simulation
theta_0 = XXX ; % [degrees] (value initial peak theta in lab data)
t_0 = XXX ; % [s] (time of initial peak theta in lab data)
t_f = XXX ; % [s] (time of last data point in lab data)
m = XXX ; % [kg] (measured in lab)
R = XXX ; % [m] (measured in lab)
g = 9.81 ; % [m/s^2]
xi = XXX ; % [1/s] (determined from data analysis)
% Compute the natural frequency based on theory
Omega = sqrt ( g / R );

4. CREATE A LIST OF CALCULATION PARAMETERS: This week, we are using an


analytical solution for the pendulum system, so we are using MATLAB to perform a
calculation rather than a simulation like we did last week with the spring-mass system
using Euler’s method. We still need to define the time variable this week. To do this,

383
we need to define the start, end, and increment times. We have already define the
values for t0 and tf . For this calculation a time increment of 0.01 seconds will be
sufficient. Like in the prework, we will using the “linspace” function to define the time
vector and then transpose it to switch it from a row-vector to a column-vector.

% Determine Calcualtion parameters


dt = 0.01; ; % [s] time increment
nt = round((t_f-t_0) / dt) ; % [-] Use round function to ensure nt
% is an integer
t = linspace(t_0,t_f,nt); % defines a row vector for t that has nt
% values from t_0 to t_f
t = t’; % transpose t so it is a column vector

5. CREATE A LIST OF DESIRED INFORMATION: In the script editor window, create


a number of array variables that will be used to store your simulation results. We first
will compute how many array elements will be needed to store the answer for a given
simulation duration and time increment. Then, we will create an array for each set of
answers, with that many elements. It is good programming practice to initialize all of
these variables in each element of the array to a value of zero, as shown below.

% Determine how many time steps are needed


NTime = End_Time / Delta_Time ; % [-]
% Initialize the vectors for storing data
% Filling each vector with zeros is good programming practice
Time_Array = zeros ( NTime, 1 ) ; % NTime rows and 1 column
theta_Array = zeros ( NTime, 1 ) ;
E_Array = zeros ( NTime, 1 ) ;

6. CALCULATE ANGLE: We now will calculate the angle of the pendulum with respect
to time. Note, we could set up a for loop to do this and calculate a value of angle for
each time as we cycle through the loop using code something like this:

for i=1:nt
theta(nt) = theta_0*exp(-xi*t(nt))*cos(omega*(t(nt)-t_0));
end

Note that we have modified the equation slightly from that shown in Equation 11.49
by subtracting t0 from t within the cosine function. This is done to account for the
fact that the data acquisition of your experimental results does not typically start right
at a peak angle. By subtracting t0 the calculated results will align properly with the
experimental ones. This code is the typical way in which arrays are calculated in most
programming languages. Again, since MATLAB is specifically designed to work with
array information, this calculation can actually be done in one line of code:

384
theta = theta_0*exp(-xi*t).*cos(omega*(t-t_0));

This will create a ✓ vector with the same dimensions as the t vector using this equation.
Note the period right before the * symbol before the cosine function. With-
out this, the code will not run because MATLAB will assume we are trying to perform
a matrix operation (like a cross product) in the calculation. By adding the period prior
to the multiplier, we are telling MATLAB that we want it to do the calculation with
each value in the t vector. So, all that is needed to do this week’s MATLAB calculation
of ✓ is this single line of code!

7. READ YOUR EXPERIMENTAL DATA: We will use a MATLAB provided function


to read your experimental data from your data file. Use code similar to that shown
below in your script:

% Next section obtains the data from the lab


% Please include the text field ’TimeData’ in Row 1 Column A
% Please include the text field ’AngleData’ in Row 2 Column B
tdfread;

The MATLAB intrinsic function tdfread will cause the script to open a dialog window
asking the user to point to the data file that is to be opened. Verify that your file
contains the correct columnar data and is in a tab-delimited format. The command
determines the number of rows and columns in the data file and assigns each column
to a unique variable with a name corresponding to the first row text values. For
anyone with coding experience, this step may seem like a bit of magic, because one
would typically have to write many lines of code to accomplish this step in other
programming languages. Note, your can include the path and file name in the code to
have MATLAB automatically open the file without bringing up the dialog box. This
would look something like:

tdfread(’c:\temp\PendulumData.dat’);

The path and filename must be stated exactly correctly or the code will not run. If
you are having trouble getting these correct, go to the command window and type the
clear command. Then type [fn, pn] = uigetfile(’*.*’). Leave the semicolon o↵
the command line. This will bring up the file open dialog. Find your data file and
open it. The filename and pathname strings will be echoed to the workspace. You can
then copy these into your script.

8. PLOT THE COMPUTED DISPLACEMENT DATA: In the script editor window, we


will next enter commands to create a plot of ✓[deg] on the vertical axis vs. Time, t [s]
on the horizontal axis. We will present the simulation data contained in theta Array
and the experimental data contained in AngleData. The next set of commands enables

385
the grid to be displayed, and creates appropriate labels for the figure title, y axis, and
legend.

% create a single figure called "Results" with one plot in it


% Set the fonts for all labels to 18 pt and use hold on function to
% maintain this property while adding various plot elements
Results = figure
set(gca,’fontsize’,18); % sets all fonts in plot to 18 pt
hold on;
% The next two lines set the plot position in inches. These can be
% adjusted as needed by the user.
Results.Units = ’inches’;
Results.Position = [3 3 12 6];
% Create a plot with both Calculated and Experimental angle results
plot(t,theta*180/pi,TimeData,AngleData);
grid on;
xlabel(’Time [s]’);
ylabel(’Angle [deg]’);
legend(’Calculation’,’Experiment’,’Location’,’NorthEast’);
title(’Damped Pendulum Motion’);
hold off ; % It’s important to turn the hold function off or the plot
% will not update when the code is run again.

9. SAVE AND EXECUTE THE SCRIPT: Periodically save your work to your USB drive,
so that you have a convenient recovery point in the event of a significant error. After
saving your completed script, run it by clicking the green arrow with ”Run” under it in
the Editor ribbon tools. Select ”Add to Path” if you get a pop up when first running
the script.
It is highly unlikely that your script file will run properly the first time you make an
attempt. In fact, debugging your script is an essential engineering skill. You will need
to hone this skill continually throughout your academic studies and professional career.
You may expect this process to be quite frustrating. However, when you finally get
the bugs out of your script and it runs successfully, you will also experience a strong
sense of accomplishment.
One of the most important debugging skills that you can develop is an ability to
closely read and understand the error messages that are provided by your programming
system. MATLAB provides detailed error messages, but they can be quite confusing to
novice programmers. If you do not understand what an error message means, then you
may find it useful to search for help, using that precise error message as your search
string. This will often help you locate example scripts or even video examples that
may help you track down your bug.

386
DO NOT DESPAIR! It is natural to get frustrated during debugging. Try to foster
the mindset that debugging your program is analogous to figuring out a subtle puzzle
or problem solution in a video game or homework assignment. Do not try to hurry
through the process of debugging in order to just “get the script done.” If your class
mate corrects a bug in your script for you, and you do not understand what they
corrected and why it worked, then you are depriving yourself of learning the central,
most valuable, skill of this entire lesson. The debugging process is by far the most
important aspect of this portion of the weekly lesson. Please do not short circuit the
debugging process to save time. You will find that nurturing your debugging skill will
save you countless hours in the future.
After some bug tracking, you will finally get your script to run successfully. This is
excellent! Just as you were able to enter single commands interactively in the previous
Lab, you can run your entire script as easily as entering a single command! When you
execute the script, you should see a window pop-up, containing your plot, that will
look something like the one shown in Figure 11.6.

Figure 11.6: Results graph of the damped pendulum and calculation. Note the comments
in the plot illustrating how the calculation could be fine-tuned by adjusting the rod length
and damping coefficients to obtain better agreement between the two sets of data.

10. FINE-TUNE THE CALCULATION PARAMETERS: Note that the agreement be-
tween the calculated and experimental results is not perfect. The peaks for the cal-
culation are space slightly further apart than the experimental ones, and the peaks
are diminishing in magnitude over time slightly more quickly than the experimental
ones. You can fix these things by adjusting the value of the rod length (e.g.,one would
decrease R to decrease the peak spacing for the case shown in Figure 11.6) and the
value of the damping coefficient (e.g. one would decrease ⇠ to correct the behavior seen

387
in Figure 11.6). Make small adjustments in these two parameters for you script and
rerun it to optimize the values of R and ⇠.

11. OBSERVATIONS AND ANALYSIS: Write responses to the following questions in your
logbook. Be sure to include a justification for your answer by referring to the data,
plots, and derivations that are contained within your logbook. You may want to cross-
reference equations from Sections 11.1, 11.2.9 and 11.3.1 in your work.

(a) In your logbook, document your iterative problem-solving and trouble shooting
method.

(b) Briefly describe how you ultimately found the errors in your simulation script,
and resolved them.

(c) Explain not only how you found the correct results, but why you believe your
calculation results to be accurate.

(d) Compare your predictive simulation results with your experimental results from
last week. Fully explain the similarities and di↵erences between your experimen-
tal observations and your theoretical predictions.

(e) Now you can uses your code to predict future experiments! If a pendulum has a
length of 50 meters, and friction coefficient b = 0.05, and bob mass = 5 kg, predict
the motion of the pendulum. Print out your graphs and paste them in your log
book. Be sure to clearly identify the simulations conditions of these graphs so
they are not confused with your experimental and simulation comparison graphs.

12. SUBMIT YOUR WORK: Remember to remove your USB drive from the computer,
and take it with you when you leave the Studio. Save your MATLAB m-file to the
USB drive. You may want this file in the future! Please be sure to sign and date your
engineering logbook before you leave the studio and to submit your MATLAB m-file
to your individual Week 11 Dropbox on myCourses before leaving the room or within
24 hrs.

13. CONGRATULATIONS! You have just completed the Studio portion for week 11.

14. WRITE THE REPORT: Please refer to section 11.3.4 Report on details for the report
submission. Before leaving Studio, decide on a date and time to meet with your team
mates to prepare the report.

11.3.4 Report
Please use the same task distribution for writing the report that was outlined in Week
1. This week we have added a theory section, which should be completed

388
by the Team Manager. The scribe is responsible for compiling the report, however
all team members are responsible for ensuring that the report is uploaded correctly
and on time.
Prepare a report to include only the following components:

• TITLE PAGE: Include the title of your experiment, “Damped Pendulum Mo-
tion”, Team Number, date, authors, with the scribe first, the team member’s
role for the week, and a photograph of each person beginning to initiate their
trial, with a label below each photo providing team member’s name.

• PAGE 1: The heading should read Theory. In no more than one page, briefly
describe the theory related to the experiment and simulation. Include important
equations relevant to the lab. Be sure to define every variable in the equations,
and include units. The equations should be formatted correctly, with equation
numbers labeling each on the right side of the page. Format the equations in the
same structure as this book.

• PAGE 2: The heading on this page should read Experimental Set-up. Create
a diagram of the experimental set-up. We will include only the diagram and
its caption. Thus, is it important that your diagram clearly communicate the
set-up, including each key component and where measurements were taken. The
important information to communicate are the variable names, distances, axis
and datums that relate to your measurements and results. It is a good practice
to add a legend that defines any variables or components of the schematic that
are not obvious. At the bottom of the figure include a figure caption, for example
Figure 1. A brief figure caption. Refer to the text for examples.
Note: Figure captions are required for every plot and diagram in the report,
except for the title page. Figure captions are placed below the figures, and are
numbered sequentially beginning with Figure 1 for the first figure in the report.

• PAGE 3: The heading on this page should read Results. Include a table with
initial angle of displacement, damping coefficient and natural frequency values
for each team member as illustrated in Figure 11.7. You should use the values
for ⇠ and ! that you obtained by fine-tuning your MATLAB script. Be sure to
include uncertainty estimates for all results.
Remember that any measured data point or value calculated from measure data
has an uncertainty. At the top of the table, include a table caption, for example
Table 1. A brief table caption. Refer to the text for examples.
We will include only tables and plots with no accompanying text. Thus, it is
important that your tables, graphs and captions clearly communicate to the
reader what the data represents.

389
Figure 11.7: Summary results table format for week 11 lab report.

Note: Table captions are required for every table in the report, except for the
title page. Unlike figure captions, table captions are placed above the tables, and
are numbered sequentially (independent of figure caption numbering) beginning
with Table 1 for the first table in the report.

• PAGE 4: No heading is needed on this page, since it is a continuation of the


Results section. Present plots of of angular displacement as a function of time,
one plot for each team member. Format the plot according to the guidelines
shown in previous chapters. Arrange the plots so that they are easily compared on
to another. Be sure that each plot contains both the theoretical and experimental
results.

• PAGE 5: The heading on this page should read Conclusions. Here you will
state the major conclusions that can be drawn from this analysis. In other
words, you will qualitatively and quantitatively answer the questions posed by
the experiment. Consider the following guiding questions when preparing your
conclusion. Do any of your results violate Newton’s Laws or the Work Energy
Theorem, within uncertainty limits? In evaluating your estimates for angular
position, consider if there were any systematic bias present in your results. What
are the most significant contributors to uncertainty, and how would you mitigate
them? Finally, comment on whether your experimental results support the Work
Energy Theorem within reasonable uncertainty.
Your conclusion should be NO LONGER than 1/2 a page when typed in 12 pt
font.

• The final report should be collated into one document with page numbers and
a consistent formatting style for sections, subsections and captions. Before up-
loading the file, you must convert it to a pdf. Non-pdf version files may not
appear the same in di↵erent viewers. Be sure to check the pdf file to make sure
it appears as you intend.

390
11.4 Recitation
Recitation this week will focus on problem solving. Please come prepared, with your
attempts at the homework problem already in your logbooks.

391
11.5 Homework Problems
1 Using your experimental data from your pendulum, estimate the local accelera-
tion of Earth’s gravity, g. Estimate the uncertainty in this value. Now, compare
this value of g and its uncertainty with the value determined earlier in the course
with the dropping ball experiment. Which method provides a better estimate of
g? Justify your logic.

2 Using your experimental data from your pendulum, estimate the damping ratio
⇠ for your pendulum system. Estimate the uncertainty in this value.

3 Using your experimental data from your pendulum, estimate the natural fre-
quency ! for your pendulum system. Estimate the uncertainty in this value.

4 Using your experimental data from your pendulum, estimate the phase angle 0
for your pendulum system. Estimate the uncertainty in this value.

5 Using your computed values of ⇠, ! and 0 and the observed initial disturbance ✓0
predict the angular position of the pendulum bob as a function of time. Estimate
the uncertainty in your prediction.
(⇠)t
✓(t) = ✓0 e cos(!t 0) (11.54)

6 A famous pendulum was displayed in the Washington D.C. Smithsonian Institu-


tion until 1998. The pendulum had a length of R = 52[f t] and a hollow brass
bob weighing about mg ⇡ 240[lbf ]. Estimate the period, T , of oscillation of this
pendulum. How many oscillations would this pendulum undergo in a 24[hr] day?
Using resources available on-line, http://www.si.edu/Encyclopedia_SI/nmah/
pendulum.htm, explain how this pendulum was used to prove experimentally that
the Earth rotates about its axis.

392

You might also like