1、1.3(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*n
2、T/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(驱动力-行驶阻力平衡图);xl
3、abel(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);汽车最高车速= 100.2304km/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;n
4、max=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(%
5、);汽车最大爬坡度= 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.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
6、/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.1
7、5;Ff=G*f;deta1=1+(Iw1+Iw2)/(m*r2)+(If*ig(1)2*i02*nT)/(m*r2);deta2=1+(Iw1+Iw2)/(m*r2)+(If*ig(2)2*i02*nT)/(m*r2);deta3=1+(Iw1+Iw2)/(m*r2)+(If*ig(3)2*i02*nT)/(m*r2);deta4=1+(Iw1+Iw2)/(m*r2)+(If*ig(4)2*i02*nT)/(m*r2);deta5=1+(Iw1+Iw2)/(m*r2)+(If*ig(5)2*i02*nT)/(m*r2);a1=(Ft1-Ff-Fw1)/(deta1*m);ad1=1./a1;
8、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);
9、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)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=400
10、0;u1=0.377*r*nmin./ig/i0;u2=0.377*r*nmax./ig/i0;deta=0*ig;for i=1:5 deta(i)=1+(Iw1+Iw2)/(m*r2)+(If*(ig(i)2*i02*nT)/(m*r2);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: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
11、.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)
12、/(Ft-Ff-Fw(i); delta(i)=0.01*inv_a(i)/3.6; elseif ua(i)max(ua(2,:)&ua(3,j1)max(ua(3,:)&ua(4,j1)=70; temp3(1,n2)=ua(4,j1)/3.6; temp3(2,n2)=1./a(4,j1); n2=n2+1; end endy=temp1(1,1)*temp1(2,1)+qiuji(temp1(1,:),temp1(2,:)+qiuji(temp2(1,:),temp2(2,:)+qiuji(temp3(1,:),temp3(2,:);end(2) function ua=chesu(n
13、,r,ig,i0); %由转速计算车速ua=0.377*r.*n/(ig*i0);(3) function n=zhuansu(ua,r,ig,i0); %求转速n=ig*i0.*ua./(0.377*r);end(4) function y=zhuanju(n); %求转矩函数y=-19.313+295.27.*(n./1000)-165.44.*(n./1000).2+40.874.*(n./1000).3-3.8445.*(n./1000).4;(5) function y=qudongli(Ttq,ig,i0,yita,r); %求驱动力函数y=(ig*i0*yita.*Ttq)/r;
14、end(6) function p=qiuji(x0,y0) %求积分函数n0=size(x0);n=n0(2);x=linspace(x0(1),x0(n),200);y=spline(x0,y0,x); %插值% figure;plot(x,y);p=trapz(x,y) ;end(7) %求不同i0下的六工况油耗function b=youhao(i0);global f G CDA yita m r If Iw1 Iw2 pg B0 B1 B2 B3 B4 n %声明全局变量ig=6.09,3.09,1.71,1.00;r=0.367;yita=0.85;CDA=2.77;f=0.01
15、3;%i0=5.83;G=(3880)*9.8;If=0.218;Iw1=1.798;Iw2=3.598;m=3880; %汽车的基本参数设定n0=815 1207 1614 2012 2603 3006 3403 3804;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.7111
16、3;B30=-5.8629 -2.0553 -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;n=600:1:4000;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)
17、;ua4=0.377*r.*n./(i0*ig(4); %求出发动机转速范围内对应的III、IV档车速F4=f*G+CDA*(ua4.2)/21.15; %求出滚动阻力和空气阻力的和P_fw4=F4.*ua4./(yita*3.6*1000); %求出阻力功率for i=1:1:3401 %用拟合公式求出各个燃油消耗率b4(i)=B0(i)+B1(i)*P_fw4(i)+B2(i)*(P_fw4(i)2+B3(i)*(P_fw4(i)3+B4(i)*(P_fw4(i)4;endpg=7.06; %汽油的重度取7.06N/Lua4_m=25,40,50; %匀速阶段的车速s_m=50,250,2
18、50; %每段匀速走过的距离b4_m=spline(ua4,b4,ua4_m); %插值得出对应速度的燃油消耗率F4_m=f*G+CDA*(ua4_m.2)/21.15; %车速对应的阻力P_fw4_m=F4_m.*ua4_m./(yita*3.6*1000); %发动机功率Q4_m=P_fw4_m.*b4_m.*s_m./(102.*ua4_m.*pg) ; Q4_a1=jiasu(40,25,ig(4),0.25,ua4,i0);Q4_a2=jiasu(50,40,ig(4),0.2,ua4,i0);Qid=0.299;tid=19.3;s=1075; Q_i=Qid*tid; %求出减速
19、阶段的燃油消耗量 Q4all=(sum(Q4_m)+Q4_a1+Q4_a2+Q_i)*100/s; %IV档六工况百公里燃油消耗量b=Q4all;(8)加速阶段处理函数function q=jiasu(umax,umin,ig,a,ua0,i0);global f G CDA yita m r If Iw1 Iw2 pg B0 B1 B2 B3 B4 n; %i0 ;ua1=umin:1:umax; %把速度范围以1km/h为间隔进行划分delta=1+(Iw1+Iw2)/(m*r2)+(If*ig2*i02*yita)/(m*r2); P0=(G*f.*ua0./3600+CDA.*ua0.
20、3/76140+(delta*m.*ua0/3600)*a)/yita;P=(G*f.*ua1/3600+CDA.*ua1.3/76140+(delta*m.*ua1/3600)*a)/yita;dt=1/(3.6*a) ; %速度每增加1km/h所需要的时间for i=1:1:3401 %重新利用拟合公式求出b与ua的关系 b0(i)=B0(i)+B1(i)*P0(i)+B2(i)*(P0(i)2+B3(i)*(P0(i)3+B4(i)*(P0(i)4;endb1=interp1(ua0,b0,ua1); %插值出各个速度节点的燃油消耗率Qt=P.*b1./(367.1.*pg); %求出各
21、个速度节点的燃油消耗率i1=size(Qt); i=i1(2);Qt1=Qt(2:i-1);q=(Qt(1)+Qt(i)*dt./2+sum(Qt1)*dt; %求该加速阶段的燃油消耗量4.31) 问: 程序:clear k=4080;hgk=0.845;Lk=3.950;ak=2.10;betak=0.38;bk=Lk-ak;%空载时的参数mm=9290;hgm=1.170;Lm=3.950;am=2.950;betam=0.38;bm=Lm-am;%满载时的参数z=0:0.01:1.0;figure(1);fai=z;fai_fk=betak*z*Lk./(bk+z*hgk);%空载时前轴
22、的ffai_fm=betam*z*Lm./(bm+z*hgm);%满载时前轴的ffai_rk=(1-betak)*z*Lk./(ak-z*hgk);%空载时后轴的rfai_rm=(1-betam)*z*Lm./(am-z*hgm);%满载时后轴的rplot(z,fai_fk,b-,z,fai_fm,r,z,fai_rk,b-,z,fai_rm,r,z,fai,k);title(利用附着系数与制动强度的关系曲线);xlabel(制动强度(z/g);ylabel(利用附着系数);gtext(r(空载),gtext(r(满载),gtext(=z),gtext(f(空载),gtext(f(满载);fi
23、gure(2);Efk=z./fai_fk*100;%空载时前轴的制动效率Efm=z./fai_fm*100;Erk=z./fai_rk*100;Erm=z./fai_rm*100;plot(fai_fk,Efk,b,fai_fm,Efm,r,fai_rk,Erk,b,fai_rm,Erm,r);axis(0 1 0 100);title(前.后制动效率曲线);xlabel(附着系数);ylabel(制动效率%);gtext(Ef),gtext(Er),gtext(Er),gtext(满载),gtext(空载);2) 问和3)问 程序:clearmk=4080;hgk=0.845;Lk=3.9
24、50;ak=2.10;betak=0.38;bk=Lk-ak;%空载时的参数mm=9290;hgm=1.170;Lm=3.950;am=2.950;betam=0.38;bm=Lm-am;%满载时的参数z=0:0.01:1;fai_fk=betak*z*Lk./(bk+z*hgk);%空载时前轴的ffai_fm=betam*z*Lm./(bm+z*hgm);%满载时前轴的ffai_rk=(1-betak)*z*Lk./(ak-z*hgk);%空载时后轴的rfai_rm=(1-betam)*z*Lm./(am-z*hgm);%满载时后轴的rEfk=z./fai_fk*100;%空载时前轴的制动效
25、率Efm=z./fai_fm*100;Erk=z./fai_rk*100;Erm=z./fai_rm*100; t1=0.02;t2=0.02;ua0=30;fai=0.80;g=9.8;ak1=Erk(81)*g*fai/100;am1=Erm(81)*g*fai/100;Sk1=(t1+t2/2)*ua0/3.6+ua02/(25.92*ak1);%制动距离Sm1=(t1+t2/2)*ua0/3.6+ua02/(25.92*am1);disp(空载时,汽车制动距离Sk1=);disp(Sk1);disp(满载时,汽车制动距离Sm1=);disp(Sm1);ak2=fai*g*ak/(Lk+
26、fai*hgk);am2=fai*g*am/(Lm+fai*hgm);ak3=fai*g*bk/(Lk-fai*hgk);am3=fai*g*bm/(Lk-fai*hgm);Sk2=(t1+t2/2)*ua0/3.6+ua02/(25.92*ak2);%制动距离Sm2=(t1+t2/2)*ua0/3.6+ua02/(25.92*am2);Sk3=(t1+t2/2)*ua0/3.6+ua02/(25.92*ak3);Sm3=(t1+t2/2)*ua0/3.6+ua02/(25.92*am3);disp(空载时,前制动器损坏,汽车制动距离Sk2=);disp(Sk2);disp(满载时,前制动器损
27、坏,汽车制动距离Sm2=);disp(Sm2);disp(空载时,后制动器损坏,汽车制动距离Sk3=);disp(Sk3);空载时,汽车制动距离Sk1= 7.8668满载时,汽车制动距离Sm1= 5.6354空载时,前制动器损坏,汽车制动距离Sk2= 10.0061满载时,前制动器损坏,汽车制动距离Sm2= 7.5854空载时,后制动器损坏,汽车制动距离Sk3= 8.08795.11m=1818.2;Iz=3885;L=3.048;a=1.463;b=1.585;k1=-62618;k2=-110185;i=20;g=9.8;R0=15;u1=30.56;K=m*(a/k2-b/k1)/L2;
28、Uch=(1/K)(1/2);%特征车速disp(稳定性因数(s2/m2)K=);disp(K);disp(特征车速(m/s)Uch=);disp(Uch);u=0:0.05:30;S=u./(L*(1+K*u.2);%稳态横摆角速度增益plot(u,S);title(汽车稳态横摆角速度增益曲线);xlabel(车速u(m/s);ylabel(稳态横摆角速度增益);disp(u=22.35m/s时,转向灵敏度为);disp(S(448);SM=k2/(k1+k2)-a/L;ay=0.4*g;A=K*ay*L;B=L/R0;R=L/(B-A);C=R/R0;%转弯半径比disp(静态储备系数S.
29、M.=);disp(SM);disp(侧向加速度为0.4g时前、后轮侧偏角绝对值之差(rad) a1-a2=);disp(A);disp(侧向加速度为0.4g时转弯半径比值R/R0=);disp(C);W0=L/u1*(k1*k2/(m*Iz)*(1+K*u12)(1/2);%固有(圆)频率D=(-m*(k1*a2+k2*b2)-Iz*(k1+k2)/(2*L*(m*Iz*k1*k2*(1+K*u12)(1/2);%阻尼比t=atan(1-D2)(1/2)/(-m*u1*a*W0/(L*k2)-D)/(W0*(1-D2)(1/2);%反应时间E=atan(1-D2)(1/2)/D)/(W0*(1-D2)(1/2)+t;%峰值反应时间disp(车速u=30.56m/s时的瞬态响应参数分别为:);disp(横摆角速度波动的固有(圆)频率(rad)为 );disp(W0);disp(阻尼比为);disp(D);disp(反应时间(s)为);disp(t);disp(峰值反应时间(s)为);disp(E);稳定性因数(s2/m2)K= 0.0024特征车速(m/s)Uch= 20.6053u=22.35m/s时,转向灵敏度为 3.3690静态储备系数S.M.= 0.1576侧向