Model Predictive Supervisory Control for Integrated Emission Management of Diesel Engines

: In this work, a predictive supervisory controller is presented that optimizes the interaction between a diesel engine and its aftertreatment system (ATS). The fuel consumption is minimized while respecting an upper bound on the emitted tailpipe NO x mass. This is achieved by optimally balancing the fuel consumption, the engine-out NO x emissions, and the ATS heating. The proposed predictive supervisory controller employs a two-layer model predictive control structure and solves the optimal control problem using a direct method. Through experimental validation, the resulting controller was shown to reduce the fuel consumption by 1.1% at equivalent tailpipe NO x emissions for the nonroad transient cycle when compared to the operation with a ﬁxed engine calibration. Further, the controller’s robustness to different missions, initial ATS temperatures, NO x limits, and mispredictions was demonstrated.


Introduction
Today, diesel combustion engines are used in a variety of applications. As a byproduct of combustion, they emit NO x , which has adverse effects on human health and on the environment. Therefore, stringent pollutant legislation has been introduced in recent decades to limit the emission of NO x [1]. At the same time, the fuel consumption must be minimized, in order to limit the operational cost as well as the CO 2 emissions. Unfortunately, these two goals are conflicting [2] and necessitate the careful control of the engine operation.
To extend this inherent trade-off, modern engine systems are equipped with an aftertreatment system (ATS) to combat NO x and other pollutant emissions. For diesel engines, selective catalytic reduction (SCR) systems are typically used, whereby NO x is reduced using ammonia [3]. For these systems to operate effectively, their temperature should surpass a lower limit of approximately 200 • C.
As the engine operation influences the operation of the ATS, a joint optimization of the engine and the ATS is required. Such an approach is known in the literature as integrated emission management (IEM) [4], whereby a supervisory controller is used to coordinate the operation of the engine and the ATS during a mission.
In a previous publication by the authors, offline optimization was used to investigate this problem [5]. It was shown that, in order to achieve optimal performance, the fuel consumption, the engine-out NO x emissions, and the enthalpy provided to the ATS must be carefully managed during a mission.
In this paper, the previously obtained optimal input trajectories are applied at the testbench in a feedforward fashion. An error in the emitted tailpipe NO x mass is observed and attributed to model mismatch. A predictive supervisory controller is therefore required that optimizes the engine operation online and compensates for model mismatch and mispredictions using feedback control.

Literature Review
Early works neglected the ATS entirely [6,7]. As a result, good performance was achieved using the equivalent emission minimization strategy, whereby a feedback controller sets the equivalence factor used to determine the optimal trade-off between fuel consumption and NO x emissions. The method is closely related to the equivalent consumption minimization strategy (ECMS) applied to the energy management problem of hybrid electric vehicles [8].
In later works [9,10], the NO x reduction by the ATS was considered, but the effect of the engine operation on the ATS temperature was neglected. In [9], an ECMS-like causal controller is presented that adapts an equivalence factor for the tailpipe NO x emissions. Subsequently, the equivalence factor for the engine-out NO x emissions was determined, based on the measured NO x -reduction efficiency of the ATS. In [10], a model predictive controller is used to set the operation of the engine and the ATS, whereby the effect of the control action on the ATS temperature is neglected. While these methods are straightforward to implement, the fact that they do not optimize the ATS temperature dynamics could result in a suboptimal operation, especially for missions with a low ATS temperature.
In other works [11][12][13][14], the benefit of heating the ATS is approximated offline. This approximation is then used by the supervisory controller when determining the optimal engine operation online. In [11], a feedforward controller based on Pontryagin's minimum principle was implemented, whereby a heuristic method was used to determine the equivalence factor for the ATS heating. In [12], this controller was extended to include feedback control based on the measured tailpipe NO x emissions. In [13], dynamic programming was used to determine the optimal operation for several missions offline. Based on the results, a mapping was fitted that relates the equivalence factor for the ATS heating to the current value of the ATS temperature. This mapping was then used in an ECMS-like online controller in [14].
To the best of the authors' knowledge, no publication exists in which an online supervisory controller is developed that uses predictive information about the upcoming mission to minimize the fuel consumed during the mission, while respecting legislative limits on the tailpipe NO x emissions and explicitly considering the effect of the engine operation on the ATS temperature.

Contribution
The contribution of this work is twofold. First, a real-time-capable optimization method to solve the IEM problem by solving a nonlinear program (NLP) is presented. Thereby, continuously differentiable look-up elements are used to describe a preoptimized engine operation, i.e., a Pareto front with respect to fuel consumption, NO x emissions, and enthalpy provided to the ATS. Due to its computational efficiency, the resulting optimization can be performed in real time.
Second, a predictive supervisory controller is designed that employs this optimization method in combination with predictive information about the upcoming mission in a model predictive control framework. Thereby, the vehicle's fuel consumption is minimized, while a limit on the emitted tailpipe NO x mass is respected. Based on the predictive information, the controller adapts the engine operation to the mission and optimally sets the trade-off between the fuel consumption, the NO x emissions, and the ATS heating. The proposed controller was experimentally validated at an engine testbench.

