TU Graz/ TU Graz/ Services/ News+Stories/

How Do You Simulate a Digital Twin of the Heart?

02/08/2024 | Planet research | FoE Information, Communication & Computing

By Philipp Jarke

In this interview, Thomas Pock from the Institute of Computer Graphics and Vision explains what determining the activation sequence of the heartbeat has in common with throwing stones into a lake and how this can soon be learned in a personalised way using ECG data.

In the CardioTwin project, Thomas Pock wants to take additional variables into account when reconstructing the heart activation sequence and at the same time speed up the simulations. Image source: Lunghammer - TU Graz

How can you make a digital twin of the heart?

Thomas Pock: We developed a digital twin of the heart over the past few years as part of a BioTechMed cooperation project led by Gernot Plank from the Medical University of Graz. First, you need a digital image of the anatomy of the heart that is to be simulated. Every person's heart is unique, varying in size and shape, and the anatomy of pathological hearts sometimes is severely altered. This image is created utilising computer tomography and magnetic resonance images.

Even for doctors, it is difficult to determine exactly where the boundaries of the heart lie. Where does it cross over into the tissue, where is the heart attached and how large are the chambers? Taking this into account in the digital image is not so easy. Various algorithms have been developed for this purpose, and machine learning is now mostly used.

How does machine learning help?

Thomas Pock: To do this, a large number of hearts must first be tomographically imaged and segmented by hand into the various anatomical areas, e.g. heart chambers or valves. This image data and information go to form the learning data on the basis of which the heart can then be segmented with high accuracy from new, patient-specific data.

What area was your team predominantly involved in?

Thomas Pock: We simulated the activation sequence of the heart. The heartbeat is triggered by an electrical wave. This wave starts and then travels through various points in the heart, such as the sinus node, the AV node and the Purkinje system – a network of discrete fibres forming the conduction system of the main chambers. There are also other factors that need to be taken into account in the simulation. For example, the electrical wave propagates quickly along the muscle fibres but rather slowly across them. All these factors together result in the contraction of the muscle fibres due to electrical stimulation, which causes the heart to pump. We have reconstructed the patient-specific activation sequence of the entire heart on the basis of the arrival times of these waves measured at the surface of the heart.

How complex is something like this?

Thomas Pock: This is as complicated as trying to reconstruct the immersion point of a stone thrown into a lake and the subsequent wave propagation based solely on the change in water level on the lake shore. This is a so-called inverse problem.

How did you solve it?

Thomas Pock: A great deal of prior knowledge about the heart was incorporated into the development of the simulation, which heart modelling expert Gernot Plank and his team contributed to the project. In principle, you start with a highly simplified model in which the starting point of the electrical wave and its end points at the inner surface of the heart are assumed. From this you reconstruct the wave propagation. Of course, this reconstruction does not yet correctly depict the complex processes inside the heart with all its segments and structures. This subsequently requires many development and implementation steps. We have developed an algorithm that can reconstruct the activation sequence very precisely from the real measurement data on the heart. The calculations are based on a so-called eikonal equation, which generally describes the propagation of waves and is also well suited to the electrical wave in the heart.

How is it possible for such an algorithm to approximate reality?

Thomas Pock: You start with an insufficiently precise equation and compare the calculated value of the simulation with the real measured value obtained from the heart. The deviation error is fed back into the learning or optimisation algorithm and the simulation parameters are changed so that the error becomes smaller. These steps are repeated until the simulated and real values match as closely as possible.

A few weeks ago, you launched the follow-up project CardioTwin, in which you are continuing to focus on the digital simulation of the heart. What will you be working on specifically?

Thomas Pock: We are also working with Gernot Plank on this follow-up project funded by the Austrian Science Fund and Swiss National Science Foundation (SNSF), with additional cooperation partners from Switzerland. There will be important innovations: In the previous project, we reconstructed and simulated the activation sequence in healthy hearts. In CardioTwin, we are expanding the methods for various disease patterns in order to increase the clinical relevance of the models. In particular, hearts are modelled from patients with conduction disorders and from patients who have survived heart attacks. After a heart attack, for example, scarred tissue partially blocks the electrical wave. The wave must run around the scars like waves around an island in a lake.

The second innovation is that we will not use measurements taken directly on the surface of the heart with the thorax open, but rather data from non-invasive electrocardiograms, or ECGs for short. Every ECG consists of potential traces with very characteristic shapes that are recorded on the body surface. And from this information, we want to reconstruct the propagation of the electrical wave in the heart individually for patients.

We also want to model the activation sequence of the heart even better in CardioTwin. In the simulation, the eikonal equation can be extended by including a so-called diffusion term. This results in a diffusion of the currents in the digital twin of the heart, which makes the calculation more complex and more difficult to solve, but at the same time it will match reality more closely.

The more complex the simulation, the longer the computing times are likely to be?

Thomas Pock: Yes, that’s right. For this reason our aim is to optimise the solution methods for the equations in order to speed up the simulations. If a simulation takes an hour, it is useless in practice. The simulations have to happen in real time.

Why so fast?

Thomas Pock: You can check the effects of therapeutic interventions in advance. What happens, for example, when a pacemaker is inserted. How does this change the blood flow? Which pressures occur and where? Where are there any problems? If such values are calculated in real time, it is possible, for example, to compare different positions of the pacemaker before an intervention in order to determine the optimum electrode placement for the patient.

When will the digital twin of the heart be able to be used routinely before and during operations?

Thomas Pock: That will take quite a while yet. At the moment, our work is still at the basic research stage. But the long-term goal is of course to get the digital twin into clinical trials and then into clinical practice.

This research topic is anchored in the Field of Expertise “Information, Communication & Computing”, one of the five strategic research foci at TU Graz.

You can find more research news on Planet Research. Monthly updates from the world of science at Graz University of Technology are available via the research newsletter TU Graz research monthly.

Contact

Thomas POCK
Univ.-Prof. Dipl.-Ing. Dr.techn.
TU Graz | Institute of Computer Graphics and Vision
Phone: +43 316 873 5056
thomas.pocknoSpam@tugraz.at