Please help me in completing this program?
Afficher commentaires plus anciens
function du=mydiff(tau,u)
tau= 1:20;
for tau=1:20
u(tau)=1;
end
b=4.5; %backlash,2b=9 micro metre
Z1=62; %no. of teeth in Gear
Z2=42; %no. of teeth in Pinion
T1=7640; %torque of Gear in N-mm
N1=5000; %Speed of Gear in rpm
M1=11.815; % mass of gear in kg
M2=5.357; %mass of pinion in kg
I1=37257; %inertia of Gear in kg-mm2
I2=82103; %inertia of pinion in kg-mm2
me=2.279; %mass equivalent in kg
km=2.3426e7; %average stiffness in N/m
Fm=105; %total Normal force in N
omega0=sqrt(km/me); % frequency of gear pairin rad/sec
omegae=(2*pi*Z1*N1)/60; %natural frequency in rad/sec
ohm=omegae/omega0; % frequency ratio
F0=0.4482; %Dimensionless load=(Fm/me*l*omega0^2)
zeta=0.06; %damping ratio
t=[];
%f(u(tau)) Dimensionless nonlinear gap function
tau=omega0*t; %Dimensionless time
l=1e-6; %characteristic length
q(t)=l*u(tau);
thetaj=0;
kj=[23.5396 3.5448 0.8489 0.5454 .0302 0.5012]*10^6;
kbn=kj/km;
ej=[20 3.45 0.26 .45]*10^-6;
ejb=ej/l;
for tau=1:20
if(u(tau)>b/l)
f(u(tau))=u(tau)-b/l;
end
if(u(tau)> -b/l && u(tau)<b/l)
f(u(tau))=0;
end
if(u(tau)<-b/l)
f(u(tau))=u(tau)+b/l;
end
end
for n= 1 :5
sum1=kbn*cos(n*ohm*tau)*f(u(tau));
end
sum1=sum1+1;
for j=1:5
sum2=ejb*j*j*cos((j*ohm*tau)+thetaj);
end
du(1) = u(2);
du(2) = F0+(ohm*ohm*sum2)-sum1-(2*zeta*u(2));
du = [du(1); du(2)];
[tau,u] = ode15s('mydiff', [0 25], [1 1]);
plot(tau,u(:,1))
whats wrong with this program?
2 commentaires
Walter Roberson
le 19 Mai 2013
- there is no indication of its purpose.
- there is no description of the problem being encountered
ravishankar
le 19 Mai 2013
Modifié(e) : ravishankar
le 19 Mai 2013
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Assembly dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!