54
Dynamic Model of a Diesel Engine for Diagnosis and Balancing P E R H I L L E R B O R G Master's Degree Project Stockholm, Sweden 2005 IR-RT-EX-0515

Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Dynamic Model of a Diesel Engine for Diagnosis and Balancing

P E R H I L L E R B O R G

Master's Degree ProjectStockholm, Sweden 2005

IR-RT-EX-0515

Page 2: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified
Page 3: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

AbstractTo monitor and control the combustion in a diesel engine one can study the speed signal from the flywheel. Theidea is that if individual cylinders give different amount of torque this will lead to variations in the flywheelspeed. A model which describes the cylinder torque based on flywheel speed can be used to estimate the torquefrom individual cylinders. With this new knowledge of the individual performance of each cylinder the enginecan be balanced. The balancing aim at making the speed of the flywheel more even but also required a modelwith estimated cylinder torque as input. This model may also be used for testing new control algorithms easilyand gaining understanding of the dynamics.

In this thesis a time dissolved model is constructed to describe the cylinder pressure-, crankshaft-, flywheel-and damper dynamics. The model is based on a physical point of view by approximating the system into nodescontaining mass, stiffness and friction. The inputs into the model are injection data from the engine managementsystem (EMS) and a torque from a drive line. Ways to reduce the complexity of the model are investigated inorder to invert the model to estimate the injection data based on flywheel speed measurements. Measurementsare done in a test bed to receive data required for model simulation and validation.

The result is that the main behavior of the dynamics is caught. The self oscillation behaviors in some operat-ing points are however not caught which indicates that the model can not explain all behaviors. A reduced modelworks almost as well but of course looses more of the non stiffness behavior. As expected, the model equationscan not be solved in real time.

The result of the inverted reduced model depends on the flywheel signal. When the signal contains little nonstiffness behavior the result is good. An observer model based on the reduced model is suggested and tested inorder to estimate the indicated torque from flywheel data. The observer manages to detect errors in the injection.

Keywords: combustion supervision, cylinder balancing, physical model, engine model, cylinder pressure, fly-wheel speed, crankshaft, observer, cylinder injection

Page 4: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

PrefaceThis report is a master’s thesis at the Department of Signals, Sensors and Systems, Kungliga Tekniska Hogskolan.The work was carried out during February to August 2005 on Scania, Sodertalje under supervision of AnnaPernestal and Henrik Pettersson.

Thesis outlineChapter 1 gives a background to the thesis and outlines the thesis objectives.

Chapter 2 explains the model used in this thesis.

Chapter 3 describes the measurements which were accomplished in a test bed at Scania, Sodertalje.

Chapter 4 gives details of the simulation and its result.

Chapter 5 summarizes the conclusions of the previous chapters.

Chapter 6 discusses future work.

Appendix A demonstrates one way to derive the connecting rod kinematics.

Appendix B contains more figures of the simulation result.

AcknowledgmentI would like to thank my supervisors’ student Anna Pernestal and Henrik Pettersson at Scania. Anna and Henrikhave throughout the project given me support and contributed with valuable knowledge, which has been greatlyappreciated. I’m thankful for the assistance given in the test bed environment. I also would like to give myrecognition to Andreas Renberg who contributed with the pressure modeling and Anders Floren who supportedin the optimization process. I give my general appreciation to all people at Scania who assisted me at my workduring my stay in Sodertalje. A special thanks to my examiner professor Bo Wahlberg at KTH and people atNEE, for giving up time to answer questions related to my work. Finally I would like to thank my family foryour constant love and support.

Page 5: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

iv

Page 6: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Contents

Abstract ii

Preface and Acknowledgment iii

Notation & Glossary vii

1 Background & Objectives 11.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Thesis objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 The Model 22.1 Engine introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2 Modeling pressure in one cylinder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.2.1 The combustion cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2.2 Derivation of the engine pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2.3 Derivation of combustion pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.3 Modeling the engine dynamics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3.1 Derivation of the gas torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3.2 Torque due to motion of the connecting rod and the piston . . . . . . . . . . . . . . . . 62.3.3 Modeling the crankshaft torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.3.4 Friction related to the cylinder system . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.4 The complete model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4.1 The torque balancing equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4.2 Time domain state space model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.4.3 Adding a drive line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.5 Model simplifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.5.1 Reduce order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.5.2 Simplification in the mass torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.6 Observers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.6.1 Pressure torque observer model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.6.2 Extended observer model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.7 Model error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.7.1 Dynamic analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3 Measurement 153.1 Measurement setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.1.1 Measuring flywheel speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.1.2 Measuring pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.1.3 Measuring other variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

4 Simulation 194.1 Matlab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.2 Result of the pressure model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4.2.1 Sensitivity analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.3 Result of the mechanical model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

v

Page 7: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

4.3.1 Friction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.3.2 Comparison between measured and simulated flywheel speed . . . . . . . . . . . . . . 27

4.4 Simulating the inverted reduced model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.5 Simulated error in injection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.6 Result of the extended observer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5 Conclusions 325.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.1.1 Discussion of the pressure model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325.1.2 Discussion of the full model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325.1.3 Discussion of inverting the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325.1.4 Discussion of the observer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

5.2 Conclusions of the objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6 Future Work 34

References 35

A Derivation of the connecting rod kinematics 36

B Simulation figures 39

Page 8: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Notation & Glossary

Symbols used in the thesis report.

Variables and parameters

c absolute damping [Nmsrad ]

j moment of inertia [kgm2]k stiffness [Nm/rad]l connecting rod length [m]m mass [kg]N gas molecules [mol]pg cylinder pressure - atmosphere pressure [Pa]pengine pressure due to engine kinetics [Pa]pinl inlet pressure to cylinder [Pa]pmax maximum pressure inside a cylinder [Pa]r crankshaft radius [m]s cylinder displacement [m]s relative damping [Nms

rad ]vfuel fuel flow [ mg

CAD ]

Ap cylinder Area [m2]J moment of inertia matrix [kgm2]R universal gas constant [ J

mol·K ]S piston node position matrixT temperature [K]Tg gas torque [Nm]Tload brake load torque [Nm]Tm engine kinetics torque [Nm]Tfric friction torque [Nm]V cylinder volume [m3]

δ fuel/stoke [ mgstroke ]

θ crankshaft angle [CAD]θ angular velocity [CAD

s ]θ angular acceleration [CAD

s2 ]η material constant [1]θinji injection duration [CAD]θIV C inlet valve closing [CAD]θIV O inlet valve opening [CAD]θSOC start of combustion [CAD]λ r/l

Special functionsgi geometrical functionGi matrix geometrical function

vii

Page 9: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

GlossaryCAD Crank angle degreeEMS Engine management systemEVO Exhaust valve closingIVO Inlet valve closingOBD On board diagnosticsSOI Start of injection

Page 10: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 1

Background & Objectives

1.1 BackgroundThere are laws on emissions and how much noise a heavy duty truck may do. The drivers of heavy duty truckwant an engine which offers both reduced fuel consumption and comfort. To full fill these laws, and demands abetter understanding of the engines is required.

In the diesel engine, fuel is electronically injected into the cylinders at a desired angle. The fuel combustsand the released energy is transformed into mechanical force which forces the crankshaft to rotate. The crank-shaft has a flywheel attached on the side closest to the drive line. A sensor measures the rotating speed of theflywheel. The flywheel speed oscillates and its behavior depends on several factors where the cyclic torque fromthe cylinders is considerate. By changing the injection on individual cylinders, the behavior of the flywheelspeed oscillation alters. This makes it possible to balance the engine by controlling the electronic injection withfeedback from the speed signal. Thus small injection errors in individual cylinders can be corrected as well asunwanted orders1 of the oscillations can be removed.

At present engines, the engine management system (EMS) filters out a few interesting orders of the oscillat-ing speed signal. The unwanted orders, typically the half and the first engine order, are used as feedback to theinjectors in order to balance the engine.

Laws are also coming on on board diagnostics (OBD) where the EMS should be able to diagnose its condition.The cylinders diagnose aims at discovering if one cylinder is broken. This requires a model of the cylinder-crankshaft dynamics which can observe the unmeasured cylinder torque.

1.2 Thesis objectivesAs stressed in the background, models which describe the engine dynamics are important. With models the con-trol algorithms can be improved, parts of the engine which are not measurable may be estimated and knowledgemay be gained. Models also allow for control algorithms to be tested before running them on an engine.

This thesis focuses in the dynamics from the cylinder injection to flywheel speed. The objectives are

1. Constructing a time dissolved model which can calculate the flywheel speed based on the fuel injectiondata.

2. Investigating the possibilities of simplifying the model to be able to invert it and thus being able to calculatethe torque of the individual cylinders based on flywheel speed.

1The natural engine order is the ignition order which is 3 on a 6 cylinder engine, since three cylinders ignites per crankshaft revolution.The other orders can arise due to for example mass torques, self oscillation and variation in individual cylinder injection. The low orderorders are those which are most unwanted since they feel unpleasant.

1

Page 11: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 2

The Model

In this chapter a model describing the cylinder pressure-, crankshaft-, flywheel- and damper dynamics with inputsfrom injection data and drive line torque is presented.

The model is based on a physical point of view and results in ordinary differential equations. The model usedin this thesis is based on the model presented by Schagerberg in [17] with an extension in the gas modeling.

Model simplifications to reduce calculation time are suggested. Observers which are based on a simplifiedmodel are also suggested. In the end of the chapter a brief dynamic analysis is done.

Figure 2.1: The engine parts described in the engine introduction.

2.1 Engine introductionThe main parts in an engine are cylinders, crankshaft, flywheel, damper and the connecting rods which can allbe seen the figure above. The combustion takes part inside the cylinders forces the crankshaft to rotate via theconnecting rods which connects them. Since the torque from the cylinders oscillates a damper wheel is connectedto the crankshaft to dampen the speed fluctuations. The flywheel is connected on the other side of the crankshaftrelative to the damper. It is a wheel which has a high moment of inertia in order to smooth the torque which isgoing to be passed on to the drive line.

2

Page 12: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

3 2.2. Modeling pressure in one cylinder

