Hardware-in-the-loop

Hardware-in-the-Loop (HIL) Simulation

Hardware-in-the-Loop (HIL) simulation is a real-time testing method for embedded systems. It connects actual controller hardware to a simulated physical environment (the “plant”) via real analog and digital I/O, enabling early validation of system behavior—even before physical components are available

How HIL Works

HIL works by modeling the plant using tools like Simulink and Simscape, then running that model in real time on specialized hardware (e.g., Speedgoat, dSPACE). The controller reacts to the simulation as if it were the live system, communicating through real industry protocols like CAN, Ethernet, or ARINC

HIL Testing Workflow

The typical HIL workflow includes:

  1.  developing the plant model;
  2. running it in real time;
  3. interfacing the controller hardware to the simulator;
  4. collecting data;
  5. running a range of tests—from normal to fault conditions—to verify robustness and identify issues before deployment

Model-Based Verification Techniques

HIL is one in a suite of “in-the-loop” techniques: Model-in-the-Loop (MIL) tests high-level models, Software-in-the-Loop (SIL) runs compiled code in simulation, and Processor-in-the-Loop (PIL) targets the actual processor. HIL adds realism and fidelity by introducing real hardware into the loop.

Application Areas

HIL is widely used in industries like automotive, aerospace, power electronics, battery systems, and multidomain systems. It helps developers test complex systems, handle extreme events safely, validate certifications (e.g., ISO 26262, DO-178), and shorten development cycles.

Advanced HIL Variations

For high-frequency systems—like in power electronics—HIL often employs FPGAs to meet demanding simulation rates (e.g., PWM signals). Battery Management Systems (BMS) testing uses battery-cell emulators, while Power HIL (P-HIL) adds power amplifiers for high-voltage scenarios. Multidomain and multinode HIL allow integrated testing of interconnected subsystems or entire networks.

HIL with MATLAB & Simulink

MathWorks supports HIL workflows with Simulink Real-Time and Speedgoat hardware, enabling one-click deployment of real-time applications. The ecosystem also integrates with third-party systems (dSPACE, OPAL-RT, NI) and provides tools—like Simulink, App Designer, and Simulation Data Inspector—for rapid prototyping, deployment, monitoring, and analysis.

Scroll to Top

🌐 Select your region/language

Computational Enterprise Simulations
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.