汽车理论matlab作业

if(B<2&B>0) k=i; end

if(ua(i,4)<=70) m=i; end

end t=ua(1,2)*b(1,2); for p1=2:69

t1(p1)=(ua(p1,2)-ua(p1-1,2))*(b(p1,2)+b(p1-1,2))*0.5; t=t+t1(p1);

end for p2=j:69

t2(p2)=(ua(p2,3)-ua(p2-1,3))*(b(p2,3)+b(p2-1,3))*0.5; t=t+t2(p2); end

for p3=k:m

t3(p3)=(ua(p3,4)-ua(p3-1,4))*(b(p3,4)+b(p3-1,4))*0.5; t=t+t3(p3);

end

t=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)最高档与次高档的等速百公里油耗曲线。

已知数据略。(参见《汽车理论》习题第二章第7题) 解题程序如下:用Matlab语言

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; n1=[815 1207 1614 2012 2603 3006 3403 3804]; Iw=2*Iw1+4*Iw2;

nd=400; Qid=0.299;

for j=1:5 for i=1:69

n(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;

Pe(i)=n(i)*Ttq(i)/9549;

ua(i,j)=0.377*r*n(i)/(ig(j)*i0);

Pz(i,j)=(mz*g*f*ua(i,j)/3600.+CdA*ua(i,j)^3/76140.)/nT; end

end plot(ua,Pe,ua,Pz); title('汽车功率平衡图)'); xlabel('ua(km/h)'); ylabel('Pe,Pz(kw)'); gtext('I') gtext('II') gtext('III') gtext('IV') gtext('V') gtext('P阻')

for j=1:5 for i=1:8

Td(i)=-19.313+295.27*(n1(i)/1000.0)-165.44*(n1(i)/1000.0)^2+40.874*(n1(i)/10 00.0)^3-3.8445*(n1(i)/1000.0)^4; Pd(i)=n1(i)*Td(i)/9549;

u(i,j)=0.377*n1(i)*r/(ig(j)*i0); end

end

b(1)=0.17768*Pd(1)^4-5.8629*Pd(1)^3+72.379*Pd(1)^2-416.46*Pd(1)+1326.8; b(2)=0.043072*Pd(2)^4-2.0553*Pd(2)^3+36.657*Pd(2)^2-303.98*Pd(2)+1354.7; b(3)=0.0068164*Pd(3)^4-0.51184*Pd(3)^3+14.524*Pd(3)^2-189.75*Pd(3)+1284.4; b(4)=0.0018555*Pd(4)^4-0.18517*Pd(4)^3+7.0035*Pd(4)^2-121.59*Pd(4)+1122.9; b(5)=0.00068906*Pd(5)^4-0.091077*Pd(5)^3+4.4763*Pd(5)^2-98.893*Pd(5)+1141.0; b(6)=0.00035032*Pd(6)^4-0.05138*Pd(6)^3+2.8593*Pd(6)^2-73.714*Pd(6)+1051.2; b(7)=0.00028230*Pd(7)^4-0.047449*Pd(7)^3+2.9788*Pd(7)^2-84.478*Pd(7)+1233.9; b(8)=-0.000038568*Pd(8)^40.00075215*Pd(8)^3+0.71113*Pd(8)^245.291*Pd(8) +1129.7; 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 q=1:69

bh(q,1)=polyval(B1,ua(q,1)); bh(q,2)=polyval(B2,ua(q,2)); bh(q,3)=polyval(B3,ua(q,3)); bh(q,4)=polyval(B4,ua(q,4)); bh(q,5)=polyval(B5,ua(q,5));

end for i=1:5

for q=1:69

Q(q,i)=Pz(q,i)*bh(q,i)/(1.02*ua(q,i)*7.05); end end

plot(ua(:,4),Q(:,4),ua(:,5),Q(:,5)); title('四档五档等速百公里油耗图'); xlabel('ua(km/h)');

ylabel('Qs(L/100km)');

三、改变1.3题中轻型货车的主减速器传动比,做出i0为5.17、5.43、5.83、6.17、6.33时的燃油经济性—加速时间曲线,讨论不同i0值对汽车性能的影响。

联系客服:779662525#qq.com(#替换为@)