• No results found

Adaptive Cruise Control for Heavy Vehicles : Hybrid Control and MPC

N/A
N/A
Protected

Academic year: 2021

Share "Adaptive Cruise Control for Heavy Vehicles : Hybrid Control and MPC"

Copied!
131
0
0

Loading.... (view fulltext now)

Full text

(1)

Department of Electrical Engineering

Adaptive Cruise Control for Heavy Vehicles

Hybrid Control and MPC

Examensarbete utfört i Reglerteknik

vid Tekniska Högskolan i Linköping

av

Daniel Axehill

Johan Sjöberg

Reg nr: LiTH-ISY-EX-3416-2003

Linköping 2003

TEKNISKA HÖGSKOLAN

LINKÖPINGS UNIVERSITET

Department of Electrical Engineering Linköping University

S-581 83 Linköping, Sweden

Linköpings tekniska högskola Institutionen för systemteknik 581 83 Linköping

(2)
(3)

Hybrid Control and MPC

Examensarbete utfört i Reglerteknik

vid Linköpings Tekniska Högskola

av

Daniel Axehill

Johan Sjöberg

Reg nr: LiTH-ISY-EX-3416-2003

Handledare: PhD Michael Blackenfelt (Scania) Lic. Eng. Kristian Lindqvist (Scania) Lic. Eng. Johan Löfberg (LiTH) Examinator: Prof. Torkel Glad

(4)
(5)

Institutionen för Systemteknik 581 83 LINKÖPING 2003-02-13 Språk Language Rapporttyp Report category ISBN Svenska/Swedish X Engelska/English Licentiatavhandling

X Examensarbete ISRN LITH-ISY-EX-3416-2003

C-uppsats

D-uppsats Serietitel och serienummerTitle of series, numbering ISSN Övrig rapport

____

URL för elektronisk version

http://www.ep.liu.se/exjobb/isy/2003/3416/

Titel

Title

Adaptiv farthållning för tunga fordon - hybrid reglering och MPC Adaptive Cruise Control for Heavy Vehicles - Hybrid Control and MPC

Författare

Author

Daniel Axehill och Johan Sjöberg

Sammanfattning

Abstract

An Adaptive Cruise Controller (ACC) is an extension of an ordinary cruise controller. In addition to maintaining a desired set velocity, an ACC can also maintain a desired time gap to the vehicle ahead. For this end, both the engine and the brakes are controlled.

The purpose with this thesis has been to develop control strategies for an ACC used in heavy vehicles. The focus of the work has been the methods used for switching between the use of engine and brake. Two different methods have been studied, a hybrid controller and an MPC-controller. For the hybrid controller, the main contribution has been to use the influence of the surroundings on the acceleration of the truck. This consists of several parts such as wind drag, road slope and rolling resistance. The estimated influence of the surroundings is used as a switch point between the use of engine and brakes. Ideally, these switch points give bumpless actuator switches.

The interest in the MPC-controller as an alternative solution was to achieve automatic actuator switching, thus with no explicitly defined switch points. The MPC-controller is based on a model of the system including bounds on the control signals. Using this knowledge, the MPC-controller will choose the correct actuator for the current driving situation.

Results from simulations show that both methods solve the actuator switch problem. The advantages with the hybrid controller are that it is implementable in a truck with the hardware used today and that it is relatively simple to parameterise. A drawback is that explicit switch points between the uses of the different actuators have to be included. The advantages with the

(6)

be mentioned that the variant of MPC, used in this thesis, is too complex to implement in the control system currently used in trucks. One further important drawback is that MPC demands a mathematical model of the system.

Nyckelord

Keyword

hybrid control, MPC, ACC, Adaptive cruise control, truck, actuator switching, switch strategies, state machine

(7)

I

addition to maintaining a desired set velocity, an ACC can also maintain a desired time gap to the vehicle ahead. For this end, both the engine and the brakes are controlled.

The purpose with this thesis has been to develop control strategies for an ACC used in heavy vehicles. The focus of the work has been the methods used for switching between the use of engine and brake. Two different methods have been studied, a hybrid controller and an MPC-controller.

For the hybrid controller, the main contribution has been to use the influence of the surroundings on the acceleration of the truck. This consists of several parts such as wind drag, road slope and rolling resistance. The estimated influence of the surroundings is used as a switch point between the use of engine and brakes. Ideally, these switch points give bumpless actuator switches.

The interest in the MPC-controller as an alternative solution was to achieve automatic actuator switching, thus with no explicitly defined switch points. The MPC-controller is based on a model of the system including bounds on the control signals. Using this knowledge, the MPC-controller will choose the correct actuator for the current driving situation.

Results from simulations show that both methods solve the actuator switch problem. The advantages with the hybrid controller are that it is implementable in a truck with the hardware used today and that it is relatively simple to parameterise. A drawback is that explicit switch points between the uses of the different actuators have to be included. The advantages with the MPC-controller are that no explicit switch points have to be introduced and that constraints and time delays on signals in the system can be handled in a simple way. Among the drawbacks, it can be mentioned that the variant of MPC, used in this thesis, is too complex to implement in the control system currently used in trucks. One further important drawback is that MPC demands a mathematical model of the system.

(8)
(9)

III

inställd hastighet, kan en ACC också hålla en önskad tidslucka till framförvarande fordon. För att kunna uppfylla ovanstående önskemål regleras både motor och bromsar.

Syftet med det här examensarbetet har varit att utveckla reglerstrategier för en ACC, använd i tunga fordon. Fokus med arbetet har varit att utveckla metoder som hanterar bytet mellan gas och broms. Två olika metoder har studerats, dels en hybridregulator och dels en MPC-regulator.

Huvudbidraget med hybridregulatorn har varit att använda omgivningens påverkan på lastbilens acceleration. Den består av flera olika komponenter såsom luftmotstånd, väglutning och rullmotstånd. Den skattade påverkan från omgivningen används som brytpunkt mellan användandet av gas och broms. Idealt kommer denna brytpunkt att åstadkomma stötfria aktuatorbyten.

Intresset för MPC-regulatorn som en alternativ lösning var att bytet mellan gas och broms skulle kunna skötas automatiskt, utan några explicit definierade brytpunkter. Detta är möjligt eftersom MPC-regulatorn har tillgång till en modell över fordonet och de intervall inom vilka styrsignalerna måste befinna sig.

Resultat från simuleringar visar att båda metoderna löser problemet med att byta aktuator. Fördelar med hybridregulatorn är att den är implementerbar i en lastbil redan med dagens hårdvara samt att den är relativt enkel att parameterisera. En nackdel är att explicita brytpunkter mellan användandet av de olika aktuatorerna måste införas. Fördelar med MPC är att inga explicita brytpunkter måste införas samt att bivillkor och tidsfördröjningar på signaler i systemet kan hanteras på ett enkelt sätt. Bland nackdelarna kan nämnas att den variant av MPC som har använts i detta examensarbete är alltför beräkningskrävande för att kunna implementeras i det styrsystem som används i lastbilar idag. Ytterligare en viktig nackdel är att MPC kräver en matematisk modell av systemet.

