air/fuel ratio control of an si-engine under normal operation conditions19780/fulltext01.pdf ·...

77
Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions Master thesis performed in Automatic Control by Anna Ros´ en Reg nr: LiTH-ISY-EX-3594-2004 Link¨ oping, 17th August 2004

Upload: others

Post on 14-Mar-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Air/Fuel Ratio Control of an SI-EngineUnder Normal Operation Conditions

Master thesisperformed inAutomatic Control

byAnna Rosen

Reg nr: LiTH-ISY-EX-3594-2004

Linkoping, 17th August 2004

Page 2: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions
Page 3: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Air/Fuel Ratio Control of an SI-EngineUnder Normal Operation Conditions

Master thesis

performed at theDivision of Automatic Control and Communication Systems,

Dept. of Electrical EngineeringatLink opings universitet

by Anna Rosen

Reg nr: LiTH-ISY-EX-3594-2004

Supervisors:Professor Graham GoodwinUniversity of Newcastle

James WelshUniversity of Newcastle

David TornqvistLinkopings Universitet

Examiner: Professor Lennart LjungLinkopings Universitet

Linkoping, 17th August 2004

Page 4: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions
Page 5: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Avdelning, InstitutionDivision, Department

DatumDate

Sprak

Language

� Svenska/Swedish

� Engelska/English

RapporttypReport category

� Licentiatavhandling

� Examensarbete

� C-uppsats

� D-uppsats

� Ovrig rapport

URL f or elektronisk version

ISBN

ISRN

Serietitel och serienummerTitle of series, numbering

ISSN

Titel

Title

ForfattareAuthor

SammanfattningAbstract

NyckelordKeywords

Emission from cars today is one of the biggest environmental issues, hencestringent government standards have been introduced to decrease emission. Carcompanies do not only have to satisfy government standards, but also meet con-sumer demands on increased fuel economy and good drivablility. This reportwill introduce controllers designed to control the air/fuel ratio in an SI engine.The engine model used is simplified. The engine components modelled includethe inlet manifold, fuel dynamics, combustion and exhaust sensor.

Nonlinearities and delays are inherent in the engine dynamics and as such aSmith Predictor is utilised as the basis for controller structure to compensate forthe delays. Here the Smith Predictor is combined with feedforwarding of themass air charge, which is estimated from both the inlet and combustion models.Therefore different ways of merging the estimates are also explored.

A real engine was not accesible, thus simulators were implemented usingdata sets provided by General Motors. Model errors were introduced to test thecontrollers performance. The proposed methods should be tested on a real en-gine to ensure that this is a viable approach, as the simulations show it maybepromising to use in practice.

Control and Communication,Dept. of Electrical Engineering581 83 Linkoping

17th August 2004

LITH-ISY-EX-3594-2004

http://www.ep.liu.se/exjobb/isy/2004/3594/

Air/Fuel Ratio Control of an SI-EngineUnder Normal Operation Conditions

Luft/bransle reglering pa en SI-motor under normal kor forhallanden

Anna Rosen

××

SI-engine, lambda-control, Smith Predictor, signal fusion

Page 6: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions
Page 7: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Abstract

Emission from cars today is one of the biggest environmental issues, hencestringent government standards have been introduced to decrease emission.Car companies do not only have to satisfy government standards, but alsomeet consumer demands on increased fuel economy and good drivablility.This report will introduce controllers designed to control the air/fuel ratio inan SI engine. The engine model used is simplified. The engine componentsmodelled include the inlet manifold, fuel dynamics, combustion and exhaustsensor.

Nonlinearities and delays are inherent in the engine dynamics and as sucha Smith Predictor is utilised as the basis for controller structure to compensatefor the delays. Here the Smith Predictor is combined with feedforwarding ofthe mass air charge, which is estimated from both the inlet and combustionmodels. Therefore different ways of merging the estimates are also explored.

A real engine was not accesible, thus simulators were implemented usingdata sets provided by General Motors. Model errors were introduced to testthe controllers performance. The proposed methods should be tested on areal engine to ensure that this is a viable approach, as the simulations show itmaybe promising to use in practice.

Keywords: SI-engine, lambda-control, Smith Predictor, signal fusion

v

Page 8: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Acknowledgment

First I would like to thank Graham Goodwin for making it possible for meto come to the wonderful country Australia and do my master thesis projectat the University of Newcastle. Also for being so kind and helpful. I wouldalso like to thank James Welsh for all good advise and for careful proof read-ing. Further, David Tornqvist and my opponent Johan Bernspang for valuablefeedback on this report and for proof reading. Lennart Ljung for being myexaminer. I also want to thank my family for their support and love. Finally,Henrik Tidefelt for interesting discussions and ideas, helping me with LaTexand my computer, and beliving in me.

vi

Page 9: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Contents

1 Introduction 11.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.4 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.5 Previous Work . . . . . . . . . . . . . . . . . . . . . . . . . 31.6 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 The Engine 52.1 Introduction to SI Internal Combustion Engine . . . . . . . . 52.2 Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.2.1 Inlet Manifold . . . . . . . . . . . . . . . . . . . . 72.2.2 Fuel Injection . . . . . . . . . . . . . . . . . . . . . 82.2.3 Combustion . . . . . . . . . . . . . . . . . . . . . . 82.2.4 Exhaust Sensor . . . . . . . . . . . . . . . . . . . . 9

2.3 Transformation . . . . . . . . . . . . . . . . . . . . . . . . 92.4 Simulators . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3 The Controller 113.1 Basic Model . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 The Smith Predictor . . . . . . . . . . . . . . . . . . . . . .123.3 The Architecture . . . . . . . . . . . . . . . . . . . . . . . 123.4 Estimation of Output Disturbance . . . . . . . . . . . . . .133.5 Feedforward Component . . . . . . . . . . . . . . . . . . .143.6 Final Control Structure . . . . . . . . . . . . . . . . . . . .143.7 PI-Controller . . . . . . . . . . . . . . . . . . . . . . . . . 163.8 Implementation . . . . . . . . . . . . . . . . . . . . . . . . 183.9 Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

4 Simulations 194.1 Heuristic Filter . . . . . . . . . . . . . . . . . . . . . . . . 19

4.1.1 Results . . . . . . . . . . . . . . . . . . . . . . . . 204.1.2 Discussion . . . . . . . . . . . . . . . . . . . . . . 24

vii

Page 10: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.2 No Torque Measurement . . . . . . . . . . . . . . . . . . .244.2.1 Discussion . . . . . . . . . . . . . . . . . . . . . . 27

4.3 Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . 274.3.1 Results . . . . . . . . . . . . . . . . . . . . . . . . 294.3.2 Discussion . . . . . . . . . . . . . . . . . . . . . . 32

4.4 Error Variance Estimation . . . . . . . . . . . . . . . . . . .324.4.1 Results . . . . . . . . . . . . . . . . . . . . . . . . 344.4.2 Discussion . . . . . . . . . . . . . . . . . . . . . . 37

4.5 Factor Error Controller . . . . . . . . . . . . . . . . . . . . 374.5.1 Results . . . . . . . . . . . . . . . . . . . . . . . . 384.5.2 Discussion . . . . . . . . . . . . . . . . . . . . . . 42

4.6 More Sophisticated Controller . . . . . . . . . . . . . . . .424.6.1 Results . . . . . . . . . . . . . . . . . . . . . . . . 434.6.2 Discussion . . . . . . . . . . . . . . . . . . . . . . 46

5 Conclusions 475.1 Futher work . . . . . . . . . . . . . . . . . . . . . . . . . . 47

References 49

Notation 51

A RLS algorithm 53

B Design parameter R 54

C Results 55C.1 Heuristic Filter . . . . . . . . . . . . . . . . . . . . . . . . 55C.2 No Torque Measurement . . . . . . . . . . . . . . . . . . .57C.3 Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . 59C.4 Error Variance Estimation . . . . . . . . . . . . . . . . . . .61C.5 Factor Error Controller . . . . . . . . . . . . . . . . . . . . 63C.6 More Sophisticated Controller . . . . . . . . . . . . . . . .65

viii

Page 11: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Chapter 1

Introduction

1.1 Background

Nikolaus August Otto invented the first piston four stroke cycle internal com-bustion engine in 1876 hence this particular type of engine cycle is namedafter him, the Otto cycle. This is still the most commonly used engine today.Since 1876, the engine has been developed to increase efficency, to minimiseemissions, and at the same time maintain good performance under variousoperating conditions. The first emission standards were introduced in the 60sin California to come to terms with the ever increasing smog problem. Therest of the nation followed as well as Japan and Europe. Emissions have beenreduced due to factors such as introduction of catalysts and fuel development.Much work is being performed to find alternative fuels to gasoline and diesel,not only to improve the air pollution issue, but also to ensure availability offuel. Alternative fuels available today are natural gas, methanol and ethanol.Other solutions could be to use synthetic gasoline from shale oil or coal, andhydrogen. [Heywood, 1988]

