Title Adaptive air-fuel ratio control for combustion ...320940/FULLTEXT01.pdfposes a self-optimized...

68
Title Adaptive air-fuel ratio control for combustion engines Master thesis performed in automatic control at Linköping University by Eva Lundin LiTH-ISY-EX--07/3023--SE Supervisor: Anders Movert/Olle Fast Examiner: Svante Gunnarsson Linköping 2007-03-27

Transcript of Title Adaptive air-fuel ratio control for combustion ...320940/FULLTEXT01.pdfposes a self-optimized...

TitleAdaptive air-fuel ratio control for combustion engines

Master thesis performed in automatic control at Linköping University

by

Eva LundinLiTH-ISY-EX--07/3023--SE

Supervisor: Anders Movert/Olle Fast

Examiner: Svante Gunnarsson

Linköping 2007-03-27

Presentation Date

2007-03-27 Publishing Date (Electronic version)

Department and Division

Department of Electrical Engineering

URL, Electronic Versionhttp://www.ep.liu.se

Publication Title Adaptive air-fuel ration control for combustion engines

Author(s)Eva Lundin

Abstract

Around the world, vehicle emission regulations become stricter, increasing exhaust emission demands. To manage these rules and regulations, vehicle manufacturers put a lot of effort into minimizing the exhaust emissions. The three-way catalytic converter was developed, and today it is the most commonly used device to control the exhaust emissions.

To work properly the catalytic converter needs to control the air-fuel mixture with great precision. This then increases the demands on the engine management systems, causing them to become more complex. With increased complexity, the time effort of optimizing parameters has grown drastically, hence increasing development costs. In addition to this, operating conditions change due to vehicles age, requiring further optimization of the parameters while running. To minimize development cost and to control the air-fuel mixture with great precision during an engines full life span, this master thesis proposes a self-optimized system, i.e. an adaptive system, to control the air-fuel mixture.

In the suggested method, the fuel injection to the engine is controlled with help of a linear lambda sensor, which measures the air-fuel mixture. The mapping from injection to measured air-fuel mixture forms a nonlinear system. It can be approximated as a linear function at static engine operating points, allowing the system at each static point to be modelled asa first order system with long time delay. To enable utilization over full operating area, and not only in static point, the controller uses large maps, so called gain-scheduling maps, to change control parameters.

The tested controller is model based. It uses an Otto-Smith Predictor and a feed forward connection of target air-fuel. The model parameters in the controller are updated while driving and the adaptation method used is based on a least squares algorithm.

The performance of the adapted controller and the adaptation method is tested in both simulation environment and in vehicle, showing good potential.

Number of pages: 50

Keywords

Adaptive gain scheduling, lambda control, Otto-Smith control, emission control, model based control, engine optimization, automotive control.

Language

x English Other (specify below)

Number of Pages 50

Type of Publication

Licentiate thesis x Degree thesis Thesis C-level Thesis D-level Report Other (specify below)

ISBN (Licentiate thesis)

ISRN:

Title of series (Licentiate thesis)

Series number/ISSN (Licentiate thesis) LiTH-ISY-EX--2007/3023--SE

AbstractAround the world, vehicle emission regulations become stricter, increas-ing exhaust emission demands. To manage these rules and regulations, vehicle manufacturers put a lot of effort into minimizing the exhaust emissions. The three-way catalytic converter was developed, and today it is the most commonly used device to control the exhaust emissions.

To work properly the catalytic converter needs to control the air-fuel mix-ture with great precision. This then increases the demands on the engine management systems, causing them to become more complex. With increased complexity, the time effort of optimizing parameters has grown drastically, hence increasing development costs. In addition to this, oper-ating conditions change due to vehicles age, requiring further optimiza-tion of the parameters while running.

To minimize development cost and to control the air-fuel mixture with great precision during an engines full life span, this master thesis pro-poses a self-optimized system, i.e. an adaptive system, to control the air-fuel mixture.

In the suggested method, the fuel injection to the engine is controlled with help of a linear lambda sensor, which measures the air-fuel mixture. The mapping from injection to measured air-fuel mixture forms a nonlinear system. It can be approximated as a linear function at static engine operat-ing points, allowing the system at each static point to be modelled as a first order system with long time delay. To enable utilization over full operating area, and not only in static point, the controller uses large maps, so called gain-scheduling maps, to change control parameters.

The tested controller is model based. It uses an Otto-Smith Predictor and a feed forward connection of target air-fuel. The model parameters in the controller are updated while driving and the adaptation method used is based on a least squares algorithm.

The performance of the adapted controller and the adaptation method is tested in both simulation environment and in vehicle, showing good potential.

AcknowledgmentFirst, I would like to thank Anders Movert, who was the initiator of this master thesis. Without his ideas this master thesis would never have been started. He has been my supervisor in control theory. I also would like to thank my other supervisor Olle Fast, who has helped me with emission theory and given me valuable advises for this report.

Further, a special thank to my examiner Svante Gunnarsson, who has guided me through this work.

During this work, I also have had help from Ervin Vannas to program the Volvo Rapid Prototyping System, and to keep up the spirit, thank you.

Thanks also to my company Rücker Nord and my colleague Dain Enge-bretsen who has put an American touch on the language.

Finally, I would like to thank all members of the Lundin family.

Contents

1 Introduction 11.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.4 Previous work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Theoretical background 42.1 Combustion theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.2 Exhaust system theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.3 Exhaust emission control system theory . . . . . . . . . . . . . . . 52.4 Air and fuel flow theory . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.5 Linear approximation of air-fuel system . . . . . . . . . . . . . . 10

3 Control system design 123.1 Otto Smith controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.2 Gain scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.3 Adaptive gain scheduling . . . . . . . . . . . . . . . . . . . . . . . . . 173.4 Control system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4 Identification 234.1 Input signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.2 Sample time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.3 Data collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.4 Prefiltering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.5 Outliers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5 Implementation 295.1 Controller algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295.2 Identification algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

6 Simulations 366.1 Matlab Simulink model for identification . . . . . . . . . . . . . 366.2 Identification result of simulation . . . . . . . . . . . . . . . . . . . 386.3 Matlab Simulink Model for controller . . . . . . . . . . . . . . . 406.4 Control result of simulation . . . . . . . . . . . . . . . . . . . . . . . . 42

7 Experiments 437.1 Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437.2 Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457.3 Identified parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

8 Conclusions and future work 47

9 References 49

Chapter 1 - Introduction

- 1 -

1 Introduction

1.1 BackgroundIn many places around the world, vehicle emission regulations have become stricter. To manage these rules and regulations, vehicle manufac-turers have had to minimize the emissions by developing emission control systems. Today the three-way catalytic converter is the most commonly used exhaust emission control device.

The catalytic converter oxidizes the toxic exhaust fumes and reduces them to mainly carbon dioxide and water. To work properly the catalytic converter needs to control the air-fuel mixture with great precision. This then increases the demands on the engine management systems, causing them to become more complex. With increased complexity, the time effort of optimizing parameters has grown drastically, hence increasing development costs. When vehicles age the operating conditions change, and this also requires further optimization of the parameters while run-ning.

One way to reduce these problems is to construct a self optimized system, i.e. an adaptive system.

1.2 ObjectivesThe aim of this master thesis is to reduce emissions, fuel consumption and optimization time of the control system. This will be done by designing, analyzing and implementing an adaptive air-fuel mixture control system. This adaptive control system should automatically find its optimal control parameters for every operating condition. Adaptive parameters will allow for better control of the system, which will reduce the fuel consumption. This will also lower the emissions of HC, NOx and CO by creating better conditions for the catalytic converter. Optimization cost will be reduced by using an automatic method to find optimal parameters and thus improving the quality of the system.

1.3 PrerequisitesThis master thesis was carried out at Volvo Car Cooperation in coopera-tion with Nord Systems and Department of Electrical Engineering at Linköping University. Volvo Car Cooperation has provided help with the catalytic converter, measurement methods and necessary testing materi-als. Nord Systems has given valuable guidance in control theory and com-puter programming.

Chapter 1 - Introduction

- 2 -

Means of disposal were:

-Working site with writing-desk and computer.

-Matlab, Simulink and Microsoft C++

-Measurement equipment for logging the engine control system.

-Volvo Rapid Prototyping System (VRPS) for Hardware in the Loop.

1.4 Previous workA lot of work is presented in the literature on the control of the air-fuel ratio into a naturally aspirated engine. The presented controllers are usu-ally divided into two parts, one transient feed forward controller and one stationary feedback controller, as in [1] to [6].

In [1] the feed forward controller consists of an observer and a predictor using a mean value engine model. The stationary feedback controller con-sists of a PI controller with feedback from a wide-band oxygen sensor. Also [4] and [5] use an engine model for the feed forward controller and as stationary feedback controller [5] uses a PI controller and [4] uses a PID controller.

In [6] the solution for the feed forward controller is based on an event-based engine model and the feedback controller is a -controller. The

-controller is also presented as a potential feedback controller by [14]. According to [14] it is also reported that a significant improvement of the controller performance can be achieved by considering the engine time delays in the controller design.

The feedback control loop from the injectors to the lambda sensor is often presented as a first order model with time delay as presented below

(1)

were Y is measured air-fuel ratio at the sensor and U is the fuel injection command signal. For example, this model is used in both [2] and [3]. The same linear approximation is also presented in [14], where the dynamics between fuel injection command signal and measured air-fuel ratio are modeled by a cascaded connection of a first-order low-pass filter and a time delay element.

In [14] there is also presented a method to identify the model parameters K, � and L for static operating points. The identification is done by using a recursive least-square algorithm, with help of knowledge about engine

