1. Introduction
The objective of this work is to develop an effective method for the early detection of faults in Electric Power Steering (EPS) systems. From the perspective of an average vehicle user, the primary objective of this research is to increase vehicle reliability—particularly the reliability of the EPS system—thereby enhancing driving safety and improving steering precision. The main advantage of early fault-identification solutions is their ability to detect potentially hazardous faults, thereby enabling the timely activation of safety procedures and reducing the risk of critical system failures during vehicle operation.
Hardware-in-the-Loop (HiL) simulation and dynamometer testing are widely used to validate automotive control systems. HiL enables real-time verification of embedded control systems by connecting physical hardware with simulated plant models, providing a cost-effective, flexible, and repeatable alternative to full-scale system or vehicle testing, whereas dynamometer measurements are commonly treated as a reference for validating simulation results.
A comprehensive review of EPS fault-detection methods presented in [
1] highlights the role of HiL platforms in validating diagnostic algorithms under controlled and repeatable conditions. The review presents the structure and dynamics of EPS systems; outlines typical faults in sensors, electric motors, and mechanical components; and examines algorithms such as observer-based estimators, parameter-estimation schemes, and AI-supported classifiers (e.g., neuro-fuzzy methods). It also identifies limitations related to simplified models, nonlinear steering dynamics, thermal effects, and computational constraints.
Recent reviews [
2,
3] show that PMSM models for HiL applications range from simplified synchronous-frame models to high-fidelity FEA-based implementations capable of representing saturation, saliency, cogging torque, cross-coupling, and spatial harmonics [
4,
5]. Their main limitations include memory requirements, computational latency, interpolation errors, numerical stability issues, and limited robustness to parameter variations. Furthermore, validation procedures remain inconsistent, and thermal or loss models are often omitted.
In PMSM applications, validation is typically performed in stages: Software-in-the-Loop (SiL), HiL (or Control Hardware-in-the-Loop, CHiL), and then Power Hardware-in-the-Loop (PHiL), followed by comparison with a physical drive or dynamometer [
6]. In such applications, the control algorithm is generally retained throughout the workflow to isolate the effects of model fidelity and hardware interfaces [
7]. The agreement between simulation and measurement is commonly assessed using torque error, dynamic-response error, harmonic-spectrum agreement, latency, and simulation step size. Typical test cases include torque–speed sweeps, transient load changes, and parameter-uncertainty scenarios, with torque referenced to a dynamometer-mounted torque sensor [
6,
7,
8].
Waveform comparison methods reported in the literature include RMSE, Pearson correlation, Euclidean and Mahalanobis distances, energy residuals, settling time, mean values, RMS values, peak values, THD, harmonic spectra, and transient-duration metrics [
9,
10,
11]. Close agreement has been reported between the HiL, CHiL, and PHiL results and the dynamometer measurements for torque–speed sweeps and transient test scenarios, with torque errors below ±2% and transient-response deviations below 0.05 s [
6]. For comparison, HiL studies on induction motor drives reported torque-estimation errors below 5 Nm in the operating range—for example, at an output torque of 55 Nm, using powertrain test-bench measurements as the reference [
12]. In these studies, HiL was applied primarily to validate control, fault-diagnosis, and fault-handling functions.
Detailed electromagnetic models, such as the finite-element model presented in [
13], enable an in-depth analysis of motor operation and electromagnetic characteristics. Advanced PMSM models that combine finite-element-data-driven nonlinear modelling with integrated loss modelling have achieved current errors below 2% and agreement exceeding 90% between simulated and experimentally measured efficiency maps [
14].
The study [
15] represents uncertain HiL test-bench parameters by means of probability distributions and propagates them through a Modelica model using Monte Carlo simulation. The results indicate that the test-bench parameters considered have little effect on the measured efficiency. Uncharacterised uncertainties are intended to be identified through comparisons with experimental data and inverse uncertainty propagation.
Observed discrepancies between simulated and measured signals are typically related to sensor noise, communication delays, model simplifications, actuator dynamics, such as machine inertia and losses [
16], and the limited representation of nonlinear and multiphysics effects. Recent studies using integrated test environments and hybrid evaluation approaches report improved agreement between simulation results and experimental data [
9]. Another study [
17] reports that discrepancies between HiL and ideal-system responses arise primarily from non-negligible actuator dynamics, communication delays, measurement noise, model mismatch, and uncertainty in the parameters of the device under test. In the presented example, the HiL response exhibits a time delay caused by a motor-induced phase shift and an additional communication delay of 2 ms.
The IEEE standard [
18] defines metrics for assessing both the accuracy and sensitivity of HiL simulations. Accuracy refers to how closely the HiL system reproduces the behaviour of the real system, while sensitivity quantifies the impact of disturbances, delays, noise, and interface imperfections. Unlike the broader framework considered in the standard, this study focuses specifically on comparing motor-torque signals measured on a dynamometer with those generated by a real-time HiL platform.
The present study is part of a broader research project; therefore, the manuscript includes future research directions and clearly identifies the limitations that will be addressed in the next phases of the project. At the current stage, the focus is on developing and validating a methodology for comparing HiL-generated signals with dynamometer measurements and assessing the accuracy of the HiL signals. Since both the dynamometer-based motor test bench and the HiL setup are still under development, the experimental investigation was intentionally limited to selected steady-state operating points. Rotational speeds of 20, 100, and 200 rpm were selected because the available measurement equipment introduces significant noise at higher rotational speeds, which could adversely affect the reliability of the comparison. Nevertheless, these operating conditions were considered sufficient to demonstrate the feasibility and applicability of the proposed methodology.
Close agreement between real-world and HiL-generated waveforms is desirable, as it supports controller validation, safety assessment, and faster development. Therefore, the objective is to determine the fidelity of the HiL setup and to continuously improve its agreement with dynamometer measurements. However, the primary focus of the present work is the development of the proposed signal-analysis-based algorithm rather than the development of a highly accurate HiL motor model. Since experimental validation on a physical prototype is available and serves as the final reference, shortcomings of the HiL model can be addressed through dynamometer testing, which inherently captures unmodelled phenomena and hardware effects. Consequently, the HiL platform is used as an intermediate validation tool for the preliminary development and functional verification of algorithms based primarily on mean torque, slowly varying variables, signal acquisition, communication, and low-bandwidth controller behaviour. The present HiL fidelity is not considered sufficient for developing or calibrating waveform-sensitive diagnostic algorithms that rely on torque-ripple amplitude, correlation structure, or harmonic-order signatures; for these, the dynamometer remains the reference environment throughout this work.
Recent research has explored advanced nonlinear control strategies for PMSM drives. For example, the super-twisting-like fractional (STLF) controller proposed in [
19] reduces current ripple while maintaining good disturbance-rejection and tracking performance. Similarly, Ref. [
20] introduced a composite adaptive super-twisting sliding-mode (ASTSM) controller with online gain adaptation, improving robustness and disturbance rejection. However, the objective of the present work is not the development of a new motor control strategy. Instead, the focus is on evaluating the accuracy of the HiL signal by comparing it with dynamometer measurements. Future work will address the development of early fault-detection algorithms for motors and inverters while retaining existing control algorithms.
In summary, this publication addresses the following research questions:
How closely do the motor torque signals generated by the real-time HiL simulation match the signals measured on the dynamometer?
What metrics are suitable for a quantitative assessment of the agreement between the simulated and measured signals?
What are the main sources of discrepancies between the waveforms obtained from the two sources?
What actions can be taken to improve the level of agreement between simulation and measurement?
The remainder of this article is organised as follows:
Section 2 provides a general overview of the test setup and the motor model, including a description of the tested motor. In
Section 3, the measured torque time-domain signals are presented.
Section 3.2 describes the post-processing performed on the measured data and introduces the quantitative metrics used to assess similarities and differences between the time-domain signals. Measurement errors observed in the experimental data are discussed in
Section 3.3.
Section 4 summarises recommendations for the test setup and the modelling approach. Finally,
Section 5 concludes the article.
2. Materials and Methods
2.1. Research Gaps
Despite the widespread use of Hardware-in-the-Loop (HiL) environments in drives with Permanent-Magnet Synchronous Motors (PMSMs), the published validation methods and procedures remain inconsistent and only partially meet the needs of torque-sensitive applications, such as Electric Power Steering (EPS).
A recent review of the literature on real-time modelling of electrical machines for HiL testing summarises model architectures, computational limitations, and platform architectures [
2,
3], but these reviews do not propose a standardised, multi-domain protocol for comparing torque waveforms measured on a dynamometer with those estimated in HiL tests.
Real-time PMSM models, taking into account phenomena such as magnetic circuit nonlinearity, spatial harmonics in the magnetic field distribution, and iron losses, have been demonstrated on FPGA platforms and commercial HiL platforms and verified primarily using finite-element analysis and measured currents, as well as through deviations in average torque following model refinement [
4,
5,
14,
21].
Motor emulators in Power Hardware-in-the-Loop systems also emphasise the accuracy of electrical variables, including phase currents,
d–
q currents, and rotational speed, and typically exhibit relative tracking errors of a few percent without comparing the torque waveform based on dynamometer measurements [
22,
23,
24].
System-level studies comparing Control HiL, Power HiL, and dynamometer test results indicate close agreement in average torque values (e.g., within ±2%) and transient response times, which confirms the value of multi-stage validation processes for electric powertrains [
6,
25].
PHiL analyses make it possible to quantify the amplifier’s sensitivity to disturbances, delays, and dynamics [
16,
17,
18,
26], whereas research into test-bench control focuses on tracking the shaft torque and rotational speed of the mechanical interface, rather than on estimating the torque of the device under test [
27].
Metrics used to compare waveforms, as described in the wider literature on HiL simulation—RMSE, Pearson’s correlation coefficient, energy residuals, THD, and spectral metrics—are rarely used in combination for the same torque waveforms under different operating conditions [
9,
10,
11], whereas affine calibration (gain–offset), which is standard in sensor metrology [
28,
29], is rarely used to distinguish between channel scaling and deviations arising from dynamic mismatches or those related to the accuracy of torque mapping in the HiL model.
Furthermore, although the harmonic torque content resulting from the presence of cogging in the air gap of PMSM drives has been well characterised from an electromagnetic perspective [
30], no systematic reports have been published to date on the experimentally observed discrepancy between the dominant mechanical harmonic on a dynamometer and the harmonic occurring in a simplified real-time HiL system.
Finally, the operating points of the EPS system at low speeds and in steady-state conditions—where ripple harmonics and interaction effects dominate the diagnostic signature used by fault-detection algorithms—remain insufficiently addressed compared with driving-cycle tests aimed at investigating the behaviour of the driving system [
1].
Consequently, the HiL setup may appear suitable on the basis of its average-torque or current-tracking performance, but it remains insufficient for validating diagnostic methods at the signal waveform level across all operating conditions.
2.2. Novelty
This article addresses the gaps discussed above by proposing and experimentally demonstrating a compact, multi-method discrepancy-analysis procedure for PMSM torque signals. Signals obtained from a dynamometer test bench and a real-time dSpace HiL platform were analysed. The motor under test is a PMSM with four pole pairs and twelve slots, configured for measurement purposes and representative of Electric Power Steering (EPS) applications. The tests were carried out at selected steady-state operating points at rotational speeds of 20, 100, and 200 rpm, and at a torque reference of 3.92 Nm. A review of the literature shows that research has primarily focused on verifying the operation of the controller or the emulation of electrical ports. This study, however, presents a signal-level analysis aimed at determining where and why the estimated torque in HiL tests deviates from actual measurements.
The scientific contribution of this article comprises three elements: The first is an affine gain–offset calibration applied to the HiL torque channel. Second, despite closely matched mean torques, raw Pearson and Spearman coefficients remain weak and negative, becoming only weakly positive after affine correction, demonstrating that mean-value agreement does not imply waveform fidelity. Third, the spectral analysis reveals a systematic mismatch in dominant mechanical harmonics: a component near the 24th mechanical order on the dynamometer, consistent with the 4-pole-pair/12-slot topology [
30], versus dominance of the first mechanical harmonic in the HiL estimate. This finding links residual discrepancy to unmodelled machine and mechanical effects rather than to a residual gain error.
Beyond HiL bench qualification itself, this quantified discrepancy-decomposition workflow is intended as an enabling step for two downstream application areas that motivate the present study:
Firstly, torque-sensitive fault-diagnosis algorithms designed for PMSM drives in EPS systems are usually developed and preliminarily verified on HiL test benches before being implemented on physical hardware. These include schemes for detecting inter-turn short circuits and mechanical faults based on ripple amplitude, correlation, or harmonic signatures [
1,
12,
31]. If the torque waveform in the HiL environment deviates from the actual behaviour of the machine in terms of correlation structure and harmonic content, as shown here, there is a risk that a diagnostic threshold or classifier tuned on a HiL bench will be incorrectly calibrated when transferred to the actual system, which may result in false alarms or failures to detect early-stage faults.
Secondly, the same concerns regarding the accuracy of waveform reproduction in the time domain apply to data-driven forecasting of remaining service life and maintenance planning based on the technical condition of electrical machinery and EPS actuators. In such cases, degradation indicators are typically derived from long-term trends in torque ripple, harmonic content, or residual-error statistics. If these indicators are determined or calibrated using an insufficiently validated HiL surrogate, the resulting lifetime estimates or condition indicators inherit the same biases and waveform distortions that have been quantified in this study. By explicitly separating the calibration error from other dynamic and spectral discrepancies, the proposed methodology provides a simple and quantitative basis for assessing which torque characteristics are sufficiently reliable to be used in diagnostic models and service-life prediction models built on industrial HiL test benches, without the need to recreate the full finite-element model.
2.3. Test Environment Description
To record the signals generated during the operation of the real drive system consisting of a PMSM and an inverter (see
Figure 1), an experimental setup equipped with a motor dynamometer was used.
The dynamometer was controlled to maintain a constant rotational speed, while the tested motor was driven to produce a predefined torque. The load machine used in the dynamometer setup was a motor with rated power and maximum speed substantially higher than those of the device under test, thus ensuring stable operation and accurate measurement results.
Figure 2 illustrates the block diagram of the motor dynamometer setup.
Based on the measurement results, a mathematical model of the PMSM was developed for implementation on the dSpace HiL platform, as shown in Equation (
1):
where
and
are the inductances on the direct and quadrature axes, respectively;
and
are the direct- and quadrature-axis currents;
is the stator-winding resistance;
is the motor angular velocity;
p is the number of pole pairs;
is the permanent-magnet flux linkage; and
T is the motor torque [
32].
The HiL system interfaced with the real motor controller instead of a physical PMSM by capturing the switching commands issued by the controller and providing the corresponding motor currents as feedback (more specifically, voltages corresponding to the motor phase currents). Inverter dead-time and voltage drops were not included in the HiL model and were therefore neglected in the analysis. In addition, the same simulated rotor-position signal was provided to both the HiL motor model and the controller, as shown in
Figure 3.
The motor model was formulated in the rotating reference frame and employed Clarke–Park transformations. Its parameters were set to the measured values for the tested PMSM.
In addition to basic motor parameters such as the voltage constant
, resistance
R, and inductances
and
, the model incorporated measured magnetic flux linkage saturation characteristics and inductance variation as a function of the quadrature-axis current,
. This approach enabled the creation of a nonlinear PMSM model based on a Look-Up Table (LUT) structure, thus capturing magnetic-saturation effects and the resulting dependence of motor parameters on current [
32]. The LUT model was used exclusively to account for magnetic-saturation effects, while cogging torque, temperature effects, parasitic effects, friction, and other real-world phenomena were not modelled. Such a simplified model is considered sufficient for the intended application. The planned tests are relatively short; therefore, the temperature rise is not expected to significantly affect the motor parameters. Furthermore, incorporating additional effects such as asymmetries or cogging torque would require considerable modelling effort while providing only limited benefits for the objectives of this study. An important advantage of the adopted simplified model is the reduction in model-development and implementation time. This approach is justified because the final validation will be performed on a dynamometer, where these effects are inherently present and measured directly.
Table 1 presents the parameters used in the model.
The HiL model equations are solved once per PWM pulse. As a result, the controller cooperating with the HiL experiences a one-PWM-cycle delay: the motor current determined at a given time instant is based on the PWM signal measured in the previous cycle. For example, with a PWM frequency of 15 kHz, the delay is s.
Test data were collected for the following motor rotational speeds: 20, 100, and 200 rpm. A torque reference of 3.92 Nm was applied. The experiment was carried out on the dynamometer test bench with a real motor and using the real-time HiL platform.
4. Discussion and Key Findings
4.1. Observed Characteristics of the HiL Torque Signal
The mean values of the torque waveforms in the time domain are comparable for the two systems, namely, the HiL setup and the dynamometer. However, noticeable differences are observed in the distortion of the torque waveforms obtained from the two systems. The time-domain torque waveform estimated by the HiL differs from the measured torque in terms of gain and offset. Furthermore, the 1st mechanical harmonic is present in the torque estimated by the HiL, whereas the 24th mechanical harmonic is absent.
4.2. Analysis of HiL–Dynamometer Discrepancies
The observed discrepancies between the HiL setup and the dynamometer may result from the absence of physical non-idealities and machine imperfections in the HiL model. Effects such as thermal variation, magnetic hysteresis, asymmetric windings, bearing friction, and structural resonances are not represented. Cogging torque and mechanical asymmetries are also absent in the considered HiL setup, as revealed by the motor torque frequency spectrum. Although each of these effects is individually well documented in the literature as a source of torque ripple and waveform distortion, the present experimental design, which uses a single affine decomposition of the aggregate torque-channel error, does not allow their individual quantitative contributions to be isolated from one another or from interface-related effects. Doing so would require dedicated single-variable experiments (e.g., controlled thermal soak tests, bearing-friction characterisation, or modal analysis of the mechanical drivetrain) that are beyond the scope of the present steady-state comparison and are identified here as a specific target for follow-up work.
Interface-related non-idealities are another potential source of discrepancies. Signal scaling and calibration errors were identified, while ADC/DAC noise and electrical interference can contaminate the feedback signals received by the inverter controller. Additional differences may result from PWM signal acquisition and inaccurate reconstruction caused by timing jitter, synchronisation errors between the inverter and the HiL platform, and inaccuracies in edge detection.
Errors may also originate from current calculation and shunt-voltage signal generation, including model-based current-estimation errors and inaccuracies in motor parameters. Furthermore, the generated rotor-position signal does not include real-world effects such as mechanical backlash, encoder eccentricity, quantisation, or noise. Delays introduced during the calculation and output of the position signal can also degrade the performance of the motor control algorithm.
Real-time execution constraints may constitute an additional source of discrepancies. Different update rates for PWM capture, motor-model execution, and signal output may produce aliasing or control artefacts.
4.3. Interpretation of Correlation Results and Implications for Controller and Diagnostic-Algorithm Validation
The low and, in several cases, negative raw correlation coefficients reported in
Table 5 merit explicit interpretation, since agreement on mean torque alone does not guarantee that a HiL platform is suitable for waveform-sensitive validation tasks. The low magnitude of the raw Pearson and Spearman coefficients indicates that the local, sample-to-sample fluctuations in the HiL and dynamometer torque signals are largely uncorrelated within the analysed steady-state windows: the two signals have similar mean values and amplitude ranges but do not share a common instantaneous trajectory. The negative sign observed at all three speeds is consistent with the negative gain identified by the affine fit (
Table 3) and is interpreted as an apparent phase or sign inversion between the recorded ripple components, rather than as a fundamental sign error in the torque measurement itself; after the affine correction, the coefficients become weakly positive but remain far from unity, showing that a linear recalibration alone cannot restore waveform-level agreement. Whether this level of agreement is acceptable depends on the intended use of the HiL platform. For mean-torque-oriented or low-bandwidth controller-validation tasks, such as verifying average torque tracking or overall closed-loop stability, the observed discrepancy in local waveform shape is unlikely to be critical, since such applications are relatively insensitive to ripple-level detail. However, for the torque-waveform-sensitive diagnostic use case that motivates this study—namely, detecting incipient faults such as inter-turn short circuits or mechanical asymmetries from ripple amplitude, correlation, or harmonic-order signatures—the present HiL configuration cannot yet be considered sufficiently accurate. A fault-detection algorithm trained or thresholded on HiL-generated torque-ripple data would be exposed to a systematically different noise and harmonic structure than the one encountered in the physical system. This distinction between mean-value fidelity and waveform-level fidelity is the central motivation of the present work, which is why the correlation results are reported and discussed explicitly rather than omitted.
It should also be emphasised that the affine gain–offset correction applied in this study is a calibration-level procedure: it compensates for systematic scaling and bias errors in the HiL torque channel but cannot compensate for nonlinear dynamics, phase delays, bandwidth limitations, or missing harmonic content in the underlying motor model. The substantial reduction in time-domain error achieved by the affine transformation (up to 85%) should therefore not be interpreted as evidence of improved model fidelity; rather, it isolates and removes a linear measurement-chain artefact so that the remaining, comparatively small, residual error can be attributed to genuine dynamic and spectral mismatches between the HiL model and the physical machine. Accordingly, the present HiL configuration is regarded as an adequate development environment for mean-torque-oriented and low-bandwidth control functions, and as a functional—but not metrological—environment for diagnostic code, in the sense that it can verify execution, convergence, and real-time behaviour, but not the ripple-level thresholds on which fault detection ultimately depends.
4.4. Recommendations for Improving HiL Fidelity
Based on the observed time-domain and spectral differences, polarity, scaling constants, and offsets should be verified to ensure consistency across the measurement chains. The model parameters, including resistances, inductances, and magnetic-flux saturation tables, should match those of the real device as closely as possible. In addition, the fidelity analysis of the computed signals should be extended to dynamic operating conditions and reverse-torque operation.
When testing electrical machines under fault conditions, the characteristics of the measurement systems must also be considered. Dynamometer measurements inherently capture real-world effects such as misalignment, cogging torque, motor asymmetries, and other non-ideal characteristics of the electric machine. These phenomena are not included in the HiL results for the setup considered in this study.
By contrast, HiL measurement results are primarily affected by interface-related factors, including measurement noise, interface delays, and processing within the HiL loop, rather than by physical machine non-idealities. Accurate prediction of PMSM electromagnetic characteristics requires detailed modelling approaches, which is not the primary objective of the present work. The ultimate goal is to develop and validate early fault-detection algorithms that operate alongside the existing motor control algorithm. Combining experimental validation with appropriate modelling techniques is essential for reproducing PMSM behaviour under both steady-state and dynamic operating conditions.
5. Conclusions
This study presents a detailed comparison between motor torque waveforms measured on a dynamometer test bench and those generated by a real-time Hardware-in-the-Loop simulation for a PMSM used in Electric Power Steering applications. By employing time-domain error analysis, correlation metrics, and frequency-domain spectral evaluation, this work demonstrates that the HiL model accurately reproduces mean torque values but shows increasing discrepancies in waveform shape and harmonic content as motor speed increases. The application of a simple affine calibration revealed that gain and offset mismatches are the dominant contributors to time-domain errors, and that proper channel calibration alone can reduce these errors by up to 85%. The remaining differences were mainly related to unmodelled physical phenomena. The proposed analysis workflow provides a practical and systematic framework for validating HiL environments against experimental measurements and offers clear guidance to improve model fidelity, calibration procedures, and test setup configuration. Within the investigated steady-state operating range, these findings support the use of the HiL configuration for mean-torque-oriented or low-bandwidth controller-validation tasks. However, the observed waveform and spectral discrepancies prevent the present configuration from being considered sufficiently accurate for torque-ripple-based diagnostic validation. The results form a solid basis for future work that will focus on higher speeds, dynamic operating conditions, and fault-injection scenarios relevant to early EPS fault detection.
Limitations of the Proposed Validation Methodology: The present workflow decomposes torque discrepancy into a linear calibration component (affine gain/offset) and a residual dynamic/spectral component, but it does not further decompose the residual into individual physical contributors (e.g., thermal effects, bearing friction, mechanical resonances) or interface-related contributors (e.g., ADC/DAC noise, timing jitter), and it has been demonstrated only for three steady-state, single-quadrant operating points at a single commanded torque of 3.92 Nm. Dynamic operating conditions (torque steps, acceleration/deceleration, transient current response), higher rotational speeds, alternative torque levels, and all four operating quadrants, together with complementary harmonic-distortion metrics (e.g., THD, harmonic energy distribution, spectral error indices) and a direct quantitative comparison with other published HiL validation studies, would be required to establish the general applicability of the proposed method beyond the tested conditions. These extensions are identified as concrete directions for the next phase of the underlying research project. Accordingly, the conclusions of the present study are restricted to the three investigated steady-state, single-quadrant operating points at a torque reference of 3.92 Nm and should not be generalised to higher speeds, alternative torque levels, transient operation, or regenerative conditions without further experimental validation.