The basic process of the engine is well known, however components wearwith time and fast load disturbance changes effects the system as well. Thefact that the system tends to change over time implies that it is a good ideato use adaptive control. The control problem can be broken down into sub-problems such as air/fuel ratio control, ignition timing control, exhaust gasrecirculation control, and idle speed control. Note that the sub-problems arenot independent since interactions exist between them. This report will lookinto the air/fuel ratio control problem.

This master thesis is a part of my degree in Applied Physics and ElectricalEngineering at Linkopings universitet.

1

Page 12: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

2 Introduction

1.2 Problem

The main goal of air/fuel control is to maintain the air/fuel ratio close tothe stoichiometric value, by regulating the fuel supplied with respect to theair flow. The stoichiometric value is where perfect combustion occurs. Thegases produced when perfect combustion occurs are relatively pollution free,and the gases are carbon dioxide, water and nitrogen. In practice, perfectcombustion is not possible to maintain due to changing load conditions, etc.,therefore noxious gases, hydrocarbons, carbon monoxide and oxides of nitro-gen, are produced to some extent.[Welsh et al., 2002]

One of the difficulties in air/fuel control is the characteristics of the sensormeasuring the air/fuel ratio in the exhaust. The sensor is known asexhaustgas oxygen(EGO) sensor. This sensor is placed where the exhaust fromthe individual cylinders combine which is some distance from the cylinderexhaust port causing large delays in the control system. Another problem withthe sensor is that it is non-linear and exhibits a switching type characteristic.Furthermore, the placement of the sensor leads to averaging of the exhaustfrom a number of cylinders. Hence it is possible that some of the cylinderscan be operating lean and others rich which together give a good average, butwill result in increased emissions. [Welsh et al., 2002]

Wall-wetting (or fuel puddling) presents another problem. This problemarises when not all the injected fuel is vaporised immediately, but some accu-mulates on the cylinder walls. The fuel on the walls will affect forthcomingcycles.

The control structures that will be used here utilise the models that areidentified in the report Tidefelt [2004]. The current report and Tidefelt [2004]are carried out within a lager project at the University of Newcastle, Australia.This project is a co-operation between the University of Newcastle and Gen-eral Motors Research & Development Department with the goal to developnovel non-linear identification and control strategies to improve vehicle pow-ertrain control performance. The models are identified under specified condi-tions and consider the existance of other sensors for example, a torque sensor.The models used in the controller were identified using data that containedsynthetic signals, from such sensors as well as mass air charge.

The controllers described here are non-linear and combine both feedfor-ward and feedback elements in a unified design. The controller requires esti-mates of mass air and fuel charge in the cylinder. Since there exist no mea-surements of these important quantities, the mass of air can be estimated fromusing both the torque and the airflow measurments. This report will investi-gate different control strategies and ways to merge the estimated air charge.

Page 13: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

1.3. Objectives 3

1.3 Objectives

The purpose of this project is to decrease emissions on a General Motors(GM) engine by controlling the air/fuel ratio. In order to fulfil this, the fol-lowing goals were set up:

• Build simulators to be able to test the controller, where the input signalsare data sets provided by GM.

• Develop and use a controller that combines both feedforward, basedon mass air charge estimates, and feedback based on exhaust sensormeasurements.

• Investigate different ways to combine the estimates of mass air chargein the cylinders.

• Investigate sensitivity to model errors.

1.4 Method

The controller is implemented in MATLAB and the simulators are built upwith block diagrams in SIMULINK . The controller is called from the simula-tor. The controller was not tested on the actual engine. Instead, simulationsused data sets provided by GM.

1.5 Previous Work

Systems possessing a delay may be difficult to control since there will be adelay before the controller affects the control variable. If the controller doesnot take this into consideration, the controller will assume that it did not haveany effect and continue to do even lager corrections until the system beginsto respond in the desired way. The controller has by now overcompensatedand hence it will control the system poorly. In 1957 Otto Smith found astructure to control a system that has a delay without overcompensation. Thiscontroller structure is known as the Smith Predictor and will be disused inSection 3.2. [VanDore, 2004]

In 1960 R.E Kalman developed the Kalman filter, which was a new ap-proach to linear filtering and prediction problems [Kalman, 1960]. The Kalmanfilter is very powerful, and can be used for estimating past, present and futurestates. The filter is used in all kinds of signal processing areas, and is ofinterest here for sensor fusion, where signals are merged in an optimal way[Gustafsson et al., 2001].

The use of adaptive control for the air/fuel ratio has been researched bymany before. [Turin and Geering, 1994] have been looking into a model-based adaptive controller, and their control design is based on indirect Model

Page 14: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4 Introduction

Reference Adaptive Control (MRAC). In this report the wall-wetting and sen-sor dynamics are combined, as the only information about the system dy-namics comes from the exhaust sensor. An extended Kalman filter is usedto identify the system. The estimated parameters from the identification areused to update the observer wall-wetting dynamics and also the controller’sparameters. The observer gives an estimate of the amount of fuel injected intoa cylinder. Two feedback loops are used, the first one compensates for anytransient behavior of the wall-wetting dynamics. The other is used to obtainthe desired air-fuel ratio. The controller is tested on a 3.5 liter, six cylinderBMW engine. The engine speed was set to a fixed value and lean operationalconditions were set to avoid difficulties in identifying the sensor dynamics.Throttle steps where applied to test the controller. Their results show that thisis a viable approach.

1.6 Outline

In Chapter 2 the basics of a four stroke internal combustion engine is de-scribed. The models of the engine used in both the simulators and the con-trollers are also given in this chapter. Details of the two simulators usedinstead of a real engine are also given. Chapter 3 explains the controllerstructure. In Chapter 4, different ways to merge mass air charge estimatesare explored. Other controller structures are also described. The results fromsimulations are also presented in this chapter. Finally Chapter 5 summariesthe report and gives suggestions on further work.

Page 15: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Chapter 2

The Engine

This chapter is intended as a brief introduction to the four stroke, spark-ignited (SI), internal combustion gasoline engine. This type of engine iscommonly used in passenger cars. The simulators that were developed andthe models that these simulators use are also described.

2.1 Introduction to SI Internal Combustion En-gine

The operation of a four stroke engine is divided into four steps; intake, com-pression, expansion and exhaust. This kind of engine makes two steps foreach 360◦ rotation of the crankshaft, thus two revolutions of the crankshaftare needed to complete one cycle. The crankshaft is rotated through connec-tion with the piston, which is moving back and forth in a cylinder. The pistonis at rest in the top center (TC) crank position and in the bottom center (BC)crank position. During the first stroke, called the intake stroke, the cylinder isfilled with a air/fuel mixture. The piston starts in the TC crank position andthen the piston is moving downwards while the inlet valves are opened, so thepressure in the cylinder remains almost constant. The inlet valve closes whenthe stroke ends at BC.

The next stroke is the compression stroke and during this step the mix-ture is compressed to a higher pressure. A spark is formed by an electricaldischarge over electrodes, located on the ignition plugs, by a high voltageapplied across them. This initiates combustion and a flame is propagatedthrough the air/fuel mixture contained in the cylinder. The flame is extin-guished when it reaches the cylinder wall. For a given air/fuel mixture thereexists an optimum timing of the ignition such that maximum torque will re-sult. The angle where the spark is ignited is called spark advance,δ.

The following stroke is the expansion stroke, during which the combus-tion is continued. The volume has of the gas expands such that the piston is

5

Page 16: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

6 Chapter 2. The Engine

pushed down and torque is developed. Initially the piston is at TC and it endsat BC. The amount of work done on the piston during the expansion stroke isfive times larger than the work needed during compression [Heywood, 1988].

The final stroke, the exhaust stroke, empties the cylinder of burned gas asthe piston moves upwards to the TC position. The exhaust is pushed into theexhaust system and mixed with the exhaust from the other cylinders and theair/fuel ratio is read by the EGO sensor. Then it starts all over again, fillingthe cylinder with the air/fuel mixture. Figure 2.1 shows an SI-engine.

Figure 2.1: An SI-engine (Figure is copied from Heywood [1988, p. 13,Figure 1-4]).

Page 17: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

2.2. Model 7

The air/fuel ratio is often normalised by the stoichiometric ratio, being14.66 for gasoline. This normalised value is commonly called lambda,λ, anddefined as

λ =Mac

14.66Mf, (2.1)

whereMac is the mass of air in the cylinder andMf is the mass of fuel inthe cylinder. The ideal ratio isλ = 1 to get as clean combustion as possible.For the particular engine under consideration the general operating region isbetween0.85 and1.3. [Welsh et al., 2002]

The rate at which the crankshaft rotates is known as the engine speed,N , and is measured in revolutions per minute, rpm. The system is sampledwith four samples per 360◦ revolution of the crankshaft, hence the samplerate depends on the engine speed. [Welsh et al., 2002]

The principle of an internal combustion engine has been described bymany and the most cited of these presently is Heywood [1988].

2.2 Model