H�H�

Y s� � KesL–

1 s�+--------------U s� �=

Chapter 1 - Introduction

- 3 -

speed, airflow, density and temperature of the exhaust gas. A state-space representation of the model with the time delay in fractions is used. The results presented in [14] show that the algorithm is sensitive to input-out-put filtering but works well with a good initialization. The authors none-theless recommend an automatic identification like the one presented to be used to generate parameter maps i.e. gain scheduling maps.

Gain-scheduling is often used in engine management systems to compen-sate for nonlinearities and to make the controller work in the whole oper-ating area as in [1] to [6]. In [15] gain scheduling is presented as a good method to model nonlinearities as in, for example, the air-fuel system, especially if there is some possibility to use an automatic method to parameterize the maps.

Two different automatic methods to update the gain scheduling maps are presented in [4]. The first algorithm uses equal updates of each corner point in the maps and the second uses distance dependent weights. In both algorithms the error is directly added into the maps. Another often used method for parameter identification is the least-square method. It is used in both [14] and [6].

In any case, gain scheduling is not always the method used. In [2] a model based controller without gain scheduling is compared with two traditional controllers with gain scheduling and separated transient and static control. The result of the controller performance is similar in all three algorithms, but according to [2] the model based controller was easier to tune.

Chapter 2 - Theoretical background

- 4 -

2 Theoretical background

2.1 Combustion theoryDuring combustion in the engine, the fuel (a mixture of different hydro-carbons) reacts with oxygen, releasing thermal energy. Simultaneously new substances, exhaust fumes, are created as a result of the combustion reaction. Some of these new substances have a negative influence on our environment, and thus it is necessary to minimize them. Hydrocarbons (HC), carbon monoxide (CO) and nitrogen oxides (NOx) are the main concern.

The combustion oxygen is taken from the surrounding air. One kilogram of fuel requires approximately 14,7 kilograms of air, which correspond to 10 000 litres of air per litre of fuel. Theoretically, this is the ideal air-fuel ratio for optimal combustion [8].

Usually the supplied air-fuel ratio differs from the ideal air-fuel ratio and therefore another special ratio, the lambda-value, is used to differentiate these values.

(2)

If the engine is supplied with more fuel than ideally, the lambda-value becomes less than 1,0, and when the engine is supplied with less fuel than ideally, the lambda-value becomes greater than 1,0. Since the supplied air-fuel ratio has an effect on both the combustion and the composition of the exhaust fumes, it is important to be able to control this ratio carefully.

2.2 Exhaust system theoryUnder ideal combustion conditions carbon dioxide (CO2) and water are the only by-products of the process. Normally the nitrogen in the air is unwilling to react with other substances and it is not active during the pro-cess, but a car engine seldom works under ideal conditions. The problems that occur in normal conditions in an engine are usually the following: The fuel does not have enough time to diffuse in the air to complete a bal-anced air-fuel mixture, the flame speed across the air-fuel mixture is not as fast as desired and incomplete combustion occurs. Other problems that disturb the combustion are the surfaces and shape of the combustion chamber affecting the combustion in the outer regions of the chamber [8].

Therefore, during normal combustion conditions hydrocarbons (HC), car-bon monoxide (CO), nitrogen oxides (NOx), carbon dioxide (CO2) and

� actual air/fuel ratioideal air/fuel ratio---------------------------------------------

X14,7----------= =

Chapter 2 - Theoretical background

- 5 -

water are produced. Hydrocarbons and carbon monoxide are mainly pro-duced by un-combusted or partly combusted fuel. NOx, is the description of both nitrogen oxide (NO) and nitrogen dioxide (NO2) produced during combustion. NOx is created at high temperature and high pressure in the combustion chamber. Under those circumstances the enclosed nitrogen in the air reacts with the oxygen, generating NOx [8].

Figure 1 Relative amount of exhaust fumes (HC, CO and NOx) at specific lambda value.

When the relative amount of CO, HC and NOx are measured at different lambda values the correlation between the exhaust fumes and the lambda value are presented in Figure 1. The x-axis is the lambda value and the y-axis represents the relative emission concentrations [4].

2.3 Exhaust emission control system theoryExhaust emission control systems are used to minimize the dangerous substances, CO, HC and NOx in the exhaust fumes. The most commonly used exhaust emission control system is the three-way catalytic converter system.

The three-way catalytic converter uses a chemical reaction forcing NOx, CO and HC to react with each other and form nitrogen, carbon dioxide and water. With the three-way catalytic converter, the exhaust fumes are affected drastically as shown in Figure 2 [4].

,

Chapter 2 - Theoretical background

- 6 -

Figure 2 Conversion of the exhaust fumes using a three-way catalytic converter. Dashed line is exhaust fumes before catalytic conversion and solid line is exhaust fumes after catalytic conversion.

As shown in Figure 2, the three-way catalytic converter reduces the toxic substances, especially around the lambda value one. To be able to fully use the capacity of the catalytic converter it is necessary to control lambda value accurately.

2.4 Air and fuel flow theory The air flow is used to control the torque that the combustion produces. Air and fuel are mixed in the intake port before being transported to the cylinder. To control the air-fuel mixture (lambda) given to the cylinder, the fuel injection time is used. The fuel injection time is calculated from the predicted air mass.

2.4.1 Air flow theoryFirst, air passes the throttle device that controls the air flow into the engine. Then the air enters the intake manifold, a volume which buffers the air flow, to get a smooth pressure into the cylinders, shown in Figure 3. Finally, the air mixes with the fuel just before the intake port [10].

,

Chapter 2 - Theoretical background

- 7 -

Figure 3 Air flow through intake manifold on a five cylinder engine1. Measured air flow2. Air flow entering the intake ports

The air flow that is controlled by the throttle is used to control the torque produced by the combustion process. The air flow sets the maximum limit of torque able to be produced.

The measured air flow is slower than the real air flow entering the intake port, so to get a correct lambda the real air flow needs to be predicted. The predicted air mass is calculated when the throttle command signal, Xth, is entered into the model of the throttle and intake manifold, Gtm, shown in Figure 4.

Figure 4 Calculation of predicted air mass, M. The predicted air mass is calculated by filtering the throttle command, Xth, through a model of the throttle and the intake manifold, Gtm.

The predicted air mass, M, is then used to calculate the fuel injection time, tnom.

2.4.2 Fuel flow theoryIdeally, the fuel injection time, tnom, is proportional to the predicted air mass. Although in normal conditions the amount of fuel injected into the intake port differs from the amount of fuel that mixes with the air flowing into cylinders. This is due to the fuel that deposits on the wall of the

Throttle

Intake manifold

1.

Intake ports

2.

GtmXth M

Chapter 2 - Theoretical background

- 8 -

intake pipe, building up a fuel film, as demonstrated in Figure 5 [10].

Figure 5 The fuel flow in the intake pipe, fuel deposits on the wall before it enters cylinder, creating a fuel puddle.1. Fuel injected into the intake port.2. Fuel deposit on the wall.3. Fuel directly injected.4. Fuel evaporating from the fuel film.

The phenomena of a fuel film deposit and evaporation of the fuel is called the wall wet phenomena. The wall wet phenomena complicates the calcu-lation of the air fuel mixture.

2.4.3 Air and fuel system modelThe actual air and fuel mixture given to cylinders is dependent on the wall wet phenomena, accuracy of the predicted air mass model and the dynam-ics of the fuel injectors.

In this Master Thesis ��will be used instead of � to control the air-fuel mixture where � is the inverse of �.

The air and fuel system is represented in the model shown in Figure 6.

1.

2. 3.

4.

Chapter 2 - Theoretical background

- 9 -

Figure 6 Model of the engine air and fuel control system. The injection time, tinj, is controlled by R to follow the target fuel-air mixture, �set, by measuring the exhaust fuel-air mixture, �meas, but the real fuel-air mix-ture, �in, given to the engine, is dependent of the true injected fuel mass, mcyl, and the real air mass, MR. The real air mass is given by the pre-dicted air mass, M, filtered through the error of the predicted air mass model, Getm, and the true injected fuel mass is dependent of the wall wet dynamics, Gw and the coefficient for the injectors, Kinj.

The actual fuel-air mixture, �in, applied to cylinders is controlled to �set,target fuel-air mixture, by changing the injection time, tinj. The real injec-tion time is the result of a multiplicative correction of the nominal injec-tion time, tnom, made by signal u from the lambda controller, R. The nominal fuel injection time is given by the predicted air mass, M, multi-plied with the constant K1. The real injection time is translated to an injected fuel mass, minj, by the fuel injectors with the coefficient Kinj. The injected fuel mass thereafter goes through Gw, the wall wet dynamics, giving mcyl, the true mass of fuel, applied to the cylinder which is multi-plied with the inverse of the real air mass, MR. The real air mass is calcu-lated from the predicted air mass, M, driven through Getm, the dynamics of the model error of Gtm. As explained earlier the predicted air mass, M,is calculated form the throttle command signal Xth passing through Gtm,

*

*

Gtm Getm 1/X

K1

Kinj Gw

K2 Gs

R

Xth M MR

tnom

u

tinj minj

mcyl

��in �meas

����set

Chapter 2 - Theoretical background

- 10 -

the model of the throttle and intake manifold. The true mass of fuel divided with the true mass of air is then multiplied with the constant K2,which is the stoichiometric air fuel ratio, creating �in. The actual fuel-air mixture is then driven through Gs creating �meas. Gs is a model of the dynamics of the cylinders, exhaust manifold and the lambda sensor,

