Smart Machines & Factories
Digital twins revolutionise time to market
Published:  22 October, 2019

All across the world's markets and industries, products are moving from conceptual design to market release in a shorter and shorter amount of time. How long it takes to develop a machine's hardware and program its software can be a decisive factor in its success or failure against the competition. So, naturally the faster, the better. Digital twins can play an important role in rapid development and testing of a machine's hardware and software. Smart Machines & Factories caught up with Kurt Zehetleitner, head of development - Simulation and Digital Twin, B&R.

The only way for machines to achieve their ever-tighter development schedules is with highly efficient processes. Errors must be ruled out from the start rather than corrected after the fact. Even the prototype of a new machine has to be just right the first time." To meet these lofty targets, simulation is an approach that has proven itself in many different disciplines”, says Kurt Zehetleitner, responsible for simulation and model-based development at B&R. A digital twin makes it possible to evaluate the characteristics of a product before any part of it actually exists.

This approach is already common practice for developing the mechatronic systems used in the automotive and avia-tion industries. Mechanical systems are modelled on the computer and tested in a simulation environment. This de-velopment strategy is still gaining a foothold in other areas of manufacturing. This can be largely attributed to the widespread misconception that developing simulation models is a time-consuming task that can only be performed by developers with a strong understanding of advanced mathematics, and that models themselves are prone to errors. "That may have been the case early on”, says Zehetleitner, "but today, creating simulation models is considerably easier and faster”.

Digital twins accelerate commissioning

Today's simulation tools make it very easy to generate digital twins. Not only does this simplify and accelerate hard-ware and software development, it also makes it possible to perform virtual commissioning. Simulating the physical behaviour of a machine in real time makes it possible to identify bottlenecks and potential for optimization very early in development. "With seamless interaction between development tools, simulation facilitates a high degree of flexi-bility and efficient resource management”, says Zehetleitner. "This contributes to optimal utilization of development resources and helps reduce commissioning times by up to 80%”.

In the B&R Automation Studio engineering environment, a digital twin gives application developers a decisive ad-vantage – they can start up the virtual model directly on the PC and connect to the machine controller in a software- or hardware-in-the-loop configuration. The application software can be developed, verified and tested in advance, and performance requirements can be tested on the controller.

To create a digital twin, the developer imports the CAD data for the machine into a modelling tool, such as MapleSim. They can easily use important characteristics from the CAD design, like mass and density values, and can also pro-vide individual mechanical components with additional properties, like degrees of freedom and an interface to the controller.

Modelling without equations

With tools like MapleSim and industrialPhysics, even complex models are easy to implement. MapleSim offers a library of modeling elements like masses, joints, springs and dampers that make the process of expanding and fine-tuning a model intuitive and easy. The system generates the equations for the model in the background. A B&R app for example in MapleSim allows the model to be automatically exported to Automation Studio, along with the CAD data. There, users can test the machine software with regard to motor load and controller tuning. B&R's Scene Viewer tool uses the provided CAD data to visualise movements in 3D. "This makes testing and troubleshooting very easy for the software developer”, says Zehetleitner.

The approach is similar with the industrialPhysics simulation tool. The tool has an integrated physics engine that pro-vides an approximate simulation of physical systems with an emphasis on real-time performance. "It's this type of system that now makes it possible to simulate entire machines and plants”, explains Zehetleitner. "You can even verify the real-time behavior and the system load on the target hardware in a hardware-in-the-loop environment”.

Automatic code generation

Once the digital twin has been created, automatic code generation plays an important role in the development and implementation of machine functions on the target system. Among the many benefits, it substantially reduces the amount of programming required. The MATLAB/Simulink tool is particularly well suited for automatic code genera-tion. B&R has developed a bidirectional interface between MATLAB/Simulink and Automation Studio. With Auto-mation Studio Target for Simulink, the developer's work is reduced to only a few mouse clicks. "They can get very quickly from creating a model in Simulink to running high-quality program code on the B&R controller”, says Zehetleitner. "Including some very sophisticated diagnostic options”. Automation Studio Target for Simulink helps achieve high product quality while at the same time significantly accelerating the development of machine software.

Open interfaces

When working with simulation tools, open standards and interfaces are essential to allowing the different systems involved to communicate freely and seamlessly. The ability to use existing software also saves valuable time. B&R offers openness on all levels and in all products. With the independent industrial standard Functional Mock-up Inter-face (FMI), models can be exchanged and co-simulated using a variety of development tools. B&R offers a mecha-nism for importing Functional Mock-up Units (FMU) in accordance with the FMI 2.0 standard. "FMUs are seamlessly integrated into Automation Studio as function blocks”, explains Zehetleitner.

Simulation tools can be used to test models in all defined scenarios and perform comprehensive virtual commission-ing. Testing performed during virtual commissioning can range from simple logical sequences to complex, critical scenarios to ensure the overall efficiency and quality of the machine's hardware and software. Using a digital twin drastically reduces the amount of time needed to commission the actual machine and minimises the risk of errors.


Digital twins

A digital twin is a detailed, dynamic representation of a real machine. Three-dimensional CAD data is used to create a digital model, which can be assigned all the characteristics and functions of the machine being developed – including the materials and sensors used as well as the movements and dynamic properties of the actual machine. This allows the behavior of the machine to be simulated in real time to identify potential errors or areas for improvement without the time, risk and expense of creating a physical prototype.