Simulators were developed as the University of Newcastle did not have accessto the real engine. Simulators are good to have during the prototyping phaseof any controller development. The implementation of these simulators is inthe SIMULINK . The engine model used in the simulator is simplified, andbased on the model identified in Tidefelt [2004]. The model is divided intosub-models. The inlet manifold is denoted as,f1. In this model the angle ofthe throttle, temperature, pressure and other factors affect the amount of airmass going into the cylinder. The inlet manifold is discussed further in sec-tion 2.2.1. Another sub-model captures the fuel dynamics,T1, and takes intoconsideration the wall-wetting problem. The fuel dynamics will be explainedin more detail in Section 2.2.2. Combustion is considered by the model,f2.Here, the energy in the fuel is converted to power, and is discussed in Sec-tion 2.2.3. The last model is that of the sensor dynamics of the EGO sensorreading the air/fuel ratio in the exhaust,T2, see Section 2.2.4 for more infor-mation. The measurement from the sensor is delayed and is captured byD2.Figure 2.2 shows the basic model structure.

2.2.1 Inlet Manifold

The driver controls the air mass flow,Maf , in the inlet manifold by meansof the throttle. The air mass flow has, a large impact on air charge. Anotherfactor that affects the air charge is the pressure in the inlet manifold,Pm. Themodel used in the simulator is as follows:

Mac = C + θ1 ·Maf + θ2 · Pm, (2.2)

whereC is a fixed constant. The values ofθ are given in Table 2.1.

Page 18: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

8 Chapter 2. The Engine

λy∏

×

÷u

f2

T1

v1

v2

λMf T2

f1

Mac

D2

d1

Ty

d2

Figure 2.2: Basic Model Architecture

θ1 θ2 θ3 θ4 θ5 θ6

0.0907 0.258 − 2.75 2.96 0.0745 − 0.0083θ7 θ8 θ9 θ10 θ11

1.25 − 0.274 0.0946 − 0.0726 0.1471

Table 2.1: The values ofθ

2.2.2 Fuel Injection

Some dynamics are needed in the fuel model to capture the wall-wetting phe-nomenon. The problem is that not all the fuel that has been injected into themanifold enter the cylinder, so some fuel will affect forthcoming cycles. Theinput signal,u, is a fuel pulse, and is used by the controller to control theair/fuel ratio. A second order model of the following form is used

qx =A(θ)x + B(θ)uMf =C + D(θ)u,

(2.3)

whereA(θ), B(θ), C, andD(θ) is in the observable canonical from:

A =(

θ7 1θ8 0

)B =

(θ9

θ10

)C =

(1 0

)D =

(θ11

).

2.2.3 Combustion

The amount of torque produced depends mostly on air charge, engine speedand spark advance. The combustion model equation is

T = θ3 + θ4 · q−dacMac + θ5 · q−saδ + θ6 ·N, (2.4)

where q denotes the forward shift operator.Mac is four samples delayed(dac = 4) andδ is one sample delayed (dsa = 1).

Page 19: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

2.3. Transformation 9

2.2.4 Exhaust Sensor

The air/fuel ratio is measured with an EGO sensor. The measurement fromthe sensor is delayed on average by 16 samples. The sensor is placed wherethe exhaust from the cylinders is mixed together. The exhaust sensor modelis of the form

λy =1

(s + τ)λ, (2.5)

whereλy is the measurement from the sensor andλ is the air/fuel ratio in theexhaust.

2.3 Transformation

All the models are in the event domain, expect for the fuel dynamics which isin the time domain. Hence, transformations are needed for the input signal,u, and the output signal,Mf , before and after the simulator’s fuel model. Inthe time domain the fuel pulse is sampled with a variable sample time,Tsv,but the pulse needs to be transformed to constant sample time,Tsc, before itcan be used in the fuel dynamics model. The fuel pulse represents how muchfuel is injected into the manifold. The fuel has a flow when it is injected into the cylinder and this flow is used to get the amount of fuel that has beeninjected during aTsc interval. The fuel flow is determined by division ofuby the currentTsv. This flow is integrated and read each constant rate sampleinstant to get the transformed fuel pulse,uτ . Thus the transformation of thenth variable sample instant is of the form below. The flow is defined as

∂u

∂t(t) =

u(tn)tn − tn−1

, t ∈ (tn−1, tn]. (2.6)

The transformed fuel pulse of thekth constant rate sample instant then be-comes

uτ [k] =∫ kTsv

(k−1)Tsv

∂u

∂t(t)dt. (2.7)

The fuel mass of the constant rate model needs to be transformed intothe variable sample time. The same idea is used here as above, i.e., the fuelthat vaporises also has a flow that will be used for the transformation. Herethe flow is determined by division of the fuel mass by the currentTsc. Thetransformation is of the form

∂Mf

∂t(t) =

Mf (τk)τk+1 − τk

, t ∈ (τk, τk+1]

Mf [n] =∫ nTsc

(n−1)Tsc

∂Mf

∂t(t)dt.

(2.8)

Page 20: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

10 Chapter 2. The Engine

2.4 Simulators

Two simulators were developed; one very simple and one more complicated.The simulators are driven by data sets supplied by GM. The simulators couldhave been driven with noise, but the data sets were used to get more realisticcombinations of the input signals,Maf , Pm, δ, andN . The input and outputsignals to the engine are scaled. The scaling is a part of the model and isdescribed as an affine function, see Tidefelt [2004] for more information.

The models of the inlet manifold and combustion used here are simple.These models have been compared with more complex models and are seento approximate the complex models well. More variables could be added tothe inlet manifold and combustion models then are used in the simulators andthe controllers, as long as models depend linearly onMac, without increasingthe difficultly to control the system. This is due to the fact the combustionmodel is inverted in the controller to obtain the estimate ofMac given T ,thus adding more terms will not make the inversion more difficult. The inletmanifold model is used as described, thus the simpler model could easily bereplaced with a more complex model.

Simulator I

The simpler simulator neither takes into consideration the sensor dynamicsnor that the fuel model should be sampled in the event domain. The sampletime was set to a fixed value, 10 ms, for the whole simulator, which corre-sponds to an engine speed of 1500 rpm. This simple simulator is used foreasy evaluation of how model errors affect the controller performance. Notethat the sensor dynamics are set to one,T2 = 1.

Simulator II

The other simulator was developed to examine how well the controller per-forms when other forms of errors are introduced. The simple simulator wasextended also to include with sensor dynamics. The fuel dynamics was sam-pled with constant sample time and the other models with variable sampletime. The engine speed determined the variable sample time. The fuel dy-namics sample time was set to 10 ms. The transformation described abovewas implemented to handle the different sample times.

Page 21: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Chapter 3

The Controller

The air/fuel ratio control system was designed to take advantage of the mod-els obtained in Tidefelt [2004]. Professor Graham Goodwin’s idea on thecontrol architecture was to combine both feedforward and feedback elementsin a unified way. Feedforward elements are very dependent on the accuracyof the models. This means that the accuracy of the models obtained from theidentification phase will have large impact on the performance of the con-troller.

The model used in the controller design is the same as that in the simu-lator. Thus the input and output signals are scaled in the same manner withaffine functions, and the important computations are made with there scaledvariables.

3.1 Basic Model

The basic engine model structure is shown in Figure 2.2 and is described inChapter 2. The delays that exist in the system make the system harder tocontrol. The delay to torque,D1, is typically four samples, and the delayto the air/fuel sensor,D2, is taken as sixteen samples. The air charge,Mac,needs to be estimated. It can be estimated based on the intake manifold model,the inverted combustion model or the air/fuel ratio sensor. The use of the lattertwo yield a delayed estimate ofMac. Several ways to fuse the estimates areexamined; the use of heuristic filter, no torque measurement, a Kalman filterand an error variance estimation. During the identification phase the air/fuelratio is used, but the controller will utilise a fuel/air ratio instead so that thefeedback loop linear.

11

Page 22: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

12 Chapter 3. The Controller

3.2 The Smith Predictor

The delays in the measurements need to be taken into account and one struc-ture that allows this is the Smith Predictor. The idea of the Smith Predictor isas follows. Assume we have a systemG and a control structure as shown inFigure 3.1, whereF is the controller. The controllerF is chosen to controlthe systemG without the delay. The transfer function from the reference,r,to the output,y becomes:

FG

1 + FG. (3.1)

If G is now replaced withGe−sT , butF is the same as before, the controller

r ∑+ yu

F G

Figure 3.1: Controller without time delay

will not work very well. This is because the negative phase shift ine−sT de-creases the stability margin possibly making the system unstable. The SmithPredictor compensates for the delay as shown in Figure 3.2. The transferfunction from the reference,r, to the output,y, if G = G becomes

FG

1 + FGe−sT . (3.2)

This is almost as Equation 3.1 except for the time delay. Assuming thatGis an accurate model of the system the output fromGe−sT , y2, will be adisturbance free version of the real systems output,y1. Subtractingy2 fromy1 gives an estimate of the disturbance,d. Adding this to the output fromGleads to a feedback variable without the delay. Note that the controller has aninternal time delay. [Glad and Ljung, 1989]

