European Control Conference, July 8 th, 23 Zurich, CH MITSUBISHI ELECTRIC RESEARCH LABORATORIES Cambridge, Massachusetts Explicit MPC in Mechatronics Industry: Technology Transfer Potential and Limitations Dr. Stefano Di Cairano, Mechatronics, MERL MERL
Mechatronics Industry Applications Factory automation Building systems Automotive Transportation systems Constrained, multivariable, optimal control problems MPC a natural candidate but computing resources are limited MERL7/8/23 /2
MPC in Mass Production Applications We would like to solve: at high rates (>Hz) in: low computing power, fixed-point arithmetic (some), limited RAM, small ROM, low power consumption MERL7/8/23 2/2
Smart Algorithm Balance Sheet For mass production devices the balance sheet is fundamental Scenario: M devices/year, 5 years. CPU++ = +$ 5M$ (parts) smart algorithm 5M$ (5 researchers) Result: 9% cost reduction (and happy researchers) MERL7/8/23 3/2
Analysis, Verification, Transfer but in mass production applications there is more application runs unsupervised Simulation model, system specs. Prediction model design Prediction model based on simulation model Model order, Specs Model and specs assessment. Horizon, perf. weights. Controller design Controller design based on simulation model all admissible operating conditions will occur (sooner or later) Model params, perf. weights, filter weights. Perf. weights, filter weights. Performance and complexity assessment. Sensor in-the-loop. Controller Refinement Prediction model and controller refined by experimental data. Estimator tuning. Sensitivity assessment. Controller in-the-loop. Validation On-the-car calibration. Robustness assessment. researchers are not in charge for final product implementation Need a final algorithm: -analyzable -verifiable -understandable MERL7/8/23 4/2
Impact of Explict MPC for MPC Implementation Simple solution of a complex problem (by a complex algorithm) Bemporad, Morari, Borrelli, Kvasnica, Jones, that can run in minimal hardware reg=; r=; notfound=true while(r<=nr & notfound){ r++; i=; while(i<nineq[r]&& allsat){ if(h[r][i][]x[]+ +H[r][i][n]x[n]> K[r][i]) allsat=false MERL7/8/23 5/2 } i++;} if(allsat){ reg = r; notfound = False;} for(i=;i++;i<=n) /* Region search */ /* Input computation */ u[i]=f[reg][i][]x[]+ +F[reg][i][n]x[n]+ G[reg][i]
Explicit MPC Capabilities: Easy Implementation HEV energy management Coordinate the action of combustion engine and electric machines to minimize fuel consumption Power smoothing approach by MPC Di Cairano, et al. ' Implemented by explicit MPC (4 th order, 3 inputs, 8 constraints) MERL7/8/23 6/2
HEV Energy Management Implementation Implementation of HEV energy management (>6k lines of code) Target: production ECU, 6MHz, <32kB RAM, <2MB room 3k more in external ROM,.5% External ROM 35% 65% External ROM Internal ROM External RAM 4% 34% Used Free Used 4% Internal ROM 86% Free 66% 86% VCS + MPC Used Free VCS + Baseline Used Free Almost no addition usage of RAM External RAM DATA BELOW NOT FOR 67% 33% UNRESTRICTED Used Free 7% Internal RAM 7% 93% Internal RAM 33% Used Free 67% 93% DISTRIBUTION Used Free Used Free 2 MB 52 kb 64 kb 32 kb MERL7/8/23 7/2
Explicit MPC Capabilities: Easy to Analyze & Verify Stability analysis is difficult for implicit MPC (with restriction on CPU), but can be assessed for the explicit feedback law. Speed control for SI engines Multivariable: spark, airflow Time delays: asymmetric Constraints: actuators, torque, speed Nonlinearities: multiplicative input-state Upper bounds on CPU time can be easily computed (but are not tight) Stability margins and disturbance gains analyzed by Local stability in Global stability: PWQ-LF (large LMI) MERL7/8/23 8/2
Stable Explicit MPC for SI Engine Speed Control A/C on, with full PS PID SISO-MPC MIMO-MPC Idle speed control Di Cairano, et al. '8-'2 Deceleration control (dynamic idle) Di Cairano, et al. '2 Stability guaranteed. Chronometrics & memory verified. MERL7/8/23 9/2
Explicit MPC Capabilities: Ease of Integration Different operating modes require different controllers. But for analysis and implementation a single controller is desired. Yaw Stability control Rear Front In different modes the objectives are different Di Cairano, et al. '-'3 Tire forces (PWA approx.) Design 4 MPC then merge the explicits: A single explicit that contains them all MERL7/8/23 /2
Switched Explicit MPC for Stability Control When applied to yaw stability control stable region.4.3.2. r -. -.2 -.3 -.4 -.4 -.3 -.2 -...2.3.4 f transient regions critical regions By explicit MPC combine: expert knowledge, constrained optimization, closed-loop analysis, in a single control function (no logics required, ) MERL7/8/23 /2
Double Lane Change: MPC & Driver Experimental testing Normal driver f, r, p f, p r [rad] Yaw, Yaw ref [rad/s].5 -.5 -.5 Yr ref Yr 4 5 6 7 8 9 2 3 4 t [s] alphaf alphar Y 6 4 2-2 -4-6 - 2 3 4 5 6 7 8 9 X Normal driver+mpc f, r, p f, p r [rad] Yaw, Yaw ref [rad/s] -.5.5 -.5.2. -. 4 5 6 7 8 9 2 3 4 t [s] 4 5 6 7 8 9 t [s] Yr ref Yr alphaf alphar Y 6 4 2-2 -4-6 - 2 3 4 5 6 7 X Expert driver Normal driver+mpc = Expert driver f, r, p f, p r [rad] Yaw, Yaw ref [rad/s] -.2.5.5 -.5.2 -.2 -.4 -.6 4 5 6 7 8 9 t [s] 4 5 6 7 8 9 t [s] 4 5 6 7 8 9 t [s] Yr ref Yr alphaf alphar Y 6 4 2-2 -4-6 - 2 3 4 5 6 7 X MERL7/8/23 2/2
Explicit MPC Capabilities: Explicit xpc Same principle of explicit MPC can be applied to other control designs (with even simpler results) ESC AFS Example: virtual state governor. Integrate existing controllers with constraint enforcement and guaranteed stability. Di Cairano, Kolmanovsky, 2 yaw stability control ISS re-orbiting Constraint satisfaction and AS guaranteed! Finite time (minimum) usage of a specific actuator MERL7/8/23 3/2
Explicit Virtual State Governor Use parametric maximum admissible sets to modulate the controllers. VSG control law can be explicitly computed Attitude control of a spacecraft by thrusters and momentum wheels.5 -.5 vsg base.25.2.5..5-2 3 4 5 6 v 2 -.5 -..5 -.5-2 3 4 5 6 Constraint satisfaction and AS guaranteed! -.5 -.4 -.3 -.2 -...2.3.4.5 MERL7/8/23 4/2 u2 u -.5 -.2 -.25 p 2 8 constraints 424 regions
Explicit MPC Limitations. Non-tight CPU-time bound (in practice). 2. Number of regions grows exponentially with constraints. 3. MPC problem is fixed (constraints, dynamics cannot be updated). 4. May need large storage. Problem Size Prize winner Iterative methods Interior point, Active set Parametric Programming Try harder Platform Capabilities MERL7/8/23 5/2
Explicit MPC vs Customized Solvers for MPC For larger problems optimization may be faster than explicit MPC and reduce memory (at the price of more complex operations). Multiplicative update projection-free iteration (in dual problem) Brand et. al, 2, Di Cairano, Brand, 22 Servomotor control Explicit MPC: 2MB PQPMPC: 45KB Advanced algorithms for search may improve performance but at the price of complexity and code verifiability Memory is often more limiting than chronometrics. MERL7/8/23 6/2
Example: Memory Reduction by Learning run simulations for reference tracking with random reference amplitude. 3 2.5 2.5.5 -.5 - -.5 Record gain usage (6/). Select 8 gains. Suboptimal MPC with 2 Regions 4 5 6 7 3 3 2 - -2 y[rad] 2 - -2 Polyhedral partition - regions 2 4 6 8 2 4 6 8 2 t[s] u[v] 4 2-2 -4 2 4 6 8 2 4 6 8 2 t[s] -2-2.5 - -.8 -.6 -.4 -.2.2.4.6.8 2-3 -.5 - -.5.5.5 2 Test reduced controller Formal techniques are still need especially for tracking MPC y[rad] y[rad].5.5 -.5 - -.5 2 4 6 8 2 4 6 8 2 t[s].5.5 -.5 - -.5 2 4 6 8 2 4 6 8 2 t[s] Bemporad, Di Cairano, 2 all gains available, no difference gain missing, nearest neighbor approximation used (saturated) MERL7/8/23 7/2
Still an open problem. MITSUBISHI ELECTRIC RESEARCH LABORATORIES Memory Reduction By Merging Many regions may have the same control law but merging them is not easy due to convexity requirement VSG example In VSG the controller needs only part of the optimization variables (as in MPC) Spacecraft Attitude control.3.2. v 2 -. v 2 6 4 2-2 2nd order system with 2 controllers v 2 6 4 2-2 v 2 -.2 -.5 p 2.5.3.2. -4-4 -6-4 -2 p 2 4 2-6 -4-2 p 2 4 2 Merging by Geyer-Torrisi (MPT) algorithm -. -.2 -.5 p 2.5 MERL7/8/23 8/2
Fixed-point Microprocessors Despite continuity of control law finite precision may cause a significant loss of precision. Floating point Servo with Torque constraints y 5 5-5 pos tq Re-centering can help 8bits (fract.) 6bits (fract.) -5 2 3 4 5 6 t MERL7/8/23 9/2 y y - -5 2 3 4 5 6 t 5 5-5 - -5 2 3 4 5 6 t 5 5-5 - pos tq pos tq
Conclusions Explicit MPC is attractive because of its simplicity in -analysis -implementation -verification Major challenges are on numerical robustness and memory reduction There is a trade off between achieving speed up of the algorithm and making it to complicated. This induces a boundary on the actual size of significant problems MERL7/8/23 2/2
European Control Conference, July 8 th, 23 Zurich, CH MITSUBISHI ELECTRIC RESEARCH LABORATORIES Cambridge, Massachusetts Explicit MPC in Mechatronics Industry: Technology Transfer Potential and Limitations Dr. Stefano Di Cairano, Mechatronics, MERL MERL