By Juan José Pichardo MG Research Assistant

Power Hardware-in-the-loop Simulations:

With the development of advanced computers, a lot of small “revolutions” have occurred. One of them, is the emergence of computer simulations. Computer simulations opened up the door for an almost infinite number of test scenarios. Anything that can be mathematically modeled, can be simulated. In fact, simulators became an essential component of any design process of a given industry. Simulating a system before making a physical version of it increases the reliability of the product and greatly reduces the costs of testing. Furthermore, simulations not only enable us to test products before constructing them, but also we can test the response of a physical system (already designed and built) in a simulated scenario. This type of simulation is commonly described as “hardware-in-the-loop (HIL).” In the area of power systems, there are two main types of HIL simulations: Power Hardware-in-the-loop (PHIL) and Controller Hardware-in-the-loop (CHIL) (On figure 1 we can see a brief comparison of the two)[1].

Figure 1. Basic approaches of CHIL and PHIL testing [Source: Kotsampopoulos, A Benchmark System for Hardware-in- the-Loop Testing of Distributed Energy Resources, 2018 [1]]

Controller hardware-in-the-loop (CHIL):

CHIL consists of analyzing the behavior of physical control devices (protective relays, power electronic control boards, rotating machine controllers etc.) on a simulated environment (generally the power grid). Something important to mention is that the signals exchanged between the hardware and the simulator are in the range of  ±10 V and a current of mA (low voltage, low power). The interface can be easily realized by Analogue/Digital Converters or Digital/Analogue Converters [2].

Power hardware-in-the-loop (PHIL)

On the other hand, PHIL consists of measuring and analyzing the response of physical power devices (diesel generators, PV systems, power electronic converters, etc.) on simulated environments. This type of simulation requires the addition of power amplification and conversion devices because the hardware under test absorbs real power (in higher quantities than CHIL)[2]. For this article we will be emphasizing on Power hardware-in-the-loop simulations.

Real time simulations:

As we mentioned earlier, if we want to interface a real-world device with a simulated environment, there is some important characteristic that needs to be accomplished, and that is “time”. As we need the physical device to act identically in the simulation and the real world, events on the simulated environment need to occur at the same speed of their real counterparts. For this we need something called a “digital real-time simulator (DRTS)”, which are devices with very high processing power which enables them to solve mathematical models in very short periods of time (almost as fast as the duration of the real-world event). One example of such a device is the OPAL-RT found on PUCMM’s Microgrid Laboratory.

Figure 2 HIL Process [Source: Opal RT]

Application of PHIL simulations:

Currently, PHIL simulations have a large number of applications. Some of the most relevant ones are the following [3]:

1. Testing of equipment and power components:

PHIL can be used to examine the functionality of power devices and to evaluate different innovated power management systems. One of the main prospects of PHIL simulation is to test smart power inverters for grid applications. They can also be utilized to test medium voltage protection devices (relays).

2. Distributed generators and Microgrids

In some recent experiments, PHIL simulations are being used to analyze the creation of hybrid Microgrids. One example is the implementation of two main buses (DC and AC). The DC bus will contain PV panels, batteries, supercapacitors, and DC loads, whereas the AC bus consists of wind turbines, hydroelectric generators, diesel generators etc. (Figure 3). Such experiment would be impossible to make in real life as we would need to modify the actual power grid.

Figure 3. Hybrid microgrid [Source: Ziuzev, Power Hardware-in-Loop Implementation for Power Grids and Devices: Report and Review, 2021]


To understand the importance of PHIL we can briefly explain some of the most common simulation methods that have been used in laboratories. For example, some labs, have miniature generators and analogue transmission line models. The problem is that the hardware available is often not enough to perform a wide range of experiments, and the equipment necessary to make the experiments more realistic is too expensive (power transformers, power electronics, generators etc.)[4].

On the other hand, computer simulations offer a lot of advantages such as flexibility, the possibility to create complicated models, low cost, and user-friendly graphical interfaces. But digital simulations often hinder the understanding of real-physical phenomena, and the familiarization of the student/researcher with actual power systems hardware [4].

PHIL offers the best of both worlds, while having the flexibility of digital simulators to perform an infinite number of experimental environments, it also offers the researchers or students to make measurements on actual power hardware. Another benefit is that the digital simulation can be highly simplified by omitting the modelling of the power hardware or devices under test (DuT). Power hardware is  often difficult to simulate due to the large number of variables that affect it (for example, rotating inertia in generators, harmonic distortion on inverters, efficiency of solar panels). An important feature of PHIL is that destructive experiments such as the simulation of natural disasters can be made without damaging expensive equipment/materials.

