## 3 Results--HiL-Based Calibration and Validation of TWC and HEGO Diagnoses
### Phase #1--Diagnostic Run with an OK System  
In order to release a diagnosis, two main release conditions must be fulfilled (Figure 4a): Firstly, there must be a release from the diagnostic state manager (DSM), and secondly, all relevant physical release conditions must be fulfilled. The DSM collects all diagnostic results and approves whether a corresponding diagnosis may be run based on all available diagnoses results. In the present example, the following physical release conditions must be fulfilled for an applicable time: The exhaust gas mass flow \(\dot{m}_{Exh}\) as well as the engine speed \(n_{Eng}\) and relative load \(rl_{Eng}\) must be within applicable thresholds. The exhaust gas mass flow should also show comparatively constant behavior, and the corresponding exhaust gas mass flow integral \(m_{Exh}\) must exceed a certain applicable threshold. Also, the environmental temperature \(T_{Env}\) and pressure \(p_{Env}\) must be within applicable thresholds; furthermore, the vehicle speed \(v_{Veh}\) and the engine coolant temperature \(T_{Coalnut}\) must exceed applicable thresholds. Moreover, the lambda value upstream TWC \(\lambda_{ULEGO}\) must meet a certain stability criterion and the TWC temperature \(T_{\text{TWC}}\) must be in the applicable release window as well as having a reasonably constant and even temperature. In Figure 5, HiL-based measurement results of the digital twin of the vehicle are compared to the ones of a real vehicle measurement on the chassis dynamometer during WLTC (Worldwide Harmonized Light-Duty Test Cycle) operation. In this figure, a selection  
Figure 4: Schematic flow diagram of the individual stages for TWC and HEGO diagnosis. of the aforementioned release conditions, including the respective applicable thresholds, is presented. Since the DSM release for the HiL simulation occurs at the same point in the cycle as the vehicle measurement, it can be concluded that no other diagnoses block the parallelization and that the DSM behavior is comparable. Furthermore, the physical measurement signals show good alignment between the vehicle and HiL measurements, resulting in a release of the diagnosis at roughly the same time during the respective drive cycle. To ensure transferability of OBD engineering tasks from the vehicle to a HiL platform, the diagnostic run on the HiL platform must match all relevant characteristics of the diagnostic run in the vehicle (Figure 4b). In Figure 6 the diagnostic run of the parallelization is shown for a stabilized TWC and an OK HEGO sensor (OK system). Figure 5: Comparison of WLTC HiL and chassis dynamometer measurement—Selection of physical release conditions for the parallelization, including applicable enabling thresholds. (**a**) Lambda upstream TWC \(\lambda_{ULEOG}\); (**b**) coolant temperature \(T_{Coalent}\); (**c**) exhaust gas mass flow integral \(m_{Exh}\); (**d**) exhaust gas temperature \(T_{Exh}\); (**e**) exhaust mass flow \(\dot{m}_{Exh}\); (**f**) engine speed \(n_{Eng}\); (**g**) parallelization release; (**h**) vehicle speed \(v_{Velt}\). The correct reproduction of the simulated HEGO sensor voltage \(U_{HEGO}\) during the parallelization event implies an excellent modelling of the oxygen loading and unloading behavior of the TWC model and the subsequent conversion of the \(\mathbf{\lambda}\)-signal downstream TWC into the respective voltage signal, which is necessary as input for the ECU. Furthermore, it can be observed that the applicable switching points for the parallelization (triggering and stopping OSC measurement), which indicate whether the TWC is completely filled or emptied with oxygen, correspond well between the HiL simulation and the vehicle measurement. The exact replication of all these described phenomena are mandatory prerequisites to ensure a safe transfer of respective engineering tasks to a simulation environment.