2.2 Modeling pressure in one cylinderThe chemical reaction when transforming fuel and oxygen into carbon dioxide and water provides energy to theengine. This takes part inside the cylinders. Heavy duty trucks usually have 4, 5, 6 or 8 cylinders which deliversa steady amount of power. In this section the combustion cycle is described and equations for modeling thepressure inside the cylinder are suggested.

2.2.1 The combustion cycleThe combustion cycle takes part inside the cylinders and can in a four-stroke diesel engine be divided into fourphases: intake, compression, expansion and exhaust, see figure 2.2. The phases are controlled mechanically bythe camshaft which controls the inlet- and the outlet valve. The fuel injection is done electronically and can becontrolled to optimize performance. To finish all phases the crankshaft requires two revolutions.

Figure 2.2: A four-stroke engine can be divided into four phases. Figure taken from [9].

Intake During the air intake phase new air flows into the cylinder through the inlet valve sucked by themovement of the piston and pushed by the turbo. The pressure in the cylinder is approximatelyequal to the turbo pressure.

Compression During the compression both valves are closed and the piston is moving upward whichcompresses the air trapped inside the cylinder which increases the pressure.

Expansion Approximately at the top piston position, diesel is injected and starts to combust due to thehigh temperature and pressure from the compression. The piston is starting to move downwards andis pushed by the extra pressure which forces the piston to accelerate further. The phase is calledexpansion since the cylinder volume is expanding.

Exhaust At the bottom piston position the outlet valve is opened and the burned gases exit the cylinderduring the exhaust phase.

To start the chemical reaction between fuel and oxygen, a gasoline engine (Otto engine) uses a spark, and adiesel engine uses high temperature and pressure which result in a spontaneous ignition. A key number definingthe engine is the compression ratio. The compression ratio is defined as the relation between minimum cylindervolume and the present cylinder volume. The compression ratio determines how much the air inside thecylinder can be compressed. If higher compression pressure is wanted more air has to pushed into the cylinder.This can be done with a turbo. The turbo compresses the air on its way towards the cylinder. If the turbocompresses the air to two bar compared to one bar the compression pressure in the cylinder will approximatelydouble up which will shorten the combustion time. This is a very fuel efficient way to gain more power from the

Page 13: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 2. The Model 4

engine and is used in most diesel engines. The turbo is driven by the gas which exits the cylinder in the exhaustphase. More information can be found in [2]. To summarize the pressure during all phases the pressure in acylinder can be described as

p(θ) = pengine(θ) + pcomb(θ), (2.1)

where θ is the crankshaft angle, pengine(θ) is the pressure due to the engine kinetics controlled by the camshaftvalves and pcomb(θ) is the resulting pressure due to combustion. When valves are opened pengine(θ) isapproximately equal to turbo pressure. A plot of the pressure can be seen in figure 2.3.

Figure 2.3: The total pressure in the cylinder during one combustion cycle. The lower curve shows the enginepressure pengine during the combustion. The plot is taken from [9].

