Modeling the Electrical Activity of the Heart via Transfer Functions and Genetic Algorithms

Biomimetics (Basel). 2024 May 18;9(5):300. doi: 10.3390/biomimetics9050300.

Abstract

Although healthcare and medical technology have advanced significantly over the past few decades, heart disease continues to be a major cause of mortality globally. Electrocardiography (ECG) is one of the most widely used tools for the detection of heart diseases. This study presents a mathematical model based on transfer functions that allows for the exploration and optimization of heart dynamics in Laplace space using a genetic algorithm (GA). The transfer function parameters were fine-tuned using the GA, with clinical ECG records serving as reference signals. The proposed model, which is based on polynomials and delays, approximates a real ECG with a root-mean-square error of 4.7% and an R2 value of 0.72. The model achieves the periodic nature of an ECG signal by using a single periodic impulse input. Its simplicity makes it possible to adjust waveform parameters with a predetermined understanding of their effects, which can be used to generate both arrhythmic patterns and healthy signals. This is a notable advantage over other models that are burdened by a large number of differential equations and many parameters.

Keywords: ECG; genetic algorithm; metaheuristic optimization; modeling; transfer function.

Grants and funding

This work was Funding by Consejo Nacional de Humanidades, Ciencias y Tecnologías (CONAHCyT) of Mexico under Grant CF-2023-I-1496 and Dirección General de Asuntos del Personal Académico (DGAPA)-National Autonomous University of Mexico (UNAM) under Project UNAMPAPIIT TA101023 and the postdoctoral fellowship DGAPA-UNAM for O.R.A.