Typhoon HIL Blog


4 Principles of Good Hardware in the Loop Design.

Posted by Ivan Celanovic on Apr 18, 2016 2:21:13 PM

Topics: Smart Inverters, Microgrids

4_principles_of_good_hardware_in_the_loop_design.jpg

Last year at the Applied Power Electronics Conference (APEC2016) I ran into a good friend of mine that I haven’t seen since the graduate school. He is now an accomplished R&D engineer in one of the leading power electronics companies.

After the initial conversation, trying to catch up on each other’s personal and professional accomplishments, we started to discuss the power electronics industry. I was eager to share my wisdom about Hardware-in-the-Loop (HIL) simulation and how it is radically changing the face of the (earth) power electronics and power systems. Frost and Sullivan Market Report.

 

 

I was shocked to see his face cringe in an utter disgust before I could even finish my spiel. He promptly fired back at me: “I’ve tried to use a HIL system and apart from the fact that it took me months to learn all the software tools needed to get it to run, the simulated waveforms were not even close to what I was expecting. I was continuously running into numerical stability issues and it took hours to prepare/compile models for simulation. Honestly, I never even got to the task of automating controller testing because I ran out of time and patience.” Before I was able to calm him down, he swore that he will never again use HIL simulation in his life.

I took it personally, since I am a big believer in HIL testing and tend to elevate HIL systems right next to the oscilloscope and power supply when it comes to the essential power electronics controls engineer toolbox For me it was rather troubling my friend had such a strong negative emotion for a development and testing method based on one system experience.

Understandably, his feedback was fueled by his deep frustration with what amounts to bad product design. However, just because a particular product is poorly designed does not mean that the overall method or application is wrong. If my brand new car consistently breaks down the first couple years I have it, I’m going to buy another car, but it’s definitely the last time I buy from that manufacturer.

Motivated on one side by examples of bad HIL design, and on the other side inspired by one of the greatest industrial designers of all time Dieter Rahms and his 10 principles of good design, I had to define what I would like to call 4 Principles of Good Hardware-in-the-Loop Design.

 

Good_HIL_Design_is_Easy_to_Use_and_Intuitive-1.png

 

1. Good HIL Design is Easy to Use and Intuitive

 

We are all engineers with full schedules, strict deadlines, aggressive design appetites, and big dreams. The last thing we need on our plate is another tool that requires a full time babysitter, needing to be constantly fiddled with, reprogrammed, and expecting us to tame (integrate) multiple software/hardware tools in order to make it useful.  

Simply put, if a HIL software doesn’t seamlessly work with hardware, then it is a poorly conceived and designed HIL system. These products should be as easy to use: installing with one executable, compiling in seconds, running with a single click, testing in a fully automated fashioned, and providing built in report generation.

Real-time hardware in the loop testing should be fun and easy, not something to rip your hair out over because of poor software design and integration issues. It should make you more efficient and make your projects easier, of course with the added benefit of making your boss happy.

 

Good_HIL_Design_is_Plug_and_Play.png

 

2. Good HIL Design is Plug and Play

 

When testing a controller, whether it is a smart inverter controller (primary controller) or a microgrid supervisory controller, the key is to be able to plug the controller device under test (DUT) into the test system without any modifications to the controller hardware, software, or firmware.

Indeed, the controller absolutely must have the same “feeling” as if it was connected to a real power stage. In addition, the control software and firmware, tested in this way, is production grade ready and can be deployed without any further tests.

  

 Good_HIL_Design_is_Ultra-High_Fidelity.png

 3. Good HIL Design is Ultra-High Fidelity

 

We test our controllers with controller hardware in the loop (C-HIL) simulation techniques to definitively verify controller firmware and software performance, without the need to go to a high-power laboratory. This testing method enables manufacturers to test their latest software release so it can be automatically dispatched to millions of installed smart inverters all over the globe.

Hence, a level of trust and requirements needs to be established between controller manufactures and HIL tool providers, especially in safety critical applications.

To trust the HIL test results, it must meet the three main criteria:

  1. Accurate dynamic modeling. Accurate real-time dynamical modeling requires very small simulation time step, usually on the order of 1 micro second for typical power electronics systems, and high fidelity models of power converters, machines, PV panels, transmission lines etc.
  2. Low-latency and high precision Input/Output stage. Since HIL implies that the real-time simulation is in the loop with the controller, loopback latency of HIL system needs to be minimized in order to reduce artificial delay seen by the real controller. Typical delay must be on the order of the simulation time step, e.g. 1-2 microseconds. In addition, high precision analog output stage and high sampling rate digital inputs are critical. Analog outputs need to be at least 12bits, while digital sampling needs to be on the order of 10-20ns in order to achieve 12-14 bit PWM resolution.
  3. Numerical stability. When automatically testing controller with HIL any kind of numerical instability can ruin hours and days’ worth of test results. Needless to say, when facing numerical issues, we start to doubt the validity of results. Where the best HIL simulators shine, is the ability to achieve both high accuracy and numerical stability.


Good_HIL_Design_is_Useful.png

 

 4. Good HIL Design is Useful

 

Hardware in the loop is primarily a test and validation tool. Hence, the usefulness of HIL tools should be measured with respect to Testing Efficiency. During the controller lifecycle, there two main phases, namely:

  1. Controller development: manual and semiautomatic testing dominates, and
  2. Product deployment and maintenance: automated testing dominated.

During controller development, HIL real-time simulation tools enable engineers to test safely, and to test often. As the new control features are added continuously, HIL system enables continuous testing and immediate feedback to the designer. This design phase doesn’t require full test automation, but instead engineers need to quickly prepare and run simple tests.

To do this efficiently, an easy to use graphical user interface, that can quickly be tailored and customized for particular test case is a paramount. Indeed, being able to interact, in runtime, with real-time simulation models and customize the interface greatly improves the efficiency of controller development and testing.

During the product deployment and maintenance phase, a majority of the controller software and firmware testing should be automated. The efficiency of testing, in this phase, is defined as the number of tests divided by the cost of doing the test.

Since a C-HIL testbed can test controller firmware/software 24/7 without any supervision (unlike power lab tests) and the testbed has fixed cost, the efficiency of testing grows with number of tests over time. In addition, automatic reporting is critical to quickly identifying and fixing all the control issues.

After some arm twisting I convinced my friend to give hardware in the loop testing yet another chance. And indeed he admitted that Good Design, or should I say good HIL design can indeed be: easy to use, plug and play, accurate, and efficient to test and validate. And voila, there are designs that follow Dieter Rahms principles and practice of good design.

 

SCHEDULE A DEMO WITH OUR TEAM

 

Recent Posts