Future government emission regulations have lead to the development and implementation of advanced aftertreatment systems to meet stringent emission standards for both on-road and off-road vehicles. These aftertreatment systems require sophisticated control and diagnostic strategies to ensure proper system functionality while minimizing tailpipe NOx and PM emissions across all engine operating conditions. In this paper, an integrated algorithm design approach with controls and diagnostics for an aftertreatment system consisting of a fuel doser, fuel reformer, LNT, DPF, and SCR is discussed.From a high level advanced algorithm design perspective, the aftertreatment strategies are categorized into four areas: 1) model-based temperature controls with fuel reformer H₂ and CO yield consideration, 2) estimation of non-immediately available signals, 3) evaluation of system performance for long-term and short-term compensation, and 4) diagnostics for the purpose of safety and tolerant controls. Advanced methodologies, such as optimal cascade control, Kalman filtering, nonlinear system identification and (sliding-mode) observer design are integrated to optimize and enhance the overall system performance and reliability. Vehicle and engine testing as well as simulation results are shown.