investigation of and compensation for time-delays in...

74
Investigation of and Compensation for Time-Delays in Driveline Control Systems MARLENE SANDSTRÖM Master of Science Thesis Stockholm, Sweden 2014

Upload: others

Post on 04-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Investigation of and Compensation

for Time-Delays in Driveline Control Systems

M A R L E N E S A N D S T R Ö M

Master of Science Thesis Stockholm, Sweden 2014

Page 2: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control
Page 3: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Investigation of and Compensation for Time-Delays in Driveline Control

Systems

M A R L E N E S A N D S T R Ö M

Master’s Thesis in Optimization and Systems Theory (30 ECTS credits) Master Programme in Mathematics (120 credits) Royal Institute of Technology year 2014

Supervisor at Scania was Björn Johansson Supervisor at KTH was Xiaoming Hu Examiner was Xiaoming Hu TRITA-MAT-E 2014:20 ISRN-KTH/MAT/E--14/20--SE Royal Institute of Technology School of Engineering Sciences KTH SCI SE-100 44 Stockholm, Sweden URL: www.kth.se/sci

Page 4: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control
Page 5: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Abstract

Time-delays occur in all real-time control systems. The driveline controlsystem considered in this thesis is such a system. It is of interest to knowif it is possible to move the cruise control from the engine managementsystem to another control unit that communicates with the engine usingCAN (Communication Area Network). Since the amount of data sent overCAN is increasing, it is of concern how large time-delays a controller canhandle and if there is any simple method to compensate for time-delayswhile maintaining good performance.

Measurements of time-delays between the control units of the engine and thegearbox have been done in a Scania heavy truck. The results show that thetime-delays are very small and that a few percent of the sent messages areoverwritten due to the time-delays varying in length and the clocks driftingin relation to each other.

Four different methods for compensation of time-delays have been studiedand compared to a prototype cruise controller from Scania. Three of thealternative controllers are PID controllers and the fourth is a Smith predic-tor. All of them are more robust to time-delays than the prototype, but allexcept one also have the disadvantage of not eliminating the impact of aload disturbance in a reasonably short time, which the prototype does.

Since the time-delays on the concerned CAN bus are very small and the pro-totype controller is robust to time-delays of significantly larger magnitude,the conclusion is that it is probably safe to move the cruise control to an-other control unit that communicates with the engine using CAN, withoutcompensating for time-delays. If compensation for time-delays were to berequired in the future, there is no obvious choice out of the compensationmethods evaluated in this work. They all have drawbacks but they mightbe applicable after some modifications to improve their performance.

Page 6: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control
Page 7: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Sammanfattning

Tidsfordrojningar forekommer i alla realtidsstyrsystem. Drivlinestyrsys-temet som behandlas i denna uppsats ar ett sadant system. Det ar avintresse att utreda om det ar mojligt att flytta hastighetsregleringen frn mo-torns styrenhet till en annan styrenhet som kommunicerar med motorn viaCAN (Communication Area Network). Da mangden data som skickas overCAN okar ar det angelaget att ta reda pa hur stora tidsfordrojningar enregulator klarar av och om det finns nagon enkel metod att kompensera fortidsfordrojningar med som aven ger god prestanda.

Matningar av tidsfordrojningar mellan motorns och vaxelladans styrenheterhar genomforts i en Scanialastbil och resultaten visar att tidsfordrojningarnaar mycket sma samt att par procent av de skickade meddelandena skrivs dockover pa grund av att tidsfordrojningarnas langd varierar och att styrenheter-nas klockkristaller driver i forhallande till varandra.

Fyra olika metoder for kompensering av tidsfordrojningar har undersoktsoch jamforts med en prototyphastighetsregulator fran Scania. Tre av dealternativa regulatorerna ar PID-regulatorer och den fjarde ar en Smithreg-ulator. Samtliga ar robustare mot tidsfordrojningar an prototypen men allautom en dras med nackdelen att inte kunna eliminera en laststorning inomrimlig tid, vilket prototypen gor.

Eftersom tidsfordrojningarna pa den aktuella CAN-bussen ar mycket smaoch prototypregulatorn ar robust mot betydligt storre tidsfordrojningar, saar slutsatsen att det troligtvis ar sakert att flytta hastighetsregleringen tillen annan styrenhet som kommunicerar med motorn via CAN utan att kom-pensera for tidsfordrojningar. Om kompensation for tidsfordrojningar skullebehovas i framtiden sa finns inget sjalvklart val av de kompenseringsmetodersom utretts i detta arbete. Alla har brister men skulle eventuellt kunnaanvandas efter vissa modifikationer for att forbattra deras prestanda.

Page 8: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control
Page 9: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Acknowlegements

This work was carried out at the department Powertrain Control SystemsDevelopment at Scania CV in Sodertalje, Sweden with supervision from thedepartment of Optimization and Systems Theory at the Royal Institute ofTechnology in Sockholm, Sweden.

First and foremost I would like to thank my supervisor at Scania, BjornJohansson, for guiding and supporting me throughout this project. Further-more, I would like to thank Kristoffer Wanglund for sharing his knowlegdeand taking time to answer my questions. I would also like to thank mysupervisor at KTH, Xiaoming Hu, for valuable input on the report. Finally,I would like to thank the rest of NEP for making my time at Scania a niceand memorable experience.

Page 10: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control
Page 11: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Contents

1 Introduction 7

1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.2 Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.3 Outline of Thesis . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 Theory and Driveline Model 9

2.1 Driveline Control . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.2 Time-Delays in Real-Time Control Systems . . . . . . . . . . 10

2.3 Controller Area Network (CAN) . . . . . . . . . . . . . . . . 11

2.4 PID Controller . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.5 Driveline Model . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3 Methods for Compensation of Time-Delays in Control Sys-tems 15

3.1 Extended AMIGO Tuning Rules . . . . . . . . . . . . . . . . 15

3.2 Simple Internal Model Control (SIMC) Tuning Rules . . . . . 17

3.3 Internal Model Control (IMC) Tuning Rules Based on Sensi-tivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.4 Smith Predictor . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4 Measurements 23

3

Page 12: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CONTENTS

4.1 Measurement Setup . . . . . . . . . . . . . . . . . . . . . . . 23

4.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5 Evaluation of Compensation Methods 27

5.1 Evaluation of Prototype Controller . . . . . . . . . . . . . . . 28

5.1.1 Step Response . . . . . . . . . . . . . . . . . . . . . . 29

5.1.2 Reference as a Ramp . . . . . . . . . . . . . . . . . . . 29

5.1.3 Load Disturbance . . . . . . . . . . . . . . . . . . . . 29

5.1.4 Model Error . . . . . . . . . . . . . . . . . . . . . . . . 31

5.1.5 Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5.2 Evaluation of Extended AMIGO Tuning Rules . . . . . . . . 32

5.2.1 Transfer Functions . . . . . . . . . . . . . . . . . . . . 32

5.2.2 Step Response . . . . . . . . . . . . . . . . . . . . . . 33

5.2.3 Reference as a Ramp . . . . . . . . . . . . . . . . . . . 33

5.2.4 Load Disturbance . . . . . . . . . . . . . . . . . . . . 34

5.2.5 Model Error . . . . . . . . . . . . . . . . . . . . . . . . 35

5.2.6 Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.3 Evaluation of SIMC Tuning Rules . . . . . . . . . . . . . . . 37

5.3.1 Transfer Functions . . . . . . . . . . . . . . . . . . . . 37

5.3.2 Step Response . . . . . . . . . . . . . . . . . . . . . . 37

5.3.3 Reference as a Ramp . . . . . . . . . . . . . . . . . . . 37

5.3.4 Load Disturbance . . . . . . . . . . . . . . . . . . . . 38

5.3.5 Model Error . . . . . . . . . . . . . . . . . . . . . . . . 40

5.3.6 Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.4 Evaluation of IMC Tuning Rules Based on Sensitivity . . . . 41

5.4.1 Transfer Functions . . . . . . . . . . . . . . . . . . . . 41

4

Page 13: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CONTENTS

5.4.2 Step Response . . . . . . . . . . . . . . . . . . . . . . 42

5.4.3 Reference as a Ramp . . . . . . . . . . . . . . . . . . . 42

5.4.4 Load Disturbance . . . . . . . . . . . . . . . . . . . . 43

5.4.5 Model Error . . . . . . . . . . . . . . . . . . . . . . . . 44

5.4.6 Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

5.5 Evaluation of Smith Predictor . . . . . . . . . . . . . . . . . . 46

5.5.1 Transfer Functions . . . . . . . . . . . . . . . . . . . . 46

5.5.2 Step Response . . . . . . . . . . . . . . . . . . . . . . 46

5.5.3 Reference as a Ramp . . . . . . . . . . . . . . . . . . . 47

5.5.4 Load Disturbance . . . . . . . . . . . . . . . . . . . . 48

5.5.5 Model Error . . . . . . . . . . . . . . . . . . . . . . . . 49

5.5.6 Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

