0% found this document useful (0 votes)
24 views

HW4 Outline

The document defines the mass and stiffness matrices used as inputs for a MATLAB code to analyze the natural frequencies and modes of a 2 degree-of-freedom system. It shows the equations to calculate the natural frequencies by setting the determinant of the eigenvalue equation equal to zero. The MATLAB code then uses these equations to find the natural frequencies and corresponding normal modes of the system through solving linear systems of equations in a loop.

Uploaded by

Daniel Silva
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

HW4 Outline

The document defines the mass and stiffness matrices used as inputs for a MATLAB code to analyze the natural frequencies and modes of a 2 degree-of-freedom system. It shows the equations to calculate the natural frequencies by setting the determinant of the eigenvalue equation equal to zero. The MATLAB code then uses these equations to find the natural frequencies and corresponding normal modes of the system through solving linear systems of equations in a loop.

Uploaded by

Daniel Silva
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

The mass and stiffness matrix is defined by the EOM solved from Lagrange and is

used as an input in the matlab code.

Mass
m
m
[ M ] = 11 12
m21 m22

Stiffness
k
k
[ K ] = 11 21
k 21 k 22

{}

[ Q ] = Q1

Q2

Forces

The determinate of the equation below is equal to zero and can be used to find the
roots, which will the natural frequencies.

A= [ K ]w2 [ M ]
A=

A=

k 11 k 21
m m12
w 2 11
k 21 k 22
m21 m22

] [

w2 m
w2 m12
k 11 k 21
2 11
k 21 k 22
w m21 w2 m22

][

k 11 w2 m11 k 21w2 m12


A=
k 21 w2 m21 k 22w2 m22

det ( A )=( k 11 w2 m11 )( k 22 w2 m22 ) ( k 21w2 m21)( k 21w 2 m 12 )


0=( k 11 w 2 m 11 )( k 22w 2 m22 )( k 21 w2 m21 )( k 21w2 m12 )
In matlab, the solve function is used to find the roots and a for loop is used to
remove any negative natural frequencies.

yields

{ }
w nat1
w nat2

Once we know the natural frequencies they are sort from smallest to largest and are
then used to find phi.

]{ } { }

k 11 w 2i m 11 k 21 w2i m12 1
Q
= 1
2
2
Q2
k 21w i m 21 k 22 wi m22 i

For each of the frequencies the modes can be calculated by solving the linear
system of equations by using the backward slash in matlab. This needs to be done
in a for loop since each natural frequency has a different mode

A { i }= [ Q ]

{ i }=[ Q ] A1

Now the normal modes are calculated

{ }

1 i
={ i } =
2 i

{i }

{ }

[ M ] { i }

With the normal modes calculated, they can be put together to form the normal
mode matrix

11 21
21 22

close all; clear all; clc


m = 800; % Mass

[kg]

k1 = 2e4; % Spring1 [N/M]


k2 = 2.5e4; % Spring2 [N/M]
L2 = 1.1; % Length2 [m]
L3 = 1.3; % Length3 [m]
h = .5;

% Lengthh [m]

F = 10;

% Force [n]

y = 20;

% Torque [N*m]

r = 1.4; % ROG

[m]

I = r^2*m; % Inertia

syms w

% Makes w an empty variable

%--------Matrices----------------% Mass Matrix


M = [m, 0; 0, I];
% Stiffness Matrix
K = [k1+k2, -k1*L3+k2*(h+L2); -k1*L3+k2*(h+L2), L3^2*k1+(h^2+h*L2+L2^2)*L2];
% Forces
Q = [F;F*h+y];
%-------W Nat--------------------mat = K-w^2.*M;
detA = det(mat);
S

= solve(detA,w);

S_v = vpa(S);
ii = 1;
for i =1:length(S_v) % Finds only the positive numbers
if S_v(i) >0
w_n(ii,1) = S_v(i);
ii= ii+1;
end
end
w_n = sort(w_n)

% Sorts lowest to highest

%-------Modes------------------------for i = 1:length(w_n)
if i ==1
phi = ones(size(M));
end
matt(:,:,i) = K-w_n(i)^2.*M;
phi(2:end,i) = matt(i,2:end,i)\(Q(i)-matt(i,1,i))
phi_norm(:,i) = phi(:,i)./sqrt(phi(:,i).'*M*phi(:,i))
end

w_n =
4.1860352423161502883776928519889
7.7643184810772268393459294845624

phi =
1.0000
-2.2123

phi_norm =
0.0109
-0.0240

phi =
1.0000
0.2301

phi_norm =
0.0109

0.0337

-0.0240

0.0077

Published with MATLAB R2015a

You might also like