汽车理论MatLab作业编程答案大全

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

m1=2000; %初始化参数
m2=1800;
mz=3880;
g=9.81;
r=0.367;
nT=0.85;
f=0.013;
CDA=2.77;
i0=5.83;
ig=[5.56 2.769 1.644 1.00 0.793]; %1档至5档变速箱传动比
If=0.218;
Iw1=1.798;
Iw2=3.598;
a=1.947;
L=3.2;
hg=0.9;
Iw=2*Iw1+4*Iw2;
nmin=600;
nmax=4000;
for i=1:341
n(i)=(i+59)*10; %对应转速600-4000rpm
Ttq(i)=-19.313+295.27*(n(i)/1000)-165.44*(n(i)/1000)^2+40.874*(n(i)/1000)^3-3.8445*(n(i)/1000)^4;
end
for j=1:5
for i=1:341
Ft(i,j)=Ttq(i)*ig(j)*i0*nT/r;
Ua(i,j)=0.377*r*n(i)/(ig(j)*i0);
Fz(i,j)=CDA*Ua(i,j)^2/21.15+mz*g*f;%计算各档位下的驱动力和行驶阻力
end
end
figure(1);
plot(Ua,Ft,Ua,Fz,'--','LineWidth',2) %作汽车驱动力与行驶阻力平衡图
axis([0 125 0 14500]);
title('汽车驱动力-行驶阻力平衡图');
legend('Ft1','Ft2','Ft3','Ft4','Ft5','Ff+Fw')
xlabel('Ua/(km/h)');
ylabel('Ft/(N)');
gtext('F_{t1}');
gtext('F_{t2}');
gtext('F_{t3}');
gtext('F_{t4}');
gtext('F_{t5}');
gtext('F_{f}+F_{w}');
% for l=1:341
% m(l) = abs( ( Ft(l,5)-Fz(l,5)));
% end
% for l=1:341
% mm(l)=min(m(l));
% Uam =Ua(l,5);
% end
%end
% disp(Uam);
Ft1max=max(Ft(:,1));
for k=1:341
if (Ft(k,1)==Ft1max)
Uamax = Ua(k,1);
end
end
Fz1=CDA*Uamax^2/21.15+mz*g*f;
imax=(Ft1max-Fz1)/(mz*g);
disp('后轮驱动');
disp(imax);
disp(Uamax);
C=imax/(a/L+hg*imax/L) % 相应的附着率
for j=1:5
for i=1:341
delta=1+Iw/(mz*r^2)+If*ig(j)^2*i0^2*nT/(mz*r^2);%相应的汽车旋转质量换算系数
a(i,j)=(Ft(i,j)- Fz(i,j))/(delta*mz); %汽车的行驶加速度
end
end
for j=1:5
for i=1:341
h(i,j)=1/a(i,j); %加速度倒数
end
end
figure(2);
plot(Ua,h,'LineWidth',2);
axis([0 98 0 14]);
title('汽车的加速度倒数-速度曲线图');
legend('1/a1','1/a2','1/a3','1/a4','1/a5')
xlabel('Ua/(km/h)')
ylabel('1/a')
gtext('1/a1')
gtext('1/a2')
gtext('1/a3')
gtext('1/a4')
gtext('1/a5')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for j=1:5
for i=1:341
Ua(i,j)=0.377*r*nmin/ig(j)/i0;
Ua(i,j)=0.377*r*nmax/ig(j)/i0;
deta=0*ig;
for i=1:5
deta(i)=1+(Iw1+Iw2)/(m*r^2)+(If*(ig(i))^2*i0^2*yitaT)/(m*r^2);
end
deta_u=0.01;
ua=[6:deta_u:99];N=length(ua);n=0;Tq=0;Ft=0;inv_a=0*ua;delta=0*ua;


for i=1:N
k=i;
if ua(i)<=u2(2)
n=ua(i)*

(ig(2)*i0/r)/0.377;
Tq=-19.313+295.27*(n/1000)-165.44*(n/1000)^2+40.874*(n/1000)^3-3.8445*(n/1000)^4;
Ft=Tq*ig(2)*i0*yitaT/r;
inv_a(i)=(deta(2)*m)/(Ft-Ff-Fw(i));
delta(i)=deta_u*inv_a(i)/3.6;
else if ua(i)<=u2(3)
n=ua(i)*(ig(3)*i0/r)/0.377;
Tq=-19.313+295.27*(n/1000)-165.44*(n/1000)^2+40.874*(n/1000)^3-3.8445*(n/1000)^4;
Ft=Tq*ig(3)*i0*yitaT/r;
inv_a(i)=(deta(3)*m)/(Ft-Ff-Fw(i));
delta(i)=deta_u*inv_a(i)/3.6;
elseif ua(i)<=u2(4)
n=ua(i)*(ig(4)*i0/r)/0.377;
Tq=-19.313+295.27*(n/1000)-165.44*(n/1000)^2+40.874*(n/1000)^3-3.8445*(n/1000)^4;
Ft=Tq*ig(4)*i0*yitaT/r;
inv_a(i)=(deta(4)*m)/(Ft-Ff-Fw(i));
delta(i)=deta_u*inv_a(i)/3.6;
else
n=ua(i)*(ig(5)*i0/r)/0.377;
Tq=-19.313+295.27*(n/1000)-165.44*(n/1000)^2+40.874*(n/1000)^3-3.8445*(n/1000)^4;
Ft=Tq*ig(5)*i0*yitaT/r;
inv_a(i)=(deta(5)*m)/(Ft-Ff-Fw(i));
delta(i)=deta_u*inv_a(i)/3.6;
end
a=delta(1:k);
t(i)=sum(a);
end
plot(t,ua),grid
axis([0 100 0 60])
title('汽车加速时间曲线')
xlabel('t-s')
ylabel('ua-km/h')

相关文档
最新文档