Научная статья на тему 'Systematic approach to processing and analysis diagnostic indicators of electrocardiograms based on Labview'

Systematic approach to processing and analysis diagnostic indicators of electrocardiograms based on Labview Текст научной статьи по специальности «Медицинские технологии»

CC BY
109
32
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
ELECTROCARDIOGRAM / PROCESSING / ANALYSIS / CALCULATION / HEART RATE / HEART RATE VARIABILITY / ARRHYTHMIA

Аннотация научной статьи по медицинским технологиям, автор научной работы — Magrupova M. T., Talatov Yo. T.

Introduction. Cardiovascular disease occupies an important place throughout the world, which necessitates the development of more effective modern means of diagnosis and treatment. The primary diagnosis of heart disease is based on analysis and processing of an electrocardiogram (ECG). Despite the fact that there are many methods and algorithms for ECG analysis and processing, one of the urgent problems of cardiology remains to obtain the most complete information about heart electric potential, respectively, the behavior of the waves P, Q, R, S and T.Aim. Development of algorithms and software for processing and analysis of electrocardiograms (ECGs), as well as calculation of heart rate and detection of arrhythmias based on Labview.Materials and methods. The methods for removing noise using the wavelet transform method to eliminate baseline deviation ,to extract ECG signs ,to calculate heart rate and to detect arrhythmias based on Labview have been adopted as a mathematical apparatus for processing and analyzing ECGs.Results. Organizing of the ECG database, developing algorithms for converting the ECG file of the database into a useful format for Labview, processing of the ECG signal with removing noise from the original ECG signal, extracting signs for obtaining ECG diagnostic indicators, calculating heart rate and detecting arrhythmias.Conclusion. An analysis of the results demonstrates that systematic approaches to evaluating ECG signals allow to avoid one-way decisions and to integrate different methods into an integrated system of ideas of the state. The implementation of the proposed algorithms using Labview programming system ensures the removal of noise and artifacts, the extraction of the necessary ECG signs, the calculation of heart contractions and the detection of arrhythmias.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «Systematic approach to processing and analysis diagnostic indicators of electrocardiograms based on Labview»

Medical Devices and Devices for Control of the Environment, Substances, Materials and Products UDC 004:616.1/12 Original article

https://doi.org/10.32603/1993-8985-2020-23-2-82-88

Systematic Approach to Processing and Analysis Diagnostic Indicators of Electrocardiograms Based on Labview

Malokhat T. Magrupova, Yokubjon T. Talatov121 Tashkent State Technical University, Tashkent, Uzbekistan

3yokubtt@ rambler.ru

Abstract

Introduction. Cardiovascular disease occupies an important place throughout the world, which necessitates the development of more effective modern means of diagnosis and treatment. The primary diagnosis of heart disease is based on analysis and processing of an electrocardiogram (ECG). Despite the fact that there are many methods and algorithms for ECG analysis and processing, one of the urgent problems of cardiology remains to obtain the most complete information about heart electric potential, respectively, the behavior of the waves P, Q, R, S and T.

Aim. Development of algorithms and software for processing and analysis of electrocardiograms (ECGs), as well as calculation of heart rate and detection of arrhythmias based on Labview.

Materials and methods. The methods for removing noise using the wavelet transform method to eliminate baseline deviation, to extract ECG signs, to calculate heart rate and to detect arrhythmias based on Labview have been adopted as a mathematical apparatus for processing and analyzing ECGs.

Results. Organizing of the ECG database, developing algorithms for converting the ECG file of the database into a useful format for Labview, processing of the ECG signal with removing noise from the original ECG signal, extracting signs for obtaining ECG diagnostic indicators, calculating heart rate and detecting arrhythmias. Conclusion. An analysis of the results demonstrates that systematic approaches to evaluating ECG signals allow to avoid one-way decisions and to integrate different methods into an integrated system of ideas of the state. The implementation of the proposed algorithms using Labview programming system ensures the removal of noise and artifacts, the extraction of the necessary ECG signs, the calculation of heart contractions and the detection of arrhythmias.