(10)
(11)

V

Lindqvist and Michael Blackenfelt, for excellent guidance and many inspiring discussions. We would also like to thank our supervisor Johan Löfberg from Linköping University for his good advises and help through the work.

Furthermore, the group RESC at Scania deserves our best thanks for making our time at Scania to a great final of our undergraduate studies. During our time at the company many people not explicitly mentioned above also have supported us. A thousand thanks to you all! Last, but not least, warm thanks are dedicated to our families for their love and support throughout the university studies.

Linköping, February 2003

(12)
(13)

VII

1 INTRODUCTION...1

1.1 BACKGROUND...1

1.2 PURPOSE...1

1.3 METHOD...1

1.4 INTRODUCTION TO THEACC PROBLEM...2

1.4.1 Problem Description...2

1.4.2 ISO Standard Performance Limits...2

2 SYSTEM DESCRIPTION ...3

2.1 VEHICLE...3

2.2 SENSORS...4

2.2.1 Distance and Velocity Sensor...4

2.2.2 Yaw-rate Sensor ...4 2.3 ENGINE...5 2.4 WHEELBRAKES...5 2.5 RETARDER...7 3 CONTROL THEORY...9 3.1 HYBRIDSYSTEMS...9

3.2 DIFFERENTIALPI-CONTROLLER... 10

3.3 LINEARISATION OFMODEL ANDSTATEESTIMATION... 11

3.3.1 Linearisation ... 11

3.3.2 Conversion of Time Continuous Models to Time Discrete Models... 12

3.3.3 Extended Kalman Estimator ... 13

3.4 MODELPREDICTIVECONTROL– MPC ... 15

3.4.1 MPC Basics... 15

3.4.2 Extending the Framework to Handle Measurable Disturbances... 20

3.4.3 More about Constraints... 21

3.4.4 Using a Model Linearised around a Non-Equilibrium Point ... 22

3.4.5 Choosing the Type of Control Signal in the Prediction ... 23

3.4.6 Soft Constraints... 26

3.4.7 Handling of Time Delays ... 28

3.4.8 Dynamic State Weights ... 30

3.4.9 Terminal State Weight ... 30

3.4.10 Using MPC through an Already Existing Controller... 32

3.4.11 Avoiding Simultaneous Use of Control Signals... 32

4 SYSTEM MODELLING... 35 4.1 TRUCK... 35 4.1.1 Vehicle ... 35 4.1.2 Engine... 37 4.1.3 Wheel Brakes ... 38 4.1.4 Retarder... 39 4.2 DRIVINGENVIRONMENT... 43 4.2.1 Road Description... 43 4.2.2 Traffic Situation ... 43

5 STATE MACHINE COMBINED WITH TRADITIONAL CONTROL ... 45

5.1 INTRODUCTION... 45

5.2 ESTIMATIONS ANDCALCULATIONS... 47

5.2.1 The Desired Distance to the Lead Vehicle ... 47

5.2.2 The Acceleration From the Surroundings, aenvironment... 48

5.2.3 Curve Detection ... 50

5.3 STATESWITCHSTRATEGIES... 52

5.4 MAINCONTROLLERSTRUCTURE... 54

(14)

VIII

5.5.4 Lost Target... 67

6 STATE MACHINE COMBINED WITH MPC... 69

6.1 INTRODUCTION... 69

6.2 LINEARISATION OF THESYSTEMMODEL... 69

6.3 CONVERSION OF THETIMECONTINUOUSSYSTEMMODEL TO ATIMEDISCRETEMODEL... 73

6.4 INTRODUCINGINTEGRALACTION... 74

6.5 STATEESTIMATION... 77

6.6 STATEMACHINE... 78

6.6.1 Introduction ... 78

6.6.2 States ... 78

6.6.3 Other Logic ... 80

6.7 SWITCHINGBETWEENACTUATORS... 80

6.8 STATECONSTRAINTS... 81

6.9 CHOICE OFPREDICTIONHORIZON... 87

6.10 SMOOTHINTRODUCTION OFNEWSTATECONSTRAINTS... 89

7 COMPARISON BETWEEN HYBRID CONTROLLER AND MPC ... 91

7.1 COMPLEXITY... 91

7.2 ROBUSTNESS IN PRACTICE... 91

7.3 HARDWARE REQUIREMENTS... 93

7.4 HANDLING TIME DELAYS IN THE RETARDER... 93

7.5 SWITCHING BETWEEN THE ACTUATORS... 93

7.6 INTEGRAL ACTION... 93

7.7 CONSTRAINTS ON THE SIGNALS AND STATES... 94

8 SIMULATIONS ... 95

8.1 DESCRIPTION OFSCENARIO1 ... 95

8.1.1 Comments to simulation results... 95

8.2 DESCRIPTION OFSCENARIO2 ... 97

8.2.1 Comments to simulation results... 97

9 CONCLUSIONS ... 99

10 PROPOSITIONS TO FUTURE WORK ... 101

10.1 EXPLICITMPC ... 101

10.2 INTERIOR POINT SOLVER... 101

10.3 MORE ADVANCE REFERENCE SIGNAL PRE-FILTERING... 101

11 BIBLIOGRAPHY ... 103

APPENDIX A... 105

A.1 HYBRID CONTROLLER PLOT... 106

A.2 MPC-CONTROLLER PLOT... 107

A.3 ROBUSTNESS TEST... 108

A.4 ROBUSTNESS TEST... 109

A.5 ROBUSTNESS TEST... 110

A.6 ROBUSTNESS TEST... 111

A.7 HYBRID CONTROLLER PLOT: CUT-IN SITUATION... 112

A.8 MPC-CONTROLLER PLOT: CUT-IN SITUATION... 113

APPENDIX B ... 115

B.1 RELINEARISATION... 115

B.2 NUMBER OFSLACKVARIABLES AND THEIR RESPECTIVEPENALTY... 115

(15)

1 Introduction

1.1 Background

The background to this thesis is the modern driver’s growing demand of comfort increasing driving assistance. By the introduction of the ordinary cruise controller, a new aid for relaxed and comfortable driving became available to the driver. As long as the road has high standard and the traffic flows, it does its job quite well. Everybody who has driven a cruise controller equipped car knows that it also has its limitations. The most important one is of course that it does not know anything about the surroundings, which makes it impossible to adjust the speed of the vehicle to the actual driving situation. As sensors have become smaller, more reliable and cheaper, it is today possible to provide the ordinary cruise controller with necessary information about the surroundings. The most desirable variable to control is the distance to the vehicle ahead. The extended controller with this property is called an Adaptive Cruise Controller (ACC). To control the distance both the engine and the brakes are used. In the truck application, not only engine brake and wheel brakes are used, but also a so-called retarder. The retarder is a hydraulic auxiliary brake, which is used to relieve the wheel brakes at softer brakings.

