0% found this document useful (0 votes)
44 views

Engine Model

The document describes an engine model created using MATLAB/Simulink. The model simulates a 4-stroke engine cycle and includes subsystems for timing, air flow, torque generation, and vehicle dynamics. It can be used to estimate engine speed based on throttle position input. The document also provides details on simplifying the model to focus only on torque calculation based on throttle position and engine rpm. Practices are suggested to test the full and simplified models by varying throttle position and engine speed parameters.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Engine Model

The document describes an engine model created using MATLAB/Simulink. The model simulates a 4-stroke engine cycle and includes subsystems for timing, air flow, torque generation, and vehicle dynamics. It can be used to estimate engine speed based on throttle position input. The document also provides details on simplifying the model to focus only on torque calculation based on throttle position and engine rpm. Practices are suggested to test the full and simplified models by varying throttle position and engine speed parameters.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

1.

Engine Model

Operation of 4-stroke cycle engine:

Intake Compression Combustion Exhaust

XC125 4000rpm WOT

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

˙Mass flow rate

˙Torque generation

m ai  ai  m
(m  ao ) m ao

Intake
Cylinder
Manifold

Fig. Model for calculating of intake mass flow rate

m ai :inlet air flow rate (g/s)

m ao :outlet air flow rate (g/s)

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

Pm=manifold pressure (bar); Pamb=ambient pressure (bar)

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

Mass flow rate:


5
 ao  0.366  0.08979NPm  0.0337NPm 2  0.0001N 2 Pm
m

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

9. To build up engine torque 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”.

Filling and Empting Model

m ai  ai  m
(m  ao ) m ao

Intake
Cylinder
Manifold

The air mass flow into engine model

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  2k 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 
  cos1   cos 0    0
D 

 2 2
1 1

D2           
2 2

A  
d d D d
 sin 1 1        1     
2   D    2   D  
 

D: throttle bore diameter (D=0.024m)


d: throttle shaft diameter (D=0.00694m)
 0 : zero flow angle (  0 =0.926o)

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

Heywood‟s p.312 need to be corrected.

Where
Pm :Manifold pressure

Vm :Manifold volume (127 cc)


R :Air gas constant (287 J/kg/K)
T :Intake manifold temperature
 e :engine speed

v :volumetric efficiency

Vd :displaced volume (m3)


m ai :Inlet mass flow rate

m ao :outlet mass flow rate

Wave Action Model

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  

Tbr = Tind - Tfr


Tbr: brake torque (Nm); Tfr: friction torque (Nm)
Pm :manifold pressure;  e :engine speed

(2) Wieve Function (Heywood, p.390)

11
     0  m1 
xb  1  exp a  
    

x b = mass fraction burned,  0 = start of combustion,  = total combustion duration,

a, m = adjustable parameters, typically, a = 5, m = 2

dx b m 1  0 m    0 m 1
y a ( ) exp(  a ( ) )
d d d d

heat release rate


dQhr
 y (QHV )m f
d

(3) Flame Propagation Model (Lumley)

qb

Tb, P, hb, mb

(dmu/dt)hu
qu
Tu, P, hu, mu

3.3 Heat Transfer Model


A constant wall temperature Tw (K) and a varying mean charge temperature T (K). The heat
transfer rate is:
dQht
 hAT  Tw 
d
where A is the surface area of combustion chamber. Mean charge temperature T is computed from
the state equation of gas with known cylinder pressure.
12
A lot of empirical equations can be used to calculate the instantaneous convective heat transfer
coefficient, h (W/m2/K). We compared several empirical equations with our experimental data and
obtained the following correlation with curve fitting. It is a function of cylinder pressure P (bar),
gas temperature T (K) and mean gas velocity Cm (m/s):

h  1.92 *106 p 0.635T 1.450 Cm  1.4


0.052

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

where S p is piston mean speed (m/s).

Lumley, p.106
h  St uc p
dQht
 hAp T  Tw 
d

3.4 Friction Model

Friction Torque (Heywood, chapter 13, p.722):

  N   N  
2

T fr  1.97  0.15   0.01   *100000* Vd /(4 )


  1000  1000 

Friction Mean Effective Pressure (Honda’s Model):


The total friction loss of a four-stroke S.I. motorcycle engine proposed by Honda is:


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..

3.5 Work Done


Instantaneous cylinder pressure P and corresponding incremental change of cylinder volume V
can further express the incremental work done by the system:
dW dV
P
d d
Cylinder pressure is obtained by solving the following ordinary differential equation, which is
derived from equation (19).
1  dQ dQht 
 k  1  hr 
dp p dV
 k 
d V d V  d d 
The instantaneous volume of engine cylinder and its rate change can be expressed [10, 11],
respectively, by:
Vd  2 
V   1  cos( ) 
r
1  cos(2 )
2  Cr  1 4L 
dV Vd  r 
  sin( )  sin(2 ) 
d 2  2L 
where Vd is engine displacement volume, Cr is engine compression ratio, r is the crank radius of the
engine, and L is the length of connecting rod.
The indicated mean effective pressure and torque can be expressed by:

p mi  W / Vd

 ind  ( p miVd ) /(4 )

 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  2N / 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」

x=[1000 1600 2200 2800 3400 4000 4600 5200 5800];


y=[6.8 13.6 20.4 27.2 33.8 40.6 47.4 54.2 61 67.8 74.6 81.4];
z=[635.0 678.4 463.4 699.1 592.9 667.9 630.6 698.4 751.1
635.7 500.1 463.4 567.9 592.9 524.8 630.6 500.5 637.8
541.4 443.8 407.6 500.3 494.6 381.6 522.5 428.6 521.1
447.2 387.4 350.1 432.7 393.4 351.9 411.1 392.7 407.8
17
352.9 331.1 294.3 301.4 295.1 322.2 303.0 356.8 393.1
332.2 301.8 280.8 283.9 279.4 304.9 304.4 337.9 378.4
311.4 297.0 267.3 266.3 263.6 287.5 305.8 328.4 363.3
322.4 283.4 253.9 248.7 247.9 270.8 304.2 319.0 348.2
333.5 269.8 269.8 258.8 255.2 290.8 314.5 328.8 318.8
333.5 358.0 303.2 268.8 262.5 310.9 324.8 338.6 340.2
333.5 358.0 336.7 271.9 295.0 330.9 327.7 333.7 340.2
333.5 358.0 336.7 317.9 322.6 330.9 327.7 333.7 340.2];
clabel(contour(x,y,z, [250 300 350 400 450 500 550 600 650]))

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.

Why do they bother to test engines at all?


1. Some engine phenomenon are not yet well enough understood to capture in a
simulation (turbulence, chemical kinetics, etc.).
2. Complete and accurate modeling of some processes requires massive amounts of
computational time (i.e. Computational Fluid Dynamics).
3. Models and simulations often need some „calibration‟ data from real world tests.
4. Testing provides not only performance information, but also reveals design faults
and durability issues.

source: Dr. Joel Hiltner

19
ADVISOR

Simulink model: Advisor3.2/model/ BD_CONV.mdl

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

You might also like