top of page

A Physics-informed Coupled Oscillator Framework for Synthetic ECG Generation

Coupled Oscillator Representation of Cardiac Electrical Activity

The Synthetic ECG generation process begins with cardiac dynamics as network of biological oscillators. This network includes the Sinoatrial node (SA), the Atrioventricular (AV) node, and the His–Purkinje (HP) complex, each exhibiting an intrinsic rhythm and distinct electrical properties. Their ordered interaction gives rise to the heart's electrical signaling, guiding how these impulses propagate and enabling coordinated cardiac contraction.

An electrocardiogram (ECG) provides an observable representation of this system by capturing the time-varying electrical signals generated by the heart. The familiar P-QRS-T waveform arises from the coordinated activity of these coupled oscillator components.

Physics-informed Modeling of Coupling and Conduction Delays

In accordance with Gois and Savi (2009) [1], each cardiac node is represented as a nonlinear oscillator, together forming six coupled first-order differential equations. Physiologically realistic signal timing is achieved through the coupling gains (K) and conduction delays (Ï„), which enforce physiologically realistic temporal sequences

Conduction delays are implemented via look-back mechanism, evaluating state variables at (t-Ï„). During the initialization boundary (t=0), delayed states are estimated using the Taylor series expansion [equation 10 of [1]], ensuring a smooth onset of oscillations without numerical discontinuities.

A cubic polynomial restorative force, typically expressed as

is incorporated to generate a stable limit cycle [refer equation 3 of [1]]. This structure enables the SA node to function as an autonomous pacemaker while constraining the full system within a bounded, physiologically meaningful trajectory.

Numerical Integration and Global Time Scaling

The heartbeat is generated by solving these coupled differential equations [refer equation 3 of [1]] using the fourth‑order Runge–Kutta (RK4) method. RK4 is an explicit, single‑step algorithm, meaning that the system state at the next time step is computed directly from the current state using four intermediate derivative evaluations (k1, k2, k3, k4), without requiring an iterative correction process. These evaluations are combined using a weighted average,

which is mathematically equivalent to an application of Simpson’s Rule. This weighting enables fourth‑order accuracy without reliance on predictor–corrector iterations.

Visualization and Physiological Validation

The state variables generated by the RK4 solution of the coupled-oscillator equations [refer Equations (3) of [1]] are subsequently transformed into ECG-like waveform using the weighting scheme defined in equation 8 of [1]. This synthesized signal is then processed using Neurokit2 library [2], which applies its standard preprocessing, filtering and delineation routines.

Through this analysis, the model‑generated waveform reveals clearly distinguishable P, Q, R, S, and T fiducial points. The successful identification of these characteristic features demonstrates that the oscillator‑based formulation reproduces the essential structure of a physiological cardiac cycle and produces signals that are consistent with real electrophysiological behavior (refer Figures 1, 2 and 3, below)

Figure 1.0: Synthetic ECG Signal Generation via Coupled Node Dynamics using equation 8 of [1]. A 10-second visualization of a synthetic ECG waveform (green) plotted against Time (Sec) and Amplitude (mV). The signal demonstrates high morphological consistency and periodic stability, achieved by solving the Gois and Savi [1] coupled differential equations using the RK4 numerical engine. The red grid lines emphasize the rhythmic precision of the autonomous oscillator system
Figure 1.0: Synthetic ECG Signal Generation via Coupled Node Dynamics using equation 8 of [1]. A 10-second visualization of a synthetic ECG waveform (green) plotted against Time (Sec) and Amplitude (mV). The signal demonstrates high morphological consistency and periodic stability, achieved by solving the Gois and Savi [1] coupled differential equations using the RK4 numerical engine. The red grid lines emphasize the rhythmic precision of the autonomous oscillator system
Figure 2.0: Automated identification of P, Q, S, and T waves on a synthetic cardiac cycle, confirming the morphological stability of the numerical simulation. This validation was performed using the NeuroKit2 library [2]. The successful extraction of these cardiac landmarks proves that the RK4-based autonomous oscillator maintains a physiologically accurate limit cycle, providing a robust "idealist" ground truth for the Lepakshi-ECG Annotator comparison engine.
Figure 2.0: Automated identification of P, Q, S, and T waves on a synthetic cardiac cycle, confirming the morphological stability of the numerical simulation. This validation was performed using the NeuroKit2 library [2]. The successful extraction of these cardiac landmarks proves that the RK4-based autonomous oscillator maintains a physiologically accurate limit cycle, providing a robust "idealist" ground truth for the Lepakshi-ECG Annotator comparison engine.
Figure 3: Comprehensive visualization of synthetic ECG signals generated using the nk.ecg_plot function within the NeuroKit2 library [2]. The top-left panel displays the raw and cleaned signals with identified R-peaks, while the right panel highlights the average beat shape and delineated P, Q, S, and T waves. The bottom-left panel illustrates the instantaneous heart rate and its mean over a 30-second interval. In this pipeline, the heart rate is computed using the Pan-Tompkins algorithm [2], which utilizes a series of filters (low-pass, high-pass, derivative, and moving window integration) to robustly detect QRS complexes and determine the beats-per-minute (BPM). This automated validation ensures the RK4-generated signals maintain physiological consistency, serving as an "idealist" reference for the Lepakshi-ECG Annotator.
Figure 3: Comprehensive visualization of synthetic ECG signals generated using the nk.ecg_plot function within the NeuroKit2 library [2]. The top-left panel displays the raw and cleaned signals with identified R-peaks, while the right panel highlights the average beat shape and delineated P, Q, S, and T waves. The bottom-left panel illustrates the instantaneous heart rate and its mean over a 30-second interval. In this pipeline, the heart rate is computed using the Pan-Tompkins algorithm [2], which utilizes a series of filters (low-pass, high-pass, derivative, and moving window integration) to robustly detect QRS complexes and determine the beats-per-minute (BPM). This automated validation ensures the RK4-generated signals maintain physiological consistency, serving as an "idealist" reference for the Lepakshi-ECG Annotator.

Conclusion

This work demonstrates how cardiac electrical activity can be modeled using a physics‑informed, coupled‑oscillator framework to generate physiologically structured ECG signals. By grounding synthetic ECG generation in cardiac dynamics rather than purely statistical assumptions, the approach provides a controllable and interpretable foundation for downstream analysis and machine learning applications.

These modeling capabilities are being integrated into the Lepakshi‑ECG Annotator, enabling direct comparison between clinical ECG recordings and idealized, physics‑derived reference waveforms. Such comparisons allow deviations from stable cardiac dynamics to be quantified in a principled manner, offering new ways to characterize signal variability and abnormality.

More importantly, embedding cardiac dynamics into synthetic data generation pipelines—such as those based on Variational Autoencoders (VAEs)—introduces explicit physics awareness into the learning process. Rather than relying solely on data‑driven correlations, models trained on physics‑consistent ground truth can learn representations that better reflect the underlying physiological structure. This direction, currently being explored at Intuitus, represents a step toward more trustworthy, interpretable, and physically grounded AI models for cardiac signal analysis.

References

[1] Gois, A. G. S., & Savi, M. A. (2001). An analysis of heart rhythm dynamics using a three-coupled oscillator model. Chaos, Solitons & Fractals, 41(5), 2553–2565.

[2] Makowski, D., Pham, T., Lau, Z. J., Brammer, J. C., Lesspinasse, F., Schölzel, C., Chen, S. A., & S H Chen, A. (2021). NeuroKit2: A Python toolbox for statistics and neurophysiological signal processing. Behavior Research Methods, 53(3), 1289–1296. https://doi.org/10.3758/s13428-020-01516-y



Recent Posts

See All
Synthetic Data, DPDPA and Tools

A Brief Overview of Synthetic Data Synthetic data is information that is artificially generated by computer algorithms rather than collected from real-world events or individuals. While it contains no

 
 
 
bottom of page