top of page


Welcome to our blog post where we delve into the grid-connected microgrid system emulation using Impedyme's innovative Combined Hardware-in-the-Loop and Power Hardware-in-the-Loop (CHP) technology. Here, we explore as to how Impedyme’s CHP transforms the testing of microgrid emulation and validation, offering us multiple capabilities for emulating real-world grid scenarios with the convenience of changing emulation parameters effortlessly. Join us as we unravel the complexities of microgrid emulation and discover how Impedyme's CHP technology is paving the way for the future of resilient, sustainable, and reliable energy systems.

Fig 1. Microgrids

Microgrids combine various energy sources like solar panels, wind turbines, batteries, and generators to generate electricity locally. These sources are connected to a control system that manages the flow of electricity based on demand and available resources. During normal operation, a microgrid can draw power from renewable sources or the main grid, depending on factors like weather conditions and energy demand. In case of grid outages or emergencies, microgrids can disconnect and operate autonomously, ensuring continuous power supply to critical loads.

The benefits of microgrids are numerous. Firstly, they enhance energy reliability by providing backup power during grid outages and emergencies. Additionally, microgrids improve resilience against extreme weather events and natural disasters by decentralizing power generation and distribution. Moreover, microgrids promote the use of renewable energy sources, reducing greenhouse gas emissions and environmental impact. They also offer potential cost savings by optimizing energy usage, reducing transmission losses, and leveraging distributed energy resources. Lastly, microgrids can extend access to electricity in remote or underserved areas, empowering communities and improving quality of life.

Microgrids are being deployed in various settings around the world. They are found in remote communities without access to the main power grid, military bases and critical infrastructure facilities requiring energy security, urban neighborhoods and commercial complexes seeking energy independence and sustainability, as well as industrial sites and campuses looking to optimize energy management and reduce operational costs.

In conclusion, microgrids represent a promising solution to the evolving challenges of our energy landscape. By decentralizing power generation, enhancing reliability, and promoting sustainability, microgrids offer a glimpse into a future where communities can take control of their energy destiny. As technology advances and adoption grows, microgrids will continue to play a vital role in shaping the future of energy.


Testing microgrids allows us to assess their functionality, reliability, and performance before deployment in real-world settings. By subjecting various microgrid components, such as inverters, distributed energy resources, and control systems, to rigorous testing, we can identify potential issues, optimize system configurations, and ensure compliance with various grid standards and codes.

Emulation plays a crucial role in replicating real-world scenarios within a controlled lab environment. By emulating different grid conditions and load profiles, we can evaluate how microgrids respond to dynamic operating conditions and optimize their control strategies accordingly.

Moreover, microgrids testing and emulation enables innovation and advancement in microgrid technology. By experimenting with new energy sources, storage technologies, control algorithms, and grid integration strategies, we can push the boundaries of microgrid capabilities and drive innovation.

Further, microgrid testing and emulation contribute to the scalability and interoperability of microgrid systems. By testing interoperability between different microgrid components and ensuring compatibility with existing grid infrastructure, we can facilitate the seamless integration of microgrids into larger energy networks, promoting grid resilience and stability.

In conclusion, microgrid testing and emulation are indispensable tools for ensuring the reliability, resilience, and performance of microgrid systems. By rigorously testing and emulating microgrid components and systems, engineers can optimize their design, validate their performance, and accelerate the deployment of sustainable and resilient energy solutions. For a sustainable future, microgrid testing and emulation will play a vital role in shaping the reliability and resilience of our energy infrastructure.

Fig 2. Microgrids Structure


Battery Energy Storage System (BESS) Model:

The Simulink model of the battery for the BESS relies on the battery current to estimate the state of charge (SoC), and similarly predicts the open circuit voltage dynamically as a function of SoC. This Coulombic counting approach is known for its simplicity and is primarily dependent on the discharge from the battery pack.

Fig 4. Simulink BESS Model

State of Health (SoH) is determined by comparing the measured voltage of a battery pack to its nominal voltage. The SoH expresses the battery's current condition as a percentage, with values below 100% indicating degradation. This calculation helps assess battery health and anticipate performance changes over time. Now, let us look at the inverter modeling.

The BESS circuit comprises a battery pack connected to a 3-phase inverter 2-level power inverter. This inverter converts the direct current (DC) from the battery into alternating current (AC), which is then fed to a transformer to supply power to the point of common coupling. This setup allows the battery to store energy and deliver it to the grid or local loads as needed.

The control system of a BESS utilizes various techniques to regulate its operation effectively. One such block of the model is droop control, which adjusts the output voltage or frequency of the inverter based on changes in load or grid conditions. Additionally, active and reactive power regulation, along with current regulators, are employed to provide pulse-width modulation (PWM) signals to the inverter, ensuring proper control over the energy flow.

Furthermore, a resynchronization unit block plays a key role in coordinating the operation of the microgrid in both islanded and grid-connected modes. This unit provides breaker control signals that synchronize the microgrid with the main grid or isolate it in islanded mode, depending on grid conditions or operational requirements.

Solar PV Model:

Solar PV is a distributed energy source that generates electricity from sunlight. The PV model here consists of solar panels that convert sunlight into direct current (DC) voltage. This DC voltage is then boosted using a dc-dc boost converter to reach higher levels. Next, a 3-phase 3-level inverter converts the high voltage DC into alternating current (AC), making it compatible with the grid. The converted AC is then fed to a transformer and distributed to the point of common coupling, where it connects with the main grid.

Fig 5. Simulink Solar PV Model

Grid Model:

In our microgrid model, we also aim to mimic the behavior of key components like transformers, loads, generators, and transmission lines. At the heart of this modeling effort lies the "3-Phase Voltage Source" block in Simulink, which serves as the foundation for defining the characteristics of the grid's voltage source. With this block, we can adjust parameters such as voltage magnitude, frequency, and phase angle to simulate different grid conditions, spanning from normal operation to fault scenarios.

The model essentially comprises a 600V bus and a transformer to interface with the 25kV grid. Feeder blocks and load blocks further enhance the realism of the grid scenario, allowing us to replicate real-world conditions more accurately. Additionally, the inclusion of breakers enables us to implement both islanded and grid-connected modes for the microgrid, adding versatility to our simulations.

Furthermore, integrating series impedances at the point of common coupling (PCC) provides a robust platform for simulating and analyzing grid behavior. By incorporating these blocks into our model and running simulations, we gain insights into a wide range of grid scenarios and can evaluate system performance under various conditions. This comprehensive approach to grid modeling allows us to assess the reliability, resilience, and efficiency of microgrid systems, contributing to the advancement of sustainable energy solutions.

Fig 6. Simulink Grid Model

The load model for the microgrid consists of both active and reactive power loads, reflecting the energy consumption within the system. Additionally, a load circuit breaker is included to facilitate the transition between islanding and grid-connected modes. By incorporating these elements into the load model, we can accurately simulate the dynamic behavior of the microgrid and assess its performance under different operating conditions.


Fig 8. Impedyme’s CHP Cabinet

The Impedyme’s emulation solutions mimic your MATLAB Simulink models that can be used for high power tests, up to a few Mega Watts scale, for bandwidths up to 20 kHz. Simply connect the optical links to our cabinets and deploy your models to begin the testing. The cabinets have multiple optical links each up to 12.5 giga-bits per second. For simulations with ultra-low step-times, the equipment supports FPGA-based tests, that allows you to have time steps as low as a few nanoseconds. Moreover, the FPGA brings in a better performance for your real-time emulation since the processing speed of an FPGA is much higher than that of a CPU.

Also, for high-speed emulations, the individual FPGAs of the drawers can communicate among them. The testing using Impedyme’s CHP is straightforward as it uses Simulink designs. Our products come with a wide range of pre-designed models, which you can customize the designs according to your needs and requirements. Furthermore, if we were to emulate both the input and the output side of the power systems, we can have a circulating power flow. Since the power is recirculated, we only must feed in power losses from the grid. By having such a technology can reduce the power requirements of your lab for testing large power systems. Moreover, during the real-time emulation of your models, our integrated thermal management utilizes an advanced liquid + air cooling technology that ensures that does not require any additional chiller for cooling. Thus, Impedyme’s CHP is one of the best ways to emulate the developed microgrid models in real-time. 

Now that we are introduced to CHP, let us see how microgrids can be emulated in real-time.

Fig 9. Microgrid Emulation: CHP Cabinet Configuration

We allocate the first cabinet, that is the left-most cabinet, for the solar PV model and the second cabinet for the BESS model. Likewise, the third cabinet is dedicated for the load, and finally the last cabinet is allocated for the grid model emulation. The last two, that is the two bottom-most drawers of each cabinet (highlighted in green) are dedicated for the Active Front end Converters that provide the DC coupling for the emulation.

Let us now see how a microgrids system, that is, a solar PV system, a battery energy storage system grid, and loads are modeled in Simulink.

Fig 3. Simulink Model of the Microgrids

The control system of the PV model plays a crucial role in optimizing its performance. It includes a power Proportional-Integral (PI) regulator with anti-windup and a Maximum Power Point Tracking (MPPT) controller. The PI regulator adjusts the power output of the PV system to match the grid's requirements, while the MPPT controller ensures that the PV panels operate at their maximum efficiency by continuously tracking the optimal operating point. Additionally, an inverter control block utilizes various control techniques, including Phase-Locked Loop (PLL), current regulation, and DC voltage regulation, to provide precise control signals to the inverter.

Load Model:

Fig 7. Simulink Load Model


Since the simulation is now complete, let us get introduced to CHP technology to see how the same can be emulated in real-time using Impedyme’s combined hardware and power hardware-in-the-loop (CHP) products.


Pierre Giroux (2024). Microgrid Dynamic Operation (, MATLAB Central File Exchange. Retrieved April 9, 2024.

CHP seamlessly integrates hardware-in-the-loop (HIL) and power hardware-in-the-loop (PHIL) capabilities, offering unparalleled accuracy and efficiency in microgrid designs. With CHP, engineers can simulate real-world scenarios with precision, testing microgrid systems under dynamic conditions. From EVs to grid emulations, CHP empowers manufacturers to optimize performance, enhance reliability, and accelerate time-to-market for your products. The modular design ensures flexibility to adapt to evolving testing needs, while its intuitive Simulink interface streamlines the testing.

Some of Impedyme CHP’s features include:

bottom of page