3.3 The Architecture

Given the estimatedMac the basic model of the engine can be simplified tothe model showed in Figure 3.3. To overcome the difficulty with the delay inthe system, the Smith Predictor will be used as a basis for the control systemstructure.

In Figure 3.3u is the estimated fuel mass in the cylinders,z is the esti-mated fuel/air ratio andy2 is an estimate of the lambda measurement(λy).The disturbanced2 is intended to represent model and errors inMac etc.

Page 23: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

3.4. Estimation of Output Disturbance 13

d

Ge−sT

+

+r

++

G

Ge−sT

Fy1

u

y2

Figure 3.2: Smith Predictor

z∏

×

÷

T2

∑ y2T1 D2

Mac d2

u u

Figure 3.3: Simplified Model

3.4 Estimation of Output Disturbance

To estimate the output disturbance,d2, the knowledge ofMac, T1 andD2 isused as shown in Figure 3.4. The disturbance will be added to the feedbackvariable.

y2

×

÷u

D2T2

zu ∑+−

d2

Mac

model

engine

T1

λy

Figure 3.4: Estimatingd2

Page 24: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

14 Chapter 3. The Controller

3.5 Feedforward Component

Mac is used as a feedforward control component, to make the mass of fueldelivered to the cylinder the desired ratio of the estimated mass of air. Thefuel dynamics model is bi-proper, so the input to the model is set to

u = u′ + T−11 Mac. (3.3)

The fuel flow into the cylinders is shown in Figure 3.5. The control variable,

z∏ ∑++÷

×T1

T−1

1

Mac

∑++u′

d2

z′

u

Figure 3.5: Feedforward Model

which is the normalised fuel/air ratio, becomes as in Equation 3.4. Note thatif the feedback component is zero,u′ = 0, and the disturbance is zero,d2 = 0thenz′ = 1, which is the reference value. The feedforward model is given by

z′ =T1

[u′ + T−1

1 Mac

]Mac

+ d2

=T1 [u′]Mac

+ 1 + d2.

(3.4)

The control variable,z′, is used in a feedback control loop as showedin Figure 3.6. The multiplication byMac makes the closed loop linear inthe transfer functionT1. The set pointz∗ is 1, which corresponds to thestoichiometric value (in normalised variables). The disturbanced2 is addedto this closed loop. The controller in Figure 3.6 is chose as a simple PI-controller, as a more sophisticated controller is not needed.

3.6 Final Control Structure

Putting the different elements together gives the final control structure, asshown in Figure 3.7. The engine block in the dotted box should to be the realengine, but here a simulator will be used instead.

Page 25: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

3.6. Final Control Structure 15

u′ ∑∑ ∏ z

′++

+Controller “System”

×

×

d2Mac

z?

Figure 3.6: Closed Loop System

d2

Π

ΠΣ Σ

Σ

Σ

+

PI

+−

z∗

×

×+

T1(z)−1

Ty

M2

B2

B1

+z

T1(z)−

+

÷

D2

+

u′

×

λy

u

z′

Mac

M1

Engine

Figure 3.7: Controller structure

The controller structure is summarised with a brief description of eachblock.

• Engine: Simulates the physical engine and is constructed from themodels given in Tidefelt [2004].

• B1: Estimates mass air charge from both the intake manifold model(f1) and the torque model (f2). M1 is estimated from the intake mani-fold model andM2 from the combustion model.

• B2: Provides a composite estimate of the mass air charge,Mac. Dif-ferent ways to obtainMac are investigated in Chapter 4.

• T1(z): The fuel dynamics model from Section 2.2.2.

Page 26: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

16 Chapter 3. The Controller

• T1(z)−1: The inverted fuel dynamics model.

• D2: A 16 sample delay.

• PI: The PI block is a proportional and integral controller. The designdetails are given in section 3.7.

It is seen in Figure 3.7 that the controller is similar to the Smith predictorstructure and also incorporates feedforward control. Here, however, appro-priate modifications have been incorporated to capture the known nonlineardynamics.

3.7 PI-Controller

There are many way to tune a PI-controller. Here an open loop step responsewas performed the utilise Internal Model Control, IMC. The idea with IMCis given a modelG of the real systemGo extract disturbances from the outputof Go and use it in a feedback loop. Figure 3.8 shows the IMC structure. The

yQ

Go

G

Fr

r u+

+−

Figure 3.8: Internal Model Control

transfer function fromy to u is

Fy = (I −QG)−1Q, (3.5)

which is the feedback part. When there are no model errors,G = Go, theclosed loop system becomes

Gc = (I + GFy)−1GFyFr = GQFr. (3.6)

This means that one would like to chooseQ = G−1 andFr = I to get perfectcontrol performance, but this is not possible because that givesFy = ∞.What kind ofQ one should choose instead depends on the model over thesystem. In the case whereG has more poles than zeros, the inverse is notpossible to implement, thenQ can is as

Q =1

(τ1s + 1)nG−1. (3.7)

Page 27: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

3.7. PI-Controller 17

n is set to value so thatQ is possible to implemented, andτi is a designparameter. [Ljung and Glad, 1997]

To be able to determine a model for the system in the dash-dotted box inFigure 3.7 a small step was put on the input signal,u′, and the step responsewas measured in the control variable,z′. All the other signals to the simulatorwere put to constant values. The result is shown in Figure 3.9. The step

19.5 20 20.5 21 21.5 22 22.5 23 23.5 24 24.5

1

1.005

1.01

1.015

1.02

1.025

1.03

1.035

1.04

1.045

1.05

Figure 3.9: Step response

response indicates that the transfer function from input to output is of theform

G =k

τ2s + 1,

which gives that

Q =1

τ1s + 1G−1 =

(τ2s + 1)k(τ1s + 1)

.

The feedback part then becomes

Fy =(τ2s+1)k(τ1s+1)

1− 1τ1s+1

=τ2

kτ1(1 +

1τ2s

),

which is a PI controller with

Kp =τ2

kτ1

KI =1τ2

and from step response we getτ2 = 0.27 andKp = 1 and puttingτ2 = τ1

Page 28: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

18 Chapter 3. The Controller

the PI parameters becomes

Kp = 1KI = 3.7

3.8 Implementation

The different controllers were tested in simulations. The parts of the imple-mentation that are common for the controllers are described below.

1. The “Engine” was simulated based on the models as described in Chap-ter 2.

2. The controller was designed based on models similar to those detailedin Chapter 2 save that the parameters were changed to simulate “modelerror”.

3. The controller (Block PI) in Figure 3.7 was designed using the IMCmethodology. The controller is discretised and incorporates integralwindup protection.

3.9 Sensitivity

Simulations will be performed on control structures given in Chapter 4 toempirically examine the sensitivity to model errors. For each control structureseveral cases of model errors are considered:

1. No model errors.

2. Errors in the intake manifold model.

3. Errors in the torque model.

4. Errors in the dynamic fuel model.

5. Errors in all models simultaneously.

For each of these cases, the percentage of model error was systematicallyincreased, from1 to 8%.

Input data used in the simulations is from data sets supplied by GM. Thisdata is passed through the simulated engine model.

The Root Mean Square Error (RMSE) is used to measure the performanceof the controller in the presence of the model errors. It is calculated for theerror signale = λy − 1, where1 is the set point, as follows,

RMSE =

√√√√ 1N

N∑i=1

(e(i)− e0)2. (3.8)

Page 29: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Chapter 4

Simulations

This chapter explores different techniques to obtain the mass air charge es-timate and also presents simulation results. Other control structures are alsodescribed and tested by simulations. Results from the simulations are dis-cussed.

4.1 Heuristic Filter

The measurements from the models used to estimateMac have three differentfrequency characteristics as shown in Figure 4.1. This is due to the delaysin the measurements ofTy andλy. The data from the exhaust sensor is inthe low frequency zone, the measurements from the torque sensor is in themedium frequency zone and the measurements from the inlet model are inthe high frequency zone. The engine speed is set to operate at 1500 rpm andis sampled 4 times on each 360◦ rotation, thus the time between samples is10 ms, the delayD1 in the order of 40 ms and delayD2 in the order of 200ms. From this, the cut-off frequencies of the frequency zones in Figure 4.1are approximated to the values given in Table 4.1. The controller bandwidthcan be divided into three ranges using the available measurements as givenin Table 4.2. The controller can act quickly on the measurements that are notdelayed and use the delayed measurements for steady state correction.

Measurement Delay Upper Cut-off Frequency

Ty (torque data) ≈ 40 ms ≈ 10 rad/secλy (O2 data) ≈ 200 ms ≈ 2 rad/sec

Table 4.1: Cut-off Frequencies (for 1500 rpm)

Thus the estimated air charge from the inlet model is utilised at high fre-quencies and that from the combustion model at medium frequencies. The

19

Page 30: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

20 Chapter 4. Simulations

10−3

10−2

10−1

−3

−2

−1

0

1

2

3

O2

dataλy

“inlet states”(v1)