Application of PHIL on distribution circuits:

Power hardware-in-the-loop offer the possibility of having digital models of any distribution circuit. Utilities could take a very good advantage of this because it would allow them not only to test different modification proposals to the networks but also to choose the most convenient one (with relatively low-cost testing). Also, by improving the quality of the decision making, in the long term the distribution network will be ultimately improved to its best possible configuration.

For example, to plan the expansion of the distribution network, utilities could test different options of configurations and even equipment to ultimately analyze which options can offer a better performance at the lowest possible cost. Furthermore, PHIL could be used to plan the segmentation of the electrical grid into microgrids.

Renewable Energy Integration

One of the biggest challenges of renewable integration is the lack of knowledge that we have in the topic of bi-directional power systems. In the traditional grid, the power flow is uni-directional and the analysis for short-circuit currents is relatively simple. On the other hand, when having an energy flow from both sides of a systems, the analysis gets complicated (much more complicated!). In such a system, the response of the system varies depending on the instantaneous role of a given dynamic load, for example, on the days most PV system owners would act as generators whereas in the night, they would be loads. In the case of a fault, the two situations represent different responses, which is why the coordination of overload protections turns into a big challenge.

Furthermore, it is not unknown that renewable generation systems offer poor stability. But, how much renewables can a given circuit have before affecting its stability in a relevant scale. That is an answer that could be found using PHIL simulations on any given circuit. 

Distribution systems protection parameters and dynamic loads

The basis for the design and coordination of the protection scheme of a distribution system is the analysis of faults. In short, system protection can be defined as  “the science, skill, and art of applying and setting relays and/or fuses to provide maximum sensitivity to faults and undesirable conditions, but to avoid their operation on all permissible or tolerable conditions”[5]. As mentioned before, dynamic loads are difficult to analyze in terms of fault conditions. Consequently, to design and implement a protection scheme in a high renewable penetration circuit is an intricate task. PHIL simulations offer the capability of testing different protection schemes at the time of the design, which enables utilities to have a wider range of possible options and ultimately to choose the one that behaves best in the PHIL simulation environment. Some advantages of utilizing PHIL as an auxiliary tool while designing protection schemes include, the reduction of costs, the optimization of the implemented design, a better understanding of high penetration circuits behavior, allowing some circuits to have a higher penetration limit etc.

Figure 4. Power hardware-in-the-loop (PHIL) system architecture [Source: Power Hardware-in-the-Loop: Response of Power Components in Real-Time Grid Simulation Environment]

In conclusion, PHIL simulations open the door for experimentation on distribution or transmission networks. Giving us the capability of visualizing the response of the grid on different configurations and enabling a relatively “simple” tool to test any idea (no matter how crazy it can be) to upgrade the electrical system. Electrical Engineers have the opportunity of a lifetime, as PHIL based design of electrical systems will develop a new way of thinking when creating or modifying the grid. A wider range of ideas can be tested which can possibly result in a revolution of the electrical system as we know it today. 


[1]     P. Kotsampopoulos et al., “A Benchmark System for Hardware-in-the-Loop Testing of Distributed Energy Resources,” IEEE Power and Energy Technology Systems Journal, vol. 5, no. 3, pp. 94–103, Aug. 2018, doi: 10.1109/jpets.2018.2861559.

[2]     Steurer et al., “Controller and Power Hardware-In-Loop Methods for Accelerating Renewable Energy Integration,” 2007.

[3]     A. Ziuzev and H. M. Jassim, “Power Hardware-in-Loop Implementation for Power Grids and Devices: Report and Review,” 2021 18th International Scientific Technical Conference Alternating Current Electric Drives, ACED 2021 – Proceedings, pp. 3–8, 2021, doi: 10.1109/ACED50605.2021.9462305.

[4]     P. C. Kotsampopoulos, V. A. Kleftakis, and N. D. Hatziargyriou, “Laboratory Education of Modern Power Systems Using PHIL Simulation,” IEEE Transactions on Power Systems, vol. 32, no. 5, pp. 3992–4001, 2017, doi: 10.1109/TPWRS.2016.2633201.

[5]     J. D. Glover et al., “POWER SYSTEM ANALYSIS & DESIGN SIXTH EDITION,” 2017. [Online]. Available:

Want to learn more about the research? Subscribed to our blog.

RA – Juan José Pichardo

This article is derived from the Subject Data funded in whole or part by NAS and USAID under the USAID Prime Award Number AID-OAA-A-11-00012. Any opinions, findings, conclusions, or recommendations expressed in this article are those of the authors alone and do not necessarily reflect the views of USAID or NAS.

Leave a Reply

Your email address will not be published. Required fields are marked *