Open access

# Modeling and Simulation of SI Engines for Fault Detection

Written By

Mudassar Abbas Rizvi, Qarab Raza, Aamer Iqbal Bhatti, Sajjad Zaidi and Mansoor Khan

Published: 14 November 2012

DOI: 10.5772/50487

From the Edited Volume

## Internal Combustion Engines

Edited by Kazimierz Lejda and Pawel Wos

Chapter metrics overview

View Full Metrics

## 1. Introduction

During last decades of twentieth century, the basic point of concern in the development of Spark Ignition engine was the improvement in fuel economy and reduced exhaust emission. With tremendous of electronics and computer techniques it became possible to implement the complex control algorithms within a small rugged Electronic Control Unit (ECU) of a vehicle that are responsible to ensure the desired performance objectives. In modern vehicles, a complete control loop is present in which throttle acts as a user input to control the speed of vehicle. The throttle input acts as a manipulating variable to change the set point for speed. A number of sensors like Manifold Air Pressure (MAP), Crankshaft Speed Sensor, Oxygen sensor etc are installed in vehicle to measure different vehicle variable. A number of controllers are implemented in ECU to ensure all the desired performance objectives of vehicle. The controllers are usually designed on the basis of mathematical representation of systems. The design of controller for SI engine to ensure its different performance objectives needs mathematical model of SI engine. Mean Value Model (MVM) is one of the most important mathematical models used most frequently by the research community for the design of controllers; see for example [1], [2], [5], [7], [9], [13], [14], and [15]. The basic mean value model is based on the average behavior of SI engine in multiple ignition cycles.

Although the controllers implemented in vehicle ECU are sufficiently robust, yet introduction of fault in system significantly deteriorate the system performance. Research is now shifted to ensure the achievement of performance objectives even in case of some fault. The automotive industry has implemented some simple fault detection algorithms in ECU that identify the faults and provide their indication to a fault diagnostic kit in the form of some fault codes. The implementation is however crude as it provides fault indication only when the fault become significant. For incipient faults, the vehicle would keep its operation but under sub-optimal conditions till the magnitude of fault would grow to such an extent that it would become visible. Again mathematical models are used to identify the faults and develop techniques to detect the engine faults.

Different mathematical models of Spark Ignition engine proposed in literature in recent years along with the domain of their application are reviewed. The emphasis would however be given to two different mathematical models

• The version of mean value model proposed by the authors [11], [12].

• Hybrid model proposed by the authors [21], [22].

The first section of this chapter would present different models of SI engine with only a brief description of those models. The second section would give the mathematical development of mean value model along with the simulation results of presented model and its experimental validation. The third section would give the mathematical derivation of Hybrid model along with the simulation results of model and experimental verification of simulation results. The fourth section would identify the application of these models for fault diagnosis applications.

## 2. Review of models of spark ignition engine

The dynamic model of a physical system consists of a set of differential equations or difference equations that are developed under certain assumptions. These mathematical models represent the system with fair degree of accuracy. The main problem in development of these models is to ensure the appropriateness of modeling assumptions and to find the value of parameters that appear in those equations. However the basic advantage of this approach is that the develop model would be generic and could be applied to all systems working on that principle. Also the model parameters are associated with some physical entity that provides better reasoning. An alternate modeling technique is to represent the system using neural network that is considered to be a universal estimator. A suitably trained neural network sometime represents the system with even better degree of accuracy. The main problems associated with this approach are the lack of any physical reasoning of parameters, appropriate training of neural network and lack of generality i.e. a neural network model trained on one setup may not work properly on another setup of similar nature.

The research community working on mathematical modeling of SI engine has used both these approaches for control, state estimation and diagnostic applications. In this regard a number of different models were developed to represent the SI engine using both these approaches. Mean Value Model (MVM), Discrete Event Model (DEM), Cylinder by Cylinder Model, Hybrid Model are some of the key examples of models developed using basic laws of physics. Most neural network based models are based in one way or other on Least Square Method. A brief description of some of these models is below.

### 2.1. Mean Value Model (MVM)

Mean Value Model is developed on the basis of physical principles. In this model throttle position is taken as input and crankshaft speed is considered to be the output. A careful analysis indicates that MVM proposed by different researchers share same physical principles but differ from each other slightly in one way or the other [1-16], [26], and [27]. The idea behind the development of model is that the output of model represents the average response of multiple ignition cycles of an SI engine although the model could be used for cycle by cycle analysis of engine behavior. The details about the development of MVM on the basis of physical principles are provided in section 3 of this chapter.

### 2.2. Discrete Event Model (DEM)

An SI engine work on the basis of Otto cycle in which four different processes i.e. suction, compression, expansion and exhaust take place one after the other. In a four stroke SI engine, each of these processes occurs during half revolution (180°) of engine shaft. Therefore irrespective of the engine speed it always takes two complete rotations of engine shaft to complete one engine cycle. The starting position of each of the four processes occurs at fixed crank position but depend upon certain events e.g. expansion is dependent on spark that occur slightly ahead of Top Dead Center (TDC) of engine cylinder. Also with Exhaust Gas Recycling (EGR), a portion of exhaust gases are recycled in suction. Due to EGR some delay is present in injection system to ensure overlap between openings of intake valve and closing of exhaust valve.

The working of SI engine indicates that the link of engine processes is defined accurately with crankshaft position. In discrete engine model, crankshaft position is taken as independent variable instead of time. Mathematical model based on the laws of physics is developed for air flow dynamics and fuel flow dynamics in suction and exhaust stroke, production of torque during power stroke. The crankshaft speed is estimated by solving the set of differential equations of all these processes for each cylinder. Computational cost of DEM is high but it can identify the behavior of engine within one engine cycle. Modeling the discreet event model could be seen in [1].

