MATLAB画驱动力-行驶阻力图-两个程序

合集下载

汽车理论matlab作业

汽车理论matlab作业

一、确定一轻型货车的动力性能。

1)绘制汽车驱动力与行驶阻力平衡图;2)求汽车最高车速与最大爬坡度;3)绘制汽车行驶加速度倒数曲线;用计算机求汽车用Ⅱ档起步加速行驶至 70km/h 所需的加速时间。

已知数据略。

(参见《汽车理论》习题第一章第3题)解题程序如下:用Matlab语言(1)绘制汽车驱动力与行驶阻力平衡图m1=2000; m2=1800; mz=3880;g=9.81; r=0.367; CdA=2.77; f=0.013; nT=0.85;ig=[5.56 2.769 1.644 1.00 0.793]; i0=5.83;If=0.218; Iw1=1.798; Iw2=3.598;Iw=2*Iw1+4*Iw2;for i=1:69n(i)=(i+11)*50;Ttq(i)=-19.313+295.27*(n(i)/1000)-165.44*(n(i)/1000)^2+40.874*(n(i)/1000)^3-3.8 445*(n(i)/1000)^4;endfor j=1:5for i=1:69Ft(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;endendplot(ua,Ft,ua,Ff,ua,Ff+Fw)title('汽车驱动力与行驶阻力平衡图');xlabel('ua(km/h)');ylabel('Ft(N)');gtext('Ft1')gtext('Ft2')gtext('Ft3')gtext('Ft4')gtext('Ft5')gtext('Ff+Fw')(2)求最大速度和最大爬坡度for k=1:175n1(k)=3300+k*0.1;Ttq(k)=-19.313+295.27*(n1(k)/1000)-165.44*(n1(k)/1000)^2+40.874*(n1(k)/1000)^33.8445*(n1(k)/1000)^4;Ft(k)=Ttq(k)*ig(5)*i0*nT/r;ua(k)=0.377*r*n1(k)/(ig(5)*i0);Fz(k)=CdA*ua(k)^2/21.15+mz*g*f;E(k)=abs((Ft(k)-Fz(k)));endfor k=1:175if(E(k)==min(E))disp('汽车最高车速=');disp(ua(k));disp('km/h');endendfor p=1:150n2(p)=2000+p*0.5;Ttq(p)=-19.313+295.27*(n2(p)/1000)-165.44*(n2(p)/1000)^2+40.874*(n2(p)/1000)^3-3.8445*(n2(p)/1000)^4;Ft(p)=Ttq(p)*ig(1)*i0*nT/r;ua(p)=0.377*r*n2(p)/(ig(1)*i0);Fz(p)=CdA*ua(p)^2/21.15+mz*g*f;af(p)=asin((Ft(p)-Fz(p))/(mz*g));endfor p=1:150if(af(p)==max(af))i=tan(af(p));disp('汽车最大爬坡度=');disp(i);endend汽车最高车速=99.0679km/h汽车最大爬坡度=0.3518(3)计算2档起步加速到70km/h所需时间for i=1:69n(i)=(i+11)*50;Ttq(i)=-19.313+295.27*(n(i)/1000)-165.44*(n(i)/1000)^2+40.874*(n(i)/1000)^3-3.8 445*(n(i)/1000)^4;endfor j=1:5for i=1:69deta=1+Iw/(mz*r^2)+If*ig(j)^2*i0^2*nT/(mz*r^2);ua(i,j)=0.377*r*n(i)/(ig(j)*i0);a(i,j)=(Ttq(i)*ig(j)*i0*nT/r-CdA*ua(i,j)^2/21.15-mz*g*f)/(deta*mz);if(a(i,j)<=0)a(i,j)=a(i-1,j);endif(a(i,j)>0.05)b1(i,j)=a(i,j);u1(i,j)=ua(i,j);elseb1(i,j)=a(i-1,j);u1(i,j)=ua(i-1,j);endb(i,j)=1/b1(i,j);endendx1=u1(:,1);y1=b(:,1);x2=u1(:,2);y2=b(:,2);x3=u1(:,3);y3=b(:,3);x4=u1(:,4);y4=b(:,4);x5=u1(:,5);y5=b(:,5);plot(x1,y1,x2,y2,x3,y3,x4,y4,x5,y5); title('加速度倒数时间曲线');axis([0 120 0 30]);xlabel('ua(km/h)');ylabel('1/aj');gtext('1/a1')gtext('1/a2')gtext('1/a3')gtext('1/a4')gtext('1/a5')for i=1:69A=ua(i,3)-ua(69,2);if (A<1&A>0)j=i;endB=ua(i,4)-ua(69,3);if(B<2&B>0)k=i;endif(ua(i,4)<=70)m=i;endendt=ua(1,2)*b(1,2);for p1=2:69t1(p1)=(ua(p1,2)-ua(p1-1,2))*(b(p1,2)+b(p1-1,2))*0.5;t=t+t1(p1);endfor p2=j:69t2(p2)=(ua(p2,3)-ua(p2-1,3))*(b(p2,3)+b(p2-1,3))*0.5;t=t+t2(p2);endfor p3=k:mt3(p3)=(ua(p3,4)-ua(p3-1,4))*(b(p3,4)+b(p3-1,4))*0.5;t=t+t3(p3);endt=t+(ua(j,3)-ua(69,2))*b(69,2)+(ua(k,4)-ua(69,3))*b(69,3)+(70-ua(m,4))*b(m,4);tz=t/3.6;disp('加速时间=');disp(tz);disp('s');加速时间=29.0585s二、计算与绘制题1 中货车的1)汽车功率平衡图;2)最高档与次高档的等速百公里油耗曲线。

Matlab程序模拟汽车理论中的数据特性图1

Matlab程序模拟汽车理论中的数据特性图1

