马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
function harmomnically_excited_vobration(M,K,C,F0,W,T)
%response of a damped system under harmonic force
%eqution: m*ddx+C*dx+K*x=F0*cos(w*t)
%we assume solution Xp(t)=X*cos(wt-q)
%from vectorial representation :
%we can obtain: X=F0/sqrt(((K-M*w^2)^2+C^2*w^2));
% q=atan(C*w/(K-M*w^2));
%where X and Q are constands to be determined
%plot response
clc
clear all;
M=10;K=4000;w=10;F0=100;C=20;
if nargin<6 T=0:0.01:20;end
T=0:0.001:1.6;
A=F0/sqrt((K-M*w^2)^2+(C*w)^2);
q=atan(C*w/(K-M*w^2));
X=A.*cos(w.*T-ones(size(T))*q);
figure(1)
plot(T,X,'r');grid on; title('response of a damped system under harmonic force');
xlabel('time');ylabel('displacement')
%plot bode piture
%wn=sqrt(K/M);
%e=C/(2*sqrt(K/M)); as damped radio
%r=w/wn frequency radio
% dst=F0/K means that deflection under the static force F0
%Ax=X/dst=1/(sqrt((1-r^2)^2+(2*e*r)^2)); means that amplitude radio
%q=atan(2*e*r/(1-r^2));
wn=sqrt(K/M);w=[0.01:0.01*wn:3*wn]; %discusion the frequency
if length(w)~=1;
e=[ 0.2,0.5 0.8,1,5]; %discussion only five situation
for n=1:1:length(e)
r=w/wn;
a=(ones(size(r))-r.^2).^2;
b=(2*e(n).*r).^2 ;
Ax=ones(size(a))./sqrt(a+b);
a=ones(size(r))-r.^2;
q=atan(2*e(n)*r./a);
q1=q*180./pi;
figure(2)
plot(r,Ax,'r');grid on;hold on;xlabel('frequency radio');ylabel('amplitude radio');
%figure(3)
%plot(r,q1,'r');grid on;hold on;xlabel('frequency radio');ylabel('phase angle');
end
end
%now we know the max value is Ax=1/(2*e*sqrt(1-e^2)) (3)
% when w=wn.we get Ax=1/2*e so if the maximum amplifude is know ,the
% damping radio canbe found by equation(3)
%diff(Ax,t)=0 when r=0
|