### 2.3. Cylinder by Cylinder Model (CCM)

In these models, the forces acting on piston of each cylinder are modeled on the basis of laws of physics. The input to these models is the forces acting on the crankshaft assembly and output is the crankshaft speed. The forces acting on crankshaft assembly are estimated using pressure established inside the cylinder due to the burning of air fuel mixture. For a comparison of MVM and CCM, see [23].

### 2.4. Hybrid model

Hybrid model represent the integration of continuous dynamics and discrete events in a physical system [19], [21], and [22]. In SI engine, the variables like crankshaft speed represent continuous dynamics but the spark is a discrete event. In hybrid model, the four cylinders are considered four independent subsystems and are modeled as continuous system. The cylinder in which power stroke occur is considered as the active cylinder that define the crankshaft dynamics. The sequence of occurrence of power stroke in four cylinders is defined as a series of discrete events. The behavior of SI engine is defined by the combination of both of them. The details of hybrid dynamics is provided in section 4 of this chapter.

## 3. Mean Value Model (MVM)

In this section a simple nonlinear dynamic mathematical model of automotive gasoline engine is derived. The model is physical principle based and phenomenological in nature. Engine dynamics modeled are inlet air path, and rotational dynamics. A model can be defined as

A model is a simplified representation of a system intended to enhance our ability to understand, explain, change, preserve, predict and possibly, control the behavior of a system”[25].

When modeling a system there are two kinds of objects taken into consideration

• Reservoirs of energy, mass, pressure and information etc

• Flows of energy, mass, pressure and information etc flowing between reservoirs due to the difference of levels of reservoirs.

An MVM should contain relevant reservoirs only but there are no systematic rules to decide which reservoirs to include in what model. Only experience and iterative efforts can produce a good model. The studied machine is a naturally breathing four-stroke gasoline engine of a production vehicle equipped with an ECU compliant to OBD-II standard. The goal is to develop a simple system level model suitable for improvement of model-based controller design, fault detection and isolation schemes. The model developed in here has following novel features.

• Otto (Isochoric) cycle is used for approximation of heat addition by fuel combustion process.

• Consequently the maximum pressure inside the cylinder and mean effective pressure (MEP) are computed using equations of Otto Cycle for prediction of indicated torque. A detailed description of Otto cycle is available in most thermodynamics and automotive engine text books.

• Fitting/ regressed equations based on experimental data and constants are avoided except only for model of frictional/pumping torque which has been adapted from available public literature [26], and [27] and modified a little bit.

The model is verified with data obtained from a production vehicle engine equipped with an ECU compliant to OBD-II. Most of the models available in literature are specific to a certain brand or make because of their use of curve fittings, thus limiting their general use. Here a model is proposed which is not confined to a certain engine model and make; rather it is generic in nature. It is also adaptable to any make and model of gasoline engine without major modifications. Following are outlines of framework for deriving this model.

1. It is assumed that engine is a four stroke four cylinder gasoline engine in which each cylinder process is repeated after two revolutions.

2. It is also assumed that cylinders are paired in two so that pistons of two cylinders move simultaneously around TDC and BDC but only one cylinder is fired at a time. Due to this, one of the four principle processes namely suction, compression, power generation and exhaust strokes, is always taking place in any one of cylinders at a time. Therefore the abovementioned four engine processes can be comfortably taken as consecutive and continuous over time. This assumption is due to the fact that each one of the four processes takes a theoretical angular distance of Ϟradians to complete and hence in a four stroke engine considered above one instance of each of the four processes is always taking place in one of the cylinders.

3. The fluctuations during power generation because of gradual decrease in pressure inside the cylinder during gas expansion process (in power strokes) are neglected and averaged by mean effective pressure (MEP) which is computed using Otto cycle as mentioned earlier. This simplifies the model behavior maintaining the total power output represented by the model. The instantaneous combustion processing modeling and consequent power generation model is complex and require information about cylinder inside pressure and temperature variations at the time of spark and throughout power stroke. Moreover, the combustion and flame prorogation dynamics are very fast and usually inaccessible for a controller design perspective.

4. The fluctuations of manifold pressures due to periodic phenomena have also been neglected. Equations of manifold pressure and rotational dynamics have been derived using the physics based principles.

5. The exhaust gas recirculation has been neglected for simplicity.

6. The choked flow conditions across the butterfly valve have also been neglected because in the opinion of author, sonic flow rarely can occur in natural breathing automotive gasoline engines due to the nonlinear coupling and dependence of air flow and manifold pressure on angular velocity of crankshaft.

7. It is also assumed that the temperature of the manifold remains unchanged for small intervals of time; therefore the manifold temperature dynamics have been neglected at this time and it is taken to be a constant.

8. Equation representing the rotational dynamics has been developed using Newton’s second law of motion. Otto cycle has been used for combustion process modeling, hence the computation of maximum cycle pressure, maximum cycle temperature, Mean Effective Pressure (MEP), and indicated torque (Ti).

9. The equations of frictional and pumping torque have been taken from available public literature, because frictional torque is extremely complex quantity to model for an IC engine due to many a number of rotating and sliding parts, made of different materials, changing properties with wear/tear and aging, and variations of frictional coefficients of these parts, changing properties of lubricating oil on daily basis.

The air dynamics are further divided into throttle flow dynamics, manifold dynamics and induction of air into the engine cylinders. These are separately treated below and then combined systematically to represent the induction manifold dynamics.

### 3.1. Throttle flow dynamics

Throttle flow model predicts the air flowing across the butterfly valve of throttle body. The throttle valve open area has been modeled by relationships of different levels of complexities for accuracy, see for example [2] and [16], but here it is modeled by a very simple relationship as

AϏ=(1-coscosϏ)Ϟ4DT2,
Ϗ0ϏϏmaxE1