System Description
A schematic of the engine system considered in this work is shown in Figure 1. It consists of a diesel engine equipped with an ATS. The main characteristics of the engine system are listed in Table 1.  clutch   engine   DOC   ATS   SCR   dosing AdBlue tank DPF unit Figure 1. Schematic of engine system layout. The aftertreatment system (ATS) features a diesel oxidation catalyst (DOC), a diesel particulate filter (DPF), and a selective catalytic reduction (SCR) system. For the experiments, the engine was fitted to a dynamic testbench. An AVL KMA 4000 fuel flow sensor was used to measure the fuel consumption. The stock NO x sensors were used to measure the engine-out NO x concentration and the tailpipe NO x concentration. The stock air mass flow sensor was used to measure the air mass flow. The temperature measured downstream of the ATS using the stock sensor was used to characterize the ATS temperature. The NO x mass flow was calculated based the NO x concentration and the exhaust mass flow, which was obtained as the sum of the air mass flow and the fuel mass flow. The NO x -reduction efficiency of the ATS was calculated based the measured NO x concentrations.
The engine considered in this work is overactuated. Consequently, some engine control inputs can be adapted online in order to achieve a certain objective. In this work, the five engine control inputs start of injection ϕ soi , fuel rail pressure p rail , variable geometry turbine actuator position u vgt , exhaust gas recirculation valve position u egr , and exhaust flap position u flap , are considered as degrees of freedom that can be optimized while providing the requested torque T e at the current speed ω e . The resulting vector of engine control inputs is (1) As a simplification, only NO x emissions were considered in this work. The engine operation was chosen such that the emitted carbon monoxide, unburned hydrocarbons, and particulate matter can be oxidized in the diesel oxidation catalyst (DOC) or trapped in the diesel particulate filter (DPF).

Engine Model
In this work, a reduced-order engine model resulting from a preoptimization of the engine operation was adopted from [5]. The benefit of the preoptimization is that the computational complexity of the subsequent online optimization is reduced. This is achieved by reducing the number of inputs from the five engine control inputs of (1) to two engine strategy inputs J rot Hd and J rot NO x , by limiting the engine operation to the Pareto front defined by a multi-objective optimization. Furthermore, the preoptimization guarantees the feasibility of the engine operation according to a set of limits, which no longer need to be checked during the subsequent online optimization.
The objectives of the preoptimization are minimizing the fuel consumption, minimizing the engine-out NO x emissions, and maximizing the enthalpy provided to the ATS. The latter is defined as * where * m exh is the exhaust mass flow, c p is the specific heat capacity of the exhaust gas, ϑ exh is the exhaust gas temperature, and ϑ is the ATS temperature.
The preoptimized engine model uses look-up elements to characterize the Pareto front. To achieve a numerically robust interpolation, a scaled and rotated version of the Pareto front is stored using the variables J rot X , where X ∈ {Hd, NO x , fuel}. An example of such a Pareto front for a given speed, torque, and ATS temperature is shown on the left of Figure 2. The Pareto front is described by a five-dimensional look-up element for J rot fuel with inputs (ω e , T e , ϑ, J rot Hd , J rot NO x ), while the bounds on J rot NO x are described by two four-dimensional look-up elements for J rot NO x ,min and J rot NO x ,max with inputs (ω e , T e , ϑ, J rot Hd ). To retrieve the desired engine outputs, the rotation is reversed to obtain the variables J X and the scaling is reversed using * m fuel,max are characterized by three-dimensional look-up elements with inputs (ω e , T e , ϑ). In Figure 2, on the right, the Pareto front transferred back to physically meaningful values is shown.
To operate the engine, the engine control inputs must be determined. For this, a smoothed inverse mapping was developed that returns the engine control inputs as a function of the selected engine strategy inputs. An equivalent mapping is also developed for the exhaust mass flow, which is required to evaluate the ATS model. The mappings are stored in the form of look-up elements with inputs (ω e , T e , ϑ, J rot Hd , J rot NO x ).

Aftertreatment System Model
The ATS model used in this work was adopted from [5]. The thermal model consists of a single lumped brick temperature ϑ, whose dynamics are where C ATS is the heat capacity of the ATS. The conductive heat loss to the environment is denoted * Q hl , where α is the heat transfer coefficient, S is the outer surface area of the ATS, and ϑ amb is the ambient temperature.
The chemical model consists of a static look-up element that describes the NO xreduction efficiency η DeNOx as a function of the ATS temperature and the exhaust mass flow. The resulting tailpipe NO x mass flow is * The dynamics of the emitted tailpipe NO x mass are