车辆理论作业第三组第一大题确定一辆轻型货车的动力性能 1、绘制发动机的使用外特性曲线 n=600:1:4000 N=n/1000T=-19.313+295.27*n/1000-165.44*N.*N+40.874*N.*N.*N-3.8445*N.*N.*N .*NPe=T.*n/9550 %发动机的净功率 figure(1) plot(n,T) xlabel('转速n') ylabel('转矩T') figure(2) plot(n,Pe) xlabel('转速n') ylabel('功率Pe')5001000150020002500300035004000100110120130140150160170180转速n转矩T5001000150020002500300035004000010203040506070转速n功率P e2、绘制驱动力---行驶阻力平衡图 i0=6.17; %减速器的传动比 ig(1)=6.09 % 一档的传动比 ig(2)=3.09 ig(3)=1.71 ig(4)=1.00 nT=0.85 r=0.367 f=0.013 m1=3880 m2=9590 CdA=2.77 Ff1=m1*9.8*f Ff2=m2*9.8*fft1=T*ig(1)*i0*nT/r %一档所产生的驱动力 ft2=T*ig(2)*i0*nT/r ft3=T*ig(3)*i0*nT/r ft4=T*ig(4)*i0*nT/r Ft=[ft1;ft2;ft3;ft4]';ua1=0.377*r*n/(ig(1)*i0) %一档的速度 ua2=0.377*r*n/(ig(2)*i0) ua3=0.377*r*n/(ig(3)*i0) ua4=0.377*r*n/(ig(4)*i0) ua=[ua1;ua2;ua3;ua4]';fw1=CdA*ua1.^2/21.15+Ff1 %一档的行驶阻力 fw2=CdA*ua2.^2/21.15+Ff1 fw3=CdA*ua3.^2/21.15+Ff1 fw4=CdA*ua4.^2/21.15+Ff1Fz1=[fw1;fw2;fw3;fw4]'; figure(3)plot(ua,Ft) %绘制各档的驱动力曲线hold onplot(ua,Fz1) %绘制行驶阻力曲线 hold onplot(ua4,Ff2) %绘制滚动阻力曲线 xlabel('ua/(km.h)')ylabel('F/N')title('汽车驱动力-行驶阻力平衡图')text(20,12000,'Ft1'); text(30,6000,'Ft2'); text(40,4000,'Ft3'); text(80,3000,'Ft4');text(90,2200,'(空载)Ff+fw'); text(105,1450,'满载Ff')102030405060708090200040006000800010000120001400016000ua/(km.h)F /N汽车驱动力-行驶阻力平衡图Ft1Ft2Ft3Ft4(空载)Ff+Fw满载Ff一档的驱动力很大,可用于爬坡且坡度较大;二档用于直接原地起步加速 3、绘制动力特性图D=(Ft-Fw)/(m1*9.8) %求动力因数f1=0.0076+0.000056*ua %一定车速条件下的滚动阻力 figure(4) plot(ua,D) hold onplot(ua,f1) text(20,0.3,'I') text(20,0.154,'II') text(40,0.1,'III') text(80,0.05,'IV') text(110,0.025,'f') title('汽车动力特性图') xlabel('ua/(km.h)') ylabel('D')1020304050607080900.050.10.150.20.250.30.350.40.45IIIIIIIVf汽车动力特性图ua/(km.h)DIf=0.218Iw1=1.798 Iw2=3.598die1=1+(Iw1+Iw2)/(m1*r^2)+(If*i0^2*nT*ig(1).^2)/(m1*r^2);%一档的旋转质量换算系数die2=1+(Iw1+Iw2)/(m1*r^2)+(If*i0^2*nT*ig(2).^2)/(m1*r^2); die3=1+(Iw1+Iw2)/(m1*r^2)+(If*i0^2*nT*ig(3).^2)/(m1*r^2); die4=1+(Iw1+Iw2)/(m1*r^2)+(If*i0^2*nT*ig(4).^2)/(m1*r^2); die=[die1;die2;die3;die4]';a1=9.8*D(:,1)/die1-9.8*f/die1; %求一档的加速度 a2=9.8*D(:,2)/die2-9.8*f/die2; a3=9.8*D(:,3)/die3-9.8*f/die3; a4=9.8*D(:,4)/die4-9.8*f/die4; aI=1./a1 %求一档的加速度倒数 aII=1./a2 aIII=1./a3 aIV=1./a4aa=[aI,aII,aIII,aIV]';figure(5) %绘制各档的加速度倒数曲线 plot(ua1,aI) hold on plot(ua2,aII) hold onplot(ua3,aIII) hold onplot(ua4,aIV)axis([5 99 0.01 10])10203040506070809012345678910aI aII aIIIaIV加速度倒数曲线ua/(km.h)1/a由图可知,加速度倒数没有交点,则可以在每档达到最大车速时换挡 nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=6.17;If=0.218; Iw1=1.798;Iw2=3.598;L=3.950;a=2.000;hg=0.9;m=3880;g=9.8; G=m*g; ig=[6.09 3.09 1.71 1.00 ]; nmin=600;nmax=4000; u1=0.377*r*nmin./ig/i0; u2=0.377*r*nmax./ig/i0;deta=0*ig; for i=1:4deta(i)=1+(Iw1+Iw2)/(m*r^2)+(If*(ig(i))^2*i0^2*nT)/(m*r^2); endua=[0:0.01:99];N=length(ua);n=0;Tq=0;Ft=0;inv_a=0*ua;delta=0*ua; Ff=G*f;Fw=CDA*ua.^2/21.15; 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*nT/r;inv_a(i)=(deta(2)*m)/(Ft-Ff-Fw(i)); delta(i)=0.01*inv_a(i)/3.6; elseif 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*nT/r;inv_a(i)=(deta(3)*m)/(Ft-Ff-Fw(i)); delta(i)=0.01*inv_a(i)/3.6;else 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*nT/r;inv_a(i)=(deta(4)*m)/(Ft-Ff-Fw(i)); delta(i)=0.01*inv_a(i)/3.6; enda=delta(1:k); t(i)=sum(a); endplot(t,ua,'b','LineWidth',2);axis([0 100 0 100]);title('四档汽车二档原地起步换挡加速时间曲线'); xlabel('时间t (s )');ylabel('速度ua (km/h )');1020304050607080901000102030405060708090100四档汽车二档原地起步换挡加速时间曲线时间t (s )速度u a (k m /h )第二大题n=600:1:4000 N=n/1000T=-19.313+295.27*n/1000-165.44*N.*N+40.874*N.*N.*N-3.8445*N.*N.*N .*NPe=T.*n/9550 figure(1) plot(n,T)text(1000,120,'转矩T') hold on plot(n,Pe)text(2000,20,'发动机净功率Pe')5001000150020002500300035004000020406080100120140160180转矩T发动机净功率Pei0=6.17; ig(1)=6.09 ig(2)=3.09 ig(3)=1.71 ig(4)=1.00 nT=0.85 r=0.367 f=0.013 m1=3880 m2=9590 CdA=2.77ua1=0.377*r*n/(ig(1)*i0) ua2=0.377*r*n/(ig(2)*i0) ua3=0.377*r*n/(ig(3)*i0) ua4=0.377*r*n/(ig(4)*i0); ua=10:1:100Pf=m1*9.8*f.*ua/(3600) Pw=CdA*ua.^3/(76140) figure(2) plot(ua1,Pe) hold on plot(ua2,Pe) hold on plot(ua3,Pe) hold onplot(ua4,Pe) hold onplot(ua,(Pf+Pw)/nT)010203040506070809010010203040506070评价:一二三档的后备功率都比较大,可在一定坡度的道路上直接启动加速; 在最高档达到最高车速时,n0=[815 1207 1614 2012 2603 3006 3403 3884]B00=[1326.8 1354.7 1284.4 1122.9 1141.0 1051.2 1233.9 1129.7] B10=[-416.46 -303.98 -189.75 -121.59 -98.893 -73.714 -84.478 -45.291] B20=[72.379 36.657 14.524 7.0035 4.4763 2.8593 2.9788 0.71113]B30=[-5.8629 -2.0533 -0.51184 -0.18517 -0.091077 -0.05138 -0.047449 -0.00075215]B40=[0.17768 0.043072 0.0068164 0.0018555 0.00068906 0.00035032 0.00028230 -0.000038568] B0=spline(n0,B00,n) B1=spline(n0,B10,n) B2=spline(n0,B20,n) B3=spline(n0,B30,n) B4=spline(n0,B40,n)Pf3=m1*9.8*f.*ua3/(3600) Pw3=CdA*ua3.^3/(76140) Pf4=m1*9.8*f.*ua4/(3600) Pw4=CdA*ua4.^3/(76140) Ff1=m1*9.8*ffz3=CdA*ua3.^2/21.15+Ff1 fz4=CdA*ua4.^2/21.15+Ff1 %Pe3=fz3.*ua3./(3600*nT); %Pe4=fz4.*ua4./(3600*nT); Pe3=(Pf3+Pw3)/nTPe4=(Pf4+Pw4)/nTb3=B0+B1.*Pe3+B2.*Pe3.^2+B3.*Pe3.^3+B4.*Pe3.^4 b4=B0+B1.*Pe4+B2.*Pe4.^2+B3.*Pe4.^3+B4.*Pe4.^4Qs4=Pe4.*b4./(1.02*ua4*7.10*9.8) Qs3=Pe3.*b3./(1.02*ua3*7.10*9.8) figure(3)plot(ua4,Qs4) hold on plot(ua3,Qs3)01020304050607080901.41.61.822.22.42.62.8n=600:1:4000 N=n/1000T=-19.313+295.27*n/1000-165.44*N.*N+40.874*N.*N.*N-3.8445*N.*N.*N .*NPe=T.*n/9550 i0=6.17; ig(1)=6.09 ig(2)=3.09 ig(3)=1.71 ig(4)=1.00 nT=0.85 r=0.367 f=0.013 m1=3880 m2=9590 CdA=2.77ua1=0.377*r*n/(ig(1)*i0) ua2=0.377*r*n/(ig(2)*i0) ua3=0.377*r*n/(ig(3)*i0) ua4=0.377*r*n/(ig(4)*i0);n0=[815 1207 1614 2012 2603 3006 3403 3884]B00=[1326.8 1354.7 1284.4 1122.9 1141.0 1051.2 1233.9 1129.7] B10=[-416.46 -303.98 -189.75 -121.59 -98.893 -73.714 -84.478 -45.291]B20=[72.379 36.657 14.524 7.0035 4.4763 2.8593 2.9788 0.71113]B30=[-5.8629 -2.0533 -0.51184 -0.18517 -0.091077 -0.05138 -0.047449 -0.00075215]B40=[0.17768 0.043072 0.0068164 0.0018555 0.00068906 0.00035032 0.00028230 -0.000038568]B0=spline(n0,B00,n)B1=spline(n0,B10,n)B2=spline(n0,B20,n)B3=spline(n0,B30,n)B4=spline(n0,B40,n)Pf3=m1*9.8*f.*ua3/(3600) %三档的滚动阻力功率Pw3=CdA*ua3.^3/(76140) %三档的的空气阻力功率Pf4=m1*9.8*f.*ua4/(3600)Pw4=CdA*ua4.^3/(76140)Ff1=m1*9.8*fPe3=(Pf3+Pw3)/nT %三档的发动机净功率Pe4=(Pf4+Pw4)/nT %四档的发动机净功率b3=B0+B1.*Pe3+B2.*Pe3.^2+B3.*Pe3.^3+B4.*Pe3.^4b4=B0+B1.*Pe4+B2.*Pe4.^2+B3.*Pe4.^3+B4.*Pe4.^4Qs4=Pe4.*b4./(1.02*ua4*7.10) %四档的百公里油耗Qs3=Pe3.*b3./(1.02*ua3*7.10) %三档的百公里油耗ua=[25 40 50]ss=[50 250 250]fz=CdA*ua.^2/21.15+Ff1 %匀速条件下的阻力Pee=fz.*ua/(3600*nT);b=spline(b4,Pe4,Pee) %匀速条件下的燃油消耗率Qsy=Pee.*b./(1.02*ua*7.10)a=[0.2 0.2 -0.36]dt1=1/(3.6*0.2)dt2=1/(3.6*0.2)dt3=1/(3.6*(0.36))ua11=25:1:40ua22=40:1:50ua33=50:-1:25b11=spline(ua4,b4,ua11) %在加速条件下的各个速度节点的燃油消耗率b22=spline(ua4,b4,ua22)b33=spline(ua4,b4,ua33)If=0.218Iw1=1.798Iw2=3.598die4=1+(Iw1+Iw2)/(m1*r^2)+(If*i0^2*nT*ig(4).^2)/(m1*r^2);Pej1=(m1*9.8*f.*ua11/(3600)+CdA.*ua11.^3/(76140)+(die4*m1.*ua11/3600)*0.2)/nT %在三个加速条件下的各个速度节点Pej2=(m1*9.8*f.*ua22/(3600)+CdA.*ua22.^3/(76140)+(die4*m1.*ua22/3 600)*0.2)/nT %的发动机净功率Pej3=(m1*9.8*f.*ua33/(3600)+CdA.*ua33.^3/(76140)+(die4*m1.*ua33/3 600)*0.2)/nT %Qstj1=Pej1.*b11/(367.1*7.10) %在三中加速条件下的,各自的单位时间的燃油消耗量Qstj2=Pej2.*b22/(367.1*7.10)Qstj3=Pej3.*b33/(367.1*7.10)i11=size(Qstj1)i22=size(Qstj2)i33=size(Qstj3)i1=i11(2)i2=i22(2)i3=i33(2)Qt1=Qstj1(2:i1-1)Qt2=Qstj2(2:i2-1)Qt3=Qstj3(2:i3-1)q1=((Qstj1(1)+Qstj1(i1))*dt1./2+sum(Qt1)*dt1)/10q2=((Qstj2(1)+Qstj2(i2))*dt2./2+sum(Qt2)*dt2)/10q3=((Qstj3(1)+Qstj3(i3))*dt3./2+sum(Qt3)*dt3)/10Qall=(q1+q2+q3+Qsy(:,1)+Qsy(:,2)+Qsy(:,3))*100/1075q1 =5.8526q2 =4.9810 q3 =6.0186 Qall =2.7916第三大题(1)m0=4880; %空载质量m/kghg0=0.845; %空载质心高L0=3.95; %空载轴距a0=2.100; %空载质心至前轴距离m=9290; %满载质量m/kghg=1.170; %满载质心高L=3.95; %满载轴距a=2.950; %满载质心至前轴距离BB=0.38; %B为制动力分配系数g=9.8;G=m*g;b=L-a;G0=m0*g;b0=L0-a0;Fu1 =0:1000:100000;Fu2=1/2*(G/hg*(b^2+4*hg*L/G*Fu1).^0.5-(G*b/hg+2*Fu1));Fu02=1/2*(G0/hg0*(b0^2+4*hg0*L0/G0*Fu1).^0.5-(G0*b0/hg0+2*Fu1));F2=(1-B)*Fu1/B;plot(Fu1,Fu2) %绘制满载时的I曲线hold onplot(Fu1,Fu02) %绘制空载时的I曲线hold onplot(Fu1,F2); %%绘制beta曲线title('beta线和I曲线')text(30000,50000,'beta曲线')text(25000,10000,'空载时I曲线')text(25000,30000,'满载时I曲线')xlabel('Fu1')ylabel('Fu2')figure(2)fe=[0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9];for i=1:10Fxb1fk=0:100:120000;Fxb1rk=0:100:120000;Fxb2fk=(L0-fe(i)*hg0)/(fe(i)*hg0).*Fxb1fk-G0*b0/hg0;Fxb2rk=(-1*fe(i)*hg0)/(L0+fe(i)*hg0).*Fxb1rk+fe(i)*G0*a0/(L0+fe(i )*hg0);plot(Fxb1fk,Fxb2fk)hold onplot(Fxb1rk,Fxb2rk,'r')hold onendxlabel('Fxb1')ylabel('Fxb2')axis([0 120000 0 40000])title('空载时的f、r线组图')figure(3)for i=1:10Fxb1fk=0:100:220000;Fxb1rk=0:100:220000;Fxb2fk=(L-fe(i)*hg)/(fe(i)*hg).*Fxb1fk-G*b/hg;Fxb2rk=(-1*fe(i)*hg)/(L+fe(i)*hg).*Fxb1rk+fe(i)*G*a/(L+fe(i)*hg); plot(Fxb1fk,Fxb2fk)hold onplot(Fxb1rk,Fxb2rk,'r')hold onendxlabel('Fxb1')ylabel('Fxb2')axis([0 220000 0 80000])title('满载时的f、r线组图')012345678910x 104-2024681012141618x 104beta 线和I 曲线beta 曲线空载时I 曲线满载时I 曲线Fu1F u 2024681012x 10400.511.522.533.54x 104Fxb1F x b 2空载时的f 、r 线组图00.20.40.60.81 1.21.4 1.6 1.822.2x 105012345678x 104Fxb1F x b 2满载时的f 、r 线组图(2)-(3)m0=4880; %空载质量m/kghg0=0.845; %空载质心高L0=3.95; %空载轴距a0=2.100; %空载质心至前轴距离m=9290; %满载质量m/kghg=1.170; %满载质心高L=3.95; %满载轴距a=2.950; %满载质心至前轴距离BB=0.38; %B 为制动力分配系数g=9.8;G=m*g;b=L-a;G0=m0*g;b0=L0-a0;z=0:0.1:1; %制动强度fef=B*z*L./(b+z*hg);fef0=B*z*L0./(b0+z*hg0);fer=(1-B)*z*L./(a-z*hg);fer0=(1-B)*z*L0./(a0-z*hg0);figure(1)plot(z,fef,z,fef0,z,fer,z,fer0,z,z)text(0.8,1.5,'空车后轮')text(0.8,1.2,'满载后轮')text(0.7,0.6,'满载前轮')text(0.8,0.4,'空车前轮')figure(2)Ef=z./fef*100Ef0=z./fef0*100Er=z./fer*100Er0=z./fer0*100plot(fef,Ef,fer,Er)hold onplot(fef0,Ef0,fer0,Er0)axis([0 1 0 100])text(0.3,90,'Ef')text(0.8,90,'Er 满载')text(0.3,70,'Er 空载')00.10.20.30.40.50.60.70.80.9100.20.40.60.811.21.41.61.82空车后轮满载后轮满载前轮空车前轮00.10.20.30.40.50.60.70.80.910102030405060708090100Ef Er 满载Er 空载m0=4880;hg=0.845;l=3.950;a=2.100;b=1.850;beita=0.38;g=9.8;G0=m0*g ;m=9290;Hg=1.170;L=3.950;A=2.950;B=1.050;beita=0.38;g=9.8;G=m*g;t1=0.02;t2=0.02;ua0=30;fai=0.80;z=0:0.01:1.0;faifk=beita*z*l./(b+z*hg);faifm=beita*z*L./(B+z*Hg);fairk=(1-beita)*z*l./(a-z*hg);fairm=(1-beita)*z*L./(A-z*Hg);Efk=z./faifk*100;Efm=z./faifm*100;Erk=z./fairk*100;Erm=z./fairm*100;ak1=Erk(81)*g*fai/100;am1=Erm(81)*g*fai/100;Sk1=(t1+t2/2)*ua0/3.6+ua0^2/(25.92*ak1);Sm1=(t1+t2/2)*ua0/3.6+ua0^2/(25.92*am1);disp('空载时,汽车制动距离Sk1=');disp(Sk1);disp('满载时,汽车制动距离Sm1=');disp(Sm1);ak2=fai*g*a/(l+fai*hg);am2=fai*g*A/(L+fai*Hg);ak3=fai*g*b/(l-fai*hg);am3=fai*g*B/(L-fai*Hg);Sk2=(t1+t2/2)*ua0/3.6+ua0^2/(25.92*ak2);Sm2=(t1+t2/2)*ua0/3.6+ua0^2/(25.92*am2);Sk3=(t1+t2/2)*ua0/3.6+ua0^2/(25.92*ak3);Sm3=(t1+t2/2)*ua0/3.6+ua0^2/(25.92*am3);disp('空载时,前制动器损坏,汽车制动距离Sk2=');disp(Sk2);disp('满载时,前制动器损坏,汽车制动距离Sm2=');disp(Sm2);disp('空载时,后制动器损坏,汽车制动距离Sk3=');disp(Sk3);disp('满载时,后制动器损坏,汽车制动距离Sm3=');disp(Sm3);空载时,汽车制动距离Sk1=7.8668满载时,汽车制动距离Sm1=5.6354空载时,前制动器损坏,汽车制动距离Sk2=10.0061满载时,前制动器损坏,汽车制动距离Sm2=7.5854空载时,后制动器损坏,汽车制动距离Sk3=8.0879满载时,后制动器损坏,汽车制动距离Sm3=12.9629。