1.2 Purpose

The purpose with this thesis is to design control strategies that makes it possible to use ACC in heavy trucks. The focus in this work is to develop strategies for handling the switching between the usage of the engine, the wheel brakes and the retarder. Two methods are studied. The first method is to use a so-called hybrid controller and the objective is to develop a state machine and the associated control strategies. Since this partly already has been done at Scania, our focus is to find and test new ideas. The second method is to use an advanced control strategy called Model Predictive Control (MPC). The purpose is to find out if an MPC-controller can switch between engine and brakes without any explicitly defined switch points. Furthermore, it is interesting to find out if the state machine can be reduced, compared to the hybrid solution.

1.3 Method

First old reports, mainly from Scania, were examined for ideas and important basic knowledge. Then the existing Simulink truck model was refined and extended to fulfil our needs.

To be able to simulate realistic driving situations road and traffic scenarios have been modelled. All sensors used by the ACC-system have also been included in the vehicle model. The next part in the work was to draw up the guidelines for the ACC logic. These were implemented in the Simulink toolbox Stateflow.

In the MPC-part of the thesis, the controller was written as a Matlab S-function. In this part, also the state machine was written as an S-function and Stateflow was thus not used at all. All results in this thesis originate from simulations in Matlab and Simulink, i.e. no practical tests have been performed.

(16)

1.4 Introduction to the ACC Problem

1.4.1 Problem Description

To be able to introduce the reader to the problem, first the main variables in the problem need to be defined. These variables, and their explanation, are given in table 1.1. The problem is also visualised in figure 1.1.

vlead

v

dist distref

Lead vehicle ACC equipped truck

Figure 1.1: Definition of variables in the ACC-problem. Table 1.1: Variable description

Variable Physical description

v ACC-equipped truck velocity.

dist Distance to the lead vehicle.

vrel Relative velocity between the truck and the lead vehicle.

arel Relative acceleration between the truck and the lead vehicle.

ψ& Yaw-rate

From these measurements the lead vehicle velocity can be calculated as

rel lead v v

v = + (1.1)

The control objective in the ACC-problem can be described as controlling v in a way that dist equals distref. This also implies that v should equal vleadunder static conditions. The reference

distance distrefis calculated from the desired time gap thw, which is chosen by the truck driver.

The control objective is supposed to be met in presence of external disturbances as lead vehicles, road slope, wind drag, rolling resistance and curves. In addition, some constraints need to be met. First, the truck velocity is limited to the one set by the driver. This upper limit is in this thesis often referred to as the ACC set speed, vref,ACC. Second, there are some formal

limits defined by the ISO-standard [20].

1.4.2 ISO Standard Performance Limits

Some limits on the system performance are given by the ISO-standard for an ACC-system [20]. In this thesis, only the constraints regarding the acceleration are of interest. The important constraints regarding the acceleration when the ACC-system is enabled are

• The maximum mean retardation shall be limited to 3.0 m/s2(average over 2 s).

The maximum mean retardation rate shall not exceed 2.5 m/s3(average over 1 s).

(17)

2 System Description

2.1 Vehicle

The adaptive cruise controller is designed for a Scania 164 truck (See figure 2.1). If nothing else is mentioned, the truck mass is in this thesis assumed 25000 kg. Except for the standard equipment, the truck used is assumed to have an electronically controlled brake system (EBS) and a so-called retarder. This is an auxiliary brake system that is supposed to be used in critical situations. More information about the retarder can be found in section 2.5. Other non-standard equipment assumed to be present on the truck is the combined distance and velocity sensor, and the yaw-rate sensor. These are further described in section 2.2.1 and 2.2.2 respectively.

Figure 2.1: This figure shows the Scania 164 truck. In the number 164, 16 stands for a 16-litre engine and 4 stands for the truck generation (4 is the latest generation).

In the perspective of an adaptive cruise controller, a truck differs mainly in two important ways compared to an ordinary car, the mass of the vehicle and the number of braking systems. The large mass affects the control design basically in two ways. First, it is more important to keep a longer distance to a vehicle in front of the truck. This gives extra time for smooth braking and extends the possibilities for the control system to handle more situations without involving the driver. This makes it possible to brake the truck in time to avoid a collision and it also reduces excessive braking that can fade the brakes and consume a lot of unnecessary fuel. Second, the large mass stores a great amount of motion energy. This energy originates, in most cases, from the fuel. This means that it is important to use it in the best possible way. For example, instead of keeping the set cruise speed, when driving downhill it could be desirable to increase the speed a little. This means that the stored energy from this extra velocity can be used when the road flattens out and the wind drag and the rolling resistance again are the dominating external forces in steady state.

The other property, which makes the control design harder on a truck, is that it possesses different kinds of braking systems. Particularly on the truck used in this thesis there are four kinds of braking possibilities. The first way to apply a negative force to the truck is to stop the injection of fuel to the cylinders. This kind of braking is called engine braking, because the engine friction and pump losses are used. Normally on a gasoline engine the motor brake is quite effective. This is highly dependent on the vacuum pressure that is built up in the intake

(18)

manifold when the throttle is at idle position. When this is the case the pump losses are significant and the engine is braking. On a diesel engine there is no throttle plate that controls the airflow in the intake manifold. This makes the braking effect when the throttle is released very small, compared to a spark-ignited engine. To compensate for this drawback it is common to place a so-called exhaust brake in the exhaust pipe. This device is a throttle valve in the exhaust pipe that can create a high exhaust pressure that brakes the engine. The third brake system is the so-called retarder. This is a hydraulic brake and is further described in section 2.5. Finally, a truck is equipped with a pneumatic so-called foundation brake. This brake system is more thoroughly described in section 2.4.

2.2 Sensors

The truck contains several different types of sensors already in the standard configuration. These are used for example in the engine control system, electronic stability system (ESP), anti-lock braking system (ABS) etc. The ACC system needs some extra sensors to measure parameters regarding the surrounding driving situation like distance to the vehicle ahead and the curvature of the road. A possibility is to measure the curvature of the road using the already existing yaw-rate sensor included in the ESP.

2.2.1 Distance and Velocity Sensor

When an ACC system is implemented, there are several alternative sensors available to measure the distance between the ACC vehicle and the vehicle ahead. The two most relevant sensor types are based on laser or radar technology. Differences in performance between these two types occur when the weather is bad. The performance of the laser sensor is highly degraded by dirt, snow or mud on the back of the target vehicle. The same problem also arises if the lens of the laser sensor is dirty [14]. The radar sensor is not affected by bad weather or by plastic components that are hiding the sensor in the front. This makes it possible to mount a radar sensor behind a protective plastic cover integrated in the bumper [14]. Finally, the laser can run into problems in intensive sunlight [14].

The radar sensor and the laser sensor share some basic physical limitations. The two most important are that they may lose the target when the curvature of the road is too high or the slope changes too fast. These problems occur because of the limited field of sight of the sensors and the fact that they cannot see through the ground.

