Introduction 

Controller Hardware-in-the-Loop (C-HIL) simulation is a testing methodology used to validate control systems in real-time. It bridges the gap between virtual and physical testing by creating an environment where real controllers can interact with a high-fidelity, real-time simulation of the plant or other physical systems. HIL simulation has become the standard for developing and testing control, protection, and monitoring systems across industries such as automotive, aerospace, power electronics, microgrids, and more. It offers a safer, more cost-effective, and flexible alternative to traditional testing methods while providing highly accurate, real-time results. 

How Does C-HIL Simulation Work? 

HIL simulation works by virtually replicating physical system componentsā€” such as sensors, actuators, and convertersā€”within a real-time simulation environment, while keeping the actual Device Under Test (DUT) in the loop. In this framework, a typical testbed is divided into two main layers: a virtual layer, where part of the system is modelled and simulated in real-time, and a real layer, consisting of the DUT. In a C-HIL testing setup, the DUT is the real controller, including its hardware, firmware, and software. This controller interacts with the simulated environment, which mirrors the physical system by emulating various test conditions and scenarios. Continuous signal/data exchange between the controller and the simulator ensures real-time feedback, allowing the controller to behave exactly as it would in an actual system. This makes the testbed nearly identical to the real-world operation, enabling safe and comprehensive performance validation before integration into a real system. 

Figure 1 illustrates the C-HIL testing concept, featuring a power electronics converter connected to a microgrid, along with its associated controller. On the left, the diagram shows the real system, with the physical plant at the top and the converter controller at the bottom. On the right, the C-HIL testing setup is depicted, where the same real controller is now interfaced with a real-time simulator that emulates the plantā€™s behavior. 

Figure 1. Illustration of a typical Controller-HIL (C-HIL) testing system. 

In a C-HIL setup, such as the one depicted in Figure 2, the simulation must provide the simulation must provide high-fidelity results in real time to enable the real controller to operate seamlessly, as if it were connected to the actual plant. This requires a proper signal interface and presents significant challenges in terms of the simulatorā€™s performance, which must respond accurately and deterministically to the highly dynamic inputs from the controllers. To meet these demands, real-time simulators operate with fixed simulation steps, typically around 1 Ī¼s, meaning that only a limited computation time is available for each step. This necessitates the use of dedicated platforms with high processing capability and ultra-low latency. Additionally, there is no time for numerical solvers with iterative solution methods, requiring optimized modeling approaches with specialized features.Ā 

Typhoon HIL, as the market leader in ultra-high fidelity HIL testing solutions, overcomes these challenges for demanding applications through its high performance, FPGA-based multi-core real-time simulators and vertically integrated software toolchain. These simulators provide time steps as small as 200 ns (or 25 ns for specialized DC-DC converter solvers) and feature a digital input sampling resolution of 3.5 ns. Meanwhile, the toolchain includes a comprehensive library of components and offers unparalleled ease of use, making it ideal for industries and academia that require precision and reliability with a smooth learning curve.   

To help new HIL users acquire all the necessary skills in an easy and structured way, our engineers have developed the HIL Specialist 2.0 Specialization Program, designed to allow students and engineers to gain hands-on experience creating models, running simulations, and analyzing results within the HIL environment. 

Figure 2. An example of a C-HIL setup consisting of the HIL404 real-time simulator interfaced with an Infineon AURIXā„¢ evaluation board using the HIL TriBoard Interface.Ā 

