Engine Model
Engine Model
Engine Model
50
45
40
35
Cylinder Pressure (bar)
30
25
20
15
10
5
0
0 90 180 270 360 450 540 630 720
Crank Angle (deg)
1
Using MATLAB/SIMULINK to simulink real engine, refer to Simulink Demonstrationas
shown in below Fig. The engine model includes:(1)set up the timing, (2)calculation of mass air
flow rate from throttle and manifold, (3)identify the air mass for one cycle, (4)calculation of torque,
and (5)vehicle dynamics. Input throttle positioncan estimate engine speed.
A practical engine model includes the subs-systems: (1) charging, (2) combustion,(3) heat
transfer, (4) friction, and (5) work done. Please refer to IMECE 2003 paper, by YY Wu et al.,
“Engine Modeling with Inlet and Exhaust Wave action for Real Time Control”
2
Practice:
5. To run the SIMULINK demonstration model “engine.mdl” for exercise.
(1) Change the throttle angle to: 10-20, 30-50, 60-90
(2) Change the “Drag Torque”.
(3) Change the throttle with a “constant” of 10, 20, 30, 40, 50, 60, 70, 80, 90.
(4) Change the throttle with a “ramp” as slope 10.
Simplify the engine model “engine.mdl” by deleting the sub models: „valve timing‟, „compression‟,
„intake‟, „vehicle dynamics‟ and „drag torque‟. The new model is “ENGINE01.mdl”.
The engine model (ENGINE01.mdl) is used for torque calculation only. The inputs are throttle
angle and engine speed (rpm), the output is torque (Nm). It is like an engine tested on a
dynamometer.
Practice:
6. To run the simplified model “ENGINE01.mdl” for exercise.
(1) Change the throttle angle to: 10-20, 30-50, 60-90
(2) Change the “rpm” to: 3000, 4000, 5000, …, 10000.
(3) Change the throttle with a “constant” of 10, 20, 30, 40, 50, 60, 70, 80, 90.
(4) Change the throttle with a “ramp” as slope 10.
7. Using several „step‟ blocks to set engine speed. (1000, 3000, …, 10000rpm)
parameters of „Step‟: Step time, Initial value, Finial value.
parameters of „Sum‟: Icon shape, List of signs.
3
4
2. Subs-Systems of Engine Model:
˙Throttle
˙Intake manifold
˙Torque generation
m ai ai m
(m ao ) m ao
Intake
Cylinder
Manifold
Throttle:
ai g ( Pm ) 2.821 0.05231 0.10299 2 0.00063 3
m
Pamb
g(Pm)= 1 for Pm
2
2 P
g ( pm ) Pm Pamb Pm Pm amb
2
for
Pm 2
Intake manifold:
d
Pm
RT
m ai m ao
dt Vm
where:
Pm :manifold pressure Vm :manifold volume
R :Air gas constant (287 J/kg/K) T :manifold temperature
where:
N = engine speed (rad/s)
Torque generation:
torque = -181.3 + 379.36*ma + 21.91*AF - 0.85*AF*AF + 0.26*S - 0.0028*S*S + 0.027*N -
0.000107*N*N + 0.00048*N*S + 2.55*S*ma - 0.05*S*S*ma
ma=mass of air (g/cycle),
mf=mass of fuel (g/cycle),
S=spark advance (deg CA),
N=engine speed (rad/s)
Practice:
8. To build up engine intake flow model
6
7
3. Modeling a Real Engine:
3.1 Charging Model (Moskwa’s Ph.D. thesis, Heywood’s, chapter 14.3.3,
Appendix C)
Four types of models for calculating details of intake and exhaust flows have been developed
and used:
(1) Quasi-steady model: used for control, such as EGR valve control. The disadvantage is too many
empirical equation s.
(2) Filling and empting model: used for performance prediction. Using mass continuity and energy
equation or entropy only. Do not need momentum equation.
(3) Wave action model: One dimensional flow with momentum equation. The calculating time is
pretty long. When the ratio of length/diameter is greater than 10, the effect of wave action should
not be neglected.
(4) CFD model: 3-dimensional viscous flow. The calculating time is very long. Used for a new
engine design.
Take the engine mass flow rate as a function of A (area), Po (ambient pressure), and Pm/Po
(pressure ratio of manifold pressure to ambient pressure).
P
m f ( A, Po , m )
Po
If the manifold pressure Pm is steady state, as only function of engine speed (rpm), then it is a
“quasi-steady model”.
If the manifold pressure Pm is unsteady, then it is a “filling and empting model”.
If the pressure wave in the pipe is considered, then it is a “wave action model”.
m ai ai m
(m ao ) m ao
Intake
Cylinder
Manifold
m ai (g/s); m ao (g/s)
Throttle:
8
1
P0
m ai C d A k 2 PRI
RT0
1
k 1
k 1
2
Pt 2 k 1 P 2
1
k P k
If : PRI t t
P0 k 1
P0 k 1 P0
k 1
2 2k 1
k
Pt 2 k 1 PRI
If :
P0 k 1 k 1
Where
Pt :Throttle pressure at the minimum cross-sectional area
P0 :Stagnation Pressure
C d :discharge coefficient
A :the flow area of the orifice
PRI :Affect the nature of the pressure ratio of the flow rate
2 2
1 1 1
d D d d D d
2
cos( 0 )
2 2
d
2 2
A
D
1 1 sin 1 1
2 D 2 D cos( 0 ) 2 D
2 2
1
D cos( 0 )
2
d cos( 0 )
sin 1 1
2 cos( 0 )
D cos( 0 )
When
d
cos1 cos 0 0
D
2 2
1 1
D2
2 2
A
d d D d
sin 1 1 1
2 D 2 D
Intake Manifold:
d
Pm
RT
m ai m ao
dt Vm
9
Pm Vd
ao
m e v
R T
v =(-0.366/ e + 0.08979 Pm - 0.0337 Pm 2 + 0.000001 e Pm )*15
Where
Pm :Manifold pressure
v :volumetric efficiency
Continuity equation,
u u dF
0 .…………………………
t x F dx
Momentum equation,
(u ) ( u 2 p) u 2 dF
G 0 ………..
t x F dx
Energy equation
p
a 2 kRT k
10
3.2 Combustion Model
(1) Torque Function (Moskwa)
Indicated Torque:
Indicated Torque Tind (Nm):
Tind = (TF)(MAC)
TF: torque function; MAC: mass of air per cylinder (g)
Pm
0.258
9.77 e
0.088
TF 14.39 *1.09 / 6 * 44.8 3.723
1.013
11
0 m1
xb 1 exp a
dx b m 1 0 m 0 m 1
y a ( ) exp( a ( ) )
d d d d
qb
Tb, P, hb, mb
(dmu/dt)hu
qu
Tu, P, hu, mu
The constants in this equation were obtained from experimental regressions. The mean gas
velocity Cm was obtained from Woschni‟s correlation:
Cm=2.28* S p
Lumley, p.106
h St uc p
dQht
hAp T Tw
d
N N
2
pmf C1 N 2 C2 C3
p mf is the total friction mean effective pressure (MPa), N is the engine speed (rpm).
Coefficient C1 is used to estimate the pumping loss, constant C2 is proportional to the viscosity of
lubrication oil, and C3 is dimensional coefficient. For a 125 cc single cylinder engine with two
valves: C1 =2.95*10-9 (MPa/rpm2), C2 =0.185 (MPa), C3 =0.887.
The friction torque Tfr is obtained by:
fr ( pmf Vd ) /(4 )
13
Practice:
10. To set a new torque model and friction model (torque02.mdl) by using Moskwa‟s torque
function and modified Heywood‟s friction torque model..
p mi W / Vd
br ind fr
Practice:
11. To build up an engine model for a 125cc motorcycle.
14
% * Engine Parameters
Vd = 125e-6; % engine displacement volume [m^3]
Vm = 127e-6; % intake manifold volume [m^3]
% * Engine Throttle Parameters.
Cd=0.85; % discharge coefficient of throttle
D=0.024; % throttle bore diameter (m)
d=0.0069; % throttle shaft diameter (m)
theta0=0.926*pi/180; % zero flow angle, 0.926 (deg)
% * Environment Parameters.
k = 1.3; % Specific heat ratio of mixture
R=287; % Gas Constant of air [J/(kg-K)]
% * Ambient Initialization Parameters
T0=298; P0=1e5;
15
12. To calculate bhp and.bsfc (brake specific fuel consumption)
m f
bhp 2N / 60000 (kW); bsfc (g/h/kW)
bhp
13. Put the output data to workspace and then save the data to a file. (format short g)
16
Save the data in Workspace to an excel file: in “Command Window”, key in
save -ascii filname2.xls filename1
14. Plot bsfc map (contour of bsfc on the coordinate of torque vs. speed).
contour(Z) is a contour plot of matrix Z treating the values in Z as heights above a plane. A
contour plot are the level curves of Z for some values V. The values V are chosen automatically.
contour(X,Y,Z), X and Y specify the (x,y) coordinates of the surface as for SURF. contour(Z,N) and
contour(X,Y,Z,N) draw N contour lines, overriding the automatic value. contour (Z,V) and
contour(X,Y,Z,V) draw LENGTH(V) contour lines at the values specified in vector V.
EXAMPLE:
contour(x, y, z)
contour(x, y, z, 10)
contour(x, y, z, [200 250 300 350 400 450 500 550 600 650])
clabel(contour(x, y, z, [200 250 300 350 400 450 500 550 600 650]))
reference:「bsfc_map.m」or 「bsfc_map_s41.m」
18
Why do all engine manufactures use computer simulations?
1. Engine testing is very expensive ($2000 - $4000 per day).
2. Developing prototypes of new engines is expensive and time consuming.
3. Modeling can reveal the root cause of behavior where testing provides only
behavior.
4. Simulation development often leads to „new concepts‟ through a better
understanding of engine processes.
19
ADVISOR
Data files:
1. FC_*.m Fuel Converter 2. ESS_*.m Energy Storage System
3. TX_*.m Transmission 4. GC_*.m Generator/Controller
5. MC_*.m Motor/Controller 6. PTC_*.m Power Train Control
7. TC_*.m Torque Coupler 8. VEH_*.m Vehicle
9. WH_*.m Wheel 10. ACC_*.m Accessory
11. CYC_*.m Driving Cycle 12. EX_*.m Exhaust Aster Treatment
20