Where Ϟ4DT2 is cross sectional area of throttle valve plate with DT, being the diameter of plate facing the maximum opening of pipe cross section, Ϗ is the angle at which the valve is open and AϏ is the effective open area for air to pass at plate opening angle Ϗ. The angle Ϗ0 is the minimum opening angle of throttle plate required to keep the engine running at a lowest speed called idle speed. At this point engine is said to be idling. The angle Ϗmax is the maximum opening angle of throttle plate, which is 90°. The anomalies arising will be absorbed into the discharge coefficient(Cd).

Mass flow rate across this throttle valve (m̥ai) is modeled with the isentropic steady sate energy flow equation of gases and the derived expression is as below.

m˙ai=A(α)PaCd2βRTa((PmPa)ζ(PmPa)ξ),PmPa<1E2
whereβ=γ1γ ,ζ=2γandξ=γ+1γE3

Here A(Ϗ)is defined in equation (1), Pais atmospheric pressure, Pmis intake manifold pressure, R is universal gas constant, Tais ambient temperature, and ϑis specific heat ratio for ambient air.

### 3.2. Air induced in cylinders

The air mass induced into the cylinder (m̥ac) is modeled with speed density equation of reciprocating air pumps/ compressors, because during suction stroke the engine acts like one. The expression for an ideal air pump is given by the equation:

m̥ac=ϟVdNE4

Where ϟ is the density of air, Vdis swept volume of engine cylinders, and N is crankshaft speed in rev/min (rpm). In terms of variables easily accessible for measurement, the expression can be converted into the following using ϟ=PmRTm and VdN=C0ϧ . Here N is in rpm and ϧ in rad/s and C0 holds all the necessary conversions.

m̥ac=PmRTmC0ϧE5

Since air compresses and expands under varying conditions of temperature and pressure, therefore the actual air induced into the cylinder is not always as given by the equation. Hence an efficiency parameter called volumetric efficiency (ϕv) is introduced which determines how much air goes into the engine cylinder. The equation therefore can be written as below:

m̥ac=PmRTmϕvC0ϧE6
(6)

### 3.3. Intake manifold dynamics

The intake manifold dynamics are modeled with filling and emptying of air in the intake manifold. The manifold pressure dynamics are created by filling of inlet manifold by mass flow of air entering from the throttle valve m̥ai and emptying of the manifold by expulsion of air and flow into the engine cylinder(m̥ac). Using ideal gas equation for intake manifold this can be derived as

PV=mRTPmVm=mmRTm (Using the relationship in manifold variables)Pm=RTmVmmmE7

Here P, V, m, R and T are pressure, volume, mass, Gas constant and temperature of air. It was assumed that the manifold temperature variations are small, and therefore manifold temperature is taken to be constant. To this reason, its differentiation is neglected and only variables are taken to be mass flow and manifold pressure.

P˙m=RTmVmm˙m (Differentiation w.r.t. time)E8

The quantity m̥m represents the instantaneous mass variation from filling and emptying of intake manifold, assuming m̥m=m̥ai-m̥ac we can write it as

P̥m=RTmVm(m̥ai-m̥ac)E9

Putting (2) and (4) in (7), and simplifying the resulting equation gives us the required equation of manifold dynamics.

P˙m=RTmVmm˙aiRTmVmPmRTmηVC0ωP˙m=RTmVmm˙aiC1ηvPmωwhereC1=1VmC0E10

Putting the expression of air mass flow from (2), this equation can also be written in the following form.

P̥m=RTmVmA(Ϗ)PaCd2ϐRTaPmPaϔ-PmPaϜ-C1ϕvPmϧE11

Where ϐ, ϔ, and Ϝ have already been defined in (2A).

### 3.4. Rotational dynamics

Rotational dynamics of engine are modeled using mechanics principles of angular motion. Thus torque Tb produced at the output shaft (also called brake torque) of the engine is given by Newton’s second law of motion as

Tb=JeϏE12
Or

Where Je is the rotational moment of inertia of engine rotating parts and Ϗis angular acceleration. This can also be represented as given below.

Ϗ=1JeTbOr
ϧ̥=1JeTbE13

The above relationship represents the rotational dynamics in general form. The brake torque is a complex quantity and is a sum of other torque quantities, which are indicated torque Ti, frictional torque Tf, pumping torque Tp, and load torque LT, the external load on engine. Indicated torque comes from the burning of fuel inside the cylinder. Frictional torque is the power loss in overcoming the friction of all the moving parts (sliding and rotating) of the engine, for example, piston rings, cams, bearings of camshaft, connecting rod, crankshaft etc to name a few. Pumping torque represents the work done by engine during the compression of air and consequently raising the pressure and temperature of fresh air and fuel mixture trapped inside the cylinder during compression stroke. Load torque is work done by engine in running/pulling of vehicle, its passengers, goods and all the accessories. These are briefly described in 3.4.3. Mathematically brake torque is given by the following relationship.

Tb=Ti-Tp-Tf-LTE14

Sometimes the quantities other than LT in (14) are called Engine Torque Te=Ti-Tp-Tf and above equation is written as

Tb=Te-LT E15

In this work the form given in (14) and not in (15), will be maintained for parameterization purpose. The Torque quantities in (12) are defined as below.

#### 3.4.1. Indicated torque (Ti)

Indicated torque Ti is the theoretical torque of a reciprocating engine if it is completely frictionless in converting the energy of high pressure expanding gases inside the cylinder into rotational energy. Indicated quantities like indicated horsepower, and indicated mean effective pressure etc. are calculated from indicator diagrams generated by engine indicating devices. Usually these devices consist of three basic components which are:

• A pressure sensor to measure the pressure inside engine cylinder.

• A device for sensing the angular position of crankshaft or piston position over one complete cycle.

• A display which can show the pressure inside cylinder and volume displaced on same time scale.

