Hardware-in-the-loop testing has gone from an aerospace and automotive niche to standard practice for anyone developing inverters, EV chargers, battery systems, microgrid controllers and protection equipment. The terms HIL, CHIL and PHIL are often used interchangeably, but they describe different setups with different equipment, costs and risks. This guide explains each, when to use it, and what hardware you need.

Diagram comparing controller hardware-in-the-loop, where a real-time simulator exchanges PWM gate signals and simulated sensor readings with a real controller board, and power hardware-in-the-loop, where the simulator drives a four-quadrant regenerative amplifier that powers the real device under test, with measured current fed back, a DC source and fast protection
CHIL connects a real controller board to the simulator with signal-level I/O (left). PHIL adds a four-quadrant amplifier, so real power flows to the device under test and the measured current is fed back into the simulation (right).

The Common Idea

All hardware-in-the-loop methods connect a real device to a real-time simulation of the system around it. The simulator computes how the grid, motor, battery or vehicle would respond, fast enough that the device cannot tell the difference. You can then test against conditions that would be dangerous, expensive or impossible to create for real: a fault on a transmission line, a weak rural feeder, a battery at the end of its life, or a grid event that happens once a decade.

The difference between the methods is what is real and how it connects to the simulation.


Development Stages: MIL, SIL, CHIL, PHIL

StageWhat is realInterfaceMain use
MIL (model-in-the-loop)Nothing: controller and plant are both modelsSoftwareEarly control design
SIL (software-in-the-loop)Controller code, running on a PCSoftwareCode verification
CHIL (controller HIL)Controller hardware and firmwareLow-voltage analogue and digital I/OFirmware validation and regression testing
PHIL (power HIL)Complete power hardwarePower amplifier or grid simulator exchanging real powerSystem validation and compliance pre-testing

Controller Hardware-in-the-Loop (CHIL)

In CHIL, the real controller board, such as an inverter's DSP card or a battery management system, is wired to the real-time simulator through signal-level I/O. The simulator emulates the power stage and the grid in microseconds and sends simulated sensor readings back to the controller. No real power flows, so the setup is safe, compact and relatively inexpensive. It is ideal for thousands of automated firmware regression tests and for exploring fault cases that would destroy real hardware.

Its limit is that the power stage is only a model. Switching behaviour, filter parasitics, thermal effects and sensor noise are approximated, not measured.


Power Hardware-in-the-Loop (PHIL)

PHIL closes the loop with real power. The simulator sends voltage references to a four-quadrant power amplifier or regenerative grid simulator, which applies them to the real device under test at full power. The resulting current is measured and fed back into the simulation, so the simulated network responds to what the real hardware does. A physical inverter can then be tested against a simulated feeder, a fault, or hundreds of other simulated inverters.

PHIL is the closest you can get to a field trial in the lab. Australian researchers have used it to validate AS/NZS 4777.2 test methods, including phase-angle shift tests. Our article on power hardware-in-the-loop testing goes deeper into the method. For the standard itself, see AS/NZS 4777.2 inverter testing equipment.


What Makes a Good PHIL Amplifier

The power interface is the hardest part of PHIL to get right. Delay and bandwidth limits in the amplifier become part of the control loop, and too much of either can make the test inaccurate or unstable. Look for:

Not sure whether you need a full grid simulator or a programmable AC source? Read grid simulator vs programmable AC source.


Choosing the Right Approach

Most development teams use both methods. CHIL catches most control bugs early and cheaply, and PHIL confirms the complete product works before compliance testing or field trials. If budget allows only one, the choice depends on the risk: firmware-heavy products benefit most from CHIL, while products whose power stage or grid interaction is new or uncertain benefit most from PHIL.

Finch supplies regenerative grid simulators suited to PHIL work in Australia, and can help you match bandwidth and power to your real-time simulator. Browse our grid simulators or see the full range of programmable power supplies. New to specifying one? Read our guide on how to choose a programmable AC power source.


Frequently Asked Questions

What is the difference between HIL, CHIL and PHIL? Hardware-in-the-loop (HIL) is the general term for testing real hardware against a real-time simulation. Controller hardware-in-the-loop (CHIL) connects a real controller to a simulated plant through low-power signals. Power hardware-in-the-loop (PHIL) connects real power equipment to the simulation through a power amplifier or grid simulator that exchanges real power.

When should I use PHIL instead of CHIL? Use CHIL to develop and validate control firmware quickly and safely. Move to PHIL when you need to test the complete power hardware, including power stages, filters, protection and thermal behaviour, under simulated grid or system conditions.

What equipment is needed for power hardware-in-the-loop? A real-time digital simulator, a four-quadrant power amplifier or regenerative grid simulator with an analogue or fast digital control interface, protection and interface sensors, and the device under test. The amplifier's bandwidth, latency and ability to absorb power are critical to a stable, accurate PHIL loop.

Why does PHIL stability matter? In PHIL the amplifier, sensors and communication delays form part of a closed loop. Too much delay or too little bandwidth can make the loop unstable or inaccurate. Interface algorithms and a low-latency amplifier keep the test both safe and representative.

Is software-in-the-loop part of HIL? Software-in-the-loop (SIL) and model-in-the-loop (MIL) are earlier stages in which the controller exists only as code or a model. They come before CHIL and PHIL in a typical V-model development flow.


Related Products