Real-Time-Capable Optimization Method
The objective of the control task is to minimize the fuel consumed during a given mission, while respecting an upper bound on the emitted tailpipe NO x mass at the end of the mission. The resulting optimal control problem (OCP) is where t f is the final time, the function f ϑ represents (6), and m tp NO x is the limit on the emitted tailpipe NO x mass. The time dependency of all variables was omitted to improve readability.
In this work, the mission is assumed to be set by the driver and must be followed exactly. It is therefore not part of the optimization and consequently ω e and T e are exogenous inputs. The system states are ϑ and m tp NO x . The inputs to be optimized are J rot Hd and J rot NO x . In [5], dynamic programming (DP) was used to solve the OCP, which is a reasonable choice of method when a global optimality guarantee is important and computational time is not limited. However, its use in an online model predictive controller is severely limited by the constraint on the maximal computation time that must be met to allow for feedback control. In fact, examples from the literature show that the time required to solve the OCP with DP for a mission with a duration of roughly 30 min for similar problems is in the order of a few hours to one week on a standard PC [15][16][17][18]. This clearly disqualifies DP as an online optimization method.
A more efficient way to solve the OCP is to employ a direct method, whereby the OCP is discretized and transformed to a finite-dimensional, constrained nonlinear optimization problem, i.e., an NLP [19]. Considering further that many established NLP solvers exist, this approach is well suited for the task at hand.
Common NLP solvers use first-order derivatives and approximate second-order derivatives using first-order derivatives. Hence, the model equations must be at least once continuously differentiable. Evaluating the look-up elements from Sections 2.1 and 2.2 using linear interpolation results in piecewise affine functions that are not continuously differentiable. A replacement for the look-up tables must therefore be found that can characterize the underlying data with the same accuracy, but is continuously differentiable.
In the following, continuously differentiable look-up elements are introduced and their application as a replacement for the look-up elements from Sections 2.1 and 2.2 is outlined. Next, OCP (10a-i) is discretized and an NLP is formulated. The result obtained by the real-time-capable NLP optimization is compared to a benchmark obtained using DP. Finally, the result from the NLP optimization is validated experimentally.

Continuously Differentiable Look-Up Elements
In this work, a piecewise quadratic interpolant with a continuous derivative is used. Using the terminology from [20], this corresponds to a Hermite quadratic interpolant. The resulting continuously differentiable look-up elements are referred to as cdElements. Their implementation is outlined in Appendix A.
The selected interpolation method is compared to the two predominant interpolation methods, namely linear interpolation and cubic spline interpolation, in Table 2. Compared to linear interpolation, Hermite quadratic interpolation has the advantage of continuous differentiability, whereas, compared to cubic spline interpolation, it has the advantage of less computations required for the evaluation. The model presented in Section 2.1 uses a five-dimensional look-up element to describe the preoptimized engine operation. According to OCP (10a-i), the model equations only have to be continuously differentiable with respect to ϑ, J rot Hd , and J rot NO x , as only these can be influenced by the optimization. As ω e and T e are given and cannot be affected by the optimization, continuous differentiability in these directions is not required.
Therefore, local continuously differentiable mappings with inputs (ϑ, J rot Hd , J rot NO x ) are stored for a number of (ω e , T e ) points on a regular grid. When evaluating the global model, the local models are evaluated at the four (ω e ,T e ) grid points surrounding the current point and bilinear interpolation is used to return the corresponding values for the current point. At each (ω e ,T e ) grid point, two three-dimensional cdElements were used to characterize J rot fuel and * m exh , two two-dimensional cdElements were used to characterize the upper and lower bound on J rot NO x , and six one-dimensional cdElements were used to characterize the normalization values. Further, a two-dimensional cdElement was used to characterize the NO x -reduction efficiency map of the ATS used in (8).

NLP Formulation
In order to transform OCP (10a-i) to an NLP, it was discretized in time using a constant time step ∆t = 1 s and Euler forward integration. Multiple shooting was used for the ATS temperature, as the state dynamics (10b) and (10c) depend on the ATS temperature in an nonlinear way [21]. For the emitted tailpipe NO x mass state, on the other hand, single shooting was used, as the state dynamics do not depend on the emitted tailpipe NO x mass state. The state dynamics (10c), the initial condition (10e), and the terminal constraint (10f) are combined to formulate (11d). The resulting NLP is where the arguments of * m fuel , f ϑ , * m tp NO x , J rot NO x ,min , and J rot NO x ,max are equivalent to those in OCP (10a-i) but have been omitted to improve readability. The number of considered time steps N is In this work, the NLP solver IPOPT [22] was used to solve NLP (11a-g).