Keywords: electrocardiogram, processing, analysis, calculation, heart rate, heart rate variability, arrhythmia

For citation: Magrupova M. T., Talatov Y. T. Systematic Approach to Processing and Analysis Diagnostic Indicators of Electrocardiograms Based on Labview. Journal of the Russian Universities. Radioelectronics. 2020, vol. 23, no. 2, pp. 82-88. doi: 10.32603/1993-8985-2020-23-2-82-88

Conflict of interest. Authors declare no conflict of interest.

Submitted 02.03.2020; accepted 26.03.2020; published online 29.04.2020

Introduction. Cardiovascular disease is the main killer that causes mortality worldwide [1, 2]. Significant efforts have been directed towards the introduction of various technologies for the diagnosis of heart disease, allowing doctors to recognize earlier symptoms of heart problems for further medical care. For this, an important place is occupied by research on the development of methods and algorithms for the analysis and processing of biological signals. In accordance with the

studied object of the human body, one or another method or algorithm for analyzing biosignals can be chosen.

Biological signals carry information about the physical manifestations of the physiological processes of a living organism, which can be measured and presented in a form convenient for processing using computer technology [1]. As an example, we can determine the process of the heart and as a result of which electrical potentials appear on the surface of the body.

© Magrupova M. T., Talatov Y. T., 2020

Контент доступен по лицензии Creative Commons Attribution 4.0 License This work is licensed under a Creative Commons Attribution 4.0 License

This process of the heart is determined by a biological signal called an electrocardiogram (ECG).

ECG system provides signals containing useful information to doctors. Several cardiac arrhythmias can be easily identified when anomalies in ECG signals are observed. As a rule, normal healthy ECG signals have waves P, Q, R, S and T with a standard value measurement, and they may differ in terms of capabilities or morphological signs of abnormal ECG signals [3]. To improve the quality of diagnosis of heart disease at an early stage, it is necessary, in particular, to increase the accuracy of ECG signal measurement and its diagnostic parameters.

The parameters of a biological signal that change in time in accordance with changes in physiological processes in the human body are informative. In other words, these parameters carry data on the change in the state of the investigated object (patient) or process. For biomedical signals, the informative parameters may be amplitude or power, frequency (period), phase (time shift). Processing of biomedical signals is carried out in order to isolate informative signs in them or to determine diagnostic indicators [2].

The classical approach to the analysis of heart rate variability (HRV) includes statistical, correlation and spectral processing methods, the basics of which were given in the works of foreign and domestic authors [3, 4]. The traditional methods for the analysis of biomedical signals listed above are based on the assumption that the signal remains stationary within the analyzed fragment. In practice, especially during the study of functional indicators, the implementation of this rule does not give the correct results. Therefore, in the analysis of biomedical signals, the application of mathematical processing methods that do not have any specific requirements for the characteristics of these signals is relevant.

The process of heart rhythm formation is determined by the interaction of the circulatory system with numerous regulatory mechanisms, depending on the state of the autonomic and central nervous systems, hormonal, humoral and reflex processes. Moreover, in this multi-level, hierarchical system, the current state of the organism plays a decisive role. This system is complex: the most obvious feature of it, like any biological object, is the ability to self-organize and manifest dynamic properties. Based on the results obtained in [5], we can say that the properties of the studied object can be restored by measuring only one observed signal.

Biological signals reflecting changes in functional processes in the human body, in the cardiovascular

system are continuous. To analyze the nonlinear properties of HRV, the Poincare section, cluster spectral analysis, attractor graphs, singular decomposition, Lyapunov exponent, Kolmogorov entropy and others are used [3]. However, for short-term time series of HRV, obtaining statistically stable estimates of fractal dimensions, Lyapunov exponents, and entropy encounters certain problems caused by the insufficient length of the series and the noise level of the HRV signal [6]. Some authors have come to the conclusion that the information encoded in the variability (R-R) of the intervals cannot be fully estimated using only one technique for the analysis of HRV. The presence of specific fluctuations (R-R) intervals determines the need to use different mathematical approaches to its estimation [3, 6]. Currently, different approaches are not considered as separate phenomena that did not have a common theoretical base.