Figure 2.4: A P-V diagram describing the relation between pressure and volume. The highest pressure (here 35bar) is when the piston is at it’s top position. Then the pressure drops when the piston moves downward duringthe expansion (here to 4 bar). Then the gases exits the cylinder as the piston moves upward (volume decreases,pressure ≈constant. New air is sucked into the cylinder (volume increases, pressure ≈constant). The valvesclose and the air starts to be compressed as the volume decreases. Finally fuel is injected when the volume is atits minimum and pressure is rapidly increased. The plot is taken from [9].

Page 14: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

5 2.3. Modeling the engine dynamics.

2.2.2 Derivation of the engine pressurepengine(θ) is denoted by the pressure due to the engine kinetics controlled by the camshaft valves. A simpleway to calculate the pengine is to use the ideal gas law equation see [9] or [2].

pengine(θ)V (θ) = N(θ)kT (θ), (2.2)

where pengine(θ) is the pressure, V (θ) the cylinder volume, N(θ) the number of gas molecules inside thecylinder, k is the Boltzmann constant and T (θ) the temperature. Since no external heat or energy is consideredto be brought to the cylinder system an adiabatic equation should be used. The cylinder volume can bedescribed as

V (θ) = Aps(θ). (2.3)

Here Ap is the combustion chamber area and s(θ) is the piston position. When the valves are open the pressurepengine(θ) is approximately equal to the inlet pressure pinl from the turbo. When both valves are closed, at inletvalve closing (IV C), the amount of particles N(θ) is constant which makes the pressure and the temperatureincrease as the volume is decreasing. Since the combustion chamber is not perfectly isolated one can assumethat some pressure is lost because of leakage of gas molecules and of loss of heat, hloss(θ, θIV C). It can beapproximated as a linear function hloss(θ, θIV C) = q(θ − θIV C).The pressure due to engine kinematics can be calculated as

When the valves are not closedpengine(θ) ≈ pinl. (2.4)

When both valves are closed and air is compressed

pengine(θ) =hloss(θ, θIV C)N(θIV C)kT (θ)

V (θ)(2.5)

N(θIV C) =pinlV (θIV C)RT (θIV C)

. (2.6)

2.2.3 Derivation of combustion pressureThe start of injection angle (θSOI ) is the crank angle degree (CAD) where the diesel starts to be injected into thecombustion chamber. This occurs approximately when the piston is at its top position in the beginning of theexpansion phase. There is a short delay until the diesel fully starts to combust into gas. The combustionpressure can be expressed as

pcomb(θ)f(θinj , vfuel, θSOI , θ, T, pengine(θ)), (2.7)

where θinj is the injection duration [CAD], vfuel the fuel flow [ mgCAD ], θ is the speed of the flywheel, T is the

temperature [K] and pengine the pressure that arise from the compression. The combustion pressure equationpcomb(θ) is solved in two steps. The first step is to transform the fuel flow into a ”heat release”. The equationsinvolved in that part can be found in articles [5], [6] and [7]. The second step is to transform the heat release topressure. The equations for the last step can be found in [9].

2.3 Modeling the engine dynamics.In this section torques due to pressure, mass and friction is derived. The ”torque-balancing equation” for onecylinder is also derived and explained.

2.3.1 Derivation of the gas torqueTo compute the force working along the cylinder axis the piston area is multiplied with the relative cylinderpressure, pg(θ). The relative pressure is the difference in pressure inside and outside the cylinder. The resultinggas torque is then described as

Tg(θ) = Fgds

dθ= pg(θ)Ap

ds

dθ(2.8)

Page 15: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 2. The Model 6

where pg ispg(θ) = pengine(θ) + pcomb − p0. (2.9)

Here p0 is the pressure outside the combustion chamber (≈1 bar). pengine and pcomb can be calculated using(2.5) and (2.7). The derivation of the equation can be found in [17].

2.3.2 Torque due to motion of the connecting rod and the pistonThe connecting rod connects the piston to the crankshaft and transfers torque. The piston is moving up anddown along the cylinder axis while the crankshaft is rotating. This leads to that the connecting rod undergoesboth a translational- (from the piston movement) and a rotational movement (from the crankshaft). Thismovement of mass of the connecting rod and the piston results in a torque. To simplify torque calculations theconnecting rod is divided into two point masses, mA and mB . mA represent the mass of the piston plus theoscillating mass of the connecting rod. mB is the part of the connecting rod which undergoes a rotationalmotion. See figure 2.5.

phi

theta

r+l

s

A

l

B

r

Figure 2.5: The mass of the connecting rod and the piston is divided into two point masses: one rotating (mB)and one oscillating (mA). They are located according to the figure.

The mass torque, Tm(θ, θ, θ) of the rotating and oscillating masses is the derivative of the kinetic energy Em.The kinetic energy is the calculated as 1

2J(θ)θ. The derivation of the mass torque can be done as

Em =∫ 2π

0

Tmdθ =12J(θ)θ2

dEm

dt= Tmθ =

(J(θ)θ +

12

dJ(θ)dθ

θ2)θ

⇒ Tm(θ, θ, θ) = J(θ)θ +12

dJ(θ)dθ

θ2 (2.10)

{J(θ) = mBr2 + mA( ds

dθ )2J(θ)dθ = 2mA

d2sdθ2

dsdθ .

The mass torque usually works in opposite direction of the gas torque and thus reduces speed variations. Theexpressions for the piston displacement are described in appendix A.

2.3.3 Modeling the crankshaft torqueThe crankshaft is made out of steel and its design depends on the number of cylinders and their positions e.g. aV, in-line or a opposed (boxer) arrangement. A common way to model the crankshaft is to divide it into a fewnodes placed at strategic positions. All nodes has a lumped mass which is connected to their neighboring nodeswith a torsion spring. There is also a relative and a absolute friction acting on the system. The relative friction

Page 16: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

7 2.3. Modeling the engine dynamics.

dampens the difference in speed between two masses and the absolute friction comes from friction in bolts andbearings. The model used in this thesis has one mass in the damper one in the damper ring, one at each cylinderconnection and one for the flywheel. See figure 2.6. For a six cylinder engine this means 9 masses. A drive linecan also be added with more masses which will be investigated in section 2.4.3. The advantage of using thismodel is that the model parameters are well known for each specific crankshaft and are easy to estimate.

J_4

c_3 c_4 c_6

k_3 k_4 k_5 k_7k_6 k_8

c_12 c_23 c_34 c_45 c_56 c_67 c_78 c_89

c_5 c_7 c_8

k_2

J_9

J_3 J_5 J_6 J_7 J_8J_1

J_2

Damper

Free end

Cyl 1 Cyl 2 Cyl 3 Cyl 4 Cyl 5 Cyl 6

Flywheel

k_1

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

���

Figure 2.6: Node model for a six cylinder engine. The first node is at the damper wheel, the second at the damperring, third-eighth are at the connecting rods and the ninth is at the flywheel.

The absolute friction is considered to primary come from the cylinder-crankshaft dynamics see section 2.3.4and is set to zero for the crankshaft. The crankshaft torque, TCi , from one node of the crankshaft can thus bemodeled as

TCi = Jiθ + ki−1(θi − θi−1) + ci−1(θi − θi−1) −ki(θi+1 − θi) − ci(θi+1 − θi), (2.11)

where ki is the stiffness between node i and node i + 1, ci is the relative friction between node i and node i + 1.Note that the crankshaft moment of inertia is constant.

The stiffness and inertia parameters was received from [1]. The relative damping parameters were estimated as

ci = ηdampki

2πf0, (2.12)

where ηdamp is a material constant and f0 is a resonance frequency.

2.3.4 Friction related to the cylinder systemThe most friction in the engine system can be found in the cylinder - connecting rod - crankshaft system. Somefrictions are easy to realize as friction in the connecting rod bolts and the crankshaft bearings while others as airfriction is more complex. To model each friction component by it self requires much work and componentknowledge and will probably not be very accurate in the end. Instead of summing up all individual frictioncomponents the approach is to try to model a friction so it fits data. It is easy to calculate the energy loss due tofriction since it is the input energy minus the output.

Tfriction =1

4πn

( ∫ θ0+4πn

θ0

(Tg(θ) − Tload)dθ)

(2.13)

Where Tfriction is the friction torque and n is a positive integer describing the numbers of crankshaftrevolutions. The next step is to try to make a friction model so that the error gets as small as possible. A modeldescribing the friction torque on one cylinder-crankshaft connection could for example be a function with anglepositions, velocities or acceleration.

Tabsfric ≈ f(θ, θ, θ) (2.14)

Page 17: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 2. The Model 8

This friction is called absolute friction since it only depends on absolute1 velocity of the crankshaft and notrelative velocity due to a non stiff crankshaft. More information of different friction types can be found in [16].

2.4 The complete modelIn this section the torque equations from the previous section are put together into the torque balancing equation.

2.4.1 The torque balancing equationPutting all torque contributions together and extending it into a multi-body system the torque equation reads

Jθ + Cθ + KθTg(θ) − Tm(θ, θ, θ) − Tload − Tabsfric(θ). (2.15)

Here θ is now a vector containing the angles for all nodes. J, C, K are symmetric matrices of size N × Nwhere N is the number of lumped masses. The vector Tload is the torque from a drive line and is considered toonly work on the last node. During the measurement Tload could be considered constant. Note that the left sideof the equation is the crankshaft torque.

The N × 1 angle vectorθ =

[θ1 θ2 θ3 . . . θN

]T. (2.16)

The N × N moment of inertia matric

J =

⎡⎢⎢⎢⎢⎢⎣

J1 0 0 . . . 00 J2 0 . . . 00 0 J3 . . . 0...

......

. . . 00 0 0 0 JN

⎤⎥⎥⎥⎥⎥⎦ . (2.17)

The N × N stiffness matric

K =

⎡⎢⎢⎢⎢⎢⎣

k1 −k1 0 . . . 0−k1 k1 + k2 −k2 . . . 00 −k2 k2 + k3 . . . 0...

......

. . . −kN−1

0 0 0 −kN−1 kN−1

⎤⎥⎥⎥⎥⎥⎦ . (2.18)

The N × N damping matric

C =

⎡⎢⎢⎢⎢⎢⎣

c1 −c1 0 . . . 0−c1 c1 + c2 −c2 . . . 00 −c2 c2 + c3 . . . 0...

......

. . . −cN−1

0 0 0 −cN−1 cN−1

⎤⎥⎥⎥⎥⎥⎦. (2.19)

To keep track of which nodes the cylinders are connected to a N × NC matrix S is introduced. NC is thenumber of cylinders. For a six cylinder engine with 9 nodes S becomes

S =

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

0 0 0 0 0 00 0 0 0 0 01 0 0 0 0 00 1 0 0 0 00 0 1 0 0 00 0 0 1 0 00 0 0 0 1 00 0 0 0 0 10 0 0 0 0 0

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

. (2.20)

1Absolute friction can be thought of as a grounded friction which is not the case with the relative friction.

Page 18: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

9 2.4. The complete model

The first row correspond to the damper wheel, the second to the damper ring, the third-eighth are eachconnected to one cylinder. The ninth correspond to the flywheel node. If the engine has four cylinders and thesystem was modeled with four nodes with a damper wheel in node one, cylinder one and two in node two,cylinder three and four in node three and a flywheel in node four, S would look like this

S =

⎡⎢⎢⎣

0 0 0 01 1 0 00 0 1 10 0 0 0

⎤⎥⎥⎦ . (2.21)

The next step is to simplify notations by rewriting the expressions involved in the pressure torque equation (2.8)and mass torque equations (2.10). Three geometrical functions for a single cylinder are defined

g1(θ) = Apds

dθ(2.22)

g2(θ) =12

J(θ)dθ

mAd2s

dθ2

ds

dθ(2.23)

g3(θ) = J(θ) = mA(ds

dθ)2

. (2.24)

In a multi cylinder engine the cylinders have a specified fire sequence. In the six cylinder engine which isinvestigated in this thesis, the fire sequence is 1-5-3-6-2-4 where cylinder 1 is closest to the damper wheel. Thatmeans that the first cylinder fire, then the fifth cylinder and so on. One cylinder fires every 120 CAD, meaningthat it takes 720 CAD for all cylinders to fire once. The phase between the cylinders is defined as

Ψ =[

ψ1 ψ2 . . . ψNC

]T. (2.25)

The single cylinder geometrical functions gi(θ) can now be translated into multi cylinder geometrical functions

Gi(STθ − Ψ)diag(gi(sT1 θ − ψ1), . . . , gi(sTNCθ − ψN )), (2.26)

where si correspond to the i:th column in the S matrix.The gas torque in the multi body model may now be written as

Tg(θ) = SG1(STθ − Ψ)pg(STθ). (2.27)

Here pg(·) is a NC × 1 vector of the pressure in each cylinder.The extension of the mass torque defined in equation (2.10) becomes

Tm(θ, θ, θ)(SG3(STθ − Ψ)ST + mBr2SST)θ + SG2(STθ − Ψ)STθ � θ. (2.28)

The � means the elementwise multiplication.

2.4.2 Time domain state space modelThe model equation (2.15) is a second order differential equation with N states. By expanding the states to2 × N states the equation can be reformulated as a first order differential equation. The new states are the anglepositions and the angle velocities

x = (xT1 xT

2 )T = (θT θT)T. (2.29)

The mass torque, Tm(θ, θ, θ), in equation (2.28) can be separated into two parts, one that is independent ofspeed Tm,1(θ, θ) and one that is independent of acceleration Tm,2(θ, θ). By using the notation in the previoussection the mass torque reads

Tm,1(θ, θ) = (SG3(STθ − Ψ)ST + mBr2SST)θ (2.30)

Tm,2(θ, θ) = SG2(STθ − Ψ)STθ � θ. (2.31)

All terms which are dependent of θ are gathered in a equation often referred to as the ”varying inertia”.

J(θ) = J + SG3(STθ − Ψ)ST + mBr2SST (2.32)

Page 19: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 2. The Model 10

With these rearrangements the torque-balancing equation may be reformulated as

J(θ)θ = −Kθ − Cθ − Tm,2(θ, θ) + Tg(θ) − Tload − Tabsfric(θ). (2.33)

By using the new state vectors on equation (2.33) and multiplying both sides with J(θ)−1 the state space modelcan be written as

x =(

0 I−(J(x1))−1K −(J(x1))−1C

)(x1

x2

)+(

0−(J(x1))−1(SG2(ST x1 − Ψ)ST x2 � x2 + S · 1N · Tabsfric(x2))

)+(

0(J(x1))−1(SG1(ST x1 − Ψ)pg(ST x1) − Tload)

). (2.34)

The first term in equation (2.34) describes the dynamics of the crankshaft, the second the dynamics of thepiston-crank inertia and friction and the last term describes the dynamics of the input signals.

2.4.3 Adding a drive lineThe package behind the engine is called the drive line. In heavy duty trucks it basically consists of shafts andgearwheels and compared to the engine parameters the torsion stiffness is relatively low and the moment ofinertia is very large.When engine measurements were conducted in the test bed the engine was connected to a brake. Thisconnection is stiffer than on a truck while its moment of inertia is lower. The drive line can be modeled as theengine with nodes containing moment of inertia J, stiffness k and relative damping c.Since the brake influence the engine a model for the brake should be used when comparing simulations againstmeasurement. A model containing 5 nodes and a reduced model containing 1 node is used.

Page 20: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

11 2.5. Model simplifications

2.5 Model simplifications

2.5.1 Reduce orderDepending on how accurate the solution requirements needs to be some simplifications may be done in themodel. One example is to reduce the number of nodes by putting nodes together. One special case is to considerthe crankshaft as completely stiff. This is a fairly good approximation when the crankshaft does not experienceany resonance but less good when it does. By doing this approximation only one node has to be used for thecrankshaft which greatly reduces the order of the model. The torques just has to be summed leading to theequation

Jθ + Cθ + Kθ =N∑

i=1

(Tg(θ) − Tm(θ, θ, θ) − Tabsfric)i − Tload. (2.35)

Here J is the total moment of inertia of the crankshaft, damper and the flywheel, C is an absolute friction and Nthe number of pistons. The damper and the flywheel could be considered stiff as well which makes θ in (2.35)to a scalar and C = K = 0. To calculate the gas torque Tg for each cylinder is very easy now, one just have torewrite the equation to

N∑i=1

Tg(θ)i = Iθ + Cθ + Tload +N∑

i=1

(Tm(θ, θ, θ) + Tabsfric)i. (2.36)

Since the pressure peak from each cylinder is 120 CAD apart it is possible to estimate the torque for allindividual cylinders, given data of the flywheel speed. The torque due to stiffness has been removed and maycause errors in the Tg estimation even though the mean stiffness torque is zero.

2.5.2 Simplification in the mass torqueThe mass torque equation reads (see section 2.3.2 on page 6)

Tm(θ, θ, θ) = (mAds

2

+ mBr2)θ + mAd2s

dθ2

ds

dθθ2. (2.37)

According to A.S. Rangwaka in [15] and S. Schagerberg in [17] the mass torque may be approximated as

Tm(θ, w, θ) = (mA

2r2 + mBr2)θ + mA

d2s

dθ2

ds

dθw2, (2.38)

where θ is estimated as a average speed w, and dsdθ

2is approximated as ds

2 ≈ r2

2 .

This approximation differs 2-3% in torque contribution from (2.37) on a six cylinder engine but differs more ona four cylinder engine. Note that the terms multiplied with θ in equation (2.38) is constant. This simplified masstorque is often refereed to as the constant inertia equation.

2.6 ObserversIn this section two observers are set up. The first observer model introduced is a suggestion from [3]. The otherobserver has one more state added and is named the extended observer.

2.6.1 Pressure torque observer modelThe only measured signal in the model is the flywheel speed. The injections data signal from the enginemanagement system (EMS) is also know. What happens between input signals and flywheel measurements isinteresting to know, especially the things that occur in the cylinders. By modeling the engine and using theflywheel measurements as inputs the unmeasured dynamics may be estimated. The accuracy depend on themodel, the measured signal and the observer feedback design.

Page 21: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 2. The Model 12

Xhat(n+1)=A(n)Xhat(n)-L(n)(yhat(n)-y(n))yhat(n)=CX(n) yhat(n)

Xhat(n)

y

Figure 2.7: The observer estimates the torque with the angular velocity as inputs.

A time-varying linear observer for torque observation is suggested in a paper by [3]. The engine is considered tobe completely stiff and the torque due to stiffness is not modeled. An approximation is made that the torquevariation due to the pressure, the friction and the load during one angular step is small. This two states enginemodel writes {

X(n + 1) = A(n)X(n)y(n) = CX(n) (2.39)

with

X(n) =[

θ2(n) Tg(n) − Tload(n) − Tfric(n)]T

A(n) =[

1 − 2∆θJ(θn)f(θn) 2∆θ

J(θn)

0 1

](2.40)

C =[

1 0],

where ∆θ is the angle path and f(θn) and J(θn) are mass torque equations (2.41). The measurementsconducted on the flywheel are received for every angle step ∆θ which is a fix value somewhere between 1-10CAD depending on flywheel design. More about the measurements will be found in next chapter.{

J(θ) = Jcrankshaft + mBr2 + mA

∑NC

j=1(ds(θn)j

dθ )2

f(θ) = dJ(θn)dθ = 2mA

∑NC

j=1ds(θn)j

dθd2s(θn)j

dθ2

(2.41)

Depending on if a drive line is used the moment of inertia, Jcrankshaft, may have to be changed. An observerwith linear feedback on the squared angular speed is suggested with pole placement.{

X(n + 1) = A(n)X(n) − L(n)(y(n) − y(n))y(n) = CX(n)

(2.42)

Stability and observability for the system is proven in [3]. Observers with different design can also be found in[3] and [4].

2.6.2 Extended observer modelThe torque due to the gas pressure is cyclic. This information may be used to better describe the torquevariation. The torque curve is steeper on the compression side than on the combustion side and they are close tolinear on both side. The derivative of the gas torque curve w(θ) ≈ dTg

dθ could be approximated as a square wavewhich is illustrated in figure 2.8.A new state x3 which describes the size of the pressure torque amplitude is introduced. The discrete indicatedtorque equation can now be estimated as T (n + 1) = T (n) + w(θn)∆θx3. The new 3 states model becomes{

X(n + 1) = A(n)X(n)y(n) = CX(n) . (2.43)

with

Page 22: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

13 2.7. Model error

0 100 200 300 400 500 600 700−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

CAD

Tg

w=dTg/dθ

Figure 2.8: The gas torque is shown along with its approximated derivative w(θ). The sizes of both curves arescaled.

X(n) =[

θ2(n) Tg(n) − Tload(n) − Tfric(n) max(Tg) − min(Tg)]T

A(n) =

⎡⎣ 1 − 2∆θ

J(θn)f(θn) 2∆θJ(θn) 0

0 1 w(θ)0 0 1

⎤⎦ (2.44)

C =[

1 0 0].

Here w(θ) is the approximated gas torque derivative function seen in figure 2.8. An observer with linearfeedback with the squared angular velocity can be applied.

2.7 Model errorThe model is a simplification of the real system. An example is that the crankshaft is transformed into fewnodes containing moment of inertia, friction, and stiffness. If more nodes would be used the solution wouldprobably be better but the time to solve the ODE would grow and more parameters has to be estimated.

2.7.1 Dynamic analysisThe speed of the flywheel depends on the contributions from of all torque acting on the system. The maintorque contributions comes from: the gas pressure torque Tg(θ), the brake load Tload and torque due to movingmass J(θ)θ + Tm(θ, θ). Tload is in static cases just a constant. The gas torque is dependent of the fuel injectionwhile the mass torque is dependent of the angular acceleration θ and the angular velocity squared θ2. Thismeans that at low speeds the total torque mostly consists of the gas torque while at higher speeds the torque dueto mass is considerable. These phenomena will be seen clearly in the simulation result.The size of the gastorque depends on the load that has to be pulled. Higher load requires higher pressure torque.

Page 23: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 2. The Model 14

0 100 200 300−4000

−2000

0

2000

4000

6000

8000

CAD

Nmfm1500varv100procref

0 100 200 300−1500

−1000

−500

0

500

1000

1500

2000

CAD

Nm

fm1500varv0procref

Tg−Jprim

−JprimT

g

Tg−Jprim

−JprimT

g

Figure 2.9: Jprim is the mass torque term from equation (2.10) which is dependent only the velocity and theangle. Since the speeds are 1500 rpm for both figures the Jprim torque is the same. The right figure has a higherload to pull and which requires a higher gas torque. Note that the main oscillation is 6 oscillations per revolution(150 Hz) for the left figure while the right has 3 (75 Hz).

Page 24: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 3

Measurement

This chapter contains the measurements which were carried out during the thesis in order to verify and tune themodel. The main model which describes the speed of the flywheel based on fuel injection data is two individualmodels put together: the pressure model and the mechanical model. Measurement data are extracted so allmodels could be investigated separately to reduce model errors. All measurements were conducted in a test bedat Scania, Sodertalje, on a DLC6 engine.

Figure 3.1: The test bed setup. Measured signals are θ (≈rpm), cylinder pressure and brake torque. Injectiondata are also saved.

3.1 Measurement setup

The cylinder pressure signal and the flywheel speed signal was sampled in 5Mhz for 0.5 seconds in a DL750P,which is a scope and chart recorder manufactured by Yokogawa. The cylinder pressure signal was a voltagesignal and the flywheel speed signal was a square wave signal where each square indicates 1 crank angle degree(CAD). Data was also acquired by the test bed equipment and the engine management system (EMS).

The thirteen operating points which were measured can be seen in the table below. In all operating points theinjection was changed for one or three cylinders to represent errors in the injection.

15

Page 25: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 3. Measurement 16

rpm \ Brake load 0% 20% 50% 100%500 - x - -

1000 x x x x1500 x x x x1800 x x x x

3.1.1 Measuring flywheel speed

The flywheel speed signal is a square wave signal where each square indicates one tooth on the flywheel. In thetest bed the flywheel has one CAD between each tooth and in a standard engine the distance is six CAD. Thesignal is in the time domain and thus can be transformed into flywheel speed which was done directly in theDL750P scope. The scope also takes a mean over a short interval which results in that the speed signal changesvalue each two CAD. A CAD vector is created to keep track of the angle position.A problem when measuring the position of the flywheel in many small intervals is that imperfections in theconstruction of the flywheel can result in poor measurement. According to [8] a tooth can be as much as oneCAD misplaced on a standard flywheel with 120 teeth. This result in a 16% peak change of speed. To avoidthese errors the signal is filtered which reduces measurement error but also some of the natural speedfluctuations will vanish. In this thesis the signal was digitally filtered without phase shifts to avoid time delays.The filtering was done to the 20th order with a butter filter.

3.1.2 Measuring pressure

The pressure measurement was carried out on cylinder 6 which is the cylinder closest to the flywheel. Thereceived signal to the DL750P scope was an analogous voltage signal. Other interesting signals measured by thetest bed equipment is the maximum pressure (pmax), its CAD location (θpmax ) and the inlet pressure (pinl).The raw pressure curve needs some adjustments. First the signal is digitally filtered with a butter filter to reducemeasurement noise. The filtering was done so no phases were shifted. Then the pressure needs to be translatedfrom the time domain into the CAD domain. This translation is done almost as with the flywheel speed. Sincethe pressure curve has larger transients than the speed the pressure needs to be sampled more often. Fivepressure samples are taken for each speed sample which results in 2.5 pressure samples per CAD. The data isequidistantly chosen over the 2 CAD intervals, with the assumption that the speed is considered to be constantover the two CAD sample period.The next step is to adjust the pressure measurement both vertically and horizontally. The vertical adjustment isdue to that the voltage signal V (·) has to be transformed into a pressure signal. To do this the inlet pressure pinl

was to be considered as the minimum pressure and pmax the maximum pressure. The voltage signal was thenadjusted with this knowledge.

p(·) =(V (·) − VL(·)) pmax − pinl

max(V (·)) − VL(·) + pinl (3.1)

Where VL(·) is a mean of the voltage curve somewhere between the peaks, and describes the minimum value ofthe curve.The angle position could only be measured in a relative manor. The distance between the flywheel teeth wasmeasured but no reference to the revolution position was measured. The model assumes that the top dead center(TDC) is at approximately 0 CAD. The measured pmax position θpmax is used as a reference to where TDC isand both position vectors are corrected.

Pressure validation

The pressure is assumed to be cyclic over 720 CAD and should in an operating point deliver about the samepressure every cycle. To verify this assumption cylinder pressure in different cycles has been drawn in the sameplot in figure 3.3 for 1500 rpm and a brake load of 1045 Nm. The same comparison has been done on alldifferent measured operating points in brake load and rpm. The conclusion is that the assumption holds. Thesmall error could be caused by measuring error and/or small variance in injection data.

Page 26: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

17 3.1. Measurement setup

Figure 3.2: The voltage curve (red) needs to be reshaped and has its angle position to the blue curve.

−90 −45 0 45 900

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1fm1500varv50procref

Pressu

re no

rmaliz

ed to

1

CAD−5 0 5 10 15 20 25

0.4

0.5

0.6

0.7

0.8

0.9

1fm1500varv50procref

Pressu

re no

rmaliz

ed to

1

CAD

Figure 3.3: The measured pressure does not differs much between each cycle which can be seen in the left plot.The variance in pressure due to compression is almost zero while the pressure due to combustion is a bit largerwhich can be seen in the plot to the right which is a zoomed version of the left figure.

3.1.3 Measuring other variablesThe EMS handles the data gathered from the standard engine sensors and can be received by the softwareVision. The interesting parameter data collected by Vision is listed and described in table (3.1). The test bedequipment is able to do many engine measurements which are not done on a standard truck engine. Theinteresting parameter data gathered from the test bed is listed and described in table (3.2).

Parameter name explanationpinl The inlet pressure.[bar]θSOI Start of injection.[CAD]tinj The duration of the injection.[ms]∆tinj The added duration of thr injection.[ms]

Table 3.1: Parameter data gathered by the EMS with software Vision.

The gathered data was used in the models. The mechanical model needs Tload and the combustion model needsδ, pinl, θSOI , θinj and ∆θinj . Note that data describing θSOI and θinj ∼ tinj was gathered from both the testbed equipment and Vision. The data differed somewhat between the test bed and the EMS, e.g. θSOI occur atapproximately two CAD earlier according to the test bed compared to the EMS. Since the EMS controls bothθSOI and θinj its data was saved and the corresponding test bed data were discarded. The rest of the

Page 27: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 3. Measurement 18

Parameter name explanationδ Injected fuel during one stroke in one cylinder.[ mg

stroke ]pinl The inlet pressure.[bar]θSOI Start of injection.[CAD]θinj The mean CAD duration of the injection.[CAD]pmax The maximum pressure.[bar]θpmax The CAD of the maximum pressure.[CAD]Tload The torque load of the brake.[Nm]

Table 3.2: Parameter data gathered by the test bed equipment.

parameters, pmax, θpmax and pinl, was used to calibrate and set the pressure and reference angles as discussedpreviously in this section.The test bed engine was not fully calibrated when the measurements were conducted so some variables as δcould not be measured properly by the EMS.

Page 28: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 4

Simulation

In this chapter short information about the simulation is presented along with the result of predicting theflywheel speed based on injection data. Since the model is built as two separate models: the mechanical modeland the chemical pressure model, they are also evaluated individually.

4.1 MatlabTo solve the ordinary differential equation (2.34) describing the model, Matlab 7.0.1.24704 was used. Themodel program is built upon the program written in simulink/C++ by [13] which is based on the theory of [17].A quick way to solve the nonlinear differential equation in Matlab was to use the built in solver ode45 with amaximum time step of 0.0002 sec/step. This results in that the time to calculate a solution depend on the speedof the flywheel, since the CAD steps is larger with higher speeds since the time step is fix. The solver spendsabout 50% of the time interpolating gas curves. Less pressure data reduces solving time. The time it took tosolve the problem using a Pentium 4 CPU 1700 MHz with 256 Mb ram1 is found in table 4.1.

Rpm time 7200 sample [s] time 1800 sample [s]500 76 471000 46 241500 25 151800 21 12

Table 4.1: Mean time to calculate the model equations for 720 CAD. One model used pressure data which had7200 samples while the others had 1800 samples. Less samples reduces solving time but also reduces pressureaccuracy.

It is important that the time to solve the differential equation is short in order to save time when validating andsimulating. However it is not required that the solver should be able to solve in real time since it is not likely touse it in the engine control unit without implementing great simplifications in the model. The idea is to use themodel for gaining understanding of the systems and having a quick and easy way to evaluate new controlalgorithms. To further reduce solver time, other programming languages as C++ could be used.

1More memory is recommended to reduce simulation time since matlab and windows uses 140 % of the ram memory capacity beforeloading the model.

19

Page 29: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 4. Simulation 20

4.2 Result of the pressure modelThe measured data from the test bench are compared to the simulated data with inputs from the test bench. Theinputs to the pressure model are start of injection θSOI , injection duration θinj , inlet pressure pinl, injectionspeed vfuel and the flywheel speed θ. A comparison between data can be seen for different operating points infigures 4.1 - 4.3 and in B.1.

−180 −90 0 90 1800

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1fm500varv20procref

Pres

sure

nor

mal

ized

to 1

CAD

Figure 4.1: Normalized pressure in cylinder 6 during one combustion cycle. The injection is centered on 0 CAD.The red curve (bold) is the measured pressure from the test bench, the blue (dotted) is the simulated pressure andthe green (dashed) is the simulated pressure due to compression.

−180 −90 0 90 1800

0.2

0.4

0.6

0.8

1fm1000varv0procref

Pres

sure

norm

alize

d to 1

CAD−180 −90 0 90 180

0

0.2

0.4

0.6

0.8

1fm1000varv20procref

Pres

sure

norm

alize

d to 1

CAD

−180 −90 0 90 1800

0.2

0.4

0.6

0.8

1fm1000varv50procref

Pres

sure

norm

alize

d to 1

CAD−180 −90 0 90 180

0

0.2

0.4

0.6

0.8

1fm1000varv100procref

Pres

sure

norm

alize

d to 1

CAD

Figure 4.2: Normalized pressure in cylinder 6 during one combustion cycle. The injection is centered on 0 CAD.The red curve (bold) is the measured pressure from the test bench, the blue (dotted) is the simulated pressure andthe green (dashed) is the simulated pressure due to compression.

Page 30: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

21 4.2. Result of the pressure model

−180 −90 0 90 1800

0.2

0.4

0.6

0.8

1fm1500varv100procref

Pres

sure

norm

alize

d to 1

CAD−180 −90 0 90 180

0

0.2

0.4

0.6

0.8

1fm1500varv50procref

Pres

sure

norm

alize

d to 1

CAD

−180 −90 0 90 1800

0.2

0.4

0.6

0.8

1fm1500varv20procref

Pres

sure

norm

alize

d to 1

CAD−180 −90 0 90 180

0

0.2

0.4

0.6

0.8

1fm1500varv0procref

Pres

sure

norm

alize

d to 1

CAD

Figure 4.3: Normalized pressure in cylinder 6 during one combustion cycle. The injection is centered on 0 CAD.The red curve (bold) is the measured pressure from the test bench, the blue (dotted) is the simulated pressure andthe green (dashed) is the simulated pressure due to compression.

Page 31: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 4. Simulation 22

The overall pressure simulations are fairly similar to the measured pressure in most operating points. Themodeled pressure due to compression pmotor appear to be accurate except at one operating point at 1000rpm,100% brake load. This error seems to be due to incorrect measuring rather than model error. Another error thatturns up is that the whole pressure curve appear to be phase shifted some CAD. This error is most likely due to amiss placed measured curve, see equation (3.1), and the simulated curve should have a more correct appearancein this aspect.The simulated pressure due to compression pmotor is almost identical to measured pressure. The pressure due tocombustion pcomb seems to have a small error in the initial phase of the combustion around 0 CAD. This iseasiest visualized when the brake load is low. The reason seems to be incorrect modeling of the initial phase ofthe combustion where the pressure curve raises steeper than the simulated curve. This error could be decreasedby assuming that the injected fuel speed was larger in the beginning of the injection and smaller in the end2.Note that this error usually decreases with increasing brake load. This part of the model could be improved. Thefinal value of the pressure usually gets correct which is far more important when calculating pressure torque.To understand how much the error in the simulated pressure matters, the pressure torque was calculated for eachoperating point. Since the simulated pressure had its largest error close to the top cylinder position and thepressure torque is weighted as Ap

ds(θ)dθ which is zero at the top cylinder position the error in that interval will

decrease, see equation (2.8) and figure A.2. The pressure in the intervals ±[15 165] CAD are weighted as morevital and errors here will be magnified. This point out that the model must be accurate in this domain in order toget good torque estimation. The operating point 500rpm, 20% brake load, has a large error around 0 CAD andwas used to visualize this phenomenon. This can be viewed in figure 4.4. The wrongly estimated pressure at 0CAD completely disappear while the small error centered at 45 CAD is magnified.

−360 −180 0 180 360−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1fm500varv20procref

Pres

sure

torq

ue n

orm

aliz

ed to

1

CAD

Figure 4.4: Normalized pressure torque in cylinder 6 during one combustion cycle. The injection is centered on0 CAD. The red curve (bold) is the measured pressure from the test bench and the blue (dotted) is the simulatedpressure.

In figure 4.5 the pressure torques for different brake loads are shown. All four figures appear to be similar butremind that the torque in the 100% brake load is nearly 5 times as large as the one with 0% brake load; still theyhave very similar appearance. The major difference between the curves is the relation between the compressiontorque [ -180 - 0] CAD and the compression + combustion torque [0 - 180] CAD. Torque figures for the othermeasured operating points can be found in appendix B and look much like the one shown at 1500 rpm.

2In energy perspective it is good that the fuel is transformed into gas as quick as possible after that the cylinder reaches its top position.This way the energy output can be maximized. Two drawbacks are that quick rises in pressure makes unwanted noise, and also results in ahigh maximum pressure which puts heavy constraints on the manufacturing of the cylinders. The first drawback can be decreased by usinga pre-injection which smoothes the quick pressure rise reducing noise. The second can be avoided by controlling the injection speed and theinlet pressure.

Page 32: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

23 4.2. Result of the pressure model

−360 −180 0 180 360−1

−0.5

0

0.5

1fm1500varv0procref

Pres

sure

torqu

e norm

alize

d to 1

CAD−360 −180 0 180 360−1

−0.5

0

0.5

1

CAD

Pres

sure

torqu

e norm

alize

d to 1 fm1500varv20procref

−360 −180 0 180 360−1

−0.5

0

0.5

1fm1500varv50procref

Pres

sure

torqu

e norm

alize

d to 1

CAD−360 −180 0 180 360−1

−0.5

0

0.5

1fm1500varv100procref

Pres

sure

torqu

e norm

alize

d to 1

CAD

Figure 4.5: Normalized pressure torque in cylinder 6 during one combustion cycle. The injection is centered on0 CAD. The red curve (bold) is the measured pressure from the test bench and the blue (dotted) is the simulatedpressure.

Page 33: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 4. Simulation 24

4.2.1 Sensitivity analysis

To analyze the input variables for the pressure model a sensitivity analysis is done. One input is changed and theoutput is compared to the model with the reference inputs.

Start of combustion, θSOI

θSOI is the name of the variable when the ”start of injection” occurs. If θSOI transpire earlier/later thanestimated the combustion pressure will start to increase earlier/later. If the injection is moved from -5.2 CAD to-1 CAD the total work is decreased by 3%. This example is shown in figure 4.6.

−360 −180 0 180 360−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1fm1500varv100procref

Pressu

re tor

que no

rmaliz

ed to 1

CAD−360 −180 0 180 360

−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

Error

in norm

alized

pressu

re tor

que

CAD

Figure 4.6: L.F: The red curve (bold) is the reference simulated pressure torque and the blue (dotted) is thesimulated pressure torque with θSOI changed from -5.2 CAD to -1 CAD. R.F: This result in a maximum error of9.5% at 12 CAD which leads to that the total work done by the gas torque is decreased by 3%.

Inlet pressure, pinl

The inlet pressure, pinl, denotes the variable describing the inlet pressure. This variable is considered as aconstant during an engine cycle which holds if no substantial acceleration in the engine dynamics is done. Thisvariable describes the pressure that is going to be compressed. A figure with a 5% change in inlet pressure canbe seen in figure 4.7. The total work is not changed much since integrating the antisymmetric error would bezero3.

−360 −180 0 180 360−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1fm1500varv100procref

Pressu

re tor

que no

rmaliz

ed to 1

CAD−360 −180 0 180 360

−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

Error

in norm

alized

pressu

re tor

que

CAD

Figure 4.7: L.F: The red curve (bold) is the reference simulated pressure and the blue (dotted) is the simulatedpressure with pinl increased 5%. R.F: This result in a maximum absolute error of 2.2% at ±18 CAD. The workdone by the gas torque is increased by 0.1% due to more efficient combustion.

3Very little energy is lost due to friction by raising the inlet pressure. Higher inlet pressure leads to higher compression pressure whichmakes the combustion more efficient. This way the effect of the engine can be increased.

Page 34: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

25 4.2. Result of the pressure model

Injection duration, θinj

The injection duration, θinj , denotes the variable describing the duration of injection. By increasing theduration of the injection more fuel is injected which should result in higher torque. The reference simulation hasits injection duration increased by 5% which results in 4.5 more torque work. This is expected since more fuelmeans more energy. This example is shown in figure 4.8.

−360 −180 0 180 360−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1fm1500varv100procref

Pressu

re tor

que no

rmaliz

ed to 1

CAD−360 −180 0 180 360

−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

Error

in norm

alized

pressu

re tor

queCAD

Figure 4.8: L.F: The red curve (bold) is the reference simulated pressure and the blue (dotted) is the simulatedpressure with θinj increased 5%. R.F: This result in a maximum absolute error of 2.6% at 30 CAD. The workdone by the gas torque is increased by 4.5%.

fuel flow, vfuel

The fuel flow, vfuel, denotes the variable describing the injection fuel flow. By increasing the flow of theinjection more fuel is injected which should result in higher torque. The reference simulation has its injectionflow increased by 5% which is shown in figure 4.9. That the same amount of fuel is injected as in the θinj caseand the torque work is almost the same.

−360 −180 0 180 360−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1fm1500varv100procref

Pressu

re tor

que no

rmaliz

ed to 1

CAD−360 −180 0 180 360

−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

Error

in norm

alized

pressu

re tor

que

CAD

Figure 4.9: L.F: The red curve (bold) is the reference simulated pressure and the blue (dotted) is the simulatedpressure with vfuel increased 5%. R.F: This result in a maximum absolute error of 2.8% at 27 CAD. The workdone by the gas torque is increased by 4.8%.

Page 35: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 4. Simulation 26

4.3 Result of the mechanical modelThe simulated pressure torque was used as inputs to the mechanical model.

4.3.1 FrictionThe total friction is estimated according to equation (2.13) in the model chapter and can be seen in figure 4.10and 4.12. Both measured and simulated pressure torque is investigated. There seems to be some relation invelocity as higher velocities results in higher friction work.To further evaluate friction calculations the errors in the measurements has to be considered. The result of thepressure measurements and the pressure simulations indicated that both pressure curves had errors. This leadsto that the corresponding torque could be wrongly estimated. This hint to that the friction work estimation willbe incorrect. The brake load torque parameter is also an important factor. If the brake load torque parameter isestimated 5% incorrect in the operating point 1500 rpm 100% brake load, this result in that friction work ischanged from 330 joule to 1700 joule. The same result is derived when studying the pressure torque. In a worstcase situation both pressure and brake load sum up and results in bad friction estimation. A small measurementerror results in relatively large error in the estimation of the friction. This inaccuracy in the measurement resultslimits the result in finding a good friction model.

0 200 400 600 800 1000 1200 1400 1600 18000

500

1000

1500

2000

2500

3000

3500

4000Estimated frictionwork in different brakeload cases (measured pressure)

rpm

Fric

tion

wor

k [J

oule

]

0%20%50%100%

Figure 4.10: The friction work is estimated as Wfric

∫ θ+4π

θ0Tgdθ − 4π · Tload

0 200 400 600 800 1000 1200 1400 1600 18000

500

1000

1500

2000

2500

3000

3500

4000

4500

5000Estimated frictionwork in different brakeload cases (simulated pressure)

rpm

Fric

tion

wor

k [J

oule

]

0%20%50%100%

Figure 4.11:

Two different approaches are used to solve this dilemma. The first approach uses the measurements to estimatethe friction. By using equation (2.13) with a linear absolute friction in velocity, the friction can be set so that themeasured mean speed gets correct. The drawback is that the solutions only are valid near their operating points.

Page 36: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

27 4.3. Result of the mechanical model

The second approach is to minimize the error in friction data by trying to fit a function to data (see equation(2.14)) in for example a least square manor. This results in a model which can be run with optional choices ofgas pressure and brake load but will result in a slightly incorrect mean flywheel speed. Using the first approachas a reference the mean relative error over all operating points was 26% (13% wrong if removing the worstoperating point at 1500rpm 100% load). The friction in the worst case has a relative error of 184% which leadsto that the error in mean speed gets almost as large. The estimation of the absolute friction work with bothapproaches is shown in figure 4.12. If pressure data is simulated the mean error decreases somewhat which isimportant for non static simulations. This also indicates that the friction error might depend on errors in thepressure measurements.

−2500 −2000 −1500 −1000 −500 0 500−20

−15

−10

−5

0

5

10

15

20

25

30absolute frictionwork

Brake torgue

abso

lute

Fric

tion

wor

k

Figure 4.12: The ∗ are the estimated friction work according to the first approach and the ◦ are from the secondapproach. The second approach uses a function of nine terms where the most important are: θ,

√θ and θ2

4.3.2 Comparison between measured and simulated flywheel speedThe results of three different models are compared to the measured flywheel speed. The result of two speeds1000 rpm and 1500 rpm are shown in figure 4.13 and 4.14 and the rest can be found in appendix B along withharmonic analysis of the speed curves.

Model - The 9 node system explained in the model chapter.Model + brake - The 9 node system with a 1 node brake system attached.Reduced model + brake - A 3 node system (damper, crankshaft, flywheel) with a

1 node brake attached.

Page 37: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 4. Simulation 28

0 100 200 300 400 500 600 700 800990

995

1000

1005

1010fm1000varv0procref

CAD

RPM

0 100 200 300 400 500 600 700 800980

990

1000

1010fm1000varv20procref

CAD

RPM

0 100 200 300 400 500 600 700 800960

980

1000

1020fm1000varv50procref

CAD

RPM

0 100 200 300 400 500 600 700 800950

1000

1050fm1000varv100procref

CAD

RPM

Measured rpm

Model

Model+brake

Reduced model+brake

Figure 4.13: Three models are compared to measured flywheel speed. The three models gives similar results andall has problem following the measured speed at low brake loads.

0 100 200 300 400 500 600 700 8001490

1495

1500

1505

1510fm1500varv0procref

CAD

RPM

0 100 200 300 400 500 600 700 8001490

1495

1500

1505

1510fm1500varv20procref

CAD

RPM

0 100 200 300 400 500 600 700 8001480

1490

1500

1510

1520fm1500varv50procref

CAD

RPM

0 100 200 300 400 500 600 700 8001450

1500

1550fm1500varv100procref

CAD

RPM

Measured rpmModelModel+brakeReduced model+brake

Figure 4.14: Three models are compared to measured flywheel speed. The three models gives similar results andall has problem following the measured speed at low brake loads. 1500 is a resonance frequency from for the testbed engine.

Page 38: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

29 4.4. Simulating the inverted reduced model

4.4 Simulating the inverted reduced modelThe inverted reduced model (2.36) with only one node is used as a model to describe the pressure torque withflywheel position and speed as inputs. The result depend on how much the stiffness dynamics affects theflywheel speed. The result from two operating points can be seen in figure 4.15. The operating point at 1000rpm has a speed signal which is not affected much by the stiffness dynamics which makes the estimation moreaccurate. The operating point at 1500 rpm experience much of the stiffness dynamics and the estimation getsless accurate.

0 120 240 360 480 600 720

0

0.5

1

fm1000varv100procref

CAD

Nm

(Nor

mal

ized

)

0 120 240 360 480 600 720

970

980

990

1000

1010

1020

fm1000varv100procref

CAD

rpm

0 120 240 360 480 600 720

0

0.5

1

fm1500varv20procref

CAD

Nm

(Nor

mal

ized

)

0 120 240 360 480 600 720

1495

1500

1505

1510

1515fm1500varv20procref

CAD

rpm

Figure 4.15: The inverted reduced model describes the pressure torque. The left plots are from the operatingpoint 1000 rpm 100% load and the two to the right are from 1500 rpm 20% load. The top plots are pressuretorques where the blue (bold) is simulated, the red (dashdot) is a measured reference and the black (dotted) isthe compression pressure. The lower plots are the corresponding flywheel speed. The result of the estimationdepends on the flywheel speed signal.

Page 39: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 4. Simulation 30

4.5 Simulated error in injectionThe model is tested with simulated error in the injection and compared to the corresponding measurement. Onesimulation can be seen in figure 4.16 where 6% more fuel has been injected in cylinder 6.

0 200 400 600 800 1000 1200 1400950

960

970

980

990

1000

1010

1020

1030

CAD

RPM

measuredsimulated

Figure 4.16: An error in the injection duration (6% less in cylinder 6) is simulated and compared to the measuredflywheel measurement.

4.6 Result of the extended observerBoth observer models were tested and compared to measured data from the test bed. The extended observerseemed to estimate the gas torque better than the observer suggested in [3] since the lag effect could be reduced.The result of the extended observer can be seen in figure 4.17 for a case when 10% more fuel has been injectedin cylinder 4, 5 and 6. The observer indicates that the torque gets higher from the expected cylinders.Flywheel data from an engine was also tested on flywheel speed data from a truck. No torque could bemeasured so data from the test cell was used as a reference. The observer result for 1500 rpm 0% load is shownin figure 4.18.

Page 40: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

31 4.6. Result of the extended observer

2200 2400 2600 2800 3000 3200 3400 3600

156.5

157

157.5

158

0.07658420.6870480.986368

CAD

rad/

s

observed speedmeasured speed

2200 2400 2600 2800 3000 3200 3400 3600−2000

−1000

0

1000

2000

3000

CAD

Nm

x2x3measured pressure torque

Figure 4.17: The extended observer with more fuel injected in cylinder 4, 5 and 6. The cylinder fire sequence is1-5-3-6-2-4. The angle step is 6 CAD.

2200 2400 2600 2800 3000 3200 3400 3600156

156.5

157

157.5

158

158.5

0.03456490.6890140.986421

CAD

RP

M

observed speed

measured speed

2200 2400 2600 2800 3000 3200 3400 3600

−1500

−1000

−500

0

500

1000

1500

2000

2500

CAD

Nm

x2x3T2maxmeasured pressure torque

Figure 4.18: Flywheel speed data from a heavy duty truck. The angle step is 6 CAD.

Page 41: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 5

Conclusions

In this chapter the results of the previous chapters are discussed and conclusions are drawn. Conclusions of theobjectives of the thesis are also stated.

5.1 Discussion

5.1.1 Discussion of the pressure model

The errors in the pressure model were often very small. The largest errors occurred at the beginning of thecombustion. Except at the beginning of the combustion the curve was correct which is more important whencalculating the pressure torque.

5.1.2 Discussion of the full model

The simulated models lack accuracy in certain operating points. One important reason is probably due to thestiffness dynamics. Making small changes on the stiffness parameters may result in different solutionsdepending on the operating point. One example of this is the model with nine nodes plus one brake node whichclearly is erroneous at 500 rpm 20% brake load (see figure B.4). At the other operating points the same modelworks as well as the others.Another example of the stiffness dynamics is found at 1500 rpm. This is a resonance frequency for the enginewith the test bed setup. Here can not only the large contribution in the normal third engine order be found, butalso a large contribution from the half and first engine order can be found, (also see [11]). The half and firstengine order should not be there according to the model and might be explained as part of the stiffnessdynamics in the engine with the test bed setup. All models lacks this dynamics at 1500 rpm but it will mostlikely be found at other velocities. Since the model was not tested on a truck no conclusions can be drawn there.Much time was spent on optimizing the friction model but the result was poor. The conclusions is thatmeasurements have to be done more accurately and in more operating points to get a better result. The torquedue to self oscillation should also be measured. The damper wheel parameters are also difficult to estimate andare frequency dependent.The model works satisfying if the objective is to test control algorithms. A drawback is that the current time tosolve the model equations is rather long. A reduced model would perhaps be enough if the goal is to verify anobserver or a control algorithm. The model was found to work satisfying at describing errors in the injection.The effect is that control algorithms may be tested to stabilize the model and hopefully also the real engine.

5.1.3 Discussion of inverting the model

The full model (without drive line) has 18 states which only two can be measured. It is impossible to invert thefull model to get cylinder pressure without simplifications. On the other hand a model with more nodes does notdo much better than a reduced model which was shown in the model simulations. The non stiffness dynamicwhich the larger models try to include is difficult to model correctly. The simple solution is to consider thewhole model as stiff which makes it easy to estimate the pressure torque. The drawback with this model is that

32

Page 42: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

33 5.2. Conclusions of the objectives

the stiffness dynamics results in very bad estimation when the engine dynamics starts to self-oscillate at certainspeeds.

5.1.4 Discussion of the observerIf an engine with five cylinders has 20% more fuel in one cylinder the total torque will increase only 20/5=4%.If an engine with eight cylinders has 20% more fuel in one cylinder the total torque will increase only20/8=2.5%. This results in that the engine with more cylinders will have smaller variation on the total torquewhich makes an error harder to find. If a cylinder gets 20% more fuel than expected the emissions will changeas well. If the cylinder always gets too much fuel it will also be worn out faster. This is not good and should becompensated.The extended observer seems to estimate the gas torque fairly acceptable in the measured operating points andwithout lag effects. Tested errors in the injection of (6% error) could be found by the observer. The stiffnessdynamic is still a problem which may cause trouble. The result deteriorate when the the non stiffness torque waslarge. A more advanced observer strategy than pole placement will probably do better result.

5.2 Conclusions of the objectivesThe objectives were

1. Constructing a time dissolved model which can calculate the flywheel speed based on the fuel injectiondata.

2. Investigating the possibilities of simplifying the model to be able to invert it and thus being able tocalculate the torque of the individual cylinders based on flywheel speed.

The first objective was completed. The options are to simulate the model with either measured cylinder pressureor fuel injection data. Drive line models can also be included. The model catches the behavior of the flywheelspeed in most operating points but lacks some of the dynamic at the test bed resonances. The model should besufficient to evaluate new control and observer algorithms.

In some operating points the model lacked parts of the dynamics compared to the test bed measurements. Thereseems to be no point in inverting a model which is not valid in certain operating points. The full model has 18nodes which only two are measurable. A reduced model where the 18 nodes are put together to one makesalmost as good result in catching the main behavior. In this reduced model it is easy to estimate the torque fromeach cylinder with few calculations. Just divide the speed signal into intervals and match it with the cylinderignition sequence.This one-node model was tested with an observer which managed to observe the indicated torque well enoughto notice small injection errors.

Page 43: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Chapter 6

Future Work

A user’s manual will be written about the simulation program in Matlab.Measurements on a heavy duty truck with the clutch down are planed to verify if the model works better there.If it works satisfying a model of the trucks drive line may be connected and simulated and compared.The observer models will be more investigated with different feedback designs to try to make them better. Thehope is that the observer can estimate the pressure torque well enough to be used for on board diagnostics andfor controlling the injections. Perhaps more measured signals can be used in the observer model. The cylinderinlet pressure for example has much information of the size of the compression torque which may be used. Thiswill be more investigated.Perhaps making a model working in the frequency domain would be something to investigate. One advantagewill be faster calculations.

34

Page 44: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

References

[1] Engine parameters used in the model was received from Johan Lundqvist, Scania, department NMKA

[2] Automotive Handbook . Bosch, 2000.30.09, 5th edition

[3] J. Chauvin, G. Corde, P Moulin, M, Castagne, N. Petit, P. Rouchon, Time-varying linear observer fortorque balancing on a DI engine. centre Automatique et Systemes,Ecole des Mines de Paris and InsitutFrancais du Petrole, France

[4] J. Chauvin, G. Corde, P Moulin, M, Castagne, N. Petit, P. Rouchon, Real-time combustion torqueestimation on a diesel engine test bench using time-varying kalman filtering. in Proc. of 43rd IEEEConference on Decision and Control, 2004, Paradise Island, Bahamas. dec

[5] F. Chmela, G. Orthaber, W. Schuster, Die vorausberechnung des brennverlaufs von dieselmotoren mitdirekter einspritzung der basis des einsspritzverlauf. MTZ, Motortechnische Zeitschrift 59 (1998) 7/4

[6] F. Chmela, G. Orthaber, Rate of heat release predictions for direct injection diesel engines based on purelymixing controlled combustion. SAE paper 1999-01-0186. (1999)

[7] F. Chmela, G. Orthaber, M. Engelmayer, Integrale induziertechnik am DI-dieselmotor zur vertiefenverbrennungsanalyse und als simulationsbasis. 4 internationales symposium fur verbrennungsdiagnostik.(2000)

[8] M. Hellstrom, Engine speed based estimation of the indicated engine torque. Department of Vehicularsystems, Linkopings Universitet, 2005. Master’s thesis LiTH-ISY-EX-3569-2005,Linkoping, Sweden,January.

[9] J.B. Heywood, Internal Combustion Engine Fundamentals. McGraw-Hill International Editions, 1988.ISBN 0-07-100499-8, Singapore, international edition.

[10] R. Johnsson Indirect measurements for control and diagnostics of IC engines. Department of human worksciences, division of sound and vibrations, Lulea University of technology, 2004, doctorial thesis, LuleaUniversity, Sweden, 04

[11] E Jorpes, Berakning av torsionsfenomen i ny motorprovcell. NMBP,2002/1, M22/053

[12] E Jorpes, Berakningsrapport torsionssimulering av DL. NMBP,2001/5, M22/049

[13] M. Nilsson, Modeling Flywheel-Speed Variations Based On Cylinder Pressure. Department of Vehicularsystems, Linkopings Universitet, 2004. Master’s thesis LiTH-ISY-EX-3584-2004,Linkoping, Sweden,March.

[14] T. Petterson, Torsionsanalys av vevaxeln, kamaxeln och motortranmissioen pa Scanias D12:a.Department of solid mechanics, Lulea university of technology, 2001. Master’s thesis LTU-EX–01/341–SE,Lulea, Sweden.

[15] A.S. Rangwala, Reciprocating Machinery dynamics, Design and Analysis. Marcel Dekker, Inc., 2001.

[16] K-E Rydberg, Matematiska verkningsgradsmodeller for fasta och variabla hydralmaskiner. Departmentof hydraulics, Linkopings Universitet , 1980. LiTH-IKP-S-171, Linkoping, Sweden, august.

[17] S. Schagerberg, Torque Sensors for Engine Applications. Department of signals and systems, School ofElectrical Engineering, Chalmers University of technology, 2003. Licentiate thesis NO 472L,Goteborg,Sweden.

35

Page 45: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Appendix A

Derivation of the connecting rodkinematics

This derivation of the connecting rod kinematics is a copy of the derivation done by Schagerberg [17] butseveral similar derivations can be found.

phi

theta

r+l

s

A

l

B

r

Figure A.1: The connecting rod mechanism

The point A in figure A.1 may be described by the complex number

ζA = rejθ + le−jφ, (A.1)

where the minus sign of the argument of the second term comes from the definition of the angle directions. Therelation between θ and φ is via the piston pin offset1, defining the equation

yoffs = Im{ζA}, (A.2)

with the solution for sinφ

yoffs = rsinθ − lsinφ ⇔sinφ =

rsinθ − yoffs

l. (A.3)

For the derivation of indicated and mass torques the first and second derivative of the piston displacement,s = xmax − Re{ζA}, see figure A.1, w.r.t θ are needed. Start by finding the derivative

∂ζA

∂θ= jrejθ − jle−jφ ∂φ

∂θ, (A.4)

1The piston pin may be offset slightly to reduce piston slap, i.e. slamming the cylinder bore. Typically, the piston pin offset as defined byfigure A.1 is negative. For crankshaft torsional vibrations, the piston pin offset may very well be neglected.

36

Page 46: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

37

and the second derivative

∂2ζA

∂θ2=

∂θ

(jrejθ − jle−jφ ∂φ

∂θ

)=

= −rejθ − le−jφ(∂φ

∂θ

)2

− jle−jφ ∂2φ

∂θ2. (A.5)

The derivative ∂φ∂θ in (A.4) and (A.5) is found by taking the derivative of (A.3) w.r.t θ

cosφ∂φ

∂θ=

r

lcosθ ⇒

∂φ

∂θ=

rcosθ

lcosφ=

rcosθ

l

√1 −

(rsinθ−yofffs

l

)2, (A.6)

where cosφ was expressed using the trigonometric unity

cosφ =√

1 − (sinφ)2√

1 −(rsinθ − yoffs

l

)2

. (A.7)

The second derivative of φ w.r.t θ in (A.5) is

∂2φ

∂θ2

∂θ

(rcosθ

lcosφ

)=

rcosθsinφ

lcos2φ· ∂φ

∂θ− rsinθ

lcosφ. (A.8)

The crank lever, i.e. the derivative of s w.r.t θ, is found by combining the real part of (A.4), (A.3) and (A.6)

∂s

∂θ=

∂θ(xmax − Re{ζA}) = −Re

{∂ζA

∂θ

}= (A.9)

= rsinθ + lsinφ · ∂φ

∂θrsinθ +

rcosθ(rsinθ − yoffs)

l

√1 −

(rsinθ−yoffs

l

)2, (A.10)

where the second equality follow since derivation is linear operation and xmax is a constant. For the secondderivative of s, take the real part of (A.5)

∂2s

∂θ2=

∂2

∂θ2(xmax − Re{ζA}) = −Re

{∂2ζA

∂θ2

}= (A.11)

= rcosθ + lcosφ ·(∂φ

∂θ

)2

+ lsinφ∂2φ

∂θ2, (A.12)

where insertion of equation (A.7), (A.6), (A.3) and (A.8) will yield the full expression.———————————————————————-

Page 47: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Appendix A. Derivation of the connecting rod kinematics 38

−400 −300 −200 −100 0 100 200 300 400−0.1

−0.08

−0.06

−0.04

−0.02

0

0.02

0.04

0.06

0.08

0.1

Figure A.2: ∂s(θ)∂θ over a engine cycle. The combustion is assumed to take place at approximately 0 CAD.

Page 48: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Appendix B

Simulation figures

−90 0 900

0.2

0.4

0.6

0.8

1fm1800varv0procref

Pres

sure

norm

alize

d to 1

CAD−180 −90 0 90 180

0

0.2

0.4

0.6

0.8

1fm1800varv20procref

Pres

sure

norm

alize

d to 1

CAD

−180 −90 0 90 1800

0.2

0.4

0.6

0.8

1fm1800varv50procref

Pres

sure

norm

alize

d to 1

CAD−180 −90 0 90 180

0

0.2

0.4

0.6

0.8

1fm1800varv100procref

Pres

sure

norm

alize

d to 1

CAD

Figure B.1: Normalized pressure in cylinder 6 during one combustion cycle. The injection is centered on 0 CAD.The red curve (bold) is the measured pressure from the test bench, the blue (dotted) is the simulated pressure andthe green (dashed) is the simulated pressure due to compression.

39

Page 49: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Appendix B. Simulation figures 40

−360 −180 0 180 360−1

−0.5

0

0.5

1fm1000varv0procref

Pressu

re tor

que no

rmaliz

ed to 1

CAD−360 −180 0 180 360−1

−0.5

0

0.5

1fm1000varv20procref

Pressu

re tor

que no

rmaliz

ed to 1

CAD

−360 −180 0 180 360−1

−0.5

0

0.5

1fm1000varv50procref

Pressu

re tor

que no

rmaliz

ed to 1

CAD−360 −180 0 180 360−1

−0.5

0

0.5

1fm1000varv100procref

Pressu

re tor

que no

rmaliz

ed to 1

CAD

Figure B.2: Normalized pressure torque in cylinder 6 during one combustion cycle. The injection is centered on0 CAD. The red curve (bold) is the measured pressure from the test bench and the blue (dotted) is the simulatedpressure.

−360 −180 0 180 360−1

−0.5

0

0.5

1fm1800varv0procref

Pressu

re tor

que no

rmaliz

ed to 1

CAD−360 −180 0 180 360−1

−0.5

0

0.5

1fm1800varv20procref

Pressu

re tor

que no

rmaliz

ed to 1

CAD

−360 −180 0 180 360−1

−0.5

0

0.5

1fm1800varv50procref

Pressu

re tor

que no

rmaliz

ed to 1

CAD−360 −180 0 180 360−1

−0.5

0

0.5

1fm1800varv100procref

Pressu

re tor

que no

rmaliz

ed to 1

CAD

Figure B.3: Normalized pressure torque in cylinder 6 during one combustion cycle. The injection is centered on0 CAD. The red curve (bold) is the measured pressure from the test bench and the blue (dotted) is the simulatedpressure.

Page 50: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

41

0 100 200 300 400 500 600 700 800450

460

470

480

490

500

510

520

530

540

550fm500varv20procref Measured rpm

ModelModel+brakeReduced model+brake

Figure B.4:

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−90

0

90

180

Engine order

phas

e (d

eg)

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.50

50

100

150fm500varv20procref

Engine order

Spee

d (rp

m)

Measured rpmModelModel+brakeReduced model+brake

Figure B.5: Harmonic analysis of the simulations at 500 rpm

Page 51: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Appendix B. Simulation figures 42

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−900

90180

Engine order

phas

e (d

eg) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

0

10

20Harmonic analysis

Engine order

Spee

d (rp

m)

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−900

90180

Engine order

phas

e (d

eg) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

0

20

40Harmonic analysis

Engine order

Spee

d (rp

m)

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−900

90180

Engine order

phas

e (d

eg) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

0

50

100Harmonic analysis

Engine order

Spee

d (rp

m)

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−900

90180

Engine order

phas

e (d

eg) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

0

100

200Harmonic analysis

Engine order

Spee

d (rp

m)

Measured rpm

Model

Model+brake

Reduced model+brake

Figure B.6: Harmonic analysis of the simulations at 1000 rpm

Page 52: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

43

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−900

90180

Engine order

phas

e (d

eg) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

0

10

20Harmonic analysis

Engine order

Spee

d (rp

m)

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−900

90180

Engine order

phas

e (d

eg) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

0

10

20Harmonic analysis

Engine order

Spee

d (rp

m)

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−900

90180

Engine order

phas

e (d

eg) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

0

20

40Harmonic analysis

Engine order

Spee

d (rp

m)

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−900

90180

Engine order

phas

e (d

eg) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

0

50

100Harmonic analysis

Engine order

Spee

d (rp

m)

Measured rpm

Model

Model+brake

Reduced model+brake

Figure B.7: Harmonic analysis of the simulations at 1500 rpm

Page 53: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

Appendix B. Simulation figures 44

0 100 200 300 400 500 600 700 8001780

1790

1800

1810fm1800varv0procref

CAD

RPM

0 100 200 300 400 500 600 700 8001790

1800

1810

1820fm1800varv20procref

CAD

RPM

0 100 200 300 400 500 600 700 8001780

1790

1800

1810

1820fm1800varv50procref

CAD

RPM

0 100 200 300 400 500 600 700 8001750

1800

1850fm1800varv100procref

CAD

RPM

Measured rpm

Model

Model+brake

Reduced model+brake

Figure B.8:

Page 54: Dynamic Model of a Diesel Engine for Diagnosis and Balancing576423/FULLTEXT01.pdfModel simplifications to reduce calculation time are suggested. Observers which are based on a simplified

45

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−900

90180

Engine order

phas

e (d

eg) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

0

20

40Harmonic analysis

Engine order

Spee

d (rp

m)

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−900

90180

Engine order

phas

e (d

eg) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

0

10

20Harmonic analysis

Engine order

Spee

d (rp

m)

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−900

90180

Engine order

phas

e (d

eg) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

0

10

20Harmonic analysis

Engine order

Spee

d (rp

m)

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5−180

−900

90180

Engine order

phas

e (d

eg) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

0

50

100Harmonic analysis

Engine order

Spee

d (rp

m)

Measured rpmModelModel+brakeReduced model+brake

Figure B.9: Harmonic analysis of the simulations at 1800 rpm