For a physics based engine model, indicated torque has to be estimated through any of the various estimation techniques. In this work indicated torque is presented as a function of manifold pressure. To do this, the engine processes are modeled using Otto Cycle. For computation of Indicated Torque another quantity, Mean Effective Pressure (MEP) is computed first which is given by the relationship below.

MEP=Cr2-ϑCrϑ-1-1(HkQ)ϑ-1Cr-1CvTm(AFR)PmE16

Here Cr is the compression ratio of engine, Q is calorific value of fuel (gasoline etc.), Hk is fraction of burnt fuel heat energy available for conversion into useful work, Cv is specific heat of air at constant volume, Tm is intake manifold temperature, and AFR is the stoichiometric air to fuel ratio. Mean Effective Pressure is defined as the average constant pressure which acts on the piston head throughout the power stroke (pressure that remains constant from TDC to BDC). In actual practice, the high pressure generated by combustion starts decreasing as the piston moves away from TDC and burnt gases start expanding. Since the mean effective pressure is computed on the basis of Otto cycle; the thermal efficiency (ϕth=1-1Crϑ-1) of Otto cycle must be considered when calculating indicated torque. Indicated torque is given as the product of MEP, ϕth , and volume displaced per second.

Ti=Vd4ϞϕthMEP=Vd4ϞCr2-ϑCrϑ-1-1(HkQ)1-1Crϑ-1ϑ-1Cr-1CvTm(AFR)PmE17

The state variable in the above expression is manifold pressure (Pm). All the other quantities/ parameters are constants or taken to be constant usually. For example, the displacement volume of engine under consideration (Vd) is a strictly constant value. The same is true for compression ratio (Cr); this variable is a particular number for a production vehicle. For example, this number is 8.8 (Cr=8.8) for engine under study. The calorific value of fuel (Q), manifold temperature (Tm), and Hk are also taken to be fixed constants. As long as other parameters of the above expression are concerned, with the ambient air and atmospheric conditions of pressure and temperature, the variation in their values is very low but inside the cylinder, and during and after combustion, not only the composition of air changes, but also its properties may vary. The variation of index of expansion (ϑ)with density and composition of a gas is well documented in public literature. To accommodate all the variations and some heat transfer anomalies, the entire expression is written as following, making indicated torque a function of manifold pressure with a time varying parameter (a1). This parameter is called indicated torque parameter and will be estimated later in this work. In a proper way this parameter may be written as a1t but the brackets and variable t are omitted for simplicity. With all this, the expression of indicated torque in (17) becomes

Ti=a1Pm E18

#### 3.4.2. Frictional and pumping torque (Tf, Tp)

The Modeling of frictional and pumping torque has been done using a well known empirical relationship given by the equation as

Tf=12ϞVd97000+15N+5N210-3=b1+a2ϧ+ a3ϧ2 E19

A slight variation of that can be found in [26] and [27]. The equation has been converted into the variable ϧ with necessary conversion factors. Also the constant b1is merged into the load torque LT. Therefore the minimum value of load torque is equal to or greater than b1 even when engine is idling. We can write it as

The relationship given in (19) represents the quantity Tf for throttle positions closer to WOT (wide open throttle) and for engines up to 2000 cc [26].

### 3.5. Fuel dynamics

The fuel dynamics are considered to be ideal. Since fuel dynamics also have parametric variations and the delays due to the internal model feedback loops; taking ideal fuel dynamics will ensure that the model simulations are free from interferences of fuel dynamics parametric noise. The model of fuel flows is given here for completeness only [9].

m̥fc=m̥ff2+m̥ff3+m̥fslE21

The components of this model are:

• m̥fc
• m̥ff2
• m̥ff3
• m̥fsl

### 3.6. Model summary

The model derived and described in previous sections is a three state nonlinear model. It can be represented as a set of dynamical equations given below:

Fuel flow dynamics

m̥fc=m̥ff2+m̥ff3+m̥fslE22

Manifold dynamics

P̥m=RTmVmA(Ϗ)PaCd2ϐRTaPmPaϔ-PmPaϜ-C1ϕvPmϧ+E23

Rotational dynamics

ϧ̥=a1Pm-a2ϧ- a3ϧ2-LTE24

Where

a1=1JeVd4ϞCr2-ϑCrϑ-1-1(HkQ)1-1Crϑ-1ϑ-1Cr-1CvTm(AFR) 103E25
a2=1JeVd4E26
a3=1JeVd.(0.05Ϟ)18×104E27

A detailed description of nonlinear engine models and their background can be studied in [1-16]. With fuel dynamics considered to be ideal, the model becomes a two state nonlinear model consisting of (17) and (18) only.

### 3.7. Model simulations and engine measurements

There is a great difference between theory and practice.

Giacomo Antonelli (1806-1876)

The manifold dynamics equation derived in earlier section is simulated on a digital computer. The simulation software used is Matlab and Matlab Simulink©. The S-function template available in Matlab is used to program the dynamic model and graphical interface of Simulink© is to run the simulations. The engine measurements are taken using an OBD-II compliant scanning hardware and windows based scanning and data storing software. The model is primed with the same input as engine was and manifold pressure measurements and model manifold pressures are plotted and compared.

A couple of set of simulations are presented for two values of discharge coefficient, and the patterns of engine measurement of manifold pressure and the output of manifold dynamic equation are compared. In first set of simulation, the discharge coefficient is taken to have its ideal value which is 1.0; and the model output manifold pressure is compared with engine measured manifold pressure. While in another simulation test, the discharge coefficient is taken to be equal to 0.5 and the experiment is repeated. As we can see from the Figure 4 and Figure 5 that the shape of trajectory of model manifold pressure and engine measurements is a large distance apart. Moreover, these trajectories do not follow the same shape and pattern. From which we can comfortably deduce that both trajectories cannot be made identical by scaling with a constant number only; thus discharge coefficient of the derived model should not be a constant number. Also, at certain points in time, the evolution of both trajectories is opposite in directions. From all of this it can be concluded that the discharge coefficient should be considered a time varying parameter.

