This Study Resource Was: Lab 4: Sinusoidal Functions and Simple Harmonic Motion

You might also like

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

Lab 4: Sinusoidal Functions and Simple Harmonic Motion

Many physical processes and reactions can be modeled using sinusoidal functions or by
combining sinusoidal and exponential functions. In this lab, simple harmonic motion will be
investigated.

A. Sinusoidal Functions
A sinusoidal function is a periodic function that oscillates continually at some frequency.
Some equations describing a sinusoidal function and useful relationships are:

m
er as
co
eH w
o.
rs e
ou urc
A = Amplitude (units depend on application)
f = Frequency (Hz)
ω = Angular frequency (rad/s)
o

θ = Phase shift (rad)


aC s

T = Period or time for one cycle (s)


v i y re

A sinusoidal function with a frequency of 10 Hz would complete 10 cycles or periods every


second.
ed d
ar stu

Consider the following two sinusoidal functions:


sh is
Th

1. Answer each of the following questions and be sure to include units in your answer.

 What is the period of y1? Answer: 0.001 seconds.

 What is the period of y2? Answer: π/3 seconds.

 How much time does it take for y1 to complete 3 cycles? Answer: It takes 0.003
seconds for y1 to complete 3 cycles.

 How much time does it take for y2 to complete 3 cycles? Answer: It takes π seconds
for y2 to complete 3 cycles.

This study source was downloaded by 100000821685832 from CourseHero.com on 06-13-2021 19:30:13 GMT -05:00

https://www.coursehero.com/file/80672399/Lab-4-Answersodt/
1. Using the subplot command, plot exactly three cycles of y1 and y2 in separate sub-
windows of the same plot window with y1 on the top and y2 on the bottom. Be sure to
label and title each graph appropriately. Then paste your MATLAB commands and graph
in the space below.

MATLAB COMMANDS:

%% Lab 4: Sinusoidal Functions and Simple Motion

% A-2. Sunusoidal Functions

t_1 = 0:0.00001:0.003;
t_2 = 0:0.05:pi;
y_1 = 5*sin(2*pi*1000*t_1);
y_2 = 3*cos(6*t_2);

subplot(2,1,1); plot(t_1,y_1); xlabel('Time(s)'); ylabel('Amplitude');


title('5sin(2000*pi*t)')

m
er as
subplot(2,1,2); plot(t_2,y_2); xlabel('Time(s)'); ylabel('Amplitude');
title('3cos(6t)')

co
eH w
GRAPH:

o.
rs e
ou urc
o
aC s
v i y re
ed d
ar stu
sh is
Th

This study source was downloaded by 100000821685832 from CourseHero.com on 06-13-2021 19:30:13 GMT -05:00

https://www.coursehero.com/file/80672399/Lab-4-Answersodt/
A. Modeling Simple Harmonic Motion

Sinusoids are used to model simple harmonic motion as illustrated in the figure below that
shows a mass attached to a spring. If we assume no loss of energy, the displacement of the
mass looks like a cosine wave. In this lab, we will assume the oscillations are undamped.

m
er as
co
eH w
o.
rs e
ou urc
Assuming simple harmonic motion, the displacement of the mass is given by:
o
aC s
v i y re

A = Initial Displacement of Mass (how much spring is compressed initially)


K = Spring Constant (N/m)
ed d

M = Mass of suspended mass and spring (kg)


ar stu

The velocity of the mass is the derivative of displacement with respect to time:
sh is
Th

The acceleration of the mass is the derivative of velocity with respect to time:

The spring constant is a measure of the resistance of the spring to being compressed or
stretched. According to Hooke’s Law, the force necessary to compress or stretch a spring by

This study source was downloaded by 100000821685832 from CourseHero.com on 06-13-2021 19:30:13 GMT -05:00

https://www.coursehero.com/file/80672399/Lab-4-Answersodt/
an amount, x, is F = Kx. So, a spring constant of 200 N/m simply means that it would take a
force of 2N to stretch (or compress) the spring by 0.01m and it would take a force of 4N to
stretch (or compress) the spring by 0.02m.

1. Open a script file by clicking on New Script. On the first line of the script, type the
following: % Lab 4: Simple Harmonic Motion. Remember starting a line with a % turns
it into a comment line – not something that executes. On the second line of the script file,
put a comment line (start with %) with your name, your recitation section, and today’s
date. Then save your script file as Lab4_yourlastname.
Note: filenames follow the exact same rules as variable names in MATLAB – they
must start with a letter which can be followed by any combination of letters, numbers,
and underscores. You cannot leave spaces in filenames or insert any other type of
characters.

