Closing the loop in engine control by virtual sensors Luigi del Re Johannes Kepler University of Linz Institute for Design and Control of Mechatronical Systems
Message Actually obvious: Closing the loop requires measuring the target variables no commercially available sensors do or will in the next future Virtual sensors offer substantial advantages in terms of price and reliability Logic, but less obvious: The design of a virtual sensor for engine control is not trivial Unexpected: The real problem are the setpoints Going from heuristical tuning to systematic optimization requires models. Virtual sensors are just this and already in the right form. Mean value models seem to be the wrong approach for control system design 2
Overview Engine control and sensors Virtual sensor design Sensors vs. virtual sensors Optimization by virtual sensors (still in work) Conclusion and outlook 3
Framework Work performed in projects of the Linz Center of Competence in Mechatronics and Austrian Science Foundation Support by BMW Motors Tests on a dynamic engine test bench (AVL APA) under PUMA Open and ISAC, BMW M47Ü2 Diesel Engine, test vehicle 32d 4
Engine control and sensors The single most important engine control problem is a nonlinear optimal problem with constrained inputs and finite horizon 12 Geschwindigkeit [km/h] 1 8 6 4 2 ut ( ), t [,112] 122 min q fuel ( t) dt Under the boundary conditions: 2 4 6 8 1 12 Zeit [s] Torque necessary to track the speed M ( ut ( )) = M ( t) ut () ut () ut () 122 q Xi () t dt Q ref Xi All manipulated variables Bounds on pollutants 5
Numerical solution seems possible but ~ Measured Dependency on u unknown ut ( ), t [,112] 122 min q fuel ( t) dt Under the boundary conditions: Can be estimated For production: no idea! M ( ut ( )) = M ( t) ut () ut () ut () 122 q Xi () t dt Q ref Xi Furthermore: computing intensive, slow 6
Daily solution Restating it as a tracking problem Calibration J v(t) u(t) w(t) y(t) Reference Generator Tracking Control Engine Actors Combustion z(t) h(t) Estimator Transforms the optimization problem into a time reference Forces the value to follow the references Estimates unmeasured quantities 7
Motivation Basic idea of the standard solution + - Air path control C EGR + C VGT α - w* FF Combustion y Inj Thumble Single SISO control loops (sometimes with feedforward) are not optimal Reference chosen empirically, usually interpolating steady state optimal points (in the sense of the optimal problem). How do you get the right ones? 8
Tracking with original setpoints 8 6 4 2 MAF measured MPC reference measured ECU Faster in transients 185 19 195 2 25 21 215 MAP 12 11 1 measured MPC 9 reference measured ECU 8 185 19 195 2 25 21 215 EGR VGT position 1 8 6 4 2 egr MPC vgt MPC egr ECU vgt ECU 185 19 195 2 25 21 215 FUEL 4 fuel MPC 3 fuel ECU 2 1 185 19 195 2 25 21 215 time [s] Source: Ortner, del Re: IEEE T-CST May 27 9
Tracking with reachable setpoints [mg/st] 5 45 4 MAF MPC reference ECU [hpa] 35 5 1 15 2 25 3 35 4 45 MAP 19 MPC 185 reference ECU 18 175 [%] 17 5 1 15 2 25 3 35 4 45 EGR position 1 MPC 8 ECU [%] 6 4 2 5 1 15 2 25 3 35 4 45 VGT position 45 MPC 4 ECU 35 3 25 2 5 1 15 2 25 3 35 4 45 time [s] Source: Ortner, del Re: IEEE T-CST May 27 1
Effect on emissions 15 NOx x AirMassFlow MPC ECU 15 NOx x AirMassFlow MPC ECU [ppm * kg/h] 1 5 [ppm * kg/h] 1 5 1 2 3 4 5 6 7 8 9 1 66 665 67 675 68 685 69 695 7 1 8 OPACITY MPC ECU 1 8 OPACITY MPC ECU [%] 6 4 [%] 6 4 2 2 1 2 3 4 5 6 7 8 9 1 time [s] 66 665 67 675 68 685 69 695 7 time [s] Explicit MPC: NOx: 11 Opacity: 5 compare: original (non reachable) setpoints Reference ECU: NOx: 1 Opacity: 1 Explicit MPC: NOx: 136 Opacity: 56 11
Commercial NOx sensors Problems: cross sensitivities (but in some cases, like SCR, can be exploited) and especially start delay and magnesium poisoning 12
Virtual sensors Essentially models of the unmeasured quantity Two approaches Simple models with error feedback (e.g. Kalman filters) Simulation models (if possible, FIR to avoid integratror effect) Error-feedback approach requires appropriate measurement Simulation models require model: where from? First principles? Data? 13
Virtual sensor design ANN seem a sensible choice (universal approximators) However, universal approximators are not a sensible choice (not even for interpolation) Goal is not to approximate, but to discover! 14
Leap of faith Identification = hypothesis testing Leap of Faith: Search for global patterns in observed data to allow for data-driven driven interpolation (Ljung) In other words: use physical knowledge, but otherwise expand the number of hypothesis Problem: curse of dimensionality Solution: balance act between generality and specificity Idea: data regularization Hardly expressable in mathematical terms, therefore algorithmic approach 15
Why not simple approaches? Forward selection? log(datatot[, "opac"]) -2-1 1 2 4 6 8 - Build a list of possible nonlinear variables NARX like) - Test correlations - Take the most important one - Orthogonalize the rest - Add the second important one - Does not really work, parallel Testing of many hypothesis with almost equalfitness leads to random solutions datatot[, "opac"] tbind(res.model, res.val). 1. 2. 3. -1 1 2 3 Time 2 4 6 8 Time 2 4 6 8 Time 16
Procedure Data Pre-Analysis: Delay time estimation, system order estimation, variable selection Functional Basis Signal conditioning: Filtering, delay time removal Evaluation function GP Optimization Forward Selection Result: Compact analytical formula Source: D. Alberer, L. del Re, S. Winkler, P. Langthaler: Virtual Sensor Design of Particulate and Nitric Oxide Emissions in a DI Diesel Engine, ICE 25. L. del Re, P. Langthaler, C. Furtmüller, S. Winkler, M. Affenzeller: NOx Virtual Sensor Based on Structure Identification and Global Optimization, SAE 25 17
GP life cycle GP produces automatically programs, formulas are programs Ist Lifecycle: Population of programs (formulas) Select parents according to their fitness Evaluate formulas - + x * x + x x x Generate new formulas - x x * x * x x 18
Crossover und Mutation in GP mutation und crossover work (without direction) through the exchange of subtrees of formula structures 5. Parent1 + / x 1 (t-1) ln x 2 (t-2) x 3 (t-2) Crossover + Child1 * - x 2 (t-2) Parent2 1.5 selection step ist directional / 5. x 1 (t-1) x 3 (t-2) * x 2 (t-2) Mutation + Child2 / x 3 (t-2) + Child3 5. x 1 (t-1) - * 5. x 1 (t-1) x 3 (t-2) x 2 (t-2) 19
Sensor equations NOx Results can look horrible PM 2
Validation NOx 1 9 Measured NOx Estimated NOx 8 7 NOx* [%] 6 5 4 3 2 1 5 6 7 8 9 1 11 12 time [s] Comparison between measured and estimated data validation 21
Comparison virtual sensor vs ANN Only standard ECU signals Validation with FTP-75, warm engine Model inputs: engine turning speed, injection quantities and timing, boost pressure, air coolant and exhaust temperatures, fresh air mass, environment pressure ANN: max. 2 hidden Layers, max. 25 nodes/layer 22
Comparison virtual sensor vs ANN 5 45 Measurem ent Virtual Sensor GP Virtual Sensor ANN 4 35 Opacity [%] 3 25 2 15 1 5 6 61 62 63 64 65 66 67 68 tim e [s] 23
Comparison virtual sensor vs ANN 1 9 8 Messung Virtueller Sensor GP Virtueller Sensor ANN 7 Opazität [%] 6 5 4 3 2 1 4 45 5 55 6 65 7 75 8 85 9 t [s] 24
PM in ECE 9 8 7 6 Opacity [%] 5 4 3 2 1-1 2 4 6 8 1 12 14 time [s] 25
Error distribution Standard ECU-Measurment signal FTP-75, warm engine 7 GP ANN 6 5 Quantity 4 3 2 1-1 -8-6 -4-2 2 4 6 8 1 Estimation Error [% Opacity] Error distribution for GP based approach almost symmetrical 26
Possible uses of virtual sensors Cold start Fall back sensor FDI Resampling Model for optimization 27
Validity test: MPC results are reproduced correctly 28
Conclusions Virtual sensors are feasible also for very complex systems They will hardly work alone but cross coupling with other sensors can be exploited to track system changes They can be used to close the loop from two sides: They can reduce the requirements on hard sensors, in particular, they can overcome critical operating phases (like engine warm up) They can be used to optimize the strategy Final tuning will be still necessary, but not indispensable 29
The right way? Plausibility check: what is the alternative? CAMEO CAMEO is converging to the same kind of models This can lead to a change of paradigms: Instead of making the best out of your parts make the best out of your system to this end, start by describing in a control suitable way the most difficult part (combustion) and then use them to optimize the control system design 3