Sunteți pe pagina 1din 6

NAME VINOD KUMAR YADAV(221414)

SINGLE DEGREE OF FREEDOM SYSTEM FORCED VIBRATION


clc
clear all
close all
% single degree of freedom
% system data
m=input('mass')
k=input('stiffness')
f0=input('excitation force in N')
w=input('excitation frequency')
zeta1=0;
zeta2=.25;
zeta3=1;
zeta4=2;
x0=input('initial disp')
v0=input('initial velocity')
t=input('Duration of simulation')
%solution
tv=[0:0.01:t];
wn=sqrt(k/m)
r=w/wn
phi1=atan((2*3.14*zeta1)/(1-r^2))
phi2=atan((2*3.14*zeta2)/(1-r^2))
phi3=atan((2*3.14*zeta3)/(1-r^2))
phi4=atan((2*3.14*zeta4)/(1-r^2))
xs=f0/k
%undamped system
xh1=x0*cos(wn*tv)+v0/wn*sin(wn*tv)
xp1=xs*sin(w*tv-phi1)/sqrt((1-r^2)^2+(2*zeta1*r)^2)
x1=xh1+xp1
figure(1)


subplot(311)
plot(tv,xh1)
title('homogenous solution')
xlabel('time(s)')
ylabel('amplitude(m)')
subplot(312)
plot(tv,xp1)
title('particular integral')
xlabel('time(s)')
ylabel('amplitude(m)')
subplot(313)
plot(tv,x1)
title('complete solution')
xlabel('time(s)')
ylabel('amplitude(m)')
%underdamped system
xh2=exp(-zeta2*wn*tv).*((x0*cos(sqrt(1-zeta2^2)*wn*tv)+(v0+zeta2*wn*x0)/((sqrt(1-zeta2^2))*wn)*sin(sqrt(1-
zeta2^2)*wn*tv)))
xp2=xs*sin(w*tv-phi2)/sqrt((1-r^2)^2+(2*zeta2*r)^2)
x2=xh2+xp2
figure(2)
subplot(311)
plot(tv,xh1)
title('homogenous solution')
xlabel('time(s)')
ylabel('amplitude(m)')
subplot(312)
plot(tv,xp1)
title('particular integral')
xlabel('time(s)')
ylabel('amplitude(m)')
subplot(313)
plot(tv,x1)


title('complete solution')
xlabel('time(s)')
ylabel('amplitude(m)')
%over damped system
c1=(x0*wn*(zeta4+sqrt(zeta4^2-1)+v0))/(2*wn*sqrt(zeta4^2-1))
c2=(-x0*wn*(zeta4-sqrt(zeta4^2-1)-v0))/(2*wn*sqrt(zeta4^2-1))
xh4=c1*exp((-zeta4+sqrt(zeta4^2-1))*wn*tv)+c2*exp((-zeta4-sqrt(zeta4^2-1))*wn*tv)
xp4=xs*sin(w*tv-phi4)/sqrt((1-r^2)^2+(2*zeta4*r)^2)
x4=xh4+xp4
figure(3)
subplot(311)
plot(tv,xh1)
title('homogenous solution')
xlabel('time(s)')
ylabel('amplitude(m)')
subplot(312)
plot(tv,xp1)
title('particular integral')
xlabel('time(s)')
ylabel('amplitude(m)')
subplot(313)
plot(tv,x1)
title('complete solution')
xlabel('time(s)')
ylabel('amplitude(m)')
%critical damped
xh3=(x0+(v0+wn*x0)*tv).*exp(-zeta3*wn*tv)
xp3=xs*sin(w*tv-phi3)/sqrt((1-r^2)^2+(2*zeta3*r)^2)
x3=xh3+xp3
figure(4)
subplot(311)
plot(tv,xh1)
title('homogenous solution')


xlabel('time(s)')
ylabel('amplitude(m)')
subplot(312)
plot(tv,xp1)
title('particular integral')
xlabel('time(s)')
ylabel('amplitude(m)')
subplot(313)
plot(tv,x1)
title('complete solution')
xlabel('time(s)')
ylabel('amplitude(m)')



INPUTS
Mass=20kg
Stifness=200000N/m
Initial Displacement=0.015m
Initial Velocity=0.1sec
Excitation Force= 50N
Excitation Frequency=70rad/sec
Time=0.5sec
















OUTPUT
UNDAMPED



UNDERDAMPED







CRITICALLY DAMPED



OVERDAMPED

S-ar putea să vă placă și