What are the Key Advantages of C-HIL Simulation? 

  1. Cost Efficiency: Traditional power lab testing can be expensive, requiring significant investments in physical components, setup, and maintenance. C-HIL simulations drastically reduce these costs by replicating parts of the physical system in real time with high-fidelity models, reducing risks of equipment damage. Even when real power testing or scaled prototypes are necessary, HIL simulations help de-risk these tests by providing early verification and validation of the controllers in realistic conditions. This makes it more affordable for academic institutions to establish labs for research and teaching while making rapid control prototyping (RCP) more efficient and accessible for industrial R&D centers. Opportunities for businesses extend beyond R&D, offering additional value by enhancing pre-sales and sales activities, as well as supporting engineering and test automation throughout the entire product lifecycle, from development to maintenance and customer support
  1. High Fidelity: The high-fidelity simulation enabled by FPGA technology ensures that the controller’s performance in the C-HIL simulations closely mirrors real-world conditions. Setups like the ones shown in Figure 3 allow engineers to rigorously test their designs and obtain accurate and replicable results, with confidence that their systems will perform correctly when deployed.Ā 
  1. Safety: C-HIL testing significantly enhances safety by simulating the high-power components, allowing engineers, researchers, and students to explore a wide range of scenarios, including failure modes, without exposing equipment or personnel to risk. This makes HIL simulation invaluable for testing high-power or complex systems where physical testing could be hazardous. It also provides safe learning environments for early-career engineers and students. 
  1. Flexibility and Test Coverage: C-HIL enables testing of a wide range of scenarios on the fly, including fault or unstable conditions. Moreover, unlike traditional methods, this versatility is achieved without the need for physical hardware reconfiguration. As a result, wide test coverage can be achieved through test automation, and dangerous scenarios can be easily tested without posing any risk to those performing the tests. 
  1. Automation and Speed: Engineers can automate test scripts to run multiple tests continuously and repeatably, without manual supervision. This capability enables long-term testing to identify subtle bugs or performance issues, accelerating development and reducing time to market. The TyphoonTest IDE, integrated within the Typhoon HIL Control Center, and Typhoon Test Hub facilitate the creation of automated Python-based test scripts, as well as the collection, reporting, and comparison of test results. 
  1. Model Continuity and Integration: A major advantage of the vertically integrated Typhoon HIL toolchain is the potential for a seamless transition between offline simulations and real-time HIL testing. Engineers can use the offline simulator, TyphoonSim, for early-stage design and testing and then seamlessly transition to real-time HIL testing using the same model. This continuity saves time by eliminating the need to rewrite complex model setups, reduces the risk of introducing modelling errors, and ensures consistent system behavior across different development stages.
Figure 3. Two examples of C-HIL setups, showcasing a HIL404 (left) or HIL606 real-time simulator (right) interfaced with a Texas Instruments LaunchPadā„¢ development kit using the HIL TI LaunchPad

Where is C-HIL Simulation Commonly Applied? 

Originally developed for the automotive and aerospace industries due to the high costs of physical testing setups in these fields, HIL simulation has evolved and become more cost-effective, expanding its use across various industries, including: 

  1. Power Electronics: C-HIL testing is crucial for ensuring the reliability, safety, and efficiency of power converters in various applications, including motor drives, active filters, smart appliances, and distributed energy resources (DERs) such as solar inverters, wind turbines, and energy storage systems
  1. e-Mobility: While HIL methodology originated in the automotive and aerospace sectors, the transition to electric transportation has made C-HIL testing crucial to ensure seamless integration, reliability, and optimal performance of electric and hybrid vehicles, trains, trucks, electric motorcycles and bicycles. This includes the electric drive train, battery management systems, on-board chargers, off-board chargers, and communication between vehicles and charging stations. 
  1. Grid Modernization: As the renewable energy transition advances, it brings challenges associated with the high penetration of inverter-based sources. C-HIL methodology allows for comprehensive testing and validation of complex systems before deployment, minimizing the risk of failure through full system-level and interoperability testing. This is crucial for applications such as residential energy systems, BESS, microgrids, distribution automation, and marine power systems
  1. Medical Devices: HIL enables the testing and validation of embedded software in medical devices, ensuring they meet regulatory standards without risking patient safety. This can help safe development and validation of medical aids without risking patient health and safety, like in the example of pacemakers, as well as faster innovation for medical diagnostic devices, like X-ray imaging.

Conclusion 

C-HIL simulation is an essential tool for engineers seeking to test and validate control systems in a cost-effective, safe, and flexible environment. With benefits such as real-time feedback, high-fidelity results, and comprehensive test automation, HIL simulation ensures that complex control systems are thoroughly tested before being deployed in the field.  

As industries continue to embrace digital transformation, HIL will play an increasingly vital role in accelerating development cycles and improving product quality. For engineers looking to master this technology, educational opportunities like the HIL Specialist 2.0 certification provide a pathway to gain critical skills in this transformative field. 

Additional Resources

Credits 

Authors | Caio Osorio, Debora Santo 
Visuals | Karl Mickei 
Technical Editors | Caio Osorio, Nebojsa Koledin, Jose Cesario 
Blog Editor | Debora Santo