Comparison to DP Benchmark
A drawback of using a direct method is that there are no global optimality guarantees for nonconvex problems such as NLP (11a-g). To check the quality of the solution obtained from the NLP optimization, it was compared to a benchmark obtained using DP. As the goal of the DP optimization is to find a benchmark, a fine discretization was used. Specifically, 601 grid points were used for ϑ and 41 for J Hd and J rot NO x . An adapted version of the DP algorithm presented in [23] was used to solve the problem.
The comparison of the trajectories resulting from the DP and the NLP optimizations is shown in Figure 3. No discernible difference in the trajectories can be observed. For a closer analysis, the results listed in Table 3 are considered. The computation times reported were obtained on a PC with a 2.8 GHz quad-core processor and 32 GB of RAM. The results show that the NLP solution fulfills the constraint on the emitted tailpipe NO x mass exactly. The consumed fuel mass was even 0.049% lower than that of the DP solution. This can be attributed to the fact that even though a fine discretization was used in the DP optimization, the error introduced by the discretization is still nonzero, while the NLP can set the inputs continuously and manages to find a superior solution for the considered case. While this example does not prove that the NLP solver converges to the global optimum in general, it indicates that the resulting solution is of high quality. Similar results were obtained for further missions.
The developed optimization method is a viable option for online optimization, as the time required to solve the NLP is significantly shorter than the duration of the cycle.

Experimental Validation of Solution
Next, the obtained solution is validated at the testbench by applying the obtained optimal input trajectories in a feedforward fashion. The reference trajectories and the measured trajectories shown in Figure 4 exhibit the same general trends, but it can be observed that the simple control-oriented model is not able to fully capture the behavior of the more complex real system. From the comparison, three main sources of model mismatch can be identified.   Table 3. Comparison of the DP and NLP optimizations for the NRTC with ϑ(0) = 100 • C. The consumed fuel mass is denoted m fuel and the required computation time is denoted t calc . The results of the DP optimization were used for the normalization. The first error source is the static engine model. The observed error in the emitted engine-out NO x mass was −9.3%, while the error in the consumed fuel was +2.9%.

Method
The second error source is the simplified thermal model of the ATS that uses a single lumped temperature. Its effect is clearly visible during the initial 300 s of the considered mission. As the engine produces hot exhaust gases, the modeled ATS temperature rises. The temperature measured after the ATS, however, remains low, as there is a non-negligible axial temperature distribution in the real system that is not captured by the model. After this initial warm-up phase, the modeled temperature captures the actual dynamics reasonably well.
The third error source is the static map used to characterize the NO x -reduction efficiency in the chemical model of the ATS. Neglecting the dynamics of the ammonia storage of the SCR, combined with the error in the ATS temperature, leads to a mismatch in η DeNOx . The mismatch in the timing of the sharp rise in η DeNOx at around 300 s is caused mainly by the error in the ATS temperature, while the mismatch at higher temperatures from 400 s onward is attributed mainly to the neglected ammonia storage dynamics.
The emitted tailpipe NO x mass is affected by all three of the error sources, resulting in an overall error of +27.9%. In conclusion, the simple control-oriented model captures the basic system behavior, but feedback control is required in order to compensate for model mismatch during operation.

Predictive Supervisory Controller
The controller structure used in this work is shown in Figure 5. It consists of a predictive supervisory controller that passes a strategy input vector s to a non-predictive low-level controller that sets the engine control input vector u. The vector of measured system states x is used as feedback. Here, bold symbols are used to denote multidimensional vectors.  Figure 5. Controller structure consisting of a predictive supervisory controller and a non-predictive low-level engine controller.
The predictive supervisory controller, in turn, contains two layers. In both layers, an optimization problem related to OCP (10a-i) is solved to determine the optimal operation over the prediction horizon. The reference trajectory generator (RTG) considers the entire mission and is run once at the beginning of the mission. It provides reference trajectories that are tracked by the model predictive controller (MPC), which optimizes the engine operation periodically for a shorter prediction horizon and considers feedback of the measured system states. The MPC's prediction horizon is chosen to be much shorter than that of the RTG, resulting in a shorter computation time and allowing for frequent updates.
At the testbench, the predictive supervisory controller was implemented in Matlab and ran on a PC with a 2.4 GHz dual-core processor and 16 GB of RAM, while the low-level engine controller ran on an ETAS ES910 rapid prototyping unit. INCA's Matlab integration package was used for the communication between the predictive supervisory controller and the low-level engine controller. The stock engine ECU was used to set the engine control inputs.
In the following, the elements of the controller are discussed in more detail.

Reference Trajectory Generator
The task of the RTG is to optimize the operation of the engine system over the entire mission and provide reference trajectories that the MPC will follow. To achieve this, the RTG solves OCP (10a-i) for the entire mission using the optimization method presented in Section 3. The resulting optimal trajectories for the states as well as the corresponding costates are passed to the MPC as In this work, the predictive information is considered to be of high quality, i.e., there is limited benefit in updating the reference trajectories during the mission. However, the RTG could be updated if a change in the mission or a significant offset of the current states from their respective reference is detected.

