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
Abstract
To monitor and control the combustion in a diesel engine one can study the speed signal from the flywheel. The idea is that if individual cylinders give different amount of torque this will lead to variations in the flywheel speed. A model which describes the cylinder torque based on flywheel speed can be used to estimate the torque from individual cylinders. With this new knowledge of the individual performance of each cylinder the engine can be balanced. The balancing aim at making the speed of the flywheel more even but also required a model with estimated cylinder torque as input. This model may also be used for testing new control algorithms easily and 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 nodes containing mass, stiffness and friction. The inputs into the model are injection data from the engine management system (EMS) and a torque from a drive line. Ways to reduce the complexity of the model are investigated in order to invert the model to estimate the injection data based on flywheel speed measurements. Measurements are 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 model works almost as well but of course looses more of the non stiffness behavior. As expected, the model equations can not be solved in real time. The result of the inverted reduced model depends on the flywheel signal. When the signal contains little non stiffness behavior the result is good. An observer model based on the reduced model is suggested and tested in order 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 Preface
This 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, Sodert¨ alje¨ under supervision of Anna Pernestal˚ and Henrik Pettersson.
Thesis outline Chapter 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, Sodert¨ alje.¨ 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.
Acknowledgment I would like to thank my supervisors’ student Anna Pernestal˚ and Henrik Pettersson at Scania. Anna and Henrik have throughout the project given me support and contributed with valuable knowledge, which has been greatly appreciated. I’m thankful for the assistance given in the test bed environment. I also would like to give my recognition to Andreas Renberg who contributed with the pressure modeling and Anders Floren´ who supported in the optimization process. I give my general appreciation to all people at Scania who assisted me at my work during my stay in Sodert¨ alje.¨ A special thanks to my examiner professor Bo Wahlberg at KTH and people at NEE, for giving up time to answer questions related to my work. Finally I would like to thank my family for your constant love and support. iv Contents
Abstract ii
Preface and Acknowledgment iii
Notation & Glossary vii
1 Background & Objectives 1 1.1 Background ...... 1 1.2 Thesis objectives ...... 1
2 The Model 2 2.1 Engine introduction ...... 2 2.2 Modeling pressure in one cylinder ...... 3 2.2.1 The combustion cycle ...... 3 2.2.2 Derivation of the engine pressure ...... 5 2.2.3 Derivation of combustion pressure ...... 5 2.3 Modeling the engine dynamics...... 5 2.3.1 Derivation of the gas torque ...... 5 2.3.2 Torque due to motion of the connecting rod and the piston ...... 6 2.3.3 Modeling the crankshaft torque ...... 6 2.3.4 Friction related to the cylinder system ...... 7 2.4 The complete model ...... 8 2.4.1 The torque balancing equation ...... 8 2.4.2 Time domain state space model ...... 9 2.4.3 Adding a drive line ...... 10 2.5 Model simplifications ...... 11 2.5.1 Reduce order ...... 11 2.5.2 Simplification in the mass torque ...... 11 2.6 Observers ...... 11 2.6.1 Pressure torque observer model ...... 11 2.6.2 Extended observer model ...... 12 2.7 Model error ...... 13 2.7.1 Dynamic analysis ...... 13
3 Measurement 15 3.1 Measurement setup ...... 15 3.1.1 Measuring flywheel speed ...... 16 3.1.2 Measuring pressure ...... 16 3.1.3 Measuring other variables ...... 17
4 Simulation 19 4.1 Matlab ...... 19 4.2 Result of the pressure model ...... 20 4.2.1 Sensitivity analysis ...... 24 4.3 Result of the mechanical model ...... 26
v 4.3.1 Friction ...... 26 4.3.2 Comparison between measured and simulated flywheel speed ...... 27 4.4 Simulating the inverted reduced model ...... 29 4.5 Simulated error in injection ...... 30 4.6 Result of the extended observer ...... 30
5 Conclusions 32 5.1 Discussion ...... 32 5.1.1 Discussion of the pressure model ...... 32 5.1.2 Discussion of the full model ...... 32 5.1.3 Discussion of inverting the model ...... 32 5.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 Notation & Glossary
Symbols used in the thesis report.
Variables and parameters
Nms c absolute damping [ rad ] 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] Nms s relative damping [ rad ] mg vfuel fuel flow [ CAD ]
2 Ap cylinder Area [m ] J moment of inertia matrix [kgm2] J R universal gas constant [ mol·K ] S piston node position matrix T temperature [K] Tg gas torque [Nm] Tload brake load torque [Nm] Tm engine kinetics torque [Nm] Tfric friction torque [Nm] V cylinder volume [m3]
mg δ fuel/stoke [ stroke ] θ crankshaft angle [CAD] ˙ CAD θ angular velocity [ s ] ¨ CAD θ angular acceleration [ 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 functions
gi geometrical function Gi matrix geometrical function
vii Glossary CAD Crank angle degree EMS Engine management system EVO Exhaust valve closing IVO Inlet valve closing OBD On board diagnostics SOI Start of injection Chapter 1
Background & Objectives
1.1 Background
There are laws on emissions and how much noise a heavy duty truck may do. The drivers of heavy duty truck want an engine which offers both reduced fuel consumption and comfort. To full fill these laws, and demands a better understanding of the engines is required.
In the diesel engine, fuel is electronically injected into the cylinders at a desired angle. The fuel combusts and 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 the flywheel. The flywheel speed oscillates and its behavior depends on several factors where the cyclic torque from the cylinders is considerate. By changing the injection on individual cylinders, the behavior of the flywheel speed oscillation alters. This makes it possible to balance the engine by controlling the electronic injection with feedback from the speed signal. Thus small injection errors in individual cylinders can be corrected as well as unwanted 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 the injectors 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 objectives
As 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 knowledge may 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 injection data.
2. Investigating the possibilities of simplifying the model to be able to invert it and thus being able to calculate the 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 order orders are those which are most unwanted since they feel unpleasant.
1 Chapter 2
The Model
In this chapter a model describing the cylinder pressure-, crankshaft-, flywheel- and damper dynamics with inputs from 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 used in 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 simplified model 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 introduction
The main parts in an engine are cylinders, crankshaft, flywheel, damper and the connecting rods which can all be seen the figure above. The combustion takes part inside the cylinders forces the crankshaft to rotate via the connecting rods which connects them. Since the torque from the cylinders oscillates a damper wheel is connected to the crankshaft to dampen the speed fluctuations. The flywheel is connected on the other side of the crankshaft relative to the damper. It is a wheel which has a high moment of inertia in order to smooth the torque which is going to be passed on to the drive line.
2 3 2.2. Modeling pressure in one cylinder
2.2 Modeling pressure in one cylinder
The chemical reaction when transforming fuel and oxygen into carbon dioxide and water provides energy to the engine. This takes part inside the cylinders. Heavy duty trucks usually have 4, 5, 6 or 8 cylinders which delivers a steady amount of power. In this section the combustion cycle is described and equations for modeling the pressure inside the cylinder are suggested.
2.2.1 The combustion cycle The combustion cycle takes part inside the cylinders and can in a four-stroke diesel engine be divided into four phases: intake, compression, expansion and exhaust, see figure 2.2. The phases are controlled mechanically by the camshaft which controls the inlet- and the outlet valve. The fuel injection is done electronically and can be controlled 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 the movement of the piston and pushed by the turbo. The pressure in the cylinder is approximately equal to the turbo pressure. Compression During the compression both valves are closed and the piston is moving upward which compresses 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 the high temperature and pressure from the compression. The piston is starting to move downwards and is pushed by the extra pressure which forces the piston to accelerate further. The phase is called expansion since the cylinder volume is expanding. Exhaust At the bottom piston position the outlet valve is opened and the burned gases exit the cylinder during the exhaust phase.
To start the chemical reaction between fuel and oxygen, a gasoline engine (Otto engine) uses a spark, and a diesel engine uses high temperature and pressure which result in a spontaneous ignition. A key number defining the engine is the compression ratio. The compression ratio is defined as the relation between minimum cylinder volume and the present cylinder volume. The compression ratio determines how much the air inside the cylinder 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 turbo compresses the air to two bar compared to one bar the compression pressure in the cylinder will approximately double up which will shorten the combustion time. This is a very fuel efficient way to gain more power from the 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 exhaust phase. More information can be found in [2]. To summarize the pressure during all phases the pressure in a cylinder 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 camshaft valves and pcomb(θ) is the resulting pressure due to combustion. When valves are opened pengine(θ) is approximately 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 engine pressure 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 35 bar) is when the piston is at it’s top position. Then the pressure drops when the piston moves downward during the 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 valves close and the air starts to be compressed as the volume decreases. Finally fuel is injected when the volume is at its minimum and pressure is rapidly increased. The plot is taken from [9]. 5 2.3. Modeling the engine dynamics.
2.2.2 Derivation of the engine pressure pengine(θ) is denoted by the pressure due to the engine kinetics controlled by the camshaft valves. A simple way 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 the cylinder, k is the Boltzmann constant and T (θ) the temperature. Since no external heat or energy is considered to be brought to the cylinder system an adiabatic equation should be used. The cylinder volume can be described as V (θ)=Aps(θ). (2.3)
Here Ap is the combustion chamber area and s(θ) is the piston position. When the valves are open the pressure pengine(θ) is approximately equal to the inlet pressure pinl from the turbo. When both valves are closed, at inlet valve closing (IV C), the amount of particles N(θ) is constant which makes the pressure and the temperature increase as the volume is decreasing. Since the combustion chamber is not perfectly isolated one can assume that some pressure is lost because of leakage of gas molecules and of loss of heat, hloss(θ, θIV C). It can be approximated 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 closed pengine(θ) ≈ pinl. (2.4) When both valves are closed and air is compressed
h (θ, θ )N(θ )kT(θ) p (θ)= loss IV C IV C (2.5) engine V (θ)
pinlV (θIV C) N(θIV C)= . (2.6) RT (θIV C)
2.2.3 Derivation of combustion pressure
The start of injection angle (θSOI) is the crank angle degree (CAD) where the diesel starts to be injected into the combustion chamber. This occurs approximately when the piston is at its top position in the beginning of the expansion phase. There is a short delay until the diesel fully starts to combust into gas. The combustion pressure can be expressed as ˙ pcomb(θ)f(θinj,vfuel,θSOI, θ, T, pengine(θ)), (2.7)
[ ] mg ˙ where θinj is the injection duration CAD , vfuel the fuel flow [ CAD ], θ is the speed of the flywheel, T is the temperature [K] and pengine the pressure that arise from the compression. The combustion pressure equation pcomb(θ) is solved in two steps. The first step is to transform the fuel flow into a ”heat release”. The equations involved in that part can be found in articles [5], [6] and [7]. The second step is to transform the heat release to pressure. 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 one cylinder is also derived and explained.
2.3.1 Derivation of the gas torque To compute the force working along the cylinder axis the piston area is multiplied with the relative cylinder pressure, pg(θ). The relative pressure is the difference in pressure inside and outside the cylinder. The resulting gas torque is then described as ds ds T (θ)=F = p (θ)A (2.8) g g dθ g p dθ Chapter 2. The Model 6
where pg is pg(θ)=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 piston The connecting rod connects the piston to the crankshaft and transfers torque. The piston is moving up and down along the cylinder axis while the crankshaft is rotating. This leads to that the connecting rod undergoes both a translational- (from the piston movement) and a rotational movement (from the crankshaft). This movement of mass of the connecting rod and the piston results in a torque. To simplify torque calculations the connecting rod is divided into two point masses, mA and mB. mA represent the mass of the piston plus the oscillating mass of the connecting rod. mB is the part of the connecting rod which undergoes a rotational motion. See figure 2.5.
s
A
l r+l
phi
B theta
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. 1 ˙ The kinetic energy is the calculated as 2 J(θ)θ. The derivation of the mass torque can be done as