Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Determine the response of the system to the given initial conditions.

1 view (last 30 days)
A 2 degree of freedom (2 DOF) system with 3 springs only is given. I am little bit confused to write the codes. I would be glad for some help.
[ 1 0 𝒙̈(𝑡) + [ 12 −2 x(𝑡) = 0 and 𝒙̇(0) = 0 , 𝒙(0) = [1 1]^𝑇
0 4] 2 12]
So here, m1=1 and m2=4 while k1=k3=10 and k2=2. But I do not know why my code is wrong.
K1=10 ; K2=2 ; K3=10 ;
M1=1 ; M2=4 ;
M= [ M1 0 ;
0 M2] ;
K=[K1+K2 -K2;
-K2 K2+K3] ;
[modeShape fr]=eig (K,M); %estimation of natural frequenciesand mode shapes
A00=zeros(2); A11=eye(2);
CC=[A00 A11;-inv(M)*K A00];
global CC
max_freq=max(sqrt(diag(fr))/(2*pi)); %highest frequency in Hz
dt=1/(max_freq*20);
time=0:dt:200*dt;
y0=[1 1 0 0]; %[displ1 disp2 vel1 vel2] initial condition
[tsol,ysol]=ode23('testode_2D',time,y0);
plot(time,ysol(:,1:2),'linewidth',2)
xlabel ('Time')
ylabel('displacement')
ylim([-.02 .02])
grid on
  1 Comment
Torsten
Torsten on 23 Apr 2022
Edited: Torsten on 23 Apr 2022
According to your mathematical problem formulation, your K-matrix is wrong.
And where is testode_2D ?

Answers (0)

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!