wcica-talk - amsslsc.amss.ac.cn/wcica2012/sites/lsc.amss.ac.cn.wcica2012/... · 2013. 1. 22. ·...
TRANSCRIPT
-
2012-7-6 Beijing
H. ChenJilin University
Applying MPC in Automotive Systems
WCICA 2012
-
2012-7-6 Beijing
Outline
Basic of MPC
State of the art in MPC
Examples of applying MPC in automotiveModeling driver behavior based on MPC
Data-driven MPC for AMT
MPC for controlling tire blowout vehicle
FPGA-based MPC implementation
Challenges and opportunities
-
2012-7-6 Beijing
past future
predictive output y
control u
model, prediction, optimization, time-domain constraints, moving horizons
-
2012-7-6 Beijing
Idea beyond MPC
open-loop or closed-loop
optimal or just feasible
A constrained control problem is solved online. It could be
Only a part of the resulting controls is applied into the plant
Why should be repeatedly solved?Solved in general in finite horizonDisturbances/model uncertainties real dynamics is different from the predicted dynamics.Trade-off between satisfying constraints and attenuating disturbances
The procedure is repeated, if new measurements are available
-
2012-7-6 Beijing
MPC Optimization problem
First principles model Empirical model Hybrid modelNeural network model Fuzzy model Data-based……
Using continuous-time model
Using discrete-time model
Prediction model could be
Constraints appear in their original form
The functionality not the form of models is important
-
2012-7-6 Beijing
Issues in MPC
if the constrained control problem is solvable?if we can find a feasible (optimal) solution at each time sampling time?
Feasibility and tractability. Have to answer
Robustness against
Stability of the MPC closed-loop systemsoptimality does not imply stability Mayne’96the MPC closed-loop system may be not stable even if the controller obtained ateach sampling time is stabilizing
model uncertaintiesexternal disturbances (disturbance attenuation)
AlgorithmsMPC algorithms (e.g. different prediction models, DMC, MAC,… )Optimization algorithms (e.g. active set, interior point, dual algorithm, particle swarm optimization, …)
-
2012-7-6 Beijing
State of the art in MPC
MPC with guaranteed stability
Robust MPC
-
2012-7-6 Beijing
MPC with guaranteed StabilityInfinite horizon MPC
Optimization problem
Properties Optimality (Feasibility) implies closed-loop stabilityInfinite dimensional optimization problem
Computational intractable
Keerthi/Gilbert’88
-
2012-7-6 Beijing
MPC with guaranteed StabilityMPC with terminal equality constraint
Optimization problem
Finite horizon = infinite horizon
Keerthi/Gilbert’88Mayne’90
Rawlings el at'93,94Genceli/Nikolaou'95
-
2012-7-6 Beijing
MPC with terminal equality constraint
Clear formulationNo off-line computation of controller parameters Closed-loop stability is achieved via terminal equality constraint
Properties:
Comments:
The system should be finite time controllableNumerically hard to satisfy the equality constraintSmall feasible setNo inherent robustness at all
-
2012-7-6 Beijing
MPC with guaranteed stabilityQuasi-infinite horizon MPC
Introduce terminal penalty and terminal constraint
Quasi-infinite horizon
Chen/Allgower’96,98
-
2012-7-6 Beijing
Terminal set is defined as
together with terminal penalty satisfyconstraints are satisfied in terminal set
terminal penalty function is CLF-like
monotonicity of the value functionstability
Quasi-infinite horizon MPC
-
2012-7-6 Beijing
Quasi-infinite horizon MPC
Feasibility at the initial time (t=0) implies feasibility at all times (t>0) Closed-loop stability is achieved via suitable choice of terminal inequality constraint and terminal penalty
Properties:
Merits:Inequality constraint is easier to implement than equality constraintFeasibility but not necessarily optimality is neededLarge feasible setInherent robustness for some disturbances or uncertainties
Yu/Marcus/Chen/Allgower’11
-
2012-7-6 Beijing
Robust MPC
Key point: closed-loop prediction is required
Big barrier: computation intractable, even for linear system
Campo/Morari'87Allwright/Papavasiliou'92
Zheng/Morari'93Chen/Scherer/Allgower’97
Magni et al.’03
Explicit description of uncertainties or disturbances requiredMin-max problem: maximization over a set of uncertainties/disturbances
-
2012-7-6 Beijing
Introduce terminal set and terminal penalty to prove robust stability
Assume continuity of value function to prove ISS property
Introduce dissipation constraint to achieve H∞ performance
Assume the disturbance is norm-bounded to prove robust stability
Assume the disturbance is measurable to achieve H∞ performance
Robust MPCRender min-max problem solvable by parameterization of the control
Kothare/Morari’96,…
Chen/Scherer/Allgower’97,Rossiter et al’98,…
Mayne/Rakovic/Fineisen/Allgwoer’05
Goulart/Kerrigan/Maciejowski’06
Show robustness of the closed-loop system
Raimondo/Limon/Lazar/Magni/Camacho’09
Chen/Scherer/Allgower’97
Goulart/Kerrigan/Maciejowski’06
Chen/Scherer’06,Chen/Gao/Wang’07
Mayne/Rakovic/Fineisen/Allgwoer’05
-
2012-7-6 Beijing
Examples of applying MPC in automotive
MPC-based driver modeling
Data-driven MPC for AMT
MPC for controlling of blow-out tire vehicle
FPGA-based MPC implementation
-
2012-7-6 Beijing
To test and evaluate vehicles in driver-in-the-looprepeat exactly the same testsdeliver objective evaluationdo dangerous testsreduce test costs…
1. MPC-based driver modelingWhy do we need a driver model
Unmanned drive/ Autonomous vehicle
Good?+
To test control systems and ECUs in driver-in-the-loop
-
2012-7-6 Beijing
Predict the vehicle’s motion
Plan the trajectory by comparing
Make a decision
Steer
Brake
Accelerate
Repeat
The driver’s behavior is fit in the basic of MPC well
Road path Why MPC is suitable for modeling drivers
Driver collects/usesRoad informationTraffic informationVehicle state Driving experience
MPC-based driver modeling
-
2012-7-6 Beijing
Driver behavior model
DelayNeuralPhysiologic
Perception module
Knowledge and experience
Decision module
Execution module
The structure of driver behavior model
MPC-based driver modeling
-
2012-7-6 Beijing
:Prediction horizonPath preview (single-point preview)
Internal vehicle dynamics (bicycle model)
Optimization
Delay
:Longitudinal velocity
(minimize the lateral path error and fuel consumption)
A simple example
MPC-based driver modeling
-
2012-7-6 Beijing
s.t.
Parameterize
Plan trajectory based on differential flatness
Flatness outputs
Trajectory planning is simplified to plan flatness outputs.
States inputs and outputs can be expressed by and their derivatives.
MPC-based driver modeling
-
2012-7-6 Beijing
Simulation results
φ,θ,ψ
x y zv ,v ,v
SuspensionModels
( , )s wg z zΔ Δ
Drivingtorque
Car Body Model
( , , , , , )f x y z φ θ ψBrakingtorque
Steerangle
φ,θ,ψ
Input fromground
Vertical forces
Tire Models
Longitudinal forcesLateral force
Vx, V
y
Vertical foces of tires
( , )wq zω Δ
14 degrees of freedom vehicle dynamic model
Sinefunction
Double lane function
MPC-based driver modeling
-
2012-7-6 Beijing
Issues need to addressHow to describe the human decision criteria in the objective function
What for a model form is suitable to describe the driver experienceFirst principle model
Data-based model
Learning-based model
Mixed model
…
MPC-based driver modeling
-
2012-7-6 Beijing
Lu/Chen/Wang’10Vehicle start-up
Frequent stop-startStart-up too fast/slow
Fuel economyDriving comfort
SafetyLaunch on slope road...
...
2. Data-driven MPC for AMT
-
2012-7-6 Beijing
Control requirements
The range of engine speed is limited
The maximum friction clutch torque is restricted
Frequency response of the clutch actuator is limited
minimize clutch lockup timeensure smooth accelerationminimize friction losses
Avoid stalling
the engine
Vehicle start-up
Data-driven MPC for AMT
Hard constraints
FastSmooth
Friction loss
Clutch engagement
-
2012-7-6 Beijing
Engine torque map Engine friction torque map
Clutch spring characteristics mapslip rate and tire/road friction map
Powertrain of a rear driven truck
Data-driven MPC for AMT
Complex dynamics due to combustionvibrationfrictiontire-ground mechanics
Long-term aging of rotating partsBacklash in gearsSwitching due to gear shift
-
2012-7-6 Beijing
Subspace Identification
Data-driven predictive control (Huang’03)
I/O Data
Hankel matrix
MPC
Orthogonal/oblique projection
State sequence,Extended
Observability matrix
Least square
System matricesA,B,C,D
mea
sure
men
tOptimization
Control input
System matrices A,B,C,D
Prediction equation
Data-driven Predictive Control
I/O Data
Hankel matrix
Least square
Optimization
Control input
Predictionequation
mea
sure
men
t
Data-driven MPC for AMT
-
2012-7-6 Beijing
Data design:excite the vibration of clutch, drive shaft, tyre…
Input
0 50 100 150 200 250 300 350 400 450 5000
20
40
60
80
100
120
140
160
180
Tc (N
m)
0 50 100 150 200 250 300 350 400 450 500-50
0
100
200
300
Δ ω
(rad
/s)
Excite dynamics relevant to the control goal
fast “engaged”fast “disengaged”
AMESim ModelMedium Truck6.2L Diesel EngineDry Clutch
Output
Data-driven MPC for AMT
-
2012-7-6 Beijing
Validation
Predictive Output vs Actual Output
Prediction Equation
Clutch Speed
Data-driven MPC for AMTPrediction Equation
validation data
off-line data
-
2012-7-6 Beijing
Data-driven predict control
Optimization
anti-jerk (smooth)fast engagementTime-domain constraints
limitation on clutch friction torque
limitation of clutch actuator
limitation of engine speed
Control InputSolve the optimization problem at each sampling time
Data-driven MPC for AMT
Predicted output
-
2012-7-6 Beijing
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
200
400
600
800
Tc (
Nm
)
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
55
100
150
200
ωe, ω
c (ra
d/s)
ωe
ωc
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
50
100
150
200
Δ ω
(rad
/s)
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-20
-10
0
10
20
time (s)
a (ra
d/s2
),da
(rad/
s3)
ada
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
200
400
600
800
Tc (
Nm
)
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
20
55
80
100ω
e, ω
c (ra
d/s)
ωe
ωc
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
50
100
Δ ω
(rad
/s)
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-20
-10
0
10
20
time (s)
a (ra
d/s2
),da
(rad/
s3)
ada
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
200
400
600
800
Tc (
Nm
)
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
55
100
150
ωe, ω
c, (ra
d/s)
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
50
100
150
Δ ω
, (ra
d/s)
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-20
-10
0
10
20
time (s)
a (ra
d/s2
),da
(rad/
s3)
ωeωc
ada
Simulation results in different conditions
Data-driven MPC for AMT
-
2012-7-6 Beijing
Issues need to addressHow to use on-line data effectivelyHow to predict nonlinear dynamics How to guarantee stability…
Data-driven MPC for AMT
-
2012-7-6 Beijing
MPC
3. MPC for controlling tire blowout vehicle
stay safe, avoid roll-overkeep the vehicle in the lane
Control requirements
What is “tire blowout”The sudden deflation of a vehicle tire is called as tire blowout.
path following safety constraint
-
2012-7-6 Beijing
rolling resistance coefficient cornering stiffness
MPC for controlling tire blowout vehicleModeling (bicycle model) without tire blowout
with tire blowoutDescribe the effect of tire blowout
Lateral force is changedIntroduce an additional yawing moment
-
2012-7-6 Beijing
MPC for controlling tire blowout vehicleOptimization (minimize the lateral path error)
Path preview (single-point preview) : Prediction horizon
Model predictive control problem description
Objective function
Safety constraint
Control block diagram
-
2012-7-6 Beijing
on a straight roadfront left tire blowout
velocity: 120 km/htire-road friction coefficient: 0.8
Lateral displacement of vehicle on the straight road Sideslip angle of vehicle on the straight road
Yaw rate of vehicle on the straight road Tire slip angle of vehicle on the straight road
Simulation result
MPC for controlling tire blowout vehicle
-
2012-7-6 Beijing
velocity: 120 km/htire-road friction coefficient: 0.8
Lateral displacement of vehicle on the crooked road Sideslip angle of vehicle on the crooked road
Yaw rate of vehicle on the crooked road Tire slip angle of vehicle on the crooked road
on a left crooked roadrear right tire blowout
Simulation result
MPC for controlling tire blowout vehicle
-
2012-7-6 Beijing
Issues need to addressHow to create more accurate models for a tire blowout vehicleHow to validate the modelHow to test the controllerHow to reduce the computation cost and the code size…
MPC for controlling tire blowout vehicle
-
2012-7-6 Beijing
MPC needs to solve an optimization problem on line, but
fast dynamics dominated in automotive systemslow-cost computation and memory (controller on a chip)low-cost development
Solution efficient MPC algorithmsfast optimization algorithmshardware architectures for parallel computations
4. FPGA-based MPC implementation
-
2012-7-6 Beijing
Embedded implementation of MPC on an FPGA
Hardware accelerationcustom instructions: fine-tune the system hardwarecustom peripherals: coprocessor, parallel computing
Hard processor cores: higher performancelow power consumption
Soft cores (Nios II): more flexibleeasy to use
FPGA-based MPC implementation
SoPC technique
-
2012-7-6 Beijing
Design flow on FPGA/SoPCAnalysis of system requirements
MPC algorithm analysis: floating point matrix operations, the sizes of matrices, …system analysis:
Nios II fast core, standard IP cores, …
Hardware designbuild Nios II systemdefine custom instructions (floating point operations, …) design custom peripherals (matrix operations, …)
Software design (Nios II IDE)program C/C++ codes of the MPC algorithmapply the macros of custom instructions
Software
Analyze system requirements
Define and create the SoPC system
Configurable soft core processor and IP-cores
Add custom instructions and peripherals
Compilation andsynthesis
Download the file to FPGA device
Apply the macros of custom instructions
Compile and generate executable files
ISS run and debug
Write MPC code in C/C++ language
Hardware
Real-Time simulation on target board
FPGA-based MPC implementation
-
2012-7-6 Beijing
Prototyping environment
FPGA board: hardware implementation of the MPC controllerCyclone II, Stratix III, …
Real-time simulation systemrun plant model and monitor resultsdSPACE, xPC-Target, …
PC1 and PC2design the SoPC system of MPC controllerQuartus II, SoPC builder, Nios II IDE
UART
MPC controller
UART
Model
dSPACE orxPC-Target
Monitor
ComputerFPGA RS 232PCI
PCI
Cyclone II FPGA and dSPACE
Stratix III FPGA and xPC-Target
FPGA-based MPC implementation
-
2012-7-6 Beijing
Results of controlling an electronic throttle Chen/Xu/Xi’12
Time taken to solve one QP by using custom instructions
solving one QP
completely in software
solving one QP by using custom
instructions
Time taken to solve one QP by using different optimization methods
NPSOL: commercial
software packages
FPGA-based MPC implementation
-
2012-7-6 Beijing
Challenges and opportunities
Various models due tocomplex dynamics: fuel/air mixing, compression, combustion, aftertreatment, vibration of rotating parts, friction….tires - ground mechanics …heavy coupled
Model-based predictionFunctionality is importantDo not care the model form
Automotive controlProperties of MPC
Trade-off various requirementsdrivabilitycomfortfuel economy …
Hard constraintssafety constraintsemission regulationactuator saturation…
On-line optimization
Explicit handling of constraints
MPC is a suitable solution for automotive control
But applying MPC in automotive is not trivial !
-
2012-7-6 Beijing
Challenges and opportunities Efficient algorithms ( MPC and optimization)
formulate various requirements in the optimization problemdrivabilityfuel economycomfortemission regulation…
predict nonlinear dynamics based on on-line dataattack numerical difficulties due to using various prediction models
data-based modelphysically/data mixed model …
do fast prediction/computation do fast optimization….
develop satisfying control system on a chip
-
2012-7-6 Beijing
Challenges and opportunities
Robustness: an open problem!!!
Stability: existing stability results are invalid, due to the use of various prediction models
data-based modelphysically/map mixed modelswitching model…
objective function being not positive definite
Data-driven MPCPhysically/data mixed MPCHybrid MPC Economic MPC…..
-
2012-7-6 Beijing
Thank You !
WCICA 2012