A New Prespective for the Digital Twin

Unity Technologies has sponsored this post.
Prespective is a digital twin application built for the Unity game engine. (Image courtesy of Unit040.)

The southeast corner of North Brabant province in the Netherlands is recognized as one of the most intelligent communities in the world. Nicknamed the Brainport, the region is centered on the city of Eindhoven and is home to many of the Netherlands’ top tech companies and educational institutions. It is “the real Silicon Valley,” according to one resident, Daniel Fanego.

Fanego is the Head of Marketing at Unit040, a developer of digital twin technology that proudly calls the Brainport region home. Unit040—named for Eindhoven’s 040 area code—started 15 years ago with five students from the Eindhoven University of Technology. For a decade, the startup built 3D simulations and digital twins for the manufacturing industry, partnering with companies like Canon, ASML and the grandfather of the Brainport itself, Philips (founded in Eindhoven in 1891 to make lightbulbs, and now one of the largest companies in the Netherlands).

In 2017, Unit040 decided to apply its decade of digital twin experience to a broader audience. “We saw a growing need for virtual prototype and digital twin solutions,” Fanego explained. “And we figured that most companies would like standardized software instead of a custom-made solution.”

Unit040 set to work creating just that standardized digital twin software. Soon, the Brainport had a new brainchild, and its name was Prespective.

Digital Twins in Unity

Unit040 developed a standard digital twin software, but no software stands alone. Prespective is built on top of Unity, a real-time 3D development platform—or, as it’s better known, a game engine.

Why build a digital twin application on top of a game engine? Well, it’s for much the same reason as building a game on top of a game engine—you save yourself the effort of building an entire interactive content creation platform, physics engine and more from scratch. But let’s back up for a minute: What’s a digital twin, anyways?

For Unit040, the digital twin is a full model of a system (e.g., a conveyor belt) that is imbued with the proper kinematics (the rollers roll, the belt belts, and the conveyed are just that). The digital twin is not just a mock-up, but rather is a virtual equivalent of the system, plugged into the same controller logic that would run the real machine.

“We enable Unity users to set up a digital twin of their system or factory and connect that to outside data to create a fully working virtual prototype,” Fanego said.

This virtual prototype can demonstrate in real-time (or faster than, or slower) how your physical system will behave. In a sense, it is like a highly realistic video game where instead of collecting coins or fighting evil turtles, you’re testing factory equipment.

It is that highly realistic element that Unit040 has refined in Prespective. Though the software leans on Unity for a lot of functionality, Unit040 has developed a more precise materials handling system called PASS, short for Prespective Accurate Simulation System. Among other improvements, PASS extends Unity’s single-precision floating-point values (which are good enough for video games) to double-precision (necessary for real-time deterministic simulations).

“What we built on top of Unity was aimed at double precision and determinism through the use of a discrete and continuous event engine. We did a lot of work to focus Prespective very specifically on our industry clients while making building digital twins as easy as possible,” explained Pieter Weterings, Head of R&D at Unit040.

Building Digital Twins in Prespective

So how does it work? Building digital twins in Prespective is a five-step process:

Step 1: Import CAD Geometry

The digital twin starts with your CAD model, and Step 1 is to get that where it needs to be. You will need two pieces of software to get started: Unity, which is available for free but requires enterprise licensing for companies with over $100k in revenue; and Prespective itself, which must be licensed.

You may also need another plugin, Pixyz, to import your CAD files into Unity. Though it is not required for Prespective, Fanego recommends Pixyz for users with “very large and complex CAD files.” Pixyz is licensed at ~USD$1,200 per year and supports all the major CAD formats (see the full list here).

Once you have imported your CAD geometry into Unity, you can adjust it to improve simulation performance. Prespective offers a tool called Prescissor, which allows you to de-feature your model (e.g., remove all screws) and optimize its mesh (e.g., increase the resolution for important areas and lower it for others).

CAD geometry imported into Unity. (Image courtesy of Unit040.)

Step 2: Define Components

This step is where you really start creating the twin, matching each element of your geometry to its role in the system. Prespective has a library of standard components that helps you quickly define each part—sensors, motors, conveyor belts, static and moving objects, etc. You can also organize parts into a hierarchical structure with a Prespective tool called Prepair.

Step 3: Define Behaviour

Step 3 is where you move beyond labels and assign the physics and relationships of your components, defining the connections between parts, motion types and speed profiles, inputs and outputs, and constraints and boundaries. Physics can be calculated with Unity’s built-in physics engine, Prespective’s PASS, or any other physics engine, including custom models from third-party applications like MATLAB or COMSOL.

PASS is Prespective’s proprietary physics engine. (Image courtesy of Unit040.)

Prespective also accepts Functional Mockup Unit (FMU) and AutomationML file formats, which already include the behavioral information for a particular subsystem.

Step 4: Connect to Logic

You have defined the hardware, and now it’s time for the software. Step 4 is to connect components to their logic controllers, whether in the form of proprietary control software or standard PLCs. Prespective includes communication settings for TwinCAT/ADS, OPC UA, MQTT and ActiveMQ.

Step 5: Test and Validate

You may need to debug your Prespective model a few times—or a few hundred times—but once everything is defined correctly, once all the physics slip-ups and logic let-downs are smoothed out, you will have a bona fide digital twin at your disposal. Now it’s just a matter of using it. Run that simulation in every edge case you can think of to ensure that your physical twin will behave correctly.

Digital Twins for AGV Throughput at KMWE

One of Prespective’s success stories so-far is for another Brainport company called KMWE, an offshoot of Philips that manufactures components and systems for industries including healthcare, semiconductor, aerospace and more. “We specialize in high-mix, low-volume with a high complexity,” explained Koen Herps, an industrial engineer at KMWE.

A serendipitous meeting with Unit040 convinced KMWE to pursue a project with Prespective, interested to see if their existing industrial simulations could be enriched with the mechanical simulations of the digital twin. In particular, KMWE wanted to better understand how automated guided vehicles (AGVs) influenced the throughput of their production lines—and more importantly, how to optimize that throughput. It is just the right job for a digital twin.

Though Prespective was built as standalone software, available to any Unity user wishing to create a digital twin, Unit040 also offers consulting services for those who do not yet have the know-how. “The digital twin market is still emerging. And we see that a lot of our customers don't have the resources or the knowledge in-house to do it themselves,” Fanego said.

That is how it went with KMWE. Unit040’s Marc Albers worked with Herps and the KMWE team to develop the custom digital twin solution. Albers, then an intern pursuing a Masters in Mechanical Engineering at the Eindhoven University of Technology, created the digital twin in Prespective using KMWE’s existing data structures and logic.

“[Albers] made a nice simulation, explained it to us, and we took that and used it for our own stakeholders to prove to them that the simulations are an added value in the decision-making process,” Herps praised.

A simulation of AGV throughput in Prespective. (Image courtesy of Unit040.)

Among other insights, the digital twin revealed that AGV collisions were hampering throughput more than KMWE realized. The impact of AGV battery life and the variance among individual AGVs were also helpful takeaways from the project.

“The whole research helped us a lot,” concluded Herps. Without the digital twin, he explained, KMWE would have had to use ad hoc statistical modeling to predict AGV behavior. While such a model would provide some insight, it would be based on several assumptions that would degrade the model’s usefulness, such as guessing the probability of an AGV being blocked on its path. With a digital twin, these assumptions are replaced by simulation. In fact, Prespective can be combined with Unity Simulation to run a large number of possible scenarios in one batch.

Digital Twins and Game Engines

In the bastion of tech that is the Brainport region, Unit040 remains hard at work developing Prespective. The PASS physics engine is expected to be fully out of alpha by this summer, though Unit040 is already using it in select consulting projects. The company is optimistic that digital twins will someday be standard practice, and perhaps Prespective will be their standard software.

“Thirty years ago, when CAD software made its entrance in the engineering world, companies with pen and paper asked why they should use this new technology. And then slowly new people came within the organization and asked, ‘Why are you using pen and paper? You can do it with mouse and keyboard.’ And digital twins are basically the same,” Fanego predicted.

Game engines such as Unity are showing their value as engineering tools. To learn more about how engineers are using Unity for simulation, read How Spatial Intelligence is Improving Our Environments and The KIcker Story: Foosball and Deep Reinforcement Learning. For more information on Unity, visit Unity.com.