Air charge calibration of turbocharged SI gasoline engines with both variable inlet valve lift and variable inlet and exhaust valve opening angle has to be very accurate and needs a high number of measurements. In particular, the modeling of the transition area from unthrottled, inlet valve controlled resp. throttled mode to turbocharged mode, suffers from small number of measurements (e.g. when applying Design of Experiments (DoE)). This is due to the strong impact of residual gas respectively scavenging dominating locally in this area. In this article, a virtual residual gas sensor in order to enable black-box-modeling of the air charge is presented. The sensor is a multilayer perceptron artificial neural network. Amongst others, the physically calculated air mass is used as training data for the artificial neural network. The air mass calculation is performed by taking into account valve timing, effective valve cross-sectional area and low-pressure indication at intake and exhaust manifold. It can be shown that by applying the virtual sensor, a global black-box-model of the air charge can be built. Furthermore, the sensor enables to reduce the required number of measurements by DoE and at the same time to maintain good modeling results. The global air charge model can be used to derive virtual measurements for the air charge calibration.