Modern electronic control units (ECUs) typically contain many physically based models represented by a complex structure of maps, curves and scalar parameters. The purpose of these models is to monitor or predict engine values that are normally measured by actual sensors. If the model structure is a good representation of the physical system and the parameters are well fitted, such a model can replace the sensor and serve as a virtual sensor to reduce the cost and complexity of the overall system. Virtual sensors are commonly used in the ECU for predicting engine torque, air pressure and flow, emissions, catalyst temperature, and exhaust gas temperatures. To ensure an optimal prediction quality of these models, their parameters need to be calibrated using real measurement data collected, e.g., in the vehicle or in the test cell. Due to the models’ complexity and the high number of parameters, a manual calibration is very time consuming or even impossible. Instead, iterative multivariate optimization algorithms are more efficient. The optimization of the model parameters can be performed offline on a PC and doesn’t require access to the physical target which helps to save time and costs throughout the entire calibration process. This paper presents the implementation of an automated calibration procedure in a generic tool framework, ETAS ASCMO-MOCA, to enable a broad use in function calibration and virtual sensor development. The ECU model can be provided in the proprietary formats of MATLAB Simulink® and ETAS ASCET. A formula editor is also available to recreate the function in ASCMO-MOCA, in case the source model is not available. Recorded measurement data stimulates the model inputs for the optimization. The difference between the actual sensor values in the data set and the model output represents the optimizer’s cost function. A gradient descent algorithm is used to find optimal calibration parameters while minimizing the deviation of the model prediction from the desired output behavior. For practical reasons, additional constraints can be considered during the optimization for calibration curves and maps, such as smoothness factors or gradient limitations. Once the final optimized and verified model is available, it can be integrated into the ECU control strategy. Several examples from ECU function development are shown throughout the paper.