Model Predictive Controller
The task of the MPC is to correct for errors introduced by model mismatch and misprediction in an optimal fashion. To achieve this, an OCP similar to OCP (10a-i) is solved at every update time t u and the resulting strategy inputs are passed to the low-level controller. The OCP is initialized with the current ATS temperature ϑ 0 and emitted tailpipe NO x mass m tp NO x ,0 . The terminal state constraints are chosen such that the emitted tailpipe NO x mass does not exceed that of the reference and the ATS temperature is at least at the reference value at the end of the MPC's prediction horizon t p .
The OCP solved by the MPC is The time dependency of all variables was omitted to improve readability. OCP (14a-k) is solved by adapting the method presented in Section 3. The resulting MPC is a zone-MPC [24], whereby the fuel consumption is minimized, while an upper bound on the emitted tailpipe NO x mass and a lower bound on the terminal ATS temperature are respected.
The terminal constraint on the emitted tailpipe NO x mass is given by m tp NO x ,RTG , which represents the emitted tailpipe NO x mass of the RTG reference trajectory at the end of the MPC's prediction horizon. A soft constraint was formulated using the slack variable m , in order to always allow the solver to find a solution to the OCP. The activation of the slack variable is penalized linearly using w m . To avoid violation of the soft constraint when the problem is feasible, a large, constant weight w m was used. This guarantees that constraint (14g) is fulfilled unless it is physically impossible to do so and that the emitted tailpipe NO x mass is minimized when the non-slacked problem becomes infeasible.
When the entire mission is considered, there is no constraint on the terminal ATS temperature, as it does not influence the tailpipe NO x emissions. However, the MPC's prediction horizon does generally not reach the end of the mission, meaning that the ATS temperature at the end of the MPC's prediction horizon will influence tailpipe NO x emissions later on in the mission. It can therefore be beneficial to enforce a terminal constraint on the ATS temperature to shift the engine operation to utilize more fuel to heat up the ATS in the considered prediction horizon, as this can improve the NO x -reduction efficiency for the remainder of the mission. To account for this, constraint (14e) is introduced, where ϑ RTG represents the ATS temperature of the RTG reference trajectory at the end of the MPC's prediction horizon. As for the tailpipe NO x emissions, a soft constraint was formulated using the slack variable ϑ . As constraint (14e) is only used to steer the MPC in the direction of the reference trajectory, a less aggressive penalty on ϑ can be used. In [25], it was shown that the costate from the RTG can be used to quantify the sensitivity of the objective of OCP (10a-i) to a drift from the reference trajectory in a first-order approximation. The ATS temperature costate of the RTG reference at the end of the MPC's prediction horizon λ ϑ,RTG is therefore used as the weight for the penalty on ϑ .

MPC Tuning
The MPC's tuning parameters are the update time t u and the prediction horizon t p . They were selected by considering the controller performance for a grid of combinations thereof and ensuring that the average computation time required to solve OCP (14a-k) is well below the update time. In the following, t u = 20 s and t p = 200 s were used.
Note that the MPC's update time t u = 20 s is larger than the sampling time ∆t = 1 s. Therefore, a trajectory of strategy inputs is passed to the low-level engine control rather than a scalar value.

Offset Correction
An offset correction based on [26] was introduced to improve the MPC's tracking performance. Thereby, the MPC's terminal constraints are adapted using the current offset. For the emitted tailpipe NO x mass, it results in while, for the ATS temperature, this results in The theory behind this correction guarantees offset-free tracking in steady state for linear MPC [21]. Even though the references never reach a steady state and nonlinear MPC is used here, the method was found to improve the tracking behavior of the MPC.

Low-Level Engine Controller
In this work, two realizations of the low-level engine controller are considered. The task of both realizations is to set the engine control input vector as stated in (1). However, the two realizations differ in the strategy input vector that they receive and in how the engine control inputs are determined. The two realizations are introduced in Sections 5.1 and 6.1, respectively.

Controller Performance without Misprediction
In this section, the performance of the predictive supervisory controller with perfect predictive information, i.e., without mispredictions, is analyzed experimentally. In order to obtain comparable and repeatable results, the ATS was preconditioned by emptying the ammonia storage and cooling it to 100 • C before each experiment. As the initial ATS temperature is well below the temperature where the injection of AdBlue is enabled, the result is similar to a cold start.

Low-Level Engine Controller
The low-level engine controller used in this section evaluates the smoothed inverse mapping introduced in Section 2.1 to determine the engine control inputs. The maps are evaluated at the current engine speed and torque, the current ATS temperature, and the engine strategy inputs selected by the MPC. The strategy input vector becomes Note that the evaluation of the smoothed inverse mapping is not part of the optimization itself, but is carried out afterwards. Hence, continuous differentiability is not required and the smoothed input maps from Section 2.1 can be applied directly. This realization of the low-level engine controller is computationally inexpensive as finding the optimal engine control inputs is reduced to evaluating a mapping obtained offline.