The difference between the calculated and the finally applied air-fuel mixture to cylinders is dependent on errors created by the model of the wall wet dynamics, errors of the load model and nonlinearities in the fuel injectors. These are the three major sources of nonlinearities in the lambda control loop. If the correction of these effects is poor, there will be large deviations in the lambda value during transients which are not possi-ble to correct by the lambda controller due to the large time delay in the system.

In this thesis, the lambda controller is designed with the assumption that the effects from the previously explained dynamics are eliminated. With this assumption the closed loop of the system will be linear.

2.5 Linear approximation of air-fuel systemThe system, Gs, that we want to control, from �in to �meas, can be described with a simple model, where the process is supposed to be of first order with a long time delay [14].

(3)

U = fuel-air mixture given to the cylinder, �in=1/�in [***]

Y = measured fuel-air mixture in the exhaust manifold, �meas [***]

K = static gain, [***]

� = time constant for gas dynamics, [s]

L = time delay for gas transportation, [s]

The measurement device used to determine Y is an oxygen sensor, basi-cally a linear �-sensor, situated in the exhaust manifold between the exhaust valves and the catalytic converter. The objective is to make Y fol-low a reference value, Yref, which is created by a controller in cascade. This controller reads the voltage from a binary �-sensor situated after the catalytic converter. The bandwidth of Yref is high, which puts strong demands on the set point response.

Y s� � KesL–

1 s�+--------------U s� �=

Chapter 2 - Theoretical background

- 11 -

To be able to use the linear approximation over the whole engine operat-ing area different values on K,�� and L are necessary. Every engine opera-tion point, (i.e. every engine speed and engine load point) will need specific values on K,�� and L.

Chapter 3 - Control system design

- 12 -

3 Control system designSince the time delay L of the system is quite large, the controller needs to have some kind of predictive compensation for the time delay. A natural choice is to use an Otto Smith controller with gain scheduling, which makes a predictive compensation for the time delay over the whole engine operating area.

3.1 Otto Smith controllerThe Otto Smith controller is a controller especially designed for systems with long time delays. Long time delays give a large negative phase shift to the system, which reduces the phase margin and makes it difficult to get a stable system with high gain. The Otto Smith controller manages this problem by making a predictive compensation for the time delay [7, 11].

Figure 7 The Otto Smith Controller controls the system Ge-sT to follow the reference signal r by measuring y. The controller consists of a transfer function F, a model of the system with time delay and a model of the sys-tem without time delay.

The concept is to create a transfer function F which gives the desired dynamics to the system without time delay (i.e. give the closed loop sys-tem FG/(FG+1) good characteristics) and then apply the compensation for the time delay, as shown in Figure 7. This will give the following

closed loop transfer function (FG/(FG+1))e-sT. As shown in Figure 7 the

Otto Smith controller needs the model Ge-sT of the system for implemen-tation.

�� ��

Ge-sT

Ge-sT

G

F

-

+

+

-

yr

Otto Smith Controller

+

-

Chapter 3 - Control system design

- 13 -

In our problem the Gs system, explained in Section 2.5, is represented by

Ge-sT. Estimates of the model parameters K,�� and L are necessary since these parameters are used in the controller. Analyses of the system show that these parameters change with the variables engine speed and load. Therefore, engine speed and load will be used to change K, � and L in our controller.

3.2 Gain schedulingGain scheduling could be used to change controller parameters, when it is possible to track measurable variables that correlate well with the varia-tions of the process dynamics. Gain scheduling is a method which uses a large map with different process parameter (K, � and L) values for each variable value (engine speed and load). When the state of the process changes, the variables will change and the parameters of the process model will change with them, by looking up the right values in the map [7, 15].

In this thesis, gain scheduling is used for control model parameters K,�and L, since they change with engine speed and engine load. One map is created for each parameter. When the engine speed or engine load changes, the process parameters K, � and L will directly change with them, by looking up the corresponding parameter values in the maps.

A gain scheduling map consists of a matrix with I rows and J columns as shown in Figure 8, and every element corresponds to a parameter value aij. In this thesis parameter value aij represents Ki,j,�i,j or Li,j. Index i cor-responds to a specific engine speed value, nei, and index j corresponds to a specific engine load value, lj.

Chapter 3 - Control system design

- 14 -

Figure 8 Gain scheduling matrix withaij = parameter value (Ki,j,�i,j or Li,j) corresponding to engine speed neiand engine load ljnei = engine speed value at x-axis point i lj = engine load value at y-axis point j

The axis values nei and lj are monotonically increasing, which means

(nei < nei+1) and (lj < lj+1).

A gain scheduling map could also be represented as Figure 9.

lJ

lj+1

ljl2

l1

a1,J a2,J ai,J ai+1,J aI,J

a1,j+1 ai+1,j+1 aI,j+1

a1,j ai,j aI,j

a1,2 a2,2 aI,2

a1,1 a2,1 ai,1 ai+1,1 aI,1

ne1 ne2 nei nei+1 neI,J |

Chapter 3 - Control system design

- 15 -

Figure 9 Gain scheduling map, with definitions.ai,j is parameter value for nei and ljnei is engine speed value at x-axis point ilj is engine load value at y-axis point jne is current engine speedl is current engine load� is a weight value for engine speed used to calculate a(ne,l)�1 is a weight value for engine load used to calculate a(ne,l)a(ne,l) is parameter value at engine speed ne and engine load l.

At a given engine speed ne and engine load l the corresponding parameter value a(ne,l) is found by combining the values of the adjacent parameters. The weights, �i,j, for the adjacent parameters are calculated with bilinear interpolation by using ��and �1 [4], which is defined as

(4)

(5)

ai,j+1

��

��

load

speednei nei+1

lj

lj+1

ai,j

ai+1,j+1

ai+1,j

ne

l a(ne,l)

�ne nei–

nei 1+ nei–----------------------------=

�1

l lj–

lj 1+ lj–--------------------=

Chapter 3 - Control system design

- 16 -

were

ne = Current engine speed.l = Current engine load

nei < ne < nei+1 and li < l < li+1

nei = Engine speed value at axis point ilj = Engine load value at axis point j

By help of ��and��1 the ��- values of each corners becomes

(6)

(7)

(8)

(9)

The parameter value a(ne,l) is then calculated as

(10)

If the current driving condition corresponds exactly to nei and lj then the model function parameter for the current engine load and engine speed is exactly the parameter value ai,j, as shown in Figure 10.

Figure 10 Parameter map with engine operating point corresponding directly to ai,j.

Engine operating point (� - value =1)

Adjacent parameters (� - values = 0)

In this case the weight, �, becomes one for ai,j and zero for the other three parameters.

If the current load and engine speed have the same distance to every axis point, as in Figure 11, then all four parameters will be weighted equally.

�i j� 1 �–� � 1 �1–� �=

�i j 1+� 1 �–� ��1=

�i 1 j�+ � 1 �1–� �=

�i 1 j 1+�+ ��1=

a ne l�� � �i,jai,j�i+1,jai+1,j

�i,j+1ai,j+1

�i+1,j+1ai+1,j+1

++ +=

ai,j

Chapter 3 - Control system design

- 17 -

Figure 11 Parameter map with engine operating point in the middle of a square.

Engine operating point

Parameter to be adapted (� - value =1/4)

In other words this means that � becomes 1/4 for each corner. As explained earlier, every operating point will have a specific � - value for each parameter adjacent to given engine speed and engine load.

3.3 Adaptive gain schedulingTo minimize time effort for optimization of the maps and to be able to adjust the maps when the vehicles are aging, the parameter maps need to optimize themselves while running. It is called adaptive gain scheduling when parameter maps update themselves while running [7, 15].

Driving conditions (i.e. engine speed and engine load point) will deter-mine which parameter values to be updated for the system. The parame-ters to be updated at a specific driving condition is the parameter values adjacent to given engine speed, ne, and engine load, l, as shown in Figure 12.

Chapter 3 - Control system design

- 18 -

Figure 12 Parameter map with marks for engine operating point and parameter values to be adapted.

Engine operating point

Parameter to be adapted ai,j, ai+1,j, ai,j+1 and ai+1,j+1

The four parameters to be updated, ai,j, ai+1,j, ai,j+1 and ai+1,j+1, corre-spond to nei, nei+1, lj and lj+1, where (nei < ne < nei+1) and (lj < l < lj+1).

The parameter ai,j represent Ki,j, �i,j or Li,j and a(ne,l) represents K(ne,l),�(ne,l) or L(ne,l).

Each parameter is updated with an individual error. The errors of the four parameters to update are weighted with �, which depends on the values of load and engine speed as described in previous Section.

The idea is to minimize the error between measured lambda, �meas, and modeled lambda, Ym, by iteratively improving K, ��and L in the model

(11)

The model Ym is described in Section 2.5. The input signal U corresponds to �in.

The adaptation method used minimizes the square of the prediction error multiplied by the distance dependent weight, �, with respect to the model parameters K, � and L. The criterion, J, for each parameter to be updated is

load

speed

ai,j+1

ai,j ai+1,j

ai+1,j+1

nei nei+1

ne

lj

lj+1

l

Ym s� � KesL–

1 s�+--------------U s� �=

Chapter 3 - Control system design

- 19 -

(12)

where the error, Ek, for each corner is as follows.

(13)

(14)

While collecting data, the engine operating point (ne,l) need to be stable inside (nei < ne < nei+1) and (lj < l < lj+1) during the whole data collec-tion time. If the engine operating condition crosses an axis point before the data collection time, n, is passed, the data collection time is restarted in the new area, and the adaption in the the previous area is cancelled.

If we define � as a vector of �����and L

(15)

the update of each parameter will become

(16)

where

(17)