The above figure shows the first simulation of model derived earlier in this section with constant value of discharge coefficient (in this case Cd=1). The input to engine is angle of opening of throttle valve plate. The opening angle is measured with a plane perpendicular to the axis of pipe or air flow direction. The input angle is varied with accelerator pedal for several different values. The same input is fed to the derived model as input to evaluate its behavior and compare with manifold pressure measurements. It is clear that the derived model behaves very differently than the real engine operation.

Moreover, the manifold pressure value given by the model is very high with Cd=1; almost double the measurements throughout the experiment, except for a few points. At these points the model trajectory evolves in nearly opposite direction. It should be noted that for this simulation, the measured angular velocity of engine was used in model equation, and the rotational dynamics equation was not simulated. The similar results for second simulation experiment are shown in figure 3.2. Here, the value of Cd=0.5. As we can see that the lower value of Cd has brought the model manifold pressure trajectory significant low in the plot, and it almost proceeds closer to the engine measured inlet manifold pressure. But the evolution of both trajectories is not identical, which would have been; in case of a correct value of Cd. Both simulation experiments assert that the value of Cd must not be a constant, merely scaling the trajectory. But it must be a time varying parameter to correctly match the derived model to the engine measurements. The value of volumetric efficiency was taken to be 0.8 for model simulations. If engine measurements of volumetric efficiency are used in simulations, discharge coefficient would take different values.

## 4. Hybrid model

Although the representation of SI engine as a hybrid model is already present in literature, the main difference of the approach presented in this thesis is the manner in which the continuous states of model are being represented. The hybrid model presented by Deligiannis V. F et al (2006, pp. 2991-2996) assumed the model of four engine processes [17] i.e. suction, compression, power and exhaust as four continuous sub-systems. Similar continuous systems are also considered in DEM that can also be considered as a hybrid model. In this model, each cylinders of engine is considered as independent subsystem that takes power generated due to the burning of air fuel mixture as input and movement of piston in engine cylinder is considered as the output. These sub-systems are represented as linear systems and complete SI engine is considered as a collection of subsystems. These subsystems are working coherently to produce the net engine output. The proposed hybrid model of SI engine can be regarded as a switched linear system. Although an SI engine is a highly nonlinear system, for certain control applications a simplified linear model is used. Li M. et al (2006, pp: 637-644) mentioned in [19] that modeling assumption of constant polar inertia for crankshaft, connecting rod and piston assemblies to develop a linear model is a reasonable assumption for a balanced engine having many cylinders. The modeling of sub-systems of proposed hybrid model would be performed under steady state conditions, when the velocity of system is fairly constant. Also the time in which the sub-system gives its output is sufficiently small. A linear approximation for modeling of sub-system can therefore be justified. Similar assumption of locally linear model is made by Isermann R et al (2001, pp: 566-582) in LOLIMOT structure [20]. The continuous cylinder dynamics is therefore represented by a second order transfer function with crankshaft speed as output and power acting on pistons of cylinder due to fuel ignition as input.

A continuous dynamic model of these sub-systems would be derived in this chapter. The timing of signals to fuel injectors, igniters, spark advance and other engine components is controlled by Electronic Control Unit (ECU) to ensure the generation of power in each cylinder in a deterministic and appropriate order. The formulation of hybrid modeling of sub-systems would be carried under the following set of assumptions:

Modeling Assumptions

2. Air fuel ratio is stoichiometric.

3. Air fuel mixture is burnt inside engine cylinder at the beginning of power stroke and energy is added instantaneously in cylinder resulting in increase in internal energy. This internal energy is changed to work at a constant rate and deliver energy to a storage element (flywheel).

4. At any time instant only one cylinder would receive input to become active and exerts force on piston and other cylinders being passive due to suction, compression and exhaust processes contribute to engine load torque.

5. All the four cylinders are identical and are mathematically represented by the same model

The switching logic can be represented as a function of state variables of systems.

### 4.1. Framework of hybrid model

The framework of Hybrid model for a maximally balanced SI engine with four cylinders is represented as a 5-tuple model<Ϛ,X,α,ρ,ϳ>. The basic definition of model parameters is given below.

• Ϛ={Ϛ1,Ϛ2,Ϛ3,Ϛ4}
• XR2
• α={ M }
x̥t=AX+BUE28
yt=CX+DUE29

Where

UR, AR2×2 , BR2×1, CR1×2, DRE30
• ρ:ϚϚ
ρ=Ϛ1 4ϖ̥1dt<(4n+1)ϞϚ2 4n+1Ϟϖ̥1dt< (4n+2)ϞϚ3 (4n+2)Ϟ ϖ̥1dt<(4n+3)ϞϚ4 (4n+3)Ϟ ϖ̥1dt<(4n+4)ϞE31

where n=0,1,2,… and ϖ̥1dt represents instantaneous shaft position that identifies the output of generator function.

• ϳ:α×Ϛ×X×uX

### 4.2. Modeling of sub-system

A subsystem/cylinder is active when it contributes power to system i.e. during power stroke. When a sub-system is active its output is defined by the dynamic equations of system and its output during its inactive period is defined by its storage properties. The output of a sub-system provides initial condition to the next sub-system at the time of switching. All the subsystems are actuated sequentially during an ignition cycle. The cyclic actuation of subsystems is represented as a graph in Figure 4.1. The total output delivered by the system during complete ignition cycle would be the vector sum of outputs of all subsystems during that ignition cycle.

If T is the period of ignition cycle and u(t) is the input to system at time t within an ignition cycle and ui(t) is the input of ith subsystems; by assumption 4:

uit=ut when (i-1)T4<t<iT4 , i=1,2,3,4E32
uit=0 otherwiseE33

Franco et al (2008, pp: 338-361) used mass-elastic engine crank assembly model for real time brake torque estimation [24]. In this representation of SI engine each cylinder is represented by a second order mass spring damper as shown in Figure 4.2. Consider δQ amount of energy added in system by burning air fuel mixture. The instantaneous burning of fuel increases the internal energy δU in cylinder chamber.

ϒU=ϒQE34

At ignition time, energy is added instantaneously in engine. This will increase internal energy of system. A part of this internal energy is used to do work and rest of the energy is drained in coolant and exhaust system. If internal energy change to work with constant efficiency ηt then work δW is given by the energy balance equation as:

ϒW=-ϕt ϒUE35

Using equationg (27) we get

ϒW=-ϕt ϒQE36

If p is pressure due to burnt gases then work done during expansion stroke is given by:

W=V1V2pdVE37

where V1 and V2 are initial and final volume of cylinder during expansion. For adiabatic expansion:

pVϑ=k1E38

where k1 and γ are constant. Hence equation (30) becomes

W=V1V2k1V-ϑdVE39
W=k1V2-ϑ+1-V1-ϑ+1-ϑ+1E40

Consider that the closed end of the piston to be origin and x is a continuous variable representing the instantaneous piston position with respect to the origin. The piston always moves between two extreme positions xt and xb where xt represent piston position at Top Dead Center (TDC) and xb represent piston position at Bottom Dead Center (BDC). If the surface area of piston is A, and it moves a small distance δx from its initial position x, where δx is constant and can be chosen arbitrarily small, then using equation (33), work done can be expressed as:

ϒW=k1[Ax+ϒx]-ϑ+1-[Ax]-ϑ+1-ϑ+1E41
ϒW=k1A-ϑ+1-ϑ+1(x+ϒx)-ϑ+1-x-ϑ+1E42
ϒW=k1A-ϑ+1-ϑ+1x-ϑ+11+ϒxx-ϑ+1-x-ϑ+1E43
ϒW=k1A-ϑ+1x-ϑ+1-ϑ+11+ϒxx-ϑ+1-1E44

Expanding using binomial series and neglecting higher powers of δx and simplifying:

ϒW=k1A-ϑ+1x-ϑϒxE45

Therefore from equation (29)

ϒQ=-k1A-ϑ+1x-ϑϒxϕtE46

In deriving the model for sub-systems, each cylinder of SI engine is treated as a second order system as used in [24] and shown in Figure 4.2. Consider if F is the applied force by the burnt gases, m is the mass of engine moving assembly (piston, connecting rod, crankshaft and flywheel), coefficient of friction is k2 and coefficient of elasticity is k3, then net force acting on piston is given by:

md2xdt2=F-k2dxdt-k3xE47
md2xdt2+k2dxdt+k3x=FE48

Net work done by the expanding gases against the load, friction and elastic restoring forces when piston moves by a small distance δx would be given as:

md2xdt2+k2dxdt+k3xϒx=ϒWE49

Using equation (38) above equation becomes

md2xdt2+k2dxdt+k3xϒx=k1A-ϑ+1x-ϑϒxE50

The displacement δx can be chosen constant and arbitrarily small. As the piston moves, the volume inside the combustion chamber increases resulting in the reduction of instantaneous pressure on piston. Instantaneous power is therefore a function of piston position. Instantaneous power delivered by the engine would be calculated by differentiation as:

md3xdt3+k2d2xdt2+k3dxdtϒx=-k1ϑA-ϑ+1x-ϑ-1dxdtϒxE51
md3xdt3+k2d2xdt2+k3dxdt=-k1ϑA-ϑ+1x-ϑ-1dxdtE52

Writing differential Eq 45 in terms of velocity v as:

md2vdt2+k2dvdt+k3v=-ϑϕtk1A-ϑ+1x-ϑϒxϕtvxϒxE53
md2vdt2+k2dvdt+k3v=ϑϕtϒQvxϒxE54
md2vdt2+k2dvdt+k3v=ϑϕtvxϒQϒtϒtϒxE55
md2vdt2+k2dvdt+k3v=ϑϕtvxP(x)1vE56

Assuming that crankshaft speed is proportional to the speed of piston inside the cylinder, equation (49) represents a model of crankshaft speed when energy is added in one of the cylinder of SI engine by the ignition of fuel. The model is however nonlinear on account of presence of xin the denominator on the right side of differential equation.

#### 4.2.1. Model linearization

SI engine is a highly nonlinear system. In hybrid modeling, the time of activation of subsystems is very small. Also under under steady state conditions, the velocity of engine is fairly constant hence a linear approximation of engine subsystems can be justified. The model derived in earlier section is now linearized to form a switched linear model. The validity of linear model is only at the operating point. As x can never be zero, so the function is smooth and can be linearized at TDC. If the igniting fuel adds the power P(x) to a cylinder when piston is at position x, the dynamics of system at TDC would be described as:

md2vdt2+k2dvdt+k3v=ϑϕtxP(x)E57

Linearizing the system at TDC (x=xt) under steady state condition, and assuming that whole power is added in the cylinder instantaneously when the cylinder is at TDC, equation 50 becomes:

md2vdt2+k2dvdt+k3v=ϑϕtxtP(x)E58

In simulations, P(x) can be taken as a narrow pulse or a triangular wave, assuming that when system receives input, it deliver power at constant high rate for a short interval of time and thereafter the delivered power would be negligible. Since shaft speed is also constant at the start of each ignition cycle, therefore right hand side of equation 51 becomes constant and expression becomes a linear differential equation.

#### 4.2.2. Model parameter estimation