Reference Tracking
First, the reference tracking capability of the controller is investigated; see Figure 6. For the first 300 s, the operations with and without the MPC were equivalent. Due to the model error discussed in Section 3.4, the emitted tailpipe NO x mass lies above the reference. During this time, the ATS temperature was lower than expected, resulting in a lower NO x -reduction efficiency. Considering further that the operation without the MPC already produced minimal engine-out NO x emissions, it becomes evident that a saturation is active, and even when feedback is introduced via the MPC, the emitted tailpipe NO x mass cannot be reduced further in this part of the mission.
At 300 s, the measured NO x -reduction efficiency rose rapidly and the operation without the MPC moved to an engine operation with higher engine-out NO x emissions. The operation with the MPC, on the other hand, continued to operate the engine with minimal engine-out NO x emissions until the tailpipe NO x reference was reached at around 500 s. From there on, the operation with the MPC also switched to an engine operation with higher engine-out NO x emissions and continued to track the tailpipe NO x reference until the end of the mission.  The result shows that the effect of the model mismatch can be compensated for by the MPC when the operation is not limited by a saturation such as the lower limit on the engine-out NO x emissions. When the reference trajectories can no longer be tracked exactly, the MPC follows them as well as the system allows. This can be observed during the initial 300 s of the mission, where the controller tolerated a violation of the terminal constraint on ϑ in order to get as close to the m tp NO x reference as possible.

Comparison to Fixed Engine Calibration
Next, the performance of the predictive supervisory controller is compared to that achieved using the fixed engine calibration of the stock ECU; see Figure 7. In the absence of a supervisory controller, the engine-out NO x emissions depend solely on the mission. High tailpipe NO x emissions result when the ATS is inactive (initial 300 s) and low tailpipe NO x emissions result once the ATS has reached its operating temperature (from 300 s onward).
The tailpipe NO x mass emitted by the fixed engine calibration was used as the limit for the predictive supervisory controller. During the initial 300 s of the cycle, the predictive supervisory controller adapted the engine operation to the low NO x -reduction efficiency by reducing the engine-out NO x emissions. At the end of this phase, the tailpipe NO x mass emitted by the predictive supervisory controller was roughly half of that achieved with the fixed engine calibration. Once the ATS was fully operational, the predictive supervisory controller reacted by allowing higher engine-out NO x emissions, thereby reducing the fuel consumption.
The final emitted tailpipe NO x mass of the predictive supervisory controller was equivalent to that achieved with the fixed engine calibration, while the fuel consumption was reduced by 1.1%.

Controllability Limits
On the left of Figure 8, the resulting operation for the nonroad transient cycle (NRTC) and different NO x limits is shown. The difference between the RTG reference (triangles) and the measurements (circles) results from model mismatch. The results obtained without feedback (gray circles) always show a deviation from the tailpipe NO x limit, which is reduced when feedback is introduced (black circles). The tailpipe NO x limit was only respected and fully exploited for m tp NO x = 0.66 and m tp NO x = 1, while more stringent limits were violated and more relaxed limits were not fully exploited.
To investigate this behavior, the constant operating point cycle is considered. This mission consists of a constant engine speed of 1900 rpm and a constant engine torque of 200 Nm for the duration of 1800 s. Note that as the ATS is preconditioned to ϑ(0) = 100 • C, a dynamic operation results as the ATS warms up, even though the engine speed and torque are constant. The benefit of considering such a cycle is that any changes in the engine operation can be attributed to the predictive supervisory controller, rather than to a change in the engine speed or torque. The results for the constant operating point cycle are shown on the right of Figure 8.
As for the NRTC, intermediate tailpipe NO x limits were respected and fully exploited by the predictive supervisory controller, whereas stringent limits were violated and relaxed limits were not fully exploited. Figure 9 shows the resulting trajectories for a representative of each of the three cases.
For an intermediate NO x limit, i.e., m tp NO x = 1, the RTG set the engine-out NO x emissions to the minimum during the initial 300 s of the cycle. Due to model mismatch, these low engine-out NO x emissions could not be achieved at the testbench, resulting in the emitted tailpipe NO x mass rising faster than the reference. The predictive supervisory controller reacted by keeping the engine-out NO x emissions at the minimum until the tailpipe NO x reference was reached at around 600 s. From there on, the tailpipe NO x reference was tracked well, even allowing the engine-out NO x emissions to exceed those of the RTG.    For minimal tailpipe NO x emissions, i.e., m tp NO x = 0.19, the RTG operated the engine at minimal engine-out NO x emissions throughout the cycle. As previously observed, the actual engine-out NO x emissions were significantly higher. As a consequence, the emitted tailpipe NO x mass exceeded the final limit within the first 300 s of the cycle and the predictive supervisory controller continued to keep NO x emissions as low as possible. The observed violation of the NO x limit must therefore be attributed to a lower limit on the engine-out NO x emissions that is higher than the minimal engine-out NO x emissions of the model. The MPC is confronted with a lower saturation that limits its reference tracking ability.
For maximal tailpipe NO x emissions, i.e., m tp NO x = 2.83, the RTG operated the engine at maximal engine-out NO x emissions throughout the cycle. The resulting operation of the predictive supervisory controller can be divided into two phases. For the initial 500 s, the MPC controller adapted the engine-out NO x emissions in such a way that the tailpipe NO x reference was tracked. From 500 s onward, the engine-out NO x emissions were at the maximum. Due to model mismatch, the actual engine-out NO x emissions exceeded the value predicted by the model. However, as the NO x -reduction efficiency was also higher than modeled, the resulting tailpipe NO x emissions still fell below the reference. While the MPC tried to compensate for this mismatch, in this case, it is confronted with an upper saturation that limits its reference tracking ability.
In summary, the predictive supervisory controller showed good reference tracking behavior when the system bounds allowed for sufficient controllability. When the reference obtained from the RTG could not be achieved with the real system due to saturation, the predictive supervisory controller continued to track the reference as well as the real system allowed.

