On optimal control of the wastegate in a turbocharged SI engine
October 30, 2017 | Author: Anonymous | Category: N/A
Short Description
for a standard General Motors turbocharged engine. hanne XR-EE-RT 2007-014 R.ARGOLINI, V. BLOISI.pdf Positive ......
Description
On optimal control of the wastegate in a turbocharged SI engine
ROBERTO ARGOLINI - VIVIANA BLOISI
Master’s Degree Project Stockholm, Sweden June 2007
XR-EE-RT 2007:014
Sommario The project aims to improve positive torque transient response through more advanced wastegate controllers than what are used today. All controllers are developed for a standard General Motors turbocharged engine. In many turbocharged SI engines, a wastegate is used for preventing the turbine to overrun and to decrease the pumping loss. Today, the wastegate is controlled by a PI controller, which tries to fulfill a compromise between fuel consumption and torque response by regulating the wastegate position. A nonlinear Mean Value Engine Model (MVEM) of this engine, with 13 states and linearized in 45 different working points, is used. The original model, implemented in Matlab/Simulink, has been enriched with new features, like lambda and spark advance efficiencies and the related exhaust temperature correction. The project aims to do a theoretical analysis to find the optimal control of wastegate position, investigating also spark retard and fuel enrichment during a positive torque transient. First a solution for achieving optimal wastegate control is designed, based on Linear Quadratic (LQ) approach. Since the optimal control strategy is expected to vary quite much for different working points, a gain scheduling architecture has been investigated. An independent lambda controller has been developed, in order to maximize the lambda efficiency and quicken the torque response during transient. Since the system operates near a constraint boundary, another solution based on Model Predictive Control (MPC) of the wastegate has been investigated. The MPC design has been extended also to a MIMO formulation, adding the throttle and the air to fuel ratio as control inputs, and the trade off between fast torque response and fuel economy is analyzed. A complete realtime MPC implementation, with the capability for automatic code generation in the dSpace microAutobox environment, requires the model, now with 13 states, to be reduced to a minimum state space order. The extent of model reduction that is required and the possible performance deterioration have been investigated. iii
Indice 1 Introduction
1
1.1
Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1.2
Prior Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
1.3
Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . .
2
1.4
Thesis outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
2 Engine Model
5
2.1
Mean Value Engine Model . . . . . . . . . . . . . . . . . . . . . .
5
2.2
Incompressible Flow restrictions . . . . . . . . . . . . . . . . . .
8
2.2.1
Air Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
2.2.2
Intercooler . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
2.2.3
Exhaust System . . . . . . . . . . . . . . . . . . . . . . . .
9
Compressible Flow Restrictions . . . . . . . . . . . . . . . . . . .
10
2.3.1
Throttle flow . . . . . . . . . . . . . . . . . . . . . . . . .
10
2.3.2
Wastegate flow . . . . . . . . . . . . . . . . . . . . . . . .
10
Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
2.4.1
10
2.3
2.4
2.5
2.6 2.7
2.8
Mass flow into the cylinders . . . . . . . . . . . . . . . . .
2.4.2
Volumetric efficiency . . . . . . . . . . . . . . . . . . . . .
11
2.4.3
Exhaust Manifold Out Temperature . . . . . . . . . . . .
11
Compressor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
2.5.1
Compressor - Pressure Model . . . . . . . . . . . . . . . .
12
2.5.2
Compressor - Air Mass Flow Model . . . . . . . . . . . .
12
2.5.3
Compressor - Efficiency Model . . . . . . . . . . . . . . .
12
Turbine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
2.6.1
Turbine - Pressure Model . . . . . . . . . . . . . . . . . .
13
Model Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
2.7.1
Control volumes . . . . . . . . . . . . . . . . . . . . . . .
14
2.7.2
Turbo Shaft Dynamics . . . . . . . . . . . . . . . . . . . .
15
Torque generation . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
v
vi
I NDICE 2.9
Fuel path and (A/F)-ratio . . . . . . . . . . . . . . . . . . . . . .
19
2.10 Fuel consumption . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
2.11 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
3 Simulink Model
21
3.1
Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
3.2
Car . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
3.3
Engine Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
3.3.1
Model Simplifications . . . . . . . . . . . . . . . . . . . .
25
3.3.2
Model Inputs . . . . . . . . . . . . . . . . . . . . . . . . .
26
3.3.3
Model States . . . . . . . . . . . . . . . . . . . . . . . . . .
26
3.3.4
Model Output . . . . . . . . . . . . . . . . . . . . . . . . .
27
3.3.5
Maps for parameters representation . . . . . . . . . . . .
28
Performance Limiting Factors . . . . . . . . . . . . . . . . . . . .
28
3.4.1
Knock . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
3.4.2
Surge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
3.4.3
Limits on air to fuel ratio . . . . . . . . . . . . . . . . . .
29
Engine Management System (ECM) . . . . . . . . . . . . . . . .
30
3.4
3.5
3.6 3.7
3.5.1
Map-Based Control . . . . . . . . . . . . . . . . . . . . . .
31
3.5.2
Throttle control . . . . . . . . . . . . . . . . . . . . . . . .
32
3.5.3
Lambda Control . . . . . . . . . . . . . . . . . . . . . . .
33
3.5.4
Fuel Control . . . . . . . . . . . . . . . . . . . . . . . . . .
33
3.5.5
Spark Advance Control . . . . . . . . . . . . . . . . . . .
34
Turbo Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
36
3.6.1
Wastegate Control . . . . . . . . . . . . . . . . . . . . . .
36
System Modifications . . . . . . . . . . . . . . . . . . . . . . . . .
37
3.7.1
Bypass Valve . . . . . . . . . . . . . . . . . . . . . . . . .
37
3.7.2
Lambda and SA Efficiency . . . . . . . . . . . . . . . . . .
37
3.7.3
Temperature Correction Map . . . . . . . . . . . . . . . .
39
3.7.4
Volumetric Efficiency . . . . . . . . . . . . . . . . . . . . .
39
3.7.5
WG Pressure valve . . . . . . . . . . . . . . . . . . . . . .
42
3.8
Changes in the ECM . . . . . . . . . . . . . . . . . . . . . . . . .
44
3.9
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
44
4 Validation of the NonLinear Model
45
4.1
Experiment setup . . . . . . . . . . . . . . . . . . . . . . . . . . .
45
4.2
Data processing . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
4.3
Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
4.4
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
53
I NDICE
vii
5 Analysis of linearized model
55
5.1
Linearized Model . . . . . . . . . . . . . . . . . . . . . . . . . . .
55
5.1.1
Model linearization . . . . . . . . . . . . . . . . . . . . . .
56
5.2
Validation of the linearized model . . . . . . . . . . . . . . . . .
58
5.3
Linear Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . .
62
5.3.1
SISO Analysis . . . . . . . . . . . . . . . . . . . . . . . . .
63
5.3.2
Controllability and observability . . . . . . . . . . . . . .
65
Open Loop system behavior . . . . . . . . . . . . . . . . . . . . .
66
5.4.1
Step in the WG . . . . . . . . . . . . . . . . . . . . . . . .
66
5.4.2
Pulse in the WG with constant throttle . . . . . . . . . . .
66
5.4.3
Pulse in the WG with step in throttle . . . . . . . . . . . .
69
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70
5.4
5.5
6 Optimal Wastegate Control
73
6.1
Spark-ignited engines . . . . . . . . . . . . . . . . . . . . . . . . .
73
6.2
Turbocharging . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
74
6.3
Wastegate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
75
6.3.1
Transient response and turbo lag . . . . . . . . . . . . . .
76
6.3.2
Open Loop System Characteristics . . . . . . . . . . . . .
79
6.3.3
Dealing with constraints . . . . . . . . . . . . . . . . . . .
80
6.3.4
Control Problem formulation . . . . . . . . . . . . . . . .
81
6.4
Linear Quadratic Regulation (LQR) . . . . . . . . . . . . . . . . .
82
6.5
Optimal State Feedback . . . . . . . . . . . . . . . . . . . . . . .
83
6.5.1
Stability and robustness . . . . . . . . . . . . . . . . . . .
84
6.6
LQR for non-zero set points . . . . . . . . . . . . . . . . . . . . .
86
6.7
Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
87
6.8
Integral action in LQ control . . . . . . . . . . . . . . . . . . . . .
88
6.9
Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
90
6.9.1
LQ on Linearized System . . . . . . . . . . . . . . . . . .
91
6.9.2
LQR on Nonlinear System . . . . . . . . . . . . . . . . . .
94
6.10 Gain Scheduling Strategy for LQ Control . . . . . . . . . . . . .
99
6.10.1 Variable engine speed . . . . . . . . . . . . . . . . . . . . 101 6.10.2 Variable engine speed with 3 controllers . . . . . . . . . . 105 6.11 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 7 Lambda and SA Control
109
7.1
Lambda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
7.2
Control Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 7.2.1
Static Lambda Control . . . . . . . . . . . . . . . . . . . . 111
viii
I NDICE 7.2.2
Dynamic Lambda Control . . . . . . . . . . . . . . . . . . 112
7.3
Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
7.4
Spark Advance . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.5
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
116
8 MPC
119
8.1
119
MPC Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.1
8.2
Parameters Tuning . . . . . . . . . . . . . . . . . . . . . . 122
Implementation in Simulink using Mpc Toolbox . . . . . . . . .
123
8.2.1
Building the MPC object . . . . . . . . . . . . . . . . . . . 124
8.2.2
Prediction Model . . . . . . . . . . . . . . . . . . . . . . . 126
8.2.3
Offsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
8.2.4
State Estimation . . . . . . . . . . . . . . . . . . . . . . . . 127
8.2.5
MPC Computation . . . . . . . . . . . . . . . . . . . . . . 128
8.2.6
Setting MPC parameters . . . . . . . . . . . . . . . . . . . 128
8.3
System Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . 130
8.4
Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
8.5
8.4.1
MPC on the Linearized Model . . . . . . . . . . . . . . . 133
8.4.2
Pumping Losses . . . . . . . . . . . . . . . . . . . . . . . 140
8.4.3
MPC on the Nonlinear Model . . . . . . . . . . . . . . . . 140
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
9 Model Reduction
149
9.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
9.2
Model Reduction Process . . . . . . . . . . . . . . . . . . . . . . 150
9.3
Hankel Singular Values . . . . . . . . . . . . . . . . . . . . . . . .
150
9.4
Overview of Model Reduction Techniques . . . . . . . . . . . . .
151
9.5
9.4.1
Truncation and Residualization . . . . . . . . . . . . . . . 152
9.4.2
Balanced truncation and residualization . . . . . . . . . . 154
9.4.3
Optimal Hankel norm approximation . . . . . . . . . . . 154
9.4.4
Balanced stochastic model truncation (BST) . . . . . . . . 155
Model Reduction Procedure . . . . . . . . . . . . . . . . . . . . . 155 9.5.1
Number of states to use in the reduced model . . . . . . 156
9.5.2
Model Reduction Techniques. Comparison: Additive Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
9.6
Model Reduction Technique: Multiplicative Error Method . . . 160 9.6.1
9.7
Validate the model . . . . . . . . . . . . . . . . . . . . . . 161
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
I NDICE
ix
10 Multivariable System Analysis 10.1 Directions in multivariable systems . . . . . . . . . . . . . . . . .
171 171
10.2 Scaling the system . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 10.3 Singular value decomposition . . . . . . . . . . . . . . . . . . . .
174
10.4 Multivariable Poles and Zeros . . . . . . . . . . . . . . . . . . . .
175
10.5 Input-output controllability . . . . . . . . . . . . . . . . . . . . .
176
10.5.1 MISO case . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 10.5.2 MIMO case . . . . . . . . . . . . . . . . . . . . . . . . . . 177 10.6 SVD Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . .
180
10.7 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 11 MIMO Control
185
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 11.1.1 Best Fuel Consumption: formulation of the problem . . . 186 11.2 Control design . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
189
11.2.1 Layout 1: Fuel Optimal Control . . . . . . . . . . . . . . . 189 11.2.2 Layout 2: Torque Optimal Control . . . . . . . . . . . . . 189 11.3 Simulations with MIMO MPC . . . . . . . . . . . . . . . . . . . . 189 11.3.1 Simulation on the Linear Model . . . . . . . . . . . . . . 190 11.3.2 Considering Pumping Losses . . . . . . . . . . . . . . . . 192 11.3.3 Simulation on the Nonlinear Model . . . . . . . . . . . . 195 11.3.4 Comparison of the two controller versions . . . . . . . . 195 11.4 MIMO MPC on the Reduced Order Model . . . . . . . . . . . . 198 11.5 MIMO MPC for α, WG and λ . . . . . . . . . . . . . . . . . . . .
200
11.6 Numerical errors . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 11.7 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 12 Conclusion
207
Bibliografia
211
List of Notations λst : λ stoichiometric Kef f : efficiency coefficient m ˙ air : air mass flow m ˙ f uel : fuel mass flow mAir−Req : requested air mass mF uel−Req : requested fuel mass MP red : predicted torque nr : number of crank revolutions for each power stroke per revolution rpm: rounds per minute V˙ a : volume flow rate of air into the intake system V˙ d : rate at which volume is displaced by the piston, WG: wastegate
Numerical values: λstec =14.65 qHV = 44 ∗ 106 J/kg Vd = 2 ∗ 10−3 m3 R = 287.2J/(kgK) nr =2 η=0.3469 a0 =857.748579470353/1000 a1 =-5216.7334951752
xi
List of Abbreviations BMEP: Brake Mean Effective Pressure IMEP: Indicated Mean Effective Pressure FMEP: Friction Mean Effective Pressure PMEP: Pumping Mean Effective Pressure RHP: Right Half Plane ECM: Electronic Control Manager ECU: Electronic Control Unit MIMO:Multiple Input Multiple Output MISO:Multiple Input Single Output SIMO:Single Input Multiple Output SISO:Singol Input Single Output SA: Spark Advance SI: Sparked Ignited SVD: Singular Value Decomposition
xiii
Capitolo 1
Introduction This Master’s Degree Project is performed at Automatic Control Group at KTH, ¨ Stockholm, in cooperation with General Motors Power Train, Sodert¨ alje (Sweden). The project concerns optimal control of a turbocharged SI engine, to improve positive torque response during the transient.
1.1 Background The ever increasing governmental regulation of emissions and driver demands for fuel economy and drivability emphasize the need for advanced engine technology and control. Among many other measures to improve the fuel consumption, one method is to apply a turbocharger. Investigations have shown a considerable potential for improvement in this area. In turbocharged engines energy from exhaust gases is used to compress the intake air and produce a higher intake manifold pressure. This is done by a turbine connected to the exhaust. The increased intake pressure results in an increased amount of air into the combustion chamber and thus increases the power output that is available. A turbo also increases the inlet air temperature which can be cooled by an intercooler. The turbocharger speed and the resulting pressure after the compressor is controlled using a wastegate. A wastegate is a valve that diverts exhaust gases away from the turbine wheel. Diversion of exhaust gases causes the turbine to lose speed, which in turn reduces the rotating speed of the compressor. The pressure above atmospheric pressure that the turbocharger is creating in the engine’s inlet manifold 1
2
C APITOLO 1. I NTRODUCTION
is called boost pressure and the primary function of the wastegate is to stabilize this boost pressure, to protect the engine and the turbocharger. Today, the wastegate is mechanically actuated, by means of a pressure valve which simply opens up the wastegate when the pressure over it is too high, and can be controlled by a simple PI controller. In all the other cases it is closed. This thesis investigates the possibility for a more advanced control of the wastegate, to improve the responsiveness of turbocharged SI engines. The wastegate in state-of-the-art turbocharged engines is always closed in order to achieve the highest possible pressure before the turbine and thus the highest possible turbocharger speed. The higher the turbocharger speed, the smaller is the turbo lag, as the torque build-up time is highly sensitive to the turbocharger inertia. The wastegate is only opened to keep the boost pressure below a certain limit, i.e. for boost pressure control. One possible way to reduce time lag is to control the turbo so that the turbo always keeps a relatively high speed and then use the throttle to reduce the flow into the intake manifold and the manifold pressure. In this way the driveability is improved by reducing the turbo lag but the fuel consumption is increased, since the intake manifold pressure is increased. The turbo increases the intake manifold pressure and also the intake manifold temperature and with an intercooler the charger density is increased, which results in higher power output from the engine. An intercooler also gives better engine efficiency, since it can give the same mass flow through the engine at a lower pressure which in its turn requires less turbine pressure and in this way reduces the pumping losses.
1.2 Prior Work This project continues the investigation started by Ida Kristoffersson in her Master Thesis[1]. For more details on engine modeling, [2] and [3] are recommended. The problem of controlling the wastegate is handled in [4], with a pressure based approach, and in [5]. Multivariable design and nonlinear control are extensively treated in [6],[7] and [8]. MPC is implemented in Matlab, using the MPCToolbox, based on [9].
1.3 Problem Formulation In this work the control strategy is based on the idea of using turbocharging and wastegate to reduce pumping losses during the transient and so im-
1.3. P ROBLEM F ORMULATION
3
prove the torque response. Further investigations for improving the system responsiveness concerned also the air-to-fuel ratio and the spark advance. The first part of the project focused on analyzing the main characteristics of a turbocharged engine, from a control point of view, in order to be able to understand the problems and so design the requested controllers. A nonlinear Mean Value Engine Model (MVEM), with 13 states and linearized in 45 different working points, has been first studied and then used for simulations and control design. The original model, implemented in Matlab/Simulink, has been enriched with new features, like spark advance and lambda efficiencies and exhaust temperature correction depending on spark advance. A validation of the modified nonlinear model has been performed, recording data from the car in a driving test. To check that the linearized model correctly captured the main dynamics of the system, it was compared and validated with respect to the nonlinear one. A mathematical analysis of the linearized model in all the 45 operating points was carried through, in order to point out the main characteristics and fundamental limitations of the system. The proposed solution for achieving optimal wastegate control is based on Linear Quadratic (LQ) approach. For such controller a torque based design is applied. Reference tracking is achieved adding a feedforward action in the LQ controller. To guarantee disturbance rejection, it was also enforced with integral action and with an anti wind-up solution, related to hard input constraints. Since the optimal control strategy is expected to vary quite much for different working points, a gain scheduling strategy based on engine working conditions, has been designed. In order to improve the torque transient response, also the air-to-fuel ratio influence has been investigated and an independent lambda controller has been developed, in order to maximize the lambda efficiency during transient. Since the system operates near a constraint boundary, another solution based on Model Predictive Control (MPC) has been investigated. The first step has been considering only the wastegate as manipulated variable. Later on a multivariable approach has been considered, adding the throttle as control input and the fuel consumption as a second output. A mathematical analysis of the resulting MIMO system has been performed, based on singular value decomposition. The MPC was then extended to the MIMO formulation and some constraints on the states were also included, in order to consider physical limi-
4
C APITOLO 1. I NTRODUCTION
tations of the system. Different MPC configurations have been designed, to manage the trade-off between fast torque response and low fuel consumption. As last step, the air-to-fuel ratio was added to the manipulated variables, to verify if it is possible to get some benefit improving the transient torque response. The complete realtime MPC implementation, with the capability for automatic code generation in the dSpace microAutobox environment, requires the model, now with 13 states, to be reduced to a minimum state space order. The extent of model reduction that is required and the possible performance deterioration caused by the reduction have been investigated.
1.4 Thesis outline Chapter 2 covers the modeling of a turbocharged SI engine and Chapter 3 describes the Simulink model including the car, the driver and the ECM. In Chapter 4 the validation of the nonlinear model is shown, by comparing simulation results and data from a test on the car. Chapter 5 deals with the analysis of the linearized model, which is then used as a basis for the investigation of transient torque response and the possible approaches to its improvement. In Chapter 6 different ways to improve the engine response are investigated and a strategy based on LQ control is shown. Chapter 7 deals with control of Lambda and Spark Advance, and presents a strategy to improve torque response by maximizing the Lambda efficiency. A strategy based on model predictive control (MPC) is investigated thoroughly in Chapter 8 with a model-based approach. In Chapter 9 the applicability of the strategy is discussed and a reduced order model is derived, in order to make the MPC computationally lighter. A different formulation for the problem is given in Chapters 10 and 11, where multivariable control theory is used and MPC is designed to control also throttle and Lambda together with the wastegate.
Capitolo 2
Engine Model Turbocharged SI engines are a major possibility in the current trend of downsized engines with preserved drivability performance. Downsizing refers to reducing the size of the engine without a loss in the amount of torque produced, by adding a turbocharger, which connects a turbine placed before the exhaust system to a compressor placed after the air filter. This way the energy in the exhaust gases is utilized to compress the incoming air more and the engine can produce more torque. Considering control and supervision it is favorable to have a mean value model to be used. Such models of turbo engines are similar to those of naturally aspirated engines, but there are some special characteristics, e.g. the interconnected gas flows, the intercooler, the difference in relative sizes between the gas volumes (compared to naturally aspirated engines), the turbo, and the wastegate.
2.1 Mean Value Engine Model In order to perform a model-based investigation and optimization of the dynamic behavior of a turbocharged SI engine, a good model is necessary. A highly suitable model class is then mean value engine models (MVEMs) which describe the average behavior of the engine over one to several thousands of engine cycles[3] [2]. Fig. 2.1 shows a sketch of the turbocharged SI engine under consideration. The components that have to be modeled are: air filter, compressor, intercooler, throttle, engine, turbine, wastegate, and a lumped model for the catalyst and 5
6
C APITOLO 2. E NGINE M ODEL
exhaust. One benefit of this modelling strategy is that every component can be separately identified and then the engine model is built using the separate components. Each component is described in terms of equations, constants, parameters, states, inputs and outputs. For mean value models, that describe variations slower than an engine cycle, the frequency range is within 0.1-50 Hz. Parameters in mean value models are usually physically interpretable. This is advantageous in simulations of principle concern. General guidelines for MVEMs are: • Changes that take in the order of 10-1000 cycles to reach their final state are expressed by differential equations. • Changes that are faster are expressed by static relations. The basic principle used here is that each engine component shown in Fig.2.1 is modeled as a flow restriction (or pump) that affects the thermodynamic state of the fluid (gaseous). The standard calculation causality of almost all restrictions is that they take pressure difference as input and gives the flow as a result. The volumes between the restrictions are modeled as reservoirs where normally the pressure in each reservoir represent a state in the model. Whereas for the control volume there is only one type of model, for the restrictions there are two main components, namely compressible and incompressible fluids. Abbreviated Nomenclature It is natural to accompany the component based modeling with a system to name the variables. The main variables in the table to the left are specified by a subscript from the table to the right referring to its own component or the component before. As an example, Tc omp refers to the temperature after the compressor. Variables m ˙
Mass flow
P
Power
p
Pressure
T
Temperature
Tq
Torque
Π
Pressure ratio
2.1. M EAN VALUE E NGINE M ODEL
7
Subscripts amb
Ambient
af
Air filter
em
Exhaust mannifold
es
Exhaust system
Tq
Torque
ic
Intercooler
im
Intake manifold
t
Turbine
th
Throttle
The following sections quickly describe the modelling of some important subsystems present in the MVEM, based on the model developed by Per Anderson in [3] and the components related to turbocharging are given in the turbo section (see [3] for more details).
Figura 2.1: Sketch of a turbocharged SI-engine, that illustrates how the engine is divided into subsystems to enable physical modeling.
8
C APITOLO 2. E NGINE M ODEL
2.2 Incompressible Flow restrictions In many engine components the fluid flow can be regarded as incompressible and in-viscid. Under such conditions the pressure head losses caused by bends, valves, and sudden changes in area approximately follow the same relation Δp = pbef ore − paf ter = ξ(Re)
˙2 RTbef ore m pbef ore
(2.1)
where the ξ only has a weak dependence on the Reynolds number (Massey, 1998). In most cases ξ(Re) · R can be regarded as constant, here denoted H, and the equation can be used as a general model for incompressible flow through a restriction. Models for the air filter, intercooler, and exhaust system are all based on this relation.
2.2.1 Air Filter The air filter is important to model since it produces a pressure drop that can be as high as 5%, which propagates trough the intake system and influences the whole engine. A sketch of the air filter is shown in Fig.2.2. It consists of three sudden changes in area, the filter itself, and the pipes in and out of it. As described above, Eq. 2.1 can be used to model pressure loss for several kinds of flow restrictions, which gives the following pressure loss over the air filter: Δpaf = pamb − paf = Haf
Tamb m ˙ 2air pamb
(2.2)
p_amb m_air T_amb p_af
T_af m_air
Figura 2.2: Sketch of the air filter showing the changes in flow area.
2.2.2 Intercooler A heat exchanger, called intercooler, is used after the compressor to cool the compressed air back to near ambient temperature. It increases air density
2.2. I NCOMPRESSIBLE F LOW RESTRICTIONS
9
which is advantageous, but in SI engines it is mainly used for knock reduction. To achieve efficient cooling of the charge air, the tubes in the intercooler need to be rather thin so that the air is exposed as much as possible to the cooling medium. The result is that some of the gain in intake air density is lost. Therefore, beside the obvious need to model the outlet air temperature, also a model for the pressure head loss is needed. Intercooler - Pressure Head Loss Intercooler pressure head loss is modeled by [10] Δpic = Hic
Tcomp m ˙ 2air,ic pcomp
(2.3)
where m ˙ air,ic is the air-mass flow through the intercooler. Intercooler - Temperature Head Loss For all practical purposes of intercoolers the flow rate of the cooling fluid m ˙ cool is greater than the air mass flow, m ˙ air , through it. This suggests, (Holman, 1997), that the following equation can be used to measure the efficiency of the intercooler =
Tcomp − Tic Tcomp − Tcool
(2.4)
Solving this equation for Tic yields the desired expression for the intercooler outlet temperature, expressed in terms of the temperatures and the intercooler efficiency Tic = Tc − (Tcomp − Tcool )
(2.5)
Tcool is the temperature of the cooling medium, in this case ambient air, Tcool = Tamb . In order to predict the intercooler outlet temperature, a model for the intercooler efficiency, , is needed. We are not interested in details here, the description will not go deeper, but more can be found in [2].
2.2.3 Exhaust System The exhaust system consists of changes in flow area and flow direction and the head losses can therefore also be modeled in the same way as the air filter, i.e. using Eq. 2.1: Δpt = pt − pamb = Hes
Tes,in m ˙ 2air pt
(2.6)
where Tes,in is the temperature of the gases flowing into the exhaust system.
10
C APITOLO 2. E NGINE M ODEL
2.3 Compressible Flow Restrictions Isentropically compressible mass flows (Taylor, 1994) are used to describe the flow through the throttle and the wastegate.
2.3.1 Throttle flow The throttle is modeled with a butterfly type model,see Figure 2.3, where the angle of the throttle plate controls the flow area. In engine under consideration the throttle is controlled by the ECU through an electrical servo, thus providing high flexibility in determining the behavior of the vehicle by designing different profiles for the throttle behavior.
a a0
Figura 2.3: Left: the throttle body. The angle a is the actual angle related to the throttle housing, while the angle a0 defines when the throttle is closed. Right: the flow areas are representd by the two moon crest shaped areas.
2.3.2 Wastegate flow Wastegate flow is modeled using the standard model for a compressible restriction, with variable area.
2.4 Engine The engine produces a port air.mass flow, exhaust mass flow and exhaust temperature.
2.4.1 Mass flow into the cylinders The air mass flow out of the intake manifold into the cylinders depends on many parameters, but mostly on engine speed N, intake manifold pressure pim , and temperature Tim : m ˙ ac (N, pim , Tim ) = ηvol (N, pim , . . .)
Vd N pim nr RTim
(2.7)
2.5. C OMPRESSOR
11
where ηvol is the volumetric efficiency, a parameter used to describe the effectiveness of the engine’s ability to induct new air into the cylinders; Vd is the displaced volume for the whole engine; nr is the number of engine revolutions per cycle and R is the gas constant.
2.4.2 Volumetric efficiency The intake system consisting of air filter, intercooler and throttle plate, intake port and intake valve restricts the amount of air that the engine can induct. The measure for the effectiveness of an engine’s induction process is the volumetric efficiency, ηvol . The volumetric efficiency is defined as the volume flow rate of air into the intake system, V˙ a , divided by the rate at which volume is displaced by the piston, V˙ d , ηvol =
V˙ a m ˙ a nr = ˙ ρai Vd ηcyl N Vd
(2.8)
where ρai is the air density in the inlet, m ˙ a is the air mass flow, and nr is the number of crank revolutions for each power stroke per revolution (nr = 1 for a two stroke engine and nr = 2 for a four stroke engine). The engine speed n is given in revolution per seconds. An equivalent definition of the volumetric efficiency is to use the mass of air in one cylinder directly ma ρai V˙ d
(2.9)
The definition are equivalent but the mass of air is not easily determined. The inlet density can be either be taken as the intake system density. Then ηvol measures the efficiency for the pumping over the inlet valves and ports. Or ρ can be taken as atmospheric density, and then it measures the efficiency for the whole intake.
2.4.3 Exhaust Manifold Out Temperature The temperature out of the exhaust manifold before entering the turbine can be ˙ af ) modeled with sufficient accuracy as a function of air mass flow Tem = f (m when the engine operates at stoichiometric conditions, (Eriksson, 2002).
2.5 Compressor Compressor performance is determined in a flow bench where the compressor is run together with the turbine in a number of points and the state changes of
12
C APITOLO 2. E NGINE M ODEL
the fluid are measured. From this data a performance map of the compressor is constructed. The performance map is usually implemented in a look-up table which serves as the actual compressor model.
2.5.1 Compressor - Pressure Model f an adiabatic process is assumed, compression from a state with pressure p01 and To1 to another state, with pressure p02 requires an amount of specific energy, wi , that obeys the following relation between the pressure ratio and the specific energy. In this case p0 1 = paf and p0 2 = pcomp , so Πc =
γ pcomp win γ−1 = (1 + ) paf cp T01
(2.10)
An expression for the work can be derived, see e.g. (Mtiller et al., 1998), by considering the Euler equations for compressor blades and the losses due to friction and incidence, resulting in win = U22 (s1 (
m ˙ air 2 m ˙ air ) + s2 ( ) + s3 ) U2 U2
(2.11)
wehre U2 is the rotor tip speed and si are constants that are tuned to measured data.
2.5.2 Compressor - Air Mass Flow Model n mean value models it is desirable to represent the flow through the compressor as a function of pressure ratio and turbine shaft speed, rather than as in Eqs 2.10 and 2.11. To do this, the equations can be inverted to m ˙ air = a1 U2 ∓
a2 U22
γ−1 + a3 Taf (Πc γ − 1)
(2.12)
where ai are tuning constants.
2.5.3 Compressor - Efficiency Model he efficiency is defined by the ratio of the isentropic and the actual specific input work γ−1
( ppc ) γ − 1 win ηc = = afTc win,act Taf − 1 where win is modeled by Eq.2.11.
(2.13)
2.6. T URBINE
13
2.6 Turbine Dimensionless quantities are used when describing the turbine performance and the same definitions, as for the compressor, are applied. Here it is worth to stress that the dimensionless expressions are of higher importance for the turbine since it is exposed to more extreme variations in inlet conditions compared to the compressor; Temperatures vary from 500 K up to 1300 K and pressures at turbine inlet from atmospheric conditions up to 300 kPa. For turbines the corrected mass flow and efficiency is normally plotted versus pressure ratio
Pem pt
= l/Πt . Turbine efficiency is determined from the flow
conditions and calculated using ηt =
1−
Tt Tem
t 1 − ( ppem )
(2.14)
γ−1 γ
In addition, the mechanical efficiency of the turbocharger might also be included in the turbine efficiency. Look-up tables derived from the map may serve as turbine models but it is also interesting to study parameterizations.
2.6.1 Turbine - Pressure Model eglecting the corrected quantities and studying the mass flow alone shows that there exists a relationship between mass flow and pressure ratio for the turbine that is practically independent of turbine shaft speed. The connection between the flow and pressure ratio is almost independent of the compressor speed, therefore the speed dependence is neglected and the corrected air mass flow is modeled as a function of only the pressure ratio Πt =
pt pem .
The parallel flow
in the wastegate also has a large effect and makes the validation of the turbine model difficult, when using engine data.
2.7 Model Dynamics Two kind of dynamics are included in the model: - Control volumes. All receivers are modeled as control volumes with filing and emptying dynamics using pressure and temperature as states. - Turbo shaft dynamics. The axle connecting compressor and turbine has its own dynamics, driven by the turbine torque and loaded by the compressor and friction.
14
C APITOLO 2. E NGINE M ODEL
2.7.1 Control volumes Control volumes are placed in between all flow restricting components and they determine some of the engines dynamic characteristics. A control volume is a thermodynamical volume that stores mass and energy. It has fixed volume V and as a storage it has filling and emptying dynamics. The increase or decrease o0f the mass is determined by the inlet and outlet air ˙ out . The difference between the inflow and outflow of mass flow m ˙ in and m mass (m ˙ in − m ˙ out ) directly gives the rate of change in mass in the system dm =m ˙ in − m ˙ out dt
(2.15)
Energy is also conserved and stored in the system. Considering the energy there might be heat transfer Q˙ but there is no mechanical work transfer to the control volume. Energy is also transferred to and from the system through the in-and outflows. For the open system that we are considering the first law (energy conservation) gives the following rate of change of the internal energy dU = H˙ in − H˙ out − Q˙ dt
(2.16)
Since is difficult to measure mass and energy, these equations are manipulated and rewritten in terms of temperature and pressure. Assuming that • the gas is ideal (pV = mRT ) • cp andcv are constant the temperature can be determined from the internal energy and the mass through U = mu(T ) = [cv − constant] = mcv T
(2.17)
and the pressure can be determined from the ideal gas law pV = mRT
(2.18)
Furthermore the enthalpy flows are given by H˙ in = m ˙ in cp Tin andH˙ out = m ˙ out cp Tout
(2.19)
where the temperature of the outflowing gas is the same as that in the control volume, i.e. Tout − Tin . Equations 2.15 to 2.19 give a system of equations that can be solved to give all information on the system and differential equations
2.7. M ODEL D YNAMICS
15
can be formulated so that mass, pressure and temperature are the states in the model (see [2] for the detailed equations).
Control Volume H
H
p T
m_in T_in
U m V
m_out T_out Q
Figura 2.4: The control volume is marked with dashed line and in it the pressure, temperature, and mass states are shown. There are two flows across boundaries. There is no volume change (V is constant), except those from the flow, so there is no mechanical work exchange.
2.7.2 Turbo Shaft Dynamics revious sections described models for compressor and turbine separately and to connect the two submodels Newton’s second law for a rotating system is used: Tqt − Tqcomp = I ω˙
(2.20)
where Tqt is the driving torque and Tqcomp denotes braking torque acting on the rotating parts of the turbo charger spinning with the angular velocity ω. The power and torque are connected through P = Tq ω so equation 2.20 becomes: Pt − Pcomp = I ωω ˙
(2.21)
If the turbine and the compressor are treated as two separate thermodynamic systems, Pt and Pcomp can be calculated from the first law of thermodynamics. The heat transfer with the surroundings and change in potential energy is neglected. −P = m(h ˙ out − hin ) = mc ˙ p (Tout − Tin )
(2.22)
For the compressor, the net amount of produced power is negative, i.e. the compressor consumes energy, while for the turbine, the net amount of produced energy is positive.
16
C APITOLO 2. E NGINE M ODEL
2.8 Torque generation How large the torque is, depends on the work produced and consumed in the engine [2]: Me =
Wig − Wf r − Wpump nr 2π
(2.23)
where Wig is the indicated gross work produced, i.e. the mechanical work produced, Wf r is the friction work consumed by the engine components as well as auxiliary devices, and Wpump is the pumping work due to difference in intake and exhaust manifold pressures, while nr is the number of engine revolutions per cycle. There exist different expressions for Wig , Wf r and Wpump . Often they are modeled as follows: Wig = Vd · mf˙uel qHV
2 min (λ, 1) ηe , Ns Vd
(2.24)
2 N N Wf r = Vd · 0.97 + 0.15 , + 0.05 1000 1000 Wpump = Vd · (pem − pim ). ηe is the engine raw efficiency, qHV the heating value (the amount of energy that the combustion of one unit of fuel can release when the fuel is in gaseous phase), Vd the displacement volume, N the engine speed in revolutions per minute and Ns the engine speed in revolutions per second. The indicated gross work is coupled to the energy in the fuel and to operating conditions, which gives the model in the first equation above. In the equation (2.24) the pumping work is modeled as proportional to the difference in exhaust manifold pressure and intake manifold pressure. The friction model comes from [11]. It accounts for three different kinds of friction: boundary friction (independent of engine speed), hydrodynamic friction (proportional to speed) and turbulent dissipation (proportional to speed squared). Torque is a valuable measure of a particular engine’s ability to do work but it depends on engine size. Another useful parameter is the mean effective pressure (MEP) which is normalized with engine size and has the same unit as pressure [force per unit area][12] M EP =
work produced per cycle volume displaced per cycle
(2.25)
Gross indicated work (IM EPg ) is defined as the work delivered during the compression and expansion strokes while Net indicated work (IM EPn )
2.8. T ORQUE GENERATION
17
implies the work generated during the entire four-stroke cycle. The difference between net and gross IMEP is called Pumping Mean Effective Pressure, PMEP: P M EP = IM EPg − IM EPn
(2.26)
From eq. 2.26 it is evident that a positive PMEP means negative work on the
Figura 2.5: Cylinder pressure versus V/Vmax for a turbocharged SI-Engine. crankshaft. PMEP and IMEP can also be expressed by the areas formed in the pressure versus volume diagram, see Figure 2.5: • PMEP = Area B + Area C • IMEP= Area A + Area C The usable power is usually referred to as brake power, so inserting the brake torque into the definition of MEP, the brake mean effective pressure (BMEP) is obtained: BM EP =
Pb nr 2πMb nr = Vd ccyl N Vd ccyl
(2.27)
BMEP is estimated by subtracting pumping (PMEP) and friction work (FMEP)
18
C APITOLO 2. E NGINE M ODEL
from the supplied work from the fuel (IMEP): BM EP = IM EP − P M EP − F M EP
(2.28)
In turbocharged engines the turbine power is generated by the energy in the exhaust flow. Figure 2.6 gives a schematic view of the theories behind turbocharged engines. Loop 1 to 4, in Figure 2.6 is the engine power stroke.
Figura 2.6: Schematic cylinder pressure versus volume diagram, showing the available exhaust energy. The driving power of the turbine is the energy available at point 4 when the piston is at BDC. Area AT represents the available energy, which could be produced by expanding the exhaust gases to atmospheric pressure after the exhaust valves have opened. This energy is used to drive the compressor so that the intake pressure can be raised above the atmospheric pressure to the charging pressure, which requires work, area Ap . For the ideal case area AT equals area Ap . In other words, the power generated by the turbine will be used in the compressor. The power is related to the mass flow through the turbine, m ˙ and enthalpy, h , according to [10]: P = m(h ˙ 4 − h5 ) = mc ˙ p (T4 − T5 )
(2.29)
2.9. F UEL PATH AND (A/F)- RATIO
19
where T is the temperature and cp the specific heat. The choice of turbine for a specific engine configuration is a compromise between low and high load performance of the engine. For commercial automotive purposes low load performance is most often preferred. In order to ensure sufficient pressure at the turbine inlet at low load, the inlet area to the turbine needs to be limited. However at high load a small inlet area will generate too high rotational speed of the turbine. Hence, it is necessary to limit the turbine rotational speed during high load due to mechanical constraints. This can be done by the wastegate, which leads part of the flow past the turbine, thereby decreasing the pressure at the turbine inlet.
2.9 Fuel path and (A/F)-ratio The fuel flow into the cylinder is measured and controlled by a fuel injector, that is an electrically controlled valve. Only a fraction of the injected fuel is inducted into the cylinder directly, due to the wall wetting phenomenon, i.e., some amount of fuel is deposited on the intake walls either as a film or as puddles and does not mix with the air. The result is that the following (A/F) mixture enters the cylinder λ=
m ˙ ac 1 A m ˙ fc F s
(2.30)
where m ˙ ac and m ˙ f c are the air and fuel flow into the cylinder respectively.
2.10 Fuel consumption The fuel mass flow to the cylinder is proportional to the air mass flow ([3]): m ˙ air m ˙ f uel = A . λ F s where
A F s
is the stoichiometric air/fuel ratio.
An expression for the air mass flow is: m ˙ air = (a0 pim + a1 )
V d Ns RTim nr
(2.31)
where Vd is the displacement volume, Ns the engine speed in revolutions per second, R is the gas constant and nr the number of engine revolutions per cycle. The constants a0 and a1 are identified in [3] with the Matlabfunction lscurvefit
20
C APITOLO 2. E NGINE M ODEL
which uses a nonlinear least-squares technique. If the state Tim and the input signal Ns is assumed constant, m ˙ air can be expressed as a linear function of the state pim : m ˙ air = k1 pim + k2 Vd Ns k1 = a0 RT n
im r
(2.32)
Vd Ns k2 = a1 RT im nr Assuming λ = 1, also the fuel mass flow is a linear function of pim : m ˙ air m ˙ f = A = k1 pim + k2
(2.33)
F s
2.11 Conclusions A mean value engine model (MVEM) is compiled in this chapter. It is a parametrized component based model of the engine’s intake system and exhaust system, including the turbocharger and wastegate. Each component of the engine is described in terms of equations, constants, parameters, states, inputs and outputs. This class of models describe the average behavior of the engine over one to several thousands of engine cycles, so is very suitable for control design.
Capitolo 3
Simulink Model This thesis is based on the model of a turbocharged SAAB 9-3 L850 2.0T, developed at GM Power Train. The model is implemented in Simulink and has three fundamental components: • the driver, who is basically modeled by the accelerator pedal signal; • the car, which contains the Mean Value Engine Model (MVEM) and the block describing Transmission and Chassy. The MVEM was developed by Per Andersson [3]; • the ECM, which contains all the controllers. The top level diagram is shown in figure 3.1.
3.1 Driver The behavior of the driver is modeled through the acceleration pedal, the gear box and the clutch. Setting some parameters inside the driver block it is possible to simulate different driving scenarios: acceleration, constant speed or braking. The focus of the thesis is on improving the torque response during the transient, so the acceleration phase is considered and a step in the pedal is given as input to the engine model. The clutch and the gears will be disregarded, and only the signal representing the acceleration pedal will be considered as an input coming from the driver to the ECM.
3.2 Car The car is represented by two main blocks: 21
22
C APITOLO 3. S IMULINK M ODEL
P lantD ataB us
Memory2
ECM_1_11_7_8
ECM
BUS
Interrupt G enera tor
ECM
Driv er
D riv er
Simple driver S AAB 9-3 L 850 2.0T Ma nua l 5 G ea rs
Figura 3.1: Top level diagram of the plant model implemented in Simulink.
Acc_Ped t Clutch Up Down
t
Gear
3rd 2nd 1st
t
Figura 3.2: Driver: acceleration phase, from first to third gear. 0=clutch down, 1=clutch up.
3.3. E NGINE S TRUCTURE
23
• the Engine Model, that will be treated in detail in the next section; • the Transmission and Chassi model: in this block the clutch and the shafts are assumed to be stiff and the transmission and the final drive are assumed to multiply the torque by the conversion ratio. Making some change inside this block we had the possibility to fix the engine speed as constant.
3.3 Engine Structure The components included in the model are the intercooler, engine, throttle, wastegate, turbine, compressor, exhaust system and various pipes or manifold connecting these components. These pipes or manifolds can be considered as control volumes where the pressure and temperature of the gas inside depends on the mass-flows into and out of the volume. Mass-flow are determined by restrictions which are components that, given the pressure and the temperature before and after the restriction, determine the mass-flow and temperature of the flow. The restrictions and control volumes are listed next: Restrictions Air-Filter Compressor Intercooler Throttle Engine Turbine/wastegate Exhaust system Control volumes Pipe between air-filter and compressor Pipe between Compressor and Intercooler Pipe between Intercooler and Throttle Intake manifold connecting the the throttle and cylinders Exhaust manifold connecting the cylinders and the turbine/WG Pipe between turbine/WG and the exhaust system To complete the model there are only two components left. First there is the turbocharger shaft, which is modeled as a rotating inertia, and second the engine torque model. Below the components are divided into groups:
T up
p down
1
T flow
T flow
Amb
p up
T up
p down p up W _es Out
p_af
p_es
T_es
[W_esO ut]
[p_t]
[T _t]
p_af
[p_a f]
Q_dot p [P a] p_es p [P a] W _out [kg/s ]
T _in [K ] T_es
2
dT
[T _a f]
dT W _in [kg/s ]
W _in [kg/s ] T [K ] T [K ] Q_dot
W _out [kg/s ] dp dp T _in [K ]
[dp_t]
[dT _t]
T _c p_af [P a]
W _c T _af [K ]
[w_tc]
T_af
w_tc
p_bef_c mp W _t
T _in [K ] p_em
[W_esIn]
W _t
T_em
[T _em]
[dw_tc]
Tq_driv ing
dw_tc
T_c
Tq_braking
p [P a] w_tc
[p_c]
p_c
W _in [kg/s ] T [K ]
m flow m flow
eta_c p_c [P a] w_tc
W _out [kg/s ]
[dp_c]
T_em p_em
T _up
[T _c]
p_ic
2
[T _im]
[p_im]
[p_ic]
[T _ic]
p_ic
[dp_em]
W _c y l
W _in [kg/s ] T_ic
p_emWG _open
T_c
T _fwd_flow [K ]
Q_dot dT
p_es
T_ic
p_down
W _ic W _ic
[dT _em]
[p_em]
q_driving_me
q_bra king_me
1
[dT _c]
dp
T q_c w_tc [rad/s ] u_wg T _trb
[dT _a f]
p_amb
[dp_a f]
T [K ] W _out [kg/s ]
T_af
p [P a] Q_dot
p_af
dT T _in [K ]
W _c omp
w_e
W _c y l
[W_cyl]
dp
torque_WG open
[T q_cs]
Tq_c s
p_imWG _open
p down
T [K ] dT
m f low
T_in [K ]
W _th
W _c y l
W _out [kg/s ]
Q_dot
W _in [kg/s ]
ef f ec tiv e area T f low
p up
T up
p [P a]
[dp_im]
T_im
p_im
[dT _im]
p_im
T_ic
dT _i dp_ic
Q_dot dT
W _c omp
p em
[W_comp]
L_req
W _af
T _em T q_t
T _amb mF low e
T_af
T ti
p_up
[W_ic]
IMOP
W _ic
F uel mas s flow [kg/s ]
T _c ool [K ] dp W _in [kg/s ]
T _in [K ] p [P a] phi_IgnOffs et
W _af
p_after_c mp m_es
E MOP T q_e
W _out [kg/s ] dp
T_mix
phi_F inalAdvanc e
[W_a f]
T im
T [K ] p im air F low
[W_th]
24 C APITOLO 3. S IMULINK M ODEL
Figura 3.3: Simulink implementation of MVEM. The model is implemented with control volumes connected to restrictions. In the center the turbocharger shaft dynamics block connects compressor and turbine/wastegate blocks. The shadowed backdrop indicated that dynamics (states) are present in the blocks. p_em
3.3. E NGINE S TRUCTURE
25
1. Restrictions. These determine a mass-flow through the restriction with a temperature, given pressure and temperature before and after the restriction. • Incompressible flow restrictions. Air-filter, intercooler and exhaust system. • Compressible flow restriction. Throttle and wastegate. • Custom restrictions. These restrictions are specific applications: Engine Determines the port air-mass flow, exhaust mass-flow and temperature of the gases to the exhaust manifold. This block also models the engine torque. Compressor The compressor is a part of the turbocharger and it is considered as a restriction as it produces a mass-flow through the compressor and models the mass-flow temperature. It also produces a loading torque to the turbine. Turbine The turbine part of the turbocharger produces a mass-flow through the turbine, models its temperature, and describes the torque produced by the turbine. 2. Adiabatic mixer. This component is used to adiabatically mix flows from two different restrictions, such as when the flows through the turbine and wastegate meet. The outputs are mass-flow and flow-temperature. 3. Model dynamics. Components which have one or more states. • Control volume: A control volume is used to connect two restrictions. It has two states, pressure and temperature. Control volumes are located between the restrictions: air-filter, compressor, intercooler, throttle, turbine, and exhaust system. Inputs: mass-flows in and out of the control volume together with the flow temperatures. • Inertia with friction: The axle in the turbocharger is modeled as a rotating inertia, where the inertia is the total inertia of the axle, compressor and turbine. The angular velocity of the shaft is represented by a state. The inertia is powered by the torque from the turbine and loaded by the compressor and axle friction. The inputs are: driving torque and loading torque. Output is speed.
3.3.1 Model Simplifications Some general simplifications and assumptions are made:
26
C APITOLO 3. S IMULINK M ODEL - Flows run only in forward direction. - No heat transfer to/from the gas inside of the control volumes. - No compressor bypass valve. - All gases are considered to be ideal.
3.3.2 Model Inputs Inputs to the model are: Name
Description
Unit
α
Throttle angle
mm2
N
Engine speed
RP M
Wastegate opening. Range 0 − 1
–
λ
Normalized air/fuel ratio
–
pa
Ambient pressure
Pa
Ta
Ambient temperature
K
uwg
3.3.3 Model States The model has states for pressures and temperatures in each control volume and one state for the turbocharger speed: State
Description
paf
Pressure after air-filter
Taf
Temperature after air-filter
pcomp
Pressure after compressor
Tcomp
Temperature after compressor
pic
Pressure after intercooler
Tic
Temperature after intercooler
pim
Intake manifold pressure
Tim
Intake manifold temperature
pem
Exhaust manifold pressure
Tem
Exhaust manifold temperature
pt
Pressure after turbine
Tt
Temperature after turbine
ωTC
Turbocharger speed
Figure 3.4 shows a sketch of a turbocharged SI-engine, that illustrates how the engine is divided into subsystems to enable physical modeling and indicates all the states.
3.3. E NGINE S TRUCTURE
27 p_af T_af
Intercooler
p_ic, T_ic
p_comp, T_comp
Air filter
Compressor
m_c Throttle
w_t Exhaust manifold
Intake manifold T_im p_im
m_em
m_im
Turbine
T_em p_em u_wg
p_t T_t
Catalyst & Exhaust system
Engine
Figura 3.4: Sketch showing the components that are modeled in a turbocharged SI-engine.
3.3.4 Model Output If the state Tim and the input signal N are assumed constant, the engine torque can be expressed as a linear function of the states pim and pem [1]: Tq = k3 pim + k4 pem + k5 qHV min (λ,1) Vd 2 k3 = nr 2π k1 Ns A ηe + 1 Vd λ
k4 =
d − nVr 2π
k5 =
Vd nr 2π
F
s
min (λ,1) ηe Vd
k2 N2s qHV A λ
F
2 N N + 0.05 1000 − 0.97 + 0.15 1000
s
Furthermore it is assumed that the input signal λ does not change. The assumptions are only made for a certain operating point, i.e. the values of Tim , N and λ can change between operating points.
400 T intake M 350 300 250 200 150 100 50 0
0
5
10
15
20
25
Figura 3.5: Tim can be considered constant.
30
28
C APITOLO 3. S IMULINK M ODEL
3.3.5 Maps for parameters representation Some of the components depend in a non-linear way on their inputs and might be difficult to derive analytically a function describing their behavior. If measurements data is available for these it is convenient to use maps or look up tables instead of a functional representation.
3.4 Performance Limiting Factors A number of factors limit the performance of an engine; both the compressor ratio and air to fuel ratio are very important for the efficiency but there are some factors limiting their potential.
3.4.1 Knock Knock is a fundamental problem in spark ignited engines. It can easily destroy an engine if the knocking is allowed to continue. Knock is a resonance phenomenon in the cylinder that originates from an abnormal combustion where some of the gas auto ignites before the flame front has arrived and burns uncontrollably. Normal combustion Under normal conditions the combustion is ignited by a spark plug that gives a small flame kernel. The flame kernel increases in size and develops into a turbulent flame that propagates through the full chamber and is extinguished at the cylinder walls. The complete combustion process takes around 60° to complete, which corresponds to a flame propagation that is much slower than the speed of sound. Therefore the cylinder pressure can be considered to be constant in the cylinder. The part of the air-fuel mixture that is in front of the flame front and has not yet burned is called end-gas. Knocking combustion Knock is the name given to the noise which is transmitted through the engine structure due to essentially spontaneous ignition of a portion of the endgas. When this abnormal combustion process takes place there is an extremely rapid release of much of the chemical energy in the end-gas, causing a very high local pressure and the propagation of pressure waves across the combustion chamber. Knock is a disturbing source of noise and if it is let to continue, can significantly damage the engine.
3.4. P ERFORMANCE L IMITING FACTORS
29
Two theories explain the origin of knock phenomenon: the autoignition and the detonation theory. The first states that when the fuel-air mixture in the end gas region is compressed to sufficiently high pressures and temperatures, the fuel starts to oxidize spontaneously in part or all of the end-gas region. The second says that under knocking conditions the flame front accelerates to sonic velocity and burns the end gas much faster than under normal conditions. Knock can be controlled using the spark advance.
3.4.2 Surge The compressor operation is limited by the so called surge line. It shows in the compressor map the border of a region with unstable operation of the compressor flow. A centrifugal compressor can only generate a pressure increase when there is a flow through it. An increase in pressure ratio over the compressor opposes the flow and gives a decreased mass flow. When the pressure ratio becomes too high the compressor can not maintain the flow necessary to generate the pressure increase and the flow through the compressor breaks down. When the flow breaks down there can be an uneven distribution of forces around the compressor wheel. The instabilities induce vibrations in the compressor wheel and turbo shaft which can cause the blades to hit the casings or destroy the bearings. Surge can easily occur when the throttle is suddenly closed. The remedy is to add a surge valve which reduces the pressure after the compressor by either a return pipe which leads the flow back in front of the compressor or a pipe that releases it directly to the ambient atmosphere. The surge valve is controlled by the engine control system which detects if there is a risk for surge and then opens the valve.
3.4.3 Limits on air to fuel ratio The fundamental limitation for SI engines operating with homogeneous charge is that there is a combustion stability limit around λ = 1.3 where the fuel can no longer be ignited and combusted. Other limits are also imposed by the legislators, based on the levels of pollutant emissions from the engine.The current emission after treatment systems can not effectively handle pollutant emissions other than λ = 1.
30
C APITOLO 3. S IMULINK M ODEL
3.5 Engine Management System (ECM) An engine management system must meet and compromise between several goals, such as: produce good driveability, maximize the engine performance, minimize the fuel consumption, and give low emissions. Some of the steps towards this are: metering the amount of air and fuel according to quantity and ratio, forming a combustible mixture, distributing the air-fuel mixture to the cylinders, igniting the mixture at the optimum position, controlling exhaust emissions and controlling the non-exhaust emissions. The control system comprises the control of the A/F ratio, the preparation of the air to fuel mixture, ignition timing, and ignition energy, that all influence the engine performance regarding the combustion process and emission formation. Several sensors are positioned on the engine to measure the engine state. The signals are measured by the electrical control unit (ECM) that calculates and executes the control actions. The ECM is a complex control unit, that contains many controllers; among them the most important are: • Throttle Control • WG Control • Lambda Control • Fuel Control • Spark Advance Control
As illustrated in Fig. 3.6, the ECM is formed by two main blocks: a Time Based Unit an an Angular Based Unit. They both receive inputs from the driver (Acceleration pedal position) and from the engine (mainly the engine speed N and the inlet air mass flow). The Time Based unit generates the requested Lambda, that goes into the Angular Based and is used to calculate the requested fuel mass, the requested throttle position (see 3.5.2) and the signal to control the wastegate. The Angular based unit works with signals that refer to fuel and spark advance. The requested fuel mass is calculated through lambda request (coming from the Time based unit), given the engine speed and the inlet air mass flow. The
3.5. E NGINE M ANAGEMENT S YSTEM (ECM)
31
section related to SA, takes as input from the Time Based unit the signal corresponding to the best spark advance timing (phi-MBT) and gives as outputs two signals (phi-offset and phi-ignition) that will be used to calculate the SA efficiency. The aim of the thesis is to improve transient response through more advanced controllers than what are used today, investigating if and how new different control of throttle, lambda and wastegate may quicken the torque response. So the Fuel Control and Spark Advance Control, implemented now on the car, will not be changed and a brief description will be given in the following sections.
Phi Offset
KNOCK
Pct Throttle
THROTTLE CONTROL
Pct WG
WG CONTROL
L Req
LAMBDA CONTROL
Phi Ignition AIR Acc Pedal v Vehicle N m Air Per Cyl
TORQUE FUEL
M Pred
L Req
SPARK
Phi MAX Offset Phi min Offset Phi MBT
TIME BASED FUEL
N m Air Per Cyl
PHIIGNITION
t Injection
FUEL m Fuel Req CONTROL SA Phi Offset Phi Ignition CONTROL Phi Offset Normal
ANGULAR BASED
Figura 3.6: ECM
3.5.1 Map-Based Control In current practice, lookup tables or maps are used extensively in the control system for parameter representation and directly for control (c.f. Section 2.1), even though there is a trend towards more model based techniques. When maps are used for control the basic idea is to use measured quantities, like engine speed and intake manifold pressure (i.e. load), as inputs and deliver the
32
C APITOLO 3. S IMULINK M ODEL
control action directly as output. These maps usually implement open loop controllers and are obtained through calibration in an engine test bench. The procedure is simple but time consuming. The engine is controlled to the desired grid point in speed and load and the control outputs are tuned to achieve desired goals. Control outputs are then stored directly in the map. The advantage with maps is that they are computationally efficient, easy to implement and easy to obtain if an engine is available. A major disadvantage is that they do not offer any extrapolation; when an engine is re-designed all maps might have to be re-calibrated which is a time consuming process. Another control paradigm is model based control where models are used to describe the functions and the complex interactions between inputs and outputs. Models are interesting since they offer the benefit of extrapolation and in general require less measurements for calibration. Models are also interesting since they directly show the structure of the model and point out the important effects.
3.5.2 Throttle control The Throttle control determines the throttle area request to satisfy the demand coming from the acceleration pedal. Figure 3.7 shows the path from the pedal (which represents the request of the driver) to the requested air mass flow. M_Pred
Acc_Pedal Pedal to Torque
m_Fuel_Req
x Torque to Fuel
K_eff
L_st
x
x
m_Air_Req
L_Req
Figura 3.7: Signals path from the pedal to the air mass request. The pedal position (AccP edal ) is converted into predicted torque (MP red ), that takes into account the efficiency coefficient (Kef f ). This coefficient considers the influence of Lambda and Spark Advance on the torque, in fact depending on the values of these two variables, the effective torque coming out from the engine is modified. Torque is then converted into requested fuel mass flow (mF uel−Req ) and finally to requested air mass flow (mAir−Req ) through the definition of lambda (see.2.30): λReq =
m ˙ air m ˙ f uel λst
(3.1)
Then the mAir−Req goes into the throttle controller block, which basically is
3.5. E NGINE M ANAGEMENT S YSTEM (ECM)
m_Air_Req m_Air
+ e_Air -
PID
+ +
THROTTLE AREA REQUEST
33
Th_Pst_Req
Figura 3.8: Throttle controller. a PID acting on the error between the air mass reference mAir−Req and actual value mAir , and finally gives the throttle request.
3.5.3 Lambda Control In an engine management system for SI engines there are several controllers and two of the most important are A/F control and ignition control. The main purpose of the A/F control loop is emission reduction. To achieve good emission reduction is necessary to use both feedback and feedforward. Feedback is necessary for maintaining λ in the narrow band around λ = 1 where the catalyst operates best. Only an open loop will not be sufficiently accurate due to model uncertainties. Feedforward is necessary for fast transient response and it determines the basic amount of fuel to inject. The main purpose of the ignition control loop is to get good fuel economy while avoiding knock. At low loads the engine runs with the most fuel efficient ignition while at high loads engine knock can pose a limit on the ignition timing and it has to be set later.
3.5.4 Fuel Control The amount of fuel is controlled by the fuel injection system, which is responsible for mixture formation, mixture transport and mixture distribution. By mixture formation is meant the process of preparing the air and fuel mixture: some of the fuel drops that enter the inlet manifold evaporates (which is desirable), while some other forms a film on the manifold walls (which is not desirable). Mixture transport is the transport of air-fuel mixture to the cylinders and mixture distribution is the distribution of air and fuel to each cylinder. When the driver accelerates, the throttle position changes and so the inlet air flow changes. The fuel injection controls the amount of fuel injected so that at all times the air to fuel ratio is kept in a narrow band around λ = 1. This value of λ is chosen since gives good driveability and low emissions. The fuel control is based on the speed density principle [2], which determines the air mass flow into the cylinders m˙ac through the volumetric efficiency, given the engine
34
C APITOLO 3. S IMULINK M ODEL
displacement volume, intake density and engine speed m ˙ ac = ηvol ρi Vd
N nr
where the intake manifold density ρi is determined from the pressure and temperature in the intake using the ideal gas law. Then how much fuel to inject is determined based on the air flow into the cylinders and the requested λ. m ˙ fi =
m ˙ ac A
λReq
F s
Once the fuel mass flow is obtained, it is possible to calculate the desired injection opening time tinj =
m ˙ fi + t0 (ubatt ) N c1
where ubatt is the battery voltage, t0 is the opening and closing time of the valve and c1 is a constant including pressure influence (which is constant), injector constant, number of cylinders and the number of strokes per cycle.
3.5.5 Spark Advance Control Spark advance control deals with determination of the engine position where the spark plug shall ignite the air-fuel mixture and start the combustion [13][14]. It is thus used to position the combustion and pressure trace relative to the crank shaft motion: work is lost to heat transfer and to compression if it is placed too early and expansion work is lost if it is placed too late. Spark timing is one of the most important factors affecting the engine performance. The instant moment when the spark happens in the cycle is really crucial in determining the produced power and torque. The combustion event must be properly located relative to top-center (TC) in order to obtain maximum torque. The combustion process starts before the end of the compression stroke, continues through the early part of the expansion stroke and ends after the point in the cycle at which the peak cylinder pressure occurs. The combined duration of the flame development and propagation process is typically between 30 and 90 crank angle degree. Thus, optimal spark advance positions the pressure trace in a way that compromise between the effects mentioned above. To define the position of the in-cylinder pressure relative to TDC, the peak pressure position (PPP) is used, Figure 3.9. The PPP is the position in crank angle where the in-cylinder pressure takes its maximum value.
3.5. E NGINE M ANAGEMENT S YSTEM (ECM)
35
Figura 3.9: The PPP (Peak Pressure Position).
If the start of the combustion process is progressively advanced before TC, the compression stroke work transfer (from the piston to the cylinder gases) increases. Also, if the end of the combustion process is progressively delayed by retarding the spark timing, the peak cylinder pressure occurs later in expansion stroke and the peak is smaller. So the work transfer from the cylinder gases to the piston is reduced. When the magnitudes of these two opposing trends just offset each other, the maximum brake torque (MBT) is produced. This is also the point where the optimum timing occurs. Also at this point, the maximum brake power and minimum brake specific fuel consumption is obtained. Any advanced or retarded timing from this optimum point will produce a lower torque.
Figura 3.10: Three different pressure traces resulting from three different spark advances. The optimal spark advance is close to SA2
36
C APITOLO 3. S IMULINK M ODEL However the optimum spark timing depends on the rate of the flame de-
velopment and propagation and the length of the flame travel path across the combustion chamber. In addition, MBT timing depends on speed where the spark must be advanced whenever speed increases in order to maintain optimum timing due to the increasing combustion process duration in crank angle degrees. Also, optimum spark timing depends on load; as the load and intake manifold pressure are decreased, the spark timing must be further advanced to maintain optimum engine performance.
3.6 Turbo Control Two additional important control loops are used in turbocharged engines, the first is the surge control where the goal is to avoid surge and the second is the charge control that is achieved using a wastegate. Surge control will not be investigated here, but this thesis will focus on the wastegate control.
3.6.1 Wastegate Control The wastegate is primarily used to control the boost pressure, i.e. the pressure after the compressor. It is tuned to give the desired torque curve. As previously mentioned the wastegate controller is situated in the Time Based section of the ECM. It presents an activation block, which let the wastegate controller be active only if a certain boost pressure is reached, otherwise the wastegate is kept closed. When this threshold is overcome, then the controler is activated. A PI plus a feedforward (FF) action is implemented. The FF action is basically a p_im_Req p_bef_Th
PI +
N m_air
u_wg
+ FF
Figura 3.11: The WG controller is realized with a PI plus a feedforward (FF) action. look up table based on engine speed and air mass flow, which gives the steady state values for the wastegate. The PI acts so that the difference between the pressure before throttle and the requested intake manifold pressure is equal to a desired constant value.
3.7. S YSTEM M ODIFICATIONS
37
The basic operating principle is to open the wastegate when the pressure after the compressor goes over a certain limit. This basic functionality can be achieved using mechanical designs. However the performance can be better matched to the engine and fuel if the wastegate could be opened whenever is needed. A problem with a conventional mechanical design of the wastegate controller is that the wastegate opening is only determined by the wastegate spring stiffness and pressure differences. Whit an electrically controlled valve the current fuel and engine conditions can be better matched and higher efficiency can be reached without risking to destroy the engine. The boost pressure can be increased until the ECM senses knock. The wastegate is then opened so that the pressure in the system decreases and knock is reduced.
3.7 System Modifications In Chapter 2 the mean value engine model developed by Per Andersson was presented, based on [3]. The engine under consideration includes some new features, so the model needs to be slightly changed. The most significative changes concern the compressor by-pass valve (not included in the previous model), the influence of lambda and spark advance efficiencies on torque and the effect of spark advance on temperature and the volumetric efficiency. The new model was developed by Andreas Jerhammar at GM PowerTrain (Sweden).
3.7.1 Bypass Valve A compressor bypass valve (CBV), also known as a compressor relief valve, is a vacuum-actuated valve designed to release pressure in the intake system of a turbocharged car when the throttle is lifted or closed. This air pressure is re-circulated back into the non-pressurized end of the intake (before the turbo). Basically the bypass valve has the same function as the wastegate, it avoids surge for the compressor while the wastegate prevents the turbine from overrunning.
3.7.2 Lambda and SA Efficiency In the new model the efficiencies of λ and SA (ηSA and ηλ ) have been added. They have an impact on the torque, so when calculating the BMEP we need to
38
C APITOLO 3. S IMULINK M ODEL
take into account the efficiencies. So equation (2.28) is modified as follows: BM EP = IM EP · ηSA · ηλ − P M EP − F M EP
(3.2)
Lambda Efficiency 1.4
1.2
Efficiency
1
0.8
0.6
0.4
0.2
0
0.8
1
1.2 Lambda
1.4
1.6
1.8
2
Figura 3.12: Lambda Efficiency As can be seen from the Plot 3.12, ηλ has its maximum value at (λ ≈ 0.9), so maximum torque and power is achieved when the mixture is slightly rich. This effect can be utilized to increase the torque at full load; when the air flow has reached its limit the torque can be increased slightly by adding more fuel.
SA Efficiency The spark advance (SA) is used to position the combustion in relation to the crank shaft rotation and has a direct influence on the engine efficiency and the generated torque. In order to get the maximum power the spark should occur at the MBT point, so that SA efficiency gives one; for all other values ηSA is lower than one (see fig. 3.13). An early SA results in an early pressure build-up and also a lower pressure during the later part of the expansion stroke. A too early build-up that occurs before TDC counteracts the piston motion and lowers the output power. Furthermore it has a lower pressure during the expansion phase which results in a lower output power. The lower pressure values for the cycles with the earlier
3.7. S YSTEM M ODIFICATIONS
39 Spark Advance Efficiency ¬
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 −40
−35
−30
−25
−20
−15
−10
−5
0
[deg]
Figura 3.13: Spark Advance Efficiency ignition timing are due to the conversion to work of the internal energy coming from the combustion. Late SA results in a later pressure build-up and a higher pressure during the expansion stroke. If the SA comes too late than the gain for higher pressure during the later part of the expansion stroke can not compensate for the losses in the early part of expansion stroke. Figures 3.14-3.16 show the comparison between the model including or not the efficiencies for Lambda and SA. The thin line refers to the model with efficiencies, while the thick line refers to the model without efficiencies. It can be seen that, as explained above, ηλ and ηSA influence the engine torque.
3.7.3 Temperature Correction Map The outgoing temperature from the engine will increase the efficiency and torque from the turbine, so a temperature correction table as been added, depending on spark advance and air mass (see fig.3.17).
3.7.4 Volumetric Efficiency The new volumetric efficiency has been calibrated experimentally and is calculated by means of a look up table (see Sig.3.18), which takes as inputs pim and
40
C APITOLO 3. S IMULINK M ODEL
400
30 friction torque
grass torque
300 200 100 0
0
5
10
10
24 22 5
10
5
10
200
5 0 −5
26
20 0 with efficiency without efficienc y 300
net torque
pumping torque
15
28
100 0
0
5
−100
10
0
Figura 3.14: Thin line: model with efficiencies, thick line: model without efficiencies. 5
T exhaust M
1500
2
1.5
1
1.3 P exhaustsyste m
x 10
0 x 10
5 5
1.2
1.1
1
0
5
1000
500
0 10 0 with efficiency without efficienc y 1500 T exhaustsyste m
P exhaust M
2.5
10
5
10
5
10
1000
500
0
0
Figura 3.15: Thin line: model with efficiencies, thick line: model without efficiencies.
41
1000 0
0
5
10
0.95
M fuel kg/comb
0.9 4
0
5
x 10
10
0
5
5
10
5
10
5
10
20 0
0 x 10
−4
1 0
10
0
40
2
0
with efficiency without efficiency
0.5
−4
2 0
1
Area WG
Lambda
1
PHi final advance
Throttle
2000
Phi offset normal
3.7. S YSTEM M ODIFICATIONS
0
Figura 3.16: Thin line: model with efficiencies, thick line: model without efficiencies.
¬ 30
Tem 600
¬ 20 ¬ 15 ¬ 10 ¬ 6 ¬ 4 ¬ 2 ¬ 0 ¬ −4 ¬ −8
400 200 0 −200 30 20
SA
10 0 −10
0
200
400
600
800
mair
Figura 3.17: Correction map for the exhaust temperature.
1000
42
C APITOLO 3. S IMULINK M ODEL
N.
volumetric efficiency
¬ 5900 ¬ 4900 ¬ 3100 ¬ 5400 ¬ 3900 ¬¬ 2500 2100 ¬ ¬1700 1500 ¬¬1000 800
N pim
Figura 3.18: Volumetric efficiency. Look up table.
3.7.5 WG Pressure valve Today the WG is actuated by a simple pressure valve (see Sec. 6.3.1) which can be open only if a certain pressure over it is reached and is represented by a block in the Simulink model. At the beginning one parameter inside the block (Dynamic-Force) was set to 200, but the torque behavior was very strange, so it was changed to 0. The comparison of the wastegate signal using DynamicForce equal to 200 or 0 is shown in Fig.3.20, where also the response of the system without valve model is plotted. It can be seen that only when the WG valve model is removed, the signal before and after the valve is the same. Instead, when considering the valve model, the signal that the controller thinks to manipulate is not the same that goes into the system, but is modified by the valve model (a schematics is shown in Fig.3.19). Consequently, also net and pumping torque are different when considering or not the valve and when using different values for the parameter Dynamic-Force(Fig.3.21). Now we assume to substitute this valve with an electronic one, which can
Aeff WG
Valve Model
Areal WG
Figura 3.19: The signal entering and going out from the valve model are different.
3.7. S YSTEM M ODIFICATIONS
A eff WG
x 10
43
4
Dyn force 0 Dyn forse 200 without valve model 1
0
4x 10
−4
4.5
5
5.5
6
6.5
7
7.5
8
4.5
5
5.5
6
6.5
7
7.5
8
A real WG
2 1 0 −1
4
Figura 3.20: Top: wastegate position before the valve model. wastegate position after the valve model.
Bottom:
400
net torque
300 200 100
dyn force 0 dyn force 200 without valve model
0 −100
4
4.5
5
5.5
6
6.5
7
7.5
8
4
4.5
5
5.5
6
6.5
7
7.5
8
pumping torque
15
10
5
0
Figura 3.21: Top: net torque. Bottom: pumping torque. The figure shows how the responses are different when changing the value of the parameter Dynamic-Force.
44
C APITOLO 3. S IMULINK M ODEL
be open and closed whenever is needed. So the simulations will be performed removing the block representing the pressure valve in the Simulink model.
3.8 Changes in the ECM Since the system has been modified, also the ECM must be modified in order to avoid mismatches between the two models. So Lambda and SA efficiencies have been added into the ECM when calculating the predicted torque, which will be used to calculate the requested fuel and requested air, as described in Section 3.5.
3.9 Conclusions The Simulink implementation of the model is discussed in this Chapter. The model describes a turbocharged SAAB 9-3 L850 2.0T, and was developed at GM Power Train (Sweden). Some new features were added to the model, so their meaning and their implementation is presented in the Chapter.
Capitolo 4
Validation of the NonLinear Model This chapter discusses the validation of the nonlinear model, which has been realized by comparing the data recorded during a driving test on the car, and the results of simulations in Simulink. The driving test was performed on a SAAB 9-3 L850 2.0T, equipped with a turbocharger, at GM PowerTrain in ¨ Sodert¨ alje (Sweden).
4.1 Experiment setup To validate the nonlinear engine model a test on the car has been performed. The idea is to drive the car in the street equipped with many sensors and than collect some data. We have to collect both inputs, like driver pedal position, and outputs, like for example Tim , pim and pic . Then we give the same inputs to our model and we check if the outputs are more and less the same. We have been following the steps below: 1. Decide which signals to record 2. Set the car for a driving test 3. Use Control desk to set all the signals that we want to record 4. Run the car and save the data 5. Analyze off -line the collected data 6. Compare them with the model 45
46
C APITOLO 4. VALIDATION OF THE N ON L INEAR M ODEL
1. Recorded signals To be able to validate the model, in addition to the signals coming from the sensors, all the inputs and outputs to and from the engine need to be recorded so that it will be possible to simulate the same testing conditions in Simulink ambient. So the following sets of signals have been recorded: • Inputs for the engine: – Throttle Area – N – Lambda – Spark Advance – uwg – Bypass valve • Inputs from the driver: – Pedal Position (obs. the gear is not required since we have N) • Inputs from the ECU: – Torque Request – Air/Mass Request [mg/comb] – Fuel Mass Flow [Kg/s] • Outputs: – Predicted Torque – Vehicle speed 2. Car setting The test was performed on a turbocharged SAAB 9-3 2.0T. All the states have been measured, except for the turbine speed, for which there was no sensor available. So there were 6 pressure sensors and 6 temperature sensors, and of course all the inputs (i.e. throttle position, Lambda, Fuel, Spark advance, wastegate position, engine speed). Especially the temperature sensors that we use don’t have a really high accuracy, about 5 degrees , and they are quite slow so we expect to see some difference in their value in compare with the model.
4.1. E XPERIMENT SETUP
47
Software & Hardware. To record all the required signals from the sensors, two very powerful and flexible units, called M icroAutoBox and RapidP roBox, replace the ECU usually used in the car. M icroAutoBox is a real-time system for performing fast function prototyping from scratch. It operates without user intervention, just like an ECU. The RapidP ro hardware works as an extension to dSPACE prototyping systems . It has a compact and robust mechanical design, it is ideally suited for in-vehicle use, and can also be used on test benches and in laboratories. Application programs are stored in nonvolatile memory, allowing M icroAutoBox to start up autonomously after power-up. A PC or notebook can be connected temporarily to the ECU for program download and data analysis. The positive
Figura 4.1: Schematic picture of measurement setup. A PC or notebook can be temporarily connected to the ECU for program download and data analysis. aspect to use this configuration is that we can design all our controllers in a normal Matlab/ Simulink environment and then directly implement them into the car. Real-Time Workshop and Stateflow Coder automatically generate C code from Simulink block diagrams and Stateflow systems. Together with dSPACE’s Real-Time Interface, these tools provide a seamless transition from your block diagram to dSPACE’s real-time hardware. Once that all the sensors have been connected, we have been using a software to visualize and analyze all the data coming from the car during the test. 3. Use Control desk to set all the signals that we want to record The CalDesk software is the heart of the dSPACE calibration system, with a graphical user interface for handling measurement, calibration, and diagnostic tasks (see fig. 4.2). Apart from ECU calibration, CalDesk is also designed for rapid control prototyping, data acquisition, and data analysis tasks. Interfaces to dSPACE prototyping systems, measurement modules, and vehicle control
48
C APITOLO 4. VALIDATION OF THE N ON L INEAR M ODEL
system are provided. Several devices and interfaces can be accessed in parallel. The software can directly be installed in a normal Laptop that can be connected
Figura 4.2: CalDesk user interface. While recording the data, this interface gives the possibility to visualize the desired signals and so check their behavior in real time. to the Dspace hardware installed in the car. The frontpage of the software can be set so that meanwhile the car runs, you can easily have a look of all the variables that you are interested in and then check if everything is going well and in the same time record all the data in the computer. 4. Running the car and saving data Since we have to use the data to validate the engine model, we tried to reproduce, when collecting data, the same scenarios that we simulate with the Simulink model. The same assumption adopted for the simulations in Simulink are then made for the test on the car. So the gear is fixed and the engine speed is constant. According with this, the following simulations have been performed on the car: • Fixed engine speed at 1500rmp, fixed gear, acceleration • Fixed engine speed at 3000rmp, fixed gear, acceleration • Fixed first gear, acceleration
4.2. D ATA PROCESSING
49
• Fixed second gear, acceleration • Fixed third gear, acceleration • General driving
4.2 Data processing Control desk gives the possibility to record directly the data in a Matlab format and so transfer them directly into Matlab space to be analyzed. The problem is that the structure coming from Control space make is not exactly easy to use. So a Script in Matlab (by R. Backman) has been used to convert the data in a normal Matlab format. To use them as input for the Simulik model, one more step is needed: to create a Structure with time for all the inputs and states so that has been possible to use the block From workspace, as inputs for the model. Moreover, we could not use directly the signals recorded from the car, but some units conversion were needed to adapt them to the inputs required by the model.
4.3 Validation All the data collected in the driving tests have been used to validate the model that we are using for control design. A Simulink model has been created trying to isolate just the engine from all the big and complex model that describes also the control unit and the body dynamics of the car. In this way is possible to give as inputs to the engine the same inputs that the real engine received during the test and then compare the results. Fixed first gear, acceleration. The acceleration phase is considered, as can be seen from Fig.4.3, showing the acceleration pedal from the driver (up) and the car speed [Km/h] (down). Figures 4.4 - 4.5 show the inputs for the engine: air fuel mass, lambda, throttle, spark advance, wastegate area and signals calculated in the ECM: requested air mass, engine losses, predicted torque. Figure 4.6 shows the comparison between the recorded data (thin line) and the signals from the simulation of the model (thick line). From the left bottom corner: pim , pcomp , pic , Tim . It can be seen that the sensors are not able to
50
C APITOLO 4. VALIDATION OF THE N ON L INEAR M ODEL
Pedal from ca r
150
100
50
0
0
5
10
15
20
0
5
10
15
20
speed from ca r
120 100 80 60 40 20
500 0
0
5
10
15
20
1 0.5
M fuel kg/s
1
0 x 10
5
10
15
20
0
0 −1
0
5
10
15
20
0
5
10
15
20
0
5
10
15
20
40 20 0
100
0.5 0
1
−4
Area WG
Lambda
1.5
PHi final advance
Throttle
1000
Phi offset normal
Figura 4.3: Fixed first gear scenario. Acceleration pedal from the driver (up) and car speed [Km/h] (down).
5
10
15
20
50 0
Figura 4.4: Inputs for the engine.
51
VeETQC M EngLoss ECM car
4.3. VALIDATION
1000
500
VeMAFR m AirPerCylAirMeter
0
0
5
10
15
20
1500
60 50 40 30 20 10
0
5
10
15
20
0
5
10
15
20
300 VeETQC M Pred ECM ca r
m AirReq ECM car
1500
1000
500
0
0
5
10
15
20
200 100 0 −100 −200
Figura 4.5: Signals calculated in the ECM
5
4 P before thro t
3 2 1 0
3
P intake M
x 10
0 x 10
5
10
15
2 1
0
5
10
15
20
0
5
10
15
20
400
1
0
5
5
2
0
x 10
3
0
20
T intake M
P after compresso r
4
5
10
15
20
350
300
250
Figura 4.6: Fixed first gear, acceleration.Thin line: recorded data. Thick line: signals from the model.
52
C APITOLO 4. VALIDATION OF THE N ON L INEAR M ODEL
follow the system dynamics when it is fast, but generally the the results are satisfactory. Analogous considerations hold for the plots related to the following simulations.
Fixed engine speed at 1500rpm, fixed gear, acceleration. Fig.4.7 show the results for the simulation with fixed engine speed at 1500rpm and fixed gear. Again the recorded data (thin line) are compared with the signals from the simulation of the model (thick line). Left bottom corner: pressure in the intake manifold, pressure after compressor, pressure before throttle, Temperature in the intake manifold.
5
1.1 P before thro t
x 10
1.05
1
0.95
P intake M
15
0 x 10
5
10
15
5
1.06 1.04 1.02 0
5
10
15
20
0
5
10
15
20
4
300 290
10
5
0
x 10
1.08
1
20
T intake M
P after compresso r
1.1
0
5
10
15
20
280 270 260
Figura 4.7: Fixed engine speed at 1500rpm and fixed gear, acceleration. Thin line: recorded data. Thick line: signals from the model.
Fixed engine speed at 3000rpm, fixed gear, acceleration. Figure 4.8 refers to simulation with fixed engine speed at 3000 rpm and fixed gear. Thin line represents the recorded data and thick line the signals from the model. From the left bottom corner: pressure in the intake manifold, pressure after compressor, pressure before throttle, Temperature in the intake manifold.
4.4. C ONCLUSIONS
5
1.6 P before thro t
1.4 1.2 1 0.8
15
P intake M
x 10
0 x 10
5
10
15
5
model car
1.2
0
5
10
15
20
0
5
10
15
20
4
300 290
10
5
0
x 10
1.4
1
20
T intake M
P after compresso r
1.6
53
0
5
10
15
20
280 270 260
Figura 4.8: Fixed engine speed at 3000rpm, fixed gear, acceleration. Thin line: recorded data. Thick line: signals from the model.
4.4 Conclusions A test to validate the nonlinear model is described in this Chapter. Plots showed that the nonlinear model describes the true nonlinear system with a good level of accuracy. So it will be linearized in the next chapter and the resulting linearized model will be used for control design.
Capitolo 5
Analysis of linearized model Since the model is highly nonlinear, it has been linearized around 45 operating points. Control design requires linear models with good accuracy, so this chapter focuses on the linearization process and analysis of the resulting linearized model, which has been validated through a comparison with the nonlinear one.
5.1 Linearized Model An important observation is that several state equations have dependance on both intake and exhaust conditions. A consequence of the couplings is that it is not sufficient to only model the intake side on TC SI-engines, hence the model includes the exhaust side and turbocharger speed dynamics. ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
p˙af T˙af pcomp ˙ ˙ Tcomp p˙ic T˙ic pim ˙ ˙ Tim pem ˙ ˙ Tem p˙t T˙t ωTC ˙
⎤
⎡
⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥=⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎦ ⎣
fpaf (paf , Taf , pcomp , ωTC , pamb , Tamb )
⎤
⎥ ⎥ ⎥ ⎥ fpcomp (paf , Taf , pcomp , Tcomp , pic , ωTC ) ⎥ ⎥ ⎥ fTcomp (paf , Taf , pcomp , Tcomp , pic , ωTC ) ⎥ ⎥ fpic (pcomp , Tcomp , pic , Tic , pim , α) ⎥ ⎥ ⎥ fTic (pcomp , Tcomp , pic , Tic , pim , α) ⎥ ⎥ ⎥ fpim (pic , Tic , pim , Tim , pem , N, α, λ) ⎥ ⎥ fTim (pic , Tic , pim , Tim , pem , N, α, λ) ⎥ ⎥ fpem (pim , Tim , pem , Tem , pem , N, λ, uwg , Tamb ) ⎥ ⎥ fTem (pim , Tim , pem , Tem , pem , N, λ, uwg , Tamb ) ⎥ ⎥ ⎥ ⎥ fpt (pem , Tem , pt , Tt , ωTC , uwg , pamb ) ⎥ ⎥ fTt (pem , Tem , pt , Tt , ωTC , uwg , pamb ) ⎦ fTaf (paf , Taf , pcomp , ωTC , pamb , Tamb )
fωTC (paf , Taf , pcomp , Tcomp , pem , Tem , pt , ωTC ) 55
(5.1)
56
C APITOLO 5. A NALYSIS OF LINEARIZED MODEL
Starting from the non-linear process model x˙ = f (x, u), given by eq.(5.1), a linearized model of the system has been derived, around 45 operating points.
5.1.1 Model linearization ¨ The linearized model has been developed at General Motors Power Train, (Sodert¨alje), based on [3]. The operating points have been chosen in such a way that they reflect the non-linear dynamics of the model and describe the input u0 of the model necessary to determine the stationary point x0 . As the model consists of control volumes, whose dynamics depend on the air-mass flows; it is natural to choose the linearization points across the range of air-mass flow through the engine. The air-mass flow is basically determined by multiplying the engine speed N by the intake manifold pressure pim . An excellent candidate to describe the operating points is therefore an engine map as it is commonly measured for different engine speeds and different manifold pressures (see Fig.5.1).
16
x 10
4
14
12
p_im
10
8
6
4
2
0 1000
1500
2000
2500
3000 N
3500
4000
4500
5000
Figura 5.1: Engine map. For a fixed engine speed N, the operating points only depend on the intake manifold pressire pim . In the hypothesis of constant Tim , for every stationary point (x0 , u0 ), the linearized model is:
x˙ = Ax(t) + Bu(t) y(t) = Cx(t)
(5.2)
5.1. L INEARIZED M ODEL
57
where the states and the inputs are given respectively by x and u vectors: ⎡
⎤
paf
⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ x=⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
Taf pcomp Tcomp pic Tic pim pem Tem pt Tt
⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ u=⎢ ⎢ ⎢ ⎢ ⎣
α N wg λ pamb
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
(5.3)
Tamb
ωTC and the matrices are given by A = fx (x0 , u0 )
B = fu (x0 , u0 )
C = gx (x0 , u0 )
D = gu (x0 , u0 )
(5.4)
Above the notation fx (x0 , u0 ) refers to the Jacobian of f (x, u) with respect to the states x evaluated in (x0 , u0 ). So at the end there are 45 systems like (5.2), with 12 states. Actually the ambient pressure and temperature are uncontrollable inputs and can be seen as disturbances. In fact pamb can be considered as constant and Tamb varies very slowly compared to the other variables, so can be treated as constant as well. Then the B matrix can be split into two parts and the system can be rewritten as
x˙ = Ax(t) + Bu(t) + Bd ud (t)
(5.5)
y(t) = Cx(t)
where
⎡
α
⎤
⎥ ⎢ ⎢ N ⎥ ⎥ u=⎢ ⎢ wg ⎥ ⎣ ⎦ λ
ud =
pamb
Tamb
From now on disturbances term will not be considered and the term Bd will be neglected.
58
C APITOLO 5. A NALYSIS OF LINEARIZED MODEL The aim of this project is to improve the engine torque response, so a torque-
based control strategy will be used, based on the error between the actual torque coming from the engine and a given reference torque signal. So a natural choice for the system output is the torque itself. But another good variable to judge the system performances is the fuel consumption, since the emissions have to be monitored and cannot exceed the limits imposed by the legislation. With the hypothesis of constant temperature in the intake manifold, both the torque and the fuel mass flow can be expressed as linearly dependent on states, according to Sections 2.10 and 2.8: Tim = const ⇒
k1 x7 (t) + k2 yf uel = yT q = k3 x7 (t) + k4 x8 (t) + k5
(5.6)
and the C matrix can be set: C=
000000 k1 0 0 0 0 0
0 0 0 0 0 0 k3 k4 0 0 0 0
(5.7)
The D matrix is a (2 × 12) zero matrix. Depending on control strategy fuel consumption can be neglected and the torque is then the only output of the system. So in the following sections and in the next chapters two different cases will be considered: 1. M ISO system ⇒
x˙ = Ax(t) + Bu(t) yT q = k3 x7 (t) + k4 x8 (t) + k5
2. M IM O system ⇒ ⎧ ⎪ ⎪ ⎨ x˙ = Ax(t) + Bu(t) yf uel = k1 x7 (t) + k2 ⎪ ⎪ ⎩ y = k x (t) + k x (t) + k Tq 3 7 4 8 5
5.2 Validation of the linearized model The linearized model was developed by GM Power Train, based on [3]. Now the nonlinear model was a bit changed, as explained in Chapter 4, so here a validation is carried out, to check if the linearized model still represents the nonlinear behavior. First, the linearized model is validate for stationary conditions
5.2. VALIDATION OF THE LINEARIZED MODEL
59
and then step response experiments are used for the dynamics. A comparison between the responses of the nonlinear system and the linearized model shows that the behavior of the linearized model is similar to the nonlinear one. Consider as example the operating point number 15.
1. Static simulation. Figures 5.2 - 5.3 show a static simulation with all the inputs constant and set to their steady state values. After the initial transient, during which the nonlinear system has to reach the steady state,
2
128.5
1.5 Lambda
129
128 127.5
1 0.5
127
0
126.5
−0.5
0
5
10
1
2001
0.5
2000.5 rpm
Area WG
Throttle
the linearized model well represents the nonlinear system.
0 −0.5 −1
0
5
10
0
5
10
2000 1999.5
0
5
10
1999
Figura 5.2: Static simulation. All the inputs are constant and equal to the steady state value. Operating point 15 is considered.
2. Step in Throttle and in wastegate. First a positive step (acceleration) is given to the throttle (at t=2.5sec) with the wastegate closed, then (at t=8sec) a step is given to the wastegate too and it is opened. All the other inputs are constant and equal to their steady state values (Fig.5.4). Operating point 15 is considered. Solid line: linearized model. Dashed line: nonlinear system. The pressure after compressor increases when opening the throttle, i.e. accelerating, and decreases when opening the WG. The same is valid for the temperature after compressor (Fig.5.5).
C APITOLO 5. A NALYSIS OF LINEARIZED MODEL
T before thro t
P before thro t
60
x 10
1.4
5
1.2 1
0
2
4
6
8
10
2
4
6
8
10
2
4
6
8
10
320 300 280
0 x 10
P intake M
1.5
5
1 0.5
0
250
2
200
1
Lambda
Throttle
Figura 5.3: Linearized (solid line). Non Linear model (dashed line). The initial discrepancy is due to different initial condition for linear and nonlinear models. After the transient the responses are very similar.
150
100
x 10
5
−1
10
5
10
0
5
10
2001 2000.5
4
2
0
0
−5
rpm
Area WG
6
0
0
2000 1999.5
0
5
10
1999
Figura 5.4: Step in Throttle and in wastegate. Inputs. At t=2.5sec a positive step is given to the throttle, and at t=8sec the WG is opened.
5.2. VALIDATION OF THE LINEARIZED MODEL
5
320 T before compressor
x 10
1.005
1
0.995
P after compresso r
1.8
0 x 10
5
300
0
5
10
0
5
10
5
400
1.6 1.4 1.2 1
310
290
10
T after compresso r
P before compressor
1.01
61
0
5
10
380 360 340 320 300
T before thro t
P before thro t
Figura 5.5: Step in Throttle and in wastegate. States. Linearized (solid line). Non Linear model (dashed line). The initial discrepancy is due to different initial condition for the two models.
2
x 10
5
1.5 1
0
2
4
6
8
10
2
4
6
8
10
2
4
6
8
10
350 300 250
P intake M
2
0 x 10
5
1 0
0
Figura 5.6: Step in Throttle and in wastegate. States. Linearized (solid line). Non Linear model (dashed line). The initial discrepancy is due to different initial condition for the two models.
62
C APITOLO 5. A NALYSIS OF LINEARIZED MODEL
x 10
1200
1.4
1.2
1
0
5
x 10
800 600
0
5
10
0
5
10
5
1500
1.06 1.04 1.02 1
1000
400
10
T exhaustsyste m
1.08 P exhaustsyste m
5
T exhaust M
P exhaust M
1.6
0
5
1000
500
0
10
Figura 5.7: Step in Throttle and in wastegate. States. Linearized (solid line). Non Linear model (dashed line). The initial discrepancy is due to different initial condition for the two models.
5.3 Linear Analysis Depending on the number of outputs chosen for the system, the size of the transfer matrix will change consequently. Since the goal is to improve the torque response, it is natural to pick the torque as output of the system, then the model has four inputs and one output (MISO case) and the transfer matrix is a one row vector with four elements: GM ISO = [Gα GN Gwg Gλ ]
(5.8)
Since it is not possible to exceed the limits imposed by the legislation for the gas emissions, an alternative could be considering also fuel consumption. In this case (MIMO case) the system becomes: GM IM O =
Gf uel GTq
=
Gα−f uel
GN −f uel
Gwg−f uel
Gλ−f uel
Gα−Tq
GN −Tq
Gwg−Tq
Gλ−Tq
Since the system is linearized around 45 operating points, there are 45 different transfer matrix G(s), so depending on the operating point also poles and zeros are different. Looking at the engine map in Fig.5.1 it is shown that
5.3. L INEAR A NALYSIS
63
for a constant engine speed N, the operating points vary with the only pim . So, for each fixed value of N, the number of corresponding operating points is reduced, as summarized in the table below: N [rpm]
OP
1200
1÷4
1500
5 ÷ 11
2000
12 ÷ 18
2600
19 ÷ 25
3000
26 ÷ 32
3500
33 ÷ 39
4700
40 ÷ 45
To simplify the analysis only some engine speeds will be considered for the simulations, and consequently only the corresponding operating points (op): • N=1500 rpm : op 5 to 11 • N=2000 rpm : op 12 to 18 • N=3000 rpm : op 26 to 32
5.3.1 SISO Analysis We focus now on the transfer function between WG and torque, Gwg . All the transfer functions present stable poles and one zero in the right half plane. As shown in Fig.5.8, fixing the engine speed (N=constant) and moving from one operating point to the next increasing the pim , the non-minimum phase zero moves to higher frequencies. Take as example operating point 12. The transfer function from WG to torque is given by: Gwg =
201.0408(s + 1413)(s + 719.2)(s + 330.3)(s + 102.5)(s + 14.89) ··· (s + 1413)(s + 719.2)(s + 505.6)(s + 234)(s + 103.4)(s + 27.49)
(s + 9.213)(s − 5.541)(s + 1.454)(s + 1.042)(s + 0.8799)(s + 0.7336) (s + 9.184)(s + 1.453)(s + 0.9235)(s + 0.8737)(s + 0.7334)(s + 0.6406) All the poles are stables, while there is one zero in the right half plane, so the system is non-minimum phase, as can be seen from Fig.5.9, showing the inverse response of the system when a step is applied to the wastegate. The transfer function Gwg has 12 stable poles and one zero in the RHP. From control theory is known that a positive zero imposes limitations on the closed loop
64
C APITOLO 5. A NALYSIS OF LINEARIZED MODEL
root locus WG to Tq
0.4
0.2
13
12
14
15
16
17
18
0.1
0
−0.1
−0.2 0
5
10
15 20 Real Axis
25
30
35
Figura 5.8: Positive zeros. Operating points 12 to 18.
Step Response 0.5 G_wg_Tq_1 op12 0
−0.5 Amplitude
Imaginary Axis
0.3
−1
−1.5
−2
−2.5
−3 −1
0
1
2
3
4 Time (sec)
5
6
Figura 5.9: Inverse response.
7
8
9
5.3. L INEAR A NALYSIS
65
system bandwidth, which cannot be higher than half the frequency of the RHP zero [6]. It is not possible to group poles and zeros based on N or pim , but varying the operating points poles and zeros move along all the real axis. Anyway the RHP zero stays approximately in the range 5 − 30rad/s. So the closed loop bandwidth should be lower than 2.5 − 15rad/s, i.e. approximately 0.5 − 5Hz. A desirable bandwidth would be around 15Hz, so a solution to overcome the RHP zero limitation is needed.
5.3.2 Controllability and observability The concepts of controllability and observability describe how state vectors in the state space are influenced by inputs and how they show up in the output. They are also important for the control synthesis with observe and state feedback. Controllability The state x∗ is said to be controllable if there is an input that in finite time gives the state x∗ from the initial state x(0)=0 [15]. The system is said to be controllable if all states are controllable. Criterion: the system 5.2 is controllable if and only if the controllability matrix C(A, B) = [B AB A2 B . . . An−1 B]
(5.9)
has full rank (n is the order of the system). To check the controllability the Matlab function ctrbf has been used. The system is controllable for all the 45 operating points. Observability The state x∗ = 0 is said to be unobservable if, when u(t)=0, t ≥ 0 and x(0) = x∗ , the output is y(t) ≡ 0, t ≥ 0 [15]. The system is said to be observable if it lacks unobservable states. Criterion: the system 5.2 is observable if and only if the observability matrix O(A, C) = [B AB A2 B . . . An−1 B]T
(5.10)
has full rank. The function obsvf was used to check the observability in Matlab: the system is observable for all the operating points.
66
C APITOLO 5. A NALYSIS OF LINEARIZED MODEL
5.4 Open Loop system behavior The idea is to investigate the open loop system behavior, in order to understand what we should expect from the control action.
5.4.1 Step in the WG A positive step is given to the WG, and the torque response of the open loop system is compared for different operating points. Fig.5.10 shows the torque response for the linearized system, for the operating points from 26 to 30. The same simulation is performed also on the nonlinear system (see Fig. 5.11). It can be seen that, increasing the operating point, the effect of the WG on the torque increases, for both linear and nonlinear system. 20
0
−20
−40
−60
Increasing operating point
−80
−100
−120
4
4.5
5
5.5
6
6.5
7
Figura 5.10: Positive step in WG. Linearized system. Operating point 26-30. Increasing the operating point the WG influence on the torque increases.
5.4.2 Pulse in the WG with constant throttle Let now investigate what happen to states and output when giving a pulse to the WG. The experiment is carried on both the linearized and the nonlinear system. We fully open the WG and then we close it when the benefit the we get in the torque response is finished. Figures 5.12 - 5.13 show the comparison between the linearized system response when the WG is fully closed (thin line) and when a pulse is given to the WG (thick line). Operating point 13 is considered. Figures 5.14-5.15 refer to the nonlinear system. It can be seen that there are two different dynamics for the torque response when opening and closing the WG. When we open the WG we are in the operating point, so the derivatives of all the states are zero, while when we close the WG, we have the same
5.4. O PEN L OOP SYSTEM BEHAVIOR
67
20
0
−20
−40
Increasing operating point
−60
−80
−100
−120
4
4.5
5
5.5
6
6.5
7
Figura 5.11: Positive step in WG. Nonlinear system. Operating point 26-30. Increasing the operating point the WG influence on the torque increases.
72
Torque
71 70 69 68 4.5
5
5.5
6
6.5
7
7.5
8
8.5
9
5
5.5
6
6.5
7
7.5
8
8.5
9
1
WG
0.8 0.6 0.4 0.2 0 4.5
Figura 5.12: Torque response to a pulse in the WG. Linearized model.
C APITOLO 5. A NALYSIS OF LINEARIZED MODEL
5.9
x 10
4
5.8 5.7 4.5 1.1
x 10
5
5.5
6
6.5
7
7.5
8
8.5
9
5
WG pulse WG closed
1 0.9 4.5
pumping losse s
P exaustmanifold
P intake manifold
68
5
5.5
6
6.5
7
7.5
8
8.5
9
5
5.5
6
6.5
7
7.5
8
8.5
9
8 7 6 4.5
Figura 5.13: Pressures behavior for the linearized model. The input is a pulse in the WG.
74
Torque
73.5 73 72.5 72 9.5
WG
2
x 10
10
10.5
11
11.5
12
12.5
13
10
10.5
11
11.5
12
12.5
13
−4
1
0 9.5
Figura 5.14: Torque response to a pulse in the WG. Nonlinear model.
6
x 10
69
4
5.95 5.9 9.5 1.08
x 10
10
10.5
11
11.5
12
12.5
13
5
WG closed WG pulse
1.06 1.04 9.5
pumping losse s
P exaustmanifold
P intake manifold
5.4. O PEN L OOP SYSTEM BEHAVIOR
10
10.5
11
11.5
12
12.5
13
10
10.5
11
11.5
12
12.5
13
8 7.5 7 9.5
Figura 5.15: Pressures behavior for the nonlinear model. The input is a pulse in the WG.
output condition (the torque is back to the same value then when we opened the WG), but the state derivatives are not zero anymore. Even if we are in the linear system, we do not get a symmetric behavior for the torque when giving a positive or negative step to the WG. Physically what happens is that, when we open the WG, pumping losses are reduced and then the torque increases, but at the same time also the pim decreases a lot, and than it takes a lot of time before reaching the same steady state level. Since the dynamics of the torque depends on pim , this can be the explanation for the slow torque response to the negative WG step.
5.4.3 Pulse in the WG with step in throttle Now we want to check experimentally how is the system behavior when moving at the same time throttle and WG. A step is given to the throttle, while a pulse is given to the WG, as in the previous scenario. The idea is that the system should behave in different ways depending on the conditions of the engine. Simulation on both linear and nonlinear system are performed, considering low and high load scenarios.
70
C APITOLO 5. A NALYSIS OF LINEARIZED MODEL
Low Load A step of 50mm2 in the throttle position is simulated, starting from a torque of 45Nm, at 2000rpm. Results are compared to the case with the WG totally closed. Figures 5.16 and 5.17 refer to the linear and nonlinear system response respectively.
In both cases the behavior is quite similar: there is a small imPlant Outputs 70
65
torque
60
55
50
45 0.9
0.95
1
Time1.05 (sec)
1.1
1.15
Figura 5.16: Linearized system. Torque response. Blue line: WG totally closed. Green line: pulse in the WG. provement at the beginning of the transient, but as soon as the WG is closed, the torque decreases and becomes lower than the case with WG totally closed. High Load The same simulation is performed now on the nonlinear system, with the same input features, but starting from 175Nm. Fig.5.18 shows the torque response. In this case, compared with the low load, the drop in the torque is bigger, and so the torque takes too much time before recovering the correct value.
5.5 Conclusions The linearized model, derived by Per Andersson [3], is presented in this Chapter. Since new features were added to the nonlinear model, a test to validate
5.5. C ONCLUSIONS
71
70
65
Torque
60
55
50 pulse WG closed
45
9.9
10
10.1
10.2
10.3
10.4
10.5
10.6
10.7
Figura 5.17: Nonlinear system. Torque response.
220 215 210
Torque
205 200 195 WG closed pulse WG
190 185 180 175 9.5
10
10.5
11
11.5
12
Figura 5.18: High load. Nonlinear system. Torque response.
72
C APITOLO 5. A NALYSIS OF LINEARIZED MODEL
the linearized system was performed, showing that the linearized model has a good level of accuracy. The analysis of the linearized system is then presented in the second part of the Chapter, with a discussion on the open loop system characteristics.
Capitolo 6
Optimal Wastegate Control Today, the wastegate is actuated by a pressure valve, which can be opened only in certain pressure conditions. As explained in Chapter 3, it is now controlled by a PI plus a feedforward action, which is activated when the right pressure level over it is reached. In all the other cases is closed. The aim of this thesis is to investigate if and how a more advanced control of the wastegate may quicken the torque response. This chapter presents a solution based on LQR design, enforced with integral action to guarantee disturbance rejection and zero steady state error. Moreover a solution to avoid saturation is included.
6.1 Spark-ignited engines The load in SI engines is controlled by throttling the air mass flow to the engine, which influences the pressure in the intake manifold. This method is simple and entails excellent dynamic behavior, but induces pumping losses. Especially for low loads the efficiency of the engine becomes very poor. At low load the gas exchange consumes a lot of the invested energy, whereas close to full load the pumping losses are reduced. A high potential for improving the fuel consumption comes from either reducing part-load operation or increasing the efficiency while operating at low load by reducing pumping losses. The mechanical power which an engine can produce is determined by its efficiency, the fuel burnt, and the lower heating value of the fuel. Pe = ηe · m ˙ f · qHV
(6.1)
In order to use a three-way catalytic converter for the exhaust gas aftertreatment of spark-ignited (SI) engines, the fuel has to be burned at a stoichiometric 73
74
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
air-to-fuel ratio (λ = 1). A certain power demand thus leads directly to a corresponding demand for air mass flow. m ˙ air = m ˙f·
A ·λ F stec
(6.2)
As a first approach the air mass flow can be modeled as the product of the volume flow, the density of the air in the intake manifold and a volumetric efficiency.
pim ωe m ˙ air = V˙ f · pim · ηvol = ·V · · ηvol 4π RTim
(6.3)
Combining equations 6.1-6.3 yields: Pe =
pim ωe 1 ·V · · ηvol · ηe · A · qHV 4π RTim ( F )stec · λ
(6.4)
This equation reveals the dominant parameters of the power production. The rotational speed (ωe ) is limited by dynamical forces resulting from the moving pistons and valves. The displaced volume (Vd ) directly influences the dimensions of the engine, which again is coupled to the friction losses. Pressure in the intake manifold (pim ) for naturally aspirated engines, this pressure is limited by the ambient pressure. Equation 6.4 shows that the product of Vd , pim and ωe characterizes the power output of the engine. All three parameters can be chosen within certain limits. As the displaced volume directly correlates to the friction losses, it has to be reduced for better efficiency. This demands higher pressures in the intake manifold or higher rotational speeds of the engine. As higher rotational speeds are not accepted by the consumer, the only practicable way is to increase the pressure before the engine. This approach is known as downsizing and supercharging (DSC).
6.2 Turbocharging As mentioned above downsizing and supercharging can influence the partload efficiency positively. A smaller displaced volume reduces the dimensions of the engine which results in lower friction losses. As an additional benefit, the operating temperature is reached faster due to the smaller thermal mass of the engine block. Turbocharging is one type of supercharging and includes a
6.3. WASTEGATE
75
turbine in the exhaust path, used to drive a radial compressor, which pumps air into the intake manifold. Figure 6.1 shows a simple system overview.
E
C
T
Figura 6.1: Turbocharging. The use of a turbocharger results in the following advantages and disadvantages [16]: ⊕ improved part-load efficiency, as exhaust enthalpy is used to drive the compressor ⊕ easily applicable ⊕ easily controllable (one additional actuator, but no additional sensor is necessary) ⊕ cost-efficient and robust production techniques available ⊕ no connection to the crankshaft, but a placing close to the exhaust openings of the engine block is advantageous
increased back pressure decreases full-load efficiency
low boost pressure (boost is quantifiable as the pressure above atmospheric pressure that the turbocharger is creating in the engine’s inlet manifold) for low engine speeds
delayed boost pressure rise in transient operating condition
delayed light-off of the catalytic converter due to the heat extraction from the exhaust gas through the turbine
6.3 Wastegate As mentioned in the introduction, a turbocharger can be applied to achieve the necessary boost pressure for a desired torque at the crank shaft. The concept of turbocharging provides the advantage of better fuel efficiency, but entails
76
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL load [Nm]
(a)
Original naturally aspired engine
typical operation range
speed[rpm] load [Nm]
(b)
“Downsized” --> Reduced engine displacement speed[rpm] load [Nm]
(c)
“Downsized and Supercharged” --> fuel recovery speed[rpm]
Figura 6.2: Positive effect of Downsizing and Supercharging on load. some new challenges as well. As the turbocharger-engine system is laid out for medium to high power demands, the boost pressure for low air mass flows is poor, i. e., at low engine speeds the engine only develops a low torque. A more serious problem arises from the low-pass characteristic, which is brought into the system by the inertia of the turbocharger. In order to build up boost pressure, the turbocharger has to speed up after a tip-in by the driver. First the boost pressure reaches ambient pressure very fast, but then the turbocharger has to speed up before the desired torque can be reached.
6.3.1 Transient response and turbo lag When the driver hits the accelerator, it takes a time lag before the driver feels the engine torque increasing: this time is called turbo lag and it is larger for a turbo than for a naturally aspirated engine. Looking at the intake manifold pressure, it is possible to recognize two possible dynamics (see figures 6.3 and 6.4). In the first phase the dynamics is dominated by the throttle movements dynamics, filling of the intake manifold, and emptying of the volumes around the intercooler. The second dynamics is dominated by the turbo charger speed buildup, since the mass flow through the compressor depends strongly on the turbocharger speed. Therefore the turbo lag is mainly due to the slower speed
6.3. WASTEGATE
P intake Manifold
2
x 10
77
5
1.5 1 0.5 0
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
300
net torque
200 100 0 −100
Figura 6.3: Turbo lag. Up: intake manifold pressure. Down: net torque.
P intake Manifold
2
x 10
5
1.5 1 0.5 0 4.5
5
5.5
6
6.5
7
5
5.5
6
6.5
7
300
net torque
200 100 0 −100 4.5
Figura 6.4: Turbo lag. Detail. Up: intake manifold pressure. Down: net torque.
78
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
dynamics of the turbocharger.
The wastegate in state-of-the-art turbocharged engines is always closed in order to achieve the highest possible pressure before the turbine and thus the highest possible turbocharger speed. The higher the turbocharger speed, the smaller is the turbo lag, as the torque build-up time is highly sensitive to the turbocharger inertia. The wastegate is only opened to keep the boost pressure below a certain limit, i. e., for boost pressure control. One possible way to reduce time lag is is to control the turbo so that the turbo always keeps a relatively high speed and then use the throttle to reduce the flow into the intake manifold and the manifold pressure. In this way the driveability is improved by reducing the turbo lag but the fuel consumption is increased, since the intake manifold pressure is increased. The turbo increases the intake manifold pressure and also the intake manifold temperature and with an intercooler the charger density is increased which results in higher power output from the engine. An intercooler also gives better engine efficiency, since it can give the same mass flow through the engine at a lower pressure which in its turn requires less turbine pressure and in this way reduces the pumping losses. In a spark-ignited (SI) engine an increased charge temperature results in a higher knock tendency which can be detrimental. Therefore different measures are taken to reduce the knock tendency, such as cooling the intake air, spark advance control and wastegate control.
The simplest control for a wastegate is to supply boost pressure directly from the charge air side to the wastegate actuator. A small hose can connect from the turbocharger compressor outlet to the nipple on the wastegate actuator. The wastegate will open further as the boost pressure pushes against the force of the spring in the wastegate actuator until equilibrium is obtained. A boost-valve takes as input the pressure before and after compressor and, based on a PWM signal, gives the desired pressure to the WG actuator. Then the WG actuator converts the pressure in a linear movement which actuates the WG valve to short cut the turbine. The purpose of this thesis is to investigate the possibility to add a more advanced control by integrating an electronic boost controller, i.e. substitute the pressure valve used today with an electronic valve which can be opened and closed whenever is needed.
6.3. WASTEGATE
79
T
C Boost Valve
PWM Pamb Pboost-valve WG Actuator
Figura 6.5: WG actuator. A boost-valve takes as input the pressure before and after compressor and, based on a PWM signal, gives the desired pressure to the WG actuator. Then the WG actuator converts the pressure in a linear movement which actuates the WG valve to short cut the turbine.
6.3.2 Open Loop System Characteristics Insight into system behavior is critical to developing a suitable controller simple enough for feasible implementation in an automotive system. First consider the response to throttle, whose behavior is very similar to the behavior of typical naturally aspired gasoline engines. Torque and pressures exhibit a positive steady state gain to throttle opening. This applies to boost pressure, pic , as well as intake pressure, pim , and exhaust pressure, pem , due to the natural feedback present in the system via the turbocharger. Now focus on the wastegate [4]. The DC gain from wastegate to torque is negative and, fixing engine speed, its absolute value increases with pim (see Fig.6.6). When considering transient behavior, the torque response to a change in wastegate valve lift is non-minimum phase. Wastegate movement causes a rapid change in exhaust pressure, which affects the cylinder flow via two phenomena. The first is through the formation of an adverse pressure gradient across the engine. The second is due to the effect on pcomp via boosting and is governed by the dynamics of the turbocharger. The two phenomena have opposing effects and since the slower phenomenon related to the turbocharger is dominant in steady state, cylinder flow, hence torque, exhibit a non-minimum phase behavior in response to wastegate. The transfer function Gwg has a negative dc gain, so it means that opening the WG (positive step) the torque decreases, while closing it (negative step)
80
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
0 −100 −200 −300 −400 −500 −600 −700 N=1200
−800 −900
0
N=1500
5
N=2000
10
15
N=2500
20
N=3000
25
N=3500
30
35
N=4700
40
45
Figura 6.6: DC gain from wastegate lift to torque, for all the 45 operating points. For a fixed engine speed, the DC gain is bigger (in absolute value) for higher intake manifold pressure. the torque increases. However, the inverse response due to the positive zero says that at the beginning of the step, when the WG is open the torque increases, and when the WG is closed the torque decreases. So the idea could be to open the WG for a short while during the transient, to get a higher torque, and then close it again to track torque reference value. Giving a pulse in WG, the torque increases at the beginning as expected, but then it goes down, due to the inverse response, reaching a lower steady state value and this is of course undesirable. The character of the system dynamics shows little variation with operating condition. The magnitude of the response, however, does vary significantly with engine speed and load.
6.3.3 Dealing with constraints In the nonlinear model the wastegate can vary between 0 (WG closed) and 100 (WG open), while in the linearized model the wastegate position is normalized to be between 0 and 1, where 0 corresponds to totally closed and 1 corresponds to fully open: umin = 0 ≤ uwg ≤ 1 = umax .
(6.5)
6.3. WASTEGATE
81
There are two ways of dealing with it: 1. Reduce the performance demands so that a linear controller never violates the limits. 2. Modify the design to account for the limits. Option (1) implies that either the actuator was oversized in the first place or one is unnecessarily compromising the performance. So option (2) is considered here for the LQR design (section 6.4), modifying a given linear design adding anti wind-up and saturation limiting circuite.
6.3.4 Control Problem formulation The mean value model of the turbocharged system developed in Chapter 2 has twelve dynamical states, namely air filter pressure, paf , and temperature, Taf , boost pressure, Pcomp , and temperature, Tcomp , intercooler pressure, pic , and temperature, Tic , intake manifold pressure, pim , exhaust manifold pressure, pem , and Temperature Tem , exhaust system pressure, pt , and temperature, Tt , and turbocharger speed, ωtc . The inputs to the system are throttle angle, α, engine speed N, wastegate valve lift, uwg , air to fuel ratio λ, ambient pressure pamb and temperature Tamb . The primary objective of this system is to deliver desired brake torque, Tq , determined form the driver pushing the acceleration pedal, at best fuel economy, subject to emissions constraints. Since emissions are subject to strong legislative limitations, fuel consumption will be considered as an additional output for the system. The ambient conditions (Tamb , pamb ) cannot be controlled and are therefore classified as disturbances. Although all inputs are potentially useful for increasing the agility of a vehicle, not all of them can be used. The air-to-fuel ratio cannot be chosen arbitrarily, because a catalytic converter is used for the exhaust gas after treatment, which requires a stoichiometric combustion, i. e., λ = 1 in steady state. Moreover, a constant engine speed is used, to isolate the results from gearbox and vehicle influences. So finally the control signals are throttle and wastegate. The system inputs and outputs are modeled as follows: DISTURBANCES
INPUT
OUTPUT
Tamb
Non Controllable:
Tq
pamb
N Controllable: λ α uwg
82
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
Transient performance is judged with respect to the response time, measured as the time delay from tip-in to the instant when the torque reaches a value of 90% of the maximum that is achievable at that speed. The control problem can then be faced with different strategies: 1. Considering only the wastegate as input ⇒ SISO problem 2. Considering both the control inputs (α and uwg ) ⇒ MISO control problem 3. Considering one control input (uwg ), and two outputs (Tq and m ˙ f uel ) ⇒ SIMO control problem 4. Considering two control inputs (α and uwg ), and two outputs (Tq and m ˙ f uel ) ⇒ MIMO control problem
e
C_wg
+
ECM
u_wg
N Lambda alpha
Tq
PLANT
T_amb, p_amb Figura 6.7: SISO control problem The rest of this chapter will deal with the SISO formulation.
6.4 Linear Quadratic Regulation (LQR) The question is how to open and close the wastegate in a way to maximize the torque response during the transient; an optimal control problem has thus to be solved. In optimal control one attempts to find a controller that provides the best possible performance with respect to some given measure of performance, e.g., the controller that uses the least amount of control-signal energy to take the output to the reference value.
6.5. O PTIMAL S TATE F EEDBACK
83
In general, optimality with respect to some criterion is not the only desirable property for a controller. One would also like stability of the closed-loop system, good gain and phase margins, robustness with respect to unmodeled dynamics, etc. In the following sections we study controllers that are optimal with respect to energy-like criteria. These are particularly interesting because the minimization procedure automatically produces controllers that are stable and somewhat robust. First a full state feedback architecture based on LQR design is considered [17]. Then, the system dynamics are augmented with integral of the error between the desired and measured torque to satisfy the requirement of steadystate tracking and finally an anti-saturation solution is adopted to prevent the control signal from hitting the constraints.
6.5 Optimal State Feedback For the control design a Linear Quadratic criterion as been chosen, to minimize a trade-off between the size of the control error e = y − yd and the size of the control input u [15].
x(t) ˙ = Ax(t) + Bu(t) y(t) = Cx(t)
(6.6)
Let the system from control input u to controlled output y be given by (6.6) where • x(t) ∈ Rn is the state vector; • u(t) ∈ Rp is the input; • y(t) ∈ Rm is the output. By assumption the whole state x can be measured and therefore it is available for control. The criterion to be minimized is 2 2 T J = y Q + uR = y Qy + uT Ru dt
(6.7)
for a positive definite matrix R and a positive semidefinite matrix Q. The optimal regulator then can be written in terms of the simple state feedback law u(t) = −K OP T x(t)
(6.8)
84
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
where K OP T is a m × n matrix given by K OP T = R−1 B T S
(6.9)
and S is the unique, positive semidefinite, symmetric solution to the continuous time Algebraic Riccati Equation (ARE) AT S + SA + M T QM − SBR−1 B T S = 0
(6.10)
6.5.1 Stability and robustness The state-feedback control law (6.8), results in a closed-loop system of the form x˙ = (A − BK OP T )x
(6.11)
A crucial property of LQR controller design is that this closed-loop is asymptotically stable[6], i.e. all the eigenvalues of (A − BK OP T ) have negative real part, as long as the following two conditions hold: 1. The system 6.6 is controllable.
2. The system 6.6 is observable. For an LQR-controlled system it is well known (Kalman, 1964; Safonov and Athans, 1977) that, if the weight R is chosen to be diagonal, the sensitivity function (measured at K OP T x) S = (I + K OP T (sI − A)−1 B)−1 satisfies σ ¯ (S(jω)) ≤ 1, ∀ω
(6.12)
as can be seen in Fig.6.8. From this it can be shown that the system will have a gain margin equal to infinity, and a (minimum) phase margin of 60 degrees in each plant input control channel. This means that in the LQR-controlled system u = −K OP T x, a complex perturbation diag {ki ejθi } can be introduced at the plant inputs without causing instability. Since the controlled system, from WG to torque is a single-input plant, the above shows that the Nyquist diagram of the open-loop regulator transfer function L = K OP T ((sI − A)−1 )B will always lie outside the unit circle with center -1 [Kalman ,1964],see Fig.6.9.
6.5. O PTIMAL S TATE F EEDBACK
85
S 0
Magnitude (dB)
−10 −20 −30
Increasing op
−40 −50
Phase (deg)
−60 90
60
30
0 10
−2
10
−1
10
0
1
10 10 Frequency (rad/sec)
2
10
3
10
4
10
5
Figura 6.8: Sensitivity Function S = (I + K OP T (sI − A)−1 B)−1 .
Nyquist (L) 800
600
increasing op
Imaginary Axis
400
200
0
−200
−400
−600
−800 0
100
200
300
400 Real Axis
500
600
700
800
Figura 6.9: Nyquist diagram of the loop gain L = K OP T ((sI − A)−1 )B.
86
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
6.6 LQR for non-zero set points The LQR itself does not guarantee reference tracking so, since the aim is to follow the torque reference signal, a modification is required.The formally correct way to treat the servo problem as an optimization problem, is to include a model for the frequency contents of the reference signal r in the state space model [15]. This is done by describing r as the output of a linear system driven by white noise and the state vector will have to be extended to be able to describe also the reference signal. If the controlled output is y = C1 x and the reference signal is r = C2 x, the quantity to penalize is e = r − y = [−C1 C2 ]x = Cx. Since r is known, it is to be included in the measured outputs y¯ =
y
r
This is quite a laborious process and is worthwhile only if the reference signal has some very specific properties (like a typical resonance frequency). In the case r is a step or a piecewise constant, then the result is much simpler, as stated below. Assume that ud (r) is a well-defined constant control signal that in stationarity and absence of disturbances would give y(t) ≡ r. We can define the error variables u ˜(t) = u(t) − ud , which satisfy
x ˜(t) = x(t) − xd ,
y˜(t) = y(t) − r,
x ˜˙ (t) = A˜ x(t) + B u ˜(t) y˜(t) = C x ˜(t)
(6.13)
and solve the LQR problem for the error variables: 2 2 J = e˜Q + u ˜R =
T e˜ Q˜ e+u ˜T R˜ u dt
(6.14)
Thus the optimal solution becomes [15]: uOP T (t) = −K OP T x(t) + KrOP T r(t) with † † KrOP T = Hcl (0)−1 = C(BK OP T − A)−1 B = C(Acl )−1 B
(6.15)
6.7. T UNING
87
Here Hcl (s) is the closed-loop transfer function matrix: Hcl (s) = C(sI − Acl )−1 B. and † denotes pseudoinverse. This choice of KrOP T means that the static gain of the closed loop system is the identity matrix, so in steady state y = r.
Kr
Figura 6.10: LQ control configuration for reference tracking.
6.7 Tuning The matrix Q weights the size of the output error. If the entries or Q are large, then small deviation of the error from zero will cause the cost to increase significantly - thus the control will be tight (high gain). The matrix R weights the control. If the entries of this matrix are large, then the control action will be small - opposite to what happens with Q. If we want to increase the size of the control action we can reduce the entries of this matrix. The state vector includes pressures, temperatures and turbine speed, the units used for the different components of x make the values for these variables numerically very different from each other, so the weights Q are chosen to be diagonal with [18] Qii =
1 , i ∈ {1, 2, . . . , n} maximum acceptable value of xi
(6.16)
Since the wastegate can only vary between 0 and 1, the input weigth was set to R=1. In this way that all the variables in x and u have the same importance when minimizing the J criterion.
88
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
6.8 Integral action in LQ control LQ control does not guarantee integral action per s´e, and therefore offsets and constant disturbances may not be rejected in steady state. So integral action needs to be enforced in the controller design, including integrators at the output and considering the regulator problem for the augmented system (Fig. 6.11):
q˙ = y,
x ˆ=
x
(6.17)
q
The augmented system becomes:
d x
y
C
x=Ax+Bu -Kp
1 s
-Ki
Figura 6.11: Integral action in LQ control.
ˆx(t) + B ˆu x ˆ˙ = Aˆ ˆ(t) y(t) = Cˆ x ˆ(t)
(6.18)
where x ˆ=
x q,
Aˆ =
A
0
C
0
,
ˆ= B
B
0
Cˆ =
,
C
0
.
Note that if the integrators are included at the control error instead of the output, the A matrix is augmented with -C instead of C. The controller then becomes ˆ OP T x u(t) = −K ˆ(t) =
Kp
Ki
x q
(6.19)
Once the integral action is added, non-zero set point tracking can be achieved (Fig.6.12). The LQ controller works on the linearized model, so when connected to
6.8. I NTEGRAL ACTION IN LQ CONTROL
89
d x x=Ax+Bu
C
y
-Kp
-Ki
1 s
-yd
-Kr Figura 6.12: Tracking with integral action. the nonlinear system, it is necessary to scale the states so that the controller gets as input the variation of the states from the steady state value. The same consideration holds for the reference which must be scaled with respect to its steady state value, i.e. δTq = k3 δdx7 + k4 δx8 . Considering that the control input has a saturation, when adding the integral term the wind-up phenomenon has to be considered. Two schemes have been considered: 1. The difference between the control input before and after the saturation block is multiplied with a constant Ksat and then added to the term coming form the error. In this way the signal entering the integrator is smaller or bigger depending if the input signal saturates. Figure 6.13 shows the Simulink implementation of the strategy.
Figura 6.13: Simulink implementation of strategy 1.
2. The signal after the saturation is sent to a comparison block, together with the error between actual and reference torque (Fig.6.14) [19]. The two
90
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL signals are then compared with the saturation limits and the resulting signal is used to reset the integrator thus avoiding wind up. The logic is shown in Fig.6.15.
Figura 6.14: Simulink implementation of strategy 2.
Figura 6.15: Logic operations for the anti wind-up.
6.9 Simulations Simulations are performed first on the linearized system and then on the nonlinear model. All the controllers are designed as described in the previous sections, including integral action and anti wind up setting. In the simulated scenarios only the engine is considered, so the engine block is extracted from the bigger Simulink model, described in Chapter 3. The inputs to the engine are not coming from the ECM but need to be given as external inputs. The LQ controller provides the input uwg . The throttle is given either as a step or as a signal shaped like it was coming from the ECM during an acceleration phase. The other inputs are considered constant. In this way
6.9. S IMULATIONS
91
only the signals of interest in each simulation are varied, and any interference from the ECM is avoided. Some modifications are made in the Simulink model, to be able to set the desired conditions for the simulations and few assumptions are formulated, as pointed out below: - The Simulink model is modified in the Transmission and Chassi block, to be able to set constant engine speed. - The block representing the WG actuator is removed since, by assumption, the mechanical valve is substituted by an electronic valve, which can be open and close regardless of the pressure level over it. - The combustion is considered to occur at stoichiometric conditions, i.e. λ = 1. - The ambient pressure and temperature are considered constant. - The fuel mass flow is not given as an external input to the engine, but it is calculated through the air mass flow going out from the cylinders and the air to fuel ratio: m ˙ f uel =
m ˙ air λ · λstec
6.9.1 LQ on Linearized System Results of the simulations for the linearized system are discussed below. The torque reference is given as a step. The throttle signal is given as a step as well, and its amplitude is calculated so that it would give a torque higher than the reference value. In this way it can be seen if the WG acts, both in transient and steady state, in order to reach the correct set point. 1. Reference tracking. Two different operating points are considered: 15 (see Fig.6.16) and 12 (see Fig.6.17). Operating point 15 represents a quite high load condition for the engine, and the WG is kept closed during all the transient. Operating point 12, instead, represents an engine working condition with low pressures and low torque, and the LQ controller opens the WG for a short while during the transient. Many simulations have been performed on the linearized system, and what we can conclude is that, in most of the cases, the LQ controller keeps the WG closed during transient. Only for low load, i.e. operating points
92
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL with very low pressures, the controller opens the WG for a short while during transient. A possible explanation could be that, in such a case, the pumping losses are high, so opening the WG it is possible to reduce them significantly. In addition, since the pressures are low, when the WG is opened they decrease not so much, and so when the WG is closed again, they rise quite fast and so not so much torque is lost.
Torque
100 50 0
4
4.5
5
5.5
6
4
4.5
5
5.5
6
4
4.5
5
5.5
6
Throttle
150 100 50 0
WG
0.4 0.2 0
Figura 6.16: Operating point 15. Reference tracking. From the top: torque, throttle, WG. It can be seen that the LQ controller keeps the WG closed during transient. 2. Disturbance rejection. A scenario in which the LQ is tested for disturbance rejection is shown in Fig.6.18. To completely reject disturbances, it was necessary to add the integral action in the LQ problem formulation. A step is given to the throttle, keeping the torque reference constant. The controller reacts opening the wastegate and so bringing back the torque to the reference value. 3. Anti wind up. A simulation to check the anti wind-up configuration is performed. From t=2sec to t=7sec we force the control input to saturate to 0. Since the torque reference is set to be higher than what the system can actually reach, the LQ controller makes the WG to go below 0. Suddenly, at t=7sec, the torque reference is lowered, under the actual torque signal. So the LQ controller should immediately opens the WG to follow the
6.9. S IMULATIONS
93
Torque
150 100 50 0
4
4.5
5
5.5
6
6.5
7
7.5
8
4
4.5
5
5.5
6
6.5
7
7.5
8
4
4.5
5
5.5
6
6.5
7
7.5
8
Throttle
100 50 0
WG
1 0.5 0
Figura 6.17: Operating point 12. Reference tracking. From the top: torque, throttle, WG. The LQ controller opens the WG for a short while during transient. A possible explanation is that for low load operating points, the pressures are very low and so when the WG is opened they decrease not so much, and so when the WG is closed again, they rise quite fast and so not so much torque is lost. Moreover the pumping losses are high, so opening the WG can help to reduce them significantly.
94
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
4 Torque
2 0
throttle disturbance
−2
1
1.5
2
2.5
3
1
1.5
2
2.5
3
1
1.5
2 t
2.5
3
6 4 2 0
Wg
1 0.5 0
Figura 6.18: Operating point 15. A throttle disturbance is added at t=2sec and the controller correctly opens the WG to bring back the torque to the set point. reference, since the throttle is not changed. Fig.6.19 shows that the anti wind-up configuration works correctly: the controller opens the WG and the torque is brought back to its reference value.
6.9.2 LQR on Nonlinear System The controller is now connected to the nonlinear system, obtained by extracting the engine block from the big nonlinear Simulink model. We want to check the influence of the WG on the system response, so the other inputs to the engine are set manually, while uwg is determined by the controller. 1. Torque reference from 150 to 200Nm. An acceleration is simulated on the nonlinear system. The reference signal is a step from 150 to 200Nm. Inputs given to the engine are shown in Fig.6.20. The operating point selected for the simulation is number 15, which means 2000rpm. A disturbance in torque is added to the output at t=7sec, after the transient is finished. Figure 6.21 shows that the reference value is reached in less than 1 second and the controller correctly opens the WG when the disturbance comes, to bring back the torque to the set point.
6.9. S IMULATIONS
95
Torque
30 20 10 0
1
2
3
4
5
6
7
8
9
10
Throttle
20 without antiwindup with antiwindup
10 0
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10
WG
1 0.5 0
Figura 6.19: Anti wind-up: at t=7sec the torque reference is suddenly lowered and the controller correctly opens the WG to follow the reference.
102 Pamb
Throttle
300 200 100
2
4
6
8
100 98
10
0 −2
2
4
6
8
10
19 2 Area WG
N
6
8
10
4
6
8
10
4
6
8
10
20
2001 2000 1999
4
21 Tamb
Lambda
2
2
2
4
6
8
10
2 x 10
−4
1 0
2
Figura 6.20: Torque reference from 150 to 200Nm. Inputs. At t=5sec a step in throttle is given. At t=7sec a disturbance is added to the output and the controller correctly opens the WG at that time, to bring back the torque to the set point.
96
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
210
200
190
Torque
180
170
160
150
140
2
3
4
5
6
7
8
9
10
Figura 6.21: Torque reference from 150 to 200Nm. Torque. At t=7sec a disturbance is added to the output. The controller brings back the torque to the set point.
2. Torque reference from 20 to 220Nm Now a different kind of simulation is performed. A bigger step in torque is given, from 20 to 220Nm. The big difference with the previous scenario is that now the throttle signal given to the engine is similar to the one that the ECM would produce for the same reference step. Still a unique LQ controller is used, designed on the operating point 15. Fig.6.22 shows the input signals. Fig.6.23 shows that the torque gets the set point in less than 1 second. At t=7sec the WG is opened to compensate the torque disturbance, added to the output, as in the previous scenario. Finally some plots of the state are shown in Fig.6.24 - 6.25, to check that constraints on the exhaust manifold temperature and turbine speed are respected: Tem < 1300K and ωt < 18000rad/s.
3. Torque reference from 0 to 300Nm. Now a full dynamics simulation is performed, so the engine accelerates from 0 to 300Nm, and the aim is to check if only one LQ controller can be enough to cover the whole nonlinear dynamics. Again the throttle signal is shaped like the signal coming from the driver during an acceleration phase (Fig.6.26). The output reaches the reference but, as expected, it has a quite bad response, with
6.9. S IMULATIONS
97
102 Pamb
Throttle
2000 1000 0
2
4
6
8
100 98
10
0 −2
2
4
6
8
19
10
2 Area WG
N
6
8
10
4
6
8
10
4
6
8
10
20
2001 2000 1999
4
21 Tamb
Lambda
2
2
2
4
6
8
x 10
−4
1 0
10
2
2
Figura 6.22: Acceleration phase. Inputs. The throttle signal is similar to the signal that would be produced from the ECM to bring the torque from 20Nm to 220Nm. At t=7sec a disturbance is added to the output and the controller opens the WG.
250
200
Torque
150
100
50
0
2
3
4
5
6
7
8
9
10
Figura 6.23: Acceleration phase. Torque. Reference step from 20Nm to 220Nm. The torque gets the set point in less than 1 second. At t=7sec a disturbance is added to the output.
98
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
5
T before thro t
320
1.2
1
0.8
15
P intake M
x 10
2
4
x 10
6
8
290
2
4
6
8
10
2
4
6
8
10
15000
5
2
300
4
10
0
310
280
10
turbine speed
P before thro t
1.4
4
6
8
10000
5000
0
10
Figura 6.24: Acceleration phase. States. Turbine speed is constrained. It must be ωt < 18000rad/s.
5
T exhaust M
1100
1.4
1.2
1
1.08 P exhaustsyste m
x 10
2 x 10
4
6
8
2
4
6
8
10
2
4
6
8
10
1100
1.04 1.02
2
900
5
1.06
1
1000
800
10
T exhaustsyste m
P exhaust M
1.6
4
6
8
10
1000 900 800 700
Figura 6.25: Acceleration phase. States. Tem is constrained. It must be Tem < 1300K
6.10. G AIN S CHEDULING S TRATEGY FOR LQ C ONTROL
102 Pamb
Throttle
2000 1000 0
2
4
6
8
100 98
10
0
2
4
6
8
10
19 2 Area WG
N
4
6
8
10
4
6
8
10
4
6
8
10
20
3001 3000 2999
2
21 Tamb
Lambda
2
−2
99
2
4
6
8
10
2 x 10
−4
1 0
2
Figura 6.26: Torque reference from 0 to 300Nm. One LQ. All inputs are constant and the throttle signal is shaped like the signal coming from the driver during an acceleration phase. an overshoot of 20 Nm with respect to the set point (Fig.6.27). 4. Disturbance rejection. So far ambient pressure and temperature have been considered constant, but in normal driving situations the environmental conditions can vary. It is reasonable to set the ambient pressure as constant, but it is realistic to simulate a change in the ambient temperature and check how the controller reacts to constant disturbances. So a step is given to Tamb , while all the other inputs are not varied (Fig. 6.28). The controller correctly opens the wastegate to reject the disturbance, and so the torque is brought back to the steady state value (Fig.6.29).
6.10 Gain Scheduling Strategy for LQ Control Since the system is strongly nonlinear, is natural to think about several controllers to cover the whole dynamics of the system. The idea, depicted in Fig.6.30, is then to design a linear quadratic controller for each operating point, and then implement a kind of scheduler that, depending on the engine working condition, decides every time which controller to use. In this way the selected LQ controller will always work not so far from the operating point it has
100
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
320
310
Torque
300
290
280
270
260 4.5
5
5.5
6
6.5
7
Figura 6.27: Torque reference from 0 to 300Nm. One LQ. Torque. The output reaches the reference but it shows an overshoot of 20 Nm.
102 Pamb
Throttle
91.7805
91.7805
2
4
6
8
100 98
10
0 −2
2
4
6
8
10
20 4 Area WG
N
6
8
10
4
6
8
10
4
6
8
10
30
2001 2000 1999
4
40 Tamb
Lambda
2
2
2
4
6
8
10
2 x 10
−5
2 0
2
Figura 6.28: Disturbance rejection. Inputs. A step is given to Tamb at t=5sec while the other inputs are constant. The controller correctly opens the wastegate to reject the disturbance.
6.10. G AIN S CHEDULING S TRATEGY FOR LQ C ONTROL
101
93 92.8 92.6
Torque
92.4 92.2 92 91.8 91.6 91.4
2
3
4
5
6
7
8
9
10
Figura 6.29: Disturbance rejection. Torque. At t=5sec a disturbance in Tamb is added. The controller brings back the torque to the steady state value. been designed for. For example, assuming to have N=2000rmp, there are 7 operating points (12-18) and this mean that 7 LQ controllers will be designed. The scheduler is implemented as a look up table which selects the current operating point based on pim . All the states and references are scaled in a different way for each controller, so that each LQ receives the correct states and inputs variation in relation with its operating point. An example of Simulink implementation is shown in Fig.6.31. In the picture 7 blocks, corresponding to the 7 LQ controllers, can be seen. The three input signals passed to the system (states, references and non manipulated inputs) are scaled as explained previously. The switch is controlled by the signal coming from the scheduler. A first set of simulations is performed with constant engine speed, so the current operating point is selected based on the only pim , as can be seen from Fig.6.32. Giving the same inputs than the case with only one controller (Fig.6.33), the oscillation in the torque is now reduced, as can be seen from Fig.6.34.
6.10.1 Variable engine speed So far a fixed engine speed has been used, to simplify the analysis. Now a more realistic simulation is performed, varying N from 2000 rpm to 3000 rmp. The
102
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
States P intake manifold Engine speed
Closest Operating point
Control action Figura 6.30: The scheduler, depending on the engine working condition (basically pim and N, decides every time which controller to use. In this way the selected LQ controller works always not so far from the operating point is has been designed for.
Figura 6.31: Simulink: implementation of the switching strategy. Only one LQ controller at a time is activated, corresponding to the selected operating point. The 7 blocks to the left, correspond to the 7 LQ controllers. The three input signals passed to the system (states, references and non manipulated inputs) are scaled in a different way for each controller, so that each LQ receives the correct states and inputs variation in relation with its operating point.
6.10. G AIN S CHEDULING S TRATEGY FOR LQ C ONTROL
103
N
3001 3000
P intake Manifold
2999 2
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
x 10
5
1 0
op
35 30 25
Figura 6.32: Switching Strategy. A look up table takes as input the intake manifold pressure and selects the corresponding operating point. Different operating points are selected, and consequently different LQ controllers are activated.
102 Pamb
Throttle
2000 1000 0
2
4
6
8
100 98
10
0 −2
2
4
6
8
10
19 2 Area WG
N
6
8
10
4
6
8
10
4
6
8
10
20
3001 3000 2999
4
21 Tamb
Lambda
2
2
2
4
6
8
10
2 x 10
−4
1 0
2
Figura 6.33: Switching Strategy. Inputs are the same than the case with only one LQ.
104
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
350 300 250
Torque
200 150 100 50 0 −50
2
3
4
5
6
7
8
9
10
Figura 6.34: Switching Strategy. The torque follows the reference and the overshoot is removed. switching strategy is then extended with another lookup table which considers also the engine speed, together with the intake manifold pressure. Two possibilities of implementing a control architecture with so many controllers are investigated: - all the controllers are enabled during all the simulation and the scheduler has to select which wastegate signal to activate time by time (Fig.6.35). - through the use of Simulink ’case’ blocks only one controller is enabled at a time, while the other are ”frozen”. Then the scheduler has to activate both the wastegate signal and the LQ controller. The simulations performed with the two different strategies are not so different. Of course it is computationally lighter to use the ’case’ blocks, but since the LQ calculation are not so demanding, in our case it does not make difference. If the LQ controllers would be changed with heavier control algorithms, then it might be worth to consider only the switching strategy with ”case” blocks. When changing the engine speed from 2000 rpm to 3000 rpm, the system goes through many operating points. As explained in Chapter 5, for each engine speed there is a bunch of operating points, depending on different pim . So at N=2000 rpm, 7 LQ controllers are calculated, from operating point 12 to 18, and at N=3000 rpm other 7 LQ controllers are calculated, from operating point
6.11. C ONCLUSIONS
105
Figura 6.35: Switching strategy for the LQ controller. All the LQ controllers receive the correct states variations, obtained subtracting the steady state value to the states coming from the nonlinear system. All the controllers are calculated, but only one is activated at a time, depending on the selected operating point. 26 to 32. Figures 6.36-6.38 point out the operating point switching strategy, and show the inputs and the torque response.
6.10.2 Variable engine speed with 3 controllers To simplify the control architecture, the same simulation is now performed with only 3 LQ controllers instead of 7. The torque response is shown in Fig. 6.39. It is interesting to note, from the detail in Fig.6.40, that the torque responses are quite similar when using 7 or 3 LQ controllers, so it is not necessary to use one LQ controller for each operating point, but the control structure can be simplified.
6.11 Conclusions In this chapter a linear quadratic (LQ) controller has been designed for the WG valve, to investigate if a more advanced control can improve the transient torque response. The LQ controller has been designed adding an integral action for reference tracking and an anti wind-up to avoid overflow problems due to input hard constraints. First, a single LQ controller has been designed, and it has been tested both on the linear and nonlinear system. The simulations showed that, on the linear system, in the 90% of the operating points the controller keeps the WG closed during the transient. With the nonlinear system, one controller is not enough to cover all the dynamics, so a gain scheduling strategy has been
106
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
102 Pamb
Throttle
2000 1000 0
2
4
6
8
100 98
10
0 −2
2
4
6
8
19
10
2 Area WG
N
6
8
10
4
6
8
10
4
6
8
10
20
3000 2500 2000
4
21 Tamb
Lambda
2
2
2
4
6
8
x 10
−4
1 0
10
2
2
Figura 6.36: Variable engine speed. Inputs. A ramp is given to the engine speed (N), from 2000 to 3000 rpm.
N
3000 2500
P intake Manifold
2000 2
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
x 10
5
1 0
op
40 20 0
Figura 6.37: Variable engine speed. For each engine speed there is a bunch of operating points, depending on different pim .
6.11. C ONCLUSIONS
107
350
300
250
Torque
200
150
100
50
0
2
3
4
5
6
7
8
9
10
Figura 6.38: Variable engine speed. Torque Response. 7 LQ controllers are calculated for the operating points corresponding to N=2000rpm (op 12 to 18), and other 7 LQ controllers are calculated for N=3000 rpm (op 26 to 32).
350
300
250
Torque
200
150
100
50
0 4.5
5
5.5
6
6.5
7
Figura 6.39: Variable engine speed with 3 controllers. Torque Response.
108
C APITOLO 6. O PTIMAL WASTEGATE C ONTROL
308.5 308 307.5
Torque
307 306.5 306 305.5 305 304.5 304
5.92
5.93
5.94
5.95
5.96
5.97
5.98
5.99
6
Figura 6.40: Comparison: torque with 7 and 3 LQ controllers. Torque responses are quite similar when using 7 or 3 LQ controllers, so the control structure can be simplified using only 3 LQ controllers. implemented, with different LQ controllers designed for different operating points. In terms of torque response there are not big advantages using a more complex controller, but there are other positive aspects. It avoids the need for a feedforward action in the WG controller, which would have to be tuned on the specific engine. Moreover the WG valve, now independent from pressuresactivation constraints, can be used for disturbance rejection and help the throttle controller to follow the desired torque level.
Capitolo 7
Lambda and SA Control In Chapter 3 some modification to the original model were described, in particular was mentioned that efficiencies for lambda and SA have been added, both in the engine and in the ECM. As explained there, these two parameters influence the torque response, so here we want to investigate if and how we can improve the torque transient during the acceleration, controlling lambda and SA so that the efficiency is maximized.
7.1 Lambda Lambda is the air/fuel equivalence ratio, and describes the relation between the mass of air and the mass of fuel injected in the engine for the combustion, given normalized with the stoichiometric mixture: λ=
(A/F ) (A/F )s
(7.1)
The stoichiometric ratio varies between 13.27 and 17.23; here λs = 14.64 is used. Due to limits imposed by legislators on the levels of pollutant emissions from the engine, in steady state should be λ = 1, which means that we have the same amount of fuel and air compared with the stoichiometric reaction. Looking at the lambda efficiency map (Fig.7.1) can be seen that the maximum is achieved when the mixture is slightly rich λ ≈ 0.9. So this effect can be utilized during acceleration and the torque can be increased by adding more fuel. In the ECM there is a controller that is supposed to regulate lambda, so in the next sections a new control strategy will be discussed. As described in 109
110
C APITOLO 7. L AMBDA AND SA C ONTROL 1.4
1.2
Efficiency
1
0.8
0.6
0.4
0.2
0
0.8
1
1.2 Lambda
1.4
1.6
1.8
2
Figura 7.1: Lambda efficiency map: the maximum is achieved when the mixture is slightly rich λ ≈ 0.9.
Chapter 3, lambda has influence on both fuel consumption and torque efficiency. In fact the total torque of the engine can be calculated as BM EP = IM EP · ηSA · ηλ − P M EP − F M EP
(7.2)
So it is clear that the closer lambda efficiency is to the maximum of the curve, the higher torque we can get, keeping all the other inputs at the same value. For example, if we request BrakeTorque=100Nm, which corresponds to air mass of 400mg/comb, the throttle control should ask for 400mg/comb. If we then increase the efficiency by 1.05 with fuel enrichment, the driver still requests 100Nm, but now the throttle should provide only 400/1.05 = 380 mg/comb. So it will take less time to reach the torque reference, since the air would reach 380mg/comb faster than 400mg/comb, specially in boosted region. On the other hand, keeping the lambda efficiency at its maximum means to have λ ≈ 0.9, i.e. a rich mixture and consequently pollutant emissions. In fact under rich conditions the amount of air is insufficient for complete combustion of the fuel, and gives rise to unburned hydrocarbons HC and CO [3]. What we want to do is then to maximize the lambda efficiency only during the transient and then try to keep it as close as possible to 1.
7.2. C ONTROL D ESIGN
111
7.2 Control Design 7.2.1 Static Lambda Control The lambda controller implemented now in the ECM is basically a static map, which receives as inputs the engine speed and the measured air mass flow, and gives as output the maximum lambda λmax that can be used for each operating point. This represents a physical limit that can not be ignored. The lower lambda constraint is fixed on λmin = 0.6, but of course it corresponds to a very bad working condition, where the efficiency is really low, as we can be seen from Fig.7.1. First λmax is compared to 1; then the minimum of these two values is compared with λmin , to be sure that either λmax and λmin are respected. Using this static strategy to control lambda, a transient like the one shown in Fig.7.2 is obtained. Lambda Reques t 1
0.98
0.96
0.94
0.92
0.9
transient 0.88
0
1
2
3
4
5
6
7
8
9
Figura 7.2: Normal behavior for lambda Request when using a static control strategy. Considering the lambda efficiency, this is not the best, since there is a region during the transient where λ = 1 and so we are not using the best efficiency. From efficiency point of view this is not the best, since we have a region during the transient where we are not actually using the best efficiency. Since the transient is a very short time, 1-2 second maximum, we can enrich the fuel
112
C APITOLO 7. L AMBDA AND SA C ONTROL
Figura 7.3: Static control strategy. A static map receives as inputs N and the measured air mass flow, and gives as output λmax . λmax is then compared to 1, and the minimum of these two values is compared with λmin = 0.6, to be sure that either λmax and λmin are respected. for a while, because this will result in an increase of the torque and the relative increase of the fuel will be very small and for few seconds. The idea is then to use the best lambda efficiency during the transient which corresponds, according with the map, at λ = 0.9 or, more exactly, to the minimum between 0.9 and λmax , that anyway has to respected (Fig.7.4). /DPEGD
G\QDPLF '\QDPLFFRQWUROOHU PLQ PLQ 6WDWLFK FRQWUROOHU 6WDWLF
Figura 7.4: Lambda control schematics. During transient, λ is equal to the minimum between the value going out from the dynamic controller and the value coming from the static map, due to engine’s cooling constraints.
7.2.2 Dynamic Lambda Control It is a sort of Logical control based on the lambda efficiency map that has to work only during the transient. The only problem in doing this is how to detect that we are in a transient and not in a steady state. The big problem is to find two signals, one of these as reference and the other one as measurement of the real engine condition, to detect the transient. Since this model is quite realistic, it is difficult to find two signals in ECM that at steady state have the same value. Let’s check the possibilities: • m ˙ air : this is the real feedback signal that the throttle control uses. In ˙ air establishes the the ECM there is also mairpredicted that together with m
7.3. S IMULATIONS
113
error that the Throttle control has to deal with. These approach has two problems: - the error even in steady state is not zero - mairpredicted is calculated with λrequest that is actually what we have to set. • pim : this could be a good signal because we have both pim from the engine and pimpredicted . The problem is that pimpredicted is calculated with mairpredicted and then back to λrequest . • Tq : is a measurement of the brake torque in the engine, and in ECM we find Tqpredicted . The problem is that in steady state the error is not equal to 0, so this mean that the controller will try to keep lambda equal to 0.9 even when we are in steady state. From simulations was seen that loosing a little of effectiveness it is possible to bypass this problem considering to use the controller until the error is bigger than 5 for example. This of course is an empiric approach to solve the problem but seems the only solution since at steady state will never be Tqpredicted = Tq . Another possible solution is to try to be independent from the reference Tqpredicted and try to detect the transient based only on Tq , that is the signal coming from the engine. To do this we use a discrete operator z −n and we create two signals: the actual Tq and the Tq n samples before, where n is a control parameter. In this way, when in n samples Tq changes of a certain amount of units, for example 5, means that there is a transient and then lambda is set to 0.9. Once steady state is reached, then Tq will be not so different from the Tq of n samples before and than we will switch off the controller. The strategy is depicted in Fig.7.5
7.3 Simulations An acceleration phase is simulated, using a throttle signal similar to the one that would be produced by the ECM during acceleration. The behavior of static and dynamic controller is compared, in terms of requested lambda and torque response. Fig.7.6 shows that, as soon as the transient starts, the dynamic controller (dashed line) brings lambda to 0.9, while it would be higher for the static version (full line). In this way the efficiency is maximized and consequently the torque response during the transient is slightly higher, as can be seen from Fig.7.7 and 7.8.
114
C APITOLO 7. L AMBDA AND SA C ONTROL
Figura 7.5: Simulink implementation of the Dynamic control strategy. The torque signal is used to detect the transient and so to activate the controller.
Throttle
1500 Static controlle r Static+dynamic controlle r
1000 500 0 4.5
5
5.5
6
6.5
7
5
5.5
6
6.5
7
Lambda
1 0.95 0.9 0.85 4.5
Figura 7.6: Static (full line) versus Dynamic (dashed line) controller: Lambda request. During transient the Dynamic controller requires λ = 0.9.
7.3. S IMULATIONS
115
350 300 250
Torque
200 150 100
static controlle r static+dynamic controlle r
50 0 −50 4.5
5
5.5
6
6.5
7
Figura 7.7: Static versus Dynamic controller: Torque.
200
static controlle r static+dynamic controlle r
190 180
Torque
170 160 150 140 130 120 5
5.05
5.1
5.15
5.2
5.25
Figura 7.8: Detail. Static versus Dynamic controller: torque. Using the Dynamic controller, it is possible to gain 1-3% in the torque response.
116
C APITOLO 7. L AMBDA AND SA C ONTROL
7.4 Spark Advance The influence of SA on engine performances was presented in Chapter 3.5.5, where the importance of the MBT was discussed. In this section a further investigation will be carried out, to find a possible control strategy for SA in order to improve the torque during the transient. MBT is the point where the optimum spark timing occurs. It gives maximum brake power and minimum brake specific fuel consumption. Usually SA = 15 − 30BT DC, but the optimum timing depends on: - Load: if load and pim decrease, SA timing must be further advanced - N: if N increases, SA increases as well because there is less time for the mixture to complete combustion at proper time, since the piston travels faster. The problem is that if SA increases, then the end gas temperature increases as well, thus resulting in a greater knock tendency. If SA is too large, during high engine load conditions, increases the likelihood of engine detonation and increases combustion temperature and pressure. The result is higher HC and N Ox output and worse performance. If SA is too small, only partial combustion of air/fuel charge is handled, resulting in very poor performance and fuel economy, and in higher CO levels. It is then clear that the optimum SA timing is a trade off and a SA controller is responsible to regulate it in the ECM. This controller is optimized for steady state conditions, so the idea is now to check if something better can be achieved during the transient. It is not possible to further anticipate the SA, in order to prevent knock, but it can only be retarded, until -10 degrees, as depicted in Fig.7.9. The idea is to retard SA to get lower exhaust temperature and so increase the turbine speed and get higher torque. Simulations were performed to verify that idea, but the results showed that the increase in the turbine speed is practically null and is not possible to gain anything in terms of torque.
7.5 Conclusions In this Chapter the influence of air to fuel ratio (λ) and spark advance (SA) on the transient torque response is analyzed. Investigations showed that is not possible to gain anything in terms of torque acting on the SA, while a better
7.5. C ONCLUSIONS
117 SA
40
30
Knock! 20
10
OK
0
−10 0
1
2
3
4
5
6
7
8
9
Figura 7.9: SA signal. ¡due to knock limitations, it is not possible to go lift the signal during transient, but it can only be lowered until -10°. control strategy for λ can give some advantage. The idea is to add a dynamic controller acting only during the transient, and try to maximize the lambda efficiency to get a faster torque response. Simulations showed a possible improvement of 1-3% in the torque response during transient.
Capitolo 8
MPC The control strategy presented in this chapter is based on Model Predictive Control (MPC), and shows the results of simulations performed on both linear and nonlinear system. MPC uses a model of the system to predict its future behavior, and then optimizes a quadratic performance index based on the prediction [9][20]. At each sampling time, starting at the current state, an open-loop optimal control problem is solved over a finite time horizon. The first element of the calculated control signal is applied to the system, which operates with this input until the next sampling instant. At this time step, new measurements are used to update the problem, and the computation is repeated starting from the new state and over a shifted horizon, leading to a moving horizon policy. This behavior leads to a closed-loop approach. By operating this way, MPC plans ahead to avoid future constraints violations, and compensates for model errors and unknown disturbances at each sampling instant, by revising the plan made at the previous time step after receiving new information. The idea is visualized in Fig.8.1.
8.1 MPC Overview Model Predictive Control (MPC) is widely adopted in industry as an effective means to deal with large multivariable constrained control problems. The main idea of MPC is to choose the control action by repeatedly solving on line an optimal control problem. This aims at minimizing a performance criterion over a future horizon, possibly subject to constraints on the manipulated inputs and outputs, where the future behavior is computed according to a model of 119
120
C APITOLO 8. MPC
desired trajectory y actual output k current step time
N Prediction Horizon
max
u
min
past control moves
M Control Horizon
Figura 8.1: Controller State at the kth sampling instant. At each sampling time, the first element of the calculated control signal is applied to the system, which operates with this input until the next sampling instant. At this time step, new measurements are used to update the problem, and the computation is repeated starting from the new state and over a shifted horizon, leading to a moving horizon policy.
8.1. MPC O VERVIEW
121
the plant. Issues arise for guaranteeing closed-loop stability, to handle model uncertainty, and to reduce on-line computations. Consider the discrete-time linear time invariant system
x(t + 1) = Ax(t) + Bu(t) y(t) = Cx(t)
(8.1)
where x(t) ∈ Rn is the state vector, u(t) ∈ Rm is the control input vector, and y(t) ∈ Rp is the output vector. A ∈ Rn×n , B ∈ Rn×m and the pair (A,B) is stabilizable. The problem of controlling the states to the origin while fulfilling the constraints ymin ≤ y(t) ≤ ymax ,
umin ≤ u(t) ≤ umax
(8.2)
at all time instants t ≥ 0 can be solved with MPC. Model predictive control (MPC) solves at each time t the optimization problem[9] min xt+N |t + u
N −1
xt+k|t Qxt+k|t + ut+k Rut+k
(8.3)
k=0
subject to ymin ≤ yt+k|t ≤ ymax ,
k = 1, . . . , N
umin ≤ ut+k ≤ umax ,
k = 0, . . . , M − 1
ut+k = Kxt+k|t ,
M ≤k ≤N −1
xt|t = x(t) xt+k+1|t = Axt+k|t + But+k , yt+k+1|t = Cxt+k+1|t ,
(8.4)
k≥0
k≥0
assuming that a full measurement of the state x(t) is available at the current time t. Here xt+k+1|t denotes the predicted state vector at time t+k, obtained by applying the optimization vector U = [ut , . . . , ut+M −1 ] ∈ Rs
(8.5)
with s = mM . Here N is the prediction horizon and M is the control horizon (see Fig.8.1). P 0, R = R and Q = Q 0 are optimization weights and K is a feedback gain. Thus the optimizer minimizes the cost function (8.3) over N time steps. For M steps the control signal is calculated by the optimizer limited by the constraints in (8.4) and for the rest N − M steps the control signal is fixed and depends on the choice of the feedback gain. Rewriting the optimization prob-
122
C APITOLO 8. MPC
lem (8.3)- (8.4), it can be expressed as quadratic programming (QP) problem [9] minU
1 2 U HU
+ x (t)F U
subject to GU ≤ W + Ex(t)
(8.6)
where U is the optimization vector defined by (8.5). The matrices H = H 0, F , G, W and E are obtained from Q, R, P and the model matrices A, B and C. A simple on-line algorithm for MPC is 1. Measure the current state of the system x(t).
2. Calculate the control signal sequence U by solving (8.6).
3. Apply the first element of the control sequence u(t) to the system (8.1).
4. Time update: t = t + 1.
5. Go to step one and repeat.
8.1.1 Parameters Tuning Feedback Gains and Terminal Weights The matrices K and P can be chosen in different ways. One possibility that ensures stability of the closed loop system is to use P and K that satisfy the Riccati equation [21] K = −(R + B P B)−1 B P A, P = (A + BK) P (A + BK) + K RK + Q.
(8.7)
In this way, after M time steps, the control is switched to an unconstrained LQR with weights Q and R [9]. So now the parameters Q, R and N need to be tuned. Horizons As defined in the previous section, N is the number of future time steps over which the system behavior is predicted, while M is the number of future moves in the control signal considered by the optimizer [22]. The number of control signals determines the dimensions of the optimization problem, so the choice of the horizons is very important.
8.2. I MPLEMENTATION IN S IMULINK USING M PC T OOLBOX
123
The control horizon is always equal to, or smaller than the prediction horizon. The smaller is N , the more aggressive is the controller. If a large M is chosen, the controller is closer to the optimal (infinite-horizon) but the increased number of free variables makes the optimization problem computationally more demanding. A smaller M reduces the problem dimensions and so makes it easier to be solved. Unfortunately there are no rule for choosing the prediction horizons, but they have to be tuned by trial and error.. Optimization Weights As well as for the horizons tuning, also to chose the optimization weights there are no rules, but they are determined by trial and error. The choice depends on the states of the system and on the whole desired behavior.
8.2 Implementation in Simulink using Mpc Toolbox
Figura 8.2: The MPC has been implemented in Simulink, using the Model Predictive Control Toolbox in Matlab. The MPC has been implemented in Simulink, using the Model Predictive
124
C APITOLO 8. MPC
Control Toolbox in Matlab [23]. Fig.8.2 shows the graphical user interface (GUI) of the toolbox. One advantage of an MPC Toolbox design (relative to classical multi-loop control) is that it generalizes directly to plants having multiple inputs and outputs. Moreover, the plant can be non-square, i.e. having an unequal number of actuators and outputs. The MPC-toolbox library contains a block representing the controller, as shown in Fig.8.3. Input signals to the controller are measured outputs (MO), reference signals and measured disturbances (MD). Measured disturbances are independent inputs whose values are measured and used for feedforward compensation. Output signals from the controller are the optimal manipulated variables (MV). So in our case, since the controlled variable is the wastegate, it becomes: MO = Tq M D = [α, N, λ, pamb , Tamb ] M V = uwg Note that Model Predictive Control Toolbox requires the model to be linear and time invariant (LTI), whereas the controller gets its inputs from a nonlinear model.
Figura 8.3: MPC block used in Simulink. The MPC Controller Block receives the current measured output, reference signal, and measured disturbance signal, and outputs the optimal manipulated variables by solving a quadratic program.
8.2.1 Building the MPC object The controller block is based on an MPC object, which stores all the parameters defining the MPC control law (prediction horizon, weights, constraints, etc.). An MPC object is built in two steps. The first step happens at construction of the object when the object constructor ’mpc’ is invoked, or properties are changed by a set command. At this first stage, only basic consistency checks are performed, such as dimensions of signals, weights, constraints, etc. The second step happens at initialization of the object, namely when the object is
8.2. I MPLEMENTATION IN S IMULINK USING M PC T OOLBOX
125
used for the first time by simulating the system. At this second stage, further checks are performed, such as a test of observability of the overall extended model. The construction of the MPC object requires some properties to be set, as explained in the following lines. Given the states space realization of the system (model), inputs and outputs can be set with the following code: model = setmpcsignals(model, M D , [1 2 4 5 6 ], M V , [3], OV [1 2]) which creates three structures, whose fields contain the constraints for the corresponding variables and their rates: M V (1) = struct( M in , 0, M ax , 1, RateM in , −1, RateM ax , 1) OV (2) = struct( M in , 0, M ax , 350) The controller is then built through the command: controller = mpc(model, T s, N p, N u) which discretizes the state space continuous model with sampling time Ts . The prediction horizon Np expresses the number of sampling steps of prediction and the control horizon Nu is the number of free control moves. Using the command ’setname’ is possible to set signal names: setname(controller, input , 1, alpha ) setname(controller, input , 2, N ) setname(controller, input , 3, W G ) setname(controller, input , 4, lambda ) setname(controller, input , 5, pamb ) setname(controller, input , 6, T amb ) setname(controller, output , 1, mf uel ) setname(controller, output , 2, torque ) Weights are stored in a structure and can be defined through the following instruction: W eights = struct( Input , 0, M anipulatedV ariablesRate , 1, Output , [0 100]) Note that all weights must be greater than or equal to zero. If all weights on manipulated variable increments are strictly positive, the resulting QP problem
126
C APITOLO 8. MPC
is always strictly convex. If some of those weights are zero, the Hessian matrix of the QP problem may become only positive semidefinite.
8.2.2 Prediction Model
MV (manipulated variables) u(k) MD (measured disturbances) v(k)
white noise
Unmeasured disturbance model
UO (unmeasured outputs) yu(k)
Plant Model
d(k) UMD (unmeasured disturbances)
d(k) MO (measured outputs) ym(k)
CV (controlled variables)
x(k)
Figura 8.4: Model Used for Optimization in the MPC Toolbox.
The linear model used in the MPC Toolbox for prediction and optimization is depicted in Fig.8.4 The model consists of:
1. A model of the plant to be controlled, whose inputs are the manipulated variables, the measured disturbances, and the unmeasured disturbances
2. A model generating the unmeasured disturbances
The model of the plant is a linear time-invariant (LTI) system described by the equations x(t + 1) = Ax(t) + Bu u(t) + Bv v(t) + Bd d(t) ym (t) = Cm x(t) + Dvm v(t) + Ddm d(t)
(8.8)
yu (t) = Cu x(t) + Dvu v(t) + Ddu d(t) + Duu u(t) where x(t) is the state vector of the plant, u(t) is the vector of manipulated variables (MV), i.e. the command inputs, v(t) is the vector of unmeasured disturbances (UD) entering the plant, ym (t) is the vector of measured outputs (MO) and yu (t) is the vector of unmeasured outputs (UO). The overall output vector y(t) collects ym (t) and yu (t). In the above equation d(t) collects both state disturbances and output disturbances.
8.2. I MPLEMENTATION IN S IMULINK USING M PC T OOLBOX
127
8.2.3 Offsets Since the matrices A,B,C,D of the model are obtained by linearizing the non linear system
x˙ = f (x, u, v, d) y = h(x, u, v, d)
at some nominal value x = x0 , u = u0 , v = v0 , d = d0 . The linearized model is affected by the constant terms F = f (x0 , u0 , v0 , d0 ) and H = h(x0 , u0 , v0 , d0 ). For this reason the MPC algorithm internally adds a measured disturbance v = 1, so that F and H can be embedded into Bv and Dv , respectively, as additional columns. Note Nonzero offset values d0 for unmeasured disturbances, while relevant for obtaining the linearized model matrices, are not relevant for the MPC problem setup. In fact, only d − d0 can be estimated from output measurements
8.2.4 State Estimation As the states x(k), xd (k) are not directly measurable, predictions are obtained from a state estimator. In order to provide more flexibility, the estimator is based on the model depicted in Fig.8.5. A linear state observer, based on the UO (unmeasured outputs)
MV (manipulated variables) u(k) MD (measured disturbances) v(k)
white noise
Unmeasured disturbance model xd1(k)
Plant Model
d(k)
CV (controlled variables)
d(k) UMD (unmeasured disturbances)
+
yu(k) +
y(k)
x(k)
white noise
Output disturbance model xd2(k)
+ +
Measurement noise UMD white model (unmeasured noise disturbances) xd1(k)
UO (measured outputs) ym(k)
Figura 8.5: Model Used for State Estimation in the MPC Toolbox. measured output, then provides estimates of the state of the plant model, the overall state of the input and output disturbance model and the state of the measurement noise model. After the combination of plant and disturbance models has been converted to discrete-time, delay-free and state-state form the optimization problem can be solved.
128
C APITOLO 8. MPC
8.2.5 MPC Computation If the problem is unconstrained, then is possible to compute the solution analytically, while if the problem is constrained the solution is computed by solving a quadratic program, using the QP solver coded in the qpsolver.dll function (see [23] for details)
8.2.6 Setting MPC parameters All the parameters defining the MPC control law (prediction horizon, weights, constraints, etc.) are stored in the MPC object, whose properties are listed below. Model and Horizons Control interval - Elapsed time between successive controller moves (in time units). Often called the sampling period or sampling interval. Prediction Horizon - Range of each controller prediction, expressed as an integer number of future control intervals. Control horizon - Number of moves computed for each manipulated variable. Normally, control horizon prediction horizon. Constraints It is possible to specify constraints (bounds) on manipulated variables and outputs. Constraints can be hard (no violation allowed) or soft (some violation allowed). The degree of softness can be adjusted by the user . The design tool interprets a blank table cell as (−∞) for a lower bound, or (∞) for an upper bound. Constraints on Manipulated Variables (MVs) :
• Minimum - MV’s lower bound • Maximum - MV’s upper bound • Max Down Rate - maximum amount the MV can decrease in one move (≤ 0) • Max Up Rate - maximum amount the MV can increase in one move (≥ 0).
8.2. I MPLEMENTATION IN S IMULINK USING M PC T OOLBOX
129
Constraints on Output Variables :
• Minimum - output’s lower bound • Maximum - output’s upper bound Weight Tuning These weights strongly influence controller performance. Each table cell applies to a particular signal. The slider can be used to affect overall performance. Input Weights Table Weight : penalizes deviations of a manipulated variable (MV) from its nominal value. Use as follows: • Zero (or blank) - No penalty. MV can move anywhere between its upper and lower bound. • Positive - increase the weight to keep the MV near its nominal value. Rate Weight : penalizes changes in the MV. Use as follows: • Zero - No penalty. MV can move anywhere between its upper and lower bound. Warning: this might allow excessive movement. • Positive - increase the weight to reduce movement in this MV. Output Weights Weight : penalizes deviation of an output from its setpoint (or reference). Use as follows: • Zero - No penalty, e.g., when the output does not have a setpoint. • Positive - increase the weight to keep the output nearer its setpoint. Example: Weights=struct(’Input’,1,’ManipulatedVariablesRate’,1,’Output’,10) set(controller,’Weights’,Weights,’ManipulatedVariables’,MV, ’OutputVariables’,OV) Fast-Robust Slider Control This adjusts the weights on all variables simultaneously. Moving the slider to the left increases MV rate penalties relative to setpoint penalties, which often increases robustness, but makes disturbance rejection and setpoint tracking more sluggish. The effect is nonlinear so it is needed to run trials to determine the best setting.
130
C APITOLO 8. MPC
Adding Integral Action The MPC formulation does not guarantee integral action, so it has to be included. This can be done by either tuning the weight ’Integrator’ when setting the properties of the MPC object: Weights=struct(’Input’,1,’ManipulatedVariablesRate’,1, ’Output’,10,’Integrator’,1) or by moving the slider control: the closer is the bar to 1 the stronger is the resulting integral action.
8.3 System Consistency MPC works on the linearized model, so it is important for the linearized system to br consistent with the nonlinear one. The system is strongly nonlinear, and includes different kinds of nonlinearities: - as outlined in Chapter 2, the equations describing the system dynamics are strongly nonlinear, - constraints on the control input: | uwg |≤ 100
- nonlinearities throughout the system: hysteresis, switches, saturations, look up tables,. . . So to be able to use MPC on the nonlinear model, it is important for the nonlinear model to be consistent with the linearized one, at least locally. A small step is given so that only the nonlinearity due to the input constraints is excited. So a first check is performed, as summarized in Figures 8.6 -8.9. A small reference step (0 to -1Nm) is given to the linearized system. Constraints are scaled so that the input saturates. The same step is given to the nonlinear system and constraints are scaled in the same way.
Since the system response has the
same behavior in both cases, it means that the nonlinear model is locally consistent with the linearized one. The problem is that is not possible to conclude anything about the consistency of the two models for larger steps, when also the other nonlinearities are excited.
8.3. S YSTEM C ONSISTENCY
131
0.12
0.1
0.08
0.06
0.04
0.02
0 4.5
4.6
4.7
4.8
4.9
5
5.1
5.2
5.3
5.4
5.5
Figura 8.6: uwg . Linear System. Constraints are scaled so that the input saturates.
Torque response in a linear syste m 137
136.5
136
135.5 4.5
4.6
4.7
4.8
4.9
5
5.1
5.2
5.3
5.4
5.5
Figura 8.7: Torque. Linear System. A small reference step (0 to -1Nm) is given to the system.
132
C APITOLO 8. MPC
WG response non linear syste m 12
10
8
6
4
2
0 6.5
6.6
6.7
6.8
6.9
7
7.1
7.2
7.3
7.4
7.5
Figura 8.8: uwg . Non Linear System. The same step given to the linearized system, is given to the nonlinear system and constraints are scaled in the same way.
Torque response non linear syste m 137
136.8
136.6
136.4
136.2
136
135.8
135.6
135.4 6.5
6.6
6.7
6.8
6.9
7
7.1
7.2
7.3
7.4
7.5
Figura 8.9: Torque. Non Linear System. The system response has the same behavior for both linearized and nonlinear systems, so the nonlinear model is locally consistent with the linearized one.
8.4. S IMULATIONS
133
8.4 Simulations Following the same strategy used in Chapter 6 for the LQ controller, the simulations will be performed first on the linearized model and then on the nonlinear system. Let recall the hypothesis on which simulations are based: • Tim is assumed to be constant • we focus on engine operations with λ=1 • a constant engine speed test case was used to isolate the results from gearbox and vehicle influences • a torque based control is designed, so the reference signal is given in terms of torque • uwg can only vary between 0 (fully closed) and 1 (fully open) • the strongest constraints on the states are: - Tem < 1300K - ωt < 18000rad/s
8.4.1 MPC on the Linearized Model One operating point is considered at a time, with fixed engine speed. As expected, simulations show that on the linearized system the MPC gives excellent results, both for reference tracking and disturbance rejection. 1. Fixed engine speed (1500rpm). Operating point 6 is considered first. At t=1sec a step of 50Nm is given to the torque reference, starting from the steady state value. The MPC opens the whole WG at t=1, when the step starts, for a very short while (about 0.2sec) and then keeps it closed until t=3sec, when the torque reaches the reference value (Fig.8.10). After that, in steady state the WG is kept a bit open. The torque response is nice and smooth, and it reaches the reference in approximately 1 second (Fig.8.11). Then operating point 9 is considered (see Fig.8.12 and 8.13). The WG behavior is now different from operating point 6. In fact the MPC keeps the WG closed at the beginning of the transient and then opens it, in the same way as the LQ does.
134
C APITOLO 8. MPC
WG
alpha
Plant Inputs
0
1
2
3
4
5 Time (sec)
6
7
8
9
10
Figura 8.10: 1500rpm. Operating point 6. Inputs. At t=1sec a step of 50Nm is given to the torque reference. The MPC opens the whole WG at t=1, when the step starts, for a very short while (about 0.2sec) and then keeps it closed until t=3sec, when the torque reaches the reference value. After that, in steady state the WG is kept a bit open.
Plant Outputs 100
90
torque
80
70
60
50
40 0
1
2
3
4
5 Time (sec)
6
7
8
9
10
Figura 8.11: 1500rpm. Operating point 6. The torque response is nice and smooth, and it reaches the reference in approximately 1 second.
8.4. S IMULATIONS
135
Plant Inputs 300
alpha
250
200
150
100 0.2
WG
0.15
0.1
0.05
0 0
1
2
3
4
5 Time (sec)
6
7
8
9
10
Figura 8.12: 1500rpm. Operating point 9. Inputs. The MPC keeps the WG closed at the beginning of the transient and then opens it, in the same way as the LQ does.
Plant Outputs 0.03
mfuel
0.028
0.026
0.024
0.022 200 190
torque
180 170 160 150 140 0
1
2
3
4
5 Time (sec)
6
7
8
9
10
Figura 8.13: 1500rpm. Operating point 9. Outputs. Up: fuel mass flow. Down: torque.
136
C APITOLO 8. MPC
2. Fixed engine speed (3000rpm). For the first time, in this simulation also the fuel consumption is considered as output and is weighted in the MPC. The aim is to check if, giving anyway a fixed step in throttle as in the previous cases, is possible to use different WG control strategies in order to consider also the fuel consumption and not only the torque behavior. Operating point 30 is selected and the weights are changed using the slider in the MPC Toolbox, as shown in the table below. Slider=0.2
Slider=0.4
Slider=0.7
Qwg
0.6
0.9
10
QRAT Ewg
16
11
1
QT q
0.06
0.1
1
Fig.8.14 shows how the WG signal changes for different values of the slider, keeping the same throttle signal: if the slider is close to 1, the MPC keeps the WG closed for more time during transient. The output behavior is shown in Fig.8.15: the closer is the slider to 1, the higher is the weight on the torque. Consequently, the torque response is faster, but also the fuel consumption is higher. Viceversa if the slider is set to a value close to 0: the torque is slower in the transient, but the less fuel is burnt. 3. Rejection to measured disturbances. Operating point 15. A disturbance in engine speed is simulated and a negative step is given to N, starting from the steady state value (2000rpm) at t=5sec (Fig.8.16). The controller fully opens the WG at t=5sec and keeps it to 1 until the torque reaches the reference value again (Fig.8.17). 4. Rejection to unmeasured disturbances. If no integral action is added, the MPC does not completely reject the unmeasured disturbances, but the torque response exhibits a static error, as pointed out in Fig.(8.18). In fact the MPC keeps the WG a bit open in steady state (Fig.8.19). The same figures show that when adding the integral action to the MPC, it correctly reacts to disturbance and there is no static error in the torque. As explained in Section 8.2.6 the integral action can be included by adjusting the Estimate Slider Control in the MPC Toolbox. Increasing the value of this parameter, the weights on inputs and outputs change, as well as the weight on the manipulated variable rate. A good tuning of this parameter allows the controller to correctly react to disturbances and bring back the torque to the reference value.
8.4. S IMULATIONS
137
alpha
Plant Inputs
0.4 WG
0.2 0.7
0.5
1
1.5
2
2.5
3
Time (sec)
Figura 8.14: 3000rpm. Operating point 30. Influence of the Slider Control on the system. The closer is the slider to 1, the higher is the weight on the torque, and so the faster is the torque response. Consequently, when slider=0.7 (red line) the MPC keeps the WG closed at the beginning of the transient for more time than in the other cases. Plant Outputs 0.07
mfuel
0.065 0.06 0.055 0.05 0.045 220 210
torque
200 0.4
190
0.2
180
0.7
170 160 0.5
1
1.5
2
2.5
3
Time (sec)
Figura 8.15: 2000rpm. Operating point 30. Fuel and Torque. Influence of the Slider Control on the system. Red line: slider=0.7; blue line: slider=0.4; green line: slider=0.2. The closer is the slider to 1, the faster is the torque response, and so the higher is the fuel consumption.
138
C APITOLO 8. MPC
WG
N
alpha
Plant Inputs
0
1
2
3
4
5 Time (sec)
6
7
8
9
10
Figura 8.16: Rejection to a disturbance in engine speed at t=5sec. The controller fully opens the WG at t=5sec and keeps it to 1 until the torque reaches the reference value again.
Plant Outputs 320 300 280
torque
260 240 220 200 180 160 140 0
1
2
3
4
5 Time (sec)
6
7
8
9
10
Figura 8.17: Rejection to measured disturbances. Torque. At t=5sec a disturbance in engine speed is added and the MPC correctly rejects it, bringing back the torque to the reference value.
8.4. S IMULATIONS
139
Plant Outputs 160
torque
155
150
static error 145 0
1
2
3
4
5 Time (sec)
6
7
8
9
10
Figura 8.18: If no integral action is added, the torque response exhibits a static error (blue line). Adding the integral action to the MPC, it correctly rejects the disturbance (green line).
WG
alpha
Plant Inputs
0
1
2
3
4
5 Time (sec)
6
7
8
9
10
Figura 8.19: Throttle (up) and uwg (down). When no integral action is added (blue line), the MPC keep the WG more open in steady state, thus leading to a static error in the torque. Instead, adding the integral action to the MPC (green line), it uses the WG for disturbance rejection.
140
C APITOLO 8. MPC
8.4.2 Pumping Losses Let analyze now the effect of the WG on the pumping losses, considered as an additional output of the system, together with torque and fuel (Fig.8.20-8.22). Different WG behaviors are compared, considering the same throttle. If the WG is open for a short while at the beginning of the transient, then the torque increases fast, due to reduced pumping losses. The drawback is that, as soon as the WG is closed again, then the torque slows down, due the non minimum phase behavior which relates WG and torque. Instead, if the WG is kept totally closed, then the torque increases a bit slower at the beginning, since pumping losses are higher, but it is not affected by the drawback of the inverse response, and so in the second part of the transient is higher. Plant Inputs 46
alpha
44
42
40
38 1.2 1
WG
0.8 0.6 0.4 0.2 0 −0.2 0.8
1
1.2
Time 1.4 (sec)
1.6
1.8
2
Figura 8.20: Comparing different WG behaviors considering the effect on pumping losses. Red line: the WG is kept totally closed. Blue line: the WG is open for a short while at the beginning of the transient. The throttle signal is the same for both cases.
8.4.3 MPC on the Nonlinear Model Now the MPC is connected to the nonlinear model of the engine, extracted from the big Simulink model. We want to isolate the controller from vehicle and ECM influence, so all the other inputs to the engine are fixed, while the
8.4. S IMULATIONS
141
Plant Outputs 0.0115
mfuel
0.011
0.0105
0.01
0.0095 11 10.5
MO3
10 9.5 9 8.5 8 0.95
1
1.05
1.1 1.15 Time (sec)
1.2
1.25
1.3
Figura 8.21: Outputs: fuel consumption (up) and pumping losses (down). If the WG is open for a short while at the beginning of the transient (blue line), pumping losses are reduced with respect to the case with the WG totally closed (red line).
wastegate position is controlled by the MPC. Together with reference tracking, also disturbance rejection is tested, adding non measured disturbances and tuning the integrator weight in the MPC in order to guarantee rejection.
1. Acceleration phase with real throttle. The simulations on the linearized system were performed giving a step in throttle, instead now an acceleration phase is simulated, with a ”real” throttle signal, i.e. the throttle signal is similar to the signal that would be produced by the ECM in response to an acceleration from the driver (see Fig. 8.23). All the other inputs to the engine are kept constant. At t=5sec the controller fully opens the WG for a short while, and then closes it until approximately 6 seconds, i.e. when the torque reaches the reference value. Then the WG is kept a bit open in steady state. The torque response is nice and it shows only a small overshoot; it reaches the reference in approximately 1 second (see Fig.8.24). Figures 8.25-8.26 show the behavior of some states of the system. It can be seen that the most important constraints on the states (Tem < 1300K and ωt < 18000rad/s) are not violated.
142
C APITOLO 8. MPC
Plant Outputs 55
torque
50
45
40 Time (sec)
Figura 8.22: If the WG is open for a short while at the beginning of the transient (blue line), then the torque increases fast, due to reduced pumping losses. The drawback is that, as soon as the WG is closed again, then the torque slows down, due the non minimum phase behavior which relates WG and torque. Instead, if the WG is kept totally closed (red line), then the torque increases a bit slower at the beginning, since pumping losses are higher, but is higher in the second part of the transient.
8.4. S IMULATIONS
143
102 Pamb
Throttle
2000 1000 0
2
4
6
8
100 98
10
0 −2
2
4
6
8
19
10
2 Area WG
N
6
8
10
4
6
8
10
4
6
8
10
20
2002 2000 1998
4
21 Tamb
Lambda
2
2
2
4
6
8
x 10
−4
1 0
10
2
2
Figura 8.23: Non Linear model. Step in Torque 20-220Nm. The throttle signal simulates the acceleration from the driver and the other inputs are kept constant. At t=5sec the controller fully opens the WG for a short while, and then closes it until approximately 6 seconds, i.e. when the torque reaches the reference value. 250
200
Torque
150
100
50
0
4
4.5
5
5.5
6
6.5
7
Figura 8.24: Non Linear model. Step in Torque 20-220Nm. The torque response is nice and it shows only a small overshoot; it reaches the reference in 1 second approximately.
144
C APITOLO 8. MPC
5
T before thro t
320
1.2
1
0.8
15
P intake M
x 10
2
4
x 10
6
8
290
2
4
6
8
10
2
4
6
8
10
15000
5
2
300
4
10
0
310
280
10
turbine speed
P before thro t
1.4
4
6
8
10000
5000
0
10
Figura 8.25: Non Linear model. Step in Torque 20-220Nm. States. The constraint on the turbine speed (ωt < 18000rad/s) is not violated.
5
1100 T exhaust M
1.3 1.2 1.1 1
1.08 P exhaustsyste m
x 10
2 x 10
4
6
8
2
4
6
8
10
2
4
6
8
10
1100
1.04 1.02
2
900
5
1.06
1
1000
800
10
T exhaustsyste m
P exhaust M
1.4
4
6
8
10
1000 900 800 700
Figura 8.26: Non Linear model. Step in Torque 20-220Nm. States. The constraint on the exhaust manifold temperature (Tem < 1300K) is not violated.
8.5. C ONCLUSIONS
145
2. Reference tracking and unmeasured disturbance rejection. Now a step is given to the throttle, as in the linear case, at t=5sec and the torque reference is lifted from 150 to 200Nm (Fig.8.27). Then, at t=7sec, a non measured disturbance is added to the torque to test disturbance rejection. First the weight on the integral action in the MPC is set to 1 and can be seen that the torque goes back to the reference but with a static error (Fig.8.28). Increasing the integrator weight up to 1000, the disturbance is rejected and the static error is eliminated, as depicted in Fig.8.29.
102 Pamb
Throttle
300 200 100
2
4
6
8
100 98
10
0 −2
2
4
6
8
1 Area WG
N
6
8
10
4
6
8
10
4
6
8
10
20 19
10
2002 2000 1998
4
21 Tamb
Lambda
2
2
2
4
6
8
10
2 x 10
−4
0.5 0
2
Figura 8.27: Non Linear model. At t=7sec a disturbance is added to the torque and the MPC correctly opens the WG to reject it.
8.5 Conclusions Since the system has constraints on the input, on the output and also on some states, a model predictive approach has been investigated to handle these limitations. In this chapter a SISO-SIMO approach has been studied. First, the WG was used to improve the torque response and then, considering also the fuel as output, different ways to control the WG were considered, in order to reduce the fuel consumption. As LQ analysis showed, the possibilities to improve the torque response, controlling the WG in a different way than to keep it closed
146
C APITOLO 8. MPC
210
200
Torque
190
180
170
160
150
2
3
4
5
6
7
8
9
10
Figura 8.28: Non Linear model. Disturbance rejection. Without integral action in the MPC (Integrator weught=1) the torque response shows a static error.
210
200
Torque
190
180
170
160
150
2
3
4
5
6
7
8
9
10
Figura 8.29: Non Linear model. Disturbance rejection. Increasing the integrator weight up to 1000, the disturbance is rejected and the static error is eliminated.
8.5. C ONCLUSIONS
147
all the time during the transient, are very few and not so realistic. Normally, opening the WG during the transient, it is lost much more that what is possible to get in terms of torque, and so it seems not to be worth. Obviously, MPC handles constraints much better that LQ, but the linear model represents the nonlinear one only in a neighborhood of the equilibrium point were the system has been linearized. So when we simulate it on the nonlinear system the results are not as perfect as on the linear one. What is interesting instead, is to check which benefit can be achieved using a MIMO strategy, as shown in the next chapter.
Capitolo 9
Model Reduction The linearized model of the system has 12 states, so it is not reasonable to think to a possible real time implementation of the MPC designed in the previous chapter. So here a model reduction is presented [6][24], showing that it is possible to reduce the model to 4 states, keeping all the properties of the original one, and under some assumptions it can be reduced to 3 states only.
9.1 Introduction In the design of robust controllers for complicated systems, model reduction fits several goals: 1. To simplify the best available model in light of the purpose for which the model is to be used-namely, to design a control system to meet certain specifications. 2. To speed up the simulation process in the design validation stage, using a smaller size model with most of the important system dynamics preserved. 3. Finally, if a modern control method such as LQG or H∞ is used for which the complexity of the control law is not explicitly constrained, the order of the resultant controller is likely to be considerably greater than is truly needed. For this purpose , one can either reduce the order of the plant model prior to control design, as is done in this thesis, or reduce the controller in the final stage. The central problem is: given a high order linear time invariant stable model G, find a low order approximation Gred such that the infinity norm of the dif149
150
C APITOLO 9. M ODEL R EDUCTION
ference, G − Ga ∞ is small. By the model order, the dimension of the state vector in a minimal realization is meant, that is called McMillan degree[6]. The scope of this section is to find a new model that maintains the main characteristics of the original one, but with lower order. Since the scope of the thesis is to use an MPC controller in real time, 12 states dimension is too much and makes application in real time impossible, so the lower will be the order of the redacted model the faster will be the response of the controller when implemented in the car. The best solution will be the lowest model order whose response guarantees a small difference with the original model.
9.2 Model Reduction Process For control purposes, it is generally enough to have an accurate model near the crossover frequency. For simulation, it is enough to capture the essential dynamics in the frequency range of the excitation signals. This means that it is often possible to find low order approximations of high order models. A model reduction task typically involves the following steps: - Analyze the important characteristics of the model from its time or frequency domain responses obtained from |step| or |bode|, for example. - Determine an appropriate reduced order by plotting the Hankel singular values of the original model (|hankelsv|) to determine which modes (states) can be discarded without sacrificing the key characteristics. - Choose a reduction algorithm. Some reduction methods available in the toolbox are: |balancmr|,|bstmr|,|dcmatch|and |hankelmr| The methods employ different measures of ’closeness’ between the original and reduced models and the choice is application-dependent. Their relative merits will be investigated in the following sections. - Validation: results are validated by comparing the dynamics of the reduced model to the original. Reduction parameters (choice of model order, algorithm, error bounds etc.) may need to be adjusted if the results are not satisfactory.
9.3 Hankel Singular Values In control theory, eigenvalues define a system stability, whereas Hankel singular values define the ”energy” of each state in the system. Keeping larger
9.4. O VERVIEW OF M ODEL R EDUCTION T ECHNIQUES
151
energy states of a system preserves most of its characteristics in terms of stability, frequency, and time responses. Model reduction techniques presented here are all based on the Hankel singular values of a system. They can achieve a reduced-order model that preserves the majority of the system characteristics. Mathematically, given a stable state-space system (A,B,C,D), its Hankel singular values are defined as [6] σH =
λi (P Q)
(9.1)
where P and Q are controllability and observability grammians satisfying AP + P AT = −BB T AT Q + QA = −C T C
9.4 Overview of Model Reduction Techniques Robust Control Toolbox offers several algorithms for model approximation and order reduction. These algorithms let control the absolute or relative approximation error, and are all based on the Hankel singular values of the system. Robust control theory quantifies a system uncertainty as either additive or multiplicative types. These model reduction routines are also categorized into two groups[23]: Additive Control Method The reduced order model has a bounded by an error criterion. Multiplicative Error Method The reduced order model has a multiplicative or relative error bounded by an error criterion. In other words, some model reduction routines produce a reduced order model Gred of the original model G with a bound on the error G − Gred ∞ , the peak gain across frequency. Others produce a reduced order model with a bound on the relative error , the peak gain across frequency. Others produce a reduced order model with a bound on the relative error G−1 (G − Gred )∞ . These theoretical bounds are based on the ”tails” of the Hankel singular values of the model[6], i.e., Additive Error Bound:
G − Gred ∞ ≤ 2
n k+1
σi
(9.2)
152
C APITOLO 9. M ODEL R EDUCTION
where σi denotes the ith Hankel singular value of the original system G. Multiplicative (Relative) Error Bound:
G−1 (G − Gred )∞ ≤
n
(1 + 2σi (
1 + σi2 + σi )) − 1
(9.3)
k1
where σi denotes the ith Hankel singular value of the phase matrix of the model G. In the following section different methods will be introduced rapidly and compared, also considering different orders for the reduced model. To compare the models between each other singular values plots and step responses are used, from each inputs of the system to the output.
9.4.1 Truncation and Residualization Let (A, B, C, D) be a minimal realizationof a stable system G(s) and partition x1 where x2 is the vector of n-k the state vector x, of dimension n, into x2 states which we wish to remove. With appropriate partitioning of A, B and C, the state-space equations become ⎧ ⎪ ⎪ ⎨ x˙ 1 = A11 x1 + A12 x2 + B1 u x˙ 2 = A21 x1 + A22 x2 + B2 u ⎪ ⎪ ⎩ y(t) = C x + C x + Du 1 1
(9.4)
2 2
Truncation s
s
A kth order truncation of the realization G = (A, B, C, D) is given by Ga = (A11 , B1 , C1 , D) [6]. If A is in Jordan form then it is easy to order the states so that x2 corresponds to high frequency or fast modes. Assume that A has been diagonalized so that: ⎡ ⎢ ⎢ ⎢ A=⎢ ⎢ ⎣
λ1
0
...
0
0 .. .
λ2 .. .
... .. .
0 .. .
0
0
...
λn
⎤
⎡
bT1
⎤
⎥ ⎢ T ⎥ ⎥ ⎢ b2 ⎥ ⎥ ⎢ ⎥ ⎥ B = ⎢ . ⎥ C = c1 ⎥ ⎢ .. ⎥ ⎦ ⎣ ⎦ bTn
c2
...
cn
(9.5)
Then if the λi s are ordered so that | λ1 | 0. Any minimal realization of a stable transfer function can be balanced by a simple state similarity transformation and routines for doing this are available in Matlab. In a balanced realization the value of each σi is associated with a state xi of the balanced system. The size of σi is a relative measure of the contribution that xi makes to the input-output behavior of the system. Therefore if σ1 σ2 then the state x1 effects the input-output behavior much more than x2 or indeed any other state because of the ordering of the σi . After balancing a system, each state is just as controllable as it is observable, and a measure of a state’s joint observability and controllability is given by its associated Hankel singular value. This property is fundamental to the model reduction methods. So now we can use the previous technics but just removing states having little effects on the system’s input-output behavior. A precise statement of the error bound is given in the following theorem[6]: Theorem 1 Let G(s) be a stable rational transfer function with Henkel singular values σ1 > σ2 , . . . , > σN where each σi has multiplicity ri and let Gka (s) be obtained by truncating or residualizing the balanced residualization of G(s) to the first (r1 + r2 + . . . + rk ) states. Then G(s) − Gka )∞ ≤ 2(σk+1 + σk+2 + . . . , σN )
(9.11)
9.4.3 Optimal Hankel norm approximation In this approach to model reduction the problem that is directly addressed is the following: given a stable model G(s) of order n, find the reduced order model Gkred (s) of degree k such that the Hankel norm of the approximation error G − Gkred H is minimized.
9.5. M ODEL R EDUCTION P ROCEDURE
155
The Henkel norm of any stable transfer function E(s) is defined as[6] 1
E(s)H = ρ 2 (P Q)
(9.12)
where P and Q are the controllability and observability Gramians of E(s).
9.4.4 Balanced stochastic model truncation (BST) This methods is a Multiplicative error method, implemented in Matlab through the routine bstmr. The error bound is computed based on Hankel singular values of the phase matrix of G. For a stable system these values indicate the respective state energy of the system. Hence, reduced order can be directly determined by examining these values. With only one input argument G, the function will show a Hankel singular value plot of the phase matrix of G and prompt for model order number to reduce. This method guarantees an error bound on the infinity norm of the multiplicative G−1 red (G − Gred )∞ or relative error G−1 (G − Gred )∞ for well-conditioned model reduction problems[6]: G−1 (G − Gred )∞ ≤ +
n
(1 + 2σi (
1 + σi2 σi )) − 1
(9.13)
k+1
9.5 Model Reduction Procedure The problem is that we have 45 different operating points, and so we have 45 different models G = (A, B, C, D) to reduce. It would be desirable to make a general model reduction that works fine for each point, i.e. a general technique that can be used for each operating point with good results in average over the 45 operating points. Of course this will not give the best model with the minimum number of states for each point, but it will be something that in average works fine for all the systems (Ai , Bi , Ci , Di ) with i = 1 . . . 45. So the steps below have been followed: 1. Decide how many states to use in the reduced model. 2. Choose a model reduction technique trying to minimize in average the infinity norm. 3. Validate the model.
156
C APITOLO 9. M ODEL R EDUCTION
9.5.1 Number of states to use in the reduced model The system has 6 inputs (α, N, W G, λ, Pamb , Tamb ), one output (Tq ) and 12 states. The first thing has been to analyze the important characteristics of the model from its time or frequency-domain responses,and has been found that in the transfer function between WG and torque Gwg (s) there is a right half plane zero. This require to be really careful in the reduction process and to check if this zero moves when reducing the model. The last two inputs (Pamb , Tamb ) are not very important because in many cases their transfer function to the torque is really small, and they are almost constant,especially the temperature. So a system with only 4 inputs and 1 output will be considered. During our simulation in the linearize system the engine speed and Lambda are constant, for hypothesis, but in a more general case they could vary so these two inputs will be kept also in the reduced system. What we have to do now is to determine an appropriate reduced order by plotting the Hankel singular values of the original model (—hankelsv—) to determine which modes (states) can be discarded without sacrificing the key characteristics. To decide how many states to use we have been initially looking, at some operating point, the Hankel singular value, starting for example from N = 3000rpm; that was one of the speed that we have been considering, and plotting some of them. Depending on the operating point, the dominant singular value could be 2, 3 or 4. This means that the number of states affecting the inputs-outputs dynamics is not the same in all the operating points. To bypass this problem, a script in Matlab has been created to calculate the Hankel singular value of all the operating points and to find out, in average, the number of states having an important effect in the input-output dynamics (see Fig.9.1). It seems that in most of the cases we could reach 3 states, but since it is an average this mean that there could be some cases requiring 4-5 states, so we decided to consider 4 states to be sure to get a good model for each operating point.
9.5.2 Model Reduction Techniques. Comparison: Additive Methods To choose which technique to use, has been considered which are the most important frequencies in the dynamic of our engine. For control purposes, it is generally enough to have an accurate model near the crossover frequency. For simulation, it is enough to capture the essential dynamics in the frequency range of the excitation signals. It seems that the main dynamics inside the in-
9.5. M ODEL R EDUCTION P ROCEDURE
157
avarage of HSV over the 45 op 140
120
100
80
60
40
20
0
1
2
3
4
5
6
7
8
9
10
11
12
Figura 9.1: Average of Hankel singluar values, over all the 45 operating points take manifold are around 15-20Hz, so we will consider a good reduced model that approximates well the original system between 1-1000 rad/sec. All algorithms provide bounds on the approximation error. For additive-error methods like |balancmr|, the approximation error is measured by the peak (maximum) gain of the error model |G − Gred | across all the frequencies. This peak gain is also known as the H-infinity norm of the error model. As first we have been comparing the additive methods, as balanced DCgain , balanced truncation and Hankel norm approximation. Dc gain method gives a non zero D matrix, so it can not be chosen. There is never a direct term D from input to output in MPC models. This follows from the fact that, at a given sample k, the output is already given and can hence not be affected by the present input uk which is to be calculated by the optimizer. According with this we start to prefer Balanced truncation and Hankel singular norm decomposition that have D=0. Also this method is really good at low frequency, since has the property to preserve the DC gain of the system, but looses most of the dynamics at high frequency. It seems that depending of the operating point one is better than the other. To overcome this problem, as for the Hankel singular values, we plot a sort of average over the 45 different operating points to have an idea of what happens in all the cases, and if there
158
C APITOLO 9. M ODEL R EDUCTION method
Average Infinity Norm
hankel balanced truncation hankel-Throttle balanced truncation-Throttle hankel-WG balanced truncation-WG
0.33009 0.32935 0.002264 0.000983 0.20554 0.28994
Tabella 9.1: Average norm over the 45 operating points. Comparison between Hankel and balanced truncation method, both for the throttle and the WG.
is a technique that works better than the others in most of the cases (see table 9.1). Even in the frequency range of our interest, it seems that both Hankel norm approximation and Truncation give a good approximation of the original model in all the operating points and the resulting static error is not so big.
Op 15 WG 4 states
60
Magnitude (dB)
40 20 0 −20
Phase (deg)
−40 180 sys bal han
90 0 −90 −2 10
10
0
10
2
10
4
Frequency (rad/sec)
Figura 9.2: Bode diagram of Gα with 4 states for original system, Truncation and Hankel method. Operating point 15.
9.5. M ODEL R EDUCTION P ROCEDURE
159
Op 15 throttle 4 states
0
Magnitude (dB)
−10 −20 −30 −40
Phase (deg)
−50 0 sys bal han −45
−90 −2 10
10
0
10
2
10
4
Frequency (rad/sec)
Figura 9.3: Bode diagram of Gwg with 4 states for original system, Truncation and Hankel method. Operating point 15.
Op 15 WG 4 states
−20 sys−bal sys−han
−30
Singular Values (dB)
−40 −50 −60 −70 −80 −90 −100 −2 10
10
0
2
10
10
4
Frequency (rad/sec)
Figura 9.4: Singular value plot for the errors G − GT runc and G − GHankel
160
C APITOLO 9. M ODEL R EDUCTION
9.6 Model Reduction Technique: Multiplicative Error Method We have been also trying to use a multiplicative error method such as |bstmr|. This algorithm emphasizes relative errors rather than absolute ones. Now, we look at the singular values for multiplicative (relative) errors (using the ’mult’ option of |hankelsv|), see figure 9.5. Hankel SV of Phase Matrix 1 0.9 0.8 0.7
abs
0.6 0.5 0.4 0.3 0.2 0.1 0
1
2
3
4
5
6
7 Order
8
9
10
11
12
Figura 9.5: Hankel singular values of Phase Matrix. Operating point 11. For multiplicative-error methods such as |bstmr|, the approximation error is measured by the peak gain across frequency of the relative error model |G \ (G − Gred )|. So we will have the biggest absolute error where G has higher gain. So again just have a look at some plots and see what happen in our frequencies range of interest. Instead to decide before which number of state we want , we set the maximum relative error and we let the algorithm find how many states we need to be inside this value. To achieve at least 5% relative accuracy, what is the lowest order we can get? The function |reduce| can automatically select the lowest-order model compatible with our desired level of accuracy. The algorithm has picked a 4-state reduced model |Gred |. This respects what we were expecting looking the Hankel singular phase matrix values.
9.6. M ODEL R EDUCTION T ECHNIQUE : M ULTIPLICATIVE E RROR M ETHOD 161 Having a look for example at the Op18 at the two most important transfer function Gwg and Gα we can see that the relative error is quite small in the range of frequency that we want to consider.
Op.16 rel WG 4 states bst method
−40
Singular Values (dB)
−45 −50 −55 −60 −65 −70 −2 10
10
0
2
10
10
4
Frequency (rad/sec)
Figura 9.6: Bode diagram of relative error for Gwg . Operating point 16. Now we can compare this new model with the additive methods and see what happens. The results are quite similar, the additive method BST keeps the relative error bounded, so is good when the absolute value becomes smaller too. On the other hand, when the absolute value is small is also less important from the control point of view. Transfer functions with absolute value of -30/40dB can be neglected. So we can say that with 4 states all the analyzed methods are good. The BST method is chosen for the validation, and in the following sections it will be compared with the original system.
9.6.1 Validate the model We want now to validate our results by comparing the dynamics of the reduced model to the original. We may need to adjust our reduction parameters (choice of model order, algorithm, error bounds etc.) if the results are not satisfactory. To compare the results the step response and the singular values of
162
C APITOLO 9. M ODEL R EDUCTION
Op.16 rel throttle 4 states bst method
−20 −25
Singular Values (dB)
−30 −35 −40 −45 −50 −55 −2 10
10
0
2
10
10
4
Frequency (rad/sec)
Figura 9.7: Bode diagram of relative error for Gα . Operating point 16.
Op 16 Throttle 4 states
−30
Magnitude (dB)
−40 −50 −60 −70
Phase (deg)
−80 0 sys bal bst han
−45
−90 −2 10
10
0
10
2
10
4
Frequency (rad/sec)
Figura 9.8: Bode diagram for Gα . All methods. Operating point 16.
9.6. M ODEL R EDUCTION T ECHNIQUE : M ULTIPLICATIVE E RROR M ETHOD 163
Op 16 Throttle 4 states
0.03 0.025
0.015 sys bal bst han
0.01 0.005 0
0
2
4
6
8
Time (sec)
Figura 9.9: Step response for Gα . All methods. Operating point 16.
Op.16 WG 4 states
60
Magnitude (dB)
40 20 0 −20 −40 180
Phase (deg)
Amplitude
0.02
sys bal bst han
90 0 −90 −2 10
10
0
10
2
10
4
Frequency (rad/sec)
Figura 9.10: Bode diagram for Gwg . All methods. Operating point 16.
164
C APITOLO 9. M ODEL R EDUCTION
Op 16 WG 4 states
50 sys bal bst han
0
Amplitude
−50 −100 −150 −200 −250
0
2
4
6
8
Time (sec)
Figura 9.11: Step response for Gwg . All methods. Operating point 16. some operating points have been plotted, and the attention has been focused on the most important transfer functions that could be used for the design of the control: Gα , Gwg and Gλ . Fig.9.13 shows the step response. The singular values of the error between the selected method (BST) and the original system are considered in Fig.9.12, and it can be seen that the result is satisfying. Figures 9.14 and 9.15 show the Bode diagram of Gα and Gwg respectively. It can be seen that the results are pretty much the same for the reduced model and for the original system. As last check also the positive zeros in the transfer functions of the reduced model have been calculated, to check if their frequency is not so changed from the original model (see Fig.9.2). This is important since they make a limitation in the close loop bandwidth of the system.
9.7 Conclusions The results achieved with 4 states are quite good and there might be the possibility to do something better. We have to consider that in those operating points in which the module of the transfer function is really low, -30, -40dB, the effect of the transfer function to the system is really small and then not so
9.7. C ONCLUSIONS
165
Op.14 singular values sys−bst
0
Singular Values (dB)
−20 −40 −60 −80 −100 −120 −2 10
10
0
2
10
10
4
Frequency (rad/sec)
Figura 9.12: Singular value plot of the error between the original system and the BST reduced model. Op.14 step response From: In(1)
From: In(3)
From: In(4)
Amplitude
sys bst
0
5
0
5
0
Time (sec)
Figura 9.13: Step response for BST method.
5
166
C APITOLO 9. M ODEL R EDUCTION
Op.14 Throttle − Torque
10
Magnitude (dB)
0 −10 −20 −30 −40 −50 0
Phase (deg)
sys bst −45
−90 −1 10
10
0
10
1
10
2
10
3
10
4
Frequency (rad/sec)
Figura 9.14: Comparison of Bode diagram of Gα for original system and the BST reduced model. Op.14 WG−Torque
Magnitude (dB)
40 20 0 −20
Phase (deg)
−40 180 sys bst
90 0 −90 −2 10
10
0
10
2
10
4
Frequency (rad/sec)
Figura 9.15: Comparison of Bode diagram of Gwg for original system and the BST reduced model.
9.7. C ONCLUSIONS
N=1200 (0p 1 to 4)
N=1500 (0p 5 to 11)
N=2000 (0p 12 to 18)
N=2600 (0p 19 to 25)
N=3000 (0p 26 to 32)
N=3500 (0p 33 to 39)
N=4700 (0p 40 to 45)
RHP ZERO (rad/s) ORIGINAL MODEL HANKEL 4 states 2.2 2.2 6 6.2 9.7 9.9 13.6 13.8 0.07 0.06 3.9 4.04 7.7 7.9 12.2 12.4 17.9 18 23 22.3 23.9 23.4 5.2 5.4 11 11.2 15.8 16 20.6 20.6 23.6 22.9 27.3 26.7 28.5 28.04 7.1 7.3 13.4 13.6 18.3 18.4 20.7 20.7 23.4 23.5 26.1 25.8 26.7 26.4 9 9.2 15.5 15.7 18.6 18.7 21.4 21.3 22 21.9 25.2 25 25.8 25.6 10.8 11 17.1 17.2 19.4 19.6 21.4 21.4 22.3 22.3 23.9 24.3 23.5 24.1 12.6 12.7 18.2 18.3 19.9 20.1 20.2 20.3 19.9 19.4 20.4 20
167
BST 4 states 2.2 6.1 9.8 13.8 0.06 3.9 7.8 12.2 17.9 23 23.9 5.3 11.1 15.9 20.6 13.9 23.6 26.07 26.7 9.1 15.6 18.6 16.1 21.4 22.07 9.1 15.6 18.6 21.4 22 25.1 25.7 10.9 17.2 19.4 21.4 22.4 23.9 23.5 12.6 18.2 19.9 20.3 20.1 20.6
Tabella 9.2: Frequency of the right half plane zero (rad/s) for the 45 operating points. The original system is compared with Hankel and BST methods (4 states).
168
C APITOLO 9. M ODEL R EDUCTION
important. So we can have a look to understand what happens to the transfer function between WG -Torque and Throttle-Torque, where these are above -10dB for example. This means that we have to consider operating point 11 or 18 to check the WG behavior, and operating point 12 or 15 to check the throttle one.
Op.16 WG 3 states
60
Magnitude (dB)
40 20 0 −20
Phase (deg)
−40 180 sys bal bst han
90 0 −90 −2 10
10
0
10
2
10
4
Frequency (rad/sec)
Figura 9.16: Gwg for 3 states. Comparison:Hankel, Truncation and BST methos. Operating point 16.
As is possible to see from the plots 9.16-9.17, all methods give a very good result, making the hypothesis that we are interested only in transfer function with a significant module. Under this assumption, 3 states seem to be a reachable final goal. The BST method works quite well especially where the module is really high, this because it tries to minimize the relative error instead of the absolute one, like Hankel or Truncation, and from the control point of view this is a good property. On the other hand, of course the BST will give a static error bigger than the other two methods, but for the control strategy point of view this does not seem to be a big problem. As shown in the previous sections, we cannot use 3 states for all the operating points. It changes a lot among the operating points, in some cases even 2 states could be enough. We will consider 4 states as final result, but
9.7. C ONCLUSIONS
169
Op.12 throttle 3 states
Magnitude (dB)
0
−20
−40
Phase (deg)
0 sys bal han bst
−45
−90 −1 10
10
0
10
1
10
2
10
3
10
4
Frequency (rad/sec)
Figura 9.17: Gα for 3 states. Comparison: Hankel, Truncation and BST methos. Operating point 12. the possibility of analyzing the best solution for each operating point can also be considered.
Capitolo 10
Multivariable System Analysis This chapter presents the analysis of the system using a different problem formulation, based on multivariable control. Depending on the selected inputs and outputs, different strategies for the control problem are possible: • SISO ⇒ one input (uwg ) and one output (torque) • SIMO ⇒ one input (uwg ) and two outputs (fuel consumption and torque) • MISO ⇒ two inputs (α and uwg ) and one output (torque) • MIMO ⇒ two inputs (α and uwg ) and two outputs (fuel consumption and torque) The SISO and SIMO formulations were presented through the previous chapters, while now MISO and MIMO problems are analyzed.
10.1 Directions in multivariable systems For a SISO system y = Gu, the gain at a given frequency is simply | y(ω) | | G(jω)u(ω) | y0 = = =| G(jω) | | u(ω) | | u(ω) | u0
(10.1)
The gain depends of the frequency ω, but since the system is linear it is independent of the input magnitude | u(ω) |. Things are not quite as simple for MIMO systems where the input and output signals are both vectors, and we need to sum up the magnitudes of the elements in the vector by use of some 171
172
C APITOLO 10. M ULTIVARIABLE S YSTEM A NALYSIS
norm. If we select the vector 2 − norm, the usual measure of length, then at a given frequency ω the magnitude of the vector input signal is u(ω)2 =
| uj (ω) |2 =
u210 + u220 + · · ·
(10.2)
j
and the magnitude of the vector output signal is y(ω)2 =
| yi (ω) |2 =
2 + y2 + · · · y10 20
(10.3)
i
The gain of the system G(s) for a particular input signal u(ω) is then given by the ratio
2 + ··· y 2 + y20 y(ω)2 G(jω)u(ω)2 = = 10 u(ω)2 u(ω)2 u210 + u220 + · · ·
(10.4)
Again the gain depends on the frequency ω and again it is independent of the input magnitude u(ω)2 . However, for a MIMO system there are additional degrees of freedom and the gain depends also on the direction of the input u.
The largest gain for any input direction is equal to the maximum singular value σ ¯ (G) = max u=0
Gu2 = max Gu2 u2 u2 =1
(10.5)
and that the smallest gain for any input direction is equal to minimum singular value σ(G) = min u=0
Gu2 = min Gu2 u2 u2 =1
(10.6)
The last identities in (10.5) and (10.6) follow because the gain is independent of the input magnitude for a linear system.
When plotting the singular values of the system, it can be seen that they mostly depend on pim . In fact changing operating point, the singular values change as well: their magnitude bode plot lifts up when switching to operating points with the same N but higher pim . So for those operating points with the same pim they are more or less the same. As an example, figure 10.1 shows the singular value for the operating points 12 ÷ 18. To go on with the analysis it is better to scale the system, so that conclusions can be drawn about input-output controllability.
10.2. S CALING THE SYSTEM
173
Singular Values 60
Singular Values (dB)
40
20
p_im
0
−20
−40
−60 −2 10
10
0
2
10 Frequency (rad/sec)
10
4
10
6
Figura 10.1: Singular values. Op from 12 to 18. The magnitude plot lifts up for increasing values of pim
10.2 Scaling the system Let the unscaled linear model of the process in deviation variables be ˆu yˆ = Gˆ
(10.7)
where a hat is used to show that the variables are in their unscaled original units. A useful approach for scaling is to make the variables less than one in magnitude [6]. This is done by dividing each variable by its maximum expected or allowed change: y = yˆ/ymax , u = u ˆ/umax
(10.8)
where • ymax – largest expected change in reference value • umax – largest allowed input change Since the expected or allowed variation of the variables about their nominal value is not symmetric, then the smallest variation should be used for umax and ymax .
174
C APITOLO 10. M ULTIVARIABLE S YSTEM A NALYSIS For MIMO systems each variable in the vectors yˆ and u ˆ may have a differ-
ent maximum value, in which case Dy and Du become diagonal scaling matrices. This ensures, for example, that all errors (outputs) are of about equal importance in terms of their magnitude. The corresponding scaled variables to use for control purposes are then ˆ y = Dy−1 yˆ, u = Du−1 u
(10.9)
On substituting 10.9 into 10.7 we get the scaled transfer functions G = Dy−1 GDu
(10.10)
then yields the following model in terms of scaled variables y = Gu
(10.11)
The system has been linearized around 45 operating points, so there are 45 different linear systems. For each of them the scaling matrices Du and Dy have to be set. The maximum reachable torque is around 300Nm, but it can not be assumed that it will vary up to the maximum value for each operating point since the linearized models are valid only in a neighborhood of the nominal values. So the largest expected change in the reference signal can not be 300Nm, but it has to be selected depending on the operating point. Let take as example operating point 12. Assuming that the WG can vary in the symmetric interval [-1,1], and the throttle (in mm2 ) between [0,1350] the scaling procedure gives: uwgmax = 1 αmax = min(| 0 − α ¯ ,12 |, | 1350 − α ¯ ,12 |) ¯ ¯ yf uel−max = min(f uelmax − | f uel |, | 0 − f uel ,12
yT q−max
= min(T qmax − | T¯q,12 |, | 0 − T¯q,12 |)
,12
|)
where the bar indicates the steady state value, and the subscript means operating point 12.
10.3 Singular value decomposition The magnitudes of the eigenvalues for MIMO systems do not provide a useful means of generalizing the SISO gain | G(jω) |. The problem is that the eigenvalues measure the gain for the special case when the inputs and the out-
10.4. M ULTIVARIABLE P OLES AND Z EROS
175
puts are in the same direction, namely in the direction of the eigenvectors. So analysis based on singular values is needed. The singular value decomposition (SVD) is defined according to [6]. Consider the transfer matrix in 10.15, with 6 inputs and 1 output, evaluated ¯ is a constant 1 × 6 matrix. So G ¯ can be decomposed at ω = 0, so that G(0) = G into its singular value decomposition: G = U ΣV H
(10.12)
The column vectors of U represent the output directions of the plant, while the column vectors of V represent the input directions. These input and output directions are related through the singular values. To see this, note that since V is unitary we have V H V = I, so (10.12) may be written as [6] GV = U Σ Define u1 = u ¯ , v1 = v¯, u2 = u and v2 = v .Then it follows that G¯ σ=σ ¯u ¯ Gσ = σu
(10.13)
The vector v¯ corresponds to the input direction with largest amplification, and u ¯ is the corresponding output direction in which the inputs are most effective. The direction involving v¯ and u ¯ is sometimes referred to as the ’strongest’, ’high gain’ or ’most important’ direction. The largest gain σ ¯ is for an input in the direction v¯, while the smallest gain σ is for an input in the direction v. Since the plant has more inputs than outputs, the additional input singular vectors v tells us in which directions the input will have no effect on the output. For dynamic systems the singular values and their associated directions vary with frequency and the frequency range corresponding to the closed loop bandwidth is of main interest. A desirable bandwidth is around 15Hz, that means approximately 60rad/s, so will be focused on the frequency range from 1rad/s up to 1000rad/s.
10.4 Multivariable Poles and Zeros The transfer functions from WG to torque in the MISO and MIMO cases are: GM ISO = [Gα GN Gwg Gλ ]
(10.14)
176
C APITOLO 10. M ULTIVARIABLE S YSTEM A NALYSIS yfuel
uwg
s u
s
1 u
0
uthrottle
1
ytorque
Figura 10.2: Outputs (right plot) resulting from use of u 2 = 1 (unit circle in left plot) for the system G. The maximum (¯ σ ) and minimum (σ) gains are obtained for u = v¯ and u = v respectively. GM IM O =
Gf uel GTq
=
Gα−f uel
GN −f uel
Gwg−f uel
Gλ−f uel
Gα−Tq
GN −Tq
Gwg−Tq
Gλ−Tq
(10.15) Poles have negative real part, so the system is always stable, while there are no transmission zero. Obviously it would be easier to design a controller on the SISO transfer function Gwg , but on the other hand, the SISO transfer function gives a RHP zero, so it imposes some limitation on the achievable bandwidth. The multivariable analysis shows that the positive zero disappears when considering more than one input, so the idea is now to try to get advantage from this information manipulating the system configuration.
10.5 Input-output controllability Input-output controllability of a plant is the ability to achieve acceptable control performance, that is, to keep the outputs within specified bounds or displacements from their references, in spite of unknown but bounded variations, such as disturbances, using available inputs and available measurements[6]. Controllability is independent of the controller and is a property of the plant alone, so the model G will be analyzed to find out what control performance can be achieved. The minimum singular value of the plant σ(G), evaluated as a function of frequency, is a useful measure for evaluating the feasibility of achieving acceptable control. Inputs and outputs have been scaled according section 10.2, then we can, with a manipulated input of unit magnitude, achieve an output of magnitude of at least σ(G) in any output direction. We generally want σ(G) as large as possible, and at least to avoid input saturation we want σ(G) larger
10.5. I NPUT- OUTPUT CONTROLLABILITY
177
than about 1 at all frequencies where control is required[6]. If σ(G) is below 1, it means that to move the output between -1 and 1, an input larger that 1 is needed, but input only can be smaller or equal to 1, so the input would saturate on its constraints. Plotting the singular value diagram of the scaled transfer function G for all the operating points, it comes out that in most of the cases it lies below 1. So a different approach is used, based on fixing the desired bandwidth for the system and then finding the corresponding maximum allowed set point change so that the minimum singular value lies above 1, for all the frequencies before the desired bandwidth. The strategy will be explained in the following sections, first for the MISO case and then for the MIMO problem.
10.5.1 MISO case For each operating point we proceeded as follows: 1. Scale the system with respect to the input Gisc = GDu
(10.16)
2. Fix a desired bandwidth ω ∗ = 60rad/s ≈ 15Hz 3. Plot the singular value of (Gisc ) and find the value X of the singular value at the frequency ω ∗ ; 4. Set Dy = X, in this way the singular value plot will be lifted by a factor X and at the frequency ω ∗ it will be 0dB. In this way we get all the allowed set point changes, given the desired bandwidth.
10.5.2 MIMO case When two outputs are considered, then the SVD gives two singular values. From the plot in figure (10.5) it can be seen that is not possible to control both the outputs independently, since the minimum singular value is very small and the plot lies below 0dB for all the frequency. Looking at the U vector, the maximum gain direction of the system refers to the situation in which both the
178
C APITOLO 10. M ULTIVARIABLE S YSTEM A NALYSIS
Singular Values 40
30
Singular Values (dB)
20
Gisc(60rads)=X 10
0
60rad/s
−10
−20 −2 10
10
−1
10
0
1
10 Frequency (rad/sec)
10
2
10
3
10
4
Figura 10.3: (Gisc ): Singular value plot.
Dy
70
60
50
40
30
20
10
0
0
10
20
30
40
50
operating point
Figura 10.4: Maximum allowed set point changes for each op.
10.5. I NPUT- OUTPUT CONTROLLABILITY
179
Singular Values 20
0
Singular Values (dB)
−20
−40
−60
−80
−100
−120
−140 −2 10
10
−1
10
0
1
10 Frequency (rad/sec)
10
2
10
3
10
4
Figura 10.5: Singular value plot. Op 12. torque and the fuel increase. That is quite obvious, since it is not physically possible to increase the torque while decreasing the fuel. To find the largest allowed set point change, we need now to consider the minimum singular value σ and require it to be 0dB at the desired bandwidth ω ∗ . So the procedure is slightly different from the MISO case, since now we need to consider the output directions as well. The procedure becomes: 1. scale the system with respect to the input GM IM Oisc = GM IM O Du
(10.17)
2. fix a desired bandwidth (ω ∗ ); 3. plot the singular values of (GM IM O )isc and find the value x for which the minimum singular value at the frequency ω ∗ is 0dB; 4. pick the minimum input vector u corresponding to the minimum gain direction and multiply u with x. 5. set Dy =
dT q 0 0 df uel
=
x 0 0 x
u1 u2
=
xu1 0 0 xu2
(10.18)
180
C APITOLO 10. M ULTIVARIABLE S YSTEM A NALYSIS
Singular Values 40
20 60rad/s
Singular Values (dB)
0
−20 x
−40
−60
−80
−100
−120 −2 10
10
−1
10
0
1
10 Frequency (rad/sec)
10
2
10
3
10
4
Figura 10.6: Singular value plot for GM IM Oisc . In this way we get all the allowed set point changes for both the torque and the fuel, given the desired bandwidth. Fuel
U Torque u1
U u2
Figura 10.7: Output directions of the plant.
10.6 SVD Controller We want to use the information got from the analysis of the multivariable system in order to design a simpler SISO controller instead od a multivariable controller. The idea is to look for a linear fixed combination of inputs and use it like a fictitious input. In this way the real inputs to the system cannot be moved independently, but only accordingly the linear combination proportions. A
10.6. SVD C ONTROLLER
1.2
181
−6 x 10 Maximum Torque variation in each Op. without hiting constraints
dTq 1
0.8
0.6
0.4
0.2
0
0
10
20
30
40
50
Figura 10.8: Maximum allowed torque variation for each op.
2.5
x 10
−3
Maximum fuel variation in each Op. without hiting constraints
dfuel 2
1.5
1
0.5
0
0
10
20
30
40
Figura 10.9: Maximum allowed fuel variation for each op.
50
182
C APITOLO 10. M ULTIVARIABLE S YSTEM A NALYSIS
natural choice for this combination is the one that maximizes the output of the system. Looking back to the SVD, the scaled system at zero frequency can be rewritten as Gsc = U ΣV . The maximum gain input direction is given by the column of vector V corresponding to the maximum singular value (V¯ ). So we can multiply V¯ for the original scaled system Gsc and get a 1 × 1 transfer function, from the fictitious input u ¯ to the torque (see Fig.10.10). The relation needs now to be rewritten in terms of the real system G, so we get: S = Dy−1 GDu V¯
(10.19)
Poles and zero of the new transfer function S are all stable and the RHP zero u
e C
V
Dy-1 GMISO D SISO
Figura 10.10: SVD controller disappears. In this way we can still design a SISO controller but we can get rid of the RHP zero limitations. The problem of this kind of controller is that is difficult to handle constraints. The first problem is that, as soon as one input hits the constraints, then there is no control on that input and so it is like having only 1 input again and the RHP zero will be back. The other problem is that the SVD controller uses a fixed combination of inputs, so when one saturates, also the other one cannot be moved independently. For this reason the controller design will not be based on this SVD controller, but the MPC will be used also for the MIMO case, as explained in the next chapter.
10.7 Conclusions This chapter presented the analysis of the control problem using two different formulations: • MISO control problem: two control inputs (throttle and wastegate) and one output (torque). • MIMO control problem: two control inputs (throttle and wastegate) and two outputs (fuel consumption and torque). At the end of the Chapter a control strategy based on singular value decomposition is described and discussed.
10.7. C ONCLUSIONS
183
The big advantage of a MISO-MIMO approach is that it gives the possibility to handle the RHP zero, present in the transfer function between WG and torque, and this is a good property for control.
Capitolo 11
MIMO Control Multi-variable control is investigated in this Chapter, as a potential means to alleviate the trade off imposed by the SISO control structure. In particular a multi-variable MPC is designed. The possibility for the controller to act on both the wastegate and the throttle, allows for a better use of the wastegate, which could be also used to increase the torque. Due to strong emissions governmental limitations, also the fuel consumption is then considered as output.
11.1 Introduction Figure11.1 shows the control problem formulation for the MISO case: two inputs (throttle and WG) and one output (torque). The wastegate actuator can only move between 0 and 1, where 0 means close and 1 means open. At steady state the wastegate is zero, so it can not be closed any further. That means that the controller action is limited and it can only help to reduce the torque. Designing the MPC on the MISO system gives one more degree of freedom: now the controller can act on both the wastegate and the throttle, and so can decide for a better use of the wastegate, which could be also used to increase the torque. So far the attention was focused only on the torque, since the driver demands for good engine’s performances in terms of available torque. But also emissions should be considered, since legislation imposes very strong limitations. So also fuel consumption is included as output, and the resulting control problem, shown in Fig.11.2, is now a MIMO problem: two inputs (throttle and wastegate) and two outputs (torque and fuel consumption). The following dis185
186
C APITOLO 11. MIMO C ONTROL
cussions are based on [5]. The throttle signal uth affects the intake manifold u_wg e
MISO C
alpha
Tq
PLANT
N ECM Lambda
T_amb, p_amb
Figura 11.1: MISO control formulation.
uwg MIMO alpha C N
Tq
PLANT Fuel_mass
ECM Lambda
Tamb, p amb
Figura 11.2: MIMO control formulation. pressure pim , while the wastegate signal uwg affects the exhaust back pressure pem and the boost pressure pcomp . When the system has to reach a certain state, e.g., when the torque Tq and engine speed N are fixed, one degree of freedom remains. This degree of freedom can either be used to keep the compressor speed at its highest possible level, which provides a fast transient response, or to lower the back pressure, which ensures good fuel economy. As shown in [5], the control problem can be faced with two different approaches, that will be described in section 11.2.
11.1.1 Best Fuel Consumption: formulation of the problem As shown in Chapter 2, the engine torque is modeled on the basis of the work produced, where net work Wn is determined from the gross indicated work Wig , produced by the high-pressure part of the engine cycle, minus the sum of pumping and friction work Wp + Wf during one cycle. Tq =
Wig − Wp − Wf Wn = 4π 4π
(11.1)
11.1. I NTRODUCTION
187
The gross indicated work is Wig = mf qHV ηig where qHV is the lower heating value of the fuel and mf is the injected fuel mass per engine cycle. The gross indicated efficiency ηig depends on the thermodynamic cycle and heat transfer. It is assumed to be independent of pim and pem . The pumping work is Wp = Vd (pem − pim )
(11.2)
and the friction work is Wf = Vd F M EP (N, m ˙ f) where the friction mean effective pressure FMEP depends mainly on the speed. The slight dependence on engine load is captured by the variable m ˙ f . The ¨ FMEP model used here is based on the ETH model (Inhelder, 1996; Stockli, 1989). With this parametrization, the friction model as well is independent of pim and pem .
The brake-specific fuel consumption BSFC is defined as the fuel mass flow m ˙ f divided by the generated power P,[5]. BSF C =
m ˙f m ˙f = P Tq 2πN
(11.3)
where N is the engine speed in revolutions per second. One problem with the definition of BSFC is that there is a singularity at zero torque. Therefore it is advantageous to look at
1 BSF C
=
T q2πN m ˙f
which then has to be maximized for
best fuel efficiency. Optimizing the cruising scenario with constant speed for the best fuel economy is thus the same as maximizing
Tq m ˙f
. For cruising we now
also consider the maximization under limited resources, that is a desired fuel flow m ˙ f,des , which now becomes max
˙ f) T q(uth , uwg , m
subject to m ˙ f (uth , uwg ) = m ˙ f,des
(11.4)
A constant fuel flow corresponds to a constant air flow, since we are restricting engine operation to stoichiometric conditions. This leads to the following
188
C APITOLO 11. MIMO C ONTROL
formulation of the problem max
˙ a) T q(uth , uwg , m
subject to m ˙ a (uth , uwg ) = m ˙ a,des
(11.5)
Studying the torque model under the constraints of constant speed and constant fuel mass flow and with the modeling assumptions, we see that the only term affected by the control inputs is the pumping work. Thus, maximizing 11.1 for constant fuel mass is identical to minimizing pumping work Wp . Dividing Wp by the constant Vd yields the following function to be minimized: U (pem , pim ) = pem − pim In turbocharged engines it is possible to have a pim that is higher than pem , which means that the pumping actually produces energy. It is now of great interest to see if the controller can take advantage of this effect to increase the engine output torque and fuel economy.
By manipulating the expressions of the air mass flow and the volumetric efficiency, the following function can be defined f e(pim ) =
pem = rc − pim
m ˙ apim
γ (11.6)
where a is a positive parameter. This function is always positive, and it is monotonously increasing with pim , since fe (pim ) = (rc − where rc −
m ˙ apim
˙ m ˙ γ−1 γ m ) >0 apim ap2im
(11.7)
> 0 follows from 11.6 and from the fact that the air mass flow
is positive. This relation says that pim monotonously increases with pem .
The function to be minimized, U (pim , pem ), can now be rewritten as a function with only one variable, V (pim ), using the definition of fe (pim ) V (pim ) = pem − pim = pi m(fe (pim ) − 1) So the optimal solution is to minimize pim .
11.2. C ONTROL DESIGN
189
11.2 Control design The fuel optimality statement says that it is always favorable to lower pim and pem as much as possible. The strategy indicated by this statement is to open the wastegate as much as possible. The controller to achieve this can be described as follows.
11.2.1 Layout 1: Fuel Optimal Control The analytical investigation showed that under the mentioned simplifications, it is always advantageous to keep the pressures before and after the engine as low as possible. This leads directly to the fuel-optimal controller that opens the waste gate as much as possible without reducing the desired air mass flow. Starting from low load the wastegate is fully open and the throttle is used to control the load. Only after the throttle is fully open the waste gate starts to close and controls the intake manifold pressures above ambient pressure.
11.2.2 Layout 2: Torque Optimal Control The torque-optimal strategy tries to keep the speed of the turbo charger as high as possible. In current series production cars it is implemented. The goal of this strategy is to keep the turbocharger on the highest possible speed. This is due to the fact that the rotational dynamics of the turbocharger are the limiting factor for the time response. This is achieved by closing the wastegate as much as possible until an appropriate boost pressure after the compressor pcomp is reached. This level lies above the maximum of pim , since the intercooler and the open throttle act as flow restrictions. In this strategy the throttle is used for load control and the wastegate is only used to limit the boost pressure.
11.3 Simulations with MIMO MPC In Chapter 8, the MPC was designed to control the wastegate, based on the SISO control problem formulation. Now the MPC is designed for the MIMO formulation, and so there are two control inputs (α and uwg ) and two outputs (torque and fuel consumption). Simulations results are shown afterward. Let recall the hypothesis on which simulations are based: • Tim is assumed to be constant
190
C APITOLO 11. MIMO C ONTROL
• we focus on engine operations with λ=1 • a constant engine speed test case was used to isolate the results from gearbox and vehicle influences • a torque based control is designed, so the reference signal is given in terms of torque • uwg can only vary between 0 (fully closed) and 1 (fully open) • the strongest constraints on the states are: - Tem < 1300K - ωt < 18000rad/s
11.3.1 Simulation on the Linear Model We start now to analyze the linear case, in order to better understand the system behavior and interpret the results of the controller. The system is strongly nonlinear, so is very difficult to design a suitable controller directly, skipping the analysis of the linearized system. Comparing Layout 1 and layout 2 The aim is to design one MPC and try to modify it, so that it could switch between the ideal controllers described by layout 1 and layout 2 in the previous section. In order to do this, one option is to tune the weights on the output variables (QT q and Qf uel ) so that it is possible to switch between the two layouts, and see if WG and throttle act as expected. For the Fuel Optimal Control the fuel consumption is weighted much more than torque, and viceversa for the Torque Optimal Control (Fig.11.3 and 11.4 show a comparison between the two layouts).
Another possibility is to use in the MPC Toolbox to set a pa-
rameter (Fast-Robust Control Slider) (see Ch.8) which tunes the weights based on requirements of robustness or fast response. It means that the weights were initially set to MV=[0 0], MVrate=[1 1] and Output=[0 100], i.e. Torque Optimal Control, since QT q > Qf uel . Moving the slider in the direction of higher robustness, we expect the weight on fuel to increase and consequently a slower response in torque, i.e. Fuel Optimal Control. So: • with QT q < Qf uel , the WG is more open during the transient and in steady state too, and also the throttle is more open, so the fuel is lower, both in transient and steady state, but the torque response is slower.
11.3. S IMULATIONS WITH MIMO MPC
191
WG
alpha
Plant Inputs
0
0.2
0.4
0.6
0.8
1 Time (sec)
1.2
1.4
1.6
1.8
2
Figura 11.3: Inputs. Up: throttle. Down: WG. Blue line: Torque Optimal Control (QT q > Qf uel ). Green line: Fuel optimal Control (QT q < Qf uel ).
torque
mfuel
Plant Outputs
0
0.2
0.4
0.6
0.8
1 Time (sec)
1.2
1.4
1.6
1.8
2
Figura 11.4: Outputs. Up:Fuel consumption. Down: Torque. Blue line: Torque Optimal Control (QT q > Qf uel ). Green line: Fuel optimal Control (QT q < Qf uel ).
192
C APITOLO 11. MIMO C ONTROL
• with QT q > Qf uel the WG is kept more closed, thus causing an higher fuel but a faster torque response. Simulation showed that results are the same that we expected, but obviously the results in term of response time and values of torque, throttle and WG, have to be interpreted considering that the system is linearized.
11.3.2 Considering Pumping Losses Let see now what happens to the pumping losses: another simulation is performed, similarly to the previous one, adding the pumping losses to the outputs of the system, together with torque and fuel. Operating point 27 is considered and a step of 50Nm is given to the torque reference, starting from the steady state value. To be able to see the pumping losses in the graphic interface of the MPC Toolbox, we add them as output and we do not weight them, so that they will not be considered in the optimization problem. Then we have now three possible configurations: 1. fast response 2. fuel economy 3. trade off as can be seen from Fig.11.5- 11.7. Analytical Explanation Now we try to understand what came out from the simulations from the analytical point of view, and to explain it looking at the pressures involved in the system. We require constant torque at steady state. The net torque can be written as: Tnet = Tgrass − Tf ric − Tpump
(11.8)
where Tpump = f (pim ). At the same time, if lambda is fixed to 1, then Tgrass ≈ m ˙ air ≈ m ˙ f uel . So if we reduce the pumping losses, then the requested m ˙ air decreases thus decreasing the requested grass torque too; consequently the fuel decreases, but the net torque is the same at steady state (see Fig.11.8). All this implies that the WG has to be kept open as much as possible, so that pim is minimized. The requested air mass flow will be satisfied by the throttle, which will be more opened.
11.3. S IMULATIONS WITH MIMO MPC
193
Plant Inputs 300 250
alpha
200 150 100
fast response trade off
50
fuel reduction 0 1
WG
0.5
0
−0.5 0.9
1
1.1
1.2 Time (sec)
1.3
1.4
1.5
Figura 11.5: Adding pumping losses. Inputs. Operating point 27 is considered and a step of 50Nm is given to the torque reference. Blue line: fast response; green line: trade off; red line: fuel economy. Plant Outputs 0.045
mfuel
0.04 0.035 0.03 0.025 140 130
torque
120 110 100 90 80 Time (sec)
Figura 11.6: Fuel consumption and torque. Blue line: fast response; green line: trade off; red line: fuel economy.
194
C APITOLO 11. MIMO C ONTROL
Plant Outputs 9
8
7
pumping
6
5
4
3
2 0.9
1
1.1
Time1.2 (sec)
1.3
1.4
1.5
Figura 11.7: Pumping losses. Blue line: fast response; green line: trade off; red line: fuel economy.
7SXPS
7RWDOWRUTXH
0BDLUBIORZ
0BIXHOBIORZ
Figura 11.8: If the pumping torque is reduced by opening the WG, then the requested grass torque is reduced too. Consequently the requested m ˙ air decreases thus decreasing the requested fuel. The net torque at steady state will be the same and the requested air mass flow will be satisfied by opening more the throttle.
11.3. S IMULATIONS WITH MIMO MPC
195
In terms of pressures we can write: m ˙ f uel = k1 pim − k2 Tq = k3 pim − k4 pem − k5
(11.9)
Wpump = Vd (pem − pim ) = f (pim ) where k1 , . . . , k5 are positive constants.
11.3.3 Simulation on the Nonlinear Model We look now at the nonlinear system. It has a lot of non linearities, like saturations, look up tables, switches, . . . , and so we expect that using only one MPC, based on just one linear system, it will not move so far from the operating point it is designed for. We give a step to the reference torque, from 100 to 150Nm and tune the MPC in order to simulate the same two layouts described previously. It is also necessary to tune the Overall Gain Slider Control in the MPC Toolbox, depending on the operating condition range. There are two possibilities for that, tuning the parameter Set Estimator when defining the MPCobject, or directly in the user interface. Also for the nonlinear system happens what we expected, i.e. the WG has different behaviors depending if the goal is to maximize torque response or fuel economy. Figures 11.9-11.11 show how the system response changes when changing the weights on the outputs. If QT q Qf uel the torque response is faster and the MPC keeps the WG closed all the time (Time Optimal control). The drawback is that the fuel consumption is higher as well as the pumping losses. Instead, if QT q Qf uel , the WG is fully open almost all the time and the throttle is used to control the load and bring back the torque to the reference. The torque response is then slower, but the advantage is in term of lower pumping losses and reduced fuel consumption, both during the transient and in steady state (Fuel Optimal control).
11.3.4 Comparison of the two controller versions The engine with the fuel-optimal controller has a longer response time since it starts with a lower speed of the turbocharger, but it has better fuel economy at cruising speed. A solution would be to connect the choice of the control strategy to an ”Eco Button”, with which the driver could choose between the good fuel economy and the fast transient response. As seen from the simulations, the MPC can handle this trade-off in a good way.
196
C APITOLO 11. MIMO C ONTROL
102 Pamb
Throttle
500
0
2
4
6
8
100 98
10
0 −2
2
4
6
8
20 Area WG
N
6
8
10
4
6
8
10
4
6
8
10
38 36
10
2002 2000 1998
4
40 Tamb
Lambda
2
2
2
4
6
8
10
2 x 10
−5
10 0 2
Figura 11.9: Simulation on Non Linear model.Inputs. Dashed-dotted line: if QT q Qf uel the torque response is faster and the MPC keeps the WG closed all the time (Time Optimal control). Full line: if QT q Qf uel the WG is fully open almost all the time; the torque is slower but fuel consumption is reduced.
160
Torque
140 120 100 80
2
3
4
5
6
7
8
9
10
pumping torque
6 fast respons e fuel optimizatio n
5 4 3 2 1
2
3
4
5
6
7
8
9
10
Figura 11.10: Simulation on Non Linear model.Torque. Dashed-dotted line: fast response, full line: fuel economy.
11.3. S IMULATIONS WITH MIMO MPC
197
air mass flow
0.04 0.035 0.03 0.025 0.02
2 x 10
2.5
fuel kg/s
3
4
5
6
7
8
9
10
−3
2 fast respons e fuel optimizatio n 1.5
2
3
4
5
6
7
8
9
10
Figura 11.11: Simulation on Non Linear model.Fuel. Dashed-dotted line: fast response, full line: fuel economy.
x 10
5
320 T before thro t
P before thro t
1.3
1.2
1.1
1
11
2 x 10
4
6
8
10
4
9 8 7
2
4
6
8
10
316 314 312
310 2 4 fast respons e fuel optimizatio n 10000 turbine speed
P intake M
10
318
6
8
10
6
8
10
8000
6000
4000
2
4
Figura 11.12: Simulation on Non Linear model. States. Dashed-dotted line: fast response, full line: fuel economy. The constraint on the turbine speed (ωt < 18000rad/s) is not violated.
198
C APITOLO 11. MIMO C ONTROL
5
1060 T exhaust M
1.2 1.15 1.1 1.05
1.04 P exhaustsyste m
x 10
2 x 10
4
6
8
5
1.035 1.03 1.025 1.02
2
4
6
8
1040 1020 1000
980 10 2 4 fast respons e fuel optimizatio n 1040 T exhaustsyste m
P exhaust M
1.25
10
6
8
10
6
8
10
1020
1000
980
2
4
Figura 11.13: Simulation on Non Linear model. States. Dashed-dotted line: fast response, full line: fuel economy. The constraint on the exhaust manifold temperature (Tem < 1300K) is not violated.
11.4 MIMO MPC on the Reduced Order Model In Chapter 9 a reduced order model was derived, in order to lighten the computational weight of the control problem, especially related to MPC in real time. So now the simulations are performed using the MPC designed on the reduced order model (M P Creduced ), and it is shown that results obtained with the original system are very close to the ones obtained with the reduced order model, thus confirming that a ”smaller” model can thoroughly replace the original one.
Simulation on the Nonlinear Model Now the MPC designed on the original model (12 stats) and on the reduced order model (6 and 4 states) is used. For simplicity, let call them M P Coriginal , M P Creduced6 and M P Creduced4 respectively. Operating point 15 is considered. The torque reference is a step, from 100Nm to 150Nm and step disturbances are added to the torque to test rejection. It can be seen that the torque correctly goes back to the reference and that the original MPC gives the same responses than the reduced version, both for torque and fuel (see Fig.11.14-11.15).
11.4. MIMO MPC ON THE R EDUCED O RDER M ODEL
102 Pamb
Throttle
200 100 0
2
4
6
8
100 98
10
0
2
4
6
8
10
4
6
8
10
6
8
10
6
8
10
20
19 s 4 state 2 4 6 state s −4 x 10 12 state 4 s Area WG
N
1 0 −1
2
21 Tamb
Lambda
2
−2
199
2
4
6
8
2 0
10
2
4
Figura 11.14: Reduced order model. Disturbance rejection. Inputs. M P Creduced4 and M P Creduced6 react to disturbances in the same way than M P Coriginal , when a disturbance is added to the throttle signal.
Torque
140
120
80
3
fuel kg/s
4 state s 6 state s 12 state s
100
2 x 10
3
4
5
6
7
8
9
10
3
4
5
6
7
8
9
10
−3
2.5
2
1.5
2
Figura 11.15: Reduced order model. Disturbance rejection. System responses for the MPC designed considering 12, 6 or 4 states are compared. The torque correctly goes back to the reference and the original MPC gives the same responses than the reduced version, both for torque and fuel.
200
C APITOLO 11. MIMO C ONTROL
11.5 MIMO MPC for α, WG and λ In Chapter 7 was showed that is possible to control λ in a more efficient way and improve the torque response during the transient. So here the MPC design is augmented, in order to to control also λ, together with α and WG. The transfer function from λ to torque (Gλ ) has a positive zero and so gives rise to an inverse response, if used as a single input. However, combining λ with α and WG, and controlling them independently, the RHP zero disappears. Due to emissions constraints Lambda can not be smaller than 1 in steady state, so the idea is to decrease lambda, i.e. maximize its efficiency, only during the transient. The linearized model does not include the lambda efficiency but, it still matches the nonlinear system in a good way. Looking at Gλ , can be seen that if λ increases, the torque increases too. Look now at Lambda efficiency (see Fig.11.16). If we consider only λ ∈ [0.9, 1], we get the same behavior than 1.4
1.2
Efficiency
1
0.8
0.6
0.4
0.2
0
0.8
1
1.2 Lambda
1.4
1.6
1.8
2
Figura 11.16: Lambda efficiency. the transfer function Gλ with respect to the torque. So we can require the MPC to respect the constraint 0.9 ≥ λ ≤ 1. The last problem to solve is to implement the MPC so that λ is used only during the transient. To do this we use the parameter target in the MPC Toolbox, and we write: MV(Lambda).TARGET=1 which means that Lambda will be equal to 1 in steady state. Figures 11.17 and 11.18 show the inputs and the outputs, respectively, for the operating point 15. It can be seen that, obviously, the solution which mini-
11.6. N UMERICAL ERRORS
201
mizes the fuel keeps λ = 1 during the transient, since λ < 1 would mean more fuel. Plant Inputs 300
alpha
250 200 150 100 1
WG
0.5 0 −0.5 −1 1
lambda
0.95 0.9 0.85 0.8 0.9
0.95
1
1.05
1.1 Time (sec)
1.15
1.2
1.25
1.3
Figura 11.17: MIMO MPC for α, WG and λ. Inputs. Blue line: fast response; green line: trade off; red line: fuel economy.
11.6 Numerical errors Many times during simulations we noticed strange behavior of the MPC Toolbox. In 70% of the cases the behavior has been correct, but anyway it could be interesting to go through a small analysis of the possible causes of these problems. Some common examples of strange behavior of the MPC toolbox could be described as follows: • The control input produced from MPC changes suddenly during steady state, even if no other input in the system is changed, and even if it is controlling the same linear system that has been loaded as plant of the MPC. • Opening and closing the MPC Toolbox interface in Simulink, the MPC Toolbox gives different simulation results.
202
C APITOLO 11. MIMO C ONTROL
Plant Outputs
0.04
mfuel
0.038 0.036 0.034 0.032
200
torque
190 180 170 160
0.9
0.95
1
1.05
1.1 Time (sec)
1.15
1.2
1.25
1.3
Figura 11.18: MIMO MPC for α, WG and λ. Inputs. Outputs. Up: fuel mass flow. Down: torque. Blue line: fast response; green line: trade off; red line: fuel economy.
The plant is strongly nonlinear (many look up tables, switches, saturations, hysteresis) so we cannot expect that a controller based on a linear system works perfectly. But anyway the two examples of strange behavior, mentioned above, seem not to be related to nonlinearities, but more to some numerical problem. The condition number of a matrix measures the sensitivity of the solution of a linear equations system to errors in the data [6]. It gives a clue of the accuracy for matrix inversion and linear equation solution. A condition number close to 1 indicates a well-conditioned matrix [23]. So the condition number of the system matrix A has been calculated, in order to check the possibility of numerical problems during our simulations. First of all, since the MPC Toolbox uses a discrete system for the plant, the original system has been discretized with the same sampling time that MPC Toolbox use, i.e. 0.0125 sec. The resulting condition number is: Cond1 = 3.6042e8 This number seems to be high and could be a possible reason for the strange behavior of the Toolbox. So we balanced the system to get a better conditioned A matrix. To do this we use the function ssbal in Matlab [23].
11.7. C ONCLUSIONS
203
Doing this we get: Cond2 = 1.5219e6 The number is still high. The idea is then to use the reduced model, derived in Chapter9 and see if something better can be obtained. The reduced system with 4 states is discretized first, and then the condition number is calculated: Cond3 = 17.3016 The number now is much better, so we can try to see what happens using this model inside the MPC Toolbox (see Fig.11.19-11.20)
1 Pamb
Throttle
1 0 −1
0
5
−1 1012 states model 0 4 states model 1 Tamb
Lambda
1 0 −1
0
5
10
0
5
10
0
5
10
0.4 Area WG
N
5
0 −1
10
1 0 −1
0
0
5
10
0.2 0 −0.2
Figura 11.19: The same inputs are given to the 12 states model (thin line) and to the 4 state model (thick line).
11.7 Conclusions A multivariable approach has been investigated to check if any benefit can be obtained by controlling more than one input of the system at the same time, i.e. throttle, WG and λ. An MPC controller has been used and many simulations on both linear and nonlinear system have been performed. The use of more inputs gives many advantages in the terms of fuel consumption and fast torque response trade off.
204
C APITOLO 11. MIMO C ONTROL
torque respons e 137.5 reference 4 state model 12 state model
137
Torque
136.5
136
135.5
135
134.5
0
2
4
6
8
10
Figura 11.20: Torque. Using the 12 states model (thin line), the MPC has a strange behavior at the beginning of the simulation. These problems are eliminated if using the 4 states model (thick line).
11.7. C ONCLUSIONS
205
In fact using the MPC is possible to simulate different scenarios, getting a faster torque response but using more fuel, or trying to minimize the fuel consumption and getting a slower torque response. So, setting different parameters, is possible to have different car behaviors with one controller. Opening or closing the WG in a certain percentage, is possible to reduce the pumping looses and so get the same net torque with less air mass flow, which means, keeping lambda equal to 1, less fuel consumption. A qualitative investigation on the linear system, using also the air to fuel ratio (λ) as manipulated variable, has been performed. Simulations showed that the use of λ as third controlled variable can give a benefit in terms of torque response during the transient. The drawback is that MPC is really sensitive to the strong nonlinearities present in the system, so is very difficult to tune it.
Capitolo 12
Conclusion In this thesis the possibility of a new and more advanced strategy for the wastegate control in a turbocharged engine was studied. The concept of turbocharging provides the advantage of better fuel efficiency, but entails some new challenges as well. Today the wastegate is actuated by means of a simple pressure valve which can be opened only when a certain pressure level over it is reached and is controller by a PI plus a feedforward action tuned on the engine. Here is presented the possibility of integrating an electronic boost controller, i.e. substituting the pressure valve used today with an electronic valve, which can be opened and closed whenever is needed and independent from the particular engine. The idea is to investigate which kind of benefits can be obtained with this solution. The main characteristics of a turbocharged engine were investigated and analyzed from a control point of view, in order to be able to understand the problem and so design the requested controllers. A nonlinear Mean Value Engine Model (MVEM) has been first studied and then used for simulations. The original model has been enriched with new features. Different volumetric efficiency models have been tested, both in the control unit and in the engine model. The one tuned directly on the car resulted to be the most suitable for modeling and control design. Spark advance and lambda efficiencies were added to the model, as well as exhaust temperature correction depending on spark advance, in order to result more realistic. In this way also the torque behavior better fits the real response. To check that the new modified model still represented the real system, a validation has been performed, comparing data recorded from the car and data got from the Simulink model, giving the same inputs. Simulations showed that the model has a good level of accuracy. 207
208
C APITOLO 12. C ONCLUSION The nonlinear model is described by 45 different linear systems, each one
with 6 inputs (throttle, engine speed, wastegate, lambda, ambient pressure, ambient temperature), 2 outputs (torque and fuel mass flow) and 13 states (pressures, temperatures and turbine speed). The assumption of constant intake manifold was made, in order to express the torque and the fuel consumption as a linear function of the states. Ambient pressure and temperature are considered as disturbances. Since the controllers will be based on the linearized model, is very important that it captures the main dynamics of the system. Simulations showed that results change for the chosen operating point. Generally, due to the strong nonlinearities of the system (look up tables, switches, saturations, . . . ), the linearized model is consistent with the nonlinear one just very close to the point it was linearized on. A mathematical analysis of the linearized model in all the 45 operating points was carried out, in order to point out the main characteristics and fundamental limitations of the system, from the control point of view. All the 45 linearized systems are full controllable and observable, have stable poles, and are nonminimum phase. The main limitation for the wastegate control strategy is represented by the right half plane zero in the transfer function between wastegate and torque. Consequently the bandwidth is limited between 1-5Hz, meanwhile the main system dynamics, represented by the intake manifold system, is around 15Hz. This led to investigate a MIMO approach to overcome this problem. Control design was performed on a SAAB 9-3 L850 2.0 turbocharged engine. The question is how to open and close the wastegate in a way to maximize the torque response during the transient: an optimal control problem has thus to be solved. By designing choice a torque based strategy is used. First, Linear Quadratic (LQ) techniques, including integral action of the error between the desired and measured torque, anti wind-up and feedforward gain, have been applied, with full state feedback architecture, since all the state were available for measurements. Simulations were performed first on the linearized system. In 90% of the cases the LQ controller kept the wastegate closed during the transient. Only in simulation of low loads (for example operating point 12) the WG is opened for a short while at the beginning of the transient. At low load the pumping losses are higher, and can be significantly reduced opening the WG. At the same time, the pressures in the system are not so high, especially the intake manifold pressure, and so the drop is not as big as in high load conditions. The torque, compared with keeping the WG closed all the time, increases at the beginning, when the WG is opened, but then it drops
209 down when the WG is closed again. It is possible to conclude that, depending on the difference between the torque gained at the beginning of the transient and lost at the end, could be worth or not opening the WG. Reference tracking and disturbance rejection were simulated and the torque correctly followed the set point, with different rising time depending on the the selected operating point. The same simulations were performed also on the nonlinear system, showing that a gain scheduling strategy was necessary to cover all the system dynamics (0-300Nm). First, fixed engine speed was considered, using 7 LQ controllers, one for each operating point and a scheduler based on the intake manifold pressure. Then a more realistic scenario, with variable engine speed, was simulated, using different sets of LQ controllers for each engine speed. In both cases, the scheduler correctly selected the LQ controller and simulations showed better results than using just one controller. Further investigations showed that is possible to use only 3 LQ controllers for each engine speed, without performance deterioration. Generally the LQ approach to improve the transient torque response showed just small benefits at low load conditions in compare with PI control strategy. Bigger advantages are obtained in terms of independence of the controller from the specific engine used, and disturbance rejection. An independent controller for lambda was also designed to maximize the lambda efficiency during the transient. It showed improvements of 1-3% in the transient torque response, without big increase of the fuel consumption. Since the system operates near a constraint boundary, constraints are an inescapable part of the problem formulation and a more general control design, including the constraints from the beginning is suitable. So another solution based on Model Predictive Control (MPC) has been investigated. Simulation of the SIMO scenario, considering torque and fuel consumption as output, showed that is possible to tune the controller in different ways in order to get different transient behaviors of the WG and consequently of the system response. It is possible then to have faster torque or less fuel consumption. The MPC shows fast rejection to both measured and unmeasured disturbances. For the MIMO case, the MPC managed in a good way the trade off between fast response and fuel economy. The different is that now, using throttle and WG as controlled inputs, is possible to reduce the fuel consumption both in transient and steady state. Keeping the WG more open is possible to generally reduce the pumping losses, and so have less air mass flow into the engine to reach the same net torque. Less air mass flow requested means, considering lambda equal to 1, less fuel consumption. Simulations showed that is
210
C APITOLO 12. C ONCLUSION
very hard to tune the MPC Matlab Toolbox on the nonlinear model, probably due to the strong nonlinearities present in the system (lookup tables, switches, saturations, . . . ). The MPC was extended to consider also lambda as manipulated variable and to include constraints on the states. The simulations performed on the linearized system showed that, when the target is fuel economy, lambda is correctly kept equal to 1, and throttle and WG are more open. Different model reduction techniques over the linearized system were used, like Hankel norm approximation, balanced residualization, balanced truncation and BST. Considering to reduce all the 45 linearized systems to the same number of states, a model with 4 states was derived, without significant performance deterioration, achieving generally a maximum relative error of 5%. MPC has been tested also on the reduced order model, comparing results achieved when using the plant with 12, 6 or 4 states. Responses are pretty much the same. The MIMO approach showed benefits in compare with using independent controllers designed on the SISO system, as implemented now in the car control unit. Of course this leads to a more complex design, but the MPC approach seems to be a suitable solution. The MPC Toolbox results not to be enough reliable for future industrial application, so a solution could be to use a different implementation for the MPC. The Simulink model used is very accurate but perhaps too complex for control design. The idea could be to use a ”smaller” nonlinear system, able to capture the main dynamics of the system, to simplify then the controller development and afterwards test it on the detailed original model.
Bibliografia [1] I.Kristofersson, “Model predictive control of a turbocharged engine,” Master’s thesis, Royal Institute of Technology, Stockholm, 2006. [2] L. Eriksson and L. Nielsen, Vehicular Systems.
¨ Linkoping Institute of
Technology, 2006. [3] P. Andersson, “Air charge estimation in turbocharged spark ignition ¨ engines,” Ph.D. dissertation, Linkoping University, Sweden, 2005. [4] A.Karnik, J.Buckland, and J.Freudenberg, “Electronic throttle and wastegate control for turbocharged gasoline engines,” American Control Conference,Portland,USA, 2005. [5] C. L. Eriksson, S.Frei and L.Guzzella, “Control and optimization of turbocharged spark ignited engines,” 15th Triennial World Congress, Barcelona, Spain, 2002. [6] S.Skogestad, Multivariable Feedback Control-Analysis and design, Wiley, Ed. Wiley, 2005. [7] H.Khalil, Nonlinear Systems. Prentice Hall, 2000. [8] N. P.Bolzern, R.Scattolini, Fondamenti di Controlli Automatici.
McGraw-
Hil, 1998. [9] A.Bemporad, M.Morari, V.Dua, and E.Pistikopoulos, “The explicit linear quadratic regulator for constrained system,” Automatica, vol. 38, no. 1, pp. 3–20, 2002. [10] N.Watson and M.Janota, Turbocharging the Internal Combustion Engine. The Macmillan Press Ltd, London, 1982. [11] J. Heywood, Internal Combustion Engine Fundamentals, Singapore 1988. 211
212
B IBLIOGRAFIA
¨ [12] C. Elmqvist-Moller, “1-d simulation of turbocharged si engines - focusing on a new gas exchange system and knock prediction,” Ph.D. dissertation, School of Industrial Engineering and Management Royal Institute of Technology, Stockholm, 2006. [13] S.-A. C. by Ion-Sensing and Interpretation, “L.eriksson,” 1998. [14] K.Khairuddin, “Factors affecting the engine performance,” Ohio State University, November 2005. [15] T.Glad and L.Ljung, Control Theory. Multivariable and Non Linear Methods. Taylor and Francis, 2000. [16] S. A. Fre, “Performance and driveability optimization of turbocharged engine systems,” Ph.D. dissertation, Swiss Federal Institute of Technology, Zurich, 2004. [17] T.Perez, “Control design. lecture notes.” 2006. [18] J.Hespanha, “Optimal control:
Lqg/lqr controller design. technical
report,” 2004. [19] C.Gambelli, “Controllo del regime di minimo per sistemi ”torque based”: un approccio polinomiale,” Ph.D. dissertation, Facolt`a di Ingegneria di Firenze, 2007. [20] E.Jacobsen, “Control theory and practice. lecture notes.” 2007. [21] J.M.Maciejowski, Predictive Control with constraints.
Prentice Hall, 2002.
[22] C. Edberg, “Control of systems with constraints,” Master’s thesis, KTH, Sygnal Sensors and Systems, 2004. [23] Matlab Help, Robust Control Toolbox. [24] A.Bemporad, “Controllo digitale. lecture notes.” 2006.
View more...
Comments