The movement of piston exhibit a periodic behavior with same fundamental frequency as that of rotational speed of engine shaft. This provides a heuristic guideline to choose the value of k3 (in Eq 5.16) as a function of crankshaft angular speed. The empirical choice is validated using simulation and experimental results reported later.

k3=ϧ2=(2ϞN)2E59

where N is engine speed in revolution per second.

During experimental verification load is also applied by friction. Most frictional models described in literature are based on empirical relations as a polynomial in engine speed. A simplified frictional model is chosen with term containing only square of engine speed. The constant term representing the load acting on engine is also considered as a parameter whose value is defined as a polynomial in crankshaft speed as:

k2=b ϧ2E60
+c

On the basis of simulation and experimental results it is established that the optimal selection of value of b varies between 0.02 and 0.5.

 Parameter Value Description m 20 Kg Mass of Engine moving assembly b 0.2 Friction Coefficient k3 10000 Elasticity Coefficient γ 1.4 Cp / Cv P 3 hp Power generated in cylinder η 0.3 Efficiency ω 100 rad/s Engine operating speed

### Table 1.

able 1.Parameter values used in simulation

#### 4.2.3. Model properties and applications

The proposed hybrid model was used to study the properties of crankshaft speed of SI engine [Rizvi etal]. The simplicity of model also enabled to study some stochastic properties of engine variable also. An analysis of hybrid model indicates following results which are useful in statistical analysis of system.

1. Four peaks would be observed in one ignition cycle of a four cylinder SI engine.

2. Amplitude of four observed peaks represents four independent events.

3. Crankshaft speed is proportional to input power. (Due to linear model of subsystems)

4. Crankshaft speed is proportional to amount of intake air.

The model was used:

1. To develop state observer for estimation of angular acceleration

2. To detect and isolate the misfire fault in SI engine [22].

### 4.3. Model input estimation

The input to the model is the power generated inside the cylinder as a result of ignition. It is assumed that power operating on piston is coming from two sources i.e. by the ignition of fuel and by the power supplied by the engine rotating assembly due to inertia. In case of misfire, the power due to inertia of rotating assembly will maintain the movement of piston but the Power due to ignition of fuel is absent. Power can be defined as the product of force acting on piston of a cylinder and piston velocity. If F is the force acting on engine piston and v is the piston velocity, then power P acting on piston can be defined as:

P=Fv E61
P=p.A.vE62

Where p is the pressure inside the cylinder, A is the surface area of piston which is known. The only unknown variable is the cylinder pressure that can be estimated using observer or an estimator. One such technique of cylinder pressure estimation was proposed by Yaojung S. and Moskwa J. (1995, pp: 70-78) in [28]. However for simulation purpose typical values can be used. Under idle conditions the typical value of peak pressure inside the cylinders is 25 bars. If engine is running at 15 revolutions per second i.e. idle speed, and cylinder stroke is 75mm, then average speed of piston can be easily estimated. This pulse would be provided once in each ignition cycle i.e. in 720˚. The time to traverse the complete stroke is 1/30 seconds or nearly 0.03 seconds. The average power provided by the fuel can now be estimated as:

Power=250000012 ×pi×.075×.075/4 ×(.075.03 )E63
Power=2301 Watt=3.1 hpE64

A pulse with average value of power equivalent to 3.1 hp would then be used in simulations.

### 4.4. Model simulation and experimental verification

The block diagram of switched linear system used for simulation purpose is shown in Figure 4.3. Input is provided as a periodic pulse train and three shifted versions of the same pulse train so that addition of all the four signals would also result in a periodic pulse train. H is a multiplier and represents health of a cylinder. H=1 represents a healthy cylinder that contribute to system output. H=0 represents faulty cylinder that does not contribute to system output.

#### 4.4.1. Simulation results

For simulation computer program was written to implement the block diagram shown in Figure 4.3 in Matlab. This gain of all elements was given a value equal to 1 for no-misfire simulation. To simulate the misfire situation, the gain of the corresponding sub-system was set to zero so that its output did not participate in the net system output. The nominal values of model parameters/ constants used in simulation are provided in Table 1. Under no misfire condition, the model was tuned to match its output with the experimental results. Using same parameter values, the misfire situation was simulated. The simulation results of hybrid model for both healthy and faulty conditions are shown in Figure 4.4.

The simulation results were then validated by conducting an experiment. In the crankshaft position was observed using crankshaft position sensor. The output of sensor is in the form of pulses. The data was logged using a data acquisition card from National Instrument Inc. on an analog channel with a constant data acquisition rate. Engine speed is estimated using crankshaft position data and experimental setup data:

Number of Teeth in gear=13E65
Angular spacing between normal Teeth=30°E66
Angular spacing between double Teeth=15°E67
Reference indication by Double teethE68
Data Acquisition Rate=50000 samples/secondE69

The reference was first searched by finding the double teeth. The number of samples polled in the time interval of passing of two consecutive gear teeth in front of magnetic sensor was observed. The number of samples polled was converted to time as Time=Number of samples polledData Acquisition Rate.

Using angular displacement between two consecutive teeth and time to traverse that angular displacement, crankshaft speed was estimated. Crankshaft speed was finally plotted as a function of time. The experiment for the measurement of speed was conducted both under no-misfire condition and misfire condition. During experiment some load was kept on engine by application of brake. The value of applied load was however unknown but an effort was made to keep load similar in both experiments by retaining the brake paddle at the same position during both experiments. The experimental results are shown in Figure 7.

## References

