Hardware-in-the-loop (HiL) generally refers to the connection of a real Device under Test (DUT) with a simulated test environment. HiL is used to simulate the environment in which the DUT is to be used as realistically as possible without having to build the entire test environment. This saves costs and allows the test environment to be adapted quickly so that many test scenarios can be examined in a short time.
For example, if a newly developed control unit is to be tested as a DUT inside a car, it must be integrated into the car with all the necessary measuring instruments and interfaces in a classic laboratory setup. If HiL is used, different scenarios of the measured values and the reaction of the rest of the car to control signals can be simulated, saving time and costs.
For the setup of a HiL environment a simulator is needed, which is able to calculate the simulated test environment in real time, so that the exchange between simulation and DUT is constantly synchronous. Depending on the complexity of the system, special real-time simulators are used for this purpose.
Within HiL, a distinction is made depending on which signals are exchanged between the simulation and the DUT. If the signals are measurement and control signals in the low voltage range, they are usually directly linked to the inputs and outputs of the real-time simulator. Such a setup is called Controller Hardware-in-the-Loop (CHiL) and is used, for example, when testing control units.
If DUTs are examined that are connected to a simulated power grid, a power amplifier is used as an interface between the real-time simulator and the DUT. This amplifies the simulated currents and voltages in order to transmit them to the DUT. If a power amplifier is used, the setup is called Power Hardware-in-the-Loop (PHiL). PHiL is used, for example, in the investigation of battery storage systems. Both CHiL and PHiL are used for studies in the PHiLsLab.