To improve the speed and accuracy of engine testing, the spark (gasoline)/injection (diesel) timing can be optimized based on the location of the 50% mass fraction burn point (α50) rather than the traditional approach of "sweeping" timing to find the most efficient point. Results from both gasoline and diesel engines show that setting α50 to around 8° ATDC gives optimum efficiency for most circumstances. An exception is the case of highly unstable combustion, where the misfire rate may also be strongly dependent on timing. For diesel engines this method is effective in finding the timing for best efficiency but in practice the chosen injection timing may be driven more by the need to optimize emissions.This technique has been implemented by incorporating a burn angle controller into the MAHLE Flexible ECU (MFE), a powerful and highly adaptable engine controller. The MFE includes the burn angle calculation (based on cylinder pressure signals) as well as the main control strategy in a single robust unit, allowing for straightforward test bed or vehicle operation of gasoline and diesel engines. The burn angle controller also takes account of knock and cylinder pressure limitations.A high octane fuel demonstrator car was developed using the MFE for the remapping of spark and other parameters. Optimum spark timing was found by the burn angle controller while operating the engine at different loads and speeds on a chassis dynamometer, without needing to remove the engine from the vehicle. The remapped engine delivered 15-20% more torque at low to medium speeds than the baseline engine (at the same boost pressure), while reducing fuel requirement due to lower exhaust temperatures. This could be felt as much stronger vehicle performance and improved flexibility in high gears.