H is the hessian of the function J with respect to �� and ��is the step length for the update of the parameters [15]. Special conditions are needed in order to get a good estimate of �, and these conditions are presented in Section 4.

J �� �Ek �� �2

2-----------------

k 1=

n

�=

Ek �k*�ki j�=

�k YkmfYkf

–=

Ykmffiltered model output at sample k = filtered Ykm

=

Ykf filtered real output at sample k = filtered �meas at sample k=

�ki,jdistance dependent weight at sample k=

n data collection time = samples to wait before update=

� K � LT

=

� t 1+� � � t� � � H � t� �� �� �1– �J � t� �� �

��-------------------–=

H �� � J2 �� ��

�2�----------------=

Chapter 3 - Control system design

- 20 -

3.4 Control systemThe implemented feedback control system is presented in Figure 13. The system consists of an Otto Smith controller and a feed forward connec-tion. The controller parameters K,� and L are constantly adapted by the identification.

Figure 13 The control system consists of a feed-forward connection of target �� �setpoint, and the Otto Smith control signal. The variable �setpoint

is in the picture called SetpointPhi. The model parameters K, � and L for Gm,GD and GND are constantly updated by the identification.

The control signal to the system, SYS, i.e Gs in Section 2.5, consists of a feed-forward connection of target �� �setpoint, and the Otto Smith control signal. The variable �setpoint is in Figure 13 called SetpointPhi. The input signal to the Otto Smith controller is �setpoint driven through the model of the system, Gm, subtracted with the output signal from SYS (�meas).

The controller updates its control signal every time fuel is injected into one of the engine cylinders, (i.e. one cylinder reaches the top dead center (TDC) in its intake stroke [8],). If fuel is injected quicker than every 4 ms, a constant update to the control signal is taken every 4 ms. It is not appro-priate to use a faster control signal, due to stability, since the lambda-sen-sor gives a feedback every 4 ms.

The desired set point response is that the output follows the system model of the engine Gs, except for the gain K which is replaced by one. K is replaced by one, because the air and fuel entering the engine is expected to be the same as measured at the sensor in the exhaust. A slow integrator in the engine management system takes care of static errors. It saves the

Identification

����L�

Chapter 3 - Control system design

- 21 -

static air-fuel errors in every point from every driving cycle, to be used in the next driving cycle. Hence the model Gm is

(18)

and the models in the Otto Smith controller are

(19)

(20)

The block F in the controller is

(21)

This controller will cancel the pole of the process and replace it with the desired dynamics, where we can choose eigenfrequency and damping. With this controller the closed loop system is a second order system.

The eigenfrequency �� is chosen to give an amplitude margin Am of at least two. High amplitude margin gives robust control at the price of slow control, so it is desirable to keep it as low as possible [11]. The eigenfre-quency is directly dependent of the time delay, since it introduces a sub-stantial negative phase shift. A vector that gives the corresponding eigenfrequencies to discrete time delay values has been created. Linear interpolation is thereafter used to get hold of the continuous values.

The overshoot, O, for the second order system is defined as [11]

(22)

were

(23)

This definition demands the system to control, the air-fuel system, to be

Gm s� � 11 s�+--------------e

sL–=

GD s� � 11 s�+--------------e

sL–=

GND s� � 11 s�+--------------=

F s� ��0

21 s�+� �

s2

2�0�0s+------------------------------=

�0 eigenfrequency, distance from the poles to the origin=

�0 damping.=

O e�–

=

���0

1 �0–------------------=

Chapter 3 - Control system design

- 22 -

sufficiently modeled by the first order model with identified model parameters K,� and L.

To avoid an overshoot of �meas the damping factor, �0, is chosen to be larger then one, but a too large value of �0 will give the system slow response. In the experiments presented in Section 7, the chosen �0 is two.

Chapter 4 - Identification

- 23 -

4 IdentificationThe reference model that needs to be adapted is

(24)

and it is described in Section 2.5. The parameters that we want to identify are K, ��and L. The input signal U corresponds to �in and output signal Ymcorresponds to a modeled �meas.

Identification is made by minimizing the square of the prediction error, J,together with an iterative search method based on the Newton-Raphson’s method [12].

(25)

The prediction error, E, is the error between measured lambda, �meas, and modeled lambda, Ym. In Section 3.3 it is described how and which param-eters in the gain scheduling map that are updated. Each parameter is updated with a specific �-value at a given engine speed and engine load. This gives an isolated error for each parameter, which is defined as

(26)

(27)

(28)

Since we want to identify the parameters K, ��and L the minimization is made with respect to these parameters. This gives

Ym s� � KesL–

1 s�+--------------U s� �=

J �� �Ek �� �2

2-----------------

k 1=

n

�=

Ek �k*�ki j�=

�k YkmfYkf

–=

Ykmffiltered model output at sample k = filtered Ykm

=

Ykf filtered real output at sample k = filtered �meas at sample k=

�ki,jdistance dependent weight at sample k=

n data collection time = samples to wait before update=

� K � LT

=

Chapter 4 - Identification

- 24 -

(29)

where

(30)

H is the hessian of the function J with respect to �� and ���is the step length to update the parameters.

A new variable d is introduced to solve the equation easier,

(31)

and it is solved with Gaussian elimination. Close to optimum it is possible that H are in bad condition. To make sure that the solution of the equation system

(32)

is good enough, an algorithm for approximating the condition number is implemented, see Reference [9]. When the condition number is high then

the first derivative of J is used and not H-1.

4.1 Input signalTo get a good identification, it is important that the input signal, u(t), can excite the system (i.e. the input signal has to have enough frequencies) [12]. A signal that varies randomly between two signal levels (a telegraph signal) is a good choice, because it consists of all frequencies.

The car needs to be drivable and it is not allowed to give extra emissions during identification, so the choices of input signal is limited. In our case it is possible to use either an input signal from the Otto Smith controller or, under some well defined circumstances, a telegraph signal when the engine could be driven by a relay. The speed for the change of the tele-graph signal level needs to be fast enough for the detection of the rise time and long enough for detection of the static gain.

4.1.1 Input signal during relay controlIn the beginning of the identification, the parameters have large errors,

� t 1+� � � t� � � H � t� �� �� �1– �J � t� �� �

��-------------------–=

H s� � J2 �� ��

�2�----------------=

d H � t� �� �� �1– �J � t� �� �

��-------------------=

H � t� �� �� �d �J � t� �� ���

-------------------=

Chapter 4 - Identification

- 25 -

even though they are initiated in a small area. Therefore there is need for an input signal which is able to excite the system properly, for example a relay signal, to get a rough estimate of the parameters.

To get a relay signal while driving, without creating extra emissions or drivability problems, a measured signal needs to be used as feedback. A useful measured signal is �meas, and by using �meas it is possible to create an input signal to the identification which reacts directly from the changes of �meas.

This input signal is implemented by adding the output from a relay with hysteresis which is fed by set point error e,

e = (�setpoint - �meas) (33)

To manage static air-fuel errors a slow integrator is also added. In reality this does not create a correct relay signal, but the integrator constant is very small, so the result will be very close to a relay signal. Both the relay and integrator are fed by set point error e, as shown in Figure 14.

Figure 14 The input signal to the engine during relay control is the inte-grated set point error e added to the output from the relay with hysteresis driven by e.

This gives a signal that varies around the set point with a chosen ampli-tude. The width of the hysteresis is chosen large enough to avoid chatter-ing because of measurement noise.

4.1.2 Input signal during Otto Smith controlWhen using the Otto Smith controller the input signal does not contain all frequencies, but identification is done anyway, since the input signal is assumed to have enough frequencies to excite the system. To avoid the influence of correlated errors introduced by the feedback, the input signal to the identification is taken as the feed forward of the controller set point, without adding the Otto Smith Control signal. If the input signal (�setpoint)is constant there is no identification since the derivative of theta is zero.

Chapter 4 - Identification

- 26 -

4.2 Sample timeWhen choosing the sample time, it is important to be able to model the interesting part of the step response and make sure that the sample time is short enough when solving the differential equation numerically [12].

The signals �meas and �setpoint are used in the identification. The sampling rate for the lambda sond (�meas) is 4 milliseconds and for the target �, �set-

point, it is every time fuel is injected into one of the cylinders, but never faster than 4 milliseconds, as explained in Section 3.4.

The sampling time for the identification is the same as for the sond, 4 mil-liseconds, and therefore �setpoint needs to be resampled into 4 millisec-onds. A problem occurs when �setpoint is resampled, since a lot of redundant data are put into the signal vector giving an erroneous deriva-tive of the signal. To imitate reality, a function has been created which interpolates between the step levels, as shown in Figure 15.

Figure 15 A typical appearance of �setpoint is resampled to get the same sampling time as for the identification (4 ms). The signal is then interpo-lated to get a correct derivative.

To be able to create such a signal the input signal (and of course also the output signal) to the model identification had to be delayed one fuel injec-

Typical �setpoint

Resampled �setpoint

Interpolated �setpoint

Chapter 4 - Identification

- 27 -

tion, i.e. one sample for the controller. Since we only delay the model identification then this will have no effect on the controller.

4.3 Data collection The data collection time needs to be a compromise between collecting enough data to get a good estimate (several step responses) and the possi-bility for the system to stay in a stable condition. Stable condition means that only small changes in engine speed and load are allowed. The driver therefore need to be stable with the gas pedal. A very long data collection time is impossible for the engine system during driving, because the sys-tem does not stay in a stable condition for an unreasonably long time, i.e. the driver will change driving condition.

