You are on page 1of 3

MATLAB Program for Damping Problems -

clc
clear all
m=input('Enter the value of mass m= ');
k=input('Enter the value of stiffness k= ');
wn=sqrt(k/m);
z=input('Enter the value of zeta = ');
wd=wn*sqrt(1-(z*z));
if z<1
fprintf('\nThe case is of under damped system');
a=input('\nEnter the value of A = ');
o=input('\nEnter the value of angle O (inrad) =');
t=0:0.01:4;
y=a.*(exp(-z*wn*t)).*sin(wd*t+o);
plot (t,y)
else if (z==1)
fprintf('\nThe case is of critically damped system');
a=input('\nEnter the value of A = ');
b=input('\nEnter the value of B = ');
t=0:0.01:4;
x=(a+(b*t)).*exp(-wn*t);
plot (t,x)
else (z>1)
fprintf('\nThe case is of over damped system');
a=input('\nEnter the value of A = ');
b=input('\nEnter the value of B = ');
s1=-z+sqrt(z*z-1);
s2=-z-sqrt(z*z-1);
t=0:0.01:4;
x=a.*exp(s1*t)+b.*exp(s2*t);
plot (t,x)
end
end
Overdamped Problem
Ex.1 An overdamped system, with mass 10kgs, stiffness 20kN/m and zeta = 2.5.
Plot the graph for the following conditions.

Fig.1 Graph for overdamped problem

Critically Damped Problem


Ex.2 For mass= 8kg, Stiffness= 15N/m and Zeta=1, plot the graph for the following
conditions.

Fig.2 Graph for critically damped problem


Under Damped Problem
Ex.3 A machine weighs 24kg and is supported on springs of stiffness 18N/mm and
zeta = 0.421. Plot the graph for the following conditions.

Fig.3 Graph for under damped problem

You might also like