Skip to Main Content

      

ANSYS BLOG

May 20, 2022

Teaching AI “Brains” Using Digital Twins with Microsoft

Engineers are increasingly using artificial intelligence (AI) to automate processes and make decisions faster and more effectively than humans can. But, while engineers are experts in their area of specialization, most of them are not data scientists. And they don’t have the time to learn data science and write the complex code that AI modules require.

Microsoft Project Bonsai helps engineers create AI-powered automation without using data science by graphically connecting software modules that have already been programmed to perform certain AI functions. A complete set of connected functions that can perform a task is called a “brain.” A brain is a standalone, portable software module that can be used as part of an open loop to advise a human operator on the best decision to make, or it can replace the human, making decisions and carrying them out by itself when configured in closed-loop mode.

Microsoft is working with Ansys Twin Builder software to create digital twins of equipment or processes to be automated using AI. Digital twins can generate the large amounts of data needed to train AI brains much more quickly and at lower cost than using physical machines for data generation. 

Machine Teaching vs. Machine Learning

As automated processes become more complex, the method of training an AI brain is changing too. When the goal was simply image or text recognition, flooding the AI brain with tons of labeled data so it could pick out patterns worked fine. This is the basis of machine learning (ML).  

But when AI is being relied on to control a complex, multistep process on an industrial scale, ML is not as effective. The variety of inputs from numerous sensors of different types simply overwhelm the brain.

So, Microsoft engineers developed the concept of machine teaching (MT), which relies more on the human approach to learning. Just as a math teacher doesn’t start trying to teach young students calculus before they have mastered the concepts of arithmetic, engineers can’t expect an AI brain to understand how an electric turbine works before it learns about rotation. 

“Imagine you’re starting with the hardest problem where the chances of finding a solution are almost nil,” says Cyrill Glockner, a principal program manager at Microsoft. “The AI brain will never find a way to do that. But it can slowly work its way up to it by following a combination of exploitation and exploration, taking advantage of what it has already learned and looking across the data environment to ensure that it finds an optimal solution to the problem.”

In practice, human experts first break the process down into smaller tasks. They then give the AI brain a few simple problems so it can begin learning how to use its algorithms to solve these easy challenges. Then they combine small tasks the brain has already seen into larger ones until it can automatically control large, complex systems.

“We basically reduce the mathematical space that the AI brain has to look at by limiting it to certain parameters and ranges,” Glockner says. “Then we increase the range over time. The brain only has to deal with the new delta and it already has some methods that it found in the earlier, smaller range that can be applied to the larger ones as well.”

The Role of Digital Twins

While, as explained above, it is important when initially training a brain using MT to start with small tasks and limited amounts of data, once the brain is well-trained it requires large amounts of data to fully optimize its operations. 

Typically, this involves generating huge amounts of data by running a physical process over and over. This data can then be fed into the brain to fine-tune its operation on the complete machine or process it was designed to automate. But generating so much data from physical processes is time-consuming and expensive. Also, if a condition occurs only once every trillion times — a “corner case” — and is not encountered during the training runs, the brain will not have seen it before and will not know how to react if the situation occurs later.

Working with Ansys Twin Builder, Microsoft Project Bonsai overcomes these limitations by running hundreds of virtual models of the machine or application simultaneously and feeding the data generated by these digital twins directly into the brain to optimize it. Using large numbers of virtual models instead of fewer physical ones reduces the time and cost of training a brain. It also enables engineers to introduce corner cases in the virtual environment, which might be potentially dangerous or damaging to a physical machine, so the brain has seen all possible scenarios before it is put into operation.

From Digital Twin to Machine Learning: How it Works

Engineers start by using Twin Builder to create a multiphysics system level model by combining different modeling techniques such as 0D/1D modeling and reduced-order model (ROM) from higher fidelity simulation results. These higher fidelity models provide the greatest simulation accuracy but also take a long time and lots of computational resources to run. A ROM is a model that is smaller and less computationally intensive than the original, but it runs much faster while sacrificing very little in terms of the accuracy of the physics involved in the simulations. Twin Builder models the overall system using component libraries (pumps, valves, actuators, sensors, etc.) and ROMs for components requiring accurate predictions that typically cannot be achieved with 0D/1D modeling (for example a complete field prediction of physical variables), which enables optimization and validation of component choices with the system response.

The physics-based digital twin model can be further improved by incorporating knowledge coming from asset data, for example for model calibration or augmentation, which leads to a hybrid digital twin

The final models can be exported and deployed in the form of a Twin Runtime module.

“We can directly integrate Twin Runtimes into Microsoft Bonsai,” says Christophe Petre, manager product specialist for digital twins at Ansys. “Twin Runtimes come with a very simple API, that can be used in different programming languages like a Python application, that tells the users how to manipulate the digital twins by transmitting inputs, simulating the models, and retrieving the outputs seamlessly.”

Once the API is integrated with Bonsai, engineers can determine whether a virtual change to any operating condition improves the behavior of the equipment or process that they want to control. They can also access new information, like virtual sensor data (something that you cannot measure physically but that you can predict with the model); explore “what if” scenarios; or run simulations to see how the asset is aging to predict when maintenance will be required.  

Example of an Aircraft Cabin Pressure Control System

A cabin pressure control system (CPCS) is one way to demonstrate digital twin technology and its integration with Bonsai. A CPCS is an avionics system designed to minimize the rate of change of cabin pressure. Its purpose is to ensure the safety of the airframe and passengers while maximizing comfort for aircrew and passengers during all phases of flight. It consumes part of the overall energy consumption of the aircraft and therefore requires complex controls. 

In Bonsai, engineers can build the AI brain by graphically selecting and connecting functional blocks of control code that take cabin temperatures and pressures at various points in the cabin as inputs and issue active commands (e.g., “turn down air conditioning”) as outputs.

In Twin Builder, the air conditioning subsystem can be modeled using 0D/1D components in Modelica, and a high-fidelity representation of the aircraft cabin can be modeled with a 3D computational fluid dynamics (CFD) model in Ansys Fluent. A ROM is created from this 3D model and connected to the system model in Twin Builder. This provides accurate virtual sensors distributed spatially in the cabin to monitor pressure and temperature. 

Once the model is assembled and validated in Twin Builder, engineers can generate a portable, plug-and-play Twin Runtime application. Through the simple Python API, it can be ported to a digital twin workflow and used to train a Bonsai brain to create a controller. In this case, the digital twin will make predictions of the virtual sensors and, based on that, the AI controller will take actions on the air conditioning system to maintain the targeted pressure and temperature.

“Instead of using training datasets where you have either labeled or unlabeled data for supervised and unsupervised learning, we can use simulation at the digital twin as the data generator,” says Glockner. “This is really exciting for us because we can simulate many digital twins simultaneously, collect the data, sort it out on our side and make sure that the right data is being generated for optimal learning.”

Eager to see a live demo of Microsoft Bonsai and Ansys Digital Twin integration? Visit Us at Hannover Messe at the Microsoft Booth in Hall 004, Stand E34.

Want to learn more about Ansys digital twins ? Try Twin Builder for free!

Découvrez ce qu'Ansys peut faire pour vous

Contactez-nous aujourd'hui

* = Champ requis

Merci de nous contacter !

We’re here to answer your questions and look forward to speaking with you. A member of our Ansys sales team will contact you shortly.

Image de pied de page