Hardware-in-the-Loop Testing, a Reflection

9 minute read

Published:



My Experience

When I think about hardware-in-the-loop (HiL) testing I am reminded of my experiences at my COOP working with diesel engines. I was working on recalibrating a 3.5MW 20V genset engine, which had to be recertified with the EPA because the emissions control strategy in the engine control unit (ECU) was modified. This new software was developed on a hardware-in-the-loop test bench where a computer would simulate parameters such as speed and load. The engineers working at the HiL test bench would verify that the new controller would not damage the engine or test cell prior to deployment. It is essential to have this kind of controller testing in order to verify that newly developed equipment does not pose a risk to the operators working at the test cell or the facilities. The other clear motivation for companies to invest in HiL testing is that it expedites the time and cost of creating a robust control system in the development stage of the product. Results from the HiL test may not reflect the measured results from a test performed in a test cell, which is why it is important to have a good model and set of expectations for the test results. In my experience we are shifting quickly into the automation age, because there are big economic benefits taking the engineer out of the loop spending time analyzing test results and making calibration changes to the system during development. There are still gaps in achieving full automation, engineering systems are complex and full of uncertainties that are difficult to fully capture in a large-scale operation. Over time these wrinkles will smooth out and I expect that artificial intelligence and automation will dominate most industries. Companies that embrace this approach earlier on will benefit over competitors that do not, which will give them a better seat at the table in the market.

Purpose and Expectations

The purpose of the research article [1] is to present a solution that reduces the cost of developing controllers for automotive systems by utilizing emerging computer technology. The article covers the progression of this technology from the early 1980’s to the late 1990’s in order to show the exponential growth and effectiveness over a short period of time. The figures illustrate physically the size of these computer systems and how they shrunk in size over such a short period of time, further making it clear that computers were developing at an incredible pace. We take for granted the ease of access we have to connect to devices wirelessly, where it was not too long ago that being able to connect to a workstation via ethernet cable was a major convenience. Before reading the research article I based my expectations on my experience. I was curious to know how things evolved over time, as this paper was published 21 years ago, and I was only 1 year old at the time of the publication. Keeping that in mind before reading the paper made me think back to what my Dad always told me about computers when he was growing up with punch cards and computers that took up entire classrooms. I knew that computer technology evolved quickly during the late 20th and early 21st century, so I expected improvements in the speed and complexity of HiL testing.

Reflections

In principle HiL is a tool that engineers use to interface with their control systems by emulating sensors and actuators to study the output response of the system of interest. This fact still holds true for modern day HiL test benches. I think that this article does a good job of highlighting to the audience the importance that this technology has and will have in the future. The article makes it clear that there is not only an economic advantage to HiL testing, but also the ability to safely test and improve a controller before deploying it to a live test bench. This will never eliminate the probability of something going unexpectedly wrong, as some control systems are complex and depend on components that may not be within the scope of the HiL test bench. Capturing an increasingly complex dynamic system in the systems that existed in the 1980’s was basically impossible. Like the article says, the quality of the tests were dependent on the operator’s ability to adjust the systems several inputs manually, with almost no way of creating repeatable and comparable tests. Figure 5 makes an illustrated explanation of loop time for the simulation, which is defined as less than 10 percent of the fastest controller software loop time or the vehicles subsystem response time. In both cases, the inputs must be written, read and processed by the computer. Its not clear if this approach considers systems where measurement systems have response times and sampling frequencies that are only determined experimentally. In this case, the systems components and measurement equipment should be well documented and tested prior to creating a HiL test bench that may not capture the true response time of the system. It is possible however that this aspect was considered and taken care of in the signal conditioning block of the diagram. Tables 1 and 2 provide an overview of the expected quantity for a basic automotive simulator. The number of discrete inputs in modern control systems is exponentially greater, while analog inputs has stayed relatively the same since these sensors are typically pressure or temperature measurements for automotive systems and thankfully thermodynamics has not changed at the same rate as computers. The dramatic rise of discrete inputs and outputs in modern control systems can be attributed to the increase in controller logic complexity. Another solution proposed in this article is the software requirements and user interface, which still holds true in modern day systems. Users need the ability to interface with their equipment graphically as well as having the ability to adjust the I/O variables. Figure 8 shows a GUI controller simulation that looks very similar to what I would have seen at the test bench or simulator in my experience. One example comes to mind that highlights the shortcomings of HiL Testing. The requested torque is what the ECU uses to determine controller parameters from within maps that are dependent on torque and speed. However it is not possible to capture how the measured torque at the dyno varies if the engine has pistons that are on the higher side of the tolerance range, thus creating higher friction and forcing the engine to inject more fuel to maintain its speed. This sort of example shows how HiL Testing is limited in its ability to capture all of the nuances involved in real testing. Engineers have to keep in mind these kinds of scenarios to avoid potentially catastrophic parameterization of the controller on the HiL test bench that may function altogether differently on the real system.

Next Steps Moving Forward

The articles summary lists several improvements, one of which is the integration of simulation tools with existing tools to cover an increasing range of functions. I thought this was the most important point because as more commercial packages become available, its important that these tools can interface and communicate with each other. If this feature is lost, then the economic benefit that led to the rise of HiL testing will be lessened due to the lack of open source systems. Companies like AVL and ETAS have a corner on the market because they can provide end to end solutions, but they don’t integrate well with existing equipment. There is a huge investment to be made for the entire system if efficient and cost effective HiL testing is to be done with current controllers. I think that artificial intelligence will play a big role in improving the speed of controller development on HiL test benches. Optimal solutions will be achieved in fewer tests, and human error can be reduced taking this approach. It is fascinating to see how much things have advanced in 21 years. I think that the philosophy and vision statement of this paper will still hold true for future developments in this field of research.

Conclusion

The HiL is a mechatronic system that is comprised of 4 basic elements those being a compute engine, signal conditioner, I/O interfaces and a user interface. Each of these elements has developed as more powerful computer technologies became available. Commercial solutions arose and companies pursued HiL testing of their products because of the substantial benefits associated with the new technology. The total time spent parameterizing the controller was reduced, safer controllers were developed prior to real system tests and ultimately better products were made. Figure 1 shows a high-level overview of what the product development cycle has become with the introduction of HiL testing. In the future, more complex simulation environments and faster computers will allow for even better turn around of optimal controller solutions for systems. Artificial intelligence will accelerate the pace of this process, giving engineering more time to do things other than troubleshoot and tune controllers. This article was well ahead of its time and shows great foresight for what would lie ahead.


Figure 1. Fundamental product development cycle.

References

[1] A vision for automotive electronics hardware-in-the-loop testing, J.Wagner, R. Bruntsy, K. Kastery, D. Eagany, and D. Anthony, International Journal of Vehicle Design 1999 22:1-2, 14-28