Methods. Systematic approaches to the estimation of HRV signals make it possible to avoid onesided decisions and combine different methods into an integrated system of ideas about the HRV signal as a process containing a huge amount of heterogeneous information about the nature of such a complex biological object as a living organism [7].

The first step in the study of the object is to obtain the correct or accurate information about changes in the physiological process of the patient in the form of electrical signals that can be measured.

The next step is filtering and eliminating signal distortions (artifacts). For example, artifacts of the ECG signal can be caused by mechanical movements of the body, network noise, and electromagnetic field pickups.

The third step is the detection of events in biomedical signals and an analysis of their informational characteristics, modeling of processes and systems generating biomedical signals [8].

In general, the processing of biological signals can be implied by a complex of algorithmic, hardware and software. As a rule, this complex may contain specialized software for preliminary (or primary) signal processing and special software for secondary signal processing.

Pre-processing tools are designed to process the initial biosignals, observed in the general case against random noise and interference of various physical nature and presented in the form of discrete digital samples, in order to detect and isolate a useful signal and evaluate the characteristics of the detected signal. The useful information obtained as a result of preliminary processing enters the secondary processing system for classification, archiving, system analysis, etc.

Purpose of work is the development of algorithms and software for processing and analysis of ECG, as well as calculating heart rate and detecting arrhythmias based on Labview.

To achieve this goal, we need an ECG database. The database obtained from a medical institution consists of ECG signals received in .dat and .atr files. Its direct use for processing in the Labview system is impossible. By converting database files, new files are created that can be read in Labview. Files created for Labview consist of comma-separated values of the .txt data type. For Labview, two files are created: one with an ECG signal and one with a time signal. The time signal is multiplied by 1000 before it is saved in the .txt file and divided by 1000 in Labview after the file is opened. This is to avoid rounding errors that occur when opening files with floating point numbers. Since the entire ECG signal consists of large numbers without floating points, this is not required when saving the ECG signal for Labview [9].

In general, a recorded ECG signal is often contaminated with noise and artifacts. These impurities may be in the frequency band of interest and manifest with characteristics similar to the ECG signal itself. Thus, in order to extract useful information from noisy ECG signals, we need to first process the raw ECG signals. The algorithm begins with plotting the original, noisy ECG signal (Fig. 1). This graph shows which noises are present in the raw ECG signal.

Then, the stage of preliminary processing of the ECG signal, i. e. will be detected removes or suppresses noise from the raw ECG signal. Among these noises, noise in the power line and deviation from the baseline are the most significant and can greatly affect the analysis of the ECG signal. Other noises that cannot be neglected are broadband and usually represent a complex random process.

The interference in the power line is narrow-band noise centered at 60 Hz (or 50 Hz) with a bandwidth of less than 1 Hz. This comes from the use of electricity at a specific frequency. Typically, equipment for

sc Ш 1Ù XI Ù Л0 tts Ù Ш Ù Я> Й1 41 ne KB яв no wtc

Fig. 1. The original ECG signal with noise

receiving an ECG signal can eliminate power line noise. If there is interference from the power line in the raw ECG signal, this can be eliminated with a digital filter. Uzbekistan uses 50 Hz alternating current electricity. To ensure that the correct frequency is removed from the ECG signal, the frequency domain must be plotted in Labview. As a result, we get a random signal from the database, selected for use as an example.

There is interference on the power line for the selected specific signal from the 60 Hz database. Therefore, we must use a filter to eliminate power line interference at a frequency of 60 Hz for each signal. In Labview, the classic Express filter design creates a Butterworth bandpass filter as input to the DFD Filtering VI. As a result, in Fig. 2 we get an enlarged version of the plots made in Labview at 60 Hz.

