节气门位置 | 0 | 0 | 0.04 | 0.08 | 0.12 | 0.16 | 0.2 | 0.24 | 0.28 | 0.32 | 0.36 | 0.4 | 0.44 | 0.48 | 0.52 | 0.56 | 0.6 | 0.64 | 0.68 | 0.72 | 0.76 | 0.8 | 0.84 | 0.88 | 0.92 | 0.96 | 1 |
转速 | 600 | 8.00E-05 | 0.0002 | 0.0003 | 0.00032 | 0.00034 | 0.00037 | 0.00039 | 0.00041 | 0.00043 | 0.00046 | 0.00048 | 0.0005 | 0.00052 | 0.00055 | 0.00057 | 0.00059 | 0.00061 | 0.00064 | 0.00066 | 0.00068 | 0.0007 | 0.00073 | 0.00075 | 0.00077 | 0.00079 | 0.00082 |
800 | 0.00013 | 0.0002 | 0.0004 | 0.00059 | 0.00071 | 0.0008 | 0.00083 | 0.00085 | 0.00086 | 0.00087 | 0.00088 | 0.00089 | 0.0009 | 0.00091 | 0.00092 | 0.00093 | 0.00094 | 0.00096 | 0.00097 | 0.00098 | 0.00099 | 0.001 | 0.00101 | 0.00102 | 0.00103 | 0.00104 | |
1000 | 0.00016 | 0.0002 | 0.00039 | 0.00062 | 0.00079 | 0.00091 | 0.00099 | 0.00104 | 0.00107 | 0.00108 | 0.00109 | 0.00111 | 0.00112 | 0.00113 | 0.00114 | 0.00115 | 0.00117 | 0.00118 | 0.00119 | 0.0012 | 0.00121 | 0.00123 | 0.00124 | 0.00125 | 0.00126 | 0.00127 | |
1200 | 0.00016 | 0.00021 | 0.00039 | 0.00064 | 0.00088 | 0.00104 | 0.00114 | 0.00123 | 0.00128 | 0.00131 | 0.00133 | 0.00134 | 0.00135 | 0.00137 | 0.00138 | 0.0014 | 0.00141 | 0.00142 | 0.00144 | 0.00145 | 0.00147 | 0.00148 | 0.00149 | 0.00151 | 0.00152 | 0.00154 | |
1400 | 0.00017 | 0.00023 | 0.00039 | 0.00066 | 0.00091 | 0.00113 | 0.0013 | 0.0014 | 0.00148 | 0.00153 | 0.00156 | 0.00158 | 0.0016 | 0.00161 | 0.00163 | 0.00165 | 0.00167 | 0.00168 | 0.0017 | 0.00172 | 0.00174 | 0.00175 | 0.00177 | 0.00179 | 0.00181 | 0.00182 | |
1600 | 0.0002 | 0.00026 | 0.0004 | 0.00066 | 0.00095 | 0.00119 | 0.00139 | 0.00154 | 0.00164 | 0.00173 | 0.00178 | 0.00181 | 0.00183 | 0.00184 | 0.00186 | 0.00188 | 0.0019 | 0.00192 | 0.00194 | 0.00195 | 0.00197 | 0.00199 | 0.00201 | 0.00203 | 0.00205 | 0.00207 | |
1800 | 0.00021 | 0.00028 | 0.00039 | 0.00067 | 0.00095 | 0.00124 | 0.00147 | 0.00166 | 0.00178 | 0.00189 | 0.00195 | 0.002 | 0.00203 | 0.00206 | 0.00209 | 0.00212 | 0.00215 | 0.00218 | 0.00222 | 0.00225 | 0.00228 | 0.00231 | 0.00234 | 0.00237 | 0.0024 | 0.00243 | |
2000 | 0.00023 | 0.0003 | 0.00038 | 0.00065 | 0.00096 | 0.00129 | 0.00156 | 0.00178 | 0.00195 | 0.00207 | 0.00215 | 0.00221 | 0.00227 | 0.00231 | 0.00234 | 0.00238 | 0.00241 | 0.00245 | 0.00249 | 0.00252 | 0.00256 | 0.00259 | 0.00263 | 0.00267 | 0.0027 | 0.00274 | |
2200 | 0.00025 | 0.00033 | 0.00041 | 0.00065 | 0.00098 | 0.0013 | 0.00162 | 0.00189 | 0.00212 | 0.00226 | 0.00239 | 0.00246 | 0.00252 | 0.00257 | 0.00261 | 0.00264 | 0.00268 | 0.00272 | 0.00275 | 0.00279 | 0.00282 | 0.00286 | 0.0029 | 0.00293 | 0.00297 | 0.003 | |
2400 | 0.00027 | 0.00036 | 0.00044 | 0.00065 | 0.00095 | 0.00133 | 0.00168 | 0.00199 | 0.00223 | 0.0024 | 0.00255 | 0.00265 | 0.00272 | 0.00278 | 0.00284 | 0.0029 | 0.00296 | 0.00302 | 0.00308 | 0.00314 | 0.00319 | 0.00325 | 0.00331 | 0.00337 | 0.00343 | 0.00349 | |
2800 | 0.00033 | 0.00039 | 0.00046 | 0.00065 | 0.00097 | 0.00134 | 0.00174 | 0.00207 | 0.00239 | 0.00265 | 0.0028 | 0.00296 | 0.00307 | 0.00313 | 0.0032 | 0.00326 | 0.00331 | 0.00336 | 0.00342 | 0.00347 | 0.00352 | 0.00357 | 0.00363 | 0.00368 | 0.00373 | 0.00379 | |
3200 | 0.00038 | 0.00045 | 0.00053 | 0.00064 | 0.00097 | 0.00136 | 0.00175 | 0.00216 | 0.00256 | 0.00287 | 0.0031 | 0.00326 | 0.00343 | 0.00365 | 0.00388 | 0.0041 | 0.00424 | 0.00425 | 0.00427 | 0.00429 | 0.0043 | 0.00432 | 0.00434 | 0.00435 | 0.00437 | 0.00439 | |
3600 | 0.00043 | 0.00052 | 0.00061 | 0.0007 | 0.00095 | 0.00137 | 0.00179 | 0.00221 | 0.00272 | 0.00315 | 0.00347 | 0.00384 | 0.00423 | 0.00463 | 0.00487 | 0.00495 | 0.00502 | 0.00509 | 0.00513 | 0.00514 | 0.00516 | 0.00517 | 0.00519 | 0.0052 | 0.00521 | 0.00523 | |
4000 | 0.00047 | 0.00059 | 0.00083 | 0.00118 | 0.00162 | 0.0021 | 0.00259 | 0.00317 | 0.00367 | 0.00403 | 0.00436 | 0.00487 | 0.00537 | 0.00587 | 0.00603 | 0.00608 | 0.00614 | 0.0062 | 0.00624 | 0.00625 | 0.00626 | 0.00627 | 0.00629 | 0.0063 | 0.00631 | 0.00633 | |
4400 | 0.00051 | 0.00064 | 0.00085 | 0.00122 | 0.00165 | 0.00218 | 0.0027 | 0.00333 | 0.00392 | 0.00443 | 0.00477 | 0.00514 | 0.00568 | 0.00621 | 0.00675 | 0.00703 | 0.00709 | 0.00715 | 0.00721 | 0.00726 | 0.00731 | 0.00732 | 0.00733 | 0.00735 | 0.00736 | 0.00738 | |
4800 | 0.00052 | 0.00074 | 0.00095 | 0.00121 | 0.00167 | 0.00218 | 0.00272 | 0.00336 | 0.00404 | 0.00459 | 0.00538 | 0.0064 | 0.00701 | 0.00725 | 0.0075 | 0.00774 | 0.00793 | 0.00799 | 0.00805 | 0.00811 | 0.00817 | 0.00822 | 0.00828 | 0.00829 | 0.0083 | 0.00831 | |
5200 | 0.00059 | 0.00078 | 0.00098 | 0.00117 | 0.00164 | 0.00216 | 0.00272 | 0.0034 | 0.0041 | 0.00505 | 0.00633 | 0.0069 | 0.00747 | 0.00779 | 0.00807 | 0.00835 | 0.00863 | 0.0088 | 0.00886 | 0.00891 | 0.00897 | 0.00903 | 0.00909 | 0.00914 | 0.0092 | 0.00926 | |
5600 | 0.00065 | 0.00083 | 0.001 | 0.00119 | 0.0016 | 0.00212 | 0.00273 | 0.00356 | 0.00462 | 0.00551 | 0.00638 | 0.00704 | 0.00762 | 0.00803 | 0.0083 | 0.00857 | 0.00885 | 0.00912 | 0.00925 | 0.00931 | 0.00937 | 0.00943 | 0.00949 | 0.00955 | 0.00961 | 0.00967 | |
5800 | 0.00076 | 0.0009 | 0.00103 | 0.00119 | 0.00162 | 0.00211 | 0.00271 | 0.00357 | 0.0046 | 0.00548 | 0.00642 | 0.00712 | 0.00772 | 0.00816 | 0.00841 | 0.00867 | 0.00892 | 0.00918 | 0.0093 | 0.00935 | 0.0094 | 0.00945 | 0.00951 | 0.00956 | 0.00961 | 0.00966 |
一.Carsim中复制出来的燃油特性曲线数据
th2=[0 0.04 0.08 0.12 0.16 0.2 0.24 0.28 0.32 0.36 0.4 0.44 0.48 0.52 0.56 0.6 0.64 0.68 0.72 0.76 0.8 0.84 0.88 0.92 0.96 1
];
n2=[600
800
1000
1200
1400
1600
1800
2000
2200
2400
2800
3200
3600
4000
4400
4800
5200
5600
5800
];
be=[8.00E-05 0.0002 0.0003 0.00032 0.00034 0.00037 0.00039 0.00041 0.00043 0.00046 0.00048 0.0005 0.00052 0.00055 0.00057 0.00059 0.00061 0.00064 0.00066 0.00068 0.0007 0.00073 0.00075 0.00077 0.00079 0.00082
0.00013 0.0002 0.0004 0.00059 0.00071 0.0008 0.00083 0.00085 0.00086 0.00087 0.00088 0.00089 0.0009 0.00091 0.00092 0.00093 0.00094 0.00096 0.00097 0.00098 0.00099 0.001 0.00101 0.00102 0.00103 0.00104
0.00016 0.0002 0.00039 0.00062 0.00079 0.00091 0.00099 0.00104 0.00107 0.00108 0.00109 0.00111 0.00112 0.00113 0.00114 0.00115 0.00117 0.00118 0.00119 0.0012 0.00121 0.00123 0.00124 0.00125 0.00126 0.00127
0.00016 0.00021 0.00039 0.00064 0.00088 0.00104 0.00114 0.00123 0.00128 0.00131 0.00133 0.00134 0.00135 0.00137 0.00138 0.0014 0.00141 0.00142 0.00144 0.00145 0.00147 0.00148 0.00149 0.00151 0.00152 0.00154
0.00017 0.00023 0.00039 0.00066 0.00091 0.00113 0.0013 0.0014 0.00148 0.00153 0.00156 0.00158 0.0016 0.00161 0.00163 0.00165 0.00167 0.00168 0.0017 0.00172 0.00174 0.00175 0.00177 0.00179 0.00181 0.00182
0.0002 0.00026 0.0004 0.00066 0.00095 0.00119 0.00139 0.00154 0.00164 0.00173 0.00178 0.00181 0.00183 0.00184 0.00186 0.00188 0.0019 0.00192 0.00194 0.00195 0.00197 0.00199 0.00201 0.00203 0.00205 0.00207
0.00021 0.00028 0.00039 0.00067 0.00095 0.00124 0.00147 0.00166 0.00178 0.00189 0.00195 0.002 0.00203 0.00206 0.00209 0.00212 0.00215 0.00218 0.00222 0.00225 0.00228 0.00231 0.00234 0.00237 0.0024 0.00243
0.00023 0.0003 0.00038 0.00065 0.00096 0.00129 0.00156 0.00178 0.00195 0.00207 0.00215 0.00221 0.00227 0.00231 0.00234 0.00238 0.00241 0.00245 0.00249 0.00252 0.00256 0.00259 0.00263 0.00267 0.0027 0.00274
0.00025 0.00033 0.00041 0.00065 0.00098 0.0013 0.00162 0.00189 0.00212 0.00226 0.00239 0.00246 0.00252 0.00257 0.00261 0.00264 0.00268 0.00272 0.00275 0.00279 0.00282 0.00286 0.0029 0.00293 0.00297 0.003
0.00027 0.00036 0.00044 0.00065 0.00095 0.00133 0.00168 0.00199 0.00223 0.0024 0.00255 0.00265 0.00272 0.00278 0.00284 0.0029 0.00296 0.00302 0.00308 0.00314 0.00319 0.00325 0.00331 0.00337 0.00343 0.00349
0.00033 0.00039 0.00046 0.00065 0.00097 0.00134 0.00174 0.00207 0.00239 0.00265 0.0028 0.00296 0.00307 0.00313 0.0032 0.00326 0.00331 0.00336 0.00342 0.00347 0.00352 0.00357 0.00363 0.00368 0.00373 0.00379
0.00038 0.00045 0.00053 0.00064 0.00097 0.00136 0.00175 0.00216 0.00256 0.00287 0.0031 0.00326 0.00343 0.00365 0.00388 0.0041 0.00424 0.00425 0.00427 0.00429 0.0043 0.00432 0.00434 0.00435 0.00437 0.00439
0.00043 0.00052 0.00061 0.0007 0.00095 0.00137 0.00179 0.00221 0.00272 0.00315 0.00347 0.00384 0.00423 0.00463 0.00487 0.00495 0.00502 0.00509 0.00513 0.00514 0.00516 0.00517 0.00519 0.0052 0.00521 0.00523
0.00047 0.00059 0.00083 0.00118 0.00162 0.0021 0.00259 0.00317 0.00367 0.00403 0.00436 0.00487 0.00537 0.00587 0.00603 0.00608 0.00614 0.0062 0.00624 0.00625 0.00626 0.00627 0.00629 0.0063 0.00631 0.00633
0.00051 0.00064 0.00085 0.00122 0.00165 0.00218 0.0027 0.00333 0.00392 0.00443 0.00477 0.00514 0.00568 0.00621 0.00675 0.00703 0.00709 0.00715 0.00721 0.00726 0.00731 0.00732 0.00733 0.00735 0.00736 0.00738
0.00052 0.00074 0.00095 0.00121 0.00167 0.00218 0.00272 0.00336 0.00404 0.00459 0.00538 0.0064 0.00701 0.00725 0.0075 0.00774 0.00793 0.00799 0.00805 0.00811 0.00817 0.00822 0.00828 0.00829 0.0083 0.00831
0.00059 0.00078 0.00098 0.00117 0.00164 0.00216 0.00272 0.0034 0.0041 0.00505 0.00633 0.0069 0.00747 0.00779 0.00807 0.00835 0.00863 0.0088 0.00886 0.00891 0.00897 0.00903 0.00909 0.00914 0.0092 0.00926
0.00065 0.00083 0.001 0.00119 0.0016 0.00212 0.00273 0.00356 0.00462 0.00551 0.00638 0.00704 0.00762 0.00803 0.0083 0.00857 0.00885 0.00912 0.00925 0.00931 0.00937 0.00943 0.00949 0.00955 0.00961 0.00967
0.00076 0.0009 0.00103 0.00119 0.00162 0.00211 0.00271 0.00357 0.0046 0.00548 0.00642 0.00712 0.00772 0.00816 0.00841 0.00867 0.00892 0.00918 0.0093 0.00935 0.0094 0.00945 0.00951 0.00956 0.00961 0.00966
];
[x1,y1]=meshgrid(th2,n2);
surf(x1,y1,be);
figure
[x1i, y1i] = meshgrid(0:0.01:1,0:50:6700);
z1i = griddata(x1,y1,be, x1i,y1i);
surf(x1i,y1i,z1i);
title('发动机燃油特性三维图','fontsize',15)
xlabel('节气门开度','fontsize',15), ylabel('发动机转速','fontsize',15), zlabel('燃油消耗率','fontsize',15)
二.在将两个数据表结合在一起的时候不会弄了,只能用公式的方式来做,学习一下cftool工具箱的使用
matlab拟合工具箱cftool_哔哩哔哩_bilibili
三.数据多项式拟合学习
https://blog.csdn.net/qq_45625115/article/details/115874761
四.学习的别人代码
clear all
be1=[222.8,220.4,232.4,228.5,227.8,232.6,248.5,245.9,272.4,329.7];
Ttq1=[399.8,354.1,318.5,278.1,236.2,203.6,185.3,157.2,117.2,80.8];
T1=80:320/9:400;%转换矩阵格式,从90开始,400结束,以320/9为间隔
Be1=interp1(Ttq1,be1,T1,'spline');%n=1400r/min时燃油消耗率与扭矩的曲线拟合
be2=[222.0,221.7,235.4,226.5,230.5,236.8,249.1,276.1,407.9,487.0];
Ttq2=[409.1,365.7,328.3,284.1,243.7,203.2,164.3,123.9,83.5,39.7];
T2=39:371/9:410;
Be2=interp1(Ttq2,be2,T2,'spline');%n=1600
be3=[226.0,225.3,226.4,233.9,242.1,283.3,253.9,271.4,323.5,468.6];
Ttq3=[408.3,368.3,328.3,289.0,244.4,208.8,167.7,132.1,89.5,46.1];
T3=46:363/9:409;
Be3=interp1(Ttq3,be3,T3,'spline');%n=1800
be4=[206.5,231.1,231.1,233.0,242.0,244.9,265.0,299.8,398.0,596.8];
Ttq4=[425.6,380.3,332.7,290.9,244.4,205.1,160.2,114.5,68.8,30.7];
T4=30:396/9:426;
Be4=interp1(Ttq4,be4,T4,'spline');%n=2000
be5=[234.7,259.8,235.5,237.6,242.8,292.3,277.9,308.7,396.2,605.9];
Ttq5=[420.7,379.6,334.6,291.6,244.4,202.8,157.5,116.0,74.1,37.8];
T5=37:384/9:421;
Be5=interp1(Ttq5,be5,T5,'spline');%n=2200
be6=[174.2,242.2,252.1,287.4,253.6,263.6,290.6,316.8,378.0,518.8];
Ttq6=[404.6,360.5,322.7,283.0,243.3,205.5,162.1,124.7,86.8,52.4];
T6=52:353/9:405;
Be6=interp1(Ttq6,be6,T6,'spline');%n=2400
be7=[256.9,253.7,253.5,260.0,303.8,280.7,300.6,346.6,435.6,812.9];
Ttq7=[378.0,344.7,310.3,264.3,226.1,186.8,154.2,115.3,76.3,34.1];
T7=34:344/9:378;
Be7=interp1(Ttq7,be7,T7,'spline');%n=2600
be8=[257.9,295.3,282.4,288.7,301.9,329.7,357.0,475.4,580.3,1080.1];
Ttq8=[315.6,275.5,242.5,210.3,178.5,145.6,118.6,72.6,52.8,22.4];
T8=22:294/9:316;%共10个数
Be8=interp1(Ttq8,be8,T8,'spline');%n=2800
B=[Be1';Be2';Be3';Be4';Be5';Be6';Be7';Be8'];% ;表示行与行的间隔 ,表示列与列的间隔
N=[1400*ones(10,1);1600*ones(10,1);1800*ones(10,1);2000*ones(10,1);2200*ones(10,1);2400*ones(10,1);2600*ones(10,1);2800*ones(10,1)];%产生10行1列的数组
Ttqn=[T1';T2';T3';T4';T5';T6';T7';T8'];
G=[ones(80,1),N,Ttqn,N.^2,N.*Ttqn,Ttqn.^2];
A=G\B;%A为6*1矩阵
[n,Ttq]=meshgrid(1400:2800,100:600);%生成n-Ttq平面上的自变量“格点”矩阵
be=A(1)+n.*A(2)++Ttq*A(3)+n.^2*A(4)+n.*Ttq*A(5)+Ttq.^2*A(6);
Pe=Ttq.*n/9550;
%外特性实验数据拟合
Nw=[1403,1597,1797,1986,2102,2199,2303,2400,2507,2598,2700,2802];
Ttqw=[474,497,515,526,528.8,522.8,509.5,492.2,471.2,448.4,408.3,357.4];
n0=1400:2800;%共1401个数
Ttqw_N=interp1(Nw,Ttqw,n0,'spline');%共1401个数
h=repmat(Ttqw_N,501,1);%。共1401列,501行;repmat:重复1*1401列;501,1
ii=find(Ttq>h);%确定超出边界的“格点”下标,即行和列数
be(ii)=NaN;%强制为非数,绘图时挖掉超出范围的数
Pe(ii)=NaN;%强制为非数
%绘制等燃油消耗率曲线和等功率曲线三维拟合图
subplot(1,2,1);
mesh(n,Ttq,be);%生成由n,Ttq和be指定的网线面的三维网格图
hold on;
mesh(n,Ttq,Pe);
axis([1000,3000,100,600,0,500]);
hold on;
xlabel('n(r/min)')
ylabel('Ttq(N*m)')
zlabel('Pe(KW) be(g/(KW*h))')
title('等燃油消耗曲线和等功率曲线的三维拟合图')
%绘制边界线(外特性曲线)
subplot(1,2,2);
plot(n0,Ttqw_N,'LineWidth',2);
axis([1400,2800,100,550]);
xlabel('n(r/min)');
ylabel('Ttq(N*m)');
title('万有特性曲线');
hold on;
%绘制等油耗率曲线的二维图
B=contour(n,Ttq,be,11);%画等位线,并给出标识数据
clabel(B);%把“等位值”沿等位线随机标识
hold on;
%绘制等功率曲线的二维图
P=contour(n,Ttq,Pe,11);%画等位线,并给出标识数据
clabel(P);%把“等位值”沿等位线随机标识
legend('等油耗曲线','等功率曲线','外特性曲线')
hold off