How stable the driving condition needs to be is determined by the gain scheduling breakpoints. The breakpoints are set as a compromise between the possibility to stay in a certain load and engine speed area and the cor-relation of the model parameters in the area. (The model parameters in the area have to be close to piecewise bilinear). The data collection time and the size of the gain scheduling areas have to be determined before run-ning, if the identification will be done in production vehicles. If identifi-cation will be done only during calibration, they could be implemented as calibration parameters, which are possible to change while driving.

4.4 PrefilteringThe parameter estimation is done on-line. It is therefore important to have some knowledge of the system before identification starts, range of K, ��and L. It is of great importance where the interval of interesting system dynamics is. This is to be able to amplify that frequency area and to elim-inate disturbance of high frequency and stationary errors preceding parameter estimation.

The influence of disturbances of high frequency and stationary errors can be reduced, along with amplification of the interesting area, by pre filter-ing the output vector. It is advisable to choose a band pass filter where the cutoff frequency is chosen to model rise time, time delay and static gain as well as possible. A study of an estimated bode-plot shows that the interesting frequency area ought to be between (0.01<�<20) rad/s. Therefore a second order filter with cutoff frequency �1c, �2c and the static gain Ks is created.

Chapter 4 - Identification

- 28 -

(34)

(35)

(36)

(37)

(38)

(39)

(40)

While sampling, it is desirable to use an anti alias filter, where frequen-cies over the half Nyquist frequency is sharply reduced. The Nyquist fre-quency for our system is

��/ T = 3.14/0.004 = 785 rad/s. (41)

An analog hardware filter in the lambda sensor eliminates the alias effects.

4.5 OutliersSince we are estimating on-line, all data are used for estimation and there-fore it is of great importance that unrealistic data values are detected and corrected. The lambda-sensor validity area is approximately from 0.75 to 1.25 and these values are dependent on lambda-sensor supplier. These two values could be implemented as calibration constants, but in this the-sis the validity area is fixed, (0.75-1.25). Every value outside this area is neglected and the adaptation is cancelled.

Gf s� �Kss

1 s�1c---------+� �

� � 1 s�2c---------+� �

� �-------------------------------------------------

=

�1c 101–

=

�2c 20=

f�2�------=

f1c 0 02�=

f2c 3=

Ks 10=

Chapter 5 - Implementation

- 29 -

5 ImplementationThe control algorithm and the identification algorithm are implemented separately, but both algorithms use the same gain scheduling maps for K,� and L. The parameters K, � and L are implemented as one matrix with 8 rows and 8 columns for each parameter, dependent on engine speed and engine load. Both the control algorithm and identification algorithm are written in C.

5.1 Controller algorithmThe controller is implemented with a calibration constant to choose between relay mode and Otto Smith mode. These two control algorithms are presented separately.

5.1.1 Relay modeThe relay mode controller consists of an integrator part and a relay with hysteresis as shown in Figure 14 in Section 4. The output (control signal) is named CtrlsignalRI and it is divided into two parts, an integrator and a relay with hysteresis. The integrator function is named Integrator and the relay with hysteresis is named Relay. The implementation of this control-ler becomes

CtrlsignalRI(t) = Integrator(t) + Relay(t) (42)

The integrator parts becomes

(43)

were

e = (�setpoint - �meas) (44)

Ki = integrator gain.

To be able to use the algorithm in a digital micro processor the function is transformed into discrete time. This transformation is done with Tustin’s formula [13], where s is replaced by z, as follow

(45)

Ts = sample time

Transformed into discrete time with Tustin’s formula, Integrator becomes

Integrator s� �Kie

s--------=

s2Ts-----

1 z1–

1 z1–

+----------------- =

Chapter 5 - Implementation

- 30 -

(46)

The relay part with hysteresis becomes

(47)

where

Hysteresis = hysteresis of the relay with hysteresis

AmpOfRelay = amplitude of the relay around �setpoint

The hysteresis and the ampOfRelay are implemented as calibration con-stants and are possible to change with the calibration tool.

The relay controller is not implemented as a solution to get good lambda control; it is only implemented to give a better input signal to the identifi-cation. The relay controller will only be used if it seems that the Otto Smith control fails to give a sufficient input signal to the identification.

5.1.2 Otto Smith modeThe Otto Smith controller with feed-forward is implemented to give both a good lambda control and to test if it gives a sufficient input signal to the identification.

The implementation of Otto Smith control with feed forward is done according to Figure 13 in Section 3. The output (control signal) is named CtrlSignalFFOS, which is divided in two parts, feed forward and Otto Smith control respectively. Feed forward signal is called CtrlsignalFFand Otto Smith control signal is called CtrlSignalOS. How the parts are implemented is presented below.

CtrlSignalFFOS(s) = CtrlSignalFF(s) + CtrlSignalOS(s) (48)

(49)

(50)

Integrator t� �KiTs

2----------- e t� � e t 1–� �+� � Integrator t 1–� �+=

Relay t� �

� t� �setpoint AmpOfRelay,+ e t� � H! ysteresis

� t� �setpoint AmpOfRelay,+ e t� � H–" ysteresis

Relay t 1–� �, e t� � Hysteresis#$%%%&%%%'

=

CtrlSignalFF s� � �setpoint s� � 1–=

CtrlSignalOS s� � F s� �UF s� �=

Chapter 5 - Implementation

- 31 -

(51)

(52)

(53)

(54)

(55)

(56)

(57)

(58)

(59)

To be able to use the algorithm in a digital micro processor the functions are transformed into the z-domain with Tustin’s formula [13], where s is replaced by z, as follow

(60)

Ts = sample time

An example of how is transformed is presented below. All other

models are transformed into discrete time in the same manner, and all the transformations can be found in Appendix A.

(61)

Finally the algorithm needs to be transformed into discrete time.

F s� ��0

21 s�+� �

s2

2�0�0s+------------------------------=

UF s� � error� s� � YND s� � YD s� �–+=

error� s� � �wanted s� � �measured s� �–=

YND s� � GND s� � CtrlSignalOS s� � 1–� �=

YD s� � GD s� � CtrlSignalOS s� � 1–� �=

�wanted s� � Gm s� ��setpoint s� � 11 s�+--------------e

sL– �setpoint s� �= =

GD s� � 11 s�+--------------e

sL–=

GND s� � 11 s�+--------------=

Gm s� � 11 s�+--------------e

sL–=

s2Ts-----

1 z1–

1 z1–

+----------------- =

�wanted

Gm z� �Tsz

L–Tsz

1– L–+

Ts 2�+� � Ts 2�–� �z1–

+-----------------------------------------------------------=

Chapter 5 - Implementation

- 32 -

(62)

The time delay, L, is most likely not a multiple of kTs, and therefore we need to use the two nearest samples, k1 and k2, corresponding to k1<L<k2 instead. The weights, a and b, of k1 and k2 depend on the dis-tance to L. Linear interpolation is used to find the values a and b. Then u(k-L) is replaced by a*u(k-n)+b*u(k-n-1); a is thus the weight of sample k1 and b the weight of k2.

(63)

(64)

(65)

(66)

The parameters K, � and L are taken from the gain scheduling maps, as explained in Section 3. The gain scheduling maps are implemented with 8 rows and 8 columns, one map for each parameter K, � and L, dependent on engine speed and engine load. The parameter values are found with bilinear interpolation of adjacent parameters for actual engine speed and engine load. An example is shown below on how to acquire L.

(67)

The parameters K and � are found in the same manner.

5.2 Identification algorithmThe implementation of the identification algorithm is done according to Section 4. The adaptation algorithm is presented below.

�wanted k� � 1Ts 2�+----------------- Ts�setpoint k L–� �

Ts�setpoint k L– 1–� � Ts 2�–� ��wanted k 1–� �–+

=

n LTs-----=

a 1LTs-----� �

� � LTs-----–� �

� �–=

b 1 a–=

�wanted k� � 1Ts 2�+------------------ aTs�setpoint k n–� �

Ts�setpoint k n– 1–� � bTs�setpoint k n– 2–� �

Ts 2�–� ��wanted k 1–� �

–+ +

=

L �i,jLi,j�i+1,jLi+1,j

�i,j+1Li,j+1

�i+1,j+1Li+1,j+1

++ +=

Chapter 5 - Implementation

- 33 -

(68)

We introduce the variable d, which is when it is multiplied with � the step to update theta.

(69)

The variable d is solved with gauss elimination. If the condition number of H is poor d becomes / , i.e. H becomes unit matrix. H and / are calculated separately.

By using the above minimization algorithm and the distance dependent weight the step length for updating of each corner in the maps is calcu-lated by.

(70)

For further information see Appendix B.

(71)

(72)

(73)

(74)

In Laplace-domain this is

� t 1+� � � t� � � H � t� �� �� �1– �J � t� �� �

��-------------------–=

d H � t� �� �� �1– �J � t� �� �

��-------------------=

�J �� �J ��

Hi j� � t� �� � �i j��Ymf �� �

��-------------------- �i j�

�Ymf �� �

��--------------------

k 1=

n

�=

�Ji j� � t� �� �

��------------------------- �i j� Y� mf �� � Yf �– �i j�

�Ymf �� �

��--------------------

k 1=

n

�=