Put all of the MATLAB commands that you use to complete the rest of this lab in your
script file.

m
er as
2. Assume the spring constant, K, is 200 N/m, the combined mass of the spring and
suspended mass, M, is 0.2 kg and the spring is initially compressed by 3cm then released.

co
eH w
Calculate the frequency (in Hz) and the period of the oscillations.

o.
Frequency = 5 Hz rs e
ou urc
Period = 0.2 seconds

3. Use the subplot command to plot approximately four cycles of the displacement, velocity,
o

and acceleration of the mass. Displacement should be the top plot, velocity should be the
aC s

middle plot, and acceleration should be the bottom plot. Use a time increment of 0.001
v i y re

seconds. Label and title your graph appropriately then paste the graph in the space below.

MATLAB commands:
ed d

%% Lab 4: Sinusoidal Functions and Simple Motion


ar stu

% B-3. Modeling Simple Harmonic Motion

t = 0:0.001:1;
sh is

p = 3.*cos(sqrt(200/0.2).*t); % displacement equation


v = -3*sqrt(200/0.2).*sin(sqrt(200/0.2).*t); % velocity equation
Th

a = -3*(200/0.2).*cos(sqrt(200*0.2).*t); % acceleration equation

subplot(3,1,1); plot(t,p); xlabel('Time(s)'); ylabel('Displacement(cm)');


title('Displacement vs Time')
subplot(3,1,2); plot(t,v); xlabel('Time(s)'); ylabel('Velocity(cm/s)');
title('Velocity vs Time')
subplot(3,1,3); plot(t,a); xlabel('Time(s)');
ylabel('Acceleration(cm/s^2)'); title('Acceleration vs Time')

figure

% B-10. Modeling Simple Harmonic Motion

M = 0.2; % original mass


K = 200; % original spring constant

This study source was downloaded by 100000821685832 from CourseHero.com on 06-13-2021 19:30:13 GMT -05:00

https://www.coursehero.com/file/80672399/Lab-4-Answersodt/
m = 0.8; % new mass
k = 800; % new spring constant

p1 = 3.*cos(sqrt(k/M).*t); % quadrupling the spring constant


p2 = 3.*cos(sqrt(K/m).*t); % quadrupling the mass

subplot(3,1,1); plot(t,p); xlabel('Time(s)'); ylabel('Displacement(cm)');


title('Displacement vs Time'); legend('Original')
subplot(3,1,2); plot(t,p1); xlabel('Time(s)'); ylabel('Displacement(cm)');
title('Displacement vs Time'); legend('K = 800 N/m')
subplot(3,1,3); plot(t,p2); xlabel('Time(s)'); ylabel('Displacement(cm)');
title('Displacement vs Time'); legend('m = 0.8 kg')

GRAPH:

m
er as
co
eH w
o.
rs e
ou urc
o
aC s
v i y re
ed d
ar stu
sh is

4. Fill in the table below using your graph and the data cursor tool.
Th

Note: If the acceleration or the velocity is changing from positive to negative or from
negative to positive on either side of the data point you are trying to locate on the graph
then just enter a value of 0 in the table.

Position of Mass Velocity (cm/s) Acceleration (cm/s2)


0 cm with mass moving down -94.66 -2845
0 cm with mass moving up 94.87 -1612
+ 3 cm (spring maximally compressed) 0 -756.9
3 cm (spring maximally stretched) 0 1136

This study source was downloaded by 100000821685832 from CourseHero.com on 06-13-2021 19:30:13 GMT -05:00

https://www.coursehero.com/file/80672399/Lab-4-Answersodt/
+2 cm with mass moving down -63.11 -434

5. Use your graph to determine how far the mass has traveled in 0.65 seconds. Hint: in one
complete cycle, the mass travels 12 cm (i.e., from + 3 cm to – 3 cm and back to + 3
cm).

Answer: In 0.65 seconds the mass has traveled 37.75 cm.

6. Using your values from the previous table, calculate the kinetic energy and potential
energy of the mass at equilibrium and when the spring is maximally
stretched/compressed:

m
er as
co
eH w
Position of Mass Kinetic Energy Potential Energy Total Energy

