1. Introduction
Currently, the automotive industry is undergoing a profound transformation toward software-defined and highly automated vehicles, driven by advances in electrification, connectivity, and intelligent driving technologies [
1]. Modern automotive software systems (ASSs) have evolved from predominantly mechanical systems into complex cyber-physical systems, which are characterized by tightly integrated software, electronic control units (ECUs), sensors, actuators, and communication networks [
2,
3]. This evolution is reflected in the exponential growth of system architecture complexity, which has increased from relatively small codebases in early systems to millions of lines of code in modern vehicles [
4]. As a result, ensuring the safety, reliability, and robustness of such complex systems has become a critical challenge [
5,
6].
In this context, system validation processes in realistic environments play a fundamental role in detecting unseen faults and maintaining adherence to safety standards and operational requirements, i.e., the ISO 26262 standard [
7]. However, as a result of conducting such testing approaches under various operational conditions, a massive volume and variety of data are generated [
8]. In particular, prototype vehicles and HIL test benches continuously record hundreds of sensor and internal ECU signals during real and virtual driving scenarios [
9,
10,
11]. While such data provide rich information about system behavior, the manual analysis of multivariate numerical time-series data has become impractical due to the volume, noise, and complex temporal dependencies between the signals [
12,
13].
Conventional approaches to analyzing such test records, including rule-based and threshold-based methods, rely heavily on expert knowledge and manual intervention [
14,
15]. These methods cannot adapt to various operating conditions, struggle with high-dimensional signal interactions, and are unable to detect emerging and concurrent fault patterns [
16]. In industrial practice, for example, during measurement-analysis processes, anomaly detection is typically performed using predefined thresholds, with deviations from expected ranges flagged and corrected using simple heuristics. Although these approaches are effective for identifying extreme deviations, they are inherently inflexible, do not transfer well to different signals or environments, and can lead to information loss due to manual filtering. This motivates the development of an automated approach for detecting anomalies in time-series data from vehicle sensors under various operational conditions in an efficient manner [
17,
18].
Given the volume and complexity of modern vehicle data, data-driven approaches for fault detection and diagnosis (FDD) based on machine learning (ML) and deep learning (DL) are becoming increasingly important [
19]. These methods enable the extraction of knowledge from data patterns and support tasks such as fault detection, anomaly identification, and modeling of system behavior [
20]. As a category of data-driven ML methods, unsupervised learning offers the ability to learn system behavior directly from the data and cluster samples based on similarity, reducing the reliance on manual labeling [
21]. This challenge is particularly evident in the context of real-world automotive datasets, where the provision and labeling of all possible fault states are impractical.
Recently, data-driven anomaly detection based on autoencoders has emerged as a promising approach for industrial and automotive applications. This is mainly due to its ability to learn a compact representation of normal system behavior and detect deviations based on reconstruction errors [
22,
23]. Denoising autoencoders (DAEs) further enhance model reliability by training the model to reconstruct clean signals from noisy inputs, which makes them suitable for realistic operating conditions [
24,
25]. From an automotive engineering perspective, however, the existing literature exhibits three major limitations. First, within the automotive domain, comparing multiple DAE variants under the same experimental conditions during the system validation of ASSs has not been systematically explored. Second, decision thresholds for anomaly values are typically defined as constant, globally tuned values, which can lead to high false-alarm rates or missed detections when operating conditions, system versions, or noise levels change. Third, current autoencoder-based methods are black-box approaches and do not offer insights into the reasons for decision-making or the detection of a specific anomaly. Furthermore, the lack of transparency regarding the analysis process hinders technical acceptance in safety-critical domains.
In parallel, explainable artificial intelligence (XAI) techniques have been proposed to increase the transparency of complex models by mapping predictions to specific input features or time steps [
26]. While XAI has already been investigated for supervised classification or simple unsupervised tasks, its integration into DAE-based anomaly detection for high-dimensional sensor data from the automotive industry remains limited [
27,
28]. At the same time, adaptive thresholding strategies, which dynamically adjust thresholds, have proven effective in reducing false alarms in sensor fault detection and process monitoring. However, such strategies have rarely been integrated into deep learning-based anomaly-detection pipelines to date [
29].
In this study, we address the aforementioned gaps by proposing a hybrid adaptive denoising autoencoder framework with XAI for detecting anomalies in complex automotive test-drive data. The proposed framework is evaluated using two complementary use cases: (i) real-world test drives with an instrumented prototype vehicle from the IAV industry and (ii) digital test drives from an HIL environment using real ECUs and high-fidelity system models. The consideration of both real and digital environments enables a comprehensive assessment of model robustness, transferability, and applicability across testing phases. The study systematically investigates anomaly-detection performance under various system versions, noise levels, DAE architectures, and numbers of sensors. Furthermore, it shows the effect of thresholding strategies and XAI integration on detection performance and interpretability. By training the model exclusively with fault-free data, deviations in the reconstruction can be used to identify anomalies and potential faults in unknown datasets. This approach enables the detection of both individual and simultaneous faults in sensor signals obtained from real and simulated test environments.
The main contributions of the proposed framework can be summarized as follows:
Development of an adaptive DAE-based framework for anomaly detection in the automotive industry, which is applicable to both real prototype and HIL test-drive data and supports multiple network architectures (LSTM-DAE, GRU-DAE, RNN-DAE and ANN-DAE).
Integration of a dynamic thresholding mechanism based on Adaptive Gaussian Thresholding to ensure stable false-alarm behavior under varying operating conditions, system versions, and noise levels.
Integration of XAI techniques to provide sensor- and time-localized explanations of anomaly detections, thereby enabling engineers to determine which signals and time intervals contribute most significantly to each detection event.
Two different case studies were considered, covering both real-world and virtual test drive processes for electric vehicles (EVs) and internal combustion engine (ICE) vehicles, respectively.
Comprehensive analysis of the effects of changes in system versions, noise levels, DAE architectures, and the number of input sensors on the detection performance and interpretability of the proposed DAE in both real-world and HIL use cases.
The remainder of the article is structured as follows:
Section 2 provides a comprehensive overview of the state of the art and highlights the most important contributions as well as the limitations in this field.
Section 3 presents the proposed methodology, including details of the model architecture.
Section 4 describes the experimental setup as well as the datasets, architectures, thresholding techniques, and XAI methods used. The experimental results are presented and discussed in
Section 5, and
Section 6 concludes the article and outlines future research directions.
2. Related Work
In this section, the main contributions of related work addressing the problem of anomaly detection in ASSs are presented, highlighting the limitations and gaps associated with existing methods.
Driven by the rapid progress of data-driven ML and DL techniques, numerous intelligent fault-detection approaches have been introduced with lower implementation complexity and high performance compared with traditional model-based methods. Within the automotive domain, several ML techniques, e.g., SVM, ANN, PCA, and RF, have been investigated for various levels of testing in ASSs. For example, focusing on multi-sensor autonomous vehicle systems, the SVM-based method proposed in [
30] reported average fault-detection and identification accuracies of 94.94% and 97.01%, respectively. In the same manner, ANN-based diagnostic methods were employed in [
31] for internal-combustion-engine fault diagnosis, where injector faults were isolated using statistical and frequency-domain analysis applied to real-world datasets.
With the advancement of DL techniques and their ability to handle massive amounts of data, increasing attention has been directed towards developing intelligent deep-neural-network-based FDD models using historical operational data. Studies that mainly concentrate on post-manufacturing operational scenarios, i.e., real test drives, have reported high achievements using DL methods. For example, the applicability of 1D CNN and multi-class DNN architectures for concurrent fault diagnosis was investigated in [
32], where high classification performance was achieved using real-world automotive datasets. Focusing on electric vehicle systems, an LSTM-based FDD framework targeting short-circuit and open-circuit faults in EV systems was introduced in [
33] using datasets generated through VIL simulations, where the proposed approach outperformed conventional diagnostic techniques.
On the other hand, during the development and validation phases of automotive systems, a hybrid CNN-LSTM architecture was proposed in [
12] for analyzing sensor-related faults during HIL validation activities, i.e., requirement-based testing. The obtained results demonstrated approximately 5% improvement in diagnostic performance compared with standalone DL structures. In the same context, but focusing on another testing method, a CNN-LSTM-based denoising autoencoder (DAE) architecture has been proposed in [
25] for intelligent analysis of B2B testing results, achieving an MSE of 0.00312 at 10% noise. Likewise, an intelligent diagnosis framework based on RF and focusing on air-brake systems was proposed in [
34]. Using datasets generated from HIL simulations, the proposed method achieved a classification accuracy of 92%. Aiming at handling the problem of concurrent fault detection within the real-time validation process of ASSs, a GRU-based DAE combined with k-means clustering has been proposed in [
24]. Compared with conventional clustering approaches, the proposed method demonstrated improved clustering performance. Despite achieving high clustering accuracy, the proposed method remained restricted to signal-level analysis without providing contextual interpretation of the detected anomalies.
In recent years, autoencoder-based anomaly-detection approaches have attracted increasing attention in automotive data analysis, particularly in cases where labeled datasets are not available. In this context, Von Schleinitz et al. [
35] proposed the VASP-based fault-detection framework, combining VAE reconstruction with LSTM-based prediction. Focusing on the analysis of motorsport telemetry data, the reported results showed a considerable reduction in prediction error under faulty operating conditions. Nevertheless, the study did not address explainability aspects or concurrent fault scenarios. In the context of connected and automated vehicles, Wang et al. [
36] introduced the LAGMM framework for trajectory anomaly detection by integrating density estimation with representation learning of an autoencoder. Furthermore, to enhance temporal feature-extraction capability, a D-CNN-LSTM autoencoder architecture has been proposed in [
37]. However, neither study investigated explainability mechanisms nor considered an adaptive threshold within automotive validation environments.
The limited interpretability associated with anomaly-detection approaches has motivated growing interest in integrating XAI techniques with reconstruction-based models. For instance, Rüttgers et al. [
38] proposed the ARCANA framework for root-cause analysis of anomalies detected using autoencoders. Besides, interpretability-aware loss functions have been introduced by Jiang et al. [
39] to enable feature-level anomaly localization. Other studies incorporated SHAP-based explanation mechanisms into deep autoencoder frameworks, aiming to enable interpretation of the prediction output [
40,
41]. Although these methods have played a vital role in providing explainability, their applications have remained mainly limited to industrial and communication datasets rather than automotive HIL validation systems.
Based on the reviewed literature, several limitations can still be identified in current intelligent fault-detection approaches during the real-time validation of ASSs. Specifically, many reconstruction-based anomaly-detection methods either lack semantic interpretability of anomalous behavior or depend on constant static thresholds. To address these limitations, the present study proposes an intelligent and explainable framework to be integrated within the real-time validation process of ASSs at the system level, i.e., during real and virtual test drives. The proposed methodology combines adaptive DAE-based anomaly detection with XAI techniques to provide explainable fault interpretation under realistic automotive validation conditions.
3. Methodology
In this section, the proposed framework is presented, including real-time HIL simulation, FI framework, data analysis, and management.
The proposed methodology for developing an intelligent and explainable DAE-based framework for analyzing automotive validation recordings is illustrated in
Figure 1. It consists of two main phases: model development and deployment with inference. The development phase consists of four stages, including data collection, data preprocessing, DAE model development, and explainability-analysis development. On the other hand, the deployment phase includes monitoring and analysis activities of unseen test recordings in which the developed framework is employed for anomaly detection and interpretation.
3.1. Data Collection
In the first phase of the proposed framework, the collection of multivariate temporal signals from real-world and virtual driving activities is performed. By conducting real test-driving activities, the system behavior of a real vehicle prototype under realistic traffic and environmental conditions is monitored and captured. On the other hand, the virtual driving environment developed in [
42] is employed for conducting digital test drives using a real-time HIL simulation system interacting with ECUs under controlled operational conditions. The generated test recordings from both test-drive activities include measurements of system variables related to vehicle dynamics, sensor outputs, communication variables, control commands, and actuator responses.
To verify the generalization capability of the proposed framework, multiple operational scenarios generated under different driving conditions are included in the dataset. The collected data are divided into model-development records and unseen deployment records. While the model-development dataset is employed for training and validation processes, the unseen records are used for runtime evaluation during the deployment phase.
It should be emphasised that the DAE models are trained independently on the healthy data of the respective setting for each test environment. The real test-drive and HIL recordings differ substantially in their data distributions, including the sampling rate (100 Hz versus 1000 Hz), the selected signal sets, the vehicle type, and the noise characteristics. Direct transfer of trained weights between the two settings is therefore not pursued; instead, the transferability claim refers to the methodology, comprising preprocessing, DAE-based reconstruction, and adaptive thresholding, which is applied unchanged in both environments.
3.2. Data Preprocessing
Once the data-acquisition process is completed, a preprocessing pipeline is applied to improve the quality and consistency of the recorded signals. Due to various real environmental conditions, automotive signal recordings generally contain inconsistent timestamps, redundant variables, corrupted measurements, and noise introduced by sensing and communication layers. Therefore, the preprocessing phase becomes necessary before model development. The higher the quality of the training dataset, the higher the capability of the model to learn representative behavioral patterns [
43].
The preprocessing phase starts with a data-cleaning and filtering process, in which incorrect measurements, NaN values, or incomplete values are removed to prevent the model from learning misleading patterns. Furthermore, only the signals relevant to the objectives of this study are considered. Specifically, in the case of real-world test-drive datasets, current, voltage, temperature, and vehicle operational-state signals are considered, whereas irrelevant variables are excluded. By doing so, the computational complexity can be reduced while improving the quality of the developed models.
Following the cleaning phase, all retained signals are normalized using min-max normalization in order to address the large variation in signal magnitudes among current, voltage, and temperature measurements [
44].
Mathematically, given a time-series dataset
, the normalized signal
is computed as follows:
where
and
are the minimum and maximum of the signal over the recording, and
T is the sequence length. This transformation maps all values to the interval
while preserving the temporal behaviour of the signal. In addition, the recordings are resampled to ensure consistent sequence lengths across all measurements, since the durations of the recordings vary depending on the driving scenarios. These operations contribute not only to improving numerical stability and model convergence, but also to ensuring structural consistency of the input data.
To further improve robustness against noise, an average smoothing operation based on a sliding window of size
w is applied [
45]. This process reduces high-frequency fluctuations while preserving the overall temporal trends of the signals. Subsequently, the recordings are segmented into fixed-length temporal windows using a sliding-window strategy. This segmentation transforms long recordings into standardized subsequences suitable for DL-based learning and increases the number of training samples available for model development.
Due to the high dimensionality and redundancy of the recorded signals, a dimensionality-reduction and feature-selection process is performed. In total, four current signals, four voltage signals, and four temperature signals are selected from the available measurements of a real test drive. On the other hand, throttle position, engine temperature, mean effective torque, engine rpm, rail pressure, and vehicle speed variables are selected from the available measurements of a virtual test drive. The selection is based on identifying representative variables among groups of correlated signals while preserving the most informative operational characteristics of the system. This process reduces computational complexity, improves model generalization, and enhances interpretability.
To improve the robustness and generalizability of the developed model under realistic operating conditions, Gaussian noise is introduced into the dataset during the training and evaluation phases. In industrial practice, sensor measurements are often affected by interference and unfavorable acquisition conditions. By incorporating artificial noise, the model can therefore learn representative patterns even in the presence of signal interference and noisy measurements [
46]. Gaussian noise is defined as a random variable generated from a Gaussian distribution with mean zero and variance
. By incorporating Gaussian noise of varying intensity, it is possible to assess the extent to which the proposed approach is capable of detecting the fault under noisy operating conditions. Furthermore, evaluating the model using progressively increasing noise levels facilitates the assessment of its stability and robustness when processing incomplete sensor measurements. Such robustness is particularly important for practical applications where measurement uncertainties and environmental disturbances can significantly affect the acquired signals.
Finally, the preprocessed dataset is divided into three portions. Specifically, one part is used for training the target model with 80% of the data, while the second and third parts with 10% each are used for the validation and testing process.
3.3. Model Architecture and Development
The target anomaly-detection model should meet the requirements of providing high detection capability under different driving scenarios while considering noisy operational conditions. Recently, DAE architectures from DL have shown promising performance in overcoming various challenges related to anomaly detection, feature extraction, dimensionality reduction, and noise suppression in industrial monitoring applications [
47]. Therefore, the DAE architecture was selected in this study due to its capability to learn representative latent features corresponding to healthy operational behavior.
The adopted DAE architecture consists of an input layer, corrupted input layer, encoder layers, latent-representation layer, decoder layers, and reconstructed-output layer, as illustrated in
Figure 2. The model was developed to extract representative temporal features and store them in the latent space, reconstruct the original signals, and identify deviations in unseen operational recordings based on the learned healthy patterns.
Once Gaussian noise has been added to the original input sequence, the encoder starts transforming the high-dimensional noisy data into a reduced latent representation in which the representative behavioral characteristics are stored. By using healthy operational data during training, the DAE model learns to denoise and reconstruct the input data efficiently. During optimization, the reconstruction loss between the original signal and the reconstructed output is minimized. The original input sequence is represented as follows:
where
is the vector of selected signals at time step
t, and
T is the sequence length.
The corrupted input data are generated according to Equation (
3)
where
is a noise vector drawn from a Gaussian distribution with zero mean and variance
, and
is the identity matrix.
The encoder transforms the corrupted sequence into a latent representation according to Equation (
4)
where
denotes the latent representation,
the encoder weight matrix,
the encoder bias vector, and
the nonlinear activation function.
On the other hand, the decoder reconstructs the original sequence from the latent representation according to Equation (
5)
where
and
are the decoder weight matrix and bias vector,
is the activation function, and
is the reconstructed output sequence.
During the training process, the DAE model is optimized so that the reconstruction loss between the original and reconstructed signals is minimized. The model is optimised by minimising the reconstruction loss,
where
N denotes the number of training samples, and
and
are the
i-th original and reconstructed samples, respectively.
Due to the fact that the DAE model is trained using only healthy data, the network learns the characteristics of normal system behavior. During the deployment phase, any deviation in the calculated reconstruction error of unseen faulty data indicates the presence of an anomaly.
3.4. Model Deployment and Inference
The deployment phase represents the runtime operational stage of the proposed framework. During execution, unseen test recordings are continuously acquired from the monitored system and processed using the same preprocessing pipeline employed during model development. The processed windows are then forwarded to the trained DAE model for reconstruction-based analysis. If the reconstruction error remains below the adaptive threshold, computed from the local statistics of the error signal, the operational condition is identified as normal; otherwise, the corresponding sequence is marked as anomalous and routed to the explainability module.
The deployment workflow supports online inference and continuous monitoring in both real and HIL-based validation environments. The final analysis stage comprises recording interpretation, anomaly visualization, and model refinement, whose feedback into model development closes the diagnostic loop. The generated outputs support validation engineers during fault investigation, model optimization, and test assessment activities. Since the DAE is trained exclusively on healthy data, the framework remains applicable even when fault labels are incomplete or unavailable, while the integrated explainability module links each detection to the contributing signals.
4. Case Study and Experimental Implementation
To verify the applicability of the proposed framework, this section presents selected case studies, highlighting the structure of the datasets and the implementation steps. In this study, two different case studies were examined to cover both real-world and virtual test drive processes of electric vehicles (EVs) and internal combustion engine (ICE) vehicles, respectively. In Case Study 1, sensor signal measurements from a real-world test drive conducted by IAV GmbH on a public road using a real vehicle prototype were analyzed. On the other hand, in Case Study 2, the test data from a virtual environment based on a real-time HIL simulation with a real ECU was considered.
4.1. Case Study 1: Real Test Drive
4.1.1. Test Setup and Measurement Analysis Environment for the Real Test Drive
In the automotive sector, comprehensive validation procedures are required prior to vehicle commercialization to ensure the quality and reliability of developed systems. In this study, the utilized measurement data were obtained from real-world vehicle test drives performed under different driving conditions in Munich during summer trial trips conducted between June and July 2025. During the experiments, measurement signals were recorded from multiple vehicle subsystems, including the battery system, electric drive components, electric power steering, cooling modules, crash, and system management. Consequently, the generated dataset provides a high-dimensional representation of vehicle operational behavior under realistic driving conditions.
The analysis workflow at IAV GmbH is performed using the industrial TRAVIS framework, which represents an integrated environment for automotive data acquisition, processing, and reporting. The framework imports Measurement Data Format (MDF4) recordings together with configuration metadata and processes the data through modular Python v3.10-based scripts for signal extraction and anomaly analysis. The generated outputs are subsequently transformed into structured reports and graphical visualization to support engineering evaluation.
Within the existing workflow, anomaly detection relies predominantly on conventional rule-based thresholding methods. In this approach, a signal sample
is classified as anomalous whenever the predefined operational limits are violated: A sample
is flagged as anomalous whenever it violates the predefined operational limits,
where
and
denote the lower and upper operational thresholds derived from engineering safety constraints.
Although static thresholds enable basic filtering of abnormal measurements, their applicability remains limited for dynamic and high-dimensional automotive signals due to the inability to adapt to changing operational conditions. Furthermore, the continuous manual adjustment of numerous signal limits introduces additional maintenance complexity within the engineering workflow.
4.1.2. Dataset Description
The utilized measurements are provided in MDF4 format, which is widely employed in the automotive industry for storing high-frequency sensor and ECU recordings. The analyzed dataset contains 531 measurements with a total size of approximately 29.5 GB, where individual recordings range from nearly 2 MB to more than 450 MB.
Within the scope of this study, the analysis focuses on selected electrical and thermal signals, including current, voltage, and temperature measurements. To improve computational efficiency, large recordings were filtered during loading, and raster-based sampling was applied to reduce memory overhead. The final dataset organization follows the industrial framework, where each column corresponds to a sensor signal, and each row contains the associated time-series observations.
4.1.3. Data Exploration and Statistical Analysis
Several exploratory analyses were conducted to investigate the statistical and temporal characteristics of the recorded measurements. The analyzed signals include temperature, current, voltage, subsystem-state, and operational vehicle measurements sampled at 100 Hz. The raw behavior of representative current, voltage, and temperature signals before preprocessing is illustrated in
Figure 3,
Figure 4 and
Figure 5. Temperature measurements generally exhibit smooth long-term variations, whereas current and voltage signals contain abrupt fluctuations and transient peaks during vehicle operation.
Trend analysis is performed using a moving-average smoothing operation,
where
is the smoothed signal and
is the selected window size. The results indicate that voltage and temperature signals exhibit relatively smooth long-term behaviour, whereas current signals demonstrate higher variability, as can be seen in
Figure 6. It has been observed that most signals do not follow standard statistical distributions due to varying operational conditions, road characteristics, and sensor diversity.
Temporal dependency was evaluated using the autocorrelation function (ACF). Temperature and voltage measurements demonstrated strong temporal correlation, whereas current signals exhibited more diverse dependency behavior. Correlation analysis based on the Pearson correlation matrix identified strong relationships between measurements originating from identical subsystems. Based on these observations, a representative subset of 12 signals was selected for the subsequent modeling stage to reduce computational complexity while preserving operational variability.
The pronounced fluctuations of the current signals reflect instantaneous load changes of the connected consumers: the electric power steering current responds to steering manoeuvres, while the 12 V lithium and intelligent battery currents follow acceleration and recuperation phases. Voltage dips and ripple on the 12 V rails indicate the stability of the low-voltage supply. These quantities are directly linked to relevant fault mechanisms, including increased contact resistance, harness and connector degradation, and supply instabilities, all of which manifest as abnormal current draw or voltage deviations. Transient voltage spikes are therefore safety-relevant indicators for the integrity of the low-voltage system.
The selection follows two engineering principles. First, the twelve signals cover the three dominant physical domains of the monitored subsystems, namely electrical current, electrical potential, and temperature, across functionally distinct components (battery system, power steering, control equipment, and integration modules), so that faults originating in different subsystems produce observable signatures. Second, each retained signal acts as the representative of a group of strongly correlated measurements identified through the Pearson correlation analysis; deviations affecting an excluded signal of a group therefore propagate to its retained representative. The selected subset thus preserves the operational variability of the full measurement set while reducing the input dimensionality, as summarized in
Table 1.
4.2. Case Study 2: Virtual Test Drive with Hil Simulation
4.2.1. Test Setup and Measurement Analysis Environment for the Virtual Test Drive
To validate the applicability of the proposed framework, a comprehensive automotive case study based on the ASM gasoline engine model from dSPACE [
48] was considered. The selected system represents a highly detailed automotive engine architecture designed to capture the operational behavior of modern internal-combustion engines under realistic driving conditions. The ASM gasoline engine incorporates advanced functionalities, including variable spark timing, enhanced combustion-chamber architecture, advanced fuel injection, and an integrated engine-management system responsible for regulating engine performance dynamically.
The engine model was developed and executed within the MATLAB/Simulink 2021b environment and includes multiple interacting subsystems, such as the SoftECU, powertrain, vehicle-dynamics, and environmental models. Dedicated input and output interfaces were additionally integrated to enable communication with the physical ECU within the HiL environment. The ASM framework provided by dSPACE supports comprehensive automotive simulation activities covering engine behavior, vehicle dynamics, electrical systems, and traffic environments.
At the hardware level, a HIL platform is used, consisting of dSPACE SCALEXIO and the MicroAutoBox II ECU operating under real-time conditions, as can be seen in
Figure 7. The ECU is responsible for generating actuator-control signals associated with fuel injection, rail-pressure management, and injection timing. Communication between the ECU and the SCALEXIO simulator is established through a CAN bus interface. Furthermore, the use case supports both online and offline HIL execution modes through the integration of SoftECU and conventional ECU models. Model implementation, parameterization, execution, and monitoring were additionally supported using ModelDesk v5.6, ConfigurationDesk v6.8, and ControlDesk v7.5.
4.2.2. HIL-Based Data Collection and Dataset Description
Following deployment of the HIL environment, healthy operational behavior was initially recorded during predefined driving scenarios without fault injection (FI). Subsequently, multiple sensor faults were injected into the Accelerator Pedal Position (APP) and engine-speed (RPM) sensors under identical operating conditions. The implemented faults include gain, noise, drift, delay, packet loss, and stuck-at faults. Faults were injected individually and simultaneously during transient intervals between 170 and 330 s, mainly during acceleration and deceleration phases.
The recorded measurement data were initially stored in the proprietary
.idv format utilized by ControlDesk and later exported into
.csv files for preprocessing and analysis. Each dataset was labeled according to the corresponding fault type and fault location for the model performance verification process. Several variables were monitored throughout the experiments, including throttle position, engine temperature, engine torque, engine speed, manifold pressure, rail pressure, and vehicle velocity. All measurements were sampled at 0.001 s, corresponding to 1000 samples per second. The system variables that have been considered in this study are illustrated in
Table 2.
4.3. Hyperparameter Optimization
Following data acquisition, preprocessing, and denoising, autoencoder development was conducted. Healthy operational data combined with Gaussian noise were utilized during training, whereas the fault datasets were employed for testing.
Several preprocessing operations were performed before model development, including metadata removal, sensor-label standardization, and standard-score normalization. Subsequently, the datasets were divided into training and testing subsets using an 80:20 ratio. To evaluate robustness under noisy operational conditions, Gaussian noise levels of 1%, 3%, 5%, and 8% were added to the healthy dataset, generating multiple noisy training datasets.
Four deep-learning architectures were investigated for denoising autoencoder implementation, namely GRU-based DAE, LSTM-based DAE, RNN-based DAE, and ANN-based DAE. Each architecture was trained independently using datasets generated under different noise levels.
To optimize the reconstruction performance, hyperparameter tuning was performed using the Ray Tune framework integrated with PyTorch v2.1. The optimized hyperparameters include batch size, learning rate, number of epochs, hidden-layer dimensions, and number of layers. As can be seen in
Table 3, the search space comprised the batch size (sampled between 128 and 421), the learning rate (between 0.0005 and 0.01), the number of training epochs (50 to 100), the hidden-layer dimension (16 to 64), and the number of layers (1 to 3).
The obtained results demonstrate that the developed models achieved different reconstruction performances depending on the selected configurations. The best-performing configuration achieved a reconstruction loss of 0.05%, whereas other configurations achieved reconstruction losses ranging from 0.14% to 0.17%. Overall, the optimization process demonstrates the effectiveness of hyperparameter tuning in improving reconstruction quality and anomaly-detection performance. All four architectures were optimized under identical conditions, using 90 Ray Tune trials per architecture, the same search space, and the validation reconstruction MSE as the objective function. The selected configurations for the GRU-, LSTM-, RNN-, and ANN-based DAE models are reported in
Table 3.
4.4. Thresholding Technique and Anomaly Detection
From a statistical perspective, a fixed threshold corresponds to a decision boundary derived from a single, global error distribution and is therefore justified only when the reconstruction error is stationary over time. Automotive measurements violate this assumption: driving manoeuvres, load changes, and environmental conditions cause the local mean and variance of the reconstruction error to vary considerably. The adaptive mechanism instead treats the error as a locally stationary process, estimating its first and second moments within a rolling window and adjusting the decision boundary accordingly. Adaptive thresholding is therefore preferable whenever the error statistics drift on time scales longer than the estimation window, whereas a fixed threshold remains adequate for stationary operating regimes, such as steady-state bench measurements.
Thus, static thresholds are generally insufficient for automotive measurements due to continuously changing operational behavior. To address this limitation, an adaptive thresholding strategy based on rolling Z-score statistics was implemented.
The adaptive threshold is defined as
where
is the adaptive threshold,
and
are the local mean and standard deviation of the reconstruction error, and
k controls the detection sensitivity.
The Gaussian assumption underlying Equation (
9) applies to the reconstruction error within a local estimation window, not to the raw measurements, which do not follow standard distributions. After smoothing and reconstruction, the local residuals of healthy data are approximately symmetric and unimodal, so the local mean and standard deviation provide an adequate characterization.
This adaptive strategy enables the threshold to evolve according to changing operational conditions, thereby reducing false-positive detections during transient behavior. Furthermore, reconstructed signals are transformed back into their physical representation before applying predefined safety constraints. Measurements violating predefined operational limits are assigned high penalty values to guarantee immediate anomaly detection.
Consequently, the combination of adaptive statistical thresholding and physical safety constraints improves the detection of transient anomalies, sensor drifts, and abnormal operational behavior in MDF4-based automotive measurements.
It is worth noting that the adaptive thresholding mechanism primarily targets the real test-drive recordings of Case Study 1, where traffic, road, and environmental conditions induce strong non-stationary behavior in the measured signals. For the HIL recordings of Case Study 2, the operational scenarios and fault-injection intervals are predefined, and the statistical behavior of the reconstruction error remains comparatively stationary. The threshold analysis for this case is therefore reported as a sensitivity study over the 90%, 95%, and 99% levels in
Section 5.1.2.
The thresholding component is based on rolling Z-score statistics, an established technique in streaming anomaly detection. The contribution of this work lies not in the thresholding method itself, but in its integration with DAE-based reconstruction and XAI-based interpretation within an industrial automotive validation workflow. Alternative thresholding strategies based on extreme value theory, such as the EVT-based thresholds, GMM-based thresholds, and non-parametric dynamic thresholding, constitute candidates for future comparison.
6. Conclusions
To address the limitations of current rule-based analysis approaches for test-drive recordings, this article proposes a hybrid adaptive DAE-based framework integrating adaptive Gaussian thresholding and XAI techniques for intelligent and transparent fault detection in real and virtual test-drive recordings. Vehicle measurements from real-world test drives and HIL-based virtual test drives, covering varying operating conditions, noise levels, and heterogeneous fault scenarios, were used for model development and evaluation. The results demonstrate robust anomaly detection and strong generalization across both physical and simulated environments. The comparison of DAE variants confirms that the choice of architecture has a central influence on reconstruction and detection performance. ANN-DAE achieved the most stable reconstruction behavior and the highest robustness under noisy conditions, with F1-scores of 0.9391 and 0.9639 on the real and virtual test-drive data, respectively, whereas the recurrent architectures exhibited higher sensitivity to signal disturbances and threshold variations. The adaptive Gaussian thresholding reduces the false-positive rate under varying operating conditions by adjusting the detection thresholds to the statistical behavior of the reconstructed signals, and the integrated XAI techniques enable the interpretation of detection decisions, which is particularly important in safety-critical automotive applications.
Several limitations remain. The evaluation on real test-drive recordings is based on a limited number of held-out windows, and the reported metrics are accompanied by bootstrap confidence intervals rather than repeated training runs; repeated-seed experiments and larger labeled evaluation sets will be addressed in future work. In addition, cross-environment transfer of trained models between HIL-based and real test drives will be investigated using domain adaptation techniques and time-series foundation models, and thresholding strategies based on extreme value theory, which model the tail of the error distribution directly, will be examined to relax the local Gaussian assumption.