5.6 Comparison of Models . . . . . . . . . . . . . . . . . . . . . . 50

5.6.1 Step Response . . . . . . . . . . . . . . . . . . . . . . 50

5.6.2 Reference as a Ramp . . . . . . . . . . . . . . . . . . . 51

5.6.3 Load Disturbance . . . . . . . . . . . . . . . . . . . . 51

5.6.4 Model Error . . . . . . . . . . . . . . . . . . . . . . . . 53

5.6.5 Time-Delay and Model Error . . . . . . . . . . . . . . 54

5.6.6 Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

6 Discussion and Conclusions 57

7 Notation 61

5

Page 14: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control
Page 15: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Chapter 1

Introduction

This work has been carried out at Scania CV in Sodertalje, and deals withtime-delays in driveline control systems and possible ways to compensatefor time-delays in control systems.

1.1 Background

Time-delays occur in all real-time systems and impose a fundamental limi-tation on the performance of the control system. Since no controller will beable to eliminate the time-delay, the information will allways be more or lessoutdated when it arrives. Since more and more functionality in vehicles ishandled electronically, the amount of data being sent over different networksis increasing. In automotive applications, CAN is the most common com-munication network, and since a CAN bus can only send one message at atime, more messages will consequently cause longer time-delays. Therefore,it is of interest to investigate how time-delays affect the performance of thedriveline control systems, and if there are any good ways to compensate fortime-delays in these systems.

1.2 Goals

One of the main questions of concern in this work, was whether it would bepossible to move the cruise control from the engine management system toanother control unit that communicates with CAN. Therefore, one goal hasbeen to determine if this is possible while maintaining good performance.To bring clarity in this issue, it is necessary to know approximately how

7

Page 16: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 1. INTRODUCTION

large the time-delays would be and hence, measurements have been done tofind this out.

Since the amount of data sent over CAN is increasing, the time-delays willalso increase and thus it is of interest to find a method to compensate fortime-delays in control systems. Hence, another goal was to find a controllerthat is easy to use, and with good performance, that compensates for time-delays and is robust to disturbances and model errors. Four different meth-ods were chosen for further investigation, and are evaluated and comparedto a prototype controller from Scania in this report.

1.3 Outline of Thesis

In chapter 2, the theory behind some important concepts for this work iscovered and the driveline model that has been used throughout this projectis described. The four methods for compensation of time-delays in controlsystems that has been studied, are described in chapter 3. How the mea-surements were done, and the results of said measurements are presented inchapter 4. Thereafter follows the evaluation of the compensation methodsin chapter 5. Lastly, in chapter 6, the results are summarized and discussedand conclusions are drawn.

8

Page 17: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Chapter 2

Theory and Driveline Model

The first four sections of this chapter briefly covers the theory of some sub-jects that have been of importance for this work. The matters treated inthese sections are driveline control, time-delays in real-time control systems,CAN, and the PID controller. In the final fifth section, the driveline modelused in this thesis is described.

2.1 Driveline Control

The driveline is the part of the power train in an automotive vehicle thattransmits power from the engine to the wheels [5]. Main parts of the drivelineare clutch, transmission, shafts and wheels. Figure 2.1 shows a model of arear-driven vehicular power train consisting of engine and driveline.

Driveline control can be divided into two main types, driveline speed controland driveline control for gear shifting. This work focuses on driveline speedcontrol, where the position of the accelerator pedal gives the desired enginespeed. Traditionally, RQV (Regler Quer Verstellung) control has been usedas speed control for diesel engines. The RQV is basically a proportionalcontroller that calculates the fuel amount based on the error. Nowadaysthe RQV is normally extended with engine controlled damping of drivelineresonances. In this work, driveline resonances is not something that hasbeen taken into account.

9

Page 18: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 2. THEORY AND DRIVELINE MODEL

Engine Clutch

Transmission

Propeller shaft

Wheel

Final drive

Drive shaft

Figure 2.1: Powertrain.

2.2 Time-Delays in Real-Time Control Systems

A real-time system is a system whose behaviour does not only depend onthe computational results but also on the time the results are produced [6].

Real-time systems can be classified into hard, firm and soft real-time sys-tems. In a hard real-time system it is very important that the results areproduced in time; if a deadline is missed, that will cause severe consequences(total system failure). In a firm real-time system a missed deadline is not ascritical but the results will be of no use if they are not produced in time so amissed deadline might cause the system to perform less well. In a soft real-time system the results will still be of use after deadline but the usefulnesswill degrade after deadline.

Time-delays are a common problem in implemented real-time systems. Fromthe moment a sensor node measures the output value of a process until thecontrol signal arrives at the actuator node, some time will pass and theinformation might be outdated. This will make the system less robust anddecrease the performance of the system.

There are essentially three types of time-delays between the sensor and thecontroller, namely communication delay between the sensor and the con-troller, computational delay in the controller and communication delay be-tween the controller and the actuator.

Time-delays are either constant or varying. If the time-delays are constant,

10

Page 19: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 2. THEORY AND DRIVELINE MODEL

the system will be detereministic, which makes it easier to compensate forthe time-delays. If the time delays on the other hand are varying the systemcan be made deterministic by introducing clocked buffers larger than theworst case time delay [7]. A drawback with this method is that the delaywill be longer than necessary.

A time-delay will allways impose a limitation on the performance of theregulated system, since no matter which controller is used, the time-delaycan not be shortened. There are ways to compensate for time-delays though,and making the control system more robust. A few of these compensationmethods will be studied in this thesis.

2.3 Controller Area Network (CAN)

CAN is a serial communications protocol originally designed for automo-tive applications, but is nowadays also used in many other areas, such asaerospace, maritime, industrial automation and medical equipment [1].

A CAN network consists of a bus connected to several nodes. Each node isable to transmit and receive messages, but only one message can be trans-ferred at a time. When the CAN bus is free, any node connected to the buscan start to transfer a message, but if two or more nodes start to transmitmessages at the same time there will be a collision, which in CAN is solvedby bitwise arbitration using the message identifier. The lower the messageidentifier is, the higher priority has the message. Higher priority messageswill always gain bus access before lower priority messages.

The CAN protocol can be decomposed into three abstraction layers: appli-cation layer, data link layer and physical layer [3]. The application layerhandles the communication with the operating system or application of theCAN device. The data link layer is responsible for transfering data betweenthe physical layer and the application layer but also for detecting corrupteddata. The physical layer consists of the actual physical connections betweenthe nodes in the network as well as the electrical, mechanical, functional andprocedural parameters concerned with the network.

11

Page 20: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 2. THEORY AND DRIVELINE MODEL

In CAN, messages are referred to as frames; there are four different types offrames [11]:

• Data Frame - Sends data from one node to one or several other nodes

• Remote Frame - Used by a node to request data from another node

• Error Frame - Reports detected errors

• Overload Frame - Requests a delay between two data or remoteframes

Time delays in CAN are varying and hard to predict. Some examples ofsources to time delays in CAN are waiting for the network to become idle,waiting for messages with higher priority to be transmitted and if an erroroccurs during transmision, waiting for the message to be retransmitted.

2.4 PID Controller

The proportional-integral-derivative (PID) controller is the most widely usedcontroller in industrial control systems. It takes the reference signal and theoutput signal (or the difference between the two, namely the error) as inputsand yields the sum of the proportional, the integral, and the derivative valuesas output [4]. Most of the control methods studied in this work are basedon PID (including PI and PD) control.

There are various different versions of the PID controller algorithm. Theideal PID controller is described by

u(t) = Kp

e(t) +1

Ti

t∫0

e(τ)dτ + Tdde(t)

dt

(2.1)

where e(t) = r(t)− y(t) is the error, u is the control signal, r the referencesignal, y the output signal, Kp the proportional gain, Ti the integrationtime, and Td the derivative time.

The proportional term produces an output value that is proportional to theerror. Higher proportional gain gives a faster controller but might also causeinstability. The proportional term alone is not able to completely eleminatethe error caused by disturbances.

This problem can be resolved by adding an integral term. The integral termdetermines the accumulated error by computing the sum of the instantan-ious error over time. The output value of the integral term is proportional

12

Page 21: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 2. THEORY AND DRIVELINE MODEL

to the accumulated error. Too high integral gain (Ki =Kp

Ti) might cause

oscillations and instability.

To obtain a controller that reacts faster to changing disturbances, a deriva-tive term can also be added. The derivative term is proportional to thechange in the error and thus predicts the system’s future behavior and com-pensates for this. In theory this will decrease the settling time. In realityhowever, the risk for instability is big since the derivative term is sensi-tive to noise. Higher derivative gain (Kd = KpTd) increases the risk ofovercompensation for changes in the error, causing oscillations and in wostcase instability. Therefore, the derivative term is always combined with alow-pass filter in real-world applications.

Tuning of a PID controller can be done in many ways, a large number oftuning rules suited for different types of systems are listed in [8].

2.5 Driveline Model

