Sunteți pe pagina 1din 38

TABLE OF CONTENTS

Introduction..................................................................................................... 3

Theory............................................................................................................. 3

Description of apparatus................................................................................. 6

Procedure of experiments............................................................................... 6

Results, calculation and discussion.................................................................7


5.1

Lightly damped translational oscillations:.................................................7

5.2

Effect of damping.................................................................................... 10

5.3

Coupled translational and rotational oscillations results.........................11

Reference...................................................................................................... 12

Appendix....................................................................................................... 12

Abstract:
The main reason of this lab is to investigate how damping can
affect to the frequency and using log decrement to find
damping ratio, how neglecting mass of spring can affect to the
error and behaviour of a system of coupled harmonic oscillator.
From the experiments, the theory is confirmed that in 1 DOF
system there is only 1 natural frequency and in 2 DOF system,
its motion can be expressed as a 2nd order differential equation
which should have 2 natural frequencies. These 2 natural
frequencies are translational frequency and rotational
frequency, which show the behaviour of coupling.
The lab also shows the effect by varying the mass of 1 DOF
system on the natural frequency and how a change in inertia
would affect the rotational oscillations, and then follow-on
effect of the beating phenomenon.
Data analysis using Matlab-Fast Fourier Transform is used in this
lab as to illustrate how it can be used effectively to find natural
frequencies in the system. However in few cases, it is hard to
distinguish visually two frequencies on the frequency spectrum
so the pulse graph method from the displacement vs time
graph can be used to find period between each pulse then the
beating frequency.
1

1 INTRODUCTION
The main reason of this lab session is to provide some practical experience of
harmonic oscillations and more specifically of the dynamic responses of a mass
spring system that exhibits both translational and rotational modes of vibration.
The single Wilberforce pendulum, using in this experiment, is a pendulum that
couples between longitudinal and torsional oscillations resulting in complete
transfer of energy between translational and rotational harmonic motion. Two
types of harmonic motions can be initiated by displacing the brass mass, or the
pendulum bob that is equipped with a threaded crossbar extending on both sides
with nuts mounted on it so its inertia can be adjusted.
In the first part of the experiment, we only concern about translational motion,
which is one degree of freedom, to find its key parameters and study the effect
of damping. So in this part, we need to determine the vertical positions of the
masses at its equilibrium points.
In the 2nd part of the experiment, we concern both translational and rotational
motion, which is two degree of freedom, to investigate beating behaviour and
coupling between motions. So for this part, we need to determine both vertical
positions and angular positions.

2 THEORY
2.1 ONE

DEGREE OF FREEDOM

It requires only one independent coordinate to describe


2.2
TWO
the motion of the mass at many points of time. That
coordinate is the displacement of mass from its
DEGREE OF
equilibrium point. A simple oscillator is an example of
one degree of freedom system:
FREEDOM
Two degree of freedom system requires two independent
coordinates to describe its motion. The coordinates can be explained by
examining the following example:

Two coordinates are:

X1 is the displacement of mass M1 from its equilibrium position.


X2 is the displacement of mass M2 from its equilibrium position.

In our case where the pendulum couples between translational and rotational
oscillation, our two coordinates are the vertical and angular displacement.

2.3 EFFECT

OF DAMPING
Damping is produced when energy stored in the oscillation is dissipated, that
slowing/decreasing the motion/amplitude gradually to its steady state. In our
experiment, the damping effect was made by friction of air.
Critical damping cc is defined as the value of damping constant c for which the
radical becomes 0:

cc 2 k
=0
2m
m

( )

c c =2 m

k
=2 km=2 m n
m

Then we can define Damping Ratio :

c
c
=
cc 2m n

The damping ratio determines the damping effect on a system:


Critically damped ( = 1) - The amplitude of oscillation will reach zero in a
very short time.
Underdamped (0 < < 1) The amplitude of oscillation will decay slowly.
Overdamped ( > 1) There will be no oscillation.

2.4 LOGARITHMIC DECREMENT


We have following formulae:

xi
1
= ln
n
x i+ 1

( )

( 2 )2+ 2

2.5 COUPLED

TRANSLATIONAL AND ROTATIONAL OSCILLATIONS:


As above we have expression for translational oscillations natural frequency:

f n=

1
2

k
m

In rotational oscillation, we have another expression for natural frequency:

f n=

1
2

k
I

Where I = moment of inertia of mass.

2.6 MOMENT

OF INERTIA OF MASS:
The pendulum bob, used in the 3rd experiment, is equipped with a threaded
crossbar extending on both sides with nuts mounted on it so its inertia can be
adjusted. The pendulum bob rotated about z-axis. Formulae used to find inertia
in this case (axis of rotation: z-axis)

Circular hoop on top:

I z=mr 2

I z=

