Diesel engine control has already become complex, and in order to meet future emissions standards (such as Euro 4) it is likely to be the control system that will provide the needed performance increment. Common rail fuel injection offers yet more degrees of freedom which will need to be exploited as new emissions standards emerge.Whatever the emissions standards, there is a need to reduce risk at the earliest stages in the development of the powertrain. This will involve early and extensive simulation of the powertrain including its control system, sensors and actuators. What is the best way to achieve this using current tools? The result lies in a combination of a phenomenological model of the engine and a flexible controls environment.To illustrate the principles of developing prototype control systems, we will use the example of the CPower environment, which is a combination of a detailed engine simulation code (GT-Power) and the Simulink simulation environment.Examples of the application of CPower include EGR control, simulation of common rail fuel injection and the simulation of new types of sensor for powertrain control.