In this thesis, the distance sensor used is assumed to report the target that is the one closest to the truck in its predicted driving lane. Further, all signal processing of the raw data is assumed to be performed in the distance sensor. The output signals from the unit are the distance to the lead vehicle, the relative velocity and the relative acceleration. All these signals are quantised.

2.2.2 Yaw-rate Sensor

Yaw-rate is a measure of how fast the truck rotates around its vertical axis. Normally, it is given in degrees per second or radians per second. A yaw-rate sensor measures the yaw-rate usually by using a small double-ended tuning fork. The tuning fork is made of quartz which makes it is possible to get it to oscillate electronically. When the oscillating tuning fork is rotated around its axis of symmetry, the Coriolis force generates a small torque that is proportional to the yaw-rate. The torque is then converted to a DC-voltage that can be measured.

(19)

The yaw-rate sensor is for example used to provide the radar unit with truck yaw-rate data. The radar uses this data when it tries to decide whether vehicles ahead are in the same driving lane as the ACC-equipped truck or not.

The sensor data is also possible to use in the ACC control unit for other purposes. For example, it can be used to adjust the control strategy when a curve is detected (see section 5.2). Another possible usage of this information is to lower the set speed of the vehicle if the curve is to sharp in relation to the velocity of the truck. This feature makes the ride safer and more comfortable.

2.3 Engine

The engine used in this thesis is Scania’s second strongest, which is a 16-litre turbo charged V8 diesel engine (see figure 2.2). It delivers a maximum torque of 2300 Nm at 1100-1300 rpm and a maximum power of 480 hp at 1900 rpm [15].

Figure 2.2: This figure shows Scania’s second strongest engine, which is a 16-litre turbo charged V8 diesel engine.

In this thesis, the engine is controlled either through the cruise controller or through injecting a desired amount of fuel per stroke, mfi,desired. The main reason not to control mfi,desireddirectly

is that it is a hard job to find the parameters to each engine and truck configuration. By using the cruise controller the already found parameters are reused.

However, in the MPC-part of this thesis the engine is controlled directly by sending the amount of fuel to be injected. This choice is mainly done since it is very difficult to use an MPC-controller through another controller if it contains non-linearities. The cruise controller has several nonlinear features and some logic that are hard to transfer to the model in the MPC-controller. Even if a proper model could be found, it would be a hard job to adjust the model whenever the cruise controller logic is changed.

2.4 Wheel Brakes

The wheel brakes are the main brakes and are optimised to handle hard brakings. They are designed as disc brakes, which can be seen in figure 2.3.

(20)

Figure 2.3: Disc brake

The brakes are driven by compressed air that pushes the brake linings towards the discs. The applied air pressure is calculated by the Electronic Brake System (EBS). The previously used all-pneumatic system, where the foot pedal directly affects a valve which gives a brake pressure, is still left as backup because of legal demands.

The EBS consists of several units. One unit is the foot brake module (FBM). It senses how hard the driver pushes the brake pedal and sends the request to the main Electronic Control Unit for the brakes (ECUbrake). In the ECUbrake, the requested brake pressure for each wheel is calculated based on the axle load, the wheel speeds etc. The calculated pressures are sent to the Pressure Control Modules (PCM) that are located near each wheel. These units are electro-pneumatic actuators where each unit has an integrated ECU and some sensors. One of these sensors is the pressure sensor, which is used to control the brake pressure in a

closed-loop. Another sensor is the wheel speed sensor. It sends data to the ECUbrake. The reason is

that the Anti-lock Braking System (ABS) is integrated in the EBS. Hence, it is the ECUbrake

that controls if the angular velocity of the wheels, ω, corresponds to the velocity of the truck,

v. This is done by calculating the wheel slip, σ, for each wheel according to the expression below v r v− ⋅ = ω σ (2.1) where

v – velocity for the truck

ω – angular velocity for each wheel, measured by the different PCM

r – wheel radius

A large slip for a wheel, i.e. a slip close to 1, indicates that the wheel has lost its grip. The brake pressure for that wheel must then be decreased to regain the grip. In that case the

(21)

In this thesis, an external controller will control the EBS. The control signal sent to the EBS is a retardation request. This request is then effectuated if possible. The appropriate brake

pressure for each wheel is calculated in the ECUbrake by a conversion from the requested

retardation using a conversion factor, κ. This factor is dependent of for example the axle load, and is retrieved from a table. The conversion can be expressed as

(

)

desired

brake axleload slip etc r

P =κ , , ⋅ (2.2)

where

Pbrake – air pressure to the brakes

κ −conversion factor

rdesired – desired retardation

After the braking manoeuvre has finished, the measured retardation is compared to the desired and if a difference is detected the κvalue is corrected [12]. A small exception from this rule is made if the difference becomes large during braking. In that case,κis corrected instantly. When controlling the EBS, a phenomenon called glazing has to be taken into consideration. Glazing means that a covering is formed at the discs, because of too much gentle braking. This will decrease the braking capacity permanently. To avoid gentle breaking, the retarder should be used instead of the EBS when a small retardation is needed.

2.5 Retarder

The retarder is an auxiliary brake, which is attached to the propeller shaft. In figure 2.4 a picture of a retarder can been seen.

Figure 2.4: Retarder

The retarder uses viscous damping to produce a braking torque. It is for example used when driving downhill to keep the velocity of the truck constant because if the wheel brakes were

(22)

used, they might become over-heated. In order to avoid glazing, the retarder is also used when small retardation is requested (see section 2.4).

The retarder consists of two turbine shovels, called the rotor and the stator, and around these, there is a circular cavity called the torus. The rotor is connected to the propeller shaft via a gear that multiplies the propeller shaft speed by two, and the stator is connected to the chassis of the truck. To produce braking torque the torus is filled with oil by an oil pump, which is also connected to the propeller shaft. Each time the retarder has been inactivated for a while, a quite long delay occurs before the torque reaches the specified value, especially if the propeller shaft speed is low. The reason is the saturation in oil flow from the pump. In order to decrease the delay, an oil accumulator is filled when the maximum capacity of the pump is not used. When the torus should be filled with oil, oil is taken from both the oil accumulator and the pump.

To control the braking torque from the retarder, the oil pressure in the torus has to be controlled. The oil pressure increases if the oil flow to the torus is increased. Because of that, there is a piston that controls how much of the oil flow that goes back to the oil tank, and how much that goes to the torus. The oil flow produces a force at the top of the piston that wants to close the channel to the torus. To open the channel, the control system puts an air pressure at the bottom of the piston. In this way, the piston goes into equilibrium and the retarder gives a constant braking torque.

When the retarder is used, it produces a lot of heat, so the oil has to be cooled. This is done by a heat exchanger, which is connected to the ordinary engine cooling system of the truck. The fact that the retarder uses the ordinary cooling system results in that the braking torque has to be limited when the cooling system is close to overheating. When the cooling water in the radiator reaches 95°C the braking torque is limited and at 110°C the retarder is shut down.