Wandering around the baseline is another type of significant noise that needs to be addressed. The main causes of the basic walk are breathing, a change in the resistance of the electrode due to sweating and increased body movements. Thus, the elimination of basic wandering can significantly improve the accuracy of clinical information [10].

There are two removal methods available to eliminate this type of noise. First of all, we can design a high-pass digital filter [11] to eliminate the basic deviations. A Butterworth high-pass filter is a good choice. Fig. 3 shows the result of this filter for an ECG signal. In Labview, this filter is created in the VI Express Classical Filter Design Express and used as input for the VI Filtering DFD.

Secondly, you can use the wavelet transform to eliminate the deviation of the baseline, to eliminate

Ptotongmit nosy ECG sgnil Pil 65

10.0 10.5 11.0 115 12,0 lis 13.0 1*5 40 45 15.0 15.5 16.0 Ц5 17.0 17.5 1B.0 Ц5 19.0 19.5 20,0 20.3

_T—w__

Fig. 2. Power line noise elimination at 60 Hz

Fig. 3. Elimination of basic wandering due to digital filter

Pk* ECG sgntl with removed basctine mnfcmg due to vw.il« transform

Fig. 4. Elimination of the baseline walk by the wavelet transform method

this trend in the ECG signal. At the same time, Labview has a special building block that effectively removes a specific subband from the wavelet transform of the signal, and this is called WA Detrend VI. The result of applying this block to the ECG signal is shown in Fig. 4.

Moreover, the wavelet transform method gives a better result than the digital filter method [12].

After eliminating the deviation of the baseline (removing the baseline wander), the resulting ECG signal is more stationary and explicit than the original signal. However, as before, some other types of noise can still affect the extraction of ECG signal signs. Noise can be complex stochastic processes within a broadband connection, so it cannot be eliminated with traditional digital filters. Therefore, a high-pass filter is proposed in Express-Classical Filter Design Express to remove the base walk (Fig. 5).

Moreover, using the wavelet transform approach. Wavelet Denoise Express VI, which performs this task, will achieve the removal of broadband noise (Fig. 6).

After pre-processing the raw ECG signal, we get a useful ECG signal. You can now proceed to the feature extraction step. This extracts diagnostic information from the ECG signal. The most important feature of the ECG signal is the R-peak. Detection of R-peaks and, therefore, QRS (is a ventricular complex consisting of Q, R and S waves) complexes in the ECG signal can provide a lot of information about heart rate, conduction speed, the state of tissues in the heart, and also about various disorders [13, 14]. He provides evidence for diagnosing heart disease. For this reason, he has attracted considerable attention in the field of ECG signal processing. However, the presence of noise and time-varying morphology makes it difficult to detect the QRS complex.

Labview has its own building block for detecting peaks/valleys in signals. To determine the correct

Fig. 5. Designed high-pass filter in Express-Classical Filter Design Express to remove basic wandering

Fig. 6. Broadband noise removal

peaks and valleys, the user must change two variables that differ from signal to signal. These variables are peak/valley width and peak/valley threshold. This determines the width in the number of samples of peaks or valleys and the threshold that WA Multiscale Peak Detection VI uses to deflect peaks or valleys of a certain size. A true boolean value indicates whether it should remove the trend from the signal.

Fig. 7 shows the result of peak/trough detection on the filtered ECG signal, which shows the detection of R peaks.

After extracting the functions by detecting the QRS complex, we can analyze the functions by other methods. For example, we can perform an analysis of

Fig. 8. Tachogram

HRV for an ECG signal of the R-R interval to demonstrate the condition of the heart and nervous system. Heart rate variability is especially clearly visible on the tachogram. The tachogram shows the differences between the two subsequent peaks of R (Fig. 8). After detecting the QRS complex, you can begin the analysis of the ECG signal. This consists of calculating heart rate and detecting abnormalities. The heart rate is calculated by determining the number of peaks R and dividing it by the recorded time [15-17].