Benefit of Online Control
Finally, the potential of the predictive supervisory controller to adapt to different conditions and tailpipe NO x limits is analyzed; see Figure 10. The comparison on the left corresponds to the one analyzed in Section 5.3. The measured operation obtained with the predictive supervisory controller shows that the tailpipe NO x limit was respected and that the fuel consumption was reduced by 1.1%. For the comparison in the middle, the same tailpipe NO x limit as before was set, but the ATS was preconditioned to a temperature of 300 • C and the corresponding steady-state value for the ammonia storage. As a result, the average NO x -reduction efficiency was much higher. The operation obtained with the fixed engine calibration resulted in a final emitted tailpipe NO x mass 45% below the limit. The fixed engine calibration is too conservative for this mission and fuel could have been saved by adapting it. This was achieved by the predictive supervisory controller, which exploited the fact that the tailpipe NO x limit was less restrictive, resulting in a fuel reduction of 2.0% while exceeding the tailpipe NO x limit by 1.0%.
For the comparison on the right, the initial ATS temperature was 100 • C but the tailpipe NO x limit was reduced to 0.66. The operation obtained with the fixed engine calibration reached a final emitted tailpipe NO x mass 53% above the limit. The supervisory controller, on the other hand, adapted to the new tailpipe NO x limit and only exceeded it by 1.7%. This was achieved at the cost of a 1.2% increase in fuel consumption.
In summary, the predictive supervisory controller was shown to adapt well to changes in the initial ATS temperature and the tailpipe NO x limit, adapting to minimize the fuel consumption, while never exceeding the tailpipe NO x limit by more than 1.7%.

Controller Performance with Misprediction
The drawback of the low-level engine controller used in the previous section is that it is not robust against mispredictions. The task of the supervisory controller is to select the optimal trade-off between the individual engine objectives. This is achieved by selecting the engine strategy inputs J rot Hd and J rot NO x , which describe a relative position on the Pareto front. However, when mispredictions occur, the form of the Pareto front and the trade-off described by J rot Hd and J rot NO x changes, resulting in an engine operation that will be suboptimal for the current mission. Furthermore, as the bounds on J rot NO x change with the engine speed and torque, it is possible that the selected point lies outside the bounds. As a consequence, the engine strategy inputs J rot Hd and J rot NO x are not suited to an operation with misprediction. An alternative low-level controller, suited to deal with misprediction, is introduced and validated in this section.

Low-Level Engine Controller
The realization of the low-level engine controller used in this section determines the engine control inputs by solving a static optimization problem online. The optimization performed by the predictive supervisory controller is equivalent to that of the previous section, but the engine strategy inputs provided to the low-level engine controller change to where w Hd and w tp NO x represent equivalence factors for the enthalpy provided to the ATS and the tailpipe NO x emissions, respectively. Their interpretation is analogous to that of the equivalence factor used to penalize the use of the battery in the energy management of HEVs.
The values for w Hd and w tp NO x are calculated from the costates of the MPC optimization as The corresponding derivation is shown in Appendix B. The equivalence factor for tailpipe NO x emissions is then converted to an equivalence factor for engine-out NO x emissions using the current NO x -reduction efficiency η DeNOx , resulting in Finally, the low-level engine controller determines the engine control inputs by minimizing the objective while considering all limits on the engine operation. The objective L represents a weighted sum of multiple objectives, where the equivalence factor w eo NOx is used to penalize engineout NO x emissions and the equivalence factor w Hd is used to encourage ATS heating. The optimal engine control inputs are determined using a grid search.
With this realization, the optimal engine control inputs are determined for the actual mission rather than for the predicted one, ensuring robustness toward mispredictions, at the cost of an increased computational demand.