Solid cylinder (Pendulum bob):

m r2
2
Solid cylinder (Nuts):
2

mr mL
I y/ z=
+
4
12

Solid rod (Crossbar):

I y/ z=

mL
12

2.7 PARALLEL AXIS THEOREM:


I z= I cm + md 2
Where Icm = Inertia around z-axis of the object
through its centre of mass; d = perpendicular
distance between objects centre of mass and axis
rotation

of

2.8 BEATING

FREQUENCY
When two waveforms with different frequencies interact on each other, there will
be alternating constructive and destructive interference. So the resulting
waveform will establish its own new frequency. This can be called as beating
behaviour:
We can use following 2 DOF system
as an example:
After solving for X1(t) and X2(t), we
have:

X 1=2 A cos

( 1+ 2 )
2

] [

t cos

( 1 2 )
2

]
5

X 2=2 A sin

[(

] [

1+ 2 )
( 12 )
t sin
t
2
2

Where

( 1 + 2)
2

( 12 )
2

=Vibration frequency

=beat frequency

3 DESCRIPTION OF APPARATUS
The Wilberforce pendulum apparatus used in the
experiments is supplied by PASCO (model ME-8091). The
mass is first attached to the end of the spring, suspended
from a clamp system. Then we can displace the mass and
make it oscillate. The vertical position, velocity and
acceleration of the Wilberforce pendulum are measured
with a Motion sensor placed below the pendulum. A laser
and a laser switch measure the angular speed in the
torsional mode as the spokes of the wheel break the laser
beam. A force sensor attached to the end of the spring
measures the spring force as the pendulum oscillates. All
the data from sensors is then captured by the Data studio
software. To vary the mass, additional nuts were used with
or without the initial mass to have different sets of data.
For damping experiment, additional paper plate was
added to the bottom of the mass in the place of photogate
wheel to increase the surface area and make the damping
effect due to air resistance more effectively. For coupling
oscillations, crossbar pendulum bob was used with known distance between the
nuts and pendulums centre of mass to vary the frequency of the oscillation.

4 PROCEDURE OF EXPERIMENTS
4.1 LIGHTLY

DAMPED TRANSLATION OSCILLATIONS


The first experiment is about 1-DOF system which is measuring the vertical
position of the mass. After hanging the brass bob, displacing it vertically
downward to set the system into translational oscillation. Force sensor and
Motion sensor will then record and send the data to Data studio. To find stiffness
constant, the spring was pulled for a known length (10cm) and would increase by
10cm after each 10s and the force sensor measured the force. The mass was
varied to have different sets of data and graphs to have more accuracy in
determining spring stiffness. The natural frequency for each mass was found by
using Matlab-Fast Fourier Transform (FFT).
6

4.2 EFFECT

OF DAMPING
Attaching a paper plate to the end of the mass and it still was a 1 DOF system.
Procedure in part (a) was repeated but only with the brass bob then collecting
the data from Data Studio. Frequency of the damped system and its damping
ratio via log decrement were then found by using Matlab-FFT.

4.3 COUPLED

TRANSLATIONAL AND ROTATIONAL OSCILLATIONS:


The pendulum bob with crossbar was used in this part. The distance between the
nuts and the centre of mass was first recorded and then we can estimate inertia
from that. The bob was displaced and the system was set in motion, along with
force sensor and motion sensor, laser sensor would help to record the angular
velocity and then send data to Data Studio. By varying the distance between the
nuts and centre of mass, beating behaviour could be observed. From Matlab-FFT,
we can see how the dominant frequencies in the spectra of the recorded signals
vary with inertia. From that, we can estimate the beating frequency and the
associated pair of natural frequencies that result in this.

5 RESULTS, CALCULATION AND DISCUSSION


5.1 LIGHTLY

DAMPED TRANSLATIONAL OSCILLATIONS:

5.1.1 Determine natural frequency from Data Studio


From Matlab-FFT, we can determine the natural frequency of oscillation with
brass bob attached only (234g) that is 0.8398 Hz. Refer Appendix.

5.1.2 Determine stiffness of the spring (k) and compare with estimate
obtained using the force sensor

Weight-extension
4
3
Weight (N)

Force gauge reading vs extension

f(x) = 7.14x + 0.01

2
Force (N)

1
0
0 0.1 0.2 0.3 0.4 0.5 0.6
Extension (m)

f(x) = - 6.67x + 2.7

0
-2

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7


Extension (m)

So we have:

Spring stiffness calculated load /extension k mass =7.138 N / m


Spring stiffness calculated Force sensor k sensor =6.6726 N /m
We can say that they are quite close to each other.
7

5.1.3 Natural frequency of oscillation for each mass used in part ii


Natural frequency (for brass bob and 2 nuts) = 0.752 Hz
Natural frequency (for brass bob and 3 nuts) = 0.6738 Hz and 1.348 Hz
Natural frequency (for 2 nuts and 3 nuts) = 0.8984 Hz

5.1.4 Compare the experimentally derived frequencies with the ones


estimated theoretically
Natural Frequency (Hz)
Mass (kg)

Mass /
extension

0.2
0.234
0.2952
Calculation
Ksensor

Force
Sensor

Percentage Difference
(%)
Natural
Frequency
from Matlab

Mass /
extension

Force
Sensor

0.9508
0.9193
0.8984
-5.83
-2.33
0.8790
0.8499
0.8398
-4.67
-1.20
0.7826
0.7567
0.752
-4.07
-0.62
of Natural Frequency in each case and their difference using K mass ,

Set of data from brass bob and 3 nuts is decided not to be used as there are 2
natural frequencies, which show that it was 2-DOF system. However, in this
experiment we only concern about 1-DOF system.
To find Natural frequency (Hz) and its percentage difference, following formula is
used:

f n=

1
2

ki
for j=1,2,3
mj

5.1.5

Correct for the mass of spring and estimate the error


introduced by neglecting it
Mass of the spring = 48.5g = 0.0485kg
However, we need to consider the effective mass of the spring because not all
the whole length of the spring would contribute to the oscillation.
So mass of the spring:

M spring =

0.0485
3

We have new set of data:


Mass (g)
8

Mass (kg)

Weight
(N)

Length
(cm)

Extension
(m)

No mass +
Spring
2 Nuts + 3
Nuts+
Spring
Brass Bob
+ Spring
Brass Bob
+ 2 Nuts +
Spring
Brass Bob
+ 3 Nuts +
Spring

16.17

0.01617

0.158595

11.5

216.17

0.21617

2.120595

38.5

0.27

250.17

0.25017

2.454135

44

0.325

311.37

0.31137

3.054507

51.7

0.402

388.97

0.38897

3.815763

62.8

0.513

Weight (with spring) - extension


6
4
Weight (N)

f(x) = 7.06x + 0.19

0
0.25

0.3

0.35

0.4

0.45

0.5

0.55

Extension (m)

We have new spring stiffness constant:

Spring stiffness calculated load with springextension


k mass+ spring=7.0647 N / m

Natural Frequency (Hz)

Percentage Difference
(%)

Mass (kg)

Mass +
Spring/
extension

Force
Sensor +
spring

Natural
Frequency
from
Matlab

Mass+spring /
extension

Force
Sensor
+spring

0.216167
0.250167
0.311367

0.9099
0.8458
0.7581

0.8842
0.8220
0.7368

0.8984
0.8398
0.752

1.28
0.71
0.81

1.58
2.12
2.03

Calculation of Natural Frequency in each case and their difference using K mass+spring , Ksensor

Using k3 and mass of the spring added to the mass, natural frequencies for each
case were recalculated. Then new percentage differences were found.

f n=

1
2

ki
for j=1,2,3
mspring
mj+
3

Discussion

For Mass vs Extension:

Load
(kg)
0.2
0.234
0.295
2

Load
+spring
(kg)
0.216167
0.250167

fn (Hz)
Mass
/extension
0.9508
0.8790

0.311367

0.7826

Percentage
difference
(%)
-5.83
-4.67

fn (Hz)
Mass+Spring
/extension
0.9099
0.8458

Percentage
difference
(%)
1.28
0.71

-4.07

0.7581

0.81

In any cases, using Kmass or Kmass+spring, the percentage difference still doesnt
exceed 6% so we can say the experiment agrees with theory as experimentally
derived frequencies are all close to estimated theoretically frequencies.
For using Kmass+spring, the percentage difference is noticeably smaller than the
values from using Kmass only. We can say that as considering the mass of spring is
negligible can contribute a big error in our calculation.

For using force sensor:

Load
(kg)

Load
+ spring
(kg)
0.216167
0.250167

fn (Hz)
Force
Sensor
0.9193
0.8499

Percentage
difference
(%)
-2.33
-1.20

fn (Hz)
Force Sensor
+ Spring
0.8842
0.8220

Percentage
difference
(%)
1.58
2.12

0.2
0.234
0.295
-0.62
0.7368
2.03
2
0.311367 0.7567
To calculate natural frequency from data from force sensor, only spring stiffness
Ksensor was used. In both case, there is no percentage difference that exceed 2.5%
so again this confirms theory.
However as considering mass of spring to be not negligible, in overall the
percentage difference turned out to be bigger. This can be due to error in from
using formula of effective mass, as force sensor would have a better accuracy.

5.2 EFFECT

OF DAMPING

5.2.1 Frequency of damped system (using 234g Brass bob)


Refer to appendix for graph

f ndamped =0.8105 Hz
From above we have fn for lightly damped system:

10

f nslightly damped =0.8398 Hz

5.2.2 Damping ratio by applying the log decrement method


Refer to appendix
Damping ratio calculated with the mean of , = 0.012666
Damping ratio calculated with the maximum of n, = 0.0085716

Discussion
By applying log decrement method on the data we got from the 1st experiment for the brass
bob only, we can find damping ratio for the slightly damped system:

Damping ratio calculated with the mean of , = 0.0024463


Damping ratio calculated with the maximum of n, = 0.0022418
From above, it is believed that the plate contributed to the damping effect that
leads to the higher in damping ratio (0.012666 > 0.0024463). This also confirms
theory: as higher the damping ratio, frequency would get lower.

Percentage difference of dampingratio=

0.0126660.0024463
100
0.012666

Percentage difference of dampingratio=80.7


Percentage difference of frequency=

0.83980.8105
100=3.48
0.8398

However apart from the big difference percentage in damping ratio (80.7%), the
difference between two frequencies as shown is so small (3.48%) so we can
conclude that:
It is reasonable to consider damping in the slightly damped system is negligible
as it would not result in a big error in calculation but this cannot be applied on
the damped system as the percentage difference of damping ratio between them
are too big.

11

5.3 COUPLED

TRANSLATIONAL AND ROTATIONAL OSCILLATIONS

RESULTS
5.3.1 Result and calculation of inertia
Dimensions
Components
Cylinder Bob
Cylinder
Mount
Cylindrical
Masses
Photogate
Wheel
Crossbar

Mass
(kg)
0.234
0.011

Radius
(m)
0.015
0.0045

Length
(m)
0.037
0.019

Distance from centre (m)


Inner
Centre
Outer
0
0
0
0
0
0

0.005
5

0.0045

0.01

0.02675

0.03500

0.0458
75

0.007
5
0.006

0.05

0.01

Mass Moment of Inertia (by axis Z)

Cylinder Bob

Mass Moment of Inertia


(kg/m2)
2.632510-5

Cylinder Mount

1.1137510-7

Cylindrical Mass
Photogate Wheel
Crossbar

7.367710-8
1.87510-5
0.510-7

Components

Mass Moment of Inertia with Parallel Axis Theorem for Cylindrical Mass
Cylindrical Mass
Mass Moment of Inertia
(kg/m2)

Inner
4.009310-6

Centre
6.8112105

Outer
1.164910-5

Total Mass Moment of Inertia


Cylindrical Mass
Mass Moment of Inertia
(kg/m2)

12

Inner
5.820510-5

Centre
6.3809105

Outer
7.348310-5

Estimation of Natural Translational, Rotational and Beating Frequencies


Position of
Cylindrical
Mass
Inner
Centre
Outer

Translational
Frequencies, F1 (Hz)
0.8008
0.8008
0.8008

Rotational
Frequencies, F2
(Hz)
0.7812
0.7496045
0.694225982

Beating
Frequencies (Hz)
0.0196
0.0511955
0.106574018

Discussion:
Referring to appendix for frequency spectrum of nuts at centre and outer
position, only one frequency can be observed. So to acquire beating frequency,
period between each peak of beating are marked (as in appendix). Mean of
period are later found and beating frequency is:
Then 2nd frequency can be found by:

1
average period

f 1beating frequency

Behaviour of 2 DOF system can be easier to observe when the nuts at nearest to
the centre of pendulum and as it goes toward the free end, it would be harder to
observe.
From above, we can see as the cylinder masses (nuts) going toward the free end,
the mass moment of inertia of the system increases. That would result in a lower
rotational frequency (conservation of angular momentum). However there is no
change in translational frequency which support the theory that vertical
translational oscillation is independent on inertia of system.
For the nuts at inner position (closest to the centre of pendulum), we have low
inertia resulting in higher rotational frequency and no change in translational
frequency. The associated frequency spectrum illustrates 2 distinct peaks, with 1
being more dominant than the other. So the beating frequency in this case can
be easily observed.
For the nuts at centre and outer position (further from the centre of pendulum),
we have higher inertia resulting in low rotational frequency. So the associated
frequency spectrum can not illustrate 2 distinct peaks where f 1 is so close to f2.
So a pulse count is used referring to the displacement vs time of each case.

13

6 CONCLUSION
From the experiments, the theory is confirmed that the natural translation
frequency of the system is dependent only on stiffness (k) and the mass (m) and
rotational translation frequency is dependent on the inertia (I) and mass (m).
Also, the frequency of oscillation decreases as the damping effect increases.
From the damping coefficient, one can decide if damping should be neglected.
As the moment of inertia of the system increases, the rotation frequency
decreases. Also, the phenomenon of beating is able to observed when their two
frequencies are very close to each other, causing the beating period to be high
enough to be noticeable.

7 REFERENCE
http://hyperphysics.phy-astr.gsu.edu/hbase/mi.html
Common Moments of inertia of
http://content.yudu.com/Library/A1zyct/PascoPhysicsampEngin/resources/151.html
PASCOs introduction about Wilberforce pendulum
http://hyperphysics.phy-astr.gsu.edu/hbase/sound/beat.html
Introduction of beating
Dr.Balabani s lecture notes

14

8 APPENDIX
8.1 LIGHTLY

DAMPED TRANSLATIONAL OSCILLATIONS

Natural frequency
(for the brass bob
only, 234g) is
0.8398 Hz

Different masses were used and each of their mass was measured as below:

Brass Bob: 234g


2 Nuts: 61.2g
3 Nuts: 138.8g
Mass

Mass (kg)

Weight (N)

Length

Extension
15

No mass
2 Nuts + 3
Nuts
Brass Bob
Brass Bob + 2
Nuts
Brass Bob + 3
Nuts

(g)
0

(cm)
11.5

(m)
0

200
234

0.2
0.234

1.962
2.29554

38.5
44

0.27
0.325

295.2

0.2952

2.895912

51.7

0.402

372.8

0.3728

3.657168

62.8

0.513

Extension after each 10s (m)

Average force at each 10s section


(N)

0.1

0.2

1.415

0.3

0.713

0.4

0.011

0.5

-0.614

Natural frequency of oscillation for each mass used in part ii


For brass bob and 2 nuts (295.2g):

16

Natural frequency
(for brass bob and 2
nuts) = 0.752 Hz

For brass bob and 3 nuts (372.8g):

17

18

Natural frequency
(for brass bob and 3
nuts) = 0.6738 Hz
and 1.348 Hz

For 2 nuts and 3 nuts (200g):

19

20

Natural frequency
(for 2 nuts and 3
nuts) =
0.8984 Hz

%
%Ex1A
%

clear
clc
Matrix1A=dlmread('/Users/Nguyen/Documents/MATLAB/DC1A/DynamicsLabDC1
Group7/1aPosition.txt','\t',2,0);
%creatingamatrixfromdata
t=transpose(Matrix1A(:,1));
x=transpose(Matrix1A(:,2));
fs=10;
L=length(t);
x=xmean(x);

21

%Plotthegraph
figure(1),plot(t,x,'r');
figure(1),title('Displacmentvstime(ex1A)');
figure(1),ylabel('Displacement(m)');
figure(1),xlabel('Time(s)');

%CalculateFFT
NFFT=2^nextpow2(L);
X1=fft(x,NFFT)/L;
X1=2*abs(X1(1:NFFT/2+1));

%generatefrequencyaxis;
f=fs/2*linspace(0,1,NFFT/2+1);

%showthisgraphically
figure(2),plot(f,X1,'b');
figure(2),title('Frequencyspectrum');
figure(2),xlabel('Frequency[Hz]');
figure(2),ylabel('x(f)');

%
%Ex1C(brass+2)
%

clear
clc
Matrix1C=dlmread('/Users/Nguyen/Documents/MATLAB/DC1A/DynamicsLabDC1
Group7/1cbrass+2Position.txt','\t',2,0);
%creatingamatrixfromdata
t=transpose(Matrix1C(:,1));
x=transpose(Matrix1C(:,2));
fs=10;

L=length(t);
x=xmean(x);

%Plotthegraph
figure(1),plot(t,x,'r');
figure(1),title('Displacmentvstime(ex1CBrass+2Nuts)');
figure(1),ylabel('Displacement(m)');
figure(1),xlabel('Time(s)');

%CalculateFFT
NFFT=2^nextpow2(L);
X1=fft(x,NFFT)/L;
X1=2*abs(X1(1:NFFT/2+1));

%generatefrequencyaxis;
f=fs/2*linspace(0,1,NFFT/2+1);

%showthisgraphically
figure(2),plot(f,X1,'b');
figure(2),title('Frequencyspectrum');
figure(2),xlabel('Frequency[Hz]');
figure(2),ylabel('x(f)');

22


%
%Ex1C(Brass+3Nuts)
%

clear
clc
Matrix1C=dlmread('/Users/Nguyen/Documents/MATLAB/DC1A/DynamicsLabDC1
Group7/1cbrass+3Position.txt','\t',2,0);
%creatingamatrixfromdata
t=transpose(Matrix1C(:,1));
x=transpose(Matrix1C(:,2));
fs=10;

L=length(t);
x=xmean(x);

%Plotthegraph
figure(1),plot(t,x,'r');
figure(1),title('Displacmentvstime(ex1CBrass+3Nuts)');
figure(1),ylabel('Displacement(m)');
figure(1),xlabel('Time(s)');

%CalculateFFT
NFFT=2^nextpow2(L);
X1=fft(x,NFFT)/L;
X1=2*abs(X1(1:NFFT/2+1));

%generatefrequencyaxis;
f=fs/2*linspace(0,1,NFFT/2+1);

%showthisgraphically
figure(2),plot(f,X1,'b');
figure(2),title('Frequencyspectrum');
figure(2),xlabel('Frequency[Hz]');
figure(2),ylabel('x(f)');

%
%Ex1C(2+3)
%

clear
clc
Matrix1C=dlmread('/Users/Nguyen/Documents/MATLAB/DC1A/DynamicsLabDC1
Group7/1c+2+3Position.txt','\t',2,0);
%creatingamatrixfromdata
t=transpose(Matrix1C(:,1));
x=transpose(Matrix1C(:,2));
fs=10;

L=length(t);
x=xmean(x);

%Plotthegraph

23

figure(1),plot(t,x,'r');
figure(1),title('Displacmentvstime(ex1C2+3Nuts)');
figure(1),ylabel('Displacement(m)');
figure(1),xlabel('Time(s)');

%CalculateFFT
NFFT=2^nextpow2(L);
X1=fft(x,NFFT)/L;
X1=2*abs(X1(1:NFFT/2+1));

%generatefrequencyaxis;
f=fs/2*linspace(0,1,NFFT/2+1);

%showthisgraphically
figure(2),plot(f,X1,'b');
figure(2),title('Frequencyspectrum');
figure(2),xlabel('Frequency[Hz]');
figure(2),ylabel('x(f)');

24

8.2 EFFECT
8.2.1

OF DAMPING
Damped system

25

f ndamped =0.8105 Hz
Damping ratio by applying the log decrement method

Damping ratio calculated with the mean of , = 0.012666


Damping ratio calculated with the maximum of n, = 0.0085716
8.2.1

26

Lighltly damped system

%
%Ex2%
%
clear
clc

Matrix2=dlmread('/Users/Nguyen/Documents/MATLAB/DC1A/DynamicsLabDC1
Group7/2Position.txt','\t',2,0);
%creatingamatrixfromdata
t2=transpose(Matrix2(:,1));
x2=transpose(Matrix2(:,2));
Fs=10;%Thesamplingrateis10hz
L2=length(t2);
x2=x2mean(x2);

%Plotthegraph
figure(1),plot(t2,x2,'r');
figure(1),title('Displacmentvstime(ex2)')
figure(1),ylabel('Displacement[m]');
figure(1),xlabel('Time[s]');

%CalculateFFT
NFFT2=2^nextpow2(L2);
X2=fft(x2,NFFT2)/L2;
X2=2*abs(X2(1:NFFT2/2+1));

27

%generatefrequencyaxis;
f2=Fs/2*linspace(0,1,NFFT2/2+1);

%Displayingtheresultsgraphically
figure(2),plot(f2,X2,'b');
figure(2),title('FrequencySpectrum');
figure(2),xlabel('Frequency[Hz]');
figure(2),ylabel('X(f)');

%
%Calculatingdampingratio
%

[pks,locs]=findpeaks(x2);%locatesthepeaksandtheirlocations
num_rows=size(pks,2);%Thisfunctionfindsthetotalnumberofmaxium
located
limit=num_rows1;%Thisfunctionsetsthelimitfortheloop

forn=1:(limit)
%CalculatingLogarithimDecrement
step1=1/n;%1/n

step2=pks(1)/pks(n+1);%x1/x(1+n)

delta(n)=step1*log(step2);%(1/n)log(x1/x(1+n)
end

%CalculatingdampingratiousingLogarithimDecrementratiomean
mean_delta=mean(delta);%CalculatingthemeanofLogarithimDecrement
step4=(2*3.14)^2;%2pi^2
step5=mean_delta^2;%LogarithimDecrement^2
step6=step4+step5;%2pi^2+LogarithimDecrement^2
step7=sqrt(step6);%Squarerootof2pi^2+LogarithimDecrement^2
Damp_ratio_using_mean_delta=mean_delta/step7;%LogarithimDecrement/
(Squarerootof2pi^2+LogarithimDecrement^2)

%CalculatingdampingratiousingLogarithimDecrementatlastposition
last_delta_pos=size(delta,2);%Thisfunctioncalculatesmaxiumentries
ofLogarithimDecrement
step4_1=(2*3.14)^2;%2pi^2
step5_1=delta(last_delta_pos)^2;%LogarithimDecrement^2
step6_1=step4_1+step5_1;%2pi^2+LogarithimDecrement^2
step7_1=sqrt(step6_1);%Squarerootof2pi^2+LogarithimDecrement^2
Damp_ratio=delta(last_delta_pos)/step7_1;%LogarithimDecrement/
(Squarerootof2pi^2+LogarithimDecrement^2)

%Showthevalues
figure(3),text(0.1,0.85,'Exercise2');
figure(3),text(0.1,0.80,['DampingratiousingmeanofLogarithimDecrement
ratio'num2str(Damp_ratio_using_mean_delta)]);
figure(3),text(0.1,0.75,['Dampingratio'num2str(Damp_ratio)]);

28

%
%Ex2(lightlydamped)%
%
clear
clc

Matrix2=dlmread('/Users/Nguyen/Documents/MATLAB/DC1A/DynamicsLabDC1
Group7/1aPosition.txt','\t',2,0);
%creatingamatrixfromdata
t2=transpose(Matrix2(:,1));
x2=transpose(Matrix2(:,2));
Fs=10;%Thesamplingrateis10hz
L2=length(t2);
x2=x2mean(x2);

%Plotthegraph
figure(1),plot(t2,x2,'r');
figure(1),title('Displacmentvstime(ex2lightlydamped)')
figure(1),ylabel('Displacement[m]');
figure(1),xlabel('Time[s]');

%CalculateFFT
NFFT2=2^nextpow2(L2);
X2=fft(x2,NFFT2)/L2;
X2=2*abs(X2(1:NFFT2/2+1));

%generatefrequencyaxis;
f2=Fs/2*linspace(0,1,NFFT2/2+1);

%Displayingtheresultsgraphically
figure(2),plot(f2,X2,'b');
figure(2),title('FrequencySpectrum');
figure(2),xlabel('Frequency[Hz]');
figure(2),ylabel('X(f)');

%
%Calculatingdampingratio
%

[pks,locs]=findpeaks(x2);%locatesthepeaksandtheirlocations
num_rows=size(pks,2);%Thisfunctionfindsthetotalnumberofmaxium
located
limit=num_rows1;%Thisfunctionsetsthelimitfortheloop

forn=1:(limit)
%CalculatingLogarithimDecrement
step1=1/n;%1/n

step2=pks(1)/pks(n+1);%x1/x(1+n)

delta(n)=step1*log(step2);%(1/n)log(x1/x(1+n)
end

29

%CalculatingdampingratiousingLogarithimDecrementratiomean
mean_delta=mean(delta);%CalculatingthemeanofLogarithimDecrement
step4=(2*3.14)^2;%2pi^2
step5=mean_delta^2;%LogarithimDecrement^2
step6=step4+step5;%2pi^2+LogarithimDecrement^2
step7=sqrt(step6);%Squarerootof2pi^2+LogarithimDecrement^2
Damp_ratio_using_mean_delta=mean_delta/step7;%LogarithimDecrement/
(Squarerootof2pi^2+LogarithimDecrement^2)

%CalculatingdampingratiousingLogarithimDecrementatlastposition
last_delta_pos=size(delta,2);%Thisfunctioncalculatesmaxiumentries
ofLogarithimDecrement
step4_1=(2*3.14)^2;%2pi^2
step5_1=delta(last_delta_pos)^2;%LogarithimDecrement^2
step6_1=step4_1+step5_1;%2pi^2+LogarithimDecrement^2
step7_1=sqrt(step6_1);%Squarerootof2pi^2+LogarithimDecrement^2
Damp_ratio=delta(last_delta_pos)/step7_1;%LogarithimDecrement/
(Squarerootof2pi^2+LogarithimDecrement^2)

%Showthevalues
figure(3),text(0.1,0.85,'Exercise2lightlydamped');
figure(3),text(0.1,0.80,['DampingratiousingmeanofLogarithimDecrement
ratio'num2str(Damp_ratio_using_mean_delta)]);
figure(3),text(0.1,0.75,['Dampingratio'num2str(Damp_ratio)]);

30

8.3 COUPLED

TRANSLATIONAL AND ROTATIONAL OSCILLATIONS

Inner Position:

31

Centre position:

32

33

Outer Position

34

%
%Ex3(innerdisplacement)
%

clear
clc
Matrix3b=dlmread('/Users/Nguyen/Documents/MATLAB/DC1A/DynamicsLabDC1
Group7/3bInnerPosition.txt','\t',2,0);
%creatingamatrixfromdata
t=transpose(Matrix3b(:,1));
x=transpose(Matrix3b(:,2));
fs=10;

L=length(t);
x=xmean(x);

%Plotthegraph
figure(1),plot(t,x,'r');
figure(1),title('Displacmentvstime(ex3Binner)');
figure(1),ylabel('Displacement(m)');
figure(1),xlabel('Time(s)');

%CalculateFFT
NFFT=2^nextpow2(L);
X1=fft(x,NFFT)/L;
X1=2*abs(X1(1:NFFT/2+1));

%generatefrequencyaxis;
f=fs/2*linspace(0,1,NFFT/2+1);

%showthisgraphically

35

figure(2),plot(f,X1,'b');
figure(2),title('Frequencyspectrum');
figure(2),xlabel('Frequency[Hz]');
figure(2),ylabel('x(f)');

%
%Ex3(innerangularvelocity)
%

clear
clc
Matrix3b=dlmread('/Users/Nguyen/Documents/MATLAB/DC1A/DynamicsLabDC1
Group7/3binnerPeriod.txt','\t',2,0);
%creatingamatrixfromdata
t=transpose(Matrix3b(:,1));
p=transpose(Matrix3b(:,2));
fs=10;

num=size(p,2);

forn=1:(num)
w(n)=2*3.14/p(n);
end

L=length(t);

%Plotthegraph
figure(1),plot(t,w,'g');
figure(1),title('Angularvelocityvstime(ex3Binner)');
figure(1),ylabel('Angularvelocity(rad/s)');
figure(1),xlabel('Time(s)');

%
%Ex3(centredisplacement)
%

clear
clc
Matrix3b=dlmread('/Users/Nguyen/Documents/MATLAB/DC1A/DynamicsLabDC1
Group7/3bCentrePosition.txt','\t',2,0);
%creatingamatrixfromdata
t=transpose(Matrix3b(:,1));
x=transpose(Matrix3b(:,2));
fs=10;

L=length(t);
x=xmean(x);

%Plotthegraph
figure(1),plot(t,x,'r');
figure(1),title('Displacmentvstime(ex3Bcentre)');
figure(1),ylabel('Displacement(m)');
figure(1),xlabel('Time(s)');

%CalculateFFT
NFFT=2^nextpow2(L);
X1=fft(x,NFFT)/L;

36

X1=2*abs(X1(1:NFFT/2+1));

%generatefrequencyaxis;
f=fs/2*linspace(0,1,NFFT/2+1);

%showthisgraphically
figure(2),plot(f,X1,'b');
figure(2),title('Frequencyspectrum');
figure(2),xlabel('Frequency[Hz]');
figure(2),ylabel('x(f)');

%
%Ex3(centreangularvelocity)
%

clear
clc
Matrix3b=dlmread('/Users/Nguyen/Documents/MATLAB/DC1A/DynamicsLabDC1
Group7/3bcentrePeriod.txt','\t',2,0);
%creatingamatrixfromdata
t=transpose(Matrix3b(:,1));
p=transpose(Matrix3b(:,2));
fs=10;

num=size(p,2);

forn=1:(num)
w(n)=2*3.14/p(n);
end

L=length(t);

%Plotthegraph
figure(1),plot(t,w,'g');
figure(1),title('Angularvelocityvstime(ex3Bcentre)');
figure(1),ylabel('Angularvelocity(rad/s)');
figure(1),xlabel('Time(s)');

%
%Ex3(outerdisplacement)
%

clear
clc
Matrix3b=dlmread('/Users/Nguyen/Documents/MATLAB/DC1A/DynamicsLabDC1
Group7/3bouterPosition.txt','\t',2,0);
%creatingamatrixfromdata
t=transpose(Matrix3b(:,1));
x=transpose(Matrix3b(:,2));
fs=10;

L=length(t);
x=xmean(x);

%Plotthegraph

37

figure(1),plot(t,x,'r');
figure(1),title('Displacmentvstime(ex3Bouter)');
figure(1),ylabel('Displacement(m)');
figure(1),xlabel('Time(s)');

%CalculateFFT
NFFT=2^nextpow2(L);
X1=fft(x,NFFT)/L;
X1=2*abs(X1(1:NFFT/2+1));

%generatefrequencyaxis;
f=fs/2*linspace(0,1,NFFT/2+1);

%showthisgraphically
figure(2),plot(f,X1,'b');
figure(2),title('Frequencyspectrum');
figure(2),xlabel('Frequency[Hz]');
figure(2),ylabel('x(f)');

%
%Ex3(outerangularvelocity)
%

clear
clc
Matrix3b=dlmread('/Users/Nguyen/Documents/MATLAB/DC1A/DynamicsLabDC1
Group7/3bouterPeriod.txt','\t',2,0);
%creatingamatrixfromdata
t=transpose(Matrix3b(:,1));
p=transpose(Matrix3b(:,2));
fs=10;

num=size(p,2);

forn=1:(num)
w(n)=2*3.14/p(n);
end

L=length(t);

%Plotthegraph
figure(1),plot(t,w,'g');
figure(1),title('Angularvelocityvstime(ex3Bouter)');
figure(1),ylabel('Angularvelocity(rad/s)');
figure(1),xlabel('Time(s)');

38

S-ar putea să vă placă și