Sie sind auf Seite 1von 5

%.........................................................................

% MT11
% Two Degree of Freedom Example - Chopra Ex 10.4-10.22
%
%.........................................................................
clear all
clc
format compact
format long g
close all
%
display(horzcat('Two Degree of Freedom Example - Chopra Ex 10.4-10.22'))
syms k m t real
% Stiffness matrix
display(horzcat('Stiffness matrix'))
K=[3*k -k ; -k k]
M=[2*m 0 ; 0 m]
% Eigenvales and vectors
display(horzcat('Stiffness matrix'))
K
M
A=inv(M)*K
[V,D] = eig(A)
W = sqrt(diag(D))
W1=W(2)
W2=W(1)
eV1=V(:,2)
eV2=V(:,1)
k=1
m=1
W1_val=subs(W1)
W2_val=subs(W2)
T_1=2*pi/W1_val
T_2=2*pi/W2_val
% Free vibration due to initial displacement (a)
display(horzcat('Free vibration due to initial displacement(a)'))
u_0=[1/2 1]'
u_dot_0=[0 0]'
q_1=eV1'*M*u_0/(eV1'*M*eV1);
q_2=eV2'*M*u_0/(eV2'*M*eV2);
q_dot_1=eV1'*M*u_dot_0/(eV1'*M*eV1);
q_dot_2=eV2'*M*u_dot_0/(eV2'*M*eV2);
q_1_t=q_1*cos(W1*t)+q_dot_1/W1*sin(W1*t);
q_2_t=q_2*cos(W2*t)+q_dot_2/W2*sin(W2*t);
u=eV1*q_1_t+eV2*q_2_t;
t=linspace(0,T_1,40);
u_plot=subs(u);
q_1_plot=subs(q_1_t);
q_2_plot=subs(q_2_t);
figure(1)
subplot(3,1,1)
title('Free vibration due to initial displacement u_0=[1/2 1]')
hold on
pq1=plot(t,q_1_plot(1,:),'c-');
Mq1='q_1';
pq2=plot(t,q_2_plot(1,:),'m-');
Mq2='q_2';
legend(Mq1,Mq2)
grid on
subplot(3,1,2)
p1=plot(t,u_plot(1,:),'bo-');
M1='u_1';
legend(M1)
grid on
subplot(3,1,3)
p2=plot(t,u_plot(2,:),'gx-');
M2='u_2';
legend(M2)
grid on
% Free vibration due to initial displacement (b)
display(horzcat('Free vibration due to initial displacement(b)'))
u_0=[-1 1]'
u_dot_0=[0 0]'
q_1=eV1'*M*u_0/(eV1'*M*eV1);
q_2=eV2'*M*u_0/(eV2'*M*eV2);
q_dot_1=eV1'*M*u_dot_0/(eV1'*M*eV1);
q_dot_2=eV2'*M*u_dot_0/(eV2'*M*eV2);
q_1_t=q_1*cos(W1*t)+q_dot_1/W1*sin(W1*t);
q_2_t=q_2*cos(W2*t)+q_dot_2/W2*sin(W2*t);
u=eV1*q_1_t+eV2*q_2_t;
t=linspace(0,T_1,40);
u_plot=subs(u);
u_plot=subs(u);
q_1_plot=subs(q_1_t);
q_2_plot=subs(q_2_t);
figure(2)
subplot(3,1,1)
title('Free vibration due to initial displacement u_0=[-1 1]')
hold on
pq1=plot(t,q_1_plot(1,:),'c-');
Mq1='q_1';
pq2=plot(t,q_2_plot(1,:),'m-');
Mq2='q_2';
legend(Mq1,Mq2)
grid on
subplot(3,1,2)
p1=plot(t,u_plot(1,:),'bo-');
M1='u_1';
legend(M1)
grid on
subplot(3,1,3)
p2=plot(t,u_plot(2,:),'gx-');
M2='u_2';
legend(M2)
grid on
% Free vibration due to initial displacement (c)
display(horzcat('Free vibration due to initial displacement(c)'))
u_0=[-1/2 2]'
u_dot_0=[0 0]'
q_1=eV1'*M*u_0/(eV1'*M*eV1);
q_2=eV2'*M*u_0/(eV2'*M*eV2);
q_dot_1=eV1'*M*u_dot_0/(eV1'*M*eV1);
q_dot_2=eV2'*M*u_dot_0/(eV2'*M*eV2);
q_1_t=q_1*cos(W1*t)+q_dot_1/W1*sin(W1*t);
q_2_t=q_2*cos(W2*t)+q_dot_2/W2*sin(W2*t);
u=eV1*q_1_t+eV2*q_2_t;
t=linspace(0,T_1,40);
u_plot=subs(u);
figure(2)
u_plot=subs(u);
q_1_plot=subs(q_1_t);
q_2_plot=subs(q_2_t);
figure(3)
subplot(3,1,1)
title('Free vibration due to initial displacement u_0=[-1/2 2]')
hold on
pq1=plot(t,q_1_plot(1,:),'c-');
Mq1='q_1';
pq2=plot(t,q_2_plot(1,:),'m-');
Mq2='q_2';
legend(Mq1,Mq2)
grid on
subplot(3,1,2)
p1=plot(t,u_plot(1,:),'bo-');
M1='u_1';
legend(M1)
grid on
subplot(3,1,3)
p2=plot(t,u_plot(2,:),'gx-');
M2='u_2';
legend(M2)
grid on

Two Degree of Freedom Example - Chopra Ex 10.4-10.22


Stiffness matrix
K =[ 3*k, -k]
[ -k, k]
M =[ 2*m, 0]
[ 0, m]
Stiffness matrix
K =[ 3*k, -k]
[ -k, k]
M =[ 2*m, 0]
[ 0, m]
A =[ (3*k)/(2*m), -k/(2*m)]
[ -k/m, k/m]
V =[ -1, 1/2]
[ 1, 1]
D =[ (2*k)/m, 0]
[ 0, k/(2*m)]
W = 2^(1/2)*(k/m)^(1/2)
(k/(2*m))^(1/2)
W1 =(k/(2*m))^(1/2)
W2 =2^(1/2)*(k/m)^(1/2)
eV1 = 1/2
1
eV2 = -1
1
k = 1
m = 1
W1_val = 0.707106781186548
W2_val = 1.4142135623731
T_1 = 8.88576587631673
T_2 = 4.44288293815837
Free vibration due to initial displacement(a)
u_0 = 0.5
1
u_dot_0 = 0
0
Free vibration due to initial displacement(b)
u_0 = -1
1
u_dot_0 = 0
0
Free vibration due to initial displacement(c)
u_0 = -0.5
2
u_dot_0 = 0
0
>>
   
Free vibration due to initial displacement u0=[1/2 1]
1
q1

0 q2

-1
0 1 2 3 4 5 6 7 8 9
0.5
u1

-0.5
0 1 2 3 4 5 6 7 8 9
1
u2

-1
0 1 2 3 4 5 6 7 8 9

Free vibration due to initial displacement u0=[-1 1]


1
q1

0 q2

-1
0 1 2 3 4 5 6 7 8 9
1
u1

-1
0 1 2 3 4 5 6 7 8 9
1
u2

-1
0 1 2 3 4 5 6 7 8 9
Free vibration due to initial displacement u0=[-1/2 2]
1
q1

0 q2

-1
0 1 2 3 4 5 6 7 8 9
2
u1

-2
0 1 2 3 4 5 6 7 8 9
2
u2

-2
0 1 2 3 4 5 6 7 8 9

Das könnte Ihnen auch gefallen