1. A method comprising: providing an exhaust stream for an internal combustion engine, the exhaust stream fluidly coupled to an aftertreatment component; optically determining an amount of an exhaust gas constituent in the exhaust stream during the operation of the internal combustion engine; and modifying a model stored on a computer readable medium in response to the amount of the exhaust gas constituent, wherein the modifying the model comprises at least one modifying action selected from the modifying actions consisting of calibrating a modeling parameter, resetting a modeling parameter, and resetting an integrator.