Pollutant immissions must be kept below some threshold values to prevent health and environmental damage. At the moment, the problem is usually met by constant emission limits for each vehicle independently from specific conditions - in particular, without any relation to the actual immission situation. This approach offers the advantage of simplicity, but offers no guarantee that the immission levels will be kept.New developments, in particular the expected diffusion of i2v methods, allows suggesting context specific emission levels so that the total emission roughly corresponding to the local immissions - can be limited to the target values. To meet this goal, emission-oriented control will be needed. This paper proposes a robust control system which allows tracking a time-varying NOx profile, based on the sliding mode concept. The design is based on data-driven models of the air path and of the NOx production, and is validated experimentally on a 4-cylinder 2.0-liter production engine.The problem of unfeasible limits is also addressed - e.g., the case in which the required emission level is too low to be met. The proposed method can be used also for particulate matter and for both, of course inside the physically possible region.