Robustness to Misprediction
In this section, the performance of the predictive supervisory controller is analyzed for two misprediction cases. To obtain comparable results, the ATS is preconditioned as described in Section 5. Figure 11 shows the prediction cycles considered in this section. The first misprediction case is shown in the middle. It was obtained by filtering the NRTC using a low-pass filter with a cut-off frequency of 0.01 Hz and represents the case where only averaged information about the upcoming missions is available. The second misprediction case is shown on the right. It was obtained by rearranging the individual segments of the NRTC and represents the case where the timing of the predictive information is wrong. The cycles with misprediction were used by the predictive supervisory controller, while the NRTC was followed during all experiments.  Figure 11. Considered misprediction cases. The NRTC is shown on the left. It consists of seven segments that describe the operation of different nonroad applications [27]. These segments are visualized by the gray areas and assigned a capital letter to illustrate their order. The filtered NRTC is shown in the middle. The rearranged NRTC is shown on the right.
The corresponding results are shown in Figure 12. The upper plot shows the error in the emitted tailpipe NO x mass. The effect of misprediction can be analyzed by first considering the operation without feedback from the MPC. For the case without misprediction (left), the error of 10.5% stems solely from model mismatch. For the cycles with misprediction, the error increased to 13.0% for the filtered NRTC (middle) and to 20.3% for the rearranged NRTC (right). When feedback was introduced via the MPC, the predictive supervisory controller never exceeded the tailpipe NO x limit by more than 0.3% for all considered cases. This result indicates that the predictive supervisory controller is robust towards mispredictions. Furthermore, the increased feedback control action did not result in an increase in fuel consumption.
In fact, the fuel consumption for the filtered NRTC is lower than that for the case without misprediction. A possible explanation for this is that the misprediction counteracts the model mismatch, resulting in a reference trajectory that results in better performance on the real system. This suggests that using a filtered prediction could improve the performance of the predictive supervisory controller.

Conclusions
In this work, a predictive supervisory controller for the integrated emissions management of a diesel engine and its aftertreatment system was developed. First, an efficient optimization method was developed to solve the optimal control problem of operating the engine system over a mission. The considered objective was the minimization of the fuel consumption, while respecting an upper bound on the emitted tailpipe NO x mass. Next, the resulting optimization method was used in a predictive supervisory controller and the controller performance was evaluated experimentally.
The results show that the predictive supervisory controller successfully adapts the engine operation to the specific mission. At equivalent tailpipe NO x emissions, the resulting controller was shown to reduce the fuel consumption by 1.1% for the nonroad transient cycle, compared to the operation with a fixed engine calibration. Further, the controller's robustness to different missions, initial ATS temperatures, and NO x limits was demonstrated.
Finally, an adaptation of the low-level engine controller was presented that allows the controller to deal with mispredictions. The results for two misprediction cases showed that the predictive supervisory controller never exceeded the tailpipe NO x limit by more than 0.3% and did not require more fuel than for the case without misprediction.
Based on this work, there are three avenues for future research. First, the developed methodology could be investigated further. For example, the type of predictive information required by the predictive supervisory controller could be analyzed and further experiments with filtered predictive information could be performed. Further, improvements to the model and the optimization method could be considered to lower the computation time or achieve a more accurate result.
Second, the presented methodology could be used for the development of a predictive supervisory controller for series production vehicles. The focus should lie on the integration of the presented optimization method into embedded systems and on obtaining predictive information.
Third, the methodology could be used to obtain an experimental benchmark for the development of simpler, potentially non-predictive supervisory controllers. During the development of such controllers, their performance can be evaluated by comparing it to that of the method developed in this work.  Acknowledgments: We thank FPT Motorenforschung AG, the Swiss Federal Office of Energy (SFOE), and the Swiss Competence Center for Energy Research (SCCER) for supporting this project.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A. Implementation of cdElements
The basic principle of the continuously differentiable look-up elements (cdElements) is illustrated using the example shown in Figure A1.  The cdElement includes a center c between any two vertices v lo and v hi and a quadratic function is evaluated as where ξ is the relative position of x with respect to v lo and v hi , and the center c is the distance between the quadratic function and the line segment connecting the vertices x lo and x hi at ξ = 0.5. During the fitting process of cdElements, continuous differentiability is enforced using respective constraints at each vertex. The example in Figure A1 features four grid points and four vertices. Additionally, the cdElement features three centers: one for each of the three segments. To enforce continuous differentiability, two constraints are considered during the fitting process. The first constraint enforces that the gradient of the left segment and the gradient of the middle segment must be equal at x lo . The second constraint enforces that the gradient of the middle segment and the gradient of the right segment must be equal at x hi . The gradient at the outer bounds of the outermost segments is free.
The resulting evaluation of the cdElement is shown by the solid black line in Figure A1 and is smooth. The first and second derivative of cdElements are computed as ∂y ∂x = ∂y ∂ξ ∂ξ ∂x (A4) The evaluation of the derivatives is computationally inexpensive. The quadratic function between two grid points results in a piecewise affine first derivative and a piecewise constant second derivative. As a result, the cdElements are once continuously differentiable.
For the sake of brevity, the working principle of cdElements is only shown for a one-dimensional look-up element. Nevertheless, the method is extendable to higherdimensional look-up elements. For a two-dimensional cdElement, the line segment between two vertices is replaced by a surface spanned by four vertices. Four edge centers and one face center are added. Continuous differentiability must be enforced along all four edges. In three-dimensional cdElements, cubes spanned by eight vertices must be considered. Twelve edge centers, six face centers, and one cube center must be added. Continuous differentiability must be enforced along all six faces.
While the method is applicable to multi-dimensional look-up elements, the scalability with dimensionality limits its application. In this work, one-, two-, and three-dimensional cdElements were used.