Ymf filtered model output, (filtered model � �=

Yf filtered real output, (filtered �meas �=

�i j� distance dependent weight=

n data collection time = samples to wait before update=

Ym �� � G �� �U=

�Ym �� �

��------------------ �G �� �

��---------------U=

G �� ����

--------------- G �� ��K�

---------------G �� ��

��---------------

G �� ��L�

---------------T

=

Chapter 5 - Implementation

- 34 -

(75)

(76)

(77)

(78)

An example of how is transformed from s-form to discrete time for-

mat, needed for micro controller, is presented below. First, the transfer function, G, needs to be transformed into z-form,

(79)

and thereafter into discrete time form.

(80)

By replacing L with n, a and b as described in previous Section Ym will become as follows.

(81)

All other models are transformed into discrete time in the same manner, and all transformations is found in Appendix B.

After Ym and the derivatives are calculated, they are filtered through Gf,the second order filter presented in Section 4.4.

G �� � K1 s�+--------------e

sL–=

�G �� ��K

--------------- 11 s�+--------------e

sL–=

�G �� ���

--------------- Ks–

1 s�+� �2----------------------e

sL–=

�G �� ��L

--------------- Ks–1 s�+--------------e

sL–=

Ym

G �� �KTsz

L–KTsz

1– L–+

Ts 2�+� � Ts 2�–� �z1–

+-----------------------------------------------------------=

Ym k� � KTs 2�+----------------- Tsu k L–� � Tsu k L– 1–� � Ts 2�–� �

Ym k 1–� �� �

–+�

=

Ym k� � KTs 2�+----------------- aTsu k n–� � Tsu k n– 1–� �

bTsu k n– 2–� � Ts 2�–� � Ym k 1–� �� �–

+ +�

=

Chapter 5 - Implementation

- 35 -

(82)

To make the identification work faster and with better precision a first guess of K, � and L is implemented, together with the physical limitations for the system. Implemented in the system is also information about the step length, data collection time and the size of the error when the identi-fication estimate is good enough to finish identification. All these values are implemented as calibration constants to make them easy to change from the calibration tool. The constants are then iteratively improved by trial and error together with physical knowledge of the engine system. Following is a list of the calibration constants.

1. Maps for K, � and L 8x8 matrixes dependent on engine speed and load.

2. Physical limitations for K, � and L.

3. Physical limitations for �setpoint, �meas and control signal.

3. Data collection time, time to wait before update of parameters K, � and L.

4. Gamma, �� Step length for update of parameters K, � and L.

5. Epsilon, (, finish identification when model error is smaller than (.

6. Controller mode, to determine if input signal should be control signal or �setpoint, shown in Section 4.1.

7. Prefiltering constants Kbp, Fbp1 and Fbp2.

Gf s� �Kss

1 s�1c---------+� �

� � 1 s�2c---------+� �

� �-------------------------------------------------

=

Chapter 6 - Simulations

- 36 -

6 SimulationsSimulations are done to make sure that the implemented algorithms work in a modeled reality, i.e. with a model of an engine. The engine system is replaced by a first order test model in accordance with the expected real system. All simulations are done in Matlab Simulink with the engine test model implemented as a Matlab function. The controller and the identifi-cation algorithms are implemented in C, on a special structure for Matlab as a Matlab S-function, to make it easier to convert them into the real engine management test system when the simulations are finished.

The simulations are divided into two separate Matlab Simulink models, one for the control algorithm and one for the identification algorithm. The same engine model is used in both.

The engine model is implemented as a first order system with long time delay, where K, ��and L are changed with load and engine speed as an expected real system

(83)

The system is tested by changing the parameter’s dependencies to engine speed and load.

6.1 Matlab Simulink model for identificationTo test the identification algorithm, the Matlab Simulink model shown in Figure 16 is used.

Y s� � KesL–

1 s�+--------------U s� �=

Chapter 6 - Simulations

- 37 -

.

Figure 16 Matlab Simulink Model to test the identification algorithm on an engine model. The input signal is a telegraph signal which simulates �setpoint. The output signal from the engine model, Yconstr, simulates �meas. The parameters K, ��and L in both the engine model and the identi-fication vary with engine speed and load signals, and the difference between engine parameters and identified parameters are compared in a scope for each parameter. Step length (gamma) and data collection time (Update time) are possible to calibrate.

The Matlab Simulink model consists of engine model, identification algo-rithm, input signals, output signals and calibration parameters for identifi-cation.

Input signals:

1. Telegraph signal (To simulate control signal if relay control or �setpoint

if Otto Smith control, Uconstr.)

2. Simulated �meas (Yconstr)

3. Engine load (A sine wave around a certain engine load level.)

4. Engine speed (A sine wave around a certain engine speed level.)

Calibration parameters:

1. Update time (Time to wait until update of the parameters K,�� and L.)

Chapter 6 - Simulations

- 38 -

2. Gamma (Step length for update of the parameters K, � and L.)

(The following two calibration parameters will be found inside the identi-fication block. These parameters will be possible to calibrate in the real engine management test system.)

3. Epsilon (finish identification when model error is smaller than Epsi-lon.)

4. Limit Theta (Physical limitations for K, � and L).

Output signals

1. Yconstr, Simulated �meas

2. Ymodel with identified K, � and L.

3. Filtered Ymodel with identified K, � and L.

4. Filtered Yconstr

5. K

6. �

7. L

8. Uconstr

6.2 Identification result of simulationThe simulations are done with different parameter setting for K, � and L in the engine model. Pre knowledge of the system gives the initial guess and after some iteration the identification algorithm presents good result with very small errors for the estimated parameters. Figure 17 shows the result from simulations with the following parameters:

Engine parameters:

K = 0.65 + 0.0005 eng.speed - 0.08 eng.load

� = 0.5 eng.load + 0.001 eng.speed

L = 0.00007 eng.speed + 0.001 eng.load

Calibration parameters:

Update time = 16s (4000 samples with a sample time of 4 ms.)

Gamma = 0.8 (200 Ts)

Epsilon = 0.00001

Limit Theta = K, L > 0 and ��>�0.04 (approx. 10 times sampling time).

Chapter 6 - Simulations

- 39 -

Figure 17 Comparison between engine model parameters and identified parameters K,�� and L. The estimate is printed in black and the given engine model parameters are in light grey. First an initial guess of the parameters is done and the errors is large, then after iteration the identi-fied parameters are very close to the engine model parameters.

K initial guess K final estimate

� initial guess � final estimate

L initial guess L final estimate

Chapter 6 - Simulations

- 40 -

As shown in Figure 17, the identification algorithm finds very good esti-mates of K, � and L. With identified parameters the error between the engine model and the identified model is very small. The error between the models is presented in Figure 18.

Figure 18 Error over time between output from engine model and output from model with identified K,�� and L.

The conclusion drawn from the simulations is that the identification algo-rithm works well on the engine model and that it is ready to be tested on a real engine.

6.3 Matlab Simulink Model for controllerTo test and debug the controller a Matlab Simulink Model similar to the one used in the identification is created. The same engine model parame-ters is used but with other calibration parameters. A model of this control-ler system is presented in Figure 19.

Error between engine model and identified model

Chapter 6 - Simulations

- 41 -

Figure 19 Matlab Simulink Model to test the controller algorithm. The input signal is a telegraph signal which simulates �setpoint. The output sig-nal from the engine model, Yconstr, simulates �meas. The parameters K, ��and L in both the engine model and the Controller vary with engine speed and load signals. Hysteresis, amplitude of relay and integrator constant could be calibrated for the relay with hysteresis control, and omega and damping could be calibrated for the Otto Smith control. RegMode Flag is used to choose between relay control and Otto Smith control.

The Matlab Simulink model consists of engine model, controller, input signals, output signals and calibration parameters for the controller.

Input signals:

1. Telegraph signal (Set point phi, to simulate �setpoint.)

2. Simulated �meas (Yconstr)

3. Engine load (A sine wave around a certain engine load level.)

4. Engine speed (A sine wave around a certain engine speed level.)

Chapter 6 - Simulations

- 42 -

Calibration parameters:

1. Regmode Flag, 0 if Relay control and 1 if Otto Smith control.

2. Hysteresis, hysteresis for relay control.

3. Amplitude Of Relay, amplitude around �setpoint, for relay control.

4. KIntegrator, Integrator constant for relay control.

5. Omega for Otto Smith controller.

6. Damping for Otto Smith controller.

Output signals

1. Ymf, filtered model output signal with K, � and L from identification.

2. Yf, filtered output signal with K,�� and L from engine model.

3. Ymplusett, model output signal with K, � and L from identification.

4. Y, output signal with K, � and L from engine model.

5. K

6. �

7. L

8. Control signal ((�setpoint + Otto Smith control signal) or relay control signal)

9. Wanted output, �setpoint filtered with identified model parameters.

10. Controller output, Otto Smith control output, with input signal the error between wanted output and �meas.

11. ModelD, Otto Smith control output filtered with identified model parameters.

12. ModelND, Otto Smith control output filtered with identified model parameters except for the time delay L.

Output signal 9-12 is only used if regulator mode is Otto Smith control. The algorithms are implemented according to Figure 13 in Section 3.

6.4 Control result of simulationThe simulation model for the controller is only used to debug the code for the controller, so when the controller works as intended the algorithm is implemented in the real engine management test system, see following Section.

Chapter 7 - Experiments

- 43 -

7 ExperimentsAfter simulations the controller system is tested in two vehicles, one Volvo S80 and one Volvo 850. The algorithms are implemented in a spe-cial engine management test system for rapid prototyping, VRPS (Volvo Rapid Prototyping System). In VRPS the standard engine management algorithms could be exchange with prototype algorithms. Calibration and measurement are then easily done in the standard development tools. One calibration panel and one measurement panel are set up.

7.1 CalibrationThe calibration panel consists of, constants, table and maps; see table1-3 for explanation. The calibration values presented are calibration values working well both for Otto Smith controller and identification. These val-ues are also the values used in the measurement presented in next part.

Table 1: Calibration constants

Table 2: Calibration table

Name Value ExplanationLAMOSI_B_Enable_c 1 Identification off/on [0/1]LAMOSI_B_Regmode_c 1 Inputsignal ctrlsignal/reqphi LAMOSI_C_Fbp1_c 0.02 Band pass filter cutoff frequency 1LAMOSI_C_Fbp2_c 3 Band pass filter cutoff frequency 2LAMOSI_C_Gamma_c 1 Steplength for update of parametersLAMOSI_C_Kbp_c 10 Band pass filter static gainLAMOSI_N_MapId_c 1 In measurement view k,tau or LLAMOSI_t_Update_c 16 Data collection time before updateLAMOSR_B_Enable_c 1 Controller off/on [0/1]LAMOSR_B_Regmode_c 1 Relay or Otto-Smith control [0/1]LAMOSR_C_Damping_c 2 Damping in Otto-Smith controlLAMOSR_C_Hyst_c 0.1 Hysteresis for Relay controlLAMOSR_C_Kint_c 0 Integrator constant for Relay controlLAMOSR_C_RelayAmp_c 0.02 Amplitude for Relay control

Name ValuesLAMOSR_t_Delay_ch 0.005 0.007 0.010 0.020 0.100 0.300 0.500 1.000LAMOSR_w_0_v 17.0 12.2 9.1 6.3 4.9 3.5 2.4 1.5Explanation Input is delay time and output is eigen frequency,

w0, for O-S controller.

Chapter 7 - Experiments

- 44 -

Table 3: Calibration map

Name ValuesLAMOSI_C_NLTableK_mLAMOSI_M_PredAir LAMOSI_n_Erpm_ch

700 1000 1300 1600 1900 2200 2500 28000.000610 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000530 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000450 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000370 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000290 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000210 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000130 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000050 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00

Name ValuesLAMOSI_C_NLTableTau_mLAMOSI_M_PredAir LAMOSI_n_Erpm_ch

700 1000 1300 1600 1900 2200 2500 28000.000610 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.500.000530 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.500.000450 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.500.000370 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.500.000290 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.500.000210 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.500.000130 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.500.000050 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50

Name ValuesLAMOSI_C_NLTableL_mLAMOSI_M_PredAir LAMOSI_n_Erpm_ch

700 1000 1300 1600 1900 2200 2500 28000.000610 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000530 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000450 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000370 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000290 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000210 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000130 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.000.000050 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00

Explanation: Inputsignal is predicted air (load) to engine andengine speed. Output signal is K, Tau and L value for givenspeed and load.

Chapter 7 - Experiments

- 45 -

7.2 MeasurementWhen the initial calibration is set, measurements are done to validate if the Otto Smith controller with adaptive gain scheduling works in a vehi-cle. In the measurement presented in Figure 20, the lambda control in the vehicle is Otto Smith control with adaptive gain scheduling. The identifi-cation algorithm for the gain scheduling parameters is driven in parallel with the controller.

Figure 20 A measurement from a vehicle driven with Otto Smith control and adaptive gain scheduling. In a well controlled manner �meas follows �setpoint, and the control signal CtrlSignalFFOS is stable. The difference between filtered output signal from the model, Ymf, and filtered �meas, Yf,is moderate.

In Figure 20 it is possible to detect that the error between the filtered modeled �, Ymf, and the filtered �meas, Yf, is getting smaller and smaller. It can also be seen that the control signal CtrlSignalFFOS is stable and gives a good � answer to �setpoint. During this measurement the engine speed and load are stable. If speed or load changes i.e. transient condition, there is no possibility to get a good identification. The identification val-ues for K, � and L will then be unstable and go to its upper and lower limit

Yf

Ymf

�setpoint

�meas

CtrlSignalFFOS

Chapter 7 - Experiments

- 46 -

values.

7.3 Identified parametersIf the identification is done in stable condition and cancelled during tran-sient movements, the identified parameter � is represented by Figure 21. In the picture the � values and the speed and load values for the engine are normalized from zero to one.

Figure 21 The Gain-scheduling map with identified � (tau) values,LAMOSI_C_NLTableTau_m. Tau values, engine speed and load axis val-ues are normalized from zero to one.

The same pattern as for � is found for the time delay, L. The parameter Kis forced to one, since the normal fuel adaptations are expected to take care of static errors. The normal fuel adaptations are calculated by a slow integrator which is multiplied with CtrlSignalFFOS. The static air-fuel errors are saved from every driving cycle.

By using the values of � and L, identified during stable conditions, together with K set to one, the Otto Smith control is used in different driv-ing conditions on a fully warm engine and the control is good. Special execution conditions and limitations need further investigation before it is possible to fully use the controller on production vehicles.

0,08

0,34

0,61

0,870,25

0,460,68

0,89

0,00

0,20

0,40

0,60

0,80

1,00

Tau

Engine_Speed

Engine_Load

0,80-1,000,60-0,800,40-0,600,20-0,400,00-0,20

Chapter 8 - Conclusions and future work

- 47 -

8 Conclusions and future workThe results from the simulations and the real tests show that the identifi-cation method used will be able to on-line detect static gain, rise time and time delay of a first order system with time delay, if the changes of engine load and engine speed are limited.

Furthermore the test results show that the adaptation method could be used in advantage for gain scheduling to detect the shape of the gain schedule (i.e. the parameters dependency of the variables). As mentioned above, caution needs to be taken for fast changes of the gain scheduling variables, where the execution conditions need to be strict.

The real tests in vehicles also show that the Otto Smith controller is stable with identified parameters in steady state (stable engine speed and engine load). During large transients at warm up and under fuel cut some extra limitations or execution condition are needed.

By creating better conditions for the catalytic converter the adaptive Otto Smith controller probably will reduce the emissions of HC, NOx and CO and reduce the fuel consumption while the vehicle is aging i.e. the sensor is contaminated and giving slower response.

Another goal of this master thesis is to reduce time and cost of optimizing the parameters. This is done by letting the controller optimize itself, by using a mathematical model. Therefore the time for optimization proba-bly will be reduced, but there are still some parameters to be optimized, like time before to update parameters, axis in gain schedule maps and adaptation execution conditions.

If the main goal is to lower the time and cost of optimizing parameters, the identification could be done off-line and in an engine test bench. There it is easy to keep the engine in a stable condition for identification and no consideration need to be taken to execution conditions. Another advantage is that the engine test bench also gives the possibility to drive in unnormal driving conditions, i.e. engine speed and load areas where a driver seldom drives, typically it could be high engine speed and low engine load. This will give a better identification through the whole engine operating area.

The advantage of this method is that the identification for a new sensor in a new system probably will be more precise. The disadvantage of using off-line identification is of course that there is no possibility to compen-sate for the effects caused by the system (i.e. the lambda sensor) changing character. (If the fuel is clean the contamination of the sensor is small and

Chapter 8 - Conclusions and future work

- 48 -

the effects from the lambda sensor changing character are of lower signif-icance.)

If off-line identification is used, there is also a possibility to extend the algorithm to minimize the error over the whole map instead of point by point. By studying the shape of for example the � map shown in Figure 21, it is possible to see that a model of the shape of the parameter map could be found. That model could be used to minimize the error over the whole map on the same time. Another advantage of off-line identification is that separate data sets could be used for identification and validation.

If the main goal is to find the best controller, the best solution probably is to use the off-line identified parameters as start values for the on-line identification, and be very strict with the execution conditions for the identification.

Since the identification and the controller are implemented separately new changes to them are quite easy to implement.

In addition, the identification algorithm could be used to identify the level of contamination of the sensor, by looking at the values of the rise time and time delay. Thus, it could probably be used as a diagnose method for the lambda sensor.

Chapter 9 - References

- 49 -

9 References

[1] Per Andersson & Lars Eriksson, Observer based feed-forward air-fuel control of turbocharged SI-engines, Vehicularsystems, ISY, Linköping University 2005.

[2] Per Andersson, Lars Eriksson & Lars Nielsen, Modeling andArchitecture Examples of Model Based Engine Control, Vehi-cular systems, ISY, Linköping University 2005.

[3] Patrik Berggren & Andrej Perkovic, Cylinder Individual Lambda Feedback Control in an SI Engine, Master’s thesisLITH-ISY-EX-1649, Vehicular systems, ISY, LinköpingUniversity 1996.

[4] Morgan Bergkvist, Simulering av luft-bränslereglering med adaptiv parameteruppdatering för ottomotorer, Master’s thesisLITH-ISY-EX-1721, Vehicular systems, ISY, LinköpingUniversity 1997.

[5] Magnus Bergman, Realtidssimulering av modellbaserad lambdareglering för bensinmotorer, Master’s thesisLITH-ISY-EX-1794, Vehicular systems, ISY, LinköpingUniversity 1997.

[6] Markus Brandstetter, Robust Air-Fuel Ratio Control forCombustion engines, a dissertation for the degree of doctor ofPhilosophy, Clare Hall, Cambridge 1996.

[7] Chang C. Hang, Tong H. Lee & Weng K. Ho,Adaptive Control, Instrument Society of America 1993,ISBN 1-55617-477-2.

[8] John B. Heywood, Internal Combustion Engine fundamentals McGraw-Hill, Inc 1988, ISBN 0-07-100499-8.

[9] Lars Eldén & Linde Wittmeyer-Koch, Numerisk analys -

en introduktion,Studentlitteratur 1992, ISBN 91-44-25652-3.

[10] Henrik Fredriksson, Control of Oxygen Buffer in a Three Way Catalyst, CTH 1997, ISSN 0280-8927.

[11] Torkel Glad & Lennart Ljung, Reglerteknik Grundläg-gande teori, Studentlitteratur 1989, ISBN 91-44-17892-1

[12] Lennart Ljung & Torkel Glad, Modellbygge och

Chapter 9 - References

- 50 -

simulering, Studentlitteratur 1991, ISBN 91-44-31871-5.

[13] Linköping University Department of Electrical Enginering,Reglerteknik fortsättningskurs M, Teorikompendium, Linköping University Department of Electrical Engineering1997.

[14] Esfandiar Shafai, Christian A. Roduner & H. P. Geering,On-Line Identification of Time Delay in the Fuel Path of an SIEngine, SAE technical paper series 970613, Swiss FederalInstitute of Technology (ETH) 1997.

[15] Karl J.Åström & Björn Wittenmark, Adaptive Control,Addison-Wesley 1995, ISBN 0-201-55866-1.

Appendix A - Equations for control algorithm

Appendix A

Equations for control algorithmCtrlSignalFFOS(s) = CtrlSignalFF(s) + CtrlSignalOS(s)

CtrlSignalFF s� � �setpoint s� � 1–=

CtrlSignalOS s� � F s� �UF s� �=

F s� ��0

21 s�+� �

s2

2�0�0s+------------------------------=

UF s� � error� s� � YND s� � YD s� �–+=

error� s� � �wanted s� � �measured s� �–=

YND s� � GND s� � CtrlSignalOS s� � 1–� � 11 s�+-------------- CtrlSignalOS s� � 1–� �==

YD s� � GD s� � CtrlSignalOS s� � 1–� � 11 s�+--------------e

sL–CtrlSignalOS s� � 1–� �==

�wanted s� � Gm s� ��setpoint s� � 11 s�+--------------e

sL– �setpoint s� �= =

s2Ts-----

1 z1–

1 z1–

+----------------- =

F z� ��0

2Ts

4------------

Ts 2� 2Tsz1–

Ts 2–� � �z2–

+ + +

1 �0�0Ts 2z1–

– 1� �0�0Ts �z2–

–+ +---------------------------------------------------------------------------------------------

� �) *) *� �

=

Gm z� � GD z� �=Tsz

L–Tsz

1– L–+

Ts 2�+� � Ts 2�–� �z1–

+-----------------------------------------------------------=

GND z� �Ts Tsz

1–+

Ts 2�+� � Ts 2�–� �z1–

+-----------------------------------------------------------=

Appendix A - Equations for control algorithm

�wanted k� � 1Ts 2�+----------------- Ts�setpoint k L–� �

Ts�setpoint k L– 1–� � Ts 2�–� ��wanted k 1–� �–+

=

YD k� � 1Ts 2�+----------------- Ts C� trlSignalOS k L–� � 1 �–

Ts C� trlSignalOS k L– 1–� � 1 �– Ts 2�–� �YD k 1–� �–+

=

YND k� � 1Ts 2�+----------------- Ts C� trlSignalOS k� � 1 �–

Ts C� trlSignalOS k 1–� � 1 �– Ts 2�–� �YD k 1–� �–+

=

CtrlSignalOS k� � 11 �0�0Ts+----------------------------

�02Ts

4------------ T� s 2� �UF k� �

2TsUF k 1–� � Ts 2–� � �UF k 2–� �

+

+ +

� 2CtrlSignalOS k 1–� �

1�

�0�0Ts �CtrlSignalOS k 2–� �–

+

)

*

=

n LTs-----=

a 1LTs-----� �

� � LTs-----–� �

� �–=

b 1 a–=

�wanted k� � 1Ts 2�+------------------ aTs�setpoint k n–� �

Ts�setpoint k n– 1–� � bTs�setpoint k n– 2–� �

Ts 2�–� ��wanted k 1–� �

–+ +

=

Appendix A - Equations for control algorithm

YD k� � 1Ts 2�+------------------ aTs C� trlSignalOS k n �–� � 1 �–

Ts C� trlSignalOS k n– 1–� � 1 �–

bTs C� trlSignalOS k n– 2–� � 1 �– Ts 2�–� �YD k 1–� �–

+

+

=

Appendix B - Equations for identification algorithm

Appendix B

Equations for identification algorithm

The second derivative of is small close to optimum, why the sec-

ond term of H is neglected, see page 255 in [12]. Then H is approximated with

� t 1+� � � t� � � H � t� �� �� �1– �J � t� �� �

��-------------------–=

� K � LT

=

J �� �Ek �� �2

2-----------------

k 1=

n

�=

E �� � �ij Y� m �� � Y �–=

�E �� ���

--------------- �ij

�Ym �� �

��------------------ �ij

�G �� ���

---------------U= =

Ym �� � G �� �U=

�Ym �� �

��------------------

G �� ����

---------------U=

J� �� ���

------------- Ek �� �E� k �� �

��-----------------

k 1=

n

� �ij2

G� �� �U Y ��G �� ���

---------------U–

k 1=

n

�= =

H �� � J2� �� �

�2�----------------=

Ek �� ��

��-----------------

Ek �� ��

��----------------- Ek �� �

E2

k �� ��

�2�-------------------

k 1=

n

�+

k 1=

n

�=

Ek �� �

Hij �� �Ek �� ��

��-----------------

Ek �� ��

��-----------------

k 1=

n

�+ �i j��G �� �

��---------------U�i j�

�G �� ���

---------------U

k 1=

n

�=

Appendix B - Equations for identification algorithm

The transfer functions without the time delay:

G �� ����

--------------- G �� ��K�

---------------G �� ��

��---------------

G �� ��L�

---------------T

=

G �� � K1 s�+--------------e

sL–=

G �� ��K�

---------------1

1 s�+--------------e

sL–=

G �� ����

---------------Ks–

1 s�+� �2----------------------e

sL–=

G �� ��L�

---------------Ks–

1 s�+--------------e

sL–=

Gf s� �Kss

1 s�1c---------+� �

� � 1 s�2c---------+� �

� �-------------------------------------------------

=

1

1

s z1

z1

T

2s ,

,

-,

.

G �� �K T sz

L–K Ts z

1– L– +

Ts 2�+� � Ts 2�–� �z1–

+----------------------------------------------------------------=

G �� ��K�

---------------Tsz

L–Ts z

1– L– +

Ts 2�+� � Ts 2�–� �z1–

+-----------------------------------------------------------=

G �� ����

---------------2K Tsz

L–2K Ts z

2– L– + –

Ts2

4� Ts 4�22Ts

28�2

–� �z1–

Ts2

4� Ts 4�2+ –� �z

2–+ + + +

-----------------------------------------------------------------------------------------------------------------------------------------------------=

G �� ��L�

---------------2Kz

L–– 2K z

1– L– +

Ts 2�+� � Ts 2�–� �z1–

+-----------------------------------------------------------=

Appendix B - Equations for identification algorithm

Discrete time with time delay.

�11

�1c---------=

�21

�2c---------=

a0 2TsKs=

a1 0=

a0 2– TsKs=

b0 Ts 2�1+� � Ts 2�2+� �=

b1 Ts 2�1+� � Ts 2– �2� � Ts 2– �1� � Ts 2�2+� �+=

b2 Ts 2– �1� � Ts 2– �2� �=

Gf z� �a0 a1z

1–a2z

2–+ +

b0 b1z1–

b2z2–

+ +----------------------------------------------

=

n LTs-----=

a 1LTs-----� �

� � LTs-----–� �

� �–=

b 1 a–=

Ym k� � KTs 2�+----------------- Tsu k L–� � Tsu k L– 1–� � Ts 2�–� � Ym k 1–� �� �–+� �=

Ym k� � KTs 2�+----------------- aTsu k n–� � Tsu k n– 1–� � bTsu k n– 2–� �

Ts 2�–� � Ym k 1–� �� �

–+ +�

=

Appendix B - Equations for identification algorithm

Ym k� ��

K�-----------------

1Ts 2�+----------------- aTsu k n–� � Tsu k n– 1–� � bTsu k n– 2–� �

Ts 2�–� �Ym k 1–� ��

K�--------------------------

–+ +=

Ym k� ��

��-----------------

1Ts

2 4�Ts 4�2+ +--------------------------------------- 2a– KTsu k n–� � 2bKT– su k n– 1–� �

2aKTsu k n– 2–� � 2bKTsu k n– 3–� � 2Ts2 8�2–� �–

Ym k 1–� ��

��--------------------------

Ts2 4�Ts 4�2+–� �

Ym k 2–� ��

��--------------------------

+

+

=

Ym k� ��

L�-----------------

1Ts 2�+----------------- 2a– Ku k n–� � 2 a b–� �Ku k n– 1–� �

2bKu k n– 2–� � Ts 2�–� �Ym k 1–� ��

L�--------------------------–

+ +=

På svenska

Detta dokument hålls tillgängligt på Internet - eller dess framtida ersättare - under en längre tid från publiceringsdatum under förutsättning att inga extra-ordinära omständigheter uppstår.

Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner, skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för ickekommersiell forskning och för undervisning. Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säkerheten och tillgängligheten finns det lösn-ingar av teknisk och administrativ art.

Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovs-man i den omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot att dokumentet ändras eller pre-senteras i sådan form eller i sådant sammanhang som är kränkande för upphovsmannens litterära eller konstnärliga anseende eller egenart.

För ytterligare information om Linköping University Electronic Press se förlagets hemsida http://www.ep.liu.se/

In English

The publishers will keep this document online on the Internet - or its pos-sible replacement - for a considerable time from the date of publication barring exceptional circumstances.

The online availability of the document implies a permanent permission for anyone to read, to download, to print out single copies for your own use and to use it unchanged for any non-commercial research and educa-tional purpose. Subsequent transfers of copyright cannot revoke this per-mission. All other uses of the document are conditional on the consent of the copyright owner. The publisher has taken technical and administrative measures to 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 pro-tected against infringement.

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

© [Eva Lundin]