The driveline transfers the moment generated by the engine to the wheels.A simple model has been used in this work, derived from Newton’s secondlaw,

mv = Fv = u(t), (2.2)

where where m is the mass of the truck, v is the velocity of the truck andFv is the force moving the truck forward. Laplace transformation gives

msV (s) = U(s) (2.3)

andV (s) = G(s)U(s), (2.4)

which results in the model

G(s) =1

ms. (2.5)

It is an integrating process that takes the moment generated by the engineas input and gives the velocity of the truck as output. Since a truck is veryheavy, other factors affecting the performance aside from the mass will beof less importance. Therefore, such a simple model is sufficiently accuratefor this work, even though friction as well as flexibility of the driveline isneglected. With a time-delay L, the system becomes

Gd(s) =1

mse−sL. (2.6)

This is the model that will be used throughout this thesis.

13

Page 22: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control
Page 23: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Chapter 3

Methods for Compensationof Time-Delays in ControlSystems

There are various ways to compensate for time-delays in control systems, inthis work four different methods have been investigated. The goal is to finda fairly simple method to compensate for time-delays of varying length, amethod that is also robust to disturbances and has good performance.

3.1 Extended AMIGO Tuning Rules

One method to compensate for varying time-delays is to use the PID tuningrules for integrating processes developed by L. M. Eriksson, T. Oksanenand K. Mikkola [2]. They are based on the AMIGO tuning rules for PIDcontrollers and will guarantee that the system remains stable as long as thetime-delays are within the jitter margin, δmax, which gives a measure onhow much the delay is allowed to exceed the minimum delay, Lmin.

The process model is described by

Gd(s) =K

se−sLmin (3.1)

where K is the velocity gain and Lmin is the minimum time-delay. Sincethe ideal PID controller is very sensitive to noise, a low-pass filter,

1

1 + Tfs, (3.2)

15

Page 24: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 3. METHODS FOR COMPENSATION OF TIME-DELAYSIN CONTROL SYSTEMS

where Tf is the filter time-constant, has been added. Tf is fixed to a valuelarge enough to obtain sufficient noise compensation. Some minor changesare done to the ideal PID controller resulting in

u(t) = Kp[br(t)− yf (t)] +Ki

t∫0

[r(τ)− yf (τ)]dτ

+Kd

(cdr(t)

dt−dyf (t)

dt

)(3.3)

where k, Ki and Kd are the controller gains, b and c the setpoint weights(in this case b = 1 and c = 0) and yf is the filtered process variable.

Most of the tuning rules for integrating processes with delay and a first orderlow-pass filter are on the form

Kp = aKLmin

Ki = 0

Kd =aTf

KLmin

