Technical Article

Intro to Hardware-in-the-loop Simulation for Power Design

July 06, 2020 by Anushree Ramanath

With the rising demand for testing and prototyping designs under realistic conditions, the need for advancing simulation platforms is rapidly increasing.

Ever wondered what it takes to test new algorithms on huge, complicated systems like sophisticated aircraft, massive wind turbines, or a stand-alone microgrid? How do we know if a newly designed component works well with the rest of the system without risking damage or possible downtime to the entire setup?

With the rising demand for testing and prototyping designs under realistic conditions, the need for advancing simulation platforms is rapidly increasing. The Hardware-in-the-loop (HIL) simulation technique serves as a solution in all of these scenarios and beyond. Come, let us learn more about HIL and see how it can lead to elegant solutions.

 

What is Hardware-in-the-Loop and How Does it Work?

The hardware-in-the-loop (HIL) simulation method offers a platform where signals from a controller are applied to a test system in real-time. The test system is modeled such that it emulates the actual system behavior and the control signals represent the external stimuli, including several functions and input/output types. 

The high-level overview of a HIL simulation setup is shown in Figure 1. Once the setup is complete, multiple scenarios can be tested easily without spending on actual physical tests. This makes the entire design and validation process thorough and cost-effective while saving testing time.

 

Figure 1. A high-level overview of a HIL simulation setup. Image courtesy of OPAL-RT

 

The model that represents the system under consideration is developed and configured for real-time simulation. The necessary software interfaces are configured and connections with hardware components, if any, are accomplished with the computer and controller. Code generation, compilation, and execution is performed using the development platform and is linked with the real-time application on the target computer. Further, real-time HIL simulation is carried out considering the desired model accuracy, acceptable model run time, and other essential solver conditions.

The working of the HIL simulation can be summarized in three easy steps:

  1. The simulation of the intended system is realized using a suitable simulation platform on a target computer. 
  2. The developed real-time implementation is subjected to several tests by means of control signals generated using the connected controller. This interaction between the embedded controller and the plant model is facilitated through multiple input/output channels.
  3. The overall system behavior and algorithms are validated. Figure 2 shows the key components of a HIL system. Design iterations are carried out if necessary and, eventually, actual hardware components are included in the loop while the equivalent simulation models are eliminated. 

 

Figure 2. Key components of a HIL system. Image courtesy of ADD 2

 

HIL as a One-stop Solution for Validating Complex Systems

Real-world tests, in general, can be risky, involved, and costly. HIL simulation offers versatile, effective, and exhaustive validation options that can be easily incorporated while ensuring overall system reliability. A plethora of scenarios can be validated using one full-fledged HIL setup as opposed to creating multiple hardware setups using traditional testing procedures. After reviewing the details of the advantages HIL offers in the following section, you will see how simulation is a top choice for validating your next big idea.

 

A Comparison of Merits with Respect to Traditional Techniques

HIL is extremely effective in reducing the process costs and time to market as compared to the traditional validation techniques. It also eliminates the need for building sophisticated hardware prototypes and the associated fabrication cost during initial stages. Since the real-world environment conditions can be emulated for the system under consideration, it adds practicality to the test approach. In addition, initial HIL-based tests can be run well before the actual validation phase in order to detect major design flaws earlier in the development life-cycle. The tests can also be automated and scheduled conveniently. 

A large number of tests can be carried out and corner cases can be modeled effectively. This includes operating conditions, failure possibilities, safety compromise cases, and assessing performance amidst adverse environmental conditions without being afraid of downtime on the live system. Furthermore, models can be created for hardware components that are hard to procure or have exceptionally long lead times. The scenarios that could be hard to replicate in real-life multiple times until the problem is identified accurately can also be recreated. Thus, HIL-based simulation and validation ensure that the end-product caters to all the initial requirements while offering significant advantages during the process. 

 

Industry Research and Academic Study

HIL simulation techniques have been utilized in the power industry for several years. This includes testing with actual hardware setup, scaled-down versions of the prototype, or simulators that emulate the intended system behavior. In addition, the designed control algorithms are validated even when the desired hardware is not available and this is of great value for any industry, both during the research phase and also during pre-production. For instance, the microgrid HIL setup that we put together helped facilitate the validation of key software components much before the system installation was complete at the site.

In the early stages of development, any design inaccuracies or incorrect assumptions can be easily identified without incurring cascading errors. Access to a well-designed HIL simulator reduces the dependency of software and firmware engineers on the hardware progress.

However, it is equally important to adapt HIL simulation techniques in academic settings as it enables an effective, risk-free learning environment and exposure to system hardware. HIL setups can come in handy to fill in the gaps in understanding for students and budding researchers with respect to the interconnected working of the software, simulator, and hardware. It enhances the students’ knowledge of overall system behavior while bridging the gap between theoretical aspects and real-world challenges (PDF). This also ensures career readiness as an added learning outcome for young professionals. Thus, HIL has a growing role in all facets of research avenues, including industry-based research and pure academic endeavors.