You are on page 1of 25

School of Engineering and Information Technology

ASSESSMENT COVER SHEET


Student Name

Mark Cruickshank

Student ID

S232953

Assessment Title

Lab2 Three degrees of freedom systems

Unit Number and Title

ENG432 Dynamics of Engineering Systems

Lecturer/Tutor

John Motagner

Date Submitted

10/5/2015

Date Received
Office use only
KEEP A COPY
Please be sure to make a copy of your work. If you have submitted assessment work electronically make
sure you have a backup copy.
PLAGIARISM
Plagiarism is the presentation of the work of another without acknowledgement. Students may use a limited
amount of information and ideas expressed by others but this use must be identified by appropriate
referencing.
CONSEQUENCES OF PLAGIARISM
Plagiarism is misconduct as defined under the Student Conduct By-Laws. The penalties associated with
plagiarism are designed to impose sanctions on offenders that reflect the seriousness of the Universitys
commitment to academic integrity.
I declare that all material in this assessment is my own work except where there is a clear
acknowledgement and reference to the work of others. I have read the Universitys
Academic and Scientific Misconduct Policy and understand its implications.*
http://www.cdu.edu.au/governance/documents/3.3academicandscientificmisconduct.doc.

Signed: Mark Cruickshank

.Date: 10/5/2015

* By submitting this assignment and cover sheet electronically, in whatever form you are deemed to have made the declaration set out
above.

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

ENG432 Dynamics of Engineering Systems

Prac2: 3 Degrees of Freedom Systems


Mark Cruickshank
S232953

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

!
Table!of!Contents!
1.!Objective.............................................................................................................................. 4!
2.!Assumptions ........................................................................................................................ 5!
3.!Known!input!values.............................................................................................................. 5!
Table!3.1!!Known!input!values ............................................................................................................................................ 6!
4.!Determining!the!spring!stiffness........................................................................................... 6!
4.1!Spring!stiffness!!Method!1 ............................................................................................................................................. 7!
4.1.1$Table$Spring$A .................................................................................................................................................................... 7!
4.1.2$Table$Spring$B .................................................................................................................................................................... 7!
4.1.3$Table$Spring$C..................................................................................................................................................................... 7!
4.1.4$Table$Spring$D .................................................................................................................................................................... 7!
4.1.5$Graph$Spring$A$$Weight$versus$displacement .................................................................................................... 8!
4.1.6!Graph!Spring!B!!Weight!versus!displacement ................................................................................................... 9!
4.1.7$Graph$Spring$C$$Weight$versus$displacement .................................................................................................... 9!
4.1.8$Graph$Spring$D$$Weight$versus$displacement................................................................................................. 10!
4.2!Spring!stiffness!!Method!2 .......................................................................................................................................... 10!
4.2.1$Results$table$$Spring$A............................................................................................................................................... 10!
4.2.2$Results$table$$Spring$B............................................................................................................................................... 10!
4.2.3$Results$table$$Spring$C ............................................................................................................................................... 11!
4.2.4$Results$table$$Spring$D............................................................................................................................................... 11!
4.3!Method!1!and!Method!2!comparisons ..................................................................................................................... 11!
4.3.1$Method$1$and$Method$2$comparison$table ......................................................................................................... 11!
4.3.2!Variation!between!Method!1!and!Method!2 ...................................................................................................... 11!
5.!Initial!displacements!of!the!sliders ..................................................................................... 12!
5.1!Free!body!diagram ........................................................................................................................................................... 12!
5.2!Equations!of!motion!for!each!Mode .......................................................................................................................... 13!
5.2.1$Equation$of$motion$system$1..................................................................................................................................... 13!
........................................................................................................................................................................................................... 13!
5.2.4!Stiffness!&!Mass!Matrices .......................................................................................................................................... 13!
5.3.1$Mass$Matrix ...................................................................................................................................................................... 13!
5.3.3$Stiffness$Matrix................................................................................................................................................................ 14!
5.3.5$Combining$All$Matrices ............................................................................................................................................... 14!
5.4!Determining!the!initial!displacements .................................................................................................................... 14!
6.!Determining!the!natural!frequencies!of!each!mode............................................................ 15!
7.!Plot!of!each!mode!vs!time ................................................................................................. 15!
7.1!Response!Mode!1 .............................................................................................................................................................. 15!
7.2!Response!Mode .................................................................................................................................................................. 16!
7.3!Response!Mode!3 .............................................................................................................................................................. 17!
7.4!Response!all!Modes!!Subplot ..................................................................................................................................... 17!
8.!Conclusion ......................................................................................................................... 18!

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

