Heavy-duty diesel engines are used in a wide range of applications. For varying operating environments, the engine and aftertreatment system must comply with the real-world emission legislation limits. Simultaneously, minimal fuel consumption and good drivability are crucial for economic competitiveness and usability.Meeting these requirements takes substantial development and calibration effort, and complying with regulations results in a trade-off between emissions and fuel consumption. TNO's Integrated Emission Management (IEM) strategy finds online, the cost-optimal point in this trade-off and is able to deal with variations in operating conditions, while complying with legislation limits. Based on the actual state of the engine and aftertreatment system, an optimal engine operating point is computed using a model-based optimal-control algorithm.A novel feature introduced in this work is the addition of a feedback scheme to control the tailpipe NOx emissions through modification of the Lagrange multiplier in the optimal control algorithm. The Lagrange multiplier represents the penalty on tailpipe NOx emissions in the optimal control problem. This feature provides In-Service Conformity (ISC) in real-life operation and adds robustness, in terms of emissions, to system disturbances, such as production tolerances, system ageing and sensor or actuator errors.The IEM strategy is a generic toolkit and can incorporate additional optimization variables, provided their effects are accurately represented by the online models of the engine and aftertreatment system. This can be used to include additional degrees of freedom such as fuel injection timing, pressure, pre- and post-injections and power-splits for hybrid drivelines. IEM is capable of real-time implementation and has previously been operated on an engine testbed, showing up to 2% reduction in fuel consumption that can be translated into a corresponding CO2 emission reduction.