{b = 1

c = 0(3.4)

where the gain a is to be determined, which is also the case for these extendedAMIGO tuning rules.

The Nyquist curve of the open-loop transfer function is described by

H(jω) =a

Lse−sL

∣∣∣s=jω

. (3.5)

From equation 3.5, the phase margin can be determined to mp = π2 − a.

Thus, the feasible range for a is(0, π2

)and the jitter margin of the system

becomes

δmax <

∣∣∣∣1 +H(jω)

jωH(jω)

∣∣∣∣ . (3.6)

The jitter margin is obtained by minimizing the right side of equation 3.6with respect to the frequency ω. This can not be solved analytically, itseems. L. Eriksson et al. have with numerical methods determined thejitter margin for an integrating process with time-delay to approximately

δmax =

(0.9562

a− 0.6431

)Lmin. (3.7)

Thus, we get

a =0.9562Lmin

δmax + 0.6431Lmin, (3.8)

which is the highest value of a guaranteeing stability for a certain jittermargain δmax.

16

Page 25: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 3. METHODS FOR COMPENSATION OF TIME-DELAYSIN CONTROL SYSTEMS

3.2 Simple Internal Model Control (SIMC) Tun-ing Rules

Skogestad has developed simple PID tuning rules (described in [10]) forvarious different models. The tuning rules are based on the IMC PID tuningrules of Rivera et al. in [9].

The tuning rules were originally developed for a second-order model withtime-delay L,

Gd(s) =K

(τ1s+ 1)(τ2s+ 1)e−sL, (3.9)

where K is the gain, τ1 is the dominant time constant and τ2 is the second-order time constant.

By using the direct synthesis approach by Rivera et al. and substitutingthe delay with a first-order Taylor approximation, Skogestad ends up witha PID controller on cascade form,

F (s) = Kcτis+ 1

τis(τds+ 1), (3.10)

with tuning rules

Kc =1

K

τ1τc + L

, τi = min{τ1, 4(τc + L)} and τd = τ2. (3.11)

Skogestad has chosen the desired response time, τc, to be equal to the time-delay (τc = L) since that results in a reasonably fast response and goodrobustness margins. To adapt the tuning rules to an integrating process,the original process model 3.9 is rewritten into

Gd(s) =K ′

(s+ 1τ1

)(τ2s+ 1)e−sL, (3.12)

and when τ1 →∞ and τ2 = 0, the resulting process model is

Gd(s) =K ′

se−sL (3.13)

with the tuning rules

Kc =1

K ′1

τc + L, τi = 4(τc + L) and τd = 0. (3.14)

The tuning rules for a controller on cascade form can easily be transformed

17

Page 26: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 3. METHODS FOR COMPENSATION OF TIME-DELAYSIN CONTROL SYSTEMS

into tuning rules for an ideal PID controller,

F (s) = Kp

(1 +

1

Tis+ Tds

), (3.15)

by setting

Kp = Kc

(1 +

τdτi

), Ti = τi

(1 +

τdτi

)and Td =

τd1 + τd

τi

, (3.16)

which in this case gives a PI controller with

Kp =1

K· 1

τc + Land Ti = 4(τc + L), (3.17)

where τc = L.

3.3 Internal Model Control (IMC) Tuning RulesBased on Sensitivity

Zhao et al. have in [13] proposed Internal Model Control (IMC) tuning rulesfor PID controllers based on a sensitivity measure.

Originally the tuning rules were developed for first and second order pro-cesses with time-delay. The first order process is described by

Gd(s) =K

τ1s+ 1e−sL, (3.18)

where K is the gain, L is the time-delay and τ1 is the time constant.The time-delay term is approximated by a first-order Taylor approxima-tion, esL ≈ 1 − sL, and the controller will then be a PI controller on theform

F (s) = Kp

(1 +

1

Tis

)(3.19)

where

Kp =τ1

K(λ+ L). (3.20)

The parameter λ is to be determined.

The maximum sensitivity, Ms, is defined as

Ms = max0≤ω≤∞

∣∣∣∣ 1

1 + F (jω)G(jω)

∣∣∣∣ . (3.21)

A graphical interpretation of the maximum sensitivity is shown in figure 3.1

18

Page 27: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 3. METHODS FOR COMPENSATION OF TIME-DELAYSIN CONTROL SYSTEMS

where it can be seen that Ms is the inverse of the shortest distance betweenthe Nyquist curve of the open loop transfer function Go = F (jω)G(jω) andthe critical point (−1, j0). The point A can be viewed as the point whereGo tangents a circle with radius 1/MS centered around the critical point. IfA is the tangent point, the condition for the Nyquist curve going through Ais

Go(jω) = −1 +1

Msejθ (3.22)

and the condition for the Nyquist curve to pass through A tangentially is

argdGo(jω)

dω=π

2− θ. (3.23)

In [12] Wang and Shao have introduced a PID controller design based onsensitivity. By making the controller zeros equal to the poles of the model,they produced an open loop transfer function on the form

F (s)G(s) =Ko

se−sL (3.24)

where Ko is the open loop gain. Through analysis, Ko has been approxi-mated to

Ko =1

L

(1.451− 1.508

Ms

). (3.25)

Then, by using equations 3.18 and 3.19, the open loop transfer function ofthe first-order system with time-delay can be obtained as

Go(s) = F (s)G(s) =e−sL

(λ+ L)s(3.26)

The relation between λ and Ms can now be determined by comparing equa-tion 3.26 with equation 3.24 and using equation 3.25, resulting in

λ =1.508− 0.451Ms

1.451Ms − 1.508L. (3.27)

An integrating process with time-delay can be approximated by a first-orderprocess with time-delay, as

Gd(s) =K

se−sL ≈ K

s+ 1ϕ

e−sL =ϕK

ϕs+ 1e−sL, (3.28)

where ϕ is an positive constant chosen sufficiently large.

According to the tuning rules, the controller parameters are then tuned as

Kp =1

K(λ+ L)and Ti = ϕ. (3.29)

19

Page 28: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 3. METHODS FOR COMPENSATION OF TIME-DELAYSIN CONTROL SYSTEMS

−1

Re

Im

θ

AM−1s

Figure 3.1: Geometric interpretation of the maximum sensitivity Ms.

3.4 Smith Predictor

The last compensation method to be inevstigated in this thesis is the Smithpredictor. A Smith predictor is a controller with an additional control looptrying to predict the current (unknown) output of the system [4].

To design a Smith predictor for the time-delayed system

G(s)e−sL, (3.30)

where L is the time-delay, one starts with finding a suitable controller Ffor the corresponding system without time-delay, in other worlds finding Fsuch that the closed loop system

FG

1 + FG(3.31)

(shown in figure 3.2) gets good properties. Adding the compensating loopas shown in figure 3.3, the transfer function for the controller becomes

F

1 + (1− e−sL)FG(3.32)

20

Page 29: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 3. METHODS FOR COMPENSATION OF TIME-DELAYSIN CONTROL SYSTEMS

∑F G

u+r y

Figure 3.2: Regulated system without time-delay.

∑ ∑F Ge−sL

u

(e−sL − 1)G

+r + y

+−

Figure 3.3: Regulated time-delayed system with Smith predictor.

and the transfer function for the whole Smith regulated system becomes

FG

1 + FGe−sL. (3.33)

21

Page 30: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control
Page 31: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Chapter 4

Measurements

To be able to determine what the effects of moving the cruise control wouldhave on performance due to increasing time-delays, it is necessary to knowapproximately how large the time-delays would be. Therefore, measure-ments have been done to investigate this.

4.1 Measurement Setup

The measurements were carried out in a Scania truck on Scania’s test track.Messages with time stamps have been sent over a CAN bus from the EMS(Engine Management System) to the GMS (Gearbox Management System)and from the GMS to the EMS to find out how long it takes for the messagesto arrive. The measurements were done with test messages with low andaverage priority, which were sent with a period of 10 ms. If the cruisecontroller was to be moved, however, the priority of the messages would behigh, and thus the time-delays would be smaller.

4.2 Results

As expected (since the CAN communication setup is designed to give smalldelays), the time-delays were very small. On average, they were between10 ms and 12 ms in each direction. Figure 4.1 shows plots of the mea-sured time-delays in both directions and for messages with average and lowpriority. In table 4.1 the mean time-delays for messages sent in both direc-tions and with different priorities are listed. Some messages are overwrittenand these messages were not taken into account when calculating the mean

23

Page 32: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 4. MEASUREMENTS

time-delay, so the real mean values are probably slightly higher. The saw-tooth like shape of the plots is caused by the clocks drifting in relation toeach other. A few percent of the messages appears to be overwritten dueto varying time-delays and clock drift.This is a deliberate design choice inthe software and should not be a problem. In table 4.2 the percentagesof overwitten messages for the different configurations are listed. A higherpercentage of the messages sent from GMS to EMS are overwitten thanthose sent from EMS to GMS. There are also a higher percentage of the lowpriority messages that are overwitten than of the average priority messages,which makes sense since an average priority message will gain access to theCAN bus before a low priority message, that would have to wait and thusbe delayed and possibly overwritten.

0 0.5 1 1.5 2 2.5x 10

5

0

0.005

0.01

0.015

0.02

Mean delay for messages of average prioritysent from EMS to GMS

t [s]

dela

y [s

]

(a)

0 5 10 15x 10

4

0

0.01

0.02

0.03

Mean delay for messages of low prioritysent from EMS to GMS

t [s]

dela

y [s

]

(b)

0 0.5 1 1.5 2 2.5x 10

5

0

0.005

0.01

0.015

Mean delay for messages of average prioritysent from GMS to EMS

t [s]

dela

y [s

]

(c)

0 5 10 15x 10

4

0

0.01

0.02

0.03

Mean delay for messages of low prioritysent from GMS to EMS

t [s]

dela

y [s

]

(d)

Figure 4.1: Measured time-delays between EMS and GMS in both directions,for messages with average and low piority.

24

Page 33: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 4. MEASUREMENTS

Priority EMS to GMS GMS to EMS

Average 0.0118 0.0115Low 0.0120 0.0113

Table 4.1: Mean time-delay.

Priority EMS to GMS GMS to EMS

Average 2.30 3.57Low 2.45 4.97

Table 4.2: Percentage of overwitten messages.

25

Page 34: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control
Page 35: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Chapter 5

Evaluation of CompensationMethods

To evaluate the models, Matlab and Simulink has been used to simulatedifferent scenarios. The tests give a measure on performance and how robustthe methods are against time-delays, load disturbances and model errors.The tests have been performed on the four proposed compensation methodsas well as a prototype controller from Scania for comparison.

One of the simplest and most common ways to evaluate a control system isto study the step response of the closed loop system. A desired result is shortrise time, short settling time and small overshoot. Preferably there shouldnot be any overshoot at all, since that gives a higher fuel consumption.

A more realistic case than letting the reference be a step is to let the referencebe a ramp since that is what the reference normally is when changing speedin automatic vehicle speed control. Thus, a ramp corresponding to thereference speed accelerating with 1 m/s2 from 0 m/s to 8 m/s (approximately30 km/h) has been used in the tests evaluating how well the methods handletime-delays.

A load disturbance can be caused for example by a change in the slopeof the road, a strong wind or friction. In this work, a load disturbancecorresponding to the slope of the road increasing from 0% to 2% as a stephas been used. To clearify, a 2% slope means that the quotient between thevertical change in position and the horisontal change in position is 2%. Thisload disturbance enters the system between the controller and the systemmodel in the control system (even though a load disturbance can enter thesystem in many different ways), as can be seen in figure 5.1.

27

Page 36: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

∑F

∑+

d

G+u+r y

∑+ n

Figure 5.1: Regulated system with load disturbance and noise.

The most relevant model error for the concerned system (aside from anincorrectly approximated time-delay) is an incorrectly approximated massof the vehicle. Therefore, tests have been carried out with varying mass inthe system model as the mass parameter in the controllers has been keptthe same.

To evaluate how robust the controllers are to noise, Simulink has been usedfor simulations where band-limited white noise has been added to the controlloop, as can be seen in figure 5.1.

The error e in the output signal can be written as

e = (1−Gc)r − Sd+ Tn (5.1)

where Gc is the closed loop system, S is the sensitivity function and T is thetransfer function describing how noise affects the system. (T is the same asthe closed loop system, so T = Gc.)

In all tests, the mass of the vehiclel is approximated as 20 000 kg and theminimum time-delay is assumed to be 0.03 s. Unless stated otherwise, thecontrollers are tuned for time-delays of around 1.0 s. The maximum momentfor a truck engine is normally around 2 500 Nm. Therefore, in the Simulinksimulations, saturation has been used to limit the control signal to this value.In the other tests, it is noted if the control signal exceeds this limit.

5.1 Evaluation of Prototype Controller

A prototype speed controller from Scania has been used for comparison withthe compensation methods.

28

Page 37: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

5.1.1 Step Response

Figure 5.2 shows the step response for the prototype controller in Matlab.The controller is somewhat slow but generates no overshoot.

0 5 10 15 20 250

0.5

1Output

t [s]

v [m

/s]

0 5 10 15 20 250

100

200

300Control signal

t [s]

u [N

m]

Figure 5.2: Output and control signal of step response for the prototypecontroller.

5.1.2 Reference as a Ramp

By letting the reference signal be a ramp increasing from 0 m/s to 8 m/s andsetting the time-delay to values between 0.1 s and 1.1 s, the result shown infigure 5.3 was obtained. The prototype controller appears to be robust totime-delays of up to around 1.0 s when the output starts to oscillate. Forlarger time-delays, the output becomes unstable.

5.1.3 Load Disturbance

Figure 5.4 shows the step response in Matlab for a load disturbance cor-responding to a change in the slope of the road from 0% to 2% when thereference signal is 0 m/s. The maximum error is approximately 0.11 m/sand seems to converge to zero.

29

Page 38: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 250

5

10Output

t [s]

v [m

/s]

delay=0.1 sdelay=0.4 sdelay=0.7 sdelay=1 s

0 5 10 15 20 25−500

0

500

1000

1500Control signal

t [s]

u [N

m]

delay=0.1 sdelay=0.4 sdelay=0.7 sdelay=1 s

Figure 5.3: Output and control signal when the reference is a ramp and thetime-delay varying for the prototype controller.

0 5 10 15 20 250

0.05

0.1

0.15

0.2Output

t [s]

erro

r [m

/s]

0 5 10 15 20 250

100

200

300Control signal

t [s]

u [N

m]

Figure 5.4: Output and control signal of step load disturbance for the pro-totype controller.

30

Page 39: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

5.1.4 Model Error

By letting the reference signal be a ramp increasing from 0 m/s to 8 m/s andsetting the real mass to values between 5 000 kg and 40 000 kg, while thecontroller is tuned for the approximated mass 20 000 kg, the result shown infigure 5.5 was obtained. Apparently the prototype controller is very robustto model errors of this kind.

0 5 10 15 20 250

5

10Output

t [s]

v [m

/s]

mass=5000 kgmass=10000 kgmass=20000 kgmass=40000 kg

0 5 10 15 20 25−1000

0

1000

2000

3000Control signal

t [s]

u [N

m]

mass=5000 kgmass=10000 kgmass=20000 kgmass=40000 kg

Figure 5.5: Output and control signal when the reference is a ramp and themass varying for the prototype controller.

5.1.5 Noise

Introducing noise to the control loop when the delay is 0.5 s, yields the resultin figure 5.6. The prototype controller does not appear to be very robustto noise, since the control signal is very noisy. Still, there is no observableeffect on the output, since the system itself is robust to noise (because atruck is very heavy).

31

Page 40: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 25−5

0

5

10Output

t [s]

v [m

/s]

0 5 10 15 20 25−2000

0

2000

4000Control signal

t [s]

u [N

m]

Without noiseWith noise

Without noiseWith noise

Figure 5.6: Output and control signal for the prototype controller when thereference is a ramp and noise is introduced.

5.2 Evaluation of Extended AMIGO Tuning Rules

The AMIGO tuning rules for integrating processes are described in section3.1. The model specific constants in all tests have been chosen to be Tf = 1,Lmin = 0.03 s and δmax = 1.5 s.

5.2.1 Transfer Functions

The transfer function for the closed loop system is given by

Gc =GfFr

1 +GfFy, (5.2)

and the sensitivity function, which describes how a load disturbance affectsthe system, is given by

S =Gf

1 +GfFy. (5.3)

32

Page 41: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

5.2.2 Step Response

For a step with amplitude A, corresponding to the reference R(s) = As , the

final value theorem gives

limt→∞

e(t) = lims→0

sE(s) = lims→0

s(1−Gc(s))R(s) = lims→0

s

(1−

GfFr1 +GfFy

)A

s

= lims→0

(1−

1ms(1+Tf s)

e−sL ·Kp

1 + 1ms(1+Tf s)

e−sL ·Kp(1 + Tds)

)A

= lims→0

(1 + 1

ms(1+sTf)e−sL ·KpTds

1 + 1ms(1+sTf)e

−sL ·Kp(1 + Tds)

)A = 0, (5.4)

so the control error for the AMIGO controller converges to zero when thereference is a step. Figure 5.7 shows the step response in Matlab, whichconfirms the previous result.

0 5 10 15 20 250

0.5

1Output

t [s]

v [m

/s]

0 5 10 15 20 250

200

400

600

800Control signal

t [s]

u [N

m]

Figure 5.7: Output and control signal of step response for AMIGO.

5.2.3 Reference as a Ramp

By letting the reference signal be a ramp increasing from 0 m/s to 8 m/s andsetting the time-delay to values between 0.1 s and 1.5 s, the result shown

33

Page 42: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

in figure 5.8 was obtained. The AMIGO controller appears to be robust totime-delays of up to around 1.5 s when the output starts to oscillate.

0 5 10 15 20 250

5

10Output

t [s]

v [m

/s]

delay=0.1 sdelay=0.5 sdelay=1 sdelay=1.5 s

0 5 10 15 20 25−1000

0

1000

2000Control signal

t [s]

u [N

m]

delay=0.1 sdelay=0.5 sdelay=1 sdelay=1.5 s

Figure 5.8: Output and control signal when the reference is a ramp forAMIGO.

5.2.4 Load Disturbance

When the reference is set to 0 m/s and a step load disturbance, correspond-ing to D(s) = A

s , is intruduced, the final value theorem gives

limt→∞

e(t) = lims→0

sE(s) = lims→0

sS(s)D(s) = lims→0

s

(Gf

1 +GfFy

)A

s

= lims→0

( 1ms(1+Tf s)

e−sL

1 + 1ms(1+Tf s)

e−sL ·Kp(1 + Tds)

)A =

A

Kp, (5.5)

so a load disturbance results in a steady-state error, AKp

, that the AMIGOcontroller will not eliminate. Figure 5.9 shows the step response in Matlabfor a load disturbance corresponding to a change in the slope of the roadfrom 0% to 2% when the reference signal is 0 m/s. This plot confirms theprevious result and the steady-state error is approximately 0.31 m/s.

34

Page 43: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 250

0.1

0.2

0.3

0.4Output

t [s]

erro

r [m

/s]

0 5 10 15 20 250

100

200

300Control signal

t [s]

u [N

m]

Figure 5.9: Output and control signal of step load disturbance for theAMIGO controller.

5.2.5 Model Error

By letting the reference signal be a ramp increasing from 0 m/s to 8 m/s andsetting the real mass to values between 5 000 kg and 40 000 kg, while thecontroller is tuned for the approximated mass 20 000 kg, the result shown infigure 5.10 was obtained. The AMIGO controller appears also to be robustto this kind of model errors even though not quite as robust as the prototypecontroller.

5.2.6 Noise

Introducing noise to the control loop when the delay is 0.5 s, yields theresult in figure 5.11. Just as the prototype controller, the AMIGO controllerdoes not seem to be very robust to noise, even though the control signal issomewhat less noisy.

35

Page 44: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 250

2

4

6

8

Output

t [s]

v [m

/s]

mass=5000 kgmass=10000 kgmass=20000 kgmass=40000 kg

0 5 10 15 20 25−1000

0

1000

2000

3000Control signal

t [s]

u [N

m]

mass=5000 kgmass=10000 kgmass=20000 kgmass=40000 kg

Figure 5.10: Output and control signal when the reference is a ramp andthe mass varying for the AMIGO controller.

0 5 10 15 20 25−5

0

5

10Output

t [s]

v [m

/s]

0 5 10 15 20 25−1000

0

1000

2000

3000Control signal

t [s]

u [N

m]

Without noiseWith noise

Without noiseWith noise

Figure 5.11: Output and control signal for the AMIGO controller when thereference is a ramp and noise is introduced.

36

Page 45: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

5.3 Evaluation of SIMC Tuning Rules

The SIMC tuning rules for integrating processes are described in section3.2. The model specific constants in all tests have been chosen to be Tf = 1,τc = 1 and L = 1 s.

5.3.1 Transfer Functions

The transfer function for the closed loop system is given by

Gc =GF

1 +GF, (5.6)

and the sensitivity function, which describes how a load disturbance affectsthe system, is given by

S =G

1 +GF. (5.7)

5.3.2 Step Response

For a step with amplitude A, corresponding to the reference R(s) = As , the

final value theorem gives

limt→∞

e(t) = lims→0

sE(s) = lims→0

s(1−Gc(s))R(s) = lims→0

s

(1− GF

1 +GF

)A

s

= lims→0

1

1 + 1mse

−sL ·Kp

(1 + 1

Tis

)A = 0, (5.8)

so the control error for the SIMC controller converges to zero when thereference is a step. Figure 5.12 shows the step response in Matlab, whichconfirms the previous result.

5.3.3 Reference as a Ramp

By letting the reference signal be a ramp increasing from 0 m/s to 8 m/s andsetting the time-delay to values between 0.1 s and 1.5 s, the result shownin figure 5.13 was obtained. Judging by these plots the SIMC controller istoo aggressive and generates an overshoot even if the time-delay is small. Itis not significantly more robust than the prototype controller even though

37

Page 46: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 250

0.5

1

1.5Output

t [s]

v [m

/s]

0 5 10 15 20 25−500

0

500

1000Control signal

t [s]

u [N

m]

Figure 5.12: Output and control signal of step response for SIMC.

it can handle a larger time-delay before the output gets unstable, since theoutput starts oscillating around the same time-delay.

5.3.4 Load Disturbance

When the reference is set to 0 m/s and a step load disturbance, correspond-ing to D(s) = A

s , is intruduced, the final value theorem gives

limt→∞

e(t) = lims→0

sE(s) = lims→0

sS(s)D(s) = lims→0

s

(G

1 +GF

)A

s

= lims→0

1mse

−sL

1 + 1mse

−sL ·Kp

(1 + 1

Tis

)A = 0, (5.9)

so the control error due to a step load disturbance converges to zero for theSIMC controller when the reference is 0 m/s. Figure 5.14 shows the stepresponse in Matlab for a load disturbance corresponding to a change in theslope of the road from 0% to 2% when the reference signal is 0 m/s. Thisplot confirms the previous result and the maximum error is approximately0.30 m/s.

38

Page 47: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 250

5

10

15Output

t [s]

v [m

/s]

delay=0.1 sdelay=0.5 sdelay=1 sdelay=1.5 s

0 5 10 15 20 25−1000

0

1000

2000Control signal

t [s]

u [N

m]

delay=0.1 sdelay=0.5 sdelay=1 sdelay=1.5 s

Figure 5.13: Output and control signal when reference is a ramp for theSIMC controller.

0 5 10 15 20 250

0.1

0.2

0.3

0.4Output

t [s]

erro

r [m

/s]

0 5 10 15 20 250

100

200

300Control signal

t [s]

u [N

m]

Figure 5.14: Output and control signal of step load disturbance for the SIMCcontroller.

39

Page 48: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

5.3.5 Model Error

By letting the reference signal be a ramp increasing from 0 m/s to 8 m/s andsetting the real mass to values between 5 000 kg and 40 000 kg, while thecontroller is tuned for the approximated mass 20 000 kg, the result shown infigure 5.15 was obtained. The SIMC controller appears to be fairly robust tothis kind of model errors but the overshoot increases with the mass, whichis a drawback. In the case where the real mass is 40 000 kg, the controlsignal also exceeds the limit of 2 500 Nm.

0 5 10 15 20 250

5

10Output

t [s]

v [m

/s]

mass=5000 kgmass=10000 kgmass=20000 kgmass=40000 kg

0 5 10 15 20 25−1000

0

1000

2000

3000Control signal

t [s]

u [N

m]

mass=5000 kgmass=10000 kgmass=20000 kgmass=40000 kg

Figure 5.15: Output and control signal when the reference is a ramp andthe mass varying for SIMC.

5.3.6 Noise

Introducing noise to the control loop when the delay is 0.5 s, yields the resultin figure 5.16. The SIMC controller appears to be robust to noise, since thecontrol signal is significantly less noisy than for the other controllers.

40

Page 49: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 25−5

0

5

10Output

t [s]

v [m

/s]

0 5 10 15 20 25−1000

0

1000

2000Control signal

t [s]

u [N

m]

Without noiseWith noise

Without noiseWith noise

Figure 5.16: Output and control signal for the SIMC controller when thereference is a ramp and noise is introduced.

5.4 Evaluation of IMC Tuning Rules Based on Sen-sitivity

The IMC tuning rules based on sensitivity for an integrating process aredescribed in section 3.3. The model specific constants in all tests have beenchosen to be Ms = 1.3, ϕ = 1000 and L = 1 s.

5.4.1 Transfer Functions

The transfer function for the closed loop system is given by

Gc =GF

1 +GF, (5.10)

and the sensitivity function, which describes how a load disturbance affectsthe system, is given by

S =G

1 +GF. (5.11)

41

Page 50: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

5.4.2 Step Response

For a step with amplitude A, corresponding to the reference R(s) = As , the

final value theorem gives

limt→∞

e(t) = lims→0

sE(s) = lims→0

s(1−Gc(s))R(s) = lims→0

s

(1− GF

1 +GF

)A

s

= lims→0

1

1 + 1mse

−sL ·Kp

(1 + 1

Tis

)A = 0, (5.12)

so the control error for the IMC controller converges to zero when the ref-erence is a step. Figure 5.17 shows the step response in Matlab, whichconfirms the previous result. The controller is reasonably fast and there isno overshoot, which is an advantage.

0 5 10 15 20 250

0.5

1

1.5Output

t [s]

v [m

/s]

0 5 10 15 20 250

100

200

300

400Control signal

t [s]

u [N

m]

Figure 5.17: Output and control signal of step response for IMC.

5.4.3 Reference as a Ramp

By letting the reference signal be a ramp increasing from 0 m/s to 8 m/s andsetting the time-delay to values between 0.1 s and 1.5 s, the result shown

42

Page 51: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

in figure 5.18 was obtained. The IMC controller appears to be robust totime-delays over 1.5 s.

0 5 10 15 20 250

5

10Output

t [s]

v [m

/s]

delay=0.1 sdelay=0.5 sdelay=1 sdelay=1.5 s

0 5 10 15 20 25−500

0

500

1000

1500Control signal

t [s]

u [N

m]

delay=0.1 sdelay=0.5 sdelay=1 sdelay=1.5 s

Figure 5.18: Output and control signal when reference is a ramp for IMC.

5.4.4 Load Disturbance

When the reference is set to 0 m/s and a step load disturbance, correspond-ing to D(s) = A

s , is intruduced, the final value theorem gives

limt→∞

e(t) = lims→0

sE(s) = lims→0

sS(s)D(s) = lims→0

s

(G

1 +GF

)A

s

= lims→0

1mse

−sL

1 + 1mse

−sL ·Kp

(1 + 1

Tis

)A = 0, (5.13)

so the control error due to a step load disturbance converges to zero forthe IMC controller when the reference is 0 m/s. Figure 5.19 shows the stepresponse in Matlab for a load disturbance corresponding to a change in theslope of the road from 0% to 2% when the reference signal is 0 m/s. In thiscase the control error does not seem to converge to zero as expected. Thisis because the integral term gets so small with this tuning that it is nearlynegligible and thus it will take very long time for the controller to eliminate

43

Page 52: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

the error. The maximum value of the error is 0.66 m/s, which is significantlymore than for the other controllers.

0 5 10 15 20 250

0.2

0.4

0.6

0.8Output

t [s]

erro

r [m

/s]

0 5 10 15 20 250

100

200

300Control signal

t [s]

u [N

m]

Figure 5.19: Output and control signal of step load disturbance for the IMCcontroller.

5.4.5 Model Error

By letting the reference signal be a ramp increasing from 0 m/s to 8 m/s andsetting the real mass to values between 5 000 kg and 40 000 kg, while thecontroller is tuned for the approximated mass 20 000 kg, the result shown infigure 5.20 was obtained. The SIMC controller appears to be fairly robust tothis kind model errors but gets significantly slower when the mass increases.

5.4.6 Noise

Introducing noise to the control loop when the delay is 0.5 s, yields theresult in figure 5.21. The control signal is about as noisy as for the AMIGOcontroller, so the IMC controller is not very robust to noise either.

44

Page 53: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 250

5

10Output

t [s]

v [m

/s]

mass=5000 kgmass=10000 kgmass=20000 kgmass=40000 kg

0 5 10 15 20 25−1000

0

1000

2000Control signal

t [s]

u [N

m]

mass=5000 kgmass=10000 kgmass=20000 kgmass=40000 kg

Figure 5.20: Output and control signal when the reference is a ramp andthe mass varying for the IMC controller.

0 5 10 15 20 25−5

0

5

10Output

t [s]

v [m

/s]

0 5 10 15 20 25−500

0

500

1000

1500Control signal

t [s]

u [N

m]

Without noiseWith noise

Without noiseWith noise

Figure 5.21: Output and control signal for the IMC controller when thereference is a ramp and noise is inroduced.

45

Page 54: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

5.5 Evaluation of Smith Predictor

The Smith predictor is described in section 3.4. To evaluate the Smithpredictor, a controller suited for the system without time delay is required.A PI controller has been chosen for this task. Since the performance of theSmith predictor depends heavily on the controller, outputs from the systemboth with and without Smith predictor is plotted for the step resonse andthe load disturbance tests.

5.5.1 Transfer Functions

The transfer function for the closed loop system is given by

Gc =GF

1 +GFe−sL, (5.14)

and the sensitivity function, which describes how a load disturbance affectsthe system, is given by

S =1 +GF (1− e−sL)

1 +GFGe−sL. (5.15)

5.5.2 Step Response

For a step with amplitude A, corresponding to the reference R(s) = As , the

final value theorem gives

limt→∞

e(t) = lims→0

sE(s) = lims→0

s(1−Gc(s))R(s)

= lims→0

s

(1− GF

1 +GFe−sL

)A

s

= lims→0

1 + 1msKp

(1 + 1

Tis

) (1− e−sL

)1 + 1

ms ·Kp

(1 + 1

Tis

)A = 0, (5.16)

so the control error for the Smith predictor converges to zero when the ref-erence is a step. Figure 5.22 shows the step response in Matlab, with boththe real and the appoximate time-delay set to 0.25 s, which confirms theprevious result. Even though there is a small overshoot when the Smithpredictor is used, the overshoot is significantly larger when the Smith pre-dictor is not used. In fact, when the approximated time-delay is the same asthe real one, the output while using the Smith predictor will be the same asit would have been for the original controller if there was no time-delay, but

46

Page 55: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

delayed (assuming the system model is correct). Thus, in this ideal case, ifthe original controller does not generate any overshoot, the Smith predictorwill not do that either.

0 5 10 15 20 250

0.5

1

1.5Output

t [s]

v [m

/s]

0 5 10 15 20 25−1000

0

1000

2000

3000Control signal

t [s]

u [N

m]

Without Smith predictorWith Smith predictor

Without Smith predictorWith Smith predictor

Figure 5.22: Output and control signal of step response for Smith predictor.

5.5.3 Reference as a Ramp

By letting the reference signal be a ramp increasing from 0 m/s to 8 m/sand setting the real time-delay to values between 0.1 s and 1.5 s, while theapproximate time-delay was set to 1.0 s, the result shown in figure 5.23was obtained. The Smith predictor appears to be robust to time-delays,but since the original controller generates an overshoot, the Smith predictoralso generates one, and it increases with the time-delay. Worth noting isalso that the control signal oscillates when the appoximated time-delay isnot the same as the real one.

47

Page 56: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 250

5

10Output

t [s]

v [m

/s]

delay=0.1 sdelay=0.5 sdelay=1 sdelay=1.5 s

0 5 10 15 20 25−1000

0

1000

2000Control signal

t [s]

u [N

m]

delay=0.1 sdelay=0.5 sdelay=1 sdelay=1.5 s

Figure 5.23: Output and control signal when the reference is a ramp forSmith predictor.

5.5.4 Load Disturbance

When the reference is set to 0 m/s and a step load disturbance, correspond-ing to D(s) = A

s , is intruduced, the final value theorem gives

limt→∞

e(t) = lims→0

sE(s) = lims→0

sS(s)D(s) =

lims→0

s

(1 +GF (1− e−sL)

1 +GFGe−sL

)A

s

= lims→0

1 + 1ms ·Kp

(1 + 1

Tis

)(1− e−sL)

1 + 1ms ·Kp

(1 + 1

Tis

) 1

mse−sL

A =AL

m, (5.17)

so a load disturbance results in a steady-state error, ALm , that the Smith

predictor will not eliminate even if the original controller was able to elim-inate the control error from a load disturbance before the Smith predictorwas added to the system. (If the approximated time-delay and the approx-imated mass are not the same as the corresponding real values, the errorwill depend on the approximated ones.) Figure 5.24 shows the step responsein Matlab for a load disturbance corresponding to a change in the slope ofthe road from 0% to 2% when the reference signal is 0 m/s. It can be seen

48

Page 57: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

that the Smith predictor does not only generate a steady-state error, butalso increases the maximum error significantly. Still, the steady-state error(which is approximately 0.2 m/s) is smaller than for the AMIGO controllerand the performance is better than for the IMC controller.

0 5 10 15 20 250

0.1

0.2

0.3

0.4Output

t [s]

erro

r [m

/s]

0 5 10 15 20 250

100

200

300Control signal

t [s]

u [N

m]

Without Smith predictorWith Smith predictor

Without Smith predictorWith Smith predictor

Figure 5.24: Output and control signal of step load disturbance for Smithpredictor.

5.5.5 Model Error

By letting the reference signal be a ramp increasing from 0 m/s to 8 m/s andsetting the real mass to values between 5 000 kg and 40 000 kg, while thecontroller is tuned for the approximated mass 20 000 kg and both the realand the approximated values of the time-delay was 0.1 s, the result shown infigure 5.25 was obtained. The Smith predictor appears to be very robust tothis kind of model errors when the real and the approximated values of thetime-delay are the same and relatively small. The result gets worse whenthese values are increased and differ. Moreover, for a mass of 40 000 kg, thecontrol signal exceeds the limit of 2 500 Nm, so in reality, the result for thatparticular case would be even worse.

49

Page 58: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 250

5

10Output

t [s]

v [m

/s]

mass=5000 kgmass=10000 kgmass=20000 kgmass=40000 kg

0 5 10 15 20 25−1000

0

1000

2000

3000Control signal

t [s]

u [N

m]

mass=5000 kgmass=10000 kgmass=20000 kgmass=40000 kg

Figure 5.25: Output and control signal when the reference is a ramp andthe mass varying for the Smith predictor.

5.5.6 Noise

Introducing noise to the control loop when the delay is 0.5 s, yields theresult in figure 5.26. It can been seen that the Smith predictor performsworse than the other controllers, since the control signal is very noisy andrepeatedly hits the saturation limit at 2 500 Nm.

5.6 Comparison of Models

In this section the proposed compensation methods are compared to eachother as well as the the prototype controller.

5.6.1 Step Response

In figure 5.27 the step responses are plotted for all the controllers, whichhave been tuned for a time-delay of 1.0 s, while the real time-delay is 0.03 s(neglible, in other words). All the compensation methods are faster thanthe prototype controller. The SIMC controller is too aggressive though,

50

Page 59: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 25−5

0

5

10Output

t [s]

v [m

/s]

0 5 10 15 20 25−4000

−2000

0

2000

4000Control signal

t [s]

u [N

m]

Without noiseWith noise

Without noiseWith noise

Figure 5.26: Output and control signal for the Smith predictor when thereference is a ramp and noise is introduced.

generating 14% overshoot and the output from the Smith predictor oscillatesslightly, probably because the approximated time-delay differs a lot from thereal time-delay.

5.6.2 Reference as a Ramp

Figure 5.28 shows the result for the controllers when the reference signal isa ramp increasing from 0 m/s to 8 m/s and the controllers are tuned for atime-delay of 1.0 s, while the real time-delay is 0.1 s. All of the controllersperform well, except for the SIMC controller, which is too aggressive andgenerates a considerable overshoot. The prototype controller is the slowest,but only slightly slower than the IMC controller. The AMIGO controller hasthe best performance in this test, since it is the fastest without any visibleovershoot.

5.6.3 Load Disturbance

Figure 5.29 shows step responses in Matlab for a load disturbance corre-sponding to a change in the slope of the road from 0% to 2% when the

51

Page 60: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 250

0.5

1

1.5Output

t [s]

v [m

/s]

PrototypeAMIGOSIMCIMCSmith

0 5 10 15 20 25−1000

0

1000

2000

3000Control signal

t [s]

u [N

m]

PrototypeAMIGOSIMCIMCSmith

Figure 5.27: Output and control signals for the different controllers for astep response.

0 5 10 15 20 250

5

10Output

t [s]

v [m

/s]

PrototypeAMIGOSIMCIMCSmith

0 5 10 15 20 25−500

0

500

1000

1500Control signal

t [s]

u [N

m]

PrototypeAMIGOSIMCIMCSmith

Figure 5.28: Output and control signals for the different controllers whenthe reference is a ramp.

52

Page 61: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

reference signal is 0 m/s. The prototype controller clearly has the bestperformance in this test, with a small maximum error that decreases fast.The SIMC controller is the second best, with an acceptable maximum errorthat decreases reasonably fast. Neither the AMIGO controller or the Smithpredictor is able to eliminate the error caused by the load disturbance, andgenerates a steady-state error. The Smith predictor produces a smaller er-ror, though. The IMC controller performs worst, as it produces a large errorthat decreases slowly.

0 5 10 15 20 250

0.2

0.4

0.6

0.8Output

t [s]

v [m

/s]

PrototypeAMIGOSIMCIMCSmith

0 5 10 15 20 250

100

200

300Control signal

t [s]

u [N

m]

PrototypeAMIGOSIMCIMCSmith

Figure 5.29: Output and control signals for the different controllers when astep load disturbance is introduced.

5.6.4 Model Error

The real mass has here been chosen to 10 000 kg, while the approximatedmass still is 20 000 kg. This particular case has been selected since a smallerreal mass in comparison to the approximated one is more likely to make theoutput unstable. The results for the different controllers are shown in figure5.30. The prototype controller stands out as it is slower than the others,which in this case indicates that it is also robuster than the other controllers.

53

Page 62: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 250

5

10Output

t [s]

v [m

/s]

PrototypeAMIGOSIMCIMCSmith

0 5 10 15 20 25−500

0

500

1000Control signal

t [s]

u [N

m]

PrototypeAMIGOSIMCIMCSmith

Figure 5.30: Output and control signals for the different controllers whenreference is a ramp and the real mass 10 000 kg, while the approximatedmass is 20 000 kg.

5.6.5 Time-Delay and Model Error

To evaluate how well the controllers perform in relation to each other whenboth the time-delay and the mass is incorrectly approximated, the result ofunit step responses for different configurations have been studied. Risetimeand overshoot was calculated for the controllers when they were tuned fortime-delays of 1.0 s and the mass was approximated to 20 000 kg, whilethe real time-delay was set to values between 0.1 s and 1.5 s and the realmass was set to values between 5 000 kg and 60 000 kg. Figure 5.31 showswhich configurations that give a stable result. The stability region for eachcontroller is the area of the corresponding colour and everything to the rightand below of that area. The prototype controller has the smallest stabilityregion, with a quite large area rendering unstable results. Too small masscombined with too large time-delays appears to yield instability, which isalso the case for the other controllers, even though they can handle smallermasses and larger time-delays. The IMC controller has the largest stabilityregion with no unstable results, and the SIMC and AMIGO controllers arejust slightly worse.

By putting risetime on the x-axis and overshoot on the y-axis, and thereafter

54

Page 63: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

marking the points corresponding to the different configurations, a ”worstcase” curve can be obtained by choosing the points with the largest overshootin relation to the risetime. Obviousy, this can only be done in the caseswhere the result is stable. Thus, the combinations rendering unstable resultsfor each controller are omitted, as well as a few outliers. These ”worstcase” plots are shown in figure 5.32. From these plots, it appears as theprototype controller is by far the most robust one, but then one have tobear in mind that quite a few of the combinations resulted in instability forthis controller, and that these combinations are probably the ones giving theworst results among the other controllers. The SIMC controller, however,clearly performs worse than the others since it generates more overshootthan the other controllers. Once again it manifests itself as too aggressive.The IMC controller stands out as the slowest, since it is the one that getsmost slowed down by an increased mass.

1 2 3 4 5 6

x 104

0

0.5

1

1.5

mass [kg]

dela

y [s

]

IMCSIMCSmithAMIGOPrototype

Figure 5.31: Stability regions for step response with varying time-delay andmass. (Each region consists of it’s own coloured area and the areas to theright and below.)

5.6.6 Noise

The SIMC controller is most robust to noise, while the rest of the evaluatedcontrollers did not reduce the impact of the noise as well. However, sincethe system itself is robust to noise, it is not as important that the controller

55

Page 64: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 5. EVALUATION OF COMPENSATION METHODS

0 5 10 15 20 250

20

40

60

80

100

120

140

over

shoo

t [%

]

risetime [s]

PrototypeAMIGOSIMCIMCSmith

Figure 5.32: Worst case overshoot in relation to risetime for varying time-delay and mass. (Note that configurations resulting in instability are omit-ted.)

also is robust to noise. For all the controllers, the output was barely affectedof the noise.

56

Page 65: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Chapter 6

Discussion and Conclusions

In this chapter, results and conclusions are summed up and discussed.

The measurements of time-delays over CAN showed, as expected, that thetime-delays are very small, and they would be even smaller if the messageswere sent as high priority messages. Because of this, combined with thefact that speed control of a heavy vehicle is a comparatively slow process,the time-delays would probably have insignificant effect on the performanceif the cruise control was moved to another control unit that communicatesover CAN. The time-delays would likely have to increase multiple times inmagnitude before the performance is noticeably impaired.

As for the proposed compensation methods, all of them have advantagesand disadvantages. They will be discussed one at a time.

The AMIGO controller is robust to time-delays and works well also whenthe time-delays vary in length. Moreover, it is fairly robust to model errorsbut gets substantially slower when the mass is increased. When a step loaddisturbance is introduced, the AMIGO controller is not able to eliminate it’simpact, which results in a steady-state error. This is the biggest drawback ofthe AMIGO controller but could possibly be resolved by adding an integralterm to it and do some adjustments to compensate for the negative effectthe integral part will have on the robustness. Finally, the AMIGO controllerdoes not seem to be very robust to noise, but since the system itself is robustto noise, the output is barely affected. If needed, the filter constant couldbe set to a higher value for better noise reduction.

Out of the four compensation methods, the SIMC controller is the leastrobust one. It is too aggressive and generates an overshoot even when thetime-delay is small and the controller is tuned accordingly. However, it

57

Page 66: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 6. DISCUSSION AND CONCLUSIONS

is still more robust to time-delays than the prototype controller. As formodel errors, the SIMC controller is not quite as robust as the other studiedcontrollers and the overshoot increases with the mass. Nevertheless, it isthe only one of the compensation methods that will eliminate the impactof a step load disturbance in reasonable time. The SIMC controller is alsorobust to noise.

The IMC controller based on sensitivity is the most robust to time-delaysof the evaluated controllers. On the other hand, it performs significantlyworse on the load performance test. Even though the IMC controller intheory should eliminate the error caused by a step load disturbance, it doesit too slowly. The peak value of the error is also a lot higher than for theother controllers. Furthermore, the IMC controller is not very robust tomodel errors and gets significantly slower when the mass is increased. Itis not very robust to noise either, but as was the case with the AMIGOcontroller, the system is robust enough to noise. Worth noting is that theresults greatly depend on the value of the parameter ϕ. If ϕ is larger, thecontroller will be more robust, but then the integral term of the controllerwill become smaller and the influence of a load disturbance will not decreaseas fast.

The Smith predictor is problematic to compare to the other controllers,since it’s performance heavily depends on the original controller used be-fore adding the Smith predictor. The controller is robust to time-delaysbut appears to generate a small overshoot which increases with the delay.However, if the original controller does not generate an overshoot and theapproximated time-delay is the same as the real one, the Smith controllerwill not generate any additional overshoot. If a step load disturbance isintroduced, it will cause a steady-state error, even if the original controlleris able to eliminate the influence of a step load disturbance. Thus, this in-ability is caused by the Smith predictor, and the error increases with theapproximated time-delay, which makes the Smith predictor less suitable forsystems with large time-delays. How robust the Smith predictor is to modelerrors depends a lot on the original controller, but the overshoot appearsto increase with the mass and the time-delay. In the test case, where thetime-delay is small, the Smith predictor is robust to this sort of model errors.On the other hand, it is the least robust controller to noise of the evaluatedcontrollers. This could probably be resolved by adding a filter.

To sum it up, all the proposed time-delay compensating controllers are morerobust to time-delays than the prototype controller but none of them areas robust against incorrectly approximated mass as the prototype. Thereis also only the SIMC controller (aside from the prototype) that is able toeliminate the influence of a step load disturbance in reasonable time, but

58

Page 67: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 6. DISCUSSION AND CONCLUSIONS

then the SIMC controller is unsuitable for other reasons. The ability toreduce noise varies between the controllers but it does not seem to be ofgreat importance since the system itself is robust to noise. In conclusion,since the prototype controller is robust to time-delays (even if not quite asrobust as the compensating controllers) and none of the proposed compen-sation methods gives significantly better results, the prototype is the bestalternative as long as the time-delays do not increase significantly. Thecompensation methods might work better with some modifications, but itis also possible that it works just as well to tune a PID controller throughtrial and error. The biggest problem with the PID controllers seem to bethat a sufficiently large integral gain is needed to eliminate a steady-stateerror caused by a load disturbance, while a larger integral gain makes thesystem less robust. Even if some PID tuning rules work well for many typesof systems, they are most certainly not suitable for all systems. An ordinaryPID controller might not even be optimal for this type of regulation. Forexample a controller in two or more parts could be more suitable.

59

Page 68: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control
Page 69: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Chapter 7

Notation

Variables

s Laplace variable

r Reference signal

u Control signal

y Output signal

yf Filtered output signal

e Error

Transfer Functions

G System

Gd System with time-delay

Gf Filter

Go Open loop system

Gc Closed loop system

F Controller

S Sensitivity function

61

Page 70: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

CHAPTER 7. NOTATION

Constants

m Mass of truck

v Velocity of truck

Fv Force driving the truck forward

K Gain

Ko Open loop gain

Kp Proportional gain

Ki Integral gain

Kd Derivative gain

Ti Integration time

Td Derivative time

Tf Filter time constant

L Time-delay

Lmin Minimum time-delay (AMIGO)

δmax Jitter margin (AMIGO)

τc Desired response time (SIMC)

λ Tuning parameter (IMC)

ϕ Constant (IMC)

62

Page 71: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

Bibliography

[1] Bosch, Stuttgart, Germany. CAN Specification, second edition.

[2] L. Eriksson, T. Oksanen, and K. Mikkola. PID controller tuningrules for integrating processes with varying time-delays. Journal ofthe Franklin Institute, 346(5):470–487, June 2009.

[3] K. Etschberger. Controller Area Network: Basics, Protocols, Chips andApplications. IXXAT Automation GmbH, Weingarten, Germany, 2001.

[4] T. Glad and L. Ljung. Reglerteknik: Grundlaggande Teori. Studentlit-teratur, Lund, Sweden, fourth edition, 2008.

[5] U. Kiencke and L. Nielsen. Automotive Control Systems: For Engine,Driveline, and Vehicle. Springer, Berlin, Germany, second edition, 2005.

[6] H. Kopetz. Real-Time Systems: Design Principles for Distributed Em-bedded Applications. Springer, New York, USA, second edition, 2011.

[7] J. Nilsson. Real-time control systems with delays. Technical report,Department of Automatic Control at Lund Institute of Technology,Lund, Sweden, 1998.

[8] A. O’Dwyer. Handbook of PI and PID Controller Tuning Rules. Impe-rial College Press, London, Great Britain, 2006.

[9] D. E. Rivera, M. Morari, and S. Skogestad. Internal Model Control. 4.PID controller design. Ind. Eng. Chem. Res., 25(1):252–265, Januari1986.

[10] S. Skogestad. Probably the best simple PID tuning rules in the world.Technical report, Department of Chemical Engineering at the Nor-wegian University of Science and Technology, Trondheim, Norway,September 2001.

[11] W. Voss. A Comprehensible Guide to Controller Area Network. Copper-hill Technologies Corporation, Greenfield, Massachusetts, USA, secondedition, 2008.

63

Page 72: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

BIBLIOGRAPHY

[12] Y.-G. Wang and H.-H. Shao. PID auto-tuner based on sensitivity spec-ification. Chemical Engineering Research and Design, 78(2):312–316,March 2000.

[13] Z.-C. Zhao, Z.-Y. Liu, and J.-G. Zhang. IMC-PID tuning method basedon sensitivity specification for process with time-delay. Journal of Cen-tral South University of Technology, 18(4):1153–1160, August 2011.

64

Page 73: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control
Page 74: Investigation of and Compensation for Time-Delays in ...kth.diva-portal.org/smash/get/diva2:708635/FULLTEXT01.pdfTime-delays occur in all real-time control systems. The driveline control

TRITA-MAT-E 2014:20 ISRN-KTH/MAT/E—14/20-SE

www.kth.se