Results. The paper proposes algorithms for processing and analysis of ECG signals using the Labview programming system. ECG processing algorithms consists of: converting the database into an

b

Fig. 7. Detection of peak and valleys: a — normal graph; b — detailed graph

а

ECG into a useful ECG model; pre-processing consisting in eliminating interference in the power line and deviating the baseline using wavelet transform; detecting a complex of QRS and R peaks to determine heart rate variability and tachograms. ECG analysis algorithms consist of: calculating cardiac contractions and detecting arrhythmias.

Conclusion Signal processing begins by filtering the noisy ECG signal. In Labview, the Butterworth filter filters out power line noise. Figure 2 shows the result of this simple filter. Because it's convenient to create filters in the VI Classical Filter Design in Labview. Labview, uses predefined building blocks, which allows the user to very easily perform operations with signals. But this gives the user less freedom, and also makes the program very simple. For example, the graphs in Labview are very simple; it is convenient to create filters in the VI Classical Filter Design in Labview thanks to specialized blocks. This is followed by a basic removal of walks. This is done by two methods: a high-pass filter or a wavelet transform. The results show that, according to this method, the resulting ECG signals contain little basic information

about the walk, but retain the main characteristics of the original ECG signal. Moreover, the method based on the wavelet transform is better, because this approach does not introduce delay and less distortion than the method based on the digital filter. The digital filter significantly changes the waveform of P, Q, S and T. This distortion occurs in Labview, as can be seen in Fig. 4. The magnitude and phase response of the high-pass filter and the amplitude response in Labview can be seen in Fig. 5. Due to the VI Classical Filter Design in Labview, filter design was easier and more convenient in Labview.

An ECG signal analysis was performed on the processed signal, i. e. QRS complex detection. and R. peaks. Heart rate variability can be extracted from this and can be plotted in a tachogram. The calculation of heart rate and detection of arrhythmias was made. The average heart rate is displayed in the panel command window in Labview.

As a result, we can say that Labview is the best programming system for performing filtering and preprocessing, as well as for calculating heartbeats and detecting arrhythmias.

References

1. Magrupov T. M., Vasil'eva S. A., Magrupova M. T. Analiz i obrabotka medico-bioiogicheskoi informatsii [Analysis and processing of biomedical information]. Toshkent, TashGTU, 2012. 152 p. (In Russ.)

2. Rangayyan R. M. Biomedical Signal Analysis. 2nd Ed. Wiley-IEEE Press, 2015. 720 p.

3. Baevskii R. M., Ivanov G. G., Chireiki, L. V., Gav-rilushkin A. P., Dovgalevskii P. Ya., Kukushkin Yu. A., Mironova T. F., Prilutskii D. A., Semenov A. V., Fedo-rov V. F., Fleishman A. N., Medvedev M. M. Methodical Recommendations: Analysis of Heart Rate Variability when Using Various Electrocardiographic Systems. Journal of Arrhythmology. 2001, no. 24, pp. 65-87. (In Russ.)

4. Malik M. Heart rate variability: Standards of measurement, physiological interpretation, and clinical use. Circulation. 1996, vol. 93, iss. 5, pp. 1043-1065.

5. Schuster H. G., Just W. Deterministic Chaos: An Introduction. 4th Ed. Wiley-VCH Verlag, 2005, 287 p. doi: 10.1002/3527604804

6. Ardashev A.V., Loskutov A. Yu. Prakticheskie aspekty sovremennykh metodov analiza variabel'nosti serdechnogo ritma [Practical Aspects of Modern Methods of Analyzing Heart Rate Variability]. Moscow, ID MEDPRAKTIKA-M, 2011, 128 p. (In Russ.)

7. Fleishman A. N. Heart Rate Variability and Slow Hemodynamic Fluctuations. Nonlinear Phenomena in Clinical Practice. Novokuznetsk, izd-vo Sibirskogo otdelenij RAN, 2009, 185 p. (In Russ.)