汽车运用作业matlab程序

汽车运用作业matlab程序

1.31)绘制驱动力与行驶阻力平衡图利用Matlab画图,具体语句如下:n=600:1:4000;Ttq=-19.313+295.27*n/1000-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/1000).^4; io=5.83;t=0.844;r=0.367;ig1=5.56;ua=0.377*r*n/(ig1*io);Ft1=Ttq*ig1*io*t/r;plot(ua,Ft1)hold on;n=600:1:4000;Ttq=-19.313+295.27*n/1000-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/1000).^4; io=5.83;t=0.844;r=0.367;ig2=2.769;ua=0.377*r*n/(ig2*io);Ft2=Ttq*ig2*io*t/r;plot(ua,Ft2)hold on;n=600:1:4000;Ttq=-19.313+295.27*n/1000-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/1000).^4; io=5.83;t=0.844;r=0.367;ig3=1.644;ua=0.377*r*n/(ig3*io);Ft3=Ttq*ig3*io*t/r;plot(ua,Ft3)hold on;n=600:1:4000;Ttq=-19.313+295.27*n/1000-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/1000).^4; io=5.83;t=0.844;r=0.367;ig4=1.00;ua=0.377*r*n/(ig4*io);Ft4=Ttq*ig4*io*t/r;plot(ua,Ft4)hold on;n=600:1:4000;Ttq=-19.313+295.27*n/1000-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/1000).^4; io=5.83;t=0.844;r=0.367;ig5=0.793;ua=0.377*r*n/(ig5*io);Ft5=Ttq*ig5*io*t/r;plot(ua,Ft5)hold on;m=3880;f=0.012;g=9.8;CdA=2.77;u=0:1:120;Ff=m*g*f;Fw=CdA*u.^2/21.15;Fr=Ff+Fw;Ft5=Ttq*ig5*io*t/r;Ff=m*g*f;Fw=CdA*u.^2/21.15;Fr=Ff+Fw;plot(u,Fr)运行生成图像如下:2)求汽车最高车速,最大爬坡度及克服该坡度时相应的附着率当Ft=Ff+Fw时,汽车处于稳定状态,并达到最高车速由图可知Umax=101km/h最大爬坡度及附着率:一档时有最大爬坡度,由驱动力与阻力图当ua=8.037km/h时: Gsin错误!未找到引用源。

汽车理论matlab作业

汽车理论matlab作业

一、确定一轻型货车的动力性能。

1)绘制汽车驱动力与行驶阻力平衡图;2)求汽车最高车速与最大爬坡度;3)绘制汽车行驶加速度倒数曲线;用计算机求汽车用Ⅱ档起步加速行驶至 70km/h 所需的加速时间。

已知数据略。

(参见《汽车理论》习题第一章第3题)解题程序如下:用Matlab语言(1)绘制汽车驱动力与行驶阻力平衡图m1=2000; m2=1800; mz=3880;g=9.81; r=0.367; CdA=2.77; f=0.013; nT=0.85;ig=[5.56 2.769 1.644 1.00 0.793]; i0=5.83;If=0.218; Iw1=1.798; Iw2=3.598;Iw=2*Iw1+4*Iw2;for i=1:69n(i)=(i+11)*50;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;endfor j=1:5for i=1:69Ft(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;endendplot(ua,Ft,ua,Ff,ua,Ff+Fw)title('汽车驱动力与行驶阻力平衡图');xlabel('ua(km/h)');ylabel('Ft(N)');gtext('Ft1')gtext('Ft2')gtext('Ft3')gtext('Ft4')gtext('Ft5')gtext('Ff+Fw')for k=1:175n1(k)=3300+k*0.1;Ttq(k)=-19.313+295.27*(n1(k)/1000)-165.44*(n1(k)/1000)^2+40.874*(n1(k)/1000)^33.8445*(n1(k)/1000)^4;Ft(k)=Ttq(k)*ig(5)*i0*nT/r;ua(k)=0.377*r*n1(k)/(ig(5)*i0);Fz(k)=CdA*ua(k)^2/21.15+mz*g*f;E(k)=abs((Ft(k)-Fz(k)));endfor k=1:175if(E(k)==min(E))disp('汽车最高车速=');disp(ua(k));disp('km/h');endendfor p=1:150n2(p)=2000+p*0.5;Ttq(p)=-19.313+295.27*(n2(p)/1000)-165.44*(n2(p)/1000)^2+40.874*(n2(p)/1000) ^3-3.8445*(n2(p)/1000)^4;Ft(p)=Ttq(p)*ig(1)*i0*nT/r;ua(p)=0.377*r*n2(p)/(ig(1)*i0);Fz(p)=CdA*ua(p)^2/21.15+mz*g*f;af(p)=asin((Ft(p)-Fz(p))/(mz*g));endfor p=1:150if(af(p)==max(af))i=tan(af(p));disp('汽车最大爬坡度=');disp(i);endend汽车最高车速=99.0679km/h汽车最大爬坡度=0.3518(3)计算2档起步加速到70km/h所需时间for i=1:69n(i)=(i+11)*50;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;endfor j=1:5for i=1:69deta=1+Iw/(mz*r^2)+If*ig(j)^2*i0^2*nT/(mz*r^2);ua(i,j)=0.377*r*n(i)/(ig(j)*i0);-mz*g*f)/(deta*mz);if(a(i,j)<=0)a(i,j)=a(i-1,j);endif(a(i,j)>0.05)b1(i,j)=a(i,j);u1(i,j)=ua(i,j);elseb1(i,j)=a(i-1,j);u1(i,j)=ua(i-1,j);endb(i,j)=1/b1(i,j);endendx1=u1(:,1);y1=b(:,1);x2=u1(:,2);y2=b(:,2);x3=u1(:,3);y3=b(:,3);x4=u1(:,4);y4=b(:,4);x5=u1(:,5);y5=b(:,5);plot(x1,y1,x2,y2,x3,y3,x4,y4,x5,y5);title('加速度倒数时间曲线');axis([0 120 0 30]);xlabel('ua(km/h)');ylabel('1/aj');gtext('1/a1')gtext('1/a2')gtext('1/a3')gtext('1/a4')gtext('1/a5')for i=1:69A=ua(i,3)-ua(69,2);if (A<1&A>0)j=i;endB=ua(i,4)-ua(69,3);if(B<2&B>0)k=i;endif(ua(i,4)<=70)m=i;endendt=ua(1,2)*b(1,2);for p1=2:69t1(p1)=(ua(p1,2)-ua(p1-1,2))*(b(p1,2)+b(p1-1,2))*0.5;endfor p2=j:69t2(p2)=(ua(p2,3)-ua(p2-1,3))*(b(p2,3)+b(p2-1,3))*0.5;t=t+t2(p2);endfor p3=k:mt3(p3)=(ua(p3,4)-ua(p3-1,4))*(b(p3,4)+b(p3-1,4))*0.5;t=t+t3(p3);endt=t+(ua(j,3)-ua(69,2))*b(69,2)+(ua(k,4)-ua(69,3))*b(69,3)+(70-ua(m,4))*b(m,4);tz=t/3.6;disp('加速时间=');disp(tz);disp('s');加速时间=29.0585s二、计算与绘制题1 中货车的1)汽车功率平衡图;2)最高档与次高档的等速百公里油耗曲线。

汽车动力性计算matlab程序

汽车动力性计算matlab程序

