In this paper, we develop a method for optimizing urea dosing to minimize the downstream readings from a production NOx sensor that has cross-sensitivity to ammonia. This approach favors high NOx conversion and reduced ammonia slip. The motivation for this work is to define a process to identify the maximum selective catalytic reduction SCR performance bounds for a given drive cycle. The approach uses a model structure that has a closed-form optimal solution for the urea injection. Every aftertreatment system has its own, unique model, which must be identified and validated. To demonstrate the approach, a model is identified and validated using experimental SCR input/output NOx sensor data from a 2010 Cummins 6.7L ISB production engine. The optimal control law is then simulated and its performance compared against the simulated performance of the SCR using experimental data for its inlet conditions. The example case showed an optimal NOx conversion efficiency of 92.71% and an optimal NH₃ conversion efficiency of 98.67% for a transient drive cycle.