- You are redefining r after initially setting it up as a vector of frequency ratios.
- You are redefining zeta after initially setting it up as a vector of damping factors. You should use this vector to compute the transmissibility for each damping factor and frequency ratio.
- You are trying to plot Td for multiple values of zeta and r without using a loop or vectorized operations.
- The plot command should be inside the loop where you calculate Td for each damping factor.
Response of a SDOF damped system subjected to harmonic base excitation
24 次查看(过去 30 天)
显示 更早的评论
Hi, I am trying to write a Matlab script to calculate the response of a SDOF damped system subjected to harmonic base excitation.
zeta= [0.05; 0.1; 0.15; 0.25; 0.5; 1.25; 1.5]; % damping factors
r= [0:0.01:3]; % frequency ratio.
But I dont know where I am making the mistake in order to get the r-T_d graph as response.
m=10; % mass [kg]
k=100; % stiffness [N/m]
c=20; % damping [Ns/m]
Y=1; % amplitude of the base [m]
omega= [0.15; 0.25; 0.5; 1.25; 1.5];
zeta = [0.05; 0.1; 0.15; 0.25; 0.5; 1.25; 1.5]; % damping factors
r= [0:0.01:3]; % frequency ratio
omegan=sqrt(k/m); % natural frequency
r=omega/omegan; % frequency ratio
zeta=c/ (2*m*omegan); % damping factor (ratio)
X=sqrt((1+2*zeta*r).^2)./((1-r.^2).^2+(2*zeta*4).^2);
Td= X/Y; % displacement transmissibility, output displacement of oscillator/inpıt base function
figure;
plot(r,Td,'k');
xlabel('frequency ratio (r)');
ylabel('tranmissibility (T_d)');
0 个评论
回答(1 个)
Hornett
2024-9-12
It seems that you're trying to plot the transmissibility (T_d) as a function of the frequency ratio (r) for a single degree of freedom (SDOF) system subjected to harmonic base excitation. There are a few issues in the code that need to be corrected:
m = 10; % mass [kg]
k = 100; % stiffness [N/m]
omegan = sqrt(k/m); % natural frequency
zeta = [0.05; 0.1; 0.15; 0.25; 0.5; 1.25; 1.5]; % damping factors
r = 0:0.01:3; % frequency ratio
figure;
hold on; % hold the plot for multiple curves
for i = 1:length(zeta)
Td = sqrt((1 ./ (1 - r.^2).^2) + ((2 * zeta(i) * r) ./ (1 - r.^2)).^2); % displacement transmissibility
plot(r, Td, 'DisplayName', ['\zeta = ' num2str(zeta(i))]);
end
xlabel('Frequency ratio (r)');
ylabel('Transmissibility (T_d)');
legend('show');
hold off; % release the plot hold
This code will plot the transmissibility (T_d) for each damping factor zeta as a function of the frequency ratio r.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assembly 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!