Professional Documents
Culture Documents
MATLAB Commands
How to define matrix a
a=[3 4]
b=[5 6]
MATLAB Commands
Matrix multiply: *
a=[3 4]
b=[5; 6]
Array divide: ./
Matrix divide: /
Array Power: .^
Matrix Power: ^
Transpose:
Write ; at the end of each line to suppress the output in the command window
MATLAB Commands
Conditionally executed statements: if
Speed [km/h]
Time
Gear
speed=nedc(:,2);
gear=nedc(:,3);
rpm:
Km
v
* 60
h
rev
rpm
fd gear
rpm(i)=speed(i)*60/2/pi/r_wheel/3.6*ratio_fin*ratio;
if rpm(i)<rpm_idle
rpm(i)=rpm_idle;
end
To
avoid
downspeeding
below idling speed
BMEP:
fres(i)=F0+F1*speed(i)+F2*speed(i)^2;
m_trasl(i)=mass+J_wheel/r_wheel^2+J_eng/r_wheel^2*ratio^2*ratio_fin^2
acc(i)=(speed(i)-speed(i-1))/(time(i)-time(i-1));
!!!!!
pwr(i)=(fres(i)+m_trasl(i)*acc(i))*speed(i);
bmep(i)=1200*pwr(i)/rpm(i)/Vtot;
CAUTION: The performance map is not defined for speed <850 rpm e BMEP<0.5
bar ! In these conditions the idle fuel consumption should be applied.
NOx Emission Rate:
nox=xlsread(piano_quotato_nox_g_h.txt);
...
[g]
[g]
CO2 emissions:
co2=...
mCO2 mC x H y
CO
mC H 3.167
C H
2
mCO2
f [ kg / l ]
[ g / km]
V [l / 100km]
0.0315
Post-processing
I.e. rpm vs time plot
plot(time,rpm)
grid on
Insert a grid
[kW]
[g/kWh]
Post-processing
BSFC map
V=[200 210 220 230 240 250 275 300 325 350 375 400];
[c,h]=contour(rpm_pq,bmep_pq,bsfc,V)
clabel(c,h)
Additional Features
Cut-off: the fuel consumption should be zero when
BMEP < 0 e rpm > speed_threshold
if bmep(i)<0 & rpm>1000
fc(i)=0
elseif
...
end
Energy Consumption
kj=kj+pwr(i)*(time(i)-time(i-1))