Flatness-based nonlinear embedded control and filtering for spark-ignited engines