%% 汽车动力性计算(自己编的动力性计算程序,供大家计算动力性时参考,具体参数大家根据所给程序对应输入,并对坐标轴数值按需要进行修改)clc; clear;close all;%%根据所给发动机数据拟合外特性曲线(发动机数据按照你所得到的数据进行输入)n_test=[500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200];T_test=[975 1108 1298 1496 1546 1620 1670 1785 1974 1974 1970 1889 1829 1748 1669 1700 1524 1105];figure(1)plot(n_test,T_test,'g');hold ongrid on%p=polyfit(n_test,T_test,7);p=polyfit(n_test,T_test,2);n=[450:1:2200];Ttq=polyval(p,n);plot(n,Ttq,'k');xlabel('发动机转速n(r/min)');ylabel('发动机转矩Ttq(N*m)');title('发动机转矩曲线');legend('测试曲线','拟合曲线');%%所给车型动力总成相关参数ig=[3.07 2.16 1.48 1.0 0.82];i0=4.0; eta=0.78; r=0.57; M=25000; g=9.8; c=1.5; f0=0.01; f1=0.0002; f4=0.0005; CD=1; A=8;Iw=3.6;If=0.04;%% 发动机外特性曲线图figure(2)hold ongrid onfor i=length(n);Pe=Ttq.*n/9550;end[AX,H1,H2]=plotyy(n,Ttq,n,Pe);xlabel('发动机转速n(r/min)');ylabel('发动机转矩Ttq(N*m)');ylabel(AX(2),'发动机功率Pe(Kw)');title('发动机外特性曲线');%% 各挡位速度曲线%计算各挡位车速for i=1:length(ig);ua(i,:)=0.377*r*n/ig(i)/i0;end%计算各档位最高车速uamax=ua(:,length(ua(1,:)));figure(3)hold onfor i=1:length(ig);plot(n,ua(i,:),'k');endhold ongrid onxlabel('转速n(r/min)');ylabel('各挡位车速(km/h)');title('各挡位车速-转速表');legend('1挡车速','2挡车速','3挡车速','4挡车速','5挡车速'); %% 驱动力和行驶阻力平衡图%计算滚动阻力系数for i=1:length(ig);f(i,:)=f0+f1*(ua(i,:)/100)+f4*(ua(i,:)/100).^4;end%计算滚动阻力for i=1:length(ig);Ff(i,:)=c*M*g*f(i,:);end%计算空气阻力for i=1:length(ig);Fw(i,:)=CD*A*(ua(i,:).^2)/21.15; end%计算行驶阻力for i=1:length(ig);F(i,:)=Ff(i,:)+Fw(i,:);end%计算汽车驱动力for i=1:length(ig);Ft(i,:)=Ttq*ig(i)*i0*eta/r;endfigure(4)hold onfor i=1:length(ig);plot(ua(i,:), Ft(i,:),'k');plot(ua(i,:), F(i,:),'r');plot(ua(i,:), Ff(i,:),'b');endhold ongrid onxlabel('车速(km/h)');ylabel('驱动力、行驶阻力(N)');legend('驱动力Ft','行驶阻力Ff+Fw','滚动阻力Ff'); title('驱动力-行驶阻力平衡图');%% 汽车功率平衡图%计算各档位功率for i=1:length(ig);P(i,:)=Ft(i,:).*ua(i,:)/(3600*eta);end%计算风阻阻力功率for i=1:length(ig);Pw(i,:)=CD*A*ua(i,:).^3/(76140*eta);end%计算滚动阻力功率for i=1:length(ig);Pf(i,:)=M*g*f(i,:).*ua(i,:)/(3600*eta);end%计算总阻力功率for i=1:length(ig);Pz(i,:)=Pw(i,:)+Pf(i,:);endfigure(5)hold onfor i=1:length(ig);plot(ua(i,:), P(i,:),'k');plot(ua(i,:), Pz(i,:),'r');endhold ongrid onxlabel('车速(km/h)');ylabel('发动机功率、阻力功率(kW)');legend('发动机功率P','阻力功率Pz','Location','NorthWest'); title('功率平衡图');%% 动力特性图(动力因数图)for i=1:length(ig);D(i,:)= (Ft(i,:)- Fw(i,:))/M/g;endfigure(6)hold onfor i=1:length(ig);plot(ua(i,:), D(i,:),'k');plot(ua(i,:), f(i,:),'r');endhold ongrid onxlabel('车速(km/h)');ylabel('动力因数D');legend('动力因数D','滚动阻力系数f');title('动力特性图');%% 爬坡度曲线图for i=1:length(ig);I(i,:)= (tan(asin((Ft(i,:)-(Ff(i,:)+Fw(i,:)))/(M*g))))*100; endfigure(7)hold onfor i=1:length(ig);if i==1plot(ua(i,:),I(i,:),'r');elseplot(ua(i,:),I(i,:),'k');endendhold ongrid onxlabel('车速(km/h)');ylabel('最大爬坡度(%)');legend('Ⅰ挡','高速档');title('爬坡度曲线图');%% 加速度曲线图deta=1+1/M*4*Iw/r^2+1/M*If*ig.^2*i0^2*eta/r^2; for i=1:length(ig);a(i,:)=(Ft(i,:)-Ff(i,:)-Fw(i,:))./deta(i)/M;if i==5for j=1:length(n)if a(i,j)<0a(i,j)=0;elseendendendendfigure(8)hold onfor i=1:length(ig);if i==1plot(ua(i,:),a(i,:),'r'); elseplot(ua(i,:),a(i,:),'k');endendhold ongrid onxlabel('车速(km/h)');ylabel('加速度a(m/s^2)');legend('Ⅰ档','高速档');title('加速度曲线图');axis([0 120 0 1.5])%% 加速度倒数曲线for i=1:length(ig);for j=1:length(n)b(i,j)=1./a(i,j);endendfigure(9)hold onfor i=1:length(ig)plot(ua(i,:),b(i,:),'k');endhold ongrid onxlabel('车速(km/h)');ylabel('各档加速度倒数1/a');legend('各档加速度倒数1/a曲线','Location','NorthWest'); title('各档加速度倒数曲线图');axis([0 120 0 10])ad1=b(1,:);ad2=ua(1,:);for i=1:(length(ig)-1);for j=1:length(n)if ua(i+1,j)>=ua(i,length(n)) flag(i)=j;break;endendad1=[ad1 b(i+1,j:length(n))]; ad2=[ad2 ua(i+1,j:length(n))];endfigure(10)hold onplot(ad2,ad1,'k');hold ongrid onxlabel('车速(km/h)');ylabel('加速度倒数1/a');legend('加速度倒数1/a曲线','Location','NorthWest');title('加速度倒数曲线图');axis([0 120 0 10])%% 加速时间曲线k=length(n);for i=1:length(ig);t(i,1)=0;for j=2:kt(i,j)=abs(ua(i,j)-ua(i,j-1))*(b(i,j)+b(i,j-1))/2;endendfor i=1:length(ig);for j=1:kat(i,j)=sum(t(i,1:j))/3.6;endendtotalat=at(1,:);for i=1:(length(ig)-1);for j=flag(i):ktotalat=[totalat totalat(length(totalat))+t(i+1,j)/3.6];endendfigure(11)hold onplot(totalat,ad2,'k');hold ongrid onxlabel('时间(s)');ylabel('车速(km/h)');legend('加速时间','Location','NorthWest'); title('加速时间曲线图');axis([0 100 0 120])Welcome To Download !!!欢迎您的下载,资料仅供参考!。

汽车理论课后习题MATLAB编程-武汉理工版

汽车理论课后习题MATLAB编程-武汉理工版

汽车理论课后习题MATLAB编程1.3 确定一轻型货车的动力性能(货车可装用4挡或5挡变速器,任选其中的一种进行整车性能计算):1)绘制汽车驱动力与行驶阻力平衡图。

2)求汽车最高车速,最大爬坡度及克服该坡度时相应的附着率。

3)绘制汽车行驶加速度倒数曲线,用图解积分法求汽车用2档起步加速行驶至70km/h的车速-时间曲线,或者用计算机求汽车用2档起步加速行驶至70km/h的加速时间。

解:(1) 求汽车驱动力与行驶阻力平衡图和汽车最高车速:n=[600:10:4000];Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/10 00).^4;m=3880;g=9.8;nmin=600;nmax=4000;G=m*g;ig=[5.56 2.769 1.644 1.00 0.793];nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83;L=3.2;a=1.947;hg=0.9;If=0.218;Iw1=1.798;Iw2=3.598;Ft1=Tq*ig(1)*i0*nT/r;Ft2=Tq*ig(2)*i0*nT/r;Ft3=Tq*ig(3)*i0*nT/r;Ft4=Tq*ig(4)*i0*nT/r;Ft5=Tq*ig(5)*i0*nT/r;ua1=0.377*r*n/ig(1)/i0;ua2=0.377*r*n/ig(2)/i0;ua3=0.377*r*n/ig(3)/i0;ua4=0.377*r*n/ig(4)/i0;ua5=0.377*r*n/ig(5)/i0;ua=[0:5:120];Ff=G*f;Fw=CDA*ua.^2/21.15;Fz=Ff+Fw;plot(ua1,Ft1,ua2,Ft2,ua3,Ft3,ua4,Ft4,ua5,Ft5,ua,Fz);title('驱动力-行驶阻力平衡图');xlabel('ua(km/s)');ylabel('Ft(N)');gtext('Ft1'),gtext('Ft2'),gtext('Ft3'),gtext('Ft4'),gtext('Ft5'),gtext('Ff+Fw');zoom on;[x,y]=ginput(1);zoom off;disp('汽车最高车速=');disp(x);disp('km/h');汽车最高车速=99.3006km/h(2)求汽车最大爬坡度程序:n=[600:10:4000];Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/10 00).^4;m=3880;g=9.8;nmin=600;nmax=4000;G=m*g;ig=[5.56 2.769 1.644 1.00 0.793];nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83;L=3.2;a=1.947;hg=0.9;If=0.218;Iw1=1.798;Iw2=3.598;Ft1=Tq*ig(1)*i0*nT/r;ua1=0.377*r*n/ig(1)/i0;Ff=G*f;Fw1=CDA*ua1.^2/21.15;Fz1=Ff+Fw1;Fi1=Ft1-Fz1;Zoom on;imax=100*tan(asin(max(Fi1/G)));disp('汽车最大爬坡度=');disp(imax);disp('%');汽车最大爬坡度=35.2197%(3)求最大爬坡度相应的附着率和求汽车行驶加速度倒数曲线程序:clearn=[600:10:4000];Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/10 00).^4;m=3880;g=9.8;nmin=600;nmax=4000;G=m*g;ig=[5.56 2.769 1.644 1.00 0.793];nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83;L=3.2;a=1.947;hg=0.9;If=0.218;Iw1=1.798;Iw2=3.598;Ft1=Tq*ig(1)*i0*nT/r;Ft2=Tq*ig(2)*i0*nT/r;Ft3=Tq*ig(3)*i0*nT/r;Ft4=Tq*ig(4)*i0*nT/r;Ft5=Tq*ig(5)*i0*nT/r;ua1=0.377*r*n/ig(1)/i0;ua2=0.377*r*n/ig(2)/i0;ua3=0.377*r*n/ig(3)/i0;ua4=0.377*r*n/ig(4)/i0;ua5=0.377*r*n/ig(5)/i0;Fw1=CDA*ua1.^2/21.15;Fw2=CDA*ua2.^2/21.15;Fw3=CDA*ua3.^2/21.15;Fw4=CDA*ua4.^2/21.15;Fw5=CDA*ua5.^2/21.15;Ff=G*f;deta1=1+(Iw1+Iw2)/(m*r^2)+(If*ig(1)^2*i0^2*nT)/(m*r^2);deta2=1+(Iw1+Iw2)/(m*r^2)+(If*ig(2)^2*i0^2*nT)/(m*r^2);deta3=1+(Iw1+Iw2)/(m*r^2)+(If*ig(3)^2*i0^2*nT)/(m*r^2);deta4=1+(Iw1+Iw2)/(m*r^2)+(If*ig(4)^2*i0^2*nT)/(m*r^2);deta5=1+(Iw1+Iw2)/(m*r^2)+(If*ig(5)^2*i0^2*nT)/(m*r^2);a1=(Ft1-Ff-Fw1)/(deta1*m);ad1=1./a1;a2=(Ft2-Ff-Fw2)/(deta2*m);ad2=1./a2;a3=(Ft3-Ff-Fw3)/(deta3*m);ad3=1./a3;a4=(Ft4-Ff-Fw4)/(deta4*m);ad4=1./a4;a5=(Ft5-Ff-Fw5)/(deta5*m);ad5=1./a5;plot(ua1,ad1,ua2,ad2,ua3,ad3,ua4,ad4,ua5,ad5);axis([0 99 0 10]);title('汽车的加速度倒数曲线');xlabel('ua(km/h)');ylabel('1/a');gtext('1/a1');gtext('1/a2');gtext('1/a3');gtext('1/a4');gtext('1/a5');a=max(a1);af=asin(max(Ft1-Ff-Fw1)/G);C=tan(af)/(a/L+hg*tan(af)/L);disp('假设后轮驱动,最大爬坡度相应的附着率=');disp(C);假设后轮驱动,最大爬坡度相应的附着率=0.4219(4) >>clearnT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83;If=0.218;Iw1=1.798;Iw2=3.598;L=3.2;a=1.947;hg=0.9;m=3880;g=9.8;G=m*g; ig=[5.56 2.769 1.644 1.00 0.793];nmin=600;nmax=4000;u1=0.377*r*nmin./ig/i0;u2=0.377*r*nmax./ig/i0;deta=0*ig;for i=1:5deta(i)=1+(Iw1+Iw2)/(m*r^2)+(If*(ig(i))^2*i0^2*nT)/(m*r^2);endua=[6:0.01:99];N=length(ua);n=0;Tq=0;Ft=0;inv_a=0*ua;delta=0*ua;Ff=G*f;Fw=CDA*ua.^2/21.15;for i=1:Nk=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/100 0)^4;Ft=Tq*ig(2)*i0*nT/r;inv_a(i)=(deta(2)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;elseif 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/100 0)^4;Ft=Tq*ig(3)*i0*nT/r;inv_a(i)=(deta(3)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*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/100 0)^4;Ft=Tq*ig(4)*i0*nT/r;inv_a(i)=(deta(4)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;elsen=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/100 0)^4;Ft=Tq*ig(5)*i0*nT/r;inv_a(i)=(deta(5)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;enda=delta(1:k);t(i)=sum(a);endplot(t,ua);axis([0 80 0 100]);title('汽车2档原地起步换挡加速时间曲线');xlabel('时间t(s)');ylabel('速度ua(km/h)');>> ginputans =25.8223 70.073725.7467 70.0737所以汽车2档原地起步换挡加速行驶至70km/h的加速时间约为25.8s2.7已知货车装用汽油发动机的负荷特性与万有特性。

汽车理论习题Matlab程序

汽车理论习题Matlab程序

1.3 确定一轻型货车的动力性能(货车可装用4挡或5挡变速器,任选 其中的一种进行整车性能计算):1)绘制汽车驱动力与行驶阻力平衡图。