“torque data”(Ty, v2)

low frequencies high frequenciesmedium frequencies

Figure 4.1: Frequency Zones of Measurements

Frequency Range Measurement

high frequency (above10 rad/sec) use feedforward fromv1

medium frequency (2 to 10 rad/sec) use torque sensor,v2

low frequency (below2 rad/sec) use exhaust sensor

Table 4.2: Frequency Range of Control Tasks

measurement from the exhaust sensor will only be used for integral actiondue to its low frequency and since it is the only true measurement of theair/fuel ratio. A heuristic filter is devised to estimate the air charge. Themerged estimate for mass air charge is taken to be

Mac =(

τs

1 + τs

)M1 +

(1

1 + τs

)M2 (4.1)

whereM1 andM2 is the mass air charge estimate from the inlet manifoldmodel and the combustion model respectively. The estimatedM1 is passedthrough high pass filter andM2 is low pass filtered. The filter break frequencyis set to 10 rad/sec in accordance with the frequency range in Table 4.2.

4.1.1 Results

In this section the sensitivity to model errors is examined when utilising allavailable measurements in the controller as described. The simulator I, Sec-tion 2.4, was used, soT2 = 1 in the controller. Results are presented inTables 4.3 - 4.7 showing the controller performance measured by the RMSE.

Page 31: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.1. Heuristic Filter 21

Figures 4.2 - 4.6 and Figures C.1 - C.4 show plots of the controlled air/fuelratio (λy) as measured at the output of the simulated engine model.

Error Min Max RMSE

0% 0.934 1.04 0.00733

Table 4.3: Controller performance:no model errors.

Error Min Max RMSE

1% 0.93 1.04 0.007782% 0.926 1.04 0.008234% 0.919 1.05 0.009128% 0.905 1.06 0.0109

Table 4.4: Controller performance:errors in the intake manifold model.

Error Min Max RMSE

1% 0.933 1.04 0.007472% 0.932 1.03 0.007684% 0.93 1.03 0.008328% 0.924 1.04 0.0104

Table 4.5: Controller performance:errors in the torque model.

Error Min Max RMSE

1% 0.897 1.07 0.01532% 0.868 1.12 0.02444% 0.826 1.25 0.04278% 0.775 1.54 0.0793

Table 4.6: Controller performance:errors in the fuel model.

Error Min Max RMSE

1% 0.892 1.07 0.01622% 0.859 1.14 0.02664% 0.808 1.28 0.04818% 0.74 1.65 0.0957

Table 4.7: Controller performance:errors in all models.

Figure 4.2: λy: no model errors.

Page 32: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

22 Chapter 4. Simulations

Figure 4.3: λy: errors in the intake manifold model.

Figure 4.4: λy: errors in the torque model.

Figure 4.5: λy: errors in the fuel model.

Page 33: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.1. Heuristic Filter 23

Figure 4.6: λy: errors in all models.

Page 34: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

24 Chapter 4. Simulations

4.1.2 Discussion

The first observation is that in the case of no model errors, the control perfor-mance observed is not perfect. This is believed to occur due to the inclusionof the air charge as estimated by the inverted torque model in the feedforwardcomponent of the controller. This air charge estimate is delayed by at least 4samples, hence, using it in the feedforward path will undoubtedly introducethe unwanted errors which is observed here.

The fuel dynamic model possesses the highest sensitivity with respect tothe control performance. Clearly this indicates the need to estimate a highfidelity model of the fuel path.

4.2 No Torque Measurement

Here the sensitivity of the controller to model errors is examined when weneglect the air charge estimateM2 obtained by inverting the torque model.Simulator I is used, thus the sensor dynamics are neglected in the controller,i.e. T2 = 1. Results are presented in Tables 4.8 - 4.12 showing the controllerperformance as measured by the RMSE. Figures 4.7 - 4.11 and Figures C.8 -C.8 show plots of the controlled air/fuel ratio (λy) as measured at the outputof the simulated engine model.

Figure 4.7: λy: no model errors.

Page 35: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.2. No Torque Measurement 25

Figure 4.8: λy: errors in the intake manifold model.

Figure 4.9: λy: errors in the torque model.

Figure 4.10:λy: errors in the fuel model.

Page 36: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

26 Chapter 4. Simulations

Error Min Max RMSE

0% 1 1 0

Table 4.8: Controller performance:no model errors.

Error Min Max RMSE

1% 0.996 1 0.0005522% 0.993 1 0.001114% 0.986 1.01 0.002248% 0.973 1.02 0.00456

Table 4.9: Controller performance:errors in the intake manifold model.

Error Min Max RMSE

1% 1 1 02% 1 1 04% 1 1 08% 1 1 0

Table 4.10: Controller perfor-mance: errors in the torque model.

Error Min Max RMSE

1% 0.967 1.06 0.0112% 0.94 1.11 0.02014% 0.8 1.19 0.03888% 0.595 1.44 0.0815

Table 4.11: Controller perfor-mance: errors in the fuel model.

Error Min Max RMSE

1% 0.95 1.05 0.01042% 0.914 1.11 0.02024% 0.864 1.22 0.03868% 0.801 1.48 0.0724

Table 4.12: Controller perfor-mance: errors in all models.

Figure 4.11:λy: errors in all models.

Page 37: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.3. Kalman Filter 27

4.2.1 Discussion

By removing the torque measurement, and hence its effect on the air chargeestimate used in the feedforward path, one can see that in the case of nomodel errors perfect control was indeed achieved. It is also obvious that whenthe torque measurement is not used to estimate the air charge for the currentcontroller structure, the controller performance is insensitive to errors in thetorque model. Comparing these results with the results for a heuristic filterone can see that it is better to use only the inlet manifold to estimateMac.This leads to the question: should the torque measurement be used whencontrolling the air/fuel ratio. The usefulness of the torque measurement mightnot appear in the simulator, and when air charge is near constant. One shouldweight air charge from both inlet manifold model and combustion model touse as much information as possible. This idea will be futher explored inSection 4.4.

Note that the manner in which errors were introduced into the models hadthe effect of actually lowering the RMSE in the specific case of all modelspossessing errors. Here the change in air charge estimated from the intakemodel was somewhat “compensated” for by the errors in the fuel model. Theintake model underestimated the air charge by8% whilst the fuel model over-estimated the required fuel pulses by approximately8%.

4.3 Kalman Filter

In an attempt to get a better observer for mass air charge, a Kalman filter isused to achieve data fusion. Kalman filtering is an efficient way to combinemeasurements. Here we combine the “measurements” obtained from the in-take model,M1, and that obtained by inverting the combustion model,M2,to produce a “final” air charge estimate. The air charge signal model used inthe Kalman filter is given by

x[k + 1] = A[k]x[k] + w[k] (4.2)

y[k] = Cx[k] + v[k], (4.3)

wherew andv have spectral density Q and R respectively [Gustafsson et al.,2001]. The outputs are the air charge and the air charge delayed by 4 sampleswhich are estimated byM1 andM2 respectively. The signal model is esti-mated using an adaptive filter. The adaptive filter estimates an AR-model, bymeans of recursive least squares with forgetting factor. See Appendix A forthe parameter update algorithm. The AR-model is given by

y[k] = ϕT [k]θ[k] + e[k], (4.4)

whereϕ[k] =[

y[k − 1] y[k − 2] . . . y[k − n]]T

[Gustafsson et al.,

2001]. Thus the respective bandwidths ofM1 andM2 are captured via the

Page 38: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

28 Chapter 4. Simulations

AR model. The values of the forgetting factor,µ, and order, n, were de-termined by optimising one step prediction performance (in a least squaressense) on air charge data obtained from GM. The order, n, was set to 6 andthe forgetting factorµ to 0.9989.

The state space representation of the signal model is chosen so that aircharge is the first state and each following state is a delayed version of theprevious. Thus we obtainA andC as follows,

A[k] =

θ1[k] θ2[k] θ3[k] θ4[k] θ5[k] θ6[k]

1 0 0 0 0 00 1 0 0 0 00 0 1 0 0 00 0 0 1 0 00 0 0 0 1 0

C =

(1 0 0 0 0 00 0 0 0 1 0

).

The Kalman filter algorithm, Gustafsson et al. [2001], was implementedas follows:

x[k + 1] = A[k]x[k]x[k] = x[k − 1] + L[k](y[k]− Cx[k − 1])

L[k] = P [k − 1]CT (CP [k − 1]CT + R)−1

P [k + 1] = A[k]P [k]AT [k] + Q

P [k] = P [k − 1]− P [k − 1]CT (CP [k − 1]CT + R)−1CP [k − 1]P0 = Π0, x0 = x0.

(4.5)The initial states were set tox0 =

(0 0 0 0 0 0

)and the covari-

ance matrixΠ0 = 100 · I. Driving noise is only on the first state, according tothe signal model given by Equation 4.4. The design variableQ11 was set toone. Since the controller performance is measured on a simulator,Mac canbe used to do offline tuning of the design parameterR. The derivation of thevalues is described in Appendix B. The design parameters become

