Rising demands on new engine development require an increasing use of complex engine control systems. The calibration of such complex systems is a time and cost consuming task. Today's engine test bed technique offers full automatic calibration and optimization programs. With such programs engine mapping and calibration can be carried out at reasonable time even when a rising number of parameters is necessary. One important parameter in this field is engine knock.In this paper a new approach for real time knock analysis is described. This new approach allows a high accurate knock detection in the whole engine operation range without any adjustment during an automatic test run. Such a test run with an application of an automatic engine map calibration is presented. The goal for this optimization task was a two dimensional calibration of spark advance and EGR to minimize the NOx + HC emission under the restriction of a defined fuel consumption.