Azzera filtri
Azzera filtri

Response of a SDOF damped system subjected to harmonic base excitation

35 visualizzazioni (ultimi 30 giorni)
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)');

Risposte (1)

Yash Sharma
Yash Sharma il 8 Feb 2024
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:
  1. You are redefining r after initially setting it up as a vector of frequency ratios.
  2. 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.
  3. You are trying to plot Td for multiple values of zeta and r without using a loop or vectorized operations.
  4. The plot command should be inside the loop where you calculate Td for each damping factor.
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.

Community Treasure Hunt

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

Start Hunting!

Translated by