Q =

1 0 0 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

R =

(8.37 00 9.12

)10−4.

Page 39: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.3. Kalman Filter 29

4.3.1 Results

The results obtained using this estimator are given below. Simulator I is usedand the sensor dynamics in the controller is set to one, i.e.T2 = 1. Note thatthe tables and figures correspond to the tables and figures presented earlier inSection 4.1.1.

Error Min Max RMSE

0% 1 1 4.51E-05

Table 4.13: Controller perfor-mance: no model errors.

Error Min Max RMSE

1% 0.996 1 0.0005522% 0.993 1 0.001114% 0.986 1.01 0.002248% 0.973 1.02 0.00456

Table 4.14: Controller perfor-mance: errors in the intake mani-fold model. (Compare to Table 4.9)

Error Min Max RMSE

1% 1 1 4.51 · 10-05

2% 1 1 4.51 · 10-05

4% 1 1 4.51 · 10-05

8% 1 1 4.52 · 10-05

Table 4.15: Controller perfor-mance: errors in the torque model.(Compare to Table 4.10)

Error Min Max RMSE

1% 0.952 1.05 0.01072% 0.917 1.11 0.0214% 0.867 1.24 0.0418% 0.801 1.58 0.0806

Table 4.16: Controller perfor-mance: errors in the fuel model.(Compare to Table 4.11)

Error Min Max RMSE

1% 0.95 1.05 0.01042% 0.914 1.11 0.02024% 0.864 1.22 0.03868% 0.801 1.48 0.0724

Table 4.17: Controller perfor-mance: errors in all models. (Com-pare to Table 4.12)

Page 40: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

30 Chapter 4. Simulations

Figure 4.12:λy: no model errors.

Figure 4.13: λy: errors in the intake manifold model. (Compare to Fig-ure 4.8)

Figure 4.14:λy: errors in the torque model. (Compare to Figure 4.9)

Page 41: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.3. Kalman Filter 31

Figure 4.15:λy: errors in the fuel model. (Compare to Figure 4.10)

Figure 4.16:λy: errors in all models. (Compare to Figure 4.11)

Page 42: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

32 Chapter 4. Simulations

4.3.2 Discussion

The results presented above appear only marginally better than the simpledata fusion method described in Section 4.1. This seems to indicate that thesimple method would be preferable in practice. Also note that there is verylittle weighting on the air charge estimate that is obtained from the invertedtorque model, thus the results are similar to the ones in Section 4.2. This is aneffect of the particular set-up used here and may not hold in other situations.

Note that as in Section 4.2.1 the manner in which errors were introducedinto the models had the effect of actually lowering the RMSE in the specificcase of all models possessing errors.

4.4 Error Variance Estimation

Another idea to estimateMac is to use a simple weighting filter. This filter issimpler than the Kalman filter described above.Mac is estimated by weight-ing the air charge estimate from the inlet manifold model,M1, with the aircharge estimate from the combustion model,M2, as follows

Mac = w1M1 + w2y2, (4.6)

wherey2 is a four step prediction ofM2, sinceM2 is a four step delay esti-mate of air charge.y2 is predicted using an AR-model given by

M [k] = ϕT [k]θ + e[k]

ϕ[k] =[

M [k] M [k − 1] · · · M [k − n]].

(4.7)

Thusy2 is predicted by

y2 = ϕT [k]θ1

ϕ[k] =[

M2[k] M2[k − 1] · · · M2[k − n]],

whereθ1 is derived from the RLS algorithm, which is given in Appendix A.If we assume

E{M1} = Mac, E({M1 −Mac}2

)= v1

E{y2} = Mac, E({y2 −Mac}2

)= v2

and thatM1 andy2 are independent, and we want to minimize

E{(w1M1 + w2y2 −Mac

)2

}

the weights should be chosen as(w1

w2

)=

1v1 + v2

·(

v2

v1

). (4.8)

Page 43: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.4. Error Variance Estimation 33

In order to estimatev1 andv2, v1 is assumed to be constant, and thatv2

can be split into two terms, one relating to model errors, and one relating tothe tardiness of the estimate (remember thatM2[k] is an estimate ofM [k −dac]). To gain an understanding of the latter term, a model with structure as inEquation 4.7 is estimated usingM1 as output, and the input signal isq−4M1.The signal model error in the predictedM1 is assumed to be related to thesignal model error in the estimatedy2.

v1 = c1 (4.9)

v2 = c2 + S1(M1, k) (4.10)

where

S1(M1, k) = max0≤i≤n

(h1[i] ·

(M1[k − i]− z1[k − i]

)2)

z1[k] = ϕT1 [k]θ1

ϕ1[k] =[

M1[k − dac] M1[k − dac − 1] · · · M1[k − dac −m]]

h1[i] =

√1−

(i

n + 1

)2

(4.11)andn is a window length. Heren should be at least4, since a step inM1

indicates that the estimatey2 will be poor for at least another4 samples.Largern leads to a more stable and, up to a point, more reliable estimate ofv2, but will result in an unnecessarily little weight ony2, thus leading to sub-optimal estimates. The parameterθ2 is calculated with the RLS algorithmgiven in Appendix A andm is the order of the AR-model.

Since the controller performance is measured on a simulator,Mac maybe used to do automatic offline tuning of the controller. The valuesc1 andc2

were chosen as follows:

c1 = mean((M1 −M)2

)c2 = mean

((M2 −M)2

)−mean (S2(M))

where

S2(M,k) = max0≤i≤n2

(h2[i] · (M [k − i]− z2[k − i])2

)z2[k] = ϕT

2 [k]θ

ϕ2[k] =[

M [k − dac] M [k − dac − 1] · · · M [k − dac −m]]

h2[i] = δ[i](4.12)

whereδ is the Kronecker delta, and the window lengthn2 is arbitrary. Sig-nal z2 is predicted with the signal model given by the RLS algorithm, see

Page 44: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

34 Chapter 4. Simulations

Appendix A. Note thatM1 andM2 are functions of the model used in thecontroller, thus the values ofc1 andc2 will change as the model errors arealtered.

4.4.1 Results

The results obtained using the error variance estimator are given below. Sim-ulator I used again and the sensor dynamics in the controller are set to one,T2 = 1. Again note that the tables and figures correspond to the tables andfigures presented in Section 4.1.1.

Error Min Max RMSE

0% 1 1 0

Table 4.18: Controller perfor-mance: no model errors.

Error Min Max RMSE

1% 0.986 1.02 0.001952% 0.963 1.04 0.004964% 0.929 1.07 0.008598% 0.906 1.1 0.0112

Table 4.19: Controller perfor-mance: errors in the intake mani-fold model. (Compare to Table 4.9)

Error Min Max RMSE

1% 1 1 02% 1 1 04% 1 1 08% 1 1 0

Table 4.20: Controller perfor-mance: errors in the torque model.(Compare to Table 4.10)

Error Min Max RMSE

1% 0.952 1.05 0.01082% 0.917 1.11 0.02114% 0.867 1.24 0.0418% 0.801 1.58 0.0807

Table 4.21: Controller perfor-mance: errors in the fuel model.(Compare to Table 4.11)

Error Min Max RMSE

1% 0.941 1.06 0.01142% 0.888 1.12 0.02344% 0.815 1.28 0.04698% 0.737 1.71 0.0972

Table 4.22: Controller perfor-mance: errors in all models. (Com-pare to Table 4.12)

Page 45: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.4. Error Variance Estimation 35

Figure 4.17:λy: no model errors.

Figure 4.18: λy: errors in the intake manifold model. (Compare to Fig-ure 4.8)

Figure 4.19:λy: errors in the torque model. (Compare to Figure 4.9)

Page 46: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

36 Chapter 4. Simulations

Figure 4.20:λy: errors in the fuel model. (Compare to Figure 4.10)

Figure 4.21:λy: errors in all models. (Compare to Figure 4.11)

Page 47: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.5. Factor Error Controller 37

4.4.2 Discussion

This algorithm again performs similarly to the algorithm described in Sec-tion 4.1. Thus, for the set-up described, either of the simple algorithms wouldsuffice. However, under other conditions, it is quite likely that one algorithmwould out perform the others. This would need to be investigated for theparticular case of interest.

4.5 Factor Error Controller

This section investigates another control law, with the idea to obtain a con-troller better able to handle errors by a factor in the inlet manifold model andthe combustion model. In this new controller the multiplication byMac ismoved after the PI-controller instead of before the PI-controller. If the sys-tem is stabilised so that the difference between the control variable and thereference is zero, then the output from the PI-controller would be constant.To be able to handle an error by a factor the constant should be multipliedwith Mac, because the feedforward factor gives

u′′ = T−1[Mac] = T−1[(1 + f)Mac],

and the input to the engine should be

u = u′ + u′′ = T−1[Mac],

whereu′ is from the feedback loop. This gives thatu′ should be

u′ = −T−1[fMac].

Therefore, if the PI-controller is tuned with the constant value of−f1+f , and its