2)求汽车最高车速,最大爬坡度及克服该坡度时相应的附着率。

3)绘制汽车行驶加速度倒数曲线,用图解积分法求汽车用2档起步加速行驶至70km/h 的车速-时间曲线,或者用计算机求汽车用2档起步加速行驶至70km/h 的加速时间。

轻型货车的有关数据:汽油发动机使用外特性的Tq-n 曲线的拟合公式为23419.313295.27()165.44()40.874() 3.8445()1000100010001000q n n n n T =-+-+-式中,Tq 为发动机转矩(N•m );n 为发动机转速(r/min )。

发动机的最低转速n min =600r/min,最高转速n max =4000r/min 。

装载质量 2000kg 整车整备质量 1800kg 总质量 3880kg 车轮半径 0.367m 传动系机械效率 ηt =0.85 滚动阻力系数 f =0.013 空气阻力系数×迎风面积 C D A =2.77m 2 主减速器传动比 i 0=5.83飞轮转动惯量 I f =0.218kg•m 2 二前轮转动惯量 I w1=1.798kg•m 2 四后轮转动惯量 I w2=3.598kg•m 2质心至前轴距离(满载) a=1.974m 质心高(满载) hg=0.9m解:Matlab 程序:(1) 求汽车驱动力与行驶阻力平衡图和汽车最高车速程序: n=[600:10:4000];Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/1000).^4;m=3880;g=9.8;nmin=600;nmax=4000; G=m*g;ig=[5.56 2.769 1.644 1.00 0.793];nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83; L=3.2;a=1.947;hg=0.9;If=0.218;Iw1=1.798;Iw2=3.598; Ft1=Tq*ig(1)*i0*nT/r; Ft2=Tq*ig(2)*i0*nT/r; Ft3=Tq*ig(3)*i0*nT/r;- Ft4=Tq*ig(4)*i0*nT/r;Ft5=Tq*ig(5)*i0*nT/r;ua1=0.377*r*n/ig(1)/i0;ua2=0.377*r*n/ig(2)/i0;ua3=0.377*r*n/ig(3)/i0;ua4=0.377*r*n/ig(4)/i0;ua5=0.377*r*n/ig(5)/i0;ua=[0:5:120];Ff=G*f;Fw=CDA*ua.^2/21.15;Fz=Ff+Fw;plot(ua1,Ft1,ua2,Ft2,ua3,Ft3,ua4,Ft4,ua5,Ft5,ua,Fz);title('驱动力-行驶阻力平衡图');xlabel('ua(km/s)');ylabel('Ft(N)');gtext('Ft1'),gtext('Ft2'),gtext('Ft3'),gtext('Ft4'),gtext('Ft5'),gtext('Ff+Fw');zoom on;[x,y]=ginput(1);zoom off;disp('汽车最高车速=');disp(x);disp('km/h');汽车最高车速=99.3006km/h- (2)求汽车最大爬坡度程序:n=[600:10:4000];Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/10 00).^4;m=3880;g=9.8;nmin=600;nmax=4000;G=m*g;ig=[5.56 2.769 1.644 1.00 0.793];nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83;L=3.2;a=1.947;hg=0.9;If=0.218;Iw1=1.798;Iw2=3.598;Ft1=Tq*ig(1)*i0*nT/r;ua1=0.377*r*n/ig(1)/i0;Ff=G*f;Fw1=CDA*ua1.^2/21.15;Fz1=Ff+Fw1;Fi1=Ft1-Fz1;Zoom on;imax=100*tan(asin(max(Fi1/G)));disp('汽车最大爬坡度=');disp(imax);disp('%');汽车最大爬坡度=35.2197%(3)求最大爬坡度相应的附着率和求汽车行驶加速度倒数曲线程序:clearn=[600:10:4000];Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/10 00).^4;m=3880;g=9.8;nmin=600;nmax=4000;G=m*g;ig=[5.56 2.769 1.644 1.00 0.793];nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83;L=3.2;a=1.947;hg=0.9;If=0.218;Iw1=1.798;Iw2=3.598;Ft1=Tq*ig(1)*i0*nT/r;Ft2=Tq*ig(2)*i0*nT/r;Ft3=Tq*ig(3)*i0*nT/r;Ft4=Tq*ig(4)*i0*nT/r;Ft5=Tq*ig(5)*i0*nT/r;ua1=0.377*r*n/ig(1)/i0;ua2=0.377*r*n/ig(2)/i0;ua3=0.377*r*n/ig(3)/i0;ua4=0.377*r*n/ig(4)/i0;ua5=0.377*r*n/ig(5)/i0;Fw1=CDA*ua1.^2/21.15;Fw2=CDA*ua2.^2/21.15;Fw3=CDA*ua3.^2/21.15;- Fw4=CDA*ua4.^2/21.15;Fw5=CDA*ua5.^2/21.15;Ff=G*f;deta1=1+(Iw1+Iw2)/(m*r^2)+(If*ig(1)^2*i0^2*nT)/(m*r^2);deta2=1+(Iw1+Iw2)/(m*r^2)+(If*ig(2)^2*i0^2*nT)/(m*r^2);deta3=1+(Iw1+Iw2)/(m*r^2)+(If*ig(3)^2*i0^2*nT)/(m*r^2);deta4=1+(Iw1+Iw2)/(m*r^2)+(If*ig(4)^2*i0^2*nT)/(m*r^2);deta5=1+(Iw1+Iw2)/(m*r^2)+(If*ig(5)^2*i0^2*nT)/(m*r^2);a1=(Ft1-Ff-Fw1)/(deta1*m);ad1=1./a1;a2=(Ft2-Ff-Fw2)/(deta2*m);ad2=1./a2;a3=(Ft3-Ff-Fw3)/(deta3*m);ad3=1./a3;a4=(Ft4-Ff-Fw4)/(deta4*m);ad4=1./a4;a5=(Ft5-Ff-Fw5)/(deta5*m);ad5=1./a5;plot(ua1,ad1,ua2,ad2,ua3,ad3,ua4,ad4,ua5,ad5);axis([0 99 0 10]);title('汽车的加速度倒数曲线');xlabel('ua(km/h)');ylabel('1/a');gtext('1/a1');gtext('1/a2');gtext('1/a3');gtext('1/a4');gtext('1/a5');a=max(a1);af=asin(max(Ft1-Ff-Fw1)/G);C=tan(af)/(a/L+hg*tan(af)/L);disp('假设后轮驱动,最大爬坡度相应的附着率=');disp(C);假设后轮驱动,最大爬坡度相应的附着率=0.4219(4) >>clearnT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83;If=0.218;Iw1=1.798;Iw2=3.598;L=3.2;a=1.947;hg=0.9;m=3880;g=9.8;G=m*g; ig=[5.56 2.769 1.644 1.00 0.793];nmin=600;nmax=4000;u1=0.377*r*nmin./ig/i0;u2=0.377*r*nmax./ig/i0;deta=0*ig;for i=1:5deta(i)=1+(Iw1+Iw2)/(m*r^2)+(If*(ig(i))^2*i0^2*nT)/(m*r^2);endua=[6:0.01:99];N=length(ua);n=0;Tq=0;Ft=0;inv_a=0*ua;delta=0*ua;Ff=G*f;Fw=CDA*ua.^2/21.15;for i=1:Nk=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/100 0)^4;Ft=Tq*ig(2)*i0*nT/r;inv_a(i)=(deta(2)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;elseif 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/100 0)^4;Ft=Tq*ig(3)*i0*nT/r;inv_a(i)=(deta(3)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*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/100 0)^4;Ft=Tq*ig(4)*i0*nT/r;inv_a(i)=(deta(4)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;elsen=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*nT/r;inv_a(i)=(deta(5)*m)/(Ft-Ff-Fw(i)); delta(i)=0.01*inv_a(i)/3.6; enda=delta(1:k); t(i)=sum(a); endplot(t,ua);axis([0 80 0 100]);title('汽车2档原地起步换挡加速时间曲线'); xlabel('时间t (s )');ylabel('速度ua (km/h )'); >> ginputans =25.8223 70.0737 25.7467 70.0737所以汽车2档原地起步换挡加速行驶至70km/h 的加速时间约为25.8s2.7已知货车装用汽油发动机的负荷特性与万有特性。

汽车理论习题Matlab程序

汽车理论习题Matlab程序

确定一轻型货车的动力性能(货车可装用4挡或5挡变速器,任选其中的一种进行整车性能计算):1)绘制汽车驱动力与行驶阻力平衡图。

2)求汽车最高车速,最大爬坡度及克服该坡度时相应的附着率。

3)绘制汽车行驶加速度倒数曲线,用图解积分法求汽车用2档起步加速行驶至70km/h 的车速-时间曲线,或者用计算机求汽车用2档起步加速行驶至70km/h的加速时间。

轻型货车的有关数据:汽油发动机使用外特性的Tq-n曲线的拟合公式为式中,Tq为发动机转矩(N?m);n为发动机转速(r/min)。

发动机的最低转速nmin =600r/min,最高转速nmax=4000r/min。