1.!Objective!
The objective of this laboratory is to demonstrate three modes of vibrations for a threedegrees of freedom mass-spring system. We expect a three-degree of freedom system
to behave differently according to the natural frequencies of each mass/node.
To summarize we would expect three conditions for a three-degree of freedom system:
Condition 1: At this frequency all masses move in the same direction, this would be the
smallest frequency. This is illustrated in the below figure.

Condition 2: At this frequency we would expect the end mass to move in the opposite
directions as opposed to the middle and furthers end mass. The two outer masses
should move with the same amplitude but in opposite directions if the stiffness of each
spring is the same.

Condition 3: At this frequency (the fastest of the other 2) the two outer masses move in
the same direction with the same amplitude if the stiffness of each spring is the same.

We have used a vacuum to assist in minimizing the friction between the track and the
slider(s), thus for this laboratory we have assumed there is no friction (by using the
vacuum). This laboratory will involve determining the following:

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

The weights of each slider(s)

The spring-stiffness of each of the four springs

The natural frequencies for the three individual sliders

The initial displacement distances(s) for each of the sliders.

We should be able to determine the initial displacement by calculating the mode ratios
then setting initial displacements based on these calculations. Finally we can conclude
into how accurate the experimental results are in comparison to the theoretically
determined.
Due to being an external student of this unit, I am unable to complete the practical
testing associated with this laboratory, however I can conclude on how the physical
testing would behave with respect to my results.

2.!Assumptions!
As previously mentioned, we have assumed that there is no friction between the track
and the slider; therefore this system will have no damping. Friction has been eliminated
due to the vacuum suction that is applied to the track.
We also assume the following:

All equipment measuring scales are properly calibrated, thus our measurement

tolerances are very minimal.

That all springs act in a linear manner.

3.!Known!input!values!
All known input values for this experiment are displayed in the below table:
The masses of the springs and sliders have been determined by measuring these on a
set of digital scales, we would assume an error of no more than +/- 0.001kg.

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

The lengths of the un-stretched springs have been determined visually, by using a metric
ruler; again we would assume an error of no more than +/- 0.002M or 2mm.

Table!3.1!!Known!input!values!
No.

Description

Value

Unit

1
2
3
4
5
6
7
8

Mass carrier
Un-stretched length spring A
Un-stretched length spring B
Un-stretched length spring C
Un-stretched length spring D
Mass slider A
Mass slider B
Mass slider C

0.0519
0.3180
0.2920
0.1880
0.0760
0.36615
0.27480
0.36850

kg
M
M
M
M
Kg
Kg
Kg

4.!Determining!the!spring!stiffness!
Determining the spring stiffness for each spring was calculated using two methods.
The first method (Method 1) involved attaching a weight to the spring and measuring the
displacement, the results were reordered.
The second method (Method 2) was determined by determining the period over 10
oscillations. The following equations express how this was calculated (Palm 2009):

2
=
T
% 2 (
k
=
=' *
mobject & T )
T=

% 2 ( 2
k = ' * mobject
&T)

As we have assumed that the springs act in a linear way, we would expect the
relationship between force and displacement to act in a linear way, provided the spring is
within the elastic zone (Hooks Law).
Mark Cruickshank S232953 Charles Darwin University
ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

These calculations can be seen in the attached Microsoft Excel spreadsheet.

4.1!Spring!stiffness!!Method!1!
Method 1 his was determined by using small increments of added weight and recording
the displacement. Small increments of mass(s) were used to ensure accurate results.
The results for each given spring are displayed in the below tables:

4.1.1!Table!Spring!A!
No.
1
2
3
4
5

Mass [kg]
0
0.05032
0.05542
0.06052
0.06562

Spring A
Weight [N]
0
0.4936392
0.5436702
0.5937012
0.6437322

Distance [m]
0.318
0.531
0.566
0.596
0.628