o.
rs e (J) (J) (J)
ou urc
0 cm (equilibrium position) 0.09 0 0.09
+ 3 cm (spring maximally 0 0.09 0.09
compressed)
o

+ 2 cm -0.0398 0.04 0.0002


aC s
v i y re

7. Using your graphs and calculations, describe in words what is happening to the mass in
terms of velocity, acceleration, kinetic energy, and potential energy as it is passing
ed d

through the equilibrium point (displacement of 0 cm).


ar stu

Answer: As the mass approaches the equilibrium, the kinetic energy and acceleration
increases, but as it moves away from the equilibrium, the kinetic energy drops, the
potential energy increases, and the acceleration also increases.
sh is
Th

8. Using your graphs and calculations, describe in words what is happening to the mass in
terms of velocity, acceleration, kinetic energy, and potential energy when the spring is
maximally compressed.

Answer: When the spring is maximally compressed, the mass has a high level of potential
energy and acceleration, but no kinetic energy and no velocity.

9. In your script file, type the command: figure after your current sent of MATLAB
commands. This will create a new figure window so your old plot doesn’t go away.

10. Use the subplot command to subdivide the figure into 3 sub-windows then do the
following:

This study source was downloaded by 100000821685832 from CourseHero.com on 06-13-2021 19:30:13 GMT -05:00

https://www.coursehero.com/file/80672399/Lab-4-Answersodt/
 In the top plot, plot the displacement for a spring constant, K, of 200 N/m, a total
mass, M, of 0.2 kg, and an initial compression of 3 cm (i.e., same thing you already
plotted once before).
 In the middle plot, using exactly the same time range as your first plot, plot the
displacement for a spring constant, K, of 800 N/m, a total mass, M, of 0.2 Kg, and an
initial compression of 3 cm.
 In the bottom plot, using exactly the same time range as your first plot, plot the
displacement for a spring constant, K of 200 N/m, a total mass, M, of 0.8 kg, and an
initial compression of 3 cm.
 Paste your plot in the space below and if you haven’t already done so, put your
MATLAB commands in the script file.

MATLAB commands:

%% Lab 4: Sinusoidal Functions and Simple Motion

m
% B-10. Modeling Simple Harmonic Motion

er as
co
M = 0.2; % original mass

eH w
K = 200; % original spring constant
m = 0.8; % new mass

o.
k = 800; % new spring constant
rs e
p1 = 3.*cos(sqrt(k/M).*t); % quadrupling the spring constant
ou urc
p2 = 3.*cos(sqrt(K/m).*t); % quadrupling the mass

subplot(3,1,1); plot(t,p); xlabel('Time(s)'); ylabel('Displacement(cm)');


o

title('Displacement vs Time'); legend('Original')


subplot(3,1,2); plot(t,p1); xlabel('Time(s)'); ylabel('Displacement(cm)');
aC s

title('Displacement vs Time'); legend('K = 800 N/m')


v i y re

subplot(3,1,3); plot(t,p2); xlabel('Time(s)'); ylabel('Displacement(cm)');


title('Displacement vs Time'); legend('m = 0.8 kg')

GRAPH:
ed d
ar stu
sh is
Th

This study source was downloaded by 100000821685832 from CourseHero.com on 06-13-2021 19:30:13 GMT -05:00

https://www.coursehero.com/file/80672399/Lab-4-Answersodt/
1. How does quadrupling the spring constant (much stiffer spring) effect the frequency of
the oscillations? Be specific.

Answer: It dramatically increases the frequency. It took the weight 0.2 seconds to fall
down and bounce back up with the spring constant of 200, but with the constant of 800,
one cycle, or fall and bounce back up only took 0.1 second.

2. How does quadrupling the mass effect the frequency of the oscillations? Be specific.

Answer: Quadrupling the mass slowed the frequency down. With a mass of 0.2, it took
0.2 seconds to complete one cycle, but with the 0.8 mass, it took the weight 0.4 seconds
to complete a full cycle.

m
er as
co
eH w
o.
rs e
ou urc
o
aC s
v i y re
ed d
ar stu
sh is
Th

This study source was downloaded by 100000821685832 from CourseHero.com on 06-13-2021 19:30:13 GMT -05:00

https://www.coursehero.com/file/80672399/Lab-4-Answersodt/
Powered by TCPDF (www.tcpdf.org)

You might also like