ECU software must function on real hardware long before a prototype vehicle is on the road. This article explains how a Hardware-in-the-Loop (HiL) test works, what a HiL test bench consists of, and when it becomes a bottleneck for your release.

Every ECU software must prove that it works on real hardware—long before a prototype vehicle is on the road. That is exactly what Hardware-in-the-Loop is for. This article explains how a HiL test works, what a HiL test bench consists of, and at what point hardware becomes a bottleneck for your release.
Hardware-in-the-Loop (HiL) is a testing method in which a real ECU is connected to a real-time simulator that replicates the vehicle, sensors, actuators, and environment. This allows ECU software to be tested under real electrical conditions—reproducibly, safely, and before a prototype vehicle even exists.
Hardware-in-the-Loop integrates one or more real ECUs into a closed loop with a simulation. The ECU receives simulated sensor signals, calculates its response, and outputs control signals. The simulator reads these signals and uses them to calculate the next state of the virtual vehicle—in real time, millisecond by millisecond.
For the ECU, there is no discernible difference from a real vehicle. That is exactly where the value lies: the software runs on production-grade hardware, with real timing, real voltage levels, and real communication via CAN, LIN, or Automotive Ethernet.
A HiL test bench combines hardware, simulation, and test automation into one system. An overview of the components:
Residual bus simulation is often the most underestimated effort: the more networked a system is, the more messages must be simulated consistently.
HiL is typically one of the later stages of the X-in-the-Loop (XiL) methodology. This is followed by Vehicle-in-the-Loop (ViL), where a real vehicle is tested against a simulated environment, and finally, vehicle testing. The sequence is not mandatory: frameworks like ASPICE define integration stages in which HiL makes sense after SiL. The stages differ in how much is real and how much is simulated.
We explain exactly how the preceding virtual stage behaves in our article on Software-in-the-Loop (SiL).
The biggest advantage of HiL: critical situations can be tested as often as desired without any risk. An airbag control unit can "experience" a thousand crashes, and a battery management system can undergo a thousand overheating events—without any vehicle or person coming to harm.
Other strengths at a glance:
The first limit is test depth. Logical negative cases can only be injected into a HiL setup if the corresponding hardware interface is accessible. This is often not the case with production hardware, and not always with B- and C-samples. In such cases, components must be soldered on or switching mechanisms installed, and sometimes it is simply not possible. HiL tests are therefore predominantly black-box or grey-box tests. With Software-in-the-Loop, the lack of hardware reality becomes a strength: internal states are accessible, making grey-box and white-box tests possible. The earlier this happens in the V-model, the more valuable it is.
The second limit is capacity. A HiL test bench executes tests serially: one test after another, one team after another. With every software variant and every release, the number of test cases grows, but the number of test benches does not.
Test teams are familiar with the consequences in their daily work:
An example from our "Passenger Car Exterior Lighting System" test scenario shows the scale: 15 involved control units, over 1,800 test combinations per release, and an average of 7 minutes per test. Executed serially on a HiL test bench, this results in more than 210 hours of pure test time – per release.
The solution to the HiL bottleneck is not more hardware, but a division of labor: everything that can be tested virtually runs virtually and in parallel. The HiL test bench focuses on what only real hardware can do.
With violis, control units are integrated as virtual ECUs (vECUs), and test jobs are automatically orchestrated and executed in parallel in the cloud. In the "Exterior Lighting System" test scenario, 100 tests run simultaneously. This turns 210 hours into 2.1 hours – with results available overnight. Up to 75% of all errors are found purely virtually. Anything that reaches the HiL test bench afterward has already passed the quality gate.
Existing tools are retained: violis integrates with Vector CANoe4SW, dSPACE VEOS, tracetronic ecu.test, Synopsys Silver, and MATLAB/Simulink, among others, bridging virtual and physical testing environments. In our experience, many existing HiL test cases can be reused rather than rewritten from scratch. The platform originated in our own HiL labs at Bertrandt—developed directly from the hands-on practice of real OEM projects. To learn how this integrates into an end-to-end approach, explore our guide to Software-Defined Testing.
Hardware-in-the-Loop is and remains the standard for hardware-related verification of control unit software. However, anyone who sends every test through the test bench turns HiL into the bottleneck of the release. The strength lies in the division of labor: virtual for breadth, HiL for the final quality check.
Hardware-in-the-Loop bedeutet, dass reale Hardware – in der Regel ein Steuergerät – Teil eines geschlossenen Regelkreises mit einer Simulation ist. Das Steuergerät reagiert auf simulierte Signale, und die Simulation reagiert in Echtzeit auf die Ausgaben des Steuergeräts.
Beim Hardware-in-the-Loop-Test (HiL) läuft die Software auf dem realen Steuergerät, beim Software-in-the-Loop-Test (SiL) läuft sie rein virtuell ohne spezielle Embedded-Hardware, sondern simuliert auf gängiger Computer-Hardware. SiL skaliert parallel und kostengünstig in der Cloud, HiL bleibt für hardwarenahe Tests und die finale Absicherung nötig.
Die Kosten eines HiL-Prüfstands hängen von Echtzeit-Hardware, I/O-Umfang, Lizenzen, Modellen und Wartung ab und steigen mit jedem zusätzlichen Prüfstand linear. Virtuelles Testing verschiebt diesen Aufwand von Investitionen hin zu nutzungsabhängigen Kosten, etwa im Pay-per-Use-Modell.
Ein virtueller Test reicht, wenn Funktionslogik, die Kommunikation zwischen Softwarekomponenten oder die korrekte Protokoll-Implementierung geprüft werden. Das gilt auch für Regressionstests, sofern die betroffene Funktion nicht hardwarerelevant ist. Hardware-in-the-Loop bleibt nötig, wenn reales elektrisches Verhalten, exaktes Echtzeitverhalten der seriennahen Hardware oder das End-to-End-Kommunikationsverhalten über alle ISO/OSI-Schichten nachgewiesen werden müssen.
Ja, bestehende HiL-Testfälle lassen sich mit einer geeigneten Plattform in vielen Fällen für virtuelle Tests weiterverwenden. Voraussetzung ist, dass das Steuergerät als virtuelles Steuergerät (vECU) oder als SiL-Simulation vorliegt und die Testautomatisierung über Schnittstellen angebunden ist.