8. Fabian J. T., Anke M.-B. Biomedical Signal Analysis: Contemporary Methods and Applications. Cambridge, MA, MIT Press, 2010, 432 p.

9. Islam M. K., Haque A. N. M. M., Tangim G., Aham-mad T., Khondokar M. R. H. Study and Analysis of ECG Signal Using Matlab Labview as Effective Tools. Intern. J. of Computer and Electrical Engineering. 2012, vol. 4, no. 3, pp. 404408. doi: 10.7763/IJCEE.2012.V4.522

10. German-Sallo Z. ECG Signal Baseline Wander Removal Using Wavelet Analysis. Intern. Conf. on Advancements of Medicine and Health Care through Technology. 2011, vol. 36, pp. 190-193. doi: 10.1007/978-3-642-22586-4_41

11. Haque A. K. M. F., Ali H., Kiber M. A., Hasan Md. T. Detection of Small Variations of ECG Features Using Wavelet. J. of Engineering and Applied Sciences. 2009, vol. 4, no. 6, pp. 27-30,

12. Lin Y. D., Hu Y. H. Power-Line Interference Detection and Suppression in ECG Signal Processing. IEEE Transactions on Biomedical Engineering. 2008, vol. 55, no. 1, pp. 354-357. doi: 10.1109/TBME.2007.902234

13. German-Sallo Z. ECG Signal Baseline Wander Removal Using Wavelet Analysis. Intern. Conf. on Advancements of Medicine and Health Care through Technology. 2011, vol. 36, pp. 190-193.

14. Saritha C., Sukanya V., Murthy Y. N. ECG Signal Analysis Using Wavelet Transforms. Bulg. J. Phys. 2008, vol. 35, pp. 68-77.

15. Talatov Y. T., Magrupova M. T. Generalization of Processing of Electrocardiograms and Calculation of Heart Rate. Digital Region: Experience, Competencies, Projects: Collection of Articles of the International Scientific and Practical Conf. Bryansk, Russia, 19 Nov. 2019. Bryansk, Bryan. State Engineering Technol. Univ., 2019, 670-675 p. (In Russ.)

16. Talatov Y., Magrupov T., Radjabov A. A Device for Measuring of Frequency. SIBIRCON 2019. Proc. of Intern.

Multi-Conf. on Engineering, Computer and Information Sciences. Novosibirsk, Russia, 21-27 Oct. 2019. Piscataway, IEEE, 2019. doi: 10.1109/SIBIRCON48586.2019.8958401

17. Talatov Y., Magrupov T. Algorithmic and Software Analysis and Processing of ECG Signals. SIBIRCON 2019. Proc. of Intern. Multi-Conf. on Engineering, Computer and Information Sciences. Novosibirsk, Russia, 21-27 Oct. 2019. Piscataway, IEEE, 2019. doi: 10.1109/SIBIRC0N48586.201 9.8958424

Information about the authors

Malokhat T. Magrupova, PhD student in Tashkent State Technical University, senior lecturer at the Department of Metrology, Standardization and Certification in the named university. The author of more than 20 scientific publications. Area expertise: metrological assurance of the reliability of medical and biological objects. Address: Tashkent State Technical University, 2 Universitetskaya St., Tashkent 100095, Uzbekistan E-mail: [email protected] https://orcid.org/0000-0002-3639-4991

Yokubjon T. Talatov, Master in Biomedical Engineering (2015), PhD student in Biomedical Engineering in Tashkent State Technical University. The author of more than 15 scientific publications. Area expertise: algorithmic and software analysis and processing - biomedical information.

Address: Tashkent State Technical University, 2 Universitetskaya St., Tashkent 100095, Uzbekistan

E-mail: [email protected]

https://orcid.org/0000-0003-4531-708X

i Надоели баннеры? Вы всегда можете отключить рекламу.