0% found this document useful (0 votes)
62 views

1.amplitude and Phase Angle of Sdof System (Forced Harmonic) : Mat Lab Code

1. The document presents MATLAB code to analyze the frequency response of a single degree of freedom (SDOF) damped harmonic oscillator system subjected to base excitation. The code calculates the magnitude and phase angle of the system's displacement transmissibility as a function of damping ratio and excitation frequency. It generates plots of magnitude and phase versus frequency for different damping ratios. 2. The code also derives an analytical expression for the steady-state response of the SDOF system in terms of the natural frequency, damping ratio, and excitation frequency and amplitude. A plot shows the nondimensional displacement transmissibility as a function of frequency ratio for various damping ratios. 3. The MATLAB code and analytical expressions allow characterization of the frequency-dependent

Uploaded by

akinojohnkennedy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

1.amplitude and Phase Angle of Sdof System (Forced Harmonic) : Mat Lab Code

1. The document presents MATLAB code to analyze the frequency response of a single degree of freedom (SDOF) damped harmonic oscillator system subjected to base excitation. The code calculates the magnitude and phase angle of the system's displacement transmissibility as a function of damping ratio and excitation frequency. It generates plots of magnitude and phase versus frequency for different damping ratios. 2. The code also derives an analytical expression for the steady-state response of the SDOF system in terms of the natural frequency, damping ratio, and excitation frequency and amplitude. A plot shows the nondimensional displacement transmissibility as a function of frequency ratio for various damping ratios. 3. The MATLAB code and analytical expressions allow characterization of the frequency-dependent

Uploaded by

akinojohnkennedy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1.

Amplitude and phase angle of sdof system (forced harmonic):


Mat lab code:
m=1;
zeta=0.1:0.1:1;
k=1;
wn=sqrt(k/m);
w=logspace(-1,1,400);
rad2deg=180/pi;
s=j*w;
for cnt=1:length(zeta)
xfer(cnt,:)=(1/m)./(s.^2+2*zeta(cnt)*wn*s+wn^2);
mag(cnt,:)=abs(xfer(cnt,:));
phs(cnt,:)=angle(xfer(cnt,:))*rad2deg;
end
for cnt=1:length(zeta)
figure(1)
loglog(w,mag(cnt,:),'k-')
title('SDOF frequency response magnitudes for zeta=0.2to1.0in steps of0.2')
xlabel('Frequency(rad/sec)')
ylabel('Magnitude')
grid
hold on
end
hold off
for cnt=1:length(zeta)
figure(2)
semilogx(w,phs(cnt,:),'k-')
title('SDOF frequency response phases for zeta=0.2to1.0 in steps of0.2')
xlabel('Frequency(rad/sec)')
ylabel('Phase')
grid
hold on
end
hold off

SDOF frequency response magnitudes for zeta=0.2to1.0in steps of0.2

10

Magnitude

10

-1

10

-2

10

-3

10

-1

10

10
Frequency(rad/sec)

10

SDOF frequency response phases for zeta=0.2to1.0 in steps of0.2

-20
-40

Phase

-60
-80
-100
-120
-140
-160
-180 -1
10

10
Frequency(rad/sec)

Magnitude Plots: base excitation: Displacement transmissibility

10

Mat lab code:


>> syms z wn w f0
A=[wn^2-w^2 2*z*wn*w;
-2*z*wn*w wn^2-w^2];
x=[f0; 0];
An=inv(A)*x
An =
-(f0*(w^2 - wn^2))/(w^4 + 4*w^2*wn^2*z^2 - 2*w^2*wn^2 + wn^4)
(2*f0*w*wn*z)/(w^4 + 4*w^2*wn^2*z^2 - 2*w^2*wn^2 + wn^4)
>> pretty(An)
+-+
|
2
2
|
|
f0 (w - wn )
|
| - --------------------------------- |
|
4
2 2 2
2 2
4 |
| w + 4 w wn z - 2 w wn + wn |
|
|
|
2 f0 w wn z
|
| --------------------------------- |
| 4
2 2 2
2 2
4 |
| w + 4 w wn z - 2 w wn + wn |
+-+
r=linspace(0,3,500);
ze=[0.01;0.05;0.1;0.20;0.50];
X=sqrt( ((2*ze*r).^2+1) ./ ( (ones(size(ze))*(1-r.*r).^2) + (2*ze*r).^2) );
figure(1)
plot(r,20*log10(X))

40

30

X/Y(dB)

20

10

-10

-20

0.5

1.5
Frequency ratio r

2.5

You might also like