Write a MATLAB program to analyze free vibration of viscousl

Write a MATLAB program to analyze free vibration of viscously damped single degree-of-freedom systems. The program should be able to handle underdamped, critically damped, and overdamped systems. To test your program let m = 4 kg, k = 2500 N/m, x_0 = 100 mm, x_0 = -10 m/s and run the following cases: b = 0 N middot s/m. b = 100 N middot s/m b = 200 N middot s/m. b = 400 N middot s/m. Plot x(t) and x(t) versus lime t greaterthanorequalto 0 for all the cases.

Solution

The following MATLAB code can be executed.

%Free Vibration response of a linear single degree of freedom system

m = input(\'mass of the system in kg\');

k=input( \'Stiffness of the system in N/m =\' );

c=input( \'damping factor of the system in N.S/m= \' );

x0=input(\'initial Displacement in m= \');

xt0=input(\'initial velocity in m/s= \');

wn=sqrt(k/m);

zeta=c/(2*m*wn);

if (zeta >1);

t=0:0.001:20;

%overdamped

z1=-zeta+sqrt(zeta^2-1);

z2=-zeta-sqrt(zeta^2-1);

z3=2*wn*sqrt(zeta^2-1);

A=(xt0-z2*wn*x0)/z3;

B=(-xt0+z1*wn*x0)/z3;

x1=A*exp(z1*wn*t)+B*exp(z2*wn*t);

if (zeta==1);

t=0:0.001:20;

%critically damped

x2=(x0+(xt0+wn*x0)*t).*exp(-wn*t)

if (zeta<1);

t=0:0.001:20;

%underdamped

zt=zeta; %Damping factor

wd=wn*sqrt(1-zt^2);

x3=exp(-zt*wn*t).*(((xt0+zt*wn*x0)/wd).*sin(wd*t)+x0*cos(wd*t));

plot(t,x1,\'r\',t,x2,\'b\',t,x3,\'g\',\'linewidth\',2)

grid on

set(gca,\'FontSize\',15) % For changing fontsize of tick no

xlabel(\'\\bf Time\',\'Fontsize\',15)

ylabel(\'\\bf x\',\'Fontsize\',15)

 Write a MATLAB program to analyze free vibration of viscously damped single degree-of-freedom systems. The program should be able to handle underdamped, critic
 Write a MATLAB program to analyze free vibration of viscously damped single degree-of-freedom systems. The program should be able to handle underdamped, critic

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site