装载质量 2000kg整车整备质量 1800kg总质量 3880kg车轮半径 0.367m传动系机械效率ηt=0.85滚动阻力系数f=0.013空气阻力系数×迎风面积C D A=2.77m2主减速器传动比i0=5.83飞轮转动惯量 I f=0.218kg?m2二前轮转动惯量I w1=1.798kg?m2四后轮转动惯量I w2=3.598kg?m2变速器传动比 ig(数据如下表)轴距 L=3.2m质心至前轴距离(满载) a=1.974m质心高(满载) hg=0.9m解:Matlab程序:(1) 求汽车驱动力与行驶阻力平衡图和汽车最高车速程序:n=[600:10:4000];Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/100 0).^4;m=3880;g=9.8;nmin=600;nmax=4000;G=m*g;ig=[5.56 2.769 1.644 1.00 0.793];nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83; L=3.2;a=1.947;hg=0.9;If=0.218;Iw1=1.798;Iw2=3.598;Ft1=Tq*ig(1)*i0*nT/r;Ft2=Tq*ig(2)*i0*nT/r;Ft3=Tq*ig(3)*i0*nT/r;Ft4=Tq*ig(4)*i0*nT/r;Ft5=Tq*ig(5)*i0*nT/r;ua1=0.377*r*n/ig(1)/i0;ua2=0.377*r*n/ig(2)/i0;ua3=0.377*r*n/ig(3)/i0;ua4=0.377*r*n/ig(4)/i0;ua5=0.377*r*n/ig(5)/i0;ua=[0:5:120];Ff=G*f;Fw=CDA*ua.^2/21.15;Fz=Ff+Fw;plot(ua1,Ft1,ua2,Ft2,ua3,Ft3,ua4,Ft4,ua5,Ft5,ua,Fz);title('驱动力-行驶阻力平衡图');xlabel('ua(km/s)');ylabel('Ft(N)');gtext('Ft1'),gtext('Ft2'),gtext('Ft3'),gtext('Ft4'),gtext('Ft5'),gtext('Ff+Fw' );zoom on;[x,y]=ginput(1);zoom off;disp('汽车最高车速=');disp(x);disp('km/h');汽车最高车速=99.3006km/h(2)求汽车最大爬坡度程序:n=[600:10:4000];Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/1000).^4;m=3880;g=9.8;nmin=600;nmax=4000;G=m*g;ig=[5.56 2.769 1.644 1.00 0.793];nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83; L=3.2;a=1.947;hg=0.9;If=0.218;Iw1=1.798;Iw2=3.598;Ft1=Tq*ig(1)*i0*nT/r;ua1=0.377*r*n/ig(1)/i0;Ff=G*f;Fw1=CDA*ua1.^2/21.15;Fz1=Ff+Fw1;Fi1=Ft1-Fz1;Zoom on;imax=100*tan(asin(max(Fi1/G)));disp('汽车最大爬坡度=');disp(imax);disp('%');汽车最大爬坡度=35.2197%(3)求最大爬坡度相应的附着率和求汽车行驶加速度倒数曲线程序:clearn=[600:10:4000];Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/100 0).^4;m=3880;g=9.8;nmin=600;nmax=4000;G=m*g;ig=[5.56 2.769 1.644 1.00 0.793];nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83;L=3.2;a=1.947;hg=0.9;If=0.218;Iw1=1.798;Iw2=3.598;Ft1=Tq*ig(1)*i0*nT/r;Ft2=Tq*ig(2)*i0*nT/r;Ft3=Tq*ig(3)*i0*nT/r;Ft4=Tq*ig(4)*i0*nT/r;Ft5=Tq*ig(5)*i0*nT/r;ua1=0.377*r*n/ig(1)/i0;ua2=0.377*r*n/ig(2)/i0;ua3=0.377*r*n/ig(3)/i0;ua4=0.377*r*n/ig(4)/i0;ua5=0.377*r*n/ig(5)/i0;Fw1=CDA*ua1.^2/21.15;Fw2=CDA*ua2.^2/21.15;Fw3=CDA*ua3.^2/21.15;Fw4=CDA*ua4.^2/21.15;Fw5=CDA*ua5.^2/21.15;Ff=G*f;deta1=1+(Iw1+Iw2)/(m*r^2)+(If*ig(1)^2*i0^2*nT)/(m*r^2); deta2=1+(Iw1+Iw2)/(m*r^2)+(If*ig(2)^2*i0^2*nT)/(m*r^2); deta3=1+(Iw1+Iw2)/(m*r^2)+(If*ig(3)^2*i0^2*nT)/(m*r^2); deta4=1+(Iw1+Iw2)/(m*r^2)+(If*ig(4)^2*i0^2*nT)/(m*r^2); deta5=1+(Iw1+Iw2)/(m*r^2)+(If*ig(5)^2*i0^2*nT)/(m*r^2); a1=(Ft1-Ff-Fw1)/(deta1*m);ad1=1./a1;a2=(Ft2-Ff-Fw2)/(deta2*m);ad2=1./a2;a3=(Ft3-Ff-Fw3)/(deta3*m);ad3=1./a3;a4=(Ft4-Ff-Fw4)/(deta4*m);ad4=1./a4;a5=(Ft5-Ff-Fw5)/(deta5*m);ad5=1./a5;plot(ua1,ad1,ua2,ad2,ua3,ad3,ua4,ad4,ua5,ad5);axis([0 99 0 10]);title('汽车的加速度倒数曲线');xlabel('ua(km/h)');ylabel('1/a');gtext('1/a1');gtext('1/a2');gtext('1/a3');gtext('1/a4');gtext('1/a5'); a=max(a1);af=asin(max(Ft1-Ff-Fw1)/G);C=tan(af)/(a/L+hg*tan(af)/L);disp('假设后轮驱动,最大爬坡度相应的附着率=');disp(C);假设后轮驱动,最大爬坡度相应的附着率=0.4219(4) >>clearnT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83;If=0.218;Iw1=1.798;Iw2=3.598;L=3.2;a=1.947;hg=0.9;m=3880;g=9.8; G=m*g; ig=[5.56 2.769 1.644 1.00 0.793];nmin=600;nmax=4000;u1=0.377*r*nmin./ig/i0;u2=0.377*r*nmax./ig/i0;deta=0*ig;for i=1:5deta(i)=1+(Iw1+Iw2)/(m*r^2)+(If*(ig(i))^2*i0^2*nT)/(m*r^2);endua=[6:0.01:99];N=length(ua);n=0;Tq=0;Ft=0;inv_a=0*ua;delta=0*ua;Ff=G*f;Fw=CDA*ua.^2/21.15;for i=1:Nk=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*nT/r;inv_a(i)=(deta(2)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;elseif 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*nT/r;inv_a(i)=(deta(3)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*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*nT/r;inv_a(i)=(deta(4)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;elsen=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*nT/r;inv_a(i)=(deta(5)*m)/(Ft-Ff-Fw(i)); delta(i)=0.01*inv_a(i)/3.6;enda=delta(1:k);t(i)=sum(a);endplot(t,ua);axis([0 80 0 100]);title('汽车2档原地起步换挡加速时间曲线'); xlabel('时间t(s)');ylabel('速度ua(km/h)');>> ginputans =25.8223 70.073725.7467 70.0737所以汽车2档原地起步换挡加速行驶至70km/h 的加速时间约为25.8s2.7已知货车装用汽油发动机的负荷特性与万有特性。

汽车理论习题Matlab程序

汽车理论习题Matlab程序

1、3确定一轻型货车得动力性能(货车可装用4挡或5挡变速器,任选其中得一种进行整车性能计算):1)绘制汽车驱动力与行驶阻力平衡图。

2)求汽车最高车速,最大爬坡度及克服该坡度时相应得附着率.3)绘制汽车行驶加速度倒数曲线,用图解积分法求汽车用2档起步加速行驶至70km/h得车速—时间曲线,或者用计算机求汽车用2档起步加速行驶至70km/h得加速时间。

轻型货车得有关数据:汽油发动机使用外特性得Tq-n曲线得拟合公式为式中,Tq为发动机转矩(N•m);n为发动机转速(r/min)。

发动机得最低转速n min=600r/min,最高转速n max=4000r/min。