Displacement [m]
0
0.213
0.248
0.278
0.31

Spring B
Weight [N]
0
0.4936392
0.5436702
0.5937012
0.6437322

Distance [m]
0.292
0.541
0.573
0.603
0.632

Displacement [m]
0
0.249
0.281
0.311
0.34

Spring C
Weight [N]
0
0.4936392
0.5436702
0.5937012
0.6437322
0.6937632
0.7437942

Distance [m]
0.188
0.35
0.368
0.388
0.405
0.425
0.443

Displacement [m]
0
0.162
0.18
0.2
0.217
0.237
0.255

Spring D
Weight [N]
0
0.4936392
0.5436702

Distance [m]
0.076
0.15
0.158

Displacement [m]
0
0.074
0.082

4.1.2!Table!Spring!B!
No.
1
2
3
4
5

Mass [kg]
0
0.05032
0.05542
0.06052
0.06562

4.1.3!Table!Spring!C!
No.
1
2
3
4
5
6
7

Mass [kg]
0
0.05032
0.05542
0.06052
0.06562
0.07072
0.07582

4.1.4!Table!Spring!D!
No.
1
2
3

Mass [kg]
0
0.05032
0.05542

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

4
5
6
7

0.06052
0.06562
0.07072
0.07582

0.5937012
0.6437322
0.6937632
0.7437942

0.165
0.173
0.181
0.189

0.089
0.097
0.105
0.113

From each of the above tables, weight was plotted against displacement in Microsoft
Excel, a trend line was set through the origin to obtain the spring stiffness, these can be
seen in the below graphs.
4.1.5!Graph!Spring!A!!Weight!versus!displacement!

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

!!!
4.1.6%Graph%Spring%B%%Weight%versus%displacement

4.1.7!Graph!Spring!C!!Weight!versus!displacement!

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

4.1.8!Graph!Spring!D!!Weight!versus!displacement!

4.2!Spring!stiffness!!Method!2!
The results for method 2 are displayed in the below tables:
4.2.1!Results!table!!Spring!A!
No
1
2
3

Time [sec]
12.15
12.28
12.37

Period [T]
1.215
1.228
1.237

Spring A
Wn [rad/sec]
5.171345932
5.116600413
5.079373733

Mass [kg]
0.0502
0.0502
0.0502
Average

K [N/m]
1.342
1.314
1.295
1.317

Mass [kg]
0.0502
0.0502
0.0502
Average

K [N/m]
1.435
1.506
1.450
1.464

4.2.2!Results!table!!Spring!B!
No
1
2
3

Time [sec]
11.75
11.47
11.69

Period [T]
1.175
1.147
1.169

Spring B
Wn [rad/sec]
5.347391751
5.477929649
5.374837731

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

4.2.3!Results!table!!Spring!C!
No
1
2
3

Time [sec]
9
8.96
8.88

Period [T]
0.9
0.896
0.888

Spring C
Wn [rad/sec]
6.981317008
7.012483602
7.07565913

Mass [kg]
0.0502
0.0502
0.0502
Average

K [N/m]
2.447
2.469
2.513
2.476

4.2.4!Results!table!!Spring!D!
No
1
2
3

Time [sec]
8
7.78
7.87

Period [T]
0.8
0.778
0.787

Spring D
Wn [rad/sec]
7.853981634
8.07607366
7.983717036

Mass [kg]
0.1002
0.1002
0.1002
Average

K [N/m]
6.181
6.535
6.387
6.368

4.3!Method!1!and!Method!2!comparisons!
As seen in the below table, the results for both methods are displayed, as we can see all
of the springs for both methods showed a linear relationship between force and
displacement.
We can see that Method 1 (determined by measuring the deflection per given weight)
appears to have a larger magnitude then that of method 2. The last column is the
absolute difference between both methods. Whilst conducting Method 2, we found that
determining the exact place where the oscillation peaks/finishes and the timing between
these periods considerably hard to maintain, thus we would assume this difference in
results is a related to this.

4.3.1!Method!1!and!Method!2!comparison!table!
Spring Stiffness Comparison: Method 1 and Method 2
Spring
type
A
B
C
D

Result - Method 1
[N/m]
1.9225
1.9225
2.9609
6.6253