output is multiplied byT−1Mac, thenu′ becomes as the desired

u′ = T−1[−f

1 + f(1 + f)Mac] = −T−1[fMac].

This kind of structure, on the other hand, can not handle offset error fromthe inlet manifold model and the combustion model, as the feedforward termbecomes

u′′ = T−1[Mac + f ],

and the input to the engine should still beT−1[Mac]. This means thatu′′

should be

u′′ = T−1[Mac]− T−1[Mac + f ] = −T−1[f ].

The new control law is shown in Figure 4.22.

Page 48: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

38 Chapter 4. Simulations

T1(z)−1

Π

×

×

PI Σ

+−

z∗+ Ty+

λy

u′

u′′

z′

Mac

Engine

Figure 4.22: Controller structure

4.5.1 Results

The results obtained using this new control architecture are given below. TheestimateMac is obtained by using the Kalman filter. Again simulator I is usedand the sensor dynamics in the controller is set to one,T2 = 1. Note that thetables and figures correspond to the tables and figures presented earlier inSection 4.1.1.

Page 49: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.5. Factor Error Controller 39

Figure 4.23:λy: no model errors.

Figure 4.24: λy: errors in the intake manifold model. (Compare to Fig-ure 4.13)

Figure 4.25:λy: errors in the torque model. (Compare to Figure 4.14)

Page 50: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

40 Chapter 4. Simulations

Figure 4.26:λy: errors in the fuel model. (Compare to Figure 4.15)

Figure 4.27:λy: errors in all models. (Compare to Figure 4.16)

Page 51: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.5. Factor Error Controller 41

Error Min Max RMSE

0% 1 1 2.2 · 10-06

Table 4.23: Controller perfor-mance: no model errors.

Error Min Max RMSE

1% 1 1 3.17 · 10-05

2% 1 1 6.14 · 10-05

4% 0.999 1 0.0001218% 0.998 1 0.000239

Table 4.24: Controller perfor-mance: errors in the intake man-ifold model. (Compare to Ta-ble 4.14)

Error Min Max RMSE

1% 1 1 2.8 · 10-06

2% 1 1 2.8 · 10-06

4% 1 1 2.8 · 10-06

8% 1 1 2.3 · 10-06

Table 4.25: Controller perfor-mance: errors in the torque model.(Compare to Table 4.15)

Error Min Max RMSE

1% 0.925 1.04 0.008582% 0.885 1.07 0.01364% 0.844 1.11 0.01898% 0.814 1.15 0.0229

Table 4.26: Controller perfor-mance: errors in the fuel model.(Compare to Table 4.16)

Error Min Max RMSE

1% 0.925 1.04 0.008612% 0.884 1.07 0.01374% 0.843 1.11 0.01918% 0.811 1.15 0.0236

Table 4.27: Controller perfor-mance: errors in all models. (Com-pare to Table 4.17)

Page 52: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

42 Chapter 4. Simulations

4.5.2 Discussion

The results show that the controller can is able to better handle errors by afactor with the new control structure. This means that to be able to commenton how well the models need to be identified to achieve good control perfor-mance, then the models errors need to be introduced in another way. One waycould be to increase every second parameter in a model by some percentageand decrease every second parameter by the same percentage.

4.6 More Sophisticated Controller

Another idea was to test the controller performance when the fuel dynamicsis in time domain in the feedback loop, but not in the feedforward loop. Thetransformations between the event domain and time domain, and the otherway around, were done in the same way as in the more complicated simu-lator. Due to the fact that fuel pulse is piecewise constant, the intergral inEquation 2.6 can be rewritten as a summation, hence the transformation canreadily be implemented in MATLAB . The transformation at thenth variablesample instant is of the form below and thekth constant sample instant is lessor equal to thenth variable sample instant.

∂u

∂t(t) =

u(tn)tn − tn−1

, t ∈ (tn−1, tn]

uτ [k] =∂u

∂t(tn)(τk −max(τk−1, tn−1))

+∑

i:ti∈(τk−1,τk}

∂u

∂t(ti)(ti −max(ti, τk−1))

(4.13)

The mass of fuel is assumed to represent a piecewise constant fuel flow,therefore the integral in Equation 2.8 can also be rewritten as a summation.The transformation at thenth variable sample instant is on the form belowand thekth constant sample instant is less or equal to thenth variable sampleinstant.

∂Mf

∂t(t) =

Mf (τk)τk+1 − τk

, t ∈ (τk, τk+1]

Mf [n] =∂Mf

∂t(btn−1c)(min(τk, tn)− tn−1)

+∑

j:τj∈(tn−1,tn}

∂Mf

∂t(τj)(min(τj+1, tn)− τj)

(4.14)

wherebtc = sup τk : τk < t

Page 53: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.6. More Sophisticated Controller 43

4.6.1 Results

The results obtained using this more sophisticated controller are given below.Simulator II is used and the sensor dynamics in the controller are included.Mac is obtained using the method described in Section 4.2. Note that thetables and figures correspond to the tables and figures presented earlier inSection 4.1.1.

Error Min Max RMSE

0% 0.885 1.13 0.0229

Table 4.28: Controller perfor-mance: no model errors.

Error Min Max RMSE

1% 0.884 1.13 0.02282% 0.882 1.13 0.02274% 0.88 1.13 0.02288% 0.874 1.14 0.0231

Table 4.29: Controller perfor-mance: errors in the intake mani-fold model. (Compare to Table 4.9)

Error Min Max RMSE

1% 0.885 1.13 0.02282% 0.885 1.13 0.02284% 0.885 1.13 0.02288% 0.885 1.13 0.0228

Table 4.30: Controller perfor-mance: errors in the torque model.(Compare to Table 4.10)

Error Min Max RMSE

1% 0.903 1.11 0.01982% 0.917 1.12 0.02284% 0.804 1.19 0.03828% 0.607 1.35 0.0792

Table 4.31: Controller perfor-mance: errors in the fuel model.(Compare to Table 4.11)

Error Min Max RMSE

1% 0.902 1.32 0.0272% 0.916 1.12 0.02234% 0.831 1.18 0.03458% 0.66 1.28 0.0589

Table 4.32: Controller perfor-mance: errors in all models. (Com-pare to Table 4.12)

Page 54: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

44 Chapter 4. Simulations

Figure 4.28:λy: no model errors.

Figure 4.29: λy: errors in the intake manifold model. (Compare to Fig-ure 4.8)

Figure 4.30:λy: errors in the torque model. (Compare to Figure 4.9)

Page 55: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

4.6. More Sophisticated Controller 45

Figure 4.31:λy: errors in the fuel model. (Compare to Figure 4.10)

Figure 4.32:λy: errors in all models. (Compare to Figure 4.11)

Page 56: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

46 Chapter 4. Simulations

4.6.2 Discussion

The transformation gives rise to a delays in the feedback variable, thus withno model errors perfect controlling is not achieved as the results shows. Thesensor dynamics introduced here are of a low pass characteristic, thusλy willbecome smoother. This is the must likely reason why the results here arebetter then the results in Section 4.3, when a4%-error is introduced in thecombustion model.

Page 57: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Chapter 5

Conclusions

The objective of this thesis was to develop and implement an air/fuel ratiocontroller. Different control structures were developed and tested on simu-lators that were implemented in SIMULINK . The large delay in the exhaustsensor makes the system difficult to control, but this is somewhat compen-sated for by using the Smith Predictor as the basis for the control structure.The Smith Predictor was combined with feedforwarding the estimate ofMac.Several ways to estimate theMac were explored. The results indicate thatinlet manifold model should be used to estimateMac for the feedforwardcomponent, but the other control structures should be tested on a real engineunder different operational conditions to validate the results. The controllersseems to perform well in the presence of quite large model errors, thus thisappears to be a viable approach.

The results show that the controllers are most sensitive to errors in thefuel dynamics, because the inverted fuel dynamics are used in the feedfor-ward part. The feedforward part estimates how much fuel to be injected intothe cylinders with some adjusting by the feedback loop, therefore quite largeerrors in the model will affect the controller performance.

Comparing the results of Turin and Geering [1994] with the results in thisreport will not quite a fair picture, because they use indirect model referenceadaptive control that operates with fix engine speed to keep the delays fixed.They also operate under lean conditions to avoid difficulties to identify theexhaust sensor dynamics. Here the engine speed varies, but the delays arefixed. Making the delays depend on engine speed will probably improve thecontrol performance, when tested on a real engine.

5.1 Futher work

As mentioned above the controller should be tested on a real engine to geta better idea if any of the proposed methods are viable in practice. Further

47

Page 58: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

48 Chapter 5. Conclusions

investigation of the controllers performance compared between the severaltypes developed in this thesis, when tested on a real engine where other dis-turbances exist would be an interesting exercise.

When the models are identified online, the estimated parameters shouldbe used to tune the controller. This would be straight forward to implementwith the controllers structures used here.

