In diesel engines with EGR and VGT, the gas flow dynamics has significant nonlinear effects. This is shown by analyzing DC-gains in different operating points showing that these gains have large variations. To handle these nonlinear effects, a nonlinear state dependent input transformation is investigated. This input transformation is achieved through inversion of the models for EGR-flow and turbine flow. It is shown that the input transformation handles the nonlinear effects and decreases the variations in DC-gains substantially. The input transformation is combined with a new control structure that has a pumping work minimization feature and consists of PID controllers and min/max-selectors for coordinated control of EGR-fraction and oxygen/fuel ratio. The EGR flow and the exhaust manifold pressure are chosen as feedback variables in this structure. Further, the set-points for EGR-fraction and oxygen/fuel ratio are transformed to set-points for the feedback variables. In order to handle model errors in this set-point transformation, an integral action on oxygen/fuel ratio is proposed in an outer loop. An experimental validation and comparison with a control structure without input transformation shows that the proposed structure reduces EGR-errors at the expense of increased pumping losses. In addition the comparison shows that the input transformation improves the performance and achieves the same step response for different flow conditions, thus handling the nonlinear effects.