Documente Academic
Documente Profesional
Documente Cultură
Solution
The natural frequencies ,normal modes and the free-vibration responses of m1 and m2 were found as:
M = 2x2 double
10 0
0 1
% Stifness Matrix
K=[35 -5;-5 5]
K = 2x2 double
35 -5
-5 5
C=inv(M)*K;
[v,d]=eig(C)
v = 2x2 double
-0.4472 0.1961
-0.8944 -0.9806
d = 2x2 double
2.5000 0
0 6.0000
w_1n=sqrt(d(1,1))
w_1n = 1.5811
w_2n=sqrt(d(2,2))
w_2n = 2.4495
x2_11 = -5
x2_12 = 2
% t = 0:1/25:20;
% x1 = (5/7) * cos(1.5811*t) + (2/7) * cos(2.4495*t);
% x2 = (10/7) * cos(1.5811*t) - (10/7) * cos(2.4495*t);
%OR USE
for i = 1: 501
t(i) = (i-1)/25;
x1(i) = (5/7) * cos(1.5811*t(i)) + (2/7) * cos(2.4495*t(i));
x2(i) = (10/7) * cos(1.5811*t(i)) - (10/7) * cos(2.4495*t(i));
end
subplot(221);
plot(t, x1);
xlabel('t');
ylabel('x1(t)');
subplot(224);
plot(t, x2);
xlabel('t');
ylabel('x2(t)');
Example 2
A simplified model of an automobile suspension system is shown as a two degree of freedom system.
Write a MATLAB script to determine the natural frequencies of this model.
Fig. Simplified model of an automobile
l1 = 1.04 m
l2 = 1.4 m
Solution:
The force and the moment equilibrium equations:
Substituting the value of k, it reduces to:
Example 3
Solution:
%%METHOD 1
clc
clf
clear all
m=30; % Mass
k=20000; % Stiffness
c=150; % Damping
% 4 x 4 matrices
disp('4 x 4 Mass matrix');
mt=[0,0,m,0;0,0,0,2*m;m,0,0,0;0,2*m,0,c];
disp('4 x 4 stiffness matrix');
kt=[-m,0,0,0;0,-2*m,0,0;0,0,3*k,-2*k;0,0,-2*k,2*k];
Z=inv(mt)*kt;
[V,D]=eig(Z);
disp('Eigenvalues');
V
disp('Initial conditions');
x0=[0;0;0.005;0]
disp('Integration constants');
S=inv(V)*x0
tk=linspace(0,2,101);
% Evaluation of time dependent response
% Recall that x1=y3 and x2=y4
for k=1:101
t=tk(k);
for i=3:4
x(k,i-2)=0;
for j=1:4
x(k,i-2)=x(k,i-2)+(real(S(j))*real(V(i,j))-imag(S(j))*imag(V(i,j)))...
*cos(imag(D(j,j))*t);
x(k,i-2)=x(k,i-2)+(imag(S(j))*real(V(i,j))-real(S(j))...
*imag(V(i,j)))*sin(imag(V(i,j))*t);
x(k,i-2)=x(k,i-2)*exp(-real(D(j,j))*t);
end
end
end
plot(tk,x(:,1),'-',tk,x(:,2),':')
title('2_DOF with damping')
xlabel('t[sec]')
ylabel('x(m)')
legend('x1(t)','x2(t)')
Assignment 1
Assignment 2