K0 = [6000000 600000 0 0
600000 300000 0 0
0 0 364560 0
0 0 0 261510];
M0 = [10.0000 0.5400 0.5000 0.5000
0.5400 1.3436 0.2600 0.2800
0.5000 0.2600 1.0000 0
0.5000 0.2800 0 1.0000];
D0=[-242.3846 -121.3745 -120.0000 -101.6000
-121.3745 -65.3490 -62.4000 -56.8960
-120.0000 -62.4000 -240.0000 0
-101.6000 -56.8960 0 -203.2000];
[ur,omegaSqr]=eig(K0,M0);
omega=sqrt(diag(omegaSqr));
ur1norm=ur(:,1)/norm(ur(:,1),Inf);
ur2norm=ur(:,2)/norm(ur(:,2),Inf);
eigenf=omega/2/pi
FREQUENCIES=[0:0.5:eigenf(1)-0.5 eigenf(1)-0.5:0.001:eigenf(1)+0.5 ...
eigenf(1)+0.5:0.5:eigenf(2)-0.5 eigenf(2)-0.5:0.001:eigenf(2)+0.5 ...
eigenf(2)+0.5:0.5:eigenf(3)-0.5 eigenf(3)-0.5:0.001:eigenf(3)+0.5 ...
eigenf(3)+0.5:0.5:eigenf(4)-0.5 eigenf(4)-0.5:0.001:eigenf(4)+0.5 ...
eigenf(4)+0.5:0.5:200];
OMEGA=FREQUENCIES*2*pi;
H11=zeros(length(OMEGA), 1);
H12=zeros(length(OMEGA), 1);
H21=zeros(length(OMEGA), 1);
H22=zeros(length(OMEGA), 1);
for oCount=1:length(OMEGA)
FRF=inv(-(OMEGA(oCount)^2)*M0+K0+OMEGA(oCount)*D0);
H11(oCount)=(FRF(1,1));
H12(oCount)=(FRF(1,2));
H21(oCount)=(FRF(2,1));
H22(oCount)=(FRF(2,2));
end
figure(1)
subplot(2,2,1)
plot(OMEGA./(2*pi),abs(H11))
grid on;
ylabel('$|H_{11}|$', 'Interpreter', 'latex', 'FontSize',14);
xlabel('$\Omega$ [Hz]','Interpreter', 'latex', 'FontSize', 14)
vline(eigenf);
subplot(2,2,2)
plot(OMEGA./(2*pi),abs(H12))
grid on;
ylabel('$|H_{12}|$', 'Interpreter', 'latex', 'FontSize',14);
xlabel('$\Omega$ [Hz]','Interpreter', 'latex', 'FontSize', 14)
vline(eigenf);
subplot(2,2,3)
plot(OMEGA./(2*pi),abs(H21))
grid on;
ylabel('$|H_{21}|$', 'Interpreter', 'latex', 'FontSize',14);
xlabel('$\Omega$ [Hz]','Interpreter', 'latex', 'FontSize', 14)
vline(eigenf);
subplot(2,2,4)
plot(OMEGA./(2*pi),abs(H22))
grid on;
ylabel('$|H_{22}|$', 'Interpreter', 'latex', 'FontSize',14);
xlabel('$\Omega$ [Hz]','Interpreter', 'latex', 'FontSize', 14)
vline(eigenf);
2 Comments
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/437091-bode-plot-from-mass-stiffness-and-damping-matrix#comment_653932
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/437091-bode-plot-from-mass-stiffness-and-damping-matrix#comment_653932
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/437091-bode-plot-from-mass-stiffness-and-damping-matrix#comment_654303
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/437091-bode-plot-from-mass-stiffness-and-damping-matrix#comment_654303
Sign in to comment.