1. 1. L. Guzzella and C.H. Onder, “Introduction to Modeling and Control of Internal Combustion Engine Systems” Springer-Verlag Berlin Heidelberg 2004.
2. 2. JohnJ.Moskwa “Automotive Engine modeling for Real time Control”, PhD Thesis, Massachusetts Institute of Technology May, 1988
3. 3. Elbert Hendricks, Spencer C. Sorenson, “Mean Value Modeling of Spark Ignition Engines,” SAE Technical Paper no.900616, 1990.
4. 4. ElbertHendricks.AlainChevalier.MichaelJensen.SpencerC.Sorensen “Modeling of the Intake Manifold Filling Dynamics”, 1996SAE Technical Paper 960037
5. 5. Elbert Hendricks, “Engine Modeling for Control Applications: A Critical Survey,” Meccanica 32: 387-396, 1997.
6. 6. CrosslyP.R.CookJ.A.,”A.NonlinearEngine.Modelfor.Drivetrain.SystemDevelopment,”. I. E. E. E.IntConf. ‘Control 91’,Conference Publication 3322Edinburgh,U.K.,March 1991
7. 7. Dobner, Donald J., “A Mathematical Engine Model for Development of Dynamic Engine Control,” SAE technical paper No.1980
8. 8. GordonP.Blair“.DesignSimulationof.FourStroke.Engines”S. A. E.International199907680044403
9. 9. Weeks, R, W, Moskwa, J, J, “Automotive Engine Modeling for Real-Time Control Using Matlab/Simulink,” SAE Technical Paper no.950417, 1995.
10. 10. Robert Todd Chang, “A Modeling Study of the Influence of Spark-Ignition Engine Design Parameters on Engine Thermal Efficiency and Performance”, Master’s Thesis, Department of Mechanical Engineering, Massachusetts Institute of Technology, 1988.
11. 11. ButtQ. R.BhattiA. I.IqbalM.RizviM. A.MuftiR.KazmiI. H.Estimation“.ofGasoline.EngineParameters.PartI.DischargeCoefficient.ofThrottle.Body”I. B. C. A. S. T.2009Islamabad.
12. 12. ButtQ. R.BhattiA. I.Estimation“.ofGasoline.EngineParameters.usingHigher.OrderSliding.Mode”I. E. E. E.Transactionon.IndustrialElectronics.Vol.Issue.Nov2008Page 38913898
13. 13. ScattoliniR.MiottiA.LoriniG.BolzernP.P.ColaneriN.Schiavoni“.Modelingsimulation.controlof.anautomotive.gasolineengine”.Proceedingsof.IEEE, International conference on control applications, Munich, Germany, October 462006
14. 14. Toshihiro Aono and Takehiko Kowatari, “Throttle-Control Algorithm for Improving Engine Response Based on Air-Intake Model and Throttle-Response Model”, IEEE Transactions in Industrial Electronics, vol.3June 2006
15. 15. Christian Bohn, Thomas Bohme, Aik Staate and Petra Manemann, “A Nonlinear Model for Design and Simulation of Automotive Idle Speed Control Strategies”, Proceeding of the American Control Conference2006Minneapolis, Minnesota, USA, June 1416
16. 16. Per Andersson “Air Charge Estimation in Turbocharged Spark Ignition Engines”, Doctoral Thesis, Department of Electrical Engineering, Linkoping University, Linkoping, Sweden 2005.
17. 17. DeligiannisV.ManesisS. . “.ModelingInternal.CombustionEngines.Usinga.Hyper-Classof.HybridAutomata. A.CaseStudy”.Conferenceon.ComputerAided.ControlSystems.DesignMunich.GermanyProceedings.ofthe.2006IEEE, 29912996
19. 19. WongP. K.TamL. M.LiK.VongC. M. “.EngineIdle.SpeedSystem.ModelingControlOptimization.usingArtificial.intelligence”Proceedings.ofthe.Institutionof.MechanicalEngineers.Part D, Journal of Automobile Engineering, 22420095572
20. 20. Isermann R, Müller N., “Modeling and Adaptive Control of Combustion Engines With Fast Neural Networks”, European Symposium on Intelligent Technologies, Hybrid Systems and their Implementation on Smart Adaptive Systems, Tenerife, Spain, 2001.
21. 21. Rizvi M. A., A. I. Bhatti, “Hybrid Model for Early Detection of Misfire Fault in SI Engines”, IEEE 13th International Multitopic Conference, 538315, pp 1-6, Nov. 2009.
22. 22. Rizvi M. A, Bhatti A. I., Butt Q. R, “Hybrid Model of Gasoline Engine for Misfire Detection”, IEEE Transactions on Industrial Electronics” Accepted for publication in 2010.
23. 23. KarlssonJ.FredrikssonJ. “.Cylinder-byCylinder-by-Cylinder Engine Models Vs Mean Value Engine Models for use in Powertrain Control Applications”, Society of Automotive Engineers, SAE 1998P-174, 18
24. 24. FrancoJ.FranchekM. A.GrigoriadisK. “.Real-timebrake.torqueestimation.forinternal.combustionengines”.MechanicalSystems.Signalprocessing. .2008338361
25. 25. Matco, D., Zupancic, B., Karba, R., “Simulation and Modeling of Continuous System, A Case Study Approach,” Prentice Hall, 1992.
26. 26. Heywood; John B., “Internal Combustion Engine Fundamentals,” McGraw-Hill Inc., 1988.
27. 27. Per Andersson, Lars Eriksson and Lars Nielsen “Modeling and Architecture Examples of Model Based Engine Control” Vehicular Systems, ISY, Linköping University, Sweden.
28. 28. YaojungShiao.JohnJ.Moskwa“.Model-Based-By-CylinderCylinder.Air-FuelRatio.Controlfor. S. I.Enginesusing.SlidingObservers”.Proceedingsof.theIEEE International Conference on Control Application Dearborn, MI. September 15181996

Written By

Mudassar Abbas Rizvi, Qarab Raza, Aamer Iqbal Bhatti, Sajjad Zaidi and Mansoor Khan

Published: 14 November 2012