Semi-physical mean-value NOx model for diesel engine control