(23)

3 Control Theory

3.1 Hybrid Systems

Hybrid systems are systems that can have both continuous and discrete states. The discrete states are sometimes also referred to as modes. A general description of a hybrid system is

(

)

(

)

(

)

(

( ), ( ), ( ), ( )

)

) ( ) ( ), ( ), ( ) ( ) ( ), ( ), ( ), ( ) ( ) ( ), ( ), ( ) ( t t u t m t x t o t u t m t x g t y t t u t m t x t m t u t m t x f t x σ ϕ σ φ = = = = + & (3.1) where ) (t

x – continuous state variables )

(t

m – discrete state variables ) (t u – continuous inputs ) (t σ – discrete inputs ) (t y – continuous outputs ) (t o – discrete outputs

Hybrid systems can be divided into two different sorts, true or false. True hybrid systems are system where φ cannot be written as a function of only x and u. This means that m must be left as a memory variable to achieve a complete model description. Typical true hybrid systems can for example be systems, which contain hysteresis. False hybrid systems are of course systems where the discrete variables are not needed as memory variables. Examples of false hybrid systems can be systems that change dynamics for different values of the continuous state variables as can be seen below

c x u B x A x c x u B x A x ≥ + = < + = if , if , 2 2 1 1 & & (3.2)

False hybrid systems can be used in a way that the continuous states correspond to different continuous controllers and the discrete states correspond to a logical part. The logical part is often referred to as a state machine. It chooses which one of the time continuous controller to be used as can be seen in figure 3.1.

(24)

A problem that can arise in hybrid systems is chattering. It means that fast oscillation between the different modes, for example x < c and xc, comes up. This phenomenon may be avoided

by introducing hysteresis.

Stability for some hybrid systems can be shown by using Lyapunov theory. More about stability and hybrid systems in general can be found in [7].

3.2 Differential PI-controller

A great problem when dealing with integrating controllers is their tendency to wind up their I-part. This typically occurs when the reference signal is that high that the output signal saturates and the integrator continues to integrate [16]. When the reference signal later becomes lower the proportional part is too small compared to the integrator part, which means that the output still is saturated. If the integrator has a high value, it will take a very long time for the controller to produce a non-saturated output again. During this time, the controller sometimes produces a large overshoot.

The solution to the windup problem is to limit the size of the integrator part if the controller saturates. This can be done in several ways, as described in [16]. In this thesis, the choice was to implement the PI-controller on so-called differential form [16].

An ordinary time discrete PI-controller is easily rewritten on differential form by taking the difference ∆vn between two in time adjacent desired output signals. In formulas this can be

written as [16]: )) 2 ( ( ) 2 ( ) ( 2 1 1 2 1 1 1 1 − − − − − − − − + − + + − = = + − + − + − = − = ∆ n n n s d n i s n n n n n s d n n n n n n n e e e T T e T T e e K e e e T T K I I e e K v v v (3.3)

This difference is then added to the previous, possibly saturated, output signal. If the new output signal hits the saturation limit, the saturated output value is returned and stored as the last output value.

Figure 3.1: A hybrid controller (illustrated by a dashed box) where logic chooses the parameters to be used in a time continuous controller.

+ — Parameters to the controller Logic Time continuous controller System Reference signal, r Control signal, u Output signal, y • —

(25)

(

)

    < + ≤ + ≤ ∆ + > + =     + + + = ∆ − − − − min 1 min max 1 min 1 max 1 max 2 1 1 if , if , if , 2 uv u u uv u u v u uv u u u e e e T T e T T e e K v n n-n n-n n n n-n n n n s d n i s n n n (3.4) where

en – control error in time step n

un – control signal in time step n

umax – higher output saturation limit

umin – lower output saturation limit

K – controller constant

Ts – sample time

Ti – integrator time

Td – derivative time

Another nice property with the differential implementation is that bumpless transfers between different controllers are rather easy. If the new controller uses the same control signal as the old one, the new controller inherits the old controller’s un-1 and continues the incrementation

from that point.

3.3 Linearisation of Model and State Estimation

3.3.1 Linearisation

Most physical systems contain some sort of non-linearity. How this is handled depends on how much it affects the dynamics of the system. If the influence is small, it is often possible to neglect the non-linearity and assume the system linear. Then, ordinary linear methods to design observers and controllers can be used. These methods often have rather well defined approaches, which imply that they in many cases can be done, more or less, automatically by some computer program. If the influence is large, methods that handle non-linearities are necessary to use. One way is to use methods, which handles nonlinear systems without any approximations, for example feedback linearisation. Drawbacks with these methods are that not all nonlinear systems are possible to handle and that the methods often imply use of nonlinear observers and nonlinear state feedbacks. These observers and state feedbacks are in many cases more complicated to derive, than the linear ones. Another way is to locally approximate the nonlinear system with a linear system around a linearisation-point. In that way, the ordinary linear methods are possible to use. The approximated system is equal to the first-order Taylor-expansion of the nonlinear system around some linearisation point and the derivation can be seen below.

Assume that the originally nonlinear system looks like

) , ( ) , ( ) , , ( u x h y u x g z d u x f x = = = & (3.5)

where x is the system state, u is the control input, d is a non-measurable disturbance, z is the control objective and y is the measured signals. Because the system is nonlinear, at least one

(26)

of f, h or g is a nonlinear function. Using the first-order Taylor expansion, (3.5) can be approximated in the point x = x0, u = u0by the following expression

u D x C y u D x M z f d N u B x A x y z ∆ + ∆ = ∆ ∆ + ∆ = ∆ + ∆ + ∆ + ∆ = ∆& 0 (3.6) where 0 0 0 0 0, u u u , z z z , y y y , d d d x x x= − ∆ = − ∆ = − ∆ = − ∆ = − ∆ ,

(

)

(

)

(

)

( )

( )

(

)

( )

( )

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 , , 0 0 0 0 , , , , , , , , , , , , , , , , , , , , u u x x y u u x x u u x x z u u x x d d u u x x d d u u x x d d u u x x u u x h D x u x h C d u x f f u u x g D x u x g M d d u x f N u d u x f B x d u x f A = = = = = = = = = = = = = = = = = ∂ ∂ = ∂ ∂ = = ∂ ∂ = ∂ ∂ = ∂ ∂ = ∂ ∂ = ∂ ∂ =

The constant term f corresponds to the derivative in the linearisation point, i.e.0

( )

x& . In0

literature, the linearisation-point

(

x0,u0,d0

)

is often assumed to be a stationary point, which yields that f0will equal zero.

As was mentioned earlier, the linearisation is a local approximation of the nonlinear system around the linearisation point. If some of the states, the control signals, the control objective, the outputs or the disturbances takes values in a large interval, the approximation may not be accurate enough. Then, it might be necessary to approximate the nonlinear system around a new point. This is called relinearising. How often the relinearisation has to be performed, depends both on how nonlinear the system is and on how large the changes in the different signals are. If the system is fairly linear and the changes in the signals are quite small, it can be enough to linearise around one point and therefore no relinearisation is needed. On the other hand, if the system is rather nonlinear relinearisation must be performed. One method is to relinearise the model in each sample time. Another method, which is a special case of the first, is linearise the system in some points before it is used (off-line linearisation). The models, corresponding to the different linearisation points, are then switched between as the signals in the model change. This will yield that if the signals are rather constant, no switching will occur. This method will therefore be less complex to calculate.

In cases when the linearisation point is changed often, e.g. when a new linearisation is done in each sample time, it may be necessary to take this into consideration when designing the observer (see section 3.3.3).

3.3.2 Conversion of Time Continuous Models to Time Discrete Models

In section 3.4.1, it will be seen that MPC uses a time discrete model of the controlled system. If the original system is time continuous, it must be converted to discrete time. Assume that the time continuous system is given as

(27)

) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( 0 t Cx t y t Mx t z f t d N t Bu t Ax t x d = = + + + = & (3.7)

Then, it can be transformed into a time discrete system by solving the system of differential equations between two sample times, i.e.

s s t k T kT ≤ <( +1) (3.8) where k – sample number Ts – sample time

With some obvious extensions of the method presented in [16] the solution is

(

)

(

)

) ( ) ( ) ( ) ( ) ( ) ( ) ( ) 1 ( 0 0 ) ( s s s s T s d s t T A s AT s kT Cx kT y kT Mx kT z dt f kT t d N kT t Bu e kT x e T k x s s s = = + + + + + = +

− (3.9)

Under the assumption that the control signals and the disturbances are piecewise constant between the samples, i.e. looks like the one in figure 3.2, (3.9) can be rewritten as

(

)

) ( ) ( ) ( ) ( ) ( ) ( ) ( ) 1 ( 0 s d s s d s d s dd s d s d s kT x C kT y kT x M kT z f kT d N kT u B kT x A T k x = = + + + = + (3.10) where C C M M dt e f dt N e N Bdt e B e A d d T AT t d T d t T A dd T AT t d AT d s s s s s s s = = = = = =

− 0 ) ( 0 0 ) ( 0 ) (

The states in the time discrete model will have exactly the same values as the time continuous model in the sample moments, if the assumption above holds. The reason can be found in [2].

3.3.3 Extended Kalman Estimator

Controllers that are based on state feedback, such as LQ-controllers or MPC-controllers, require that all states are measurable. If not, the states have to be estimated from a model of the system. This is done by an observer. Assume that the system, which shall be controlled, can be described by the following discrete time model

2Ts 3Ts 4Ts Time

Ts

(28)

) ( ) ( ) ( ) ( ) ( ) ( ) ( ) 1 ( 2 1 , 0 1 k v k x C k y k v N f k d N k u B k x A k x d d v d d d d + = + + + + = + (3.11)

where v1and v2are white noises.

A typical discrete time observer can then, according to [2], be expressed as

(

)

) ( ˆ ) ( ˆ ) ( ˆ ) ( ) ( ) ( ) ( ˆ ) 1 ( ˆ 0 k x C k y k y k y K f k d N k u B k x A k x d d d d d = − + + + + = + (3.12)

where K is the observer gain and are the estimated states.

The observer gain decides how much the observer should rely on the measured values and on the model respectively. A small K gives little feedback from the measurements and hence

will mostly rely on the model and vice versa if K is large. A common and good method to choose the observer gain is to choose it equal to the Kalman gain. This choice gives a good balance between trusting the model and the measurements, depending on how much process noise, v1, and measurement noise, v2, that is present. Large v1relative to v2gives a large K and

vice versa.

The ordinary method to calculate K is to solve the stationary Riccati equation, which can be found in [2]. It looks like

(

)

(

) (

)

(

)(

)

1 2 cov 12 , cov 12 , cov 1 2 cov 12 , cov , 1 , cov cov 1 1 1 1 1 − − + + = + + + − + = R C P C R N C P A K R N C P A R C P C R N C P A N R N A P A P T d d d v T d d T d v T d d T d d d v T d d T d v d v T d d (3.13) where

Pcov– covariance matrix of the prediction error, x(k)−xˆ(k)

R1 – intensity of noise v1

R2 – intensity of noise v2

R12 – cross-spectral density between v1and v2

This can be done by using the command dlqe in Matlab.

A limitation of this method is that it assumes that stationarity for Pcov is achieved. This

happens, at least approximately, if the model is linearised just once or quite seldom. If the model is relinearised often, another method, which not assumes that stationarity is reached, must be used. It is called Extended Kalman and is built upon that the Kalman gain, K

( )

k , and the variance of the prediction error, Pcov

( )

k , are calculated recursively. Again, assume that the system looks like in (3.11), but with all system matrices time varying, i.e.

) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) 1 ( 2 1 , , 0 1 k v k x k C k y k v k N k f k d k N k u k B k x k A k x d d v d d d d + = + + + + = + (3.14) and that xˆ(0)=0.

If the system can be described by (3.14), the Kalman gain can be calculated by the expressions found in [19]. These expressions look like

(29)

(

)

T e T d v d v T cov cov e d v T cov T cov e k K k R k K k N k R k N k A k P k A k P k R k R k N k C k P k A k K k C k P k C k R k R ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) 1 ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( , 1 , 1 12 , 2 1 1 1 − + = + ⋅ + = + = − (3.15) where ) 0 ( cov P – covariance matrix of x0

The covariance matrix,Pcov(0), should be chosen large if the initial state is unknown. The optimal gain is now achieved in each time instant. A possible problem is that Pcov, which

should be symmetrical, becomes non-symmetrical because of numerical noise. This can be solved by letting 2 T cov cov cov P P P = + (3.16)

More about stationary Kalman filters can be found in [2] and more about Kalman filters in general, i.e. both stationary and extended, can be found in [19].

3.4 Model Predictive Control – MPC

3.4.1 MPC Basics

Model Predictive Control (MPC) is an advanced modern control strategy, which has had an enormous breakthrough in the industry the past 10-20 years. The main reason why MPC has gained such an interest is that it can explicitly handle constraints on control signals and on linear combinations of states. This property makes it easy to handle for example control signal limitations and safety limits on signals in the controlled plant. It is also said to be an intuitive method, which is easy to understand with only limited control theory knowledge.

A common approach to a multivariable control problem is the LQ-controller. In this theory, a linear quadratic criterion like (3.17) is to be minimised.

= + 0 2 2 2 1 ) ( ) ( min k Q Q u k u k x (3.17)

The algebraic solution to this minimisation problem is a linear state feedback u(k)=−Lx(k). The minimisation is performed off-line by solving a time discrete Riccati equation. By treating the weight matrices Q1 and Q2 in the criterion as design variables, an appropriate

behaviour of the system can be achieved by repeated simulations and modifications of these parameters.

As mentioned above the solution to the unconstrained problem can be solved exactly and the solution is the linear state feedback control law presented above. When constraints on control signals and on linear combinations of states are introduced, the minimisation problem is no longer of the type unconstrained optimisation. The global analytic solution from above can no longer be used. The problem to find an algebraic solution u(x) (state feedback) to this problem is more or less unsolved [16]. Another approach is to treat the problem as an

(30)

optimisation problem in the variables u(k). A problem here is that the time horizon is infinite, which in turn means that it contains an infinite amount of optimisation variables

) (k

u . This problem is in MPC solved by truncating the infinite sum to a finite one. The number of discrete time instants used in the sum is called the prediction horizon and is here labelled Hp. Normally this constant is chosen in a way that an ordinary settling is covered.

This can intuitively be motivated by thinking that the MPC-controller has to “see” the whole settling to be able to choose the optimal control signal. Now the problem in time step k has the structure as in formula (3.18).

=− ≤ + + + + 1 0 2 2 2 1 ) ( ) 1 ( min p limit H j Q Q u u j k u j k x (3.18)

In each sample time, the optimisation problem has to be solved. It now contains a finite number of optimisation variables, but is still dependent of the initial condition x(k) of the system. When the optimisation problem is solved, only the first control signal u(k) is used and the rest of the control signals returned by the optimisation are discarded.

A simple algorithm for MPC is as follows [16]:

1. Measure or estimate the current state of the system x(k). 2. Calculate the control signal sequence by solving (3.18).

3. Apply the first element u(k) of the control signal sequence to the system. 4. Time update: k:=k+1.

5. Go to step 1 and repeat.

Because of the strategy to solve the problem for a finite time horizon, which is moving in time as new sampling events occur, these problems are usually called receding horizon problems. The truncated time horizon can also bring new problems. Some of them can be solved by assuming that no constraints are active after the end of the time horizon and then the usual LQ-solution can be used to find a final weight to compensate for the time horizon truncation. This is further described in section 3.4.9.

Today there is research on so-called explicit MPC, which means that the MPC-optimisation is performed off-line [10], [11]. The solution found from these calculations is stored in a table and the on-line processing is reduced to find the control signal that corresponds to the current state of the system in the table. See also section 10.1.

All facts in this section, if nothing else mentioned, originate from [16].

Prediction of Future States

The name model predictive control originates from the fact that the model of the system is used in a very explicit manner in an MPC-controller. It is used in the optimisation to predict the future states of the system. As mentioned above, the optimisation variables are the control signals in the sequence u(k) to u(k+Hp-1).

(31)

) ( ) ( ) 1 (k Ax k Bu k x + = + (3.19)

If this model is used recursively, it can be seen that a prediction of the state in time kdesired is

only dependent on the initial state of the system and of the control signals applied to it from time k to k+kdesired −1. The two-step prediction is then

) 1 ( ) ( ) ( ) 1 ( ) 1 ( ) 2 (k+ = Ax k+ +Bu k+ = A2x k +ABu k +Bu k+ x (3.20)

When this is generalised to the Hp-step prediction, it is convenient to write the problem on

vector form. This notation also structures the problem and prepares it to be rewritten on a standard form for optimisation.

If the control signals are stacked in the vector U and the state predictions in the vector X, these vectors can be defined as

              + + + =               − + + = ) ( ) 2 ( ) 1 ( , ) 1 ( ) 1 ( ) ( p p x k H k x k x X H k u k u k u U M M (3.21)

Note that it is possible that every u in U is a vector containing several control signals (for each time instant).

To finalise the matrix notation of the predictions also the A-, A2-, AB-matrices and so on have to be stacked. These matrices are then called the H- and S-matrices and are defined as

            =               = − − B B A B A B AB B S A A A H p p p H H H L M O M M L L M 2 1 2 0 0 0 , (3.22)

With the use of these notations the prediction of the future states can be written as

SU k Hx

X = ( )+ (3.23)

Expression (3.23) is in this text sometimes referred to as the MPC-simulation. This is because the vectorXis the simulation of the system that MPC use in the optimisation. The next step is to rewrite (3.18) in the variablesX andU. This can be done by recalling that a quadratic sum can be written as a scalar product of two vectors. With formulas this can be written as

(

Hx k SU

) (

Q Hx k SU

)

U QU U Q U X Q X j k u j k x T T T T Q H j Q p 2 1 2 1 2 1 0 2 ~ ) ( ~ ) ( ~ ~ ) ( ) 1 ( 2 1 + + + = = + = + + + +

=− (3.24)

(32)

            =             = 2 2 2 2 1 1 1 1 ~ ~ Q Q Q Q Q Q Q Q O O (3.25)

In (3.25) theQ1- andQ2- matrices are repeated along the diagonalHptimes respectively.

The notation can easily be extended to handle the case when a reference signal is present. The cost function is then given by

2 1 0 2 2 1 ) ( ) 1 ( ) 1 ( Q H j Q u k j j k z j k r p + + + + − + +

=− (3.26)

wherezdenotes the control objective.

To enable the use of the practical matrix notation some new vectors have to be added to handle the reference signal and the control objective vectorz

X M X M M M H k Mx k Mx k Mx Z H k r k r k r R p p ~ ) ( ) 2 ( ) 1 ( , ) ( ) 2 ( ) 1 ( =             =               + + + =               + + + = O M M (3.27)

With these definitions in mind the cost function can be written as

(

)

(

M Hx k SU R

)

TQ

(

M

(

Hx k SU

)

R

)

UTQU 2 ~ ) ( ~ ~ ) ( ~ 1 + − + − + (3.28)

According to the definition of the reference vector R, future reference signals are used in the optimisation. Either this feature of the MPC-framework can be ignored, and a reference signal

) 1 ( ) ( ) 1 (k+ = =r k+Hr k+

r K p constant that is constant through the optimisation can be used, or it can be used to inform the controller what reference signals that are expected in future. In many cases, the future reference signals are not previously known. This is for example the case when the reference signal comes from an operator. If the future reference signals are unknown, an alternative can be to try to make “an intelligent guess” what will happen in the future. It is finally worth mentioning that if the system is unconstrained, has a finite horizon, and the ability of previewing future reference signals is desired, there exists an analytic solution to the problem.

The basic information in this section is taken from [16].

Solving the Optimisation Problem

If the cost function (3.28) is expanded it can be seen that the problem can be written as a so-called QP-problem, which is an optimisation problem with a quadratic cost function and linear constraints [16].

(33)

(

)

(

)

(

(

)

)

(

) (

)

(

S M QMS Q

)

U

(

S M Q

(

MHx k R

)

)

U U U R Q M S k Hx M Q M S U Q S M Q M S U U Q U R SU k Hx M Q R SU k Hx M j k u j k r j k z T T T T T T T T T T T T T T T T T T T Q H j Q p − + + ⇒ ⇒ ⇒ ⇒ + − + + = = = + − + − + = = + + + + − + +

=− ) ( ~ ~ ~ ~ ~ ~ ~ 2 1 by two divide and constant the Ignore Constant ~ ~ ) ( ~ ~ ~ 2 ~ ~ ~ ~ ~ ) ( ~ ~ ) ( ~ ) ( ) 1 ( ) 1 ( 1 2 1 1 1 2 1 1 2 1 0 2 2 2 1 K (3.29)

The standard form of a QP-problem is

b Ax x f Hx xT T x ≤ + subject to 2 1 min (3.30)

With the manipulations made above the MPC-problem can be written as a standard QP-problem as

(

)

(

(

)

)

limit T T T T T T T U U U U R k Hx M Q M S U Q S M Q M S U ≤ − + + subject to ) ( ~ ~ ~ ~ ~ ~ ~ 2 1 min 1 2 1 (3.31)

Control Signal Horizon

In the previous sections it has been understood that the number of control signals that are being solved by the QP-solver have been as many as nuHp, wherenuis the number of control signals to the system. This means that the problem has the dimensionnuHp. By

reducing the dimension of the problem, the problem becomes easier to solve and the optimisation time is thereby reduced. The control signal horizon is from now on in this thesis called Hu, where HuHp. This can be done in several ways. They are further presented in

section 3.4.5.

Integral Action

Integration can be introduced in an MPC-controller by penalising changes in the control signal [16]. Intuitively it can be justified by thinking that holding a constant control signal should not cost anything, if it is necessary to fulfil the demands on reference tracking. However, it is still necessary to have some penalty on the control signal, otherwise it could be very aggressive because it does not cost anything to use full power at a short period. If changes in the control signals are penalised, large rapid changes in the control signals become very expensive and are therefore, as long as possible, avoided. In the meantime holding a constant, but possibly large, control signal does not cost anything. If changes in the control signals are penalised the cost function can be written as

2 1 0 2 3 1 ) 1 ( ) ( ) 1 ( ) 1 ( Q H j Q u k j u k j j k y j k r p − + − + + + + − + +

=− (3.32)

(34)

To get the differences in the control signal a new matrix, here called Ω, is used. The first difference involves the last control signal to the system, which has to be saved from the last sample. This signal is placed on the first position in a row vector here called δ. If these two new variables are used the differences in the control signal sequence can be written as [16]

δ − =             − −             − − =             − + − − + − + − − ΩU k u U I I I I I H k u H k u k u k u k u k u u u 0 0 ) 1 ( ) 2 ( ) 1 ( ) ( ) 1 ( ) 1 ( ) ( M O O M (3.33)

The cost function can now be rewritten on the standard form in terms of matrices as

(

S M QMSQ

)

U

(

S M Q

(

MHx k MPD R

)

Q

)

U UT T ~T~1~ T~3 T ~T~1T ~ ( ) ~ T~3δ T 2

1 + + +

(3.34)

where Q~3 is defined in accordance with (3.25).

3.4.2 Extending the Framework to Handle Measurable Disturbances

If measurable disturbances occur in the model, as described in expression 3.3.1, also the MPC-framework needs to be extended to handle these. The disturbances are introduced in the MPC-framework by creating a matrix similar to the S-matrix. This matrix tells how the disturbances evolve trough the system in time. The one-step and two-step predictions can then expressed as ) 1 ( ) 1 ( ) ( ) ( ) ( ) 1 ( ) 1 ( ) 1 ( ) 2 ( ) ( ) ( ) ( ) 1 ( 2 + + + + + + = = + + + + + = + + + = + k Nd k Bu k ANd k ABu k x A k Nd k Bu k Ax k x k Nd k Bu k Ax k x (3.35)

The disturbances in different times are bundled together to the vectorDas

              − + + = ) 1 ( ) 1 ( ) ( p H k d k d k d D M (3.36)

Note that it is necessary to supply the MPC-controller with future disturbances. This can be handled as previously described for the reference signal.

Similar to the matrix S, the matrix P is created as

            = − − N N A N A N AN N P N N L M O M M L L 2 1 0 0 0 (3.37)

It is now possible to write the state predictions with the matrix notation as

PD SU k Hx

X = ( )+ + (3.38)

(35)

(

S M QMS Q

)

U

(

S M Q

(

MHx k MPD R

)

)

U UT T T + + T T T + ~ − T ) ( ~ ~ ~ ~ ~ ~ ~ 2 1 1 2 1 (3.39)

3.4.3 More about Constraints

The constraints used in the previous section were not as general as possible. According to the standard form of the QP-problem every linear combination of the components in the solution may be used, i.e. in this case every linear combination of control signals in U can be used [16]. The new formulation of the problem is then

(

)

(

(

)

)

u 1 2 1 subject to ~ ) ( ~ ~ ~ ~ ~ ~ ~ 2 1 min b U A U R PD M k Hx M Q M S U Q S M Q M S U u T T T T T T T U ≤ − + + + (3.40)

With this general assumption upper and lower limits on the control signals are implemented by using the Au- and bu-matrices as

u u ,min H 1,min ,max H 1,max b U A u u u u U I I I I p p ⇔ ≤                     ≤                     − − O O (3.41)

A more general form of constraints is constraints on linear combinations of states. Two special cases are of course constraints on certain states directly or on output signals y. An arbitrary linear combination of states Zconstraintscan be written as

(

Hx k SU PD

)

M

Zconstraints = ~constraints ( )+ + (3.42) where M~constraintsis defined in a similar way as M~ .

This gives a constraint, for nconstraintsnumber of signals, on the form

(

)

PD M k Hx M y y SU M y y PD SU k Hx M s constraint s constraint ,limit n limit s constraint ,limit n limit s constraint s constraint s constraint ~ ) ( ~ ~ ) ( ~ 1, 1, − −           ≤ ⇔ ⇔           ≤ + + M M (3.43)

which is a linear constraint in U. To be able to write the state constraints in conjunction with the above-described control signal constraints the following definitions are necessary

References

Related documents

Industrial Emissions Directive, supplemented by horizontal legislation (e.g., Framework Directives on Waste and Water, Emissions Trading System, etc) and guidance on operating

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Närmare 90 procent av de statliga medlen (intäkter och utgifter) för näringslivets klimatomställning går till generella styrmedel, det vill säga styrmedel som påverkar

I dag uppgår denna del av befolkningen till knappt 4 200 personer och år 2030 beräknas det finnas drygt 4 800 personer i Gällivare kommun som är 65 år eller äldre i

Detta projekt utvecklar policymixen för strategin Smart industri (Näringsdepartementet, 2016a). En av anledningarna till en stark avgränsning är att analysen bygger på djupa

DIN representerar Tyskland i ISO och CEN, och har en permanent plats i ISO:s råd. Det ger dem en bra position för att påverka strategiska frågor inom den internationella

Energy issues are increasingly at the centre of the Brazilian policy agenda. Blessed with abundant energy resources of all sorts, the country is currently in a