MATLAB的发动机万有特性曲线绘制方法程序
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
%不同转速下的燃油消耗率与扭矩的曲线拟合
clear all
be仁[222.8,220.4,232.4,228.5,227.8,232.6,248.5,245.9,272.4,329.7];
Ttq仁[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;%转换矩阵格式
Be仁in terp1(Ttq1,be1,T1,'spli ne');% n=1400r/mi n 时燃油消耗率与扭矩的曲线拟合
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=i nterp1(Ttq2,be2,T2,'spl in e');
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=i nterp1(Ttq3,be3,T3,'spl in e');
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=i nterp1(Ttq4,be4,T4,'spl in e');
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=i nterp1(Ttq5,be5,T5,'spl in e');
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=i nterp1(Ttq6,be6,T6,'spl in e');
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,76334.1];
T7=34:344/9:378;
Be7=i nterp1(Ttq7,be7,T7,'spl in e');
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;
Be8=i nterp1(Ttq8,be8,T8,'spl in e');
B=[Be1';Be2';Be3';Be4';Be5';Be6';Be7';Be8'];
N=[1400*o nes(10,1);1600*o nes(10,1);1800*o nes(10,1);2000*o nes(10,1);2200* on es(10,1);2400*o nes
(10,1);2600*o nes(10,1);2800*o nes(10,1)];
Ttq n=[T1';T2';T3';T4';T5';T6';T7';T8'];
G=[o nes(80,1),N,Ttq n,N.A2,N.*Tt qn ,Ttq n. A2];
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.A2*A(4)+n.*Ttq*A(5)+Ttq.A2*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; Ttqw_N=i nterp1(Nw,Ttqw ,n 0,'spli ne');
h=repmat(Ttqw_N,501,1);
ii=find(Ttq>h);%确定超出边界的“格点”下标
be(ii)=NaN;%强制为非数
Pe(ii)=NaN;%强制为非数
%绘制等燃油消耗率曲线和等功率曲线三维拟合图
subplot(1,2,1);
mesh( n, Ttq,be);
hold on;
mesh( n,Ttq,Pe);
axis([1000,3000,100,600,0,500]);
hold on;
xlabel(' n(r/mi n)')
ylabel('Ttq(N*m)')
zlabel('Pe(KW) be(g/(KW*h))')
title('等燃油消耗曲线和等功率曲线的三维拟合图')
%绘制边界线(外特性曲线)
subplot(1,2,2);
plot( nO,Ttqw_N,'Li neWidth',2);
axis([1400,2800,100,550]);
xlabel(' n(r/mi n)');
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);%把“等位值”沿等位线随机标识
lege nd('等油耗曲线','等功率曲线','外特性曲线')
hold off