装载质量2000kg整车整备质量1800kg总质量3880kg车轮半径0、367m传动系机械效率ηt=0、85滚动阻力系数f=0、013空气阻力系数×迎风面积C DA=2、77m2主减速器传动比i0=5、83飞轮转动惯量If=0、218kg•m2二前轮转动惯量Iw1=1、798kg•m2四后轮转动惯量I w2=3、598kg•m 2变速器传动比ig(数据如下表)轴距L=3、2m质心至前轴距离(满载)a=1、974m质心高(满载)hg=0、9m解:Matlab程序:(1) 求汽车驱动力与行驶阻力平衡图与汽车最高车速程序:n=[600:10:4000];Tq=-19、313+295、27*(n/1000)-165、44*(n/1000)、^2+40、874*(n/1000)、^3-3、8445*(n/1000)、^4;m=3880;g=9、8;nmin=600;nmax=4000;G=m*g;ig=[5、56 2、769 1、644 1、00 0、793];nT=0、85;r=0、367;f=0、013;CDA=2、77;i0=5、83;L=3、2;a=1、947;hg=0、9;If=0、218;Iw1=1、798;Iw2=3、598;Ft1=Tq*ig(1)*i0*nT/r;Ft2=Tq*ig(2)*i0*nT/r;Ft3=Tq*ig(3)*i0*nT/r;Ft4=Tq*ig(4)*i0*nT/r;Ft5=Tq*ig(5)*i0*nT/r;ua1=0、377*r*n/ig(1)/i0;ua2=0、377*r*n/ig(2)/i0;ua3=0、377*r*n/ig(3)/i0;ua4=0、377*r*n/ig(4)/i0;ua5=0、377*r*n/ig(5)/i0;ua=[0:5:120];Ff=G*f;Fw=CDA*ua、^2/21、15;Fz=Ff+Fw;plot(ua1,Ft1,ua2,Ft2,ua3,Ft3,ua4,Ft4,ua5,Ft5,ua,Fz);title('驱动力-行驶阻力平衡图');xlabel('ua(km/s)');ylabel('Ft(N)');gtext('Ft1'),gtext(’Ft2'),gtext(’Ft3'),gtext('Ft4'),gtext('Ft5'),gtext(’Ff+Fw’);zoomon;[x,y]=ginput(1);zoom off;disp('汽车最高车速=’);disp(x);disp(’km/h’);汽车最高车速=99、3006km/h(2)求汽车最大爬坡度程序:n=[600:10:4000];Tq=—19、313+295、27*(n/1000)—165、44*(n/1000)、^2+40、874*(n/1000)、^3-3、8445*(n/1000)、^4;m=3880;g=9、8;nmin=600;nmax=4000;G=m*g;ig=[5、562、7691、6441、00 0、793];nT=0、85;r=0、367;f=0、013;CDA=2、77;i0=5、83;L=3、2;a=1、947;hg=0、9;If=0、218;Iw1=1、798;Iw2=3、598;Ft1=Tq*ig(1)*i0*nT/r;ua1=0、377*r*n/ig(1)/i0;Ff=G*f;Fw1=CDA*ua1、^2/21、15;Fz1=Ff+Fw1;Fi1=Ft1—Fz1;Zoomon;imax=100*tan(asin(max(Fi1/G)));disp('汽车最大爬坡度=’);disp(imax);disp(’%’);汽车最大爬坡度=35、2197%(3)求最大爬坡度相应得附着率与求汽车行驶加速度倒数曲线程序:clearn=[600:10:4000];Tq=-19、313+295、27*(n/1000)-165、44*(n/1000)、^2+40、874*(n/1000)、^3-3、8445*(n/1000)、^4;m=3880;g=9、8;nmin=600;nmax=4000;G=m*g;ig=[5、56 2、7691、644 1、00 0、793];nT=0、85;r=0、367;f=0、013;CDA=2、77;i0=5、83;L=3、2;a=1、947;hg=0、9;If=0、218;Iw1=1、798;Iw2=3、598;Ft1=Tq*ig(1)*i0*nT/r;Ft2=Tq*ig(2)*i0*nT/r;Ft3=Tq*ig(3)*i0*nT/r;Ft4=Tq*ig(4)*i0*nT/r;Ft5=Tq*ig(5)*i0*nT/r;ua1=0、377*r*n/ig(1)/i0;ua2=0、377*r*n/ig(2)/i0;ua3=0、377*r*n/ig(3)/i0;ua4=0、377*r*n/ig(4)/i0;ua5=0、377*r*n/ig(5)/i0;Fw1=CDA*ua1、^2/21、15;Fw2=CDA*ua2、^2/21、15;Fw3=CDA*ua3、^2/21、15;Fw4=CDA*ua4、^2/21、15;Fw5=CDA*ua5、^2/21、15;Ff=G*f;deta1=1+(Iw1+Iw2)/(m*r^2)+(If*ig(1)^2*i0^2*nT)/(m*r^2); deta2=1+(Iw1+Iw2)/(m*r^2)+(If*ig(2)^2*i0^2*nT)/(m*r^2);deta3=1+(Iw1+Iw2)/(m*r^2)+(If*ig(3)^2*i0^2*nT)/(m*r^2); deta4=1+(Iw1+Iw2)/(m*r^2)+(If*ig(4)^2*i0^2*nT)/(m*r^2);deta5=1+(Iw1+Iw2)/(m*r^2)+(If*ig(5)^2*i0^2*nT)/(m*r^2);a1=(Ft1-Ff-Fw1)/(deta1*m);ad1=1、/a1;a2=(Ft2-Ff—Fw2)/(deta2*m);ad2=1、/a2;a3=(Ft3-Ff-Fw3)/(deta3*m);ad3=1、/a3;a4=(Ft4-Ff—Fw4)/(deta4*m);ad4=1、/a4;a5=(Ft5-Ff-Fw5)/(deta5*m);ad5=1、/a5;plot(ua1,ad1,ua2,ad2,ua3,ad3,ua4,ad4,ua5,ad5);axis([099 010]);title('汽车得加速度倒数曲线');xlabel('ua(km/h)’);ylabel('1/a');gtext('1/a1');gtext('1/a2’);gtext(’1/a3');gtext('1/a4');gtext('1/a5');a=max(a1);af=asin(max(Ft1—Ff—Fw1)/G);C=tan(af)/(a/L+hg*tan(af)/L);disp(’假设后轮驱动,最大爬坡度相应得附着率=');disp(C);假设后轮驱动,最大爬坡度相应得附着率=0、4219(4) >>clearnT=0、85;r=0、367;f=0、013;CDA=2、77;i0=5、83;If=0、218;Iw1=1、798;Iw2=3、598;L=3、2;a=1、947;hg=0、9;m=3880;g=9、8;G=m*g;ig=[5、56 2、7691、644 1、00 0、793];nmin=600;nmax=4000;u1=0、377*r*nmin、/ig/i0;u2=0、377*r*nmax、/ig/i0;deta=0*ig;fori=1:5deta(i)=1+(Iw1+Iw2)/(m*r^2)+(If*(ig(i))^2*i0^2*nT)/(m*r^2);endua=[6:0、01:99];N=length(ua);n=0;Tq=0;Ft=0;inv_a=0*ua;d elta=0*ua;Ff=G*f;Fw=CDA*ua、^2/21、15;for i=1:Nk=i;ifua(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*nT/r;inv_a(i)=(deta(2)*m)/(Ft-Ff—Fw(i));delta(i)=0、01*inv_a(i)/3、6;elseifua(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*nT/r;inv_a(i)=(deta(3)*m)/(Ft—Ff-Fw(i));delta(i)=0、01*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*nT/r;inv_a(i)=(deta(4)*m)/(Ft-Ff-Fw(i));delta(i)=0、01*inv_a(i)/3、6;elsen=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*nT/r;inv_a(i)=(deta(5)*m)/(Ft-Ff—Fw(i));delta(i)=0、01*inv_a(i)/3、6;enda=delta(1:k);t(i)=sum(a);endplot(t,ua);axis([080 0100]);title('汽车2档原地起步换挡加速时间曲线’);xlabel(’时间t(s)’);ylabel(’速度ua(km/h)');>〉ginputans =25、8223 70、073725、746770、0737所以汽车2档原地起步换挡加速行驶至70km/h得加速时间约为25、8s2、7已知货车装用汽油发动机得负荷特性与万有特性。

汽车理论图形MATLAB程序

汽车理论图形MATLAB程序

汽车理论图形MATLAB程序功率平衡图m=1230;g=9.8;ig=[3.615 2.053 1.393 1.031 0.837]; i0=3.75;r=0.31;yt=0.9;f=0.017;CD=0.31;A=2.2;np=6000;Pemax=83;%绘制汽车驱动力与行驶阻力平衡图for i=1:56;n=500:100:6000;Pe(i)=Pemax*(n(i)/np+(n(i)/np)^2-(n(i)/np)^3); Tq(i)=9549*Pe(i)/n(i);endfor j=1:5for i=1:56Ft(i,j)=Tq(i)*ig(j)*i0*yt/r;ua(i,j)=0.377*r*n(i)/(ig(j)*i0);Fz(i,j)=m*g*f+CD*A*(ua(i,j)^2)/21.15;endendfigureplot(ua,Ft,ua,Fz);title('汽车驱动力与行驶阻力平衡图');xlabel('ua(km/h)');ylabel('Ft(N)');text(20,6700,'Ft1');text(40,4000,'Ft2');text(50,2800,'Ft3');text(80,2000,'Ft4');text(100,1600, 'Ft5');text(100,800,'Ff+Fw');for k=1:56;n=500:100:6000;Pe(k)=Pemax*(n(k)/np+(n(k)/np)^2-(n(k)/np)^3); Tq(k)=9549*Pe(k)/n(k);Ft(k)=T q(k)*ig(4)*i0*yt/r;ua(k)=0.377*r*n(k)/(ig(4)*i0);Fz(k)=m*g*f+CD*A*(ua(k)^2)/21.15;E(k)=abs((Ft(k)-Fz(k)));end[Emin,kmin]=min(E);Umax=ua(kmin)加速度曲线图m=1230;g=9.8;ig=[3.615 2.053 1.393 1.031 0.837]; i0=3.75;r=0.31;yt=0.9;f=0.017;CD=0.31;A=2.2;np=6000;Pemax=83;deta=[1.33 1.12 1.07 1.05 1.04];for i=1:56;n=500:100:6000;Pe(i)=Pemax*(n(i)/np+(n(i)/np)^2-(n(i)/np)^3); Tq(i)=9549*Pe(i)/n(i);endfor j=1:5for i=1:56Ft(i,j)=Tq(i)*ig(j)*i0*yt/r;ua(i,j)=0.377*r*n(i)/(ig(j)*i0);Fz(i,j)=m*g*f+CD*A*(ua(i,j)^2)/21.15;a(i,j)=(Ft(i,j)-Fz(i,j))/(deta(j)*m);b(i,j)= 1./a(i,j);endendx1=ua(:,1);y1=b(:,1);x2=ua(:,2);y2=b(:,2);x3=ua(:,3);y3=b(:,3);x4=ua(:,4);y4=b(:,4);x5=ua(:,5);y5=b(:,5);figureplot(x1,y1,x2,y2,x3,y3,x4,y4,x5,y5);axis([0 185 0 15]);title('汽车行驶加速度倒数曲线');xlabel('ua(km/h)');ylabel('1/a');汽车二挡原地起步加速时间nT=0.9;r=0.31;f=0.0177;CD=0.31;A=2.2;;i0=3.75;m=3880;g=9.8;Pemax=83;np=6000;G=m*g; ig=[3.615 2.053 1.393 1.031 0.837];nmin=600;nmax=6000;u1=0.377*r*nmin./ig/i0;u2=0.377*r*nmax./ig/i0;deta=[1.33 1.12 1.07 1.05 1.04];ua=[1:0.01:180];N=length(ua);n=0;T q=0;Ft=0;inv_a=0*ua;del ta=0*ua; Ff=G*f;Fw=CD*A*ua.^2/21.15;for i=1:Nk=i;if ua(i)<=u2(2)n=ua(i)*(ig(2)*i0/r)/0.377;Tq=9549*(Pemax*(n/np+(n/np)^2-(n/np)^3))/n;Ft=Tq*ig(2)*i0*nT/r;inv_a(i)=(deta(2)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;elseif ua(i)<=u2(3)n=ua(i)*(ig(3)*i0/r)/0.377;Tq=9549*(Pemax*(n/np+(n/np)^2-(n/np)^3))/n;Ft=Tq*ig(3)*i0*nT/r;inv_a(i)=(deta(3)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;elseif ua(i)<=u2(4)n=ua(i)*(ig(4)*i0/r)/0.377;Tq=9549*(Pemax*(n/np+(n/np)^2-(n/np)^3))/n;Ft=Tq*ig(4)*i0*nT/r;inv_a(i)=(deta(4)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;elsen=ua(i)*(ig(5)*i0/r)/0.377;Tq=9549*(Pemax*(n/np+(n/np)^2-(n/np)^3))/n;Ft=Tq*ig(5)*i0*nT/r;inv_a(i)=(deta(5)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;enda=delta(1:k);t(i)=sum(a);endplot(t,ua);axis([0 80 0 100]);title('汽车2档原地起步换挡加速时间曲线'); xlabel('时间t(s)'); ylabel('速度ua(km/h)');功率平衡图m=1230;g=9.8;ig=[3.615 2.053 1.393 1.031 0.837]; i0=3.75;r=0.31;yt=0.9;f=0.017;CD=0.31;A=2.2;np=6000;Pemax=83;deta=[1.33 1.12 1.07 1.05 1.04];for j=1:5for i=1:56;n=500:100:6000;Pe(i)=Pemax*(n(i)/np+(n(i)/np)^2-(n(i)/np)^3);Tq(i)=9549*Pe(i)/n(i);ua(i,j)=0.377*r*n(i)/(ig(j)*i0);Pz(i,j)=(m*g*f*ua(i,j)/3600+CD*A*ua(i,j)^3/76140)/yt; endendplot(ua,Pe,ua,Pz);title('功率平衡图');xlabel('ua(km/h)');ylabel('P(kW)');text(40,90,'一档Pe');text(80,90,'二档Pe');text(110,90,'三档Pe');text(150,90,'四档Pe');text(200,90,'五档Pe');text(100,25,'Pz');%绘制最高档和次高档的等速百公里油耗曲线n0=[815,1207,1614,2012,2603,3006,3403,3804];for j=1:5for i=1:8Pd(i)=Pemax*(n0(i)/np+(n0(i)/np)^2-(n0(i)/np)^3); Td(i)=9549*Pd(i)/n0(i);u(i,j)=0.377*r*n0(i)/(ig(j)*i0);endendb(1)=1326.8-416.46*Pd(1)+72.379*Pd(1)^2-5.8629*Pd(1)^3+0.17768*Pd(1)^4;b(2)=1354.7-303.98*Pd(2)+36.657*Pd(2)^2-2.0553*Pd(2)^3+0.043072*Pd(2)^4;b(3)=1284.4-189.75*Pd(3)+14.524*Pd(3)^2-0.51184*Pd(3)^3+0.0068164*Pd(3)^4;b(4)=1122.9-121.59*Pd(4)+7.0035*Pd(4)^2-0.18517*Pd(4)^3+0.0018555*Pd(4)^4;b(5)=1141.0-98.893*Pd(5)+4.4763*Pd(5)^2-0.091077*Pd(5)^3+0.00068906*Pd(5)^4;b(6)=1051.2-73.714*Pd(6)+2.8593*Pd(6)^2-0.05138*Pd(6)^3+0.00035032*Pd(6)^4;b(7)=1233.9-84.478*Pd(7)+2.9788*Pd(7)^2-0.047449*Pd(7)^3+0.00028230*Pd(7)^4;b(8)=1129.7-45.291*Pd(8)+0.71113*Pd(8)^2+0.00075215*Pd(8)^3-0.000038568*Pd(8)^4; u1=u(:,1)';u2=u(:,2)';u3=u(:,3)';u4=u(:,4)';u5=u(:,5)';B1=polyfit(u1,b,3);B2=polyfit(u2,b,3);B3=polyfit(u3,b,3);B4=polyfit(u4,b,3);B5=polyfit(u5,b,3);for k=1:56bh(k,1)=polyval(B1,ua(k,1));bh(k,2)=polyval(B2,ua(k,2));bh(k,3)=polyval(B3,ua(k,3));bh(k,4)=polyval(B4,ua(k,4));bh(k,5)=polyval(B5,ua(k,5));endfor i=1:5for k=1:56Q(k,i)=Pz(k,i)*bh(k,i)/(1.02*ua(k,i)*7.10);endendplot(ua(:,4),Q(:,4),ua(:,5),Q(:,5));axis([0 185 0 20]);title('最高档(五档)和次高档(四档)等速百公里油耗图'); xlabel('ua(km/h)');ylabel('Qs(L/100km)');text(90,10,'四档');text(125,10,'五档');爬坡度图m=1230;g=9.8;G=m*g;ig=[3.615 2.053 1.393 1.031 0.837]; i0=3.75;r=0.31;yt=0.9;f=0.017;CD=0.31;A=2.2;np=6000;Pemax=83;for i=1:56;n=500:100:6000;Pe(i)=Pemax*(n(i)/np+(n(i)/np)^2-(n(i)/np)^3);Tq(i)=9549*Pe(i)/n(i);endfor j=1:5for i=1:56Ft(i,j)=Tq(i)*ig(j)*i0*yt/r;ua(i,j)=0.377*r*n(i)/(ig(j)*i0);Fz(i,j)=m*g*f+CD*A*(ua(i,j)^2)/21.15;F=Ft-Fz;I=tan(asin(Ft/G))*100;endendplot(ua,I);hold on;title('汽车的爬坡度图');xlabel('ua(km/h)');ylabel('i(%)');text(50,55,'一档');text(50,35,'二档');text(100,22,'三档');text(150,15,'四档');text(200,13,'五档');动力因数图m=1230;g=9.8;G=m*g;ig=[3.615 2.053 1.393 1.031 0.837]; i0=3.75;r=0.31;yt=0.9;f=0.017;CD=0.31;A=2.2;np=6000;Pemax=83;%绘制汽车驱动力与行驶阻力平衡图for i=1:56;n=500:100:6000;Pe(i)=Pemax*(n(i)/np+(n(i)/np)^2-(n(i)/np)^3); Tq(i)=9549*Pe(i)/n(i);endfor j=1:5for i=1:56Ft(i,j)=Tq(i)*ig(j)*i0*yt/r;ua(i,j)=0.377*r*n(i)/(ig(j)*i0); Fw(i,j)=CD*A*(ua(i,j)^2)/21.15; F=Ft-Fw;D=F/G;endendplot(ua,D);hold on;axis([0 190 0 0.6]);title('汽车的动力特性图'); xlabel('ua(km/h)');ylabel('动力因数)');text(40,0.5,'一档');text(60,0.3,'二档');text(100,0.2,'三档');text(140,0.1,'四档');text(140,0.04,'五档');。

汽车理论习题Matlab程序

汽车理论习题Matlab程序

汽车理论习题Matlab程序1.3确定⼀轻型货车的动⼒性能(货车可装⽤ 4挡或5挡变速器,任选其中的⼀种进⾏整车性能计算):1)绘制汽车驱动⼒与⾏驶阻⼒平衡图。

2)求汽车最⾼车速,最⼤爬坡度及克服该坡度时相应的附着率。

3)绘制汽车⾏驶加速度倒数曲线,⽤图解积分法求汽车⽤ 2档起步加速⾏驶⾄70km/h 的车速⼀时间曲线,或者⽤计算机求汽车⽤ 2档起步加速⾏驶⾄ 70km/h 的加速时间。

轻型货车的有关数据:汽油发动机使⽤外特性的Tq-n 曲线的拟合公式为19.313 295.27(孟o )165,44(^)2 40-874(^)3 环45為4式中,Tq 为发动机转矩(N?m ) ;n 为发动机转速(r/min )。

发动机的最低转速n min =600r/min,最⾼转速n max =4000r/min 。

装载质量 2000kg 整车整备质量 1800kg 总质量 3880kg 车轮半径 0.367m 传动系机械效率 n =0.85滚动阻⼒系数f=0.013空⽓阻⼒系数泌风⾯积 C D A=2.77m 2解:Matlab 程序:(1) 求汽车驱动⼒与⾏驶阻⼒平衡图和汽车最⾼车速程序: n=[600:10:4000];Tq=-19.313+295.27*( n/1000)-165.44*(门/1000)⼋2+40.874*(门/1000)⼋3-3.8445*( n/10 00).A 4;m=3880;g=9.8; nmi n=600; nm ax=4000; G=m*g;ig=[5.56 2.769 1.644 1.00 0.793]; nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83; L=3.2;a=1.947;hg=0.9;lf=0.218;lw1= 1.798;Iw2=3.598; Ft 仁 Tq*ig(1)*i0* nT/r; Ft2=Tq*ig(2)*i0* nT/r;主减速器传动⽐飞轮转动惯量⼆前轮转动惯量四后轮转动惯量 i 0=5.83l f =0.218kg?m I w1=1.798kg?m I w2=3.598kg?m ig(数据如下表)轴距质⼼⾄前轴距离(满载)质⼼⾼(满载)a=1.974m hg=0.9mFt3=Tq*ig(3)*i0* nT/r;Ft4=Tq*ig(4)*iO* nT/r;Ft5=Tq*ig(5)*iO* nT/r;ua1=0.377*r* n/ig(1)/iO;ua2=0.377*r* n/ig(2)/iO;ua3=0.377*r* n/ig(3)/iO;ua4=0.377*r* n/ig(4)/iO;ua5=O.377*r* n/ig(5)/iO;ua=[0:5:120];Ff=G*f;Fw=CDA*ua.A2/21.15;Fz=Ff+Fw;plot(ua1,Ft1,ua2,Ft2,ua3,Ft3,ua4,Ft4,ua5,Ft5,ua,Fz);title('驱动⼒-⾏驶阻⼒平衡图');xlabel('ua(km/s)');ylabel('Ft(N)');gtext('Ft1'),gtext('Ft2'),gtext('Ft3'),gtext('Ft4'),gtext('Ft5'),gtext('Ff+Fw'); zoom on; [x,y]=gi nput(1);zoom off;disp('汽车最⾼车速=');disp(x);disp('km/h');汽车最⾼车速=99.3006km/h(2) 求汽车最⼤爬坡度程序:n=[600:10:4000];Tq=-19.313+295.27*( n/1000)-165.44*(门/1000)⼋2+40.874*(门/1000)⼋3-3.8445*( n/10 00)⼋4;m=3880;g=9.8;nmin=600;nmax=4000;G=m*g;ig=[5.56 2.769 1.644 1.00 0.793];nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83;L=3.2;a=1.947;hg=0.9;If=0.218;Iw1=1.798;Iw2=3.598;Ft1=Tq*ig(1)*i0*nT/r;ua1=0.377*r*n/ig(1)/i0;Ff=G*f;Fw1=CDA*ua1.A2/21.15;Fz1=Ff+Fw1;Fi1=Ft1-Fz1;Zoom on;imax=100*tan(asin(max(Fi1/G)));disp('汽车最⼤爬坡度=');disp(imax);disp('%');汽车最⼤爬坡度=35.2197%(3) 求最⼤爬坡度相应的附着率和求汽车⾏驶加速度倒数曲线程序:clearn=[600:10:4000];Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).A2+40.874*(n/1000).A3-3.8445*(n/10 00).A4; m=3880;g=9.8;nmin=600;nmax=4000;G=m*g;ig=[5.56 2.769 1.644 1.00 0.793];nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83;L=3.2;a=1.947;hg=0.9;If=0.218;Iw1=1.798;Iw2=3.598;Ft1=Tq*ig(1)*i0*nT/r;Ft2=Tq*ig(2)*i0*nT/r;Ft3=Tq*ig(3)*i0*nT/r;Ft4=Tq*ig(4)*i0*nT/r;Ft5=Tq*ig(5)*i0*nT/r;ua1=0.377*r*n/ig(1)/i0;ua2=0.377*r*n/ig(2)/i0;ua3=0.377*r*n/ig(3)/i0;ua4=0.377*r*n/ig(4)/i0;ua5=0.377*r*n/ig(5)/i0;Fw1=CDA*ua1.A2/21.15;Fw2=CDA*ua2.A2/21.15;Fw3=CDA*ua3.A2/21.15;Fw4=CDA*ua442/21.15;Fw5=CDA*ua5.A2/21.15;Ff=G*f;deta1=1+(Iw1+Iw2)/(m*r A2)+(If*ig(1)A2*i0A2* nT)/(m*r A2); deta2=1+(lw1+lw2)/(m*rA2)+(lf*ig (2)⼋2诃2* nT)/(m*「A2); deta3=1+(lw1+lw2)/(m*rA2)+(lf*ig(3)A2*i0A2* nT)/(m*「A2); deta4=1+ (lw1+lw2)/(m*rA2)+(lf*ig ⑷⼋2*⼼⼋2* nT)/(m*「A2); deta5=1+(lw1+lw2)/(m*rA2)+(lf*ig(5)A2*i0A2* nT)/(m*「A2); a仁(Ft1-Ff-Fw1)/(deta1*m);ad1=1./a1;a2=(Ft2-Ff-Fw2)/(deta2*m);ad2=1./a2;a3=(Ft3-Ff-Fw3)/(deta3*m);ad3=1./a3;a4=(Ft4-Ff-Fw4)/(deta4*m);ad4=1./a4;a5=(Ft5-Ff-Fw5)/(deta5*m);ad5=1./a5;Plot(ua1,ad1,ua2,ad2,ua3,ad3,ua4,ad4,ua5,ad5);axis([0 99 0 10]);title('汽车的加速度倒数曲线');xlabel('ua(km/h)');ylabel('1/a');gtext('1/a1');gtext('1/a2');gtext('1/a3');gtext('1/a4');gtext('1/a5'); a=max(a1);af=asi n(max(Ft1-Ff-Fw1)/G);C=ta n(af)/(a/ L+hg*ta n(af)/L);disp('假设后轮驱动,最⼤爬坡度相应的附着率=');disp(C);假设后轮驱动,最⼤爬坡度相应的附着率=0.4219(4) >>clear nT=0.85;r=0.367;f=0.013;CDA=2.77;i0=5.83;If=0.218;Iw1=1.798;Iw2=3.598;L=3.2;a=1.947;hg=0.9;m=3880;g=9.8; G=m*g; ig=[5.56 2.769 1.644 1.00 0.793]; nmin=600;nmax=4000; u1=0.377*r*nmin./ig/i0;u2=0.377*r*nmax./ig/i0;deta=0*ig;for i=1:5 deta(i)=1+(lw1+lw2)/(m*rA2)+(lf*(ig(i)F2*iOA2* nT)/(m*「A2);end ua=[6:O.O1:99];N=length(ua);n=O;Tq=O;Ft=O;inv_a=O*ua;delta=O*ua;Ff=G*f;Fw=CDA*ua.A2/21.15;for i=1:Nk=i;if ua(i)<=u2(2)n=ua(i)*(ig(2)*iO/r)/O.377;Tq=-19.313+295.27*( n/1000)-165.44*( n/1000F2+40.874*( n/1000F3-3.8445*( n/100 0)A4;Ft=Tq*ig(2)*iO*nT/r; inv_a(i)=(deta(2)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;elseif ua(i)<=u2(3)n=ua(i)*(ig(3)*i0/r)/0.377;Tq=-19.313+295.27*(n/1000)-165.44*(n/1000)A2+40.874*(n/1000)A3-3.8445*(n/100 0)A4;Ft=Tq*ig(3)*i0*nT/r; inv_a(i)=(deta(3)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*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)A2+40.874*(n/1000)A3-3.8445*(n/100 0)A4;Ft=Tq*ig(4)*i0*nT/r; inv_a(i)=(deta(4)*m)/(Ft-Ff-Fw(i));delta(i)=0.01*inv_a(i)/3.6;elsen=ua(i)*(ig(5)*i0/r)/0.377;Tq=-19.313+295.27*(n/1000)-165.44*(n/1000)A2+40.874*(n/1000)A3-3.8445*(n/1000)A4;Ft=Tq*ig(5)*iO* nT/r;in v_a(i)=(deta(5)*m)/(Ft-Ff-Fw(i)); delta(i)=0.01*i nv_a(i)/3.6;enda=delta(1:k);t(i)=sum(a);endplot(t,ua);axis([0 80 0 100]);title('汽车2档原地起步换挡加速时间曲线'); xlabel('时间t (s )'); ylabel('速度 ua (km/h )'); >> gin put ans =25.8223 70.0737 25.7467 70.0737所以汽车2档原地起步换挡加速⾏驶⾄70km/h 的加速时间约为25.8s其中,b 为燃油消耗率[g/(kW?h )]; Pe 为发动机净功率(kW );拟合式中的系数随转速n 变化。

汽车理论课后作业matlab编程详细讲解(带注释)

汽车理论课后作业matlab编程详细讲解(带注释)

1.3matlab程序:(1)%驱动力-行驶阻力平衡图%货车相关参数。

m=3880;g=9.8;nmin=600;nmax=4000;G=m*g;ig=[5.56 2.769 1.644 1.00 0.793];y=0.85;r=0.367;f=0.013;CdA=2.77;i0=5.83;L=3.2;a=1.947;hg=0.9;If=0.218;Iw1=1.798;Iw2=3.598;n=600:10:4000;%发动机转数转换成汽车行驶速度。

ua1=0.377*r*n/ig(1)/i0;ua2=0.377*r*n/ig(2)/i0;ua3=0.377*r*n/ig(3)/i0;ua4=0.377*r*n/ig(4)/i0;ua5=0.377*r*n/ig(5)/i0;%计算各档位驱动力。

Tq=-19.313+295.27*(n/1000)-165.44*(n/1000).^2+40.874*(n/1000).^3-3.8445*(n/1000).^4 ;Ft1=Tq*ig(1)*i0*y/r;Ft2=Tq*ig(2)*i0*y/r;Ft3=Tq*ig(3)*i0*y/r;Ft4=Tq*ig(4)*i0*y/r;Ft5=Tq*ig(5)*i0*y/r;%计算行驶阻力。

Fz1=m*g*f+2.77*ua1.^2/21.15;Fz2=m*g*f+2.77*ua2.^2/21.15;Fz3=m*g*f+2.77*ua3.^2/21.15;Fz4=m*g*f+2.77*ua4.^2/21.15;Fz5=m*g*f+2.77*ua5.^2/21.15;%驱动力-行驶阻力平衡图。

plot(ua1,Ft1,ua2,Ft2,ua3,Ft3,ua4,Ft4,ua5,Ft5,ua1,Fz1,'k',ua2,Fz2,'k',ua3,Fz3,'k',ua 4,Fz4,'k',ua5,Fz5,'k');title('驱动力-行驶阻力平衡图');xlabel('ua(km/s)');ylabel('Ft(N)');legend('Ft1','Ft2','Ft3','Ft4','Ft5','Ff+Fw')%求最高车速。

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