Matlab code 6.3.4:
% plotting of time response for system with Coulomb damping. (Eq.6.3.24)
clc
clear all
a0=2;
ep=.1;
mug=.4;
t=0:0.1:100;
omega=1.3;
phi=omega;
beta=-3.15;
a=a0-((2*ep*mug*t)/(pi*omega));
u=a.*cos(omega*t+phi);
plot(t,u,t,a, '--' ,t,-a, '--' )
% title('SYSTEM WITH COULOMB DAMPING')
set(findobj(gca, 'Type' , 'line' ), 'Color' , 'b' , 'LineWidth' ,2);
set(gca, 'FontSize' ,14)
xlabel( 't' , 'fontsize' ,14, 'fontweight' , 'b' );
ylabel( 'u' , 'fontsize' ,14, 'fontweight' , 'b' );
grid on
Exercise problem :
1. Find the response of a single degree of freedom system with mass 1 kg, stiffness 100 N/m and damping factor 10 N.s/m. Plot the time response and phase portrait. Also plot the phase portrait considering coulomb damping and quadratic damping. Develop a Matlab code for finding the time response and phase portrait by using second order governing differential equation of motion (Use Runge-Kutta method).
Hints-The Matlab code for the system with viscous damping is given below
Matlab code 6.3.5:
%Use Runge-Kutta method to obtain the response of a sdof vibrating 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= ' )
u0=input(‘initial Displacement in m= '
v0=input(‘initial velocity in m= '
omega_n=sqrt(k/m),
zeta=c/(2*m*omega_n);
if (zeta>1)
display(over damp system)
u=
end
if(zeta==1)
display(‘critically damped system')
u=
end