There’s been a lot of discussion lately – as well as quite a lot of hype and “hand-waving” IMO – about using a “digital twin” (DT) to accelerate product development, software debug, and resolve electrical-mechanical interaction issues. Digital twinning follows “hardware in the loop” (often written as HITL or just HIL) as the hot tool for similar activities just a few years ago.
What are DT and HITL? As with many such designations, it depends somewhat on who you ask and where they are coming from. One general description says that for DT, you create a software-only model of the system being controlled, and then provide it with inputs and outputs from your controller being tested, and see how well your controller acts as it does what it is supposed to be doing (Figure 1).
Figure 1 In principle, a digital twin is a virtual model of the entire application and process, which allows designers to visualize and test the design via a single software entity. Source: Wipro Limited
In contrast, for HITL you build a software model of the core, but have it interface with and direct real hardware (circuitry and mechanical) to assess the performance of your controller (Figure 2). In other words, DT is pretty much all software and models, while HITL has, as the name implies, some real circuitry and even electromechanical components.
Figure 2 This top level diagram shows the key components of a HITL test system, which uses representative real-time responses, electrical stimuli, and functional cases to connect all the I/O of the unit being tested (here, an electronic control system for an automobile). Source: add2
An example using an automobile engine and its ECU (electronic control unit) may make this clearer. For the DT scenario, you model the engine entirely as a software construct, and this model “talks” to the software of the controller being developed. In contrast, for HITL, you model the engine but now the model software drives real circuitry I/O to the controller under development, which then sees those interfaces. The HITL often requires a rack of equipment, meaning substantial amounts of circuitry (Figure 3). One of the appeals of DTs is that they eliminate the need for most if not all of this hardware, of course.
Figure 3 As the name implies, HITL incorporates hardware, and that may be in both senses of the word: electronics and electromechanical components. Source: add2
HITL systems are even available as standard products, such as high-precision and high-dynamic three-axis and five-axis flight motion-simulator (FMS) systems for development and production testing of missile guidance and seeker packages (Figure 4).
Figure 4 HITL systems are available as standard product applications, such as this flight motion-simulator system for testing of missile guidance and seeker packages. Source: Ideal Aerosmith
So, which one is better? As is almost always the case for engineering questions, the answer is simple: “it depends.” The factors on which it depends include time to create their respective models, confidence in that model, and complexity of simulating I/O. If you go online, there are proponents of DT who say HITL is “so yesterday” and no longer needed (Reference 1), as well as proponents of HITL who claim that DTs are overhyped (Reference 2), oversold, and overly-dependent on the fidelity of the model to reality. Others contend that the best solution is a hybrid of both, applied with care (Reference 3).
Not surprisingly, the issues are largely about the model rather than the approach. We know that good digital models of the real analog world are hard to develop, and it’s the last 10% of the model that is hardest to do with accuracy. There are so many subtle unknowns, corner cases, exceptions, nonlinearities, inflection points, and more of which the model’s creator is simply not aware or can’t quantify. Depending too heavily on model accuracy is just the latest manifestation of the classic, yet still valid, maxim “garbage in, garbage out.”
No question, it’s absolutely necessary to use various models, whether they are DT or HITL, Spice, RF packages, or simulation and analysis tools such as COMSOL Multiphysics, Mathworks MATLAB and Simulink, and ANSYS HFSS. But be a realist about how perfect these models are, always keeping in mind that the model may show precision to three, four, or more significant figures, but actual accuracy is usually far less – and may be way off if the real world has “bumps” that the model didn’t capture.
What’s your view or experience with respect to digital twins, hardware-in-the-loop, and other sophisticated models and tools? Have you been burned, pleased, oversold, overwhelmed, or other?
- Opal-RT, “The ‘Digital Twin’ in Hardware in the Loop (HiL) Simulation: A Conceptual Primer”
- Athens Group, “Digital Twin Gets Its Due”
- Smart Robotics, “Using digital twin and hardware-in-the-loop simulations to speed up robot development & integration”
- NI, “Hardware-in-the-Loop (HIL) Test”
- NI, “What Is Hardware-in-the-Loop?”
- add2, “Hardware-in-the-loop testing applications”
- MathWorks, “What Is Hardware-In-The-Loop Simulation?”
- Ideal Aerosmith, “Three- And Five-Axis Flight Motion Simulators For Hardware-in-the-Loop Simulation (HWIL)”
- Deloitte, “Industry 4.0 and the digital twin”
- Slideshare presentation by Megha Agrawal and Mohit Parkhi, “Digital Twins”
- OSIsoft, “Digital Twins: Myths vs. Reality”
- Wipro, “Digital Twin: Innovate the Way to Test”