The transformation from the event domain to the time domain and viceversa presented here may not be the best way and requires future investiga-tions. One idea worth looking into is to build in the transformation of thefuel dynamics, where the sampled system matrices, which are an approxi-mation of the time continuous system, are recalculated each sample instant.The states are chosen so that the meaning of them are preserved between thesample instants.

It would be interesting to do simulations where other kind of errors, thanmodel errors, where introduced and see how that is handled by the controllers.For example, measurement noise could be added. It would also be interest-ing to test the idea discussed in Section 4.5.2, where the model errors wereintroduced in another way.

The results in Section 4.5 show that the controller is better to handle errorsby a factor when the output from the PI-controller is multiplied byT−1Mac,instead of having the multiplication before the PI-controller. This method isbetter at handling offset errors. A new control structure that could be tested isto combine these two methods and putt two PI- controllers in parallel whereone has the multiplication before and the other after.

Page 59: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

References

T. Glad and L. Ljung.Reglerteknik. Grundlaggande teori. Studentlitteratur,Lund, Sweden, 2nd edition, 1989. In Swedish.

Fredrik Gustafsson, Lennart Ljung, and Mille Millnert.Signalbehandling.Studentlitteratur, 2001.

John B. Heywood.Internal Combustion Engine Fundamentals. McGraw-HillBook Co, 1988.

Rudolph Emil Kalman. A new approach to linear filtering and predictionproblems.Transactions of the ASME —Journal of Basic Engineering, 82(Series D):35–45, March 1960.

L. Ljung and T. Glad.Reglerteori. Flervariabla och olinjara metoder. Stu-dentlitteratur, Lund, Sweden, 1997.

Henrik Tidefelt. Identification of an SI engine under normal operating condi-tions. Master’s thesis LiTH-ISY-EX-3590-2004, Department of ElectricalEngineering, Linkopings Universitet, Linkoping, Sweden, June 2004.

Raymond C. Turin and Hans P. Geering. Model-based adaptive fuel controlin an SI engine.SAE Technical Paper, 940374, 1994.

Vance J. VanDore. Control engineering overcoming the deadtime dilemma.internet, May 2004. http://www.manufacturing.net/ctl/article/CA186211.

J. S. Welsh, G. C. Goodwin, R. H. Middleton, and J. De Dona. Adaptivepowertrain control, report 1. Technical report, University of Newcas-tle, Australia, 2002. Confidential. Requests shall be sent to James Welsh([email protected]).

49

Page 60: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

50

Page 61: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Notation

Symbols used in the report.

Variables and parameters

δ Spark advanceλ Normalised air/fuel ratio by the stoichiometric ratio

Mac Mass of air in cylinderMf Mass of fuel in cylinderf1 Inlet manifold modelf2 Combustion modelT1 Fuel dynamics modelT2 Exhaust sensor dynamics model

Maf Air mass flowPm Pressure in the inlet manifoldu Fuel pulse

dac A four samples delaydsa A one samples delayTsv Variable sample timeTsc Constant sample timeT TorqueD1 Delay to torqueD2 Delay to air/fuel ratio sensorz Estimated fuel/air ratio

M1 Mass air charge estimated from the inlet manifold modelM2 Mass air charge estimated from the combustion model

operators

The operation showed in Figure 5.1 is the same as

U = T (M)−1.

51

Page 62: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

52 Notation

÷

×T

M

Figure 5.1: The division operation

Page 63: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Appendix A

RLS algorithm

The recursive least squares with forgetting factor algorithm

θ[k] = θ[k − 1] + K[k](y[k]− ϕT [k]θ[k − 1]) (A.1)

K[k] = P [k]ϕ[k] (A.2)

P [k] =(

P [k − 1]− P [k − 1]ϕ[k]ϕT [k]P [k − 1]µ + ϕT [k]P [k − 1]ϕ[k]

)/µ (A.3)

whereµ is the forgetting factor. [Gustafsson et al., 2001]

53

Page 64: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Appendix B

Design parameter R

In this appendix we describe how the covariance matrixR was derived. If weassume that the air charge estimated from the inlet manifold model (M1) andfrom the combustion model (M2)are independent and

E(M1) = Mac, E((M1 −Mac)2

)= R11

E(M2) = q−4Mac, E((M2 − q−4Mac)2

)= R22

We can use the fact that the controller performance is measured on a sim-ulator and use air charge to determined the variances.

R11 = mean((M1 −Mac)2) (B.1)

R22 = mean((M2 − q−4Mac)2) (B.2)

The values are calculated toR11 = 8.3697 · 10−4 andR22 = 9.12495 ·10−4.

54

Page 65: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Appendix C

Results

C.1 Heuristic Filter

Figure C.1: λy: errors in the intake manifold model.

Figure C.2: λy: errors in the torque model.

55

Page 66: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

56 Appendix C. Results

Figure C.3: λy: errors in the fuel model.

Figure C.4: λy: errors in all models.

Page 67: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

C.2. No Torque Measurement 57

C.2 No Torque Measurement

Figure C.5: λy: errors in the intake manifold model.

Figure C.6: λy: errors in the torque model.

Page 68: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

58 Appendix C. Results

Figure C.7: λy: errors in the fuel model.

Figure C.8: λy: errors in all models.

Page 69: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

C.3. Kalman Filter 59

C.3 Kalman Filter

Figure C.9:λy: errors in the intake manifold model. (Compare to Figure C.5)

Figure C.10:λy: errors in the torque model. (Compare to Figure C.6)

Page 70: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

60 Appendix C. Results

Figure C.11:λy: errors in the fuel model. (Compare to Figure C.7)

Figure C.12:λy: errors in all models. (Compare to Figure C.8)

Page 71: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

C.4. Error Variance Estimation 61

C.4 Error Variance Estimation

Figure C.13: λy: errors in the intake manifold model. (Compare to Fig-ure C.5)

Figure C.14:λy: errors in the torque model. (Compare to Figure C.6)

Page 72: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

62 Appendix C. Results

Figure C.15:λy: errors in the fuel model. (Compare to Figure C.7)

Figure C.16:λy: errors in all models. (Compare to Figure C.8)

Page 73: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

C.5. Factor Error Controller 63

C.5 Factor Error Controller

Figure C.17: λy: errors in the intake manifold model. (Compare to Fig-ure C.9)

Figure C.18:λy: errors in the torque model. (Compare to Figure C.10)

Page 74: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

64 Appendix C. Results

Figure C.19:λy: errors in the fuel model. (Compare to Figure C.11)

Figure C.20:λy: errors in all models. (Compare to Figure C.12)

Page 75: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

C.6. More Sophisticated Controller 65

C.6 More Sophisticated Controller

Figure C.21: λy: errors in the intake manifold model. (Compare to Fig-ure C.5)

Figure C.22:λy: errors in the torque model. (Compare to Figure C.6)

Page 76: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

66 Appendix C. Results

Figure C.23:λy: errors in the fuel model. (Compare to Figure C.7)

Figure C.24:λy: errors in all models. (Compare to Figure C.8)

Page 77: Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions19780/FULLTEXT01.pdf · 2006-03-22 · Air/Fuel Ratio Control of an SI-Engine Under Normal Operation Conditions

Copyright

Svenska

Detta dokument halls tillgangligt pa Internet - eller dess framtida ersattare -under en langre tid fran publiceringsdatum under forutsattning att inga extra-ordinara omstandigheter uppstar.

Tillg ang till dokumentet innebar tillstand for var och en att lasa, ladda ner,skriva ut enstaka kopior for enskilt bruk och att anvanda det oforandrat forickekommersiell forskning och for undervisning.Overforing av upphovsrattenvid en senare tidpunkt kan inte upphava detta tillstand. All annan anvandningav dokumentet kraver upphovsmannens medgivande. For att garanteraaktheten,sakerheten och tillgangligheten finns det losningar av teknisk och administra-tiv art.

Upphovsmannens ideella ratt innefattar ratt att bli namnd som upphovs-man i den omfattning som god sed kraver vid anvandning av dokumentet paovan beskrivna satt samt skydd mot att dokumentetandras eller presenterasi sadan form eller i sadant sammanhang somar krankande for upphovsman-nens litterara eller konstnarliga anseende eller egenart.

For ytterligare information om Linkoping University Electronic Press seforlagets hemsida:http://www.ep.liu.se/

English

The publishers will keep this document online on the Internet - or its possiblereplacement - for a considerable time from the date of publication barringexceptional circumstances.

The online availability of the document implies a permanent permissionfor anyone to read, to download, to print out single copies for your own useand to use it unchanged for any non-commercial research and educationalpurpose. Subsequent transfers of copyright cannot revoke this permission.All other uses of the document are conditional on the consent of the copy-right owner. The publisher has taken technical and administrative measuresto assure authenticity, security and accessibility.

According to intellectual property law the author has the right to be men-tioned when his/her work is accessed as described above and to be protectedagainst infringement.

For additional information about the Linkoping University Electronic Pressand its procedures for publication and for assurance of document integrity,please refer to its WWW home page:http://www.ep.liu.se/

c© Anna RosenLinkoping, 17th August 2004