Hero Image

gravity9 System Architecture Guide: Digital Twin


03 Jun 2024 | Julio Castellanos

Architecture is a vital aspect of all systems, and applications, serving as a blueprint for engineers that defines behavior and structure. There are numerous architectural patterns out there and they can be used on different levels of a system – a single system can use multiple architectural patterns!

As a digital consultancy, gravity9 has a rich history and heritage of development, picking the best architecture for the job.

In this series of articles, we’ll introduce some of the most popular system architecture around. We’ll look at why they’re popular, where they’re useful, and where they’re less useful.


What is a Digital Twin?

A digital twin is a digital simulated counterpart to a physical system. The digital twin interacts with its physical counterpart in two ways: by receiving data from it, updating its state, and also by sending information about features that are ready to be implemented in the real world.

There are several benefits to having a digital counterpart:

  • Time and Cost Savings: Deploying changes can be expensive, but these costs can be saved when deploying to a digital twin.

  • Design Optimization: The design of the system can be validated with real-world data, allowing for a better-optimized design.

  • Future-proofing: Digital twins can predict and model future outcomes given a specific situation, allowing for measures to be taken to prevent unwanted incidents in the real-world system.

  • Operational Efficiency: Asset performance can be optimized by configuring alerts on their digital twin counterparts.


Digital Twin Lifecycle

When to Use Digital Twin Architecture 

Digital twin excels in situations where real-world testing is a high-risk activity.

For example, imagine that a doctor tells their patient that their heart is failing but that an electronic device that can modify heart rates may help. There’s a catch, however – this could prove fatal to the patient! Although the patient wants a longer life, the risk is too great to test such a device directly on themselves. This is where digital twin steps in. The modifications can be applied to the digital twin first, simulating the outcomes of those effects, determining what works or does not work and what is safe to apply to the real-world counterpart.

Digital twin also excels in situations where a system is too complex, has too many moving parts, and individual components can’t be isolated for testing.

For example, You want to test the operation of an airport. You can easily isolate and test the movement of a single aircraft, but this won’t help you understand what that means to other planes moving at the same time (and, in turn, the schedule of the airport). A digital twin to model the airport could involve a digital system connected by information provided by Internet of Things devices installed on every aircraft moving through your airport. Within this simulation, you can delay one aircraft’s landing and understand any impact this has on the rest of the aircraft and your airport.


When NOT to Use Digital Twin Architecture

Building a digital twin can be a very complex task, especially if your real-world counterpart is complex itself. Accurate and thorough information from the real world has to be collected, processed, and ingested into the digital twin. This can be a consuming, and costly operating task – as can any ongoing maintenance to ensure your digital counterpart continues to be useful in accurately mirroring whatever real-world system you’re modeling.

Sometimes a digital twin could be considered overkill. For example; in the scheduling of television programs, if a change proves unpopular it’s easy to revert to the previous schedule or make other changes to improve view engagement. Constructing a detailed digital twin that accurately includes both programs and viewers would be complex, costly, and is likely not worth the investment.

To simplify judging the value of a digital twin, you can ask: What’s the worst that can happen with real-world simulation? If the “worst” is a severe impact on (individuals, resources, cost, time, etc.) then a digital twin may be worthwhile. If not? It may be unnecessary.

Furthermore, collecting data of significant quality can be a problem in implementing a digital twin that is fit for purpose. Across thousands (or even millions) of data points, there may be outliers, duplication, erroneous circumstances, or data not considered for the model. These issues and the sheer scale of information can all have an impact on the usefulness of the digital twin.


A Real-World Example of a Digital Twin

A good example of a helpful digital twin is Nvidia’s Isaac Sim; a robotics simulation platform that provides faster and better ways to design, test, and train AI-based robots. It has sped up robot manipulation training (in the digital space) and, once the learning process is finished, this knowledge can be transferred to the physical, real-world robot.

Isaac Sim has the following key features:

  • High-Fidelity Simulation: Accurate representations of robots and environments.

  • Sensor simulation: It simulates several types of sensors, such as cameras, lidars, and depth sensors.

  • Physics simulation: It has Nvidia PhysX integration, allowing physics simulations and facilitating dynamic interactions in the virtual environment.

  • Customization: The virtual environment can be extended with custom robot models, sensors, and environments.


How Does gravity9 Work With Digital Twin Architecture? 

As a perfect example of how gravity9 has implemented a digital twin, we turn to one client in the public transportation sector. They wished to build a system capable of monitoring public transportation in real-time across a large area of their country.

To clarify some project-specific terminology; the entity in charge of providing transportation services is called an “agency” and there are three means of transportation to be monitored: trains, buses, and midibuses.

A digital twin was built which functionally consisted of a map that displays current traffic:

  • Routes and stops (per agency and route type)

  • Traffic

  • Taxi ranks

A data fetching system utilizing MongoDB collection ensures the latest information is available to the front-end application from the data provider API, as shown in the image below.


Data Fetching for Digital Twin


The front-end application accessible by end users is shown below. Users are able to filter by type of transportation, specific routes or agencies, and are able to see where public transportation stops for passengers (shown as white circles).


Interface for a Digital Twin based system, by gravity9


Once a specific stop is selected, the schedule of transportation is also made available as shown below:


Interface for a Digital Twin based system, by gravity9


This implementation of a digital twin reached a data acquisition phase; an important base from which two-way sync systems can be implemented. This enables (for example) traffic re-routing simulations which could be useful in the event of road closures and similar blockages.

This is a useful real-world case study of a complex simulation made possible thanks to digital twin architecture, allowing scenarios to be trialed without unwelcome disruption to real-world communities and infrastructure.


Is Digital Twin Architecture Right For YOU? 

Digital Twin is a powerful, yet specific, approach to solution modeling. It excels in mitigating risk by enabling investigatory research and testing of real-world challenges in a digital space. It can also help when a real-world system is too complex to easily “stop” one component. However, this comes at a cost; it can be expensive to build and maintain. For systems where there’s little serious risk of tangible harm from change, a digital twin may be entirely unnecessary.

The key question when considering a digital twin model is: is the risk or complexity of testing without it too great?

Although digital twin may be a niche approach, gravity9 is experienced in delivering successful models based on it and strongly believes in its potential for great use in the right circumstances!