Result - Method 2
[N/m]
1.317
1.464
2.476
6.368

Abbs difference
[N/m]
0.6052
0.4585
0.4847
0.2577

4.3.2!Variation!between!Method!1!and!Method!2!

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

Firstly, both these experiments were conducted based on human judgment, thus we can
illustrate that due to human judgment there would be a discrepancy with results. Also
due to the age of the springs, there are some springs that are deformed IE have been
loaded with weight or possibly stretched past their elastic limit, that may have also
contributed between any discrepancies in results. These deformations are displayed in
the below photo:

!4.3.2a!Photo!of!the!springs!used!

The above photo is springs D to A, with spring D being the springs to the top of the
photo.

5.!Initial!displacements!of!the!sliders!
5.1!Free!body!diagram!
A free body diagram of the system can be seen in the below figure:

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

5.2!Equations!of!motion!for!each!Mode!
From the above free body diagram, we can represent the system by using Newtons
second law of motion, as per the following equations:

5.2.1!Equation!of!motion!system!1!

m1 x1 = k2 ( x 2 x1 ) k1 x1
m1 x1 = (k1 + k 2 )x1 + k 2 x 2
m1 x1 + (k1 + k 2 )x1 k2 x 2 = 0
m2 x2 = k 2 ( x 2 x1 ) + k 3 (x 3 x 2 )

m2 x2 + k2 ( x 2 x1 ) k 3 (x 3 x 2 ) = 0
m2 x2 k1 x1 + (k 2 + k2 )x 2 k 3 x 3 = 0

m3 x3 = k 4 x 3 k 3 (x 3 x 2 )
m3 x3 + k4 x 3 + k 3 (x 3 x 2 ) = 0
m3 x3 + k3 x 2 + (k 3 + k4 )x 2 = 0

5.2.4!Stiffness!&!Mass!Matrices!

From the above three equation the following matrices can be found to form the below
equation:

[ M ] x + [ k ] x = 0
5.3.1!Mass!Matrix!

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

"m1 0
$
$ 0 m2
$# 0
0

0%
'
0'
m3 '&

5.3.3!Stiffness!Matrix!

#k1 + k 2
%
% k 2
%$ 0

k 2
k2 + k 3
k 3

0 &
(
k 3 (
k 3 + k 4 ('

5.3.5!Combining!All!Matrices!

"m1 0
$
$ 0 m2
$# 0
0

0 % " x1 % #k1 + k 2
'$ ' %
0 ' $ x2 ' = % k 2
m3 '& $# x3 '& %$ 0

k 2
k2 + k 3
k 3

0 & " x` %
($ '
k 3 ( $ x 2 '
k 3 + k 4 (' $# x 3 '&

5.4!Determining!the!initial!displacements!

We have used the attached Matlab file to determine the mode ratios for each of the three
modes. The initial displacements are based on these ratios. For each mass per given
mode the initial displacement can be seen in the below table in meters.

No.

Mass no.

Displacement
[m]

Mode Ratios from


Matlab

MODE 1
1

Mass A

0.05

Mass B

0.045185

0.9037

Mass C

0.017925

0.3585

MODE 2
1

Mass A

-0.042025

-0.8405

Mass B

0.04351

0.8702

Mass C

0.034695

0.6939

MODE 3
1

Mass A

0.02077

0.2077

Mass B

-0.08737

-0.8737

Mass C

0.10671

1.0671

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

The negative values indicate that the mass is moved in the opposite direction. The last
column of the above table is the mode ratio. This has been multiplied by the same
number to form the initial displacement per each mode.

6.!Determining!the!natural!frequencies!of!each!mode!
The natural frequencies for each mode has been calculated using Matlab, please refer to
the back of this report for the Matlab program
The natural frequencies for all three masses can be seen in the below table.
Mass item no.

Natural frequency

Mass A

2.4555 rad/sec

Mass B

2.4496 rad/sec

Mass C

6.560 rad/sec

7.!Plot!of!each!mode!vs!time!
Each of the three modes response in the time domain was plotted against time, these
can be seen in the below diagrams.

!
!
!
!
!
!
!
!
7.1!Response!Mode!1!

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

7.2!Response!Mode!!

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

7.3!Response!Mode!3!

!
!
!
7.4!Response!all!Modes!!Subplot!

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

All three response have been put into the above sub-plot, to illustrate how the behavior
of the system changed as the initial displacement changed increased and/or
decreased.

8.!Conclusion!
The spring rates from Method 1 were chosen due to the lower level of error whilst
measuring. As previously stated, being an external student for this unit, the as calculated
initial distances of all three modes has not been physically tested, thus we can only
assume that these results would be within the range as expected. We would expect to
see some small amount of error due to the surface having a minimal amount of friction;
therefore I would assume the system would have a small amount of damping as a result.
The responses of the modes appear to behave as expected, although we have not
physically tested these results we can see at the lowest frequency the masses move in
the same direction, this mode also appear to have small amount of phase shift and even
amplitudes. The amplitudes are not of the same magnitude due to the springs having
different stiffness values; the last spring that attaches to mass 3 has the highest stiffness
value, approximately 2.5 times the stiffness of springs that attach to mass 1 and 2. The
response of mode 2 appeared to have the most accurate period, with minimal phase
shift.
As demonstrated, in this part of the experiment and from a design perspective, we can
see how the natural frequency of the systems components, the stiffness of the springs
and the initial displacements of the masses can have an affect on multiple degrees of
freedom systems behavior. The results would have looked quite different if the springs
were placed into different positions IE changing spring D with spring B.

Mark Cruickshank S232953 Charles Darwin University


ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

ENG432_WS6c

10/05/2015 7:14 pm

Contents
Known inputs
Matrics
Test K matrix for determininant.
Eigenvalue formation
Mode coordintates to physical coordinates
The below are for the three cases:
The below values will determine the displacment offsets %% note these are only ratios!!:
Printing values to the screen
Setting dx/dt matrices
Time vecotor
Create unit vectors for x01, x02 and x03
Solving for the ODE's
Plotting the vectors
Plotting the Responses for all modes into a subplot

close all; clear all; clc

Known inputs
% Stiffness input values [N/m]:
k1 = 1.9225; % this is spring A
k2 = 1.9225; % this is spring B
k3 = 2.9609; % this is spring C
k4 = 6.6253; % this is spring D
% Mass input values for
m1 = 0.36615; % this is
m2 = 0.27480; % this is
m3 = 0.36850; % this is

the sliders [kg]


mass A
mass B
mass C

Matrics
K = [k1+k2 -k2 0;-k2 k2+k3 -k3;0 -k3 k3+k4]; % This is the stiffness matrix
M = [m1 0 0; 0 m2 0;0 0 m3]; % This is the mass matrix

Test K matrix for determininant.


% If det = 0, [K] does not have an inverse.
detK = det(K);
% This has a determinant thus we can proceed with Eigenvalue formation:
file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

Page 1 of 7

ENG432_WS6c

10/05/2015 7:14 pm

Eigenvalue formation
[P,Lambda] = eig(inv(M)*K); % This is the eigen vector
omega = sqrt(Lambda)*[1 1 1]'; %This is the natural frequency for each given slider
P=P./(P(1,:):P(1,:):P(1,:)); % This is the mode matrice

Mode coordintates to physical coordinates


The below are for the three cases:
ro1 = [1 0 0]'; % Assuming mode 1 equals one and remianing modes (2&3) are equal to zero
ro2 = [0 1 0]'; % Assuming mode 2 equals one and remianing modes (1&3) are equal to zero
ro3 = [0 0 1]'; % Assuming mode 3 equals one and remianing modes (1&2) are equal to zero

The below values will determine the displacment offsets %% note these are only ratios!!:
Xo1 = P*ro1; % This will give the physical coordinates - MODE 1
Xo2 = P*ro2; % This will give the physical coordinates - MODE 2
Xo3 = P*ro3; % This will give the physical coordinates - MODE 3

Printing values to the screen


Lambda
omega
P
Xo1
Xo2
Xo3
K
detK

%
%
%
%
%
%
%
%

Print
Print
Print
Print
Print
Print
Print
Print

on
on
on
on
on
on
on
on

screen
screen
screen
screen
screen
screen
screen
screen

Lambda =
5.7560
0
0

0
15.9370
0

0
0
32.5930

-0.8405

0.2077

omega =
2.3992
3.9921
5.7090

P =
1.0000

file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

Page 2 of 7

ENG432_WS6c

0.9037
0.3585

10/05/2015 7:14 pm

0.8702
0.6939

-0.8737
1.0671

-1.9225
4.8834
-2.9609

0
-2.9609
9.5862

Xo1 =
1.0000
0.9037
0.3585

Xo2 =
-0.8405
0.8702
0.6939

Xo3 =
0.2077
-0.8737
1.0671

K =
3.8450
-1.9225
0

detK =
110.8574

Setting dx/dt matrices


dx1dt = @(t1,x1) [x1(4), x1(5), x1(6), (k2*x1(2)-(k1+k2)*x1(1))/m1, (k2*x1(1)-(k2+k3)*x1(2)
+k3*x1(3))/m2, (k3*x1(2)-(k2+k4)*x1(3))/m3]';
dx2dt = @(t2,x2) [x2(4), x2(5), x2(6), (k2*x2(2)-(k1+k2)*x2(1))/m1, (k2*x2(1)-(k2+k3)*x2(2)
+k3*x2(3))/m2, (k3*x2(2)-(k2+k4)*x2(3))/m3]';
dx3dt = @(t3,x3) [x3(4), x3(5), x3(6), (k2*x3(2)-(k1+k2)*x3(1))/m1, (k2*x3(1)-(k2+k3)*x3(2)
+k3*x3(3))/m2, (k3*x3(2)-(k2+k4)*x3(3))/m3]';

Time vecotor
tspan = [0 10]; % creating time vector

Create unit vectors for x01, x02 and x03


% I have manually copied and pasted this vector and added three zeros to
file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

Page 3 of 7

ENG432_WS6c

10/05/2015 7:14 pm

% ensure matrix is dimmensionally correct. There is probablly another easier wat to do this
.
x010 = [0.05; 0.045185; 0.017925; 0; 0; 0];
x020 = [-0.042025; 0.04351; 0.034695;0;0;0];
x030 = [0.02077; -0.08737; 0.10671;0;0;0];

Solving for the ODE's


[t1,x1] = ode45(dx1dt,tspan,x010);
[t2,x2] = ode45(dx2dt,tspan,x020);
[t3,x3] = ode45(dx3dt,tspan,x030);

Plotting the vectors


figure(1) % new figure
plot(t1,x1(:,1:3)); % this is for mode 1
title('Time domain response for Mode 1');
xlabel('Time [sec.]');
ylabel('Amplitude');
legend('x1', 'x2', 'x3')
grid on
figure(2) % new figure
plot(t2,x2(:,1:3)); % this is for mode 2
title('Time domain response for Mode 2');
xlabel('Time [sec.]');
ylabel('Amplitude');
legend('x1', 'x2', 'x3')
grid on
figure(3) % new figure
plot(t3,x3(:,1:3)); % this is for mode 3
title('Time domain response for Mode 3');
xlabel('Time [sec.]');
ylabel('Amplitude');
legend('x1', 'x2', 'x3')
grid on

file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

Page 4 of 7

ENG432_WS6c

file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

10/05/2015 7:14 pm

Page 5 of 7

ENG432_WS6c

10/05/2015 7:14 pm

Plotting the Responses for all modes into a subplot


figure(4) % new figure
subplot(3,1,1); % this is for mode 1
plot(t1,x1(:,1:3));
title('Time domain response for Mode 1');
xlabel('Time [sec.]');
ylabel('Amplitude');
legend('x1', 'x2', 'x3')
grid on

subplot(3,1,2); % This is for mode 2


plot(t2,x2(:,1:3));
title('Time domain response for Mode 2');
xlabel('Time [sec.]');
ylabel('Amplitude');
legend('x1', 'x2', 'x3')
grid on
subplot(3,1,3); % This is for mode 3
plot(t3,x3(:,1:3));
title('Time domain response for Mode 3');
xlabel('Time [sec.]');
ylabel('Amplitude');
legend('x1', 'x2', 'x3')
grid on

file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

Page 6 of 7

ENG432_WS6c

10/05/2015 7:14 pm

Published with MATLAB R2014a

file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

Page 7 of 7