# An Innovative Machine Learning Approach for Classifying ECG Signals in Healthcare Devices

Authors: Kishore B; A. Nanda Gopal Reddy; Anila Kumar Chillara; Wesam Atef Hatamleh; Kamel Dine Haouam; Rohit Verma; B. Lakshmi Dhevi; Henry Kwame Atiglah
Journal: Journal of Healthcare Engineering
 (2022)

---

## Abstract

An ECG is a diagnostic technique that examines and records the heart’s electrical impulses. It is easy to categorise and prevent computational abstractions in the ECG signal using the conventional method for obtaining ECG features. It is a significant issue, but it is also a difficult and time-consuming chore for cardiologists and medical professionals. The proposed classifier eliminates all of the following limitations. Machine learning in healthcare equipment reduces moral transgressions. This study’s primary purpose is to calculate the R-R interval and analyze the blockage utilising simple algorithms and approaches that give high accuracy. The MIT-BIH dataset may be used to rebuild the data. The acquired data may include both normal and abnormal ECGs. A Gabor filter is employed to generate a noiseless signal, and DCT-DOST is used to calculate the signal’s amplitude. The amplitude is computed to detect any cardiac anomalies. A genetic algorithm derives the main highlights from theR peak and cycle segment length underlying the ECG signal. So, combining data with specific qualities maximises identification. The genetic algorithm aids in hereditary computations, which aids in multitarget improvement. Finally, Radial Basis Function Neural Network (RBFNN) is presented as an example. An efficient feedforward neural network lowers the number of local minima in the signal. It shows progress in identifying both normal and abnormal ECG signals.


---

## Body

## 1. Introduction

Automatic electrocardiogram analysis is the best practice utilized by clinicians for scrutinizing and recording the functions of the heart by positioning the electrodes at the external area of the skin membrane can be observed by electrocardiogram device and a greater number of researches are focused by scientists in recent years [1, 2]. Advancement in the technology provides enhancement in visualizing heart abnormalities at regular interval. It is most helpful in diagnosing cardiac disorders such as myocardial infarction. The extended ischemia will continue till the cells start to die, which is called myocardial infarction. In India, compiling accurate data on sudden cardiac death, 5.5% of all-out mortality happened, and around 1-fifth of all the cardiovascular passing and 6 lakh heart passing in the nation were suddenly occurred [3, 4]. A determination of myocardial dead tissue is produced by incorporating the historical backdrop of the displaying ailment and physical investigation with electrocardiogram discoveries. Free wall rupture is a complicated one. In [5], it occurs in 1% of patients of acute myocardial infarction and it accounts for up to 7% of all infarct-related deaths. Automatic ECG analysis works well in identification of cardiac-related problems in an enhanced manner and for the better treatment. We mean to decide the measure of heart tissue harm by multigoals examination of electrocardiogram signals [6]. The most critical component of the ECG signal is the QRS complex, the pinnacle of which is indicated as R-peaks [7]. The R-R intermission means the time space between the two successive R tops. It is utilized to find the abnormalities in the heart normal operation called arrhythmia. The diagnosis involves an estimation of the size of infarct and to identify the acute complications [8]. In ECG, Q and T waves play a major role in electrocardiogram signal. In P wave, if any problem occurs, it does not lead to any complication. So, QRS detection is necessary to achieve our target. T-wave change occurs in larger area, and it denotes ischemia and ST segment change occurs in lesser number of leads and it indicates the myocardial injury and Q-wave overlie and it denotes the main area of myocardial necrosis [9, 10]. Many researchers have worked in the area of medical field in performing analysis of cancer detection, electrocardiogram analysis, and so on.Sudden Cardiac Arrest (SCA) or Sudden Cardiac Death (SCD) is one of the most common causes of cardiac mortality in the world, accounting for about one-third of all cardiac deaths. If the danger of SCD can be detected at an early stage, it may be feasible to preserve the lives of patients by administering suitable treatment at the right time. The risk of SCD may be detected by analyzing the conventional 12-lead Electrocardiogram (ECG) data, which are available in most hospitals. Various studies have shown that differences in the shape of the ECG, particularly in the ST-T wave and QT segments, are directly associated with the risk of SCD and Ventricular Arrhythmias (VA). Some of these changes are so minute that they are not detectable just by looking at the ECG for a short period of time. As a result, advanced-level computerised ECG algorithms are needed for this new field of investigation. The single and multilead approaches used in this thesis are proved to be effective in the analysis of ST and QT segments. By using the multilead idea, the goal is to enhance the quantitative and qualitative performances of the currently existing methodologies.T-Wave Alternans (TWA) and the QT interval, two noninvasive SCD indicators, are investigated in depth in this study. For the categorization of MI and healthy people, a novel Stationary Wavelet (SWT) method is proposed. Multilead QT interval analysis is also carried out using three frank leads, designated as X, Y, and Z. Multilead and single-lead approaches are used to analyze patients with a variety of cardiac problems as well as healthy subjects. In addition, as a consequence of participation in the worldwide-level challenge, the methods for measuring the foetal QRS and QT intervals were explained in the dissertation. PhysioNet/CinC 2013 is a collaborative effort. Brief description of the work given in the thesis is provided in the paragraphs following the thesis. The creation of a multilead TWA detection idea is the first step in the process. Because of the limits of single-lead ECG analysis, which is lead dependent, a new multilead TWA detection is suggested to address these issues. For the purpose of translating the alternans-related information from the ST segment into a new signal known as the derived lead, the Principal Component Analysis (PCA) approach is utilized in this procedure. With the use of calibrated alternans records, the algorithm has been confirmed. Figure 1 represents the basic signal.Figure 1
Structure of ECG signal.In [11], the authors focus on determining the blockage and R-R interval to achieve with good accuracy. Systematic finding of QRS complex is essential to extract the R-R interval from the electrocardiogram recordings. To accurately analyze the cardiac rate variation, RR series plays a significant role and it is helpful to provide a quantitative evaluation of heart autonomic capacity in wellbeing and in sickness states [12]. In the past decades, wide collections of algorithm and techniques were used in understanding automatic regulation of heart beat. But the ECG recording may contain fictitious occurrences because of multiple disruptions like commotion interference in the signal, unexpected change in amplitude of QRS, and so on [13, 14]. Since there are so many methods for detecting a QRS signal as well as preventing its propagation, it is important to pick a method that works in real time and can handle big datasets while requiring little computational effort [15, 16]. In this study, the noise interference that is present in the electrocardiogram will be removed by handling preprocessing and then it is split up into samples by using the algorithm DCT-based DOST [17] and amplitude is computed in each interval. If there is any complication found in computing amplitude, it detects a block in such area. Initially it is of 100 hertz. It is split up into 5 intervals PQRST and amplitude is of 1 millivolt. Frequency is computed by f = 1/T and the next step involved in our work is feature extraction [18]. It helps to compute the mean and average of each interval and finally, Radial Basis Function Neural Network (RBFNN) is used to analogize the trained and test data. The data is collected from the MIT-BIH dataset. The collected information has normal dataset and abnormal dataset [19]. The trained and test dataset is analogized with the ratio 1 : 6 and the expected accuracy is met. The last objective of this work is to decide the perfect calculation for analogizing various classes of ECG oddities by quantitatively looking at the different QRS identification method to detect the blockage and R-R interval and delineating their failure instance [20, 21]. By this study, it achieves 98.5% accuracy.


## 2. Proposed Works

There are many databases accessible for public use, including the MIT-BIH arrhythmia database, which contains standard investigative material for the identification of cardiac arrhythmias. It has been in use since 1980 for the purposes of basic research and medical device development in the field of cardiac rhythm and associated illnesses.There are many databases accessible for public use, including the MIT-BIH arrhythmia database, which contains standard investigative material for the identification of cardiac arrhythmias. It has been in use since 1980 for the purposes of scientific research and medical device development in the field of cardiac rhythm and associated illnesses. The goal of creating the database is to develop automated arrhythmia detectors that read the variety of the signal and, on the basis of that, can perform automated cardiac diagnostics. The many intricacies of the ECG, such as the variation of the waveform of the pulse and the accompanying cardiac beat, as well as the baffling strength of artefacts and noise, combine to make signal analysis difficult. As a result, automation of the recording of the Electrocardiogram (ECG) signal is clear, and many publicly accessible databases exist that store the recorded ECG signal for future medical use. The MIT-BIH arrhythmia database is primarily utilized for medical and scientific purposes including the identification and analysis of various cardiac arrhythmias. It is the goal of this database to create a completely automated environment in which precise information may be obtained for the diagnosis of ventricular arrhythmias.Electrocardiograms (ECGs) are very popular because they are a low-cost and noninvasive method of examining the physiologic function of the heart. Initially developed in 1961, Holter introduced techniques for continuous recording of the ECG in ambulatory subjects for extended periods of time. The long-term ECG (Holter recording), which typically lasts 24 hours, has since become the standard technique for observing transient aspects of cardiac electrical activity.Since the mid-1970s, our research group has investigated irregularities in heart rhythm (arrhythmias) as seen in long-term electrocardiograms (ECGs), as well as automated approaches for detecting arrhythmias in real time. Other research groups in academia and business have pursued topics that are comparable to this one. Until 1980, anyone seeking to pursue such a career were required to gather their own information. Despite the fact that the recordings themselves are copious, access to this data is not ubiquitous, and comprehensive characterization of the recorded waveforms is a time-consuming and costly procedure. Aside from that, there is a great deal of variation in ECG rhythms and features of waveform morphology, both across subjects and within persons over time, and therefore a meaningful representative collection of long-term ECGs for study must comprise a large number of recordings.Development of automated arrhythmia analysis algorithms was slowed throughout the 1960s and 1970s due to a scarcity of data that could be accessed by all researchers. When doing such work, each group gathered its own collection of recordings and often utilized the same data that had been used to construct the algorithms in order to self-evaluate their algorithms. From the beginning, it was evident that the performance of these algorithms was inevitably data-dependent, and that the use of different data for the assessment of each algorithm made it impossible to make objective comparisons between algorithms belonging to various groups of algorithms.Data Collection and Selection. As soon as we realised we would require a suitable set of well-characterized long-term ECGs for our own research, we began collecting, digitising, and annotating long-term ECG recordings obtained by the Arrhythmia Laboratory of Boston’s Beth Israel Hospital (BIH; now known as the Beth Israel Deaconess Medical Center), which was established in 1975. However, we intended to make these recordings accessible to the wider research community from the beginning, in order to spur more study in this area and to promote rigorously repeatable and objectively comparable assessments of various methods [3]. We anticipated that the availability of a shared database would be a positive development.Our proposed system focuses on the blockage area to detect the R-R interval from the ECG signal. This DCT-DOST segmentation with adaptive threshold is used in this paper to determine the QRS complex andR peak from the recorded signals of the MIH-BIH database. The distortion in the ECG is filtered by a Gabor filter and therefore the QRS complex information was preserved. After denoising, the signal gets segmented into 256 constituent parts and the magnitude is found to compare with trained data. It is performed to identify the cardiac abnormality. The difference in the amplitude and time period of the ECG sample helps to analyse the abnormality. Nearly 50,000 samples of ECG signals were considered for analysis. The sampling frequency is split into 5 intervals to detect RR interval. The mean, variance, and entropy are evaluated to extract the features. Genetic algorithm is used to select significant features and is labelled with specific class. The R peak, segment length, and mean value have been identified for the underlying ECG signal and finally using the RBFNN classifier, the test data is analogized with the trained ECG signal.Figure2 represents the block diagram of proposed work.Figure 2
Block diagram of proposed work.


### 2.1. Preprocessing

Gabor filter is a type of linear filters whose response for impulse signal is characterized as a Gaussian function paired with a coherence function [22, 23]. The requirement of minimal space bandwidth product makes this filter highly suitable for our proposed work.Figure3 represents the frequency domain. To define the result of signal propagation in frequency domain, the unpredictable theory should surpass or equals the constant value.(1)ΔtΔf=c,where c is a constant, Δt,ΔfΔ is the time and frequency space measurement.Figure 3
Time and frequency domain.In 2D type, the time variablet is supplanted by spatial coordinates (x, y), and the frequency f is superseded by space variables u,v. In most cases, the 2D Gabor function is evaluated as follows:(2)gx,y=12πσg2exp−x2+y22σg2expj2πfxcosθ+ysinθ.In the frequency domain,(3)gu,v=exp−12u−w2σu2+v2σv2,where σu=1/2πσx and σv=1/2πσy, while the standard deviation of the elliptical Gaussian is represented as σxandσy in the x- and y-axes. For exact amplitude esteems, the DC values of a 2D Gabor filter were used to minimize the higher order harmonics. The formula used to calculate the filter parameter is(4)a=uhul−1/s−1,UO=Un/as−m,and σu is computed by using the equation(5)σu=a−1U0/a+12ln2.σv evaluated by using(6)σv=tanπ2kUn−2lnσu2Uh2ln2−2ln22σu2Uh21/2.Figure4 represents the Gabor filter in the proposed work.Figure 4
Gabor filter functionality.


### 2.2. DCT-DOST-Based Segmentation

This method uses the DCT-DOST scheme to examine the time domain representation of the ECG signal and to naturally distinguish the R peak. DFT rarely mentions the source signal in DOST. Through coefficient truncation, the signal in the case of DOST will lose its structure. With DCT, however, it is more resistant to the loss of coefficients. DCT is highly regarded as it includes all frequencies to reduce unpredictability. The advantages of DCT-DOST are that it blends vitality and shows essential coefficients at lower frequencies.The linear S transform fills the gap among Fourier and wavelet transforms. The S transfer of a signalh(t) is(7)sτ,f=f2π∫α−αhte−t−t2f2/2e−i2πftdt.Window’s width is expressed as(8)σf=T=1f.δτ,f0 is a 1D time function that demonstrates how the magnitude change with time for a fixed frequency. The DOST of h(KT) is(9)HjT,nNT=∑m=0N−1Hm+nNTGm,nei2πmj/N,where(10)Gm,n=e−2π2m2n2/n2,where n extends from 1, 2, …, N − 1.The proposed work’s main goal is to automatically find the peak value ofR. To detect the R peak in this proposed work, every heartbeat segment is assumed to consist of 105 patterns prior to the R top identification and 151 patterns were generated after the retrieval of R peak. A sum of 256 patterns were taken to find the extension of cardiac pulse. The advantage of determining the length of every cardiac pulse is to accurately detect the R top corresponding to P and T signs due to its minimum magnitude and are noise sensitiveness. Figure 5 represents the R peak detection using DCT.Figure 5
R peak detection using DCT-DOST.After the retrieval of noiseless image, DCT-DOST approach is applied for performing operation and the peak identification is performed. Initially the sample frequency is of 100 hertz. It is split up into five intervals to accurately locate the R-R interval. DCT is chosen because of the following reason. It is a true value transformation, and it is strategically placed in space to reduce the amount of time required. It does not include any negative frequency. Only positive frequencies are used, and there is no symmetry coefficient as a result, higher frequencies are needed to convert to frequency space during segmentation. Since the DCT-DOST contains no negative frequencies, the frequency width for any signal of length 2N is as follows:(11)N1=1,Ni=2i−2,for2≤i≤N−1.The DCT-DOST method is as follows.Algorithm 1: DCT-DOST method.
(i)
Y = dct(y);(ii)
z = 0(iii)
For cyin[1, 2, 3, …];(iv)
Y[z, z+(z−1)]; idct(y[z; z + cz−1]);(v)
end(vi)
returnyInitially, the info ECG signal propagates via N point DCT. This level produces the coefficientsA1,A2, … , An. The acquired coefficients are split into subbands [20, 21, 22, ……2n−1]. For each subband, β point inverse DCT operation is performed to ensure the β bandwidth that is generated in the frequency and decomposition is perpendicular.Figure6 shows input ECG signal example.Figure 6
Input ECG signal.


### 2.3. Feature Extraction

In ECG signal, feature extraction helps to figure out the amplitude and interval values of P-QRS-T segment present in the ECG signal. The primary goal of this suggested work is to identify the R-R interval and extract the transitory and morphological highlights from the data. By utilising highlight extraction, 19 transient highlights including PQ, RR, and PT interim and 3 morphological highlights were extricated from the ECG signal. Figure7 represents the feature extraction of the proposed work.Figure 7
Working of feature extraction.The maximal and minimal points of each beat of the ECG signal were captured using morphological highlights. The equation is(12)ft=ft−mintmaxt−mint.The least value and most value point were figured out in the firstR peak and the next R peak and then it normalized by taking the esteems between 0 and 1.Feature describing the position ofP, Q, R, S, T peak and QRS duration has been computed by using the initial position of the Q-wave to the end of the S-wave. The QRS complex is computed, which has a significant role in the detection of abnormality.


### 2.4. Algorithm Used to Compute Duration of QRS Complex

(i)
Step 1: Read the signal.(ii)
Step 2: Identify the duration of QRS complex waveform.(iii)
Step 3: Execute the wavelet analysis.(iv)
Step 4: Calculate the coefficients by using wavelet decomposition.(v)
Step 5: IdentifyR peak location in the signal by taking 60% of its value as threshold.(vi)
Step 6: IdentifyQ point by finding the smallest value ranging from Rloc − 50 to Rloc − 10.(vii)
Step 7: IdentifyS point by finding the smallest value ranging from Rloc + 5 to Rloc + 50.(viii)
Step 8: IdentifyT point by finding the highest value ranging from Rloc + 25 to Rloc + 100.(ix)
Step 9: Compute the duration of QRS complex by using the equation(13)QRSi,j=ceilSOFFi,j−QONi,j.(x)
Step 10: FindX = QRS.False negative detection of QRS complex is carried out by using the following.(a)
Premature ventricular complexes(b)
Low amplitudeFalse positive detection is carried out by using the following.(a)
Negative QRS complexes(b)
Low SNRThis QRS algorithm is helpful to extract the R-R interval. It was performed by using heart rate variability (HRV). It is defined as the interval among two successiveR peaks. The R-R interval was computed by using the equation(14)rri=rri+1−ri;1,2,…,m−1.where r(i) is the peak time of ith wave.Figure8 represents the structure of genetic algorithm. The next step was to reduce the number of features. It is done with the aid of a genetic algorithm. Recently, there has been a surge in the use of genetic algorithms to reduce enhancement issues. This algorithm is used in high-complexity executions and large sets of arrangements. It was utilized to improve the features for identifying ECG signals. It assists in extracting the most desirable characteristics and is incorporated into the following generation. The next generation would choose the best conditions, while the others would be ignored. It begins to repeat and build a population by producing a new population at each stage through selection, crossover, and mutation and then continues in this manner.Figure 8
Structure of genetic algorithm.And finally, it applies a fitness function, which is computed by(15)f.f=1n∑i=1nt−out.n stands for the number of outputs, t stands for the goal output, and out stands for the actual output. Positive and negative values may be present in the fitness function. As a result, we cannot use fitness benefit directly. The selection operator is used to identify the best features associated with the highest fitness value and passes them over to the next generation. The crossover operator swaps the selected individuals chromosomes to produce offspring chromosomes.(16)Chromosomeireproduce=fxi∑k=10fxk.The final operator is then used to notify the bits in the chromosome. The probability that the chromosome in thenth position will be estimated is calculated using(17)Pn=N−N+1∑i=1Ni.The GA algorithm aids in the optimization of neural network results, and it works well to achieve high precision, sensitivity, and specificity, as well as providing output with better classification. The classification is performed by RBFNN.


### 2.5. Radial Basis Function Neural Network

RBFNN is a function that is used in time series prediction, classification, and approximation of function. It can be used for any type of model, including linear and nonlinear, as well as any network. The three layers are input layer, hidden layer, and output layer. The input to the hidden layer is converted nonlinearly by the hidden layer. The hidden layer’s activation is combined in a linear way by the output layer. The input layer is represented as anx∈Rn vector of real numbers. The network’s result is Rn⟶R, which is given by(18)φx=∑i=1Naixx−ci,where the neurons present in the hidden layer are represented as N, Ci is the centre vector, and ai is the neuron’s weight. The parameters ai, ci, and βi aid in optimizing the fitness between φ and the signal. Figure 9 represents the RBNN network.Figure 9
RBFNN network.A typical RBF of the scalar input vector that is a first layer is(19)hx=exp−x−c2r2.Normalized and denormalized forms of the generated input are also possible. But it is discovered to be in a nonnormalized state. The equation is(20)φx=∑i=1Naiρx−ci∑i=1Nρx−ci,where(21)ux−ci=ρx−ci∑j=1Nρx−ci.This input layer expression can also be expressed as(22)φx=∑i=12N∑j=1neijvijx−ci,where(23)eij=ai,ifi∈1,N,bij,ifi∈N+1,2N,vijx−ci=δijρx−ci,ifi∈1,N,xij−cijρx−ci,if∈N+1,2N.In the denormalized form,(24)vijx−ci=δijux−ci,ifi∈1,N,xij−cijux−ci,ifi∈N+1,2N.In the normalized form,(25)δij=1,ifi=j,0,ifi≠j.The probability density function among the input and the output layer is estimated as(26)px=∫pxΔydy=1N∑i=1Nρx−ci.The outputy given an input x is(27)φx=Ey|x=∫yPy|xdy,where the conditional probability of y given x is denoted as P(y|x).For performing classification, training and test datasets are obtained from MIT-BIH database, which has both normal and patient datasets [24]. Nearly 80% of data are chosen for training and 20% was considered for testing. The training dataset is represented as n pairs using the below equation:(28)T=xi,yii=1p.The output of the training dataset isYi, and time prediction is done by predicting the successive value and features of a sequence:(29)…,yt−3,yt−2,yt−1,….


## 2.1. Preprocessing

Gabor filter is a type of linear filters whose response for impulse signal is characterized as a Gaussian function paired with a coherence function [22, 23]. The requirement of minimal space bandwidth product makes this filter highly suitable for our proposed work.Figure3 represents the frequency domain. To define the result of signal propagation in frequency domain, the unpredictable theory should surpass or equals the constant value.(1)ΔtΔf=c,where c is a constant, Δt,ΔfΔ is the time and frequency space measurement.Figure 3
Time and frequency domain.In 2D type, the time variablet is supplanted by spatial coordinates (x, y), and the frequency f is superseded by space variables u,v. In most cases, the 2D Gabor function is evaluated as follows:(2)gx,y=12πσg2exp−x2+y22σg2expj2πfxcosθ+ysinθ.In the frequency domain,(3)gu,v=exp−12u−w2σu2+v2σv2,where σu=1/2πσx and σv=1/2πσy, while the standard deviation of the elliptical Gaussian is represented as σxandσy in the x- and y-axes. For exact amplitude esteems, the DC values of a 2D Gabor filter were used to minimize the higher order harmonics. The formula used to calculate the filter parameter is(4)a=uhul−1/s−1,UO=Un/as−m,and σu is computed by using the equation(5)σu=a−1U0/a+12ln2.σv evaluated by using(6)σv=tanπ2kUn−2lnσu2Uh2ln2−2ln22σu2Uh21/2.Figure4 represents the Gabor filter in the proposed work.Figure 4
Gabor filter functionality.


## 2.2. DCT-DOST-Based Segmentation

This method uses the DCT-DOST scheme to examine the time domain representation of the ECG signal and to naturally distinguish the R peak. DFT rarely mentions the source signal in DOST. Through coefficient truncation, the signal in the case of DOST will lose its structure. With DCT, however, it is more resistant to the loss of coefficients. DCT is highly regarded as it includes all frequencies to reduce unpredictability. The advantages of DCT-DOST are that it blends vitality and shows essential coefficients at lower frequencies.The linear S transform fills the gap among Fourier and wavelet transforms. The S transfer of a signalh(t) is(7)sτ,f=f2π∫α−αhte−t−t2f2/2e−i2πftdt.Window’s width is expressed as(8)σf=T=1f.δτ,f0 is a 1D time function that demonstrates how the magnitude change with time for a fixed frequency. The DOST of h(KT) is(9)HjT,nNT=∑m=0N−1Hm+nNTGm,nei2πmj/N,where(10)Gm,n=e−2π2m2n2/n2,where n extends from 1, 2, …, N − 1.The proposed work’s main goal is to automatically find the peak value ofR. To detect the R peak in this proposed work, every heartbeat segment is assumed to consist of 105 patterns prior to the R top identification and 151 patterns were generated after the retrieval of R peak. A sum of 256 patterns were taken to find the extension of cardiac pulse. The advantage of determining the length of every cardiac pulse is to accurately detect the R top corresponding to P and T signs due to its minimum magnitude and are noise sensitiveness. Figure 5 represents the R peak detection using DCT.Figure 5
R peak detection using DCT-DOST.After the retrieval of noiseless image, DCT-DOST approach is applied for performing operation and the peak identification is performed. Initially the sample frequency is of 100 hertz. It is split up into five intervals to accurately locate the R-R interval. DCT is chosen because of the following reason. It is a true value transformation, and it is strategically placed in space to reduce the amount of time required. It does not include any negative frequency. Only positive frequencies are used, and there is no symmetry coefficient as a result, higher frequencies are needed to convert to frequency space during segmentation. Since the DCT-DOST contains no negative frequencies, the frequency width for any signal of length 2N is as follows:(11)N1=1,Ni=2i−2,for2≤i≤N−1.The DCT-DOST method is as follows.Algorithm 1: DCT-DOST method.
(i)
Y = dct(y);(ii)
z = 0(iii)
For cyin[1, 2, 3, …];(iv)
Y[z, z+(z−1)]; idct(y[z; z + cz−1]);(v)
end(vi)
returnyInitially, the info ECG signal propagates via N point DCT. This level produces the coefficientsA1,A2, … , An. The acquired coefficients are split into subbands [20, 21, 22, ……2n−1]. For each subband, β point inverse DCT operation is performed to ensure the β bandwidth that is generated in the frequency and decomposition is perpendicular.Figure6 shows input ECG signal example.Figure 6
Input ECG signal.


## 2.3. Feature Extraction

In ECG signal, feature extraction helps to figure out the amplitude and interval values of P-QRS-T segment present in the ECG signal. The primary goal of this suggested work is to identify the R-R interval and extract the transitory and morphological highlights from the data. By utilising highlight extraction, 19 transient highlights including PQ, RR, and PT interim and 3 morphological highlights were extricated from the ECG signal. Figure7 represents the feature extraction of the proposed work.Figure 7
Working of feature extraction.The maximal and minimal points of each beat of the ECG signal were captured using morphological highlights. The equation is(12)ft=ft−mintmaxt−mint.The least value and most value point were figured out in the firstR peak and the next R peak and then it normalized by taking the esteems between 0 and 1.Feature describing the position ofP, Q, R, S, T peak and QRS duration has been computed by using the initial position of the Q-wave to the end of the S-wave. The QRS complex is computed, which has a significant role in the detection of abnormality.


## 2.4. Algorithm Used to Compute Duration of QRS Complex

(i)
Step 1: Read the signal.(ii)
Step 2: Identify the duration of QRS complex waveform.(iii)
Step 3: Execute the wavelet analysis.(iv)
Step 4: Calculate the coefficients by using wavelet decomposition.(v)
Step 5: IdentifyR peak location in the signal by taking 60% of its value as threshold.(vi)
Step 6: IdentifyQ point by finding the smallest value ranging from Rloc − 50 to Rloc − 10.(vii)
Step 7: IdentifyS point by finding the smallest value ranging from Rloc + 5 to Rloc + 50.(viii)
Step 8: IdentifyT point by finding the highest value ranging from Rloc + 25 to Rloc + 100.(ix)
Step 9: Compute the duration of QRS complex by using the equation(13)QRSi,j=ceilSOFFi,j−QONi,j.(x)
Step 10: FindX = QRS.False negative detection of QRS complex is carried out by using the following.(a)
Premature ventricular complexes(b)
Low amplitudeFalse positive detection is carried out by using the following.(a)
Negative QRS complexes(b)
Low SNRThis QRS algorithm is helpful to extract the R-R interval. It was performed by using heart rate variability (HRV). It is defined as the interval among two successiveR peaks. The R-R interval was computed by using the equation(14)rri=rri+1−ri;1,2,…,m−1.where r(i) is the peak time of ith wave.Figure8 represents the structure of genetic algorithm. The next step was to reduce the number of features. It is done with the aid of a genetic algorithm. Recently, there has been a surge in the use of genetic algorithms to reduce enhancement issues. This algorithm is used in high-complexity executions and large sets of arrangements. It was utilized to improve the features for identifying ECG signals. It assists in extracting the most desirable characteristics and is incorporated into the following generation. The next generation would choose the best conditions, while the others would be ignored. It begins to repeat and build a population by producing a new population at each stage through selection, crossover, and mutation and then continues in this manner.Figure 8
Structure of genetic algorithm.And finally, it applies a fitness function, which is computed by(15)f.f=1n∑i=1nt−out.n stands for the number of outputs, t stands for the goal output, and out stands for the actual output. Positive and negative values may be present in the fitness function. As a result, we cannot use fitness benefit directly. The selection operator is used to identify the best features associated with the highest fitness value and passes them over to the next generation. The crossover operator swaps the selected individuals chromosomes to produce offspring chromosomes.(16)Chromosomeireproduce=fxi∑k=10fxk.The final operator is then used to notify the bits in the chromosome. The probability that the chromosome in thenth position will be estimated is calculated using(17)Pn=N−N+1∑i=1Ni.The GA algorithm aids in the optimization of neural network results, and it works well to achieve high precision, sensitivity, and specificity, as well as providing output with better classification. The classification is performed by RBFNN.


## 2.5. Radial Basis Function Neural Network

RBFNN is a function that is used in time series prediction, classification, and approximation of function. It can be used for any type of model, including linear and nonlinear, as well as any network. The three layers are input layer, hidden layer, and output layer. The input to the hidden layer is converted nonlinearly by the hidden layer. The hidden layer’s activation is combined in a linear way by the output layer. The input layer is represented as anx∈Rn vector of real numbers. The network’s result is Rn⟶R, which is given by(18)φx=∑i=1Naixx−ci,where the neurons present in the hidden layer are represented as N, Ci is the centre vector, and ai is the neuron’s weight. The parameters ai, ci, and βi aid in optimizing the fitness between φ and the signal. Figure 9 represents the RBNN network.Figure 9
RBFNN network.A typical RBF of the scalar input vector that is a first layer is(19)hx=exp−x−c2r2.Normalized and denormalized forms of the generated input are also possible. But it is discovered to be in a nonnormalized state. The equation is(20)φx=∑i=1Naiρx−ci∑i=1Nρx−ci,where(21)ux−ci=ρx−ci∑j=1Nρx−ci.This input layer expression can also be expressed as(22)φx=∑i=12N∑j=1neijvijx−ci,where(23)eij=ai,ifi∈1,N,bij,ifi∈N+1,2N,vijx−ci=δijρx−ci,ifi∈1,N,xij−cijρx−ci,if∈N+1,2N.In the denormalized form,(24)vijx−ci=δijux−ci,ifi∈1,N,xij−cijux−ci,ifi∈N+1,2N.In the normalized form,(25)δij=1,ifi=j,0,ifi≠j.The probability density function among the input and the output layer is estimated as(26)px=∫pxΔydy=1N∑i=1Nρx−ci.The outputy given an input x is(27)φx=Ey|x=∫yPy|xdy,where the conditional probability of y given x is denoted as P(y|x).For performing classification, training and test datasets are obtained from MIT-BIH database, which has both normal and patient datasets [24]. Nearly 80% of data are chosen for training and 20% was considered for testing. The training dataset is represented as n pairs using the below equation:(28)T=xi,yii=1p.The output of the training dataset isYi, and time prediction is done by predicting the successive value and features of a sequence:(29)…,yt−3,yt−2,yt−1,….


## 3. Results and Discussion

The proposed ECG classification method discussed in this paper is implemented in MATLAB to analyze ECG signals. The proposed methodology is implemented in MATLAB and the MIT-BIH dataset is used to validate [24]. The RBFNN classifier is trained with the data from the previous section, and its performance is evaluated using the sample ECG signal as an example. The expected performance for the ECG signals at each subsequent stage of the proposed method is exhibited for detailed analysis. The ECG specimen image taken for analyzing has been elaborated for 50,000 samples. One of the sample ECG signals is shown in Figure 10.Figure 10
Input ECG signal.The process of the proposed methodology starts with filtering of noises using Gabor filter. The two types of noises in the ECG signal are high-frequency noises such as electromyogram noise and Gaussian noise and low-frequency noises like baseline wandering, and power line interference causes misinterpretation [25]. To eliminate all these noises, orientation-specific encoding schemes like Gabor filter is used for analyzing the texture features of ECG signal. Analogous to input signal, the output of Gabor is more precise and accurate [26].Figure11 represents the Gabor filter output. For further processing with minimum data redundancy and to constraint the dataset integration, the filtered output is normalized.Figure 11
Gabor filter output.The distance between theR-peak values is estimated by finding the absolute values, as shown in Figure 12.Figure 12
R-peak values estimation.When the heart’s electrical function is assumed as a vector, it is easy to analyze the trajectory of the vectors peak. The signal ECG is considered as projection of the heart’s electrical vector on the corresponding lead vector as a time function (amplified by the absolute magnitude of the lead vectors). It is depicted in Figure13 below.Figure 13
Estimation of absolute value in ECG signal.Generally, the coefficients are dispersed based on the bandwidth. The energies in the ECG signal are gathered together using DCT-DOST so as to represent the most important coefficient at the low frequency. The features that are extracted using the DCT-DOST approach indicate the time-recurrence attributes of the ECG signal and are unsymmetrical in nature. Also the peak values in QRS polarity and the unexpected variations in QRS amplitude are detected. Figure14 represents the energy results.Figure 14
Output of DCT-DOST approach.The traditional filtering minimizes signal noise by delaying the QRS components. As QRS complex represents the ventricular activity of heart, it is necessary to preserve them. The zero-phase filtering minimizes phase distortion and provides a compromise among filtering and data retention. The output of the zero-phase filter is depicted in Figure15.Figure 15
Output of zero-phase filter.It is composed of 112 patterns before theR top occurs and 144 patterns after the R top occurs; an aggregate of 256 patterns are chosen to find the length of every occasion relating to window size. The ECG portion is composed of 112 patterns before the R top occurs and 144 patterns after the R top occurs. The duration of each event is determined in order to condense the great majority of the data collected in relation to each cardiac event as much as possible. The benefit of establishing the duration of each heart event is that it allows you to discover the R top with more precision when compared to the P and T waves, which have a low magnitude and are vulnerable to turbulence. Those uneven time-recurrence coefficients must be processed for the ECG signal in order to describe their morphological characteristics, which are then employed for further investigation. As illustrated in Figure 16, the DCT-DOST segmentation method produced the following results.Figure 16
Segmented output of sample ECG signal.The moving average filter is dedicated to removing high-frequency noises from the ECG signal by computing the running mean on the predetermined window length. This is a moderately straightforward estimation that will smoothen both the signal and its anomalies. TheR top in the ECG sign is smoothed to around 33% of its unique height. The low-frequency contents of the ECG signal are represented in Figure 17.Figure 17
Output of moving average filter.The QRS wave of the ECG is detected using zero crossing point detection approach. The dominant and low-frequency contents in the ECG are roughly estimated. Ideally the number of zero crossing points should be low for QRS, while it can be high at other times. The number of zero crossing points is used to determine the QRS with low computational cost. Figure18 represents the zero crossing output.Figure 18
Zero crossing detector output.TheR top in the QRS interim is the most significant component for examining the ECG signal. R top discovery in ECG is a strategy that is generally used to analyze heart anomalies and gauge pulse fluctuation. It is natural that the magnitudes of genuine R tops are more than those for bogus pinnacles. The primary request separation of the sign is utilized to store the incline data of the genuine pinnacles yet diminishes the slant data of the bogus pinnacles. The proposed strategy can proficiently recognize R tops under different conditions like pattern float, uproarious sign, tall T waves, or a quite delayed waves. Figure 19 represents the peak detection.Figure 19
R-peak detection.To detect ischemia, the slope index is preferred, which outperforms the higher recurrence index model of the bandpass filtered QRS signal as the average relative factor of variation is much higher. The superior performances can be achieved with the slope index when compared with the high recurrence index. This is depicted in Figure20.Figure 20
Slope identification of ECG.The QRS detection ensures the efficient extraction of beat interval and the abnormalities in the heart function. The improvement in the QRS sections is executed by the proposed technique to eliminate the pattern meandering. In this paper, the QRS fiducial focuses are detected to perceive theR point using QRS complex so that heart function classification can be accomplished simultaneously. Figure 21 represents the QRS detection.Figure 21
Detection of QRS using the proposed method.The RR-interim is resolved to obtain the dynamic qualities of the ECG signal. The 4 RR attributes that are discussed in this paper are pre-RR, post-RR, neighborhood RR, and mean RR interim. The interim between a pastR top and the present R top is processed to find the pre-RR attribute, while the interim between a specific R top and the successive R top is estimated to find the post-RR highlight. The combined features of the pre- and post-RR interim represent the momentary cadence characteristics. The mean RR interim features are determined by averaging the RR interims of the previous 3-minimum RR interval of a specific occasion. Figure 22 represents the RR interval.Figure 22
Identification of RR interval.Similarly, the neighborhood RR features are inferred by averaging all the RR-interims of the previous episodes of a specific occasion [27]. The neighborhood and mean highlights indicate the mean qualities. These 4 highlights are connected to the morphological list of the ECG signal.The proposed method’s performance is compared with the traditional methods such as CNN and SVM. With a maximum accuracy of 98.5% for different numbers of test samples, our system outperforms the competition [28]. The proposed method’s reliability is guaranteed since its efficiency is consistently high and without compromise. Figure 23 represents the accuracy comparison.Figure 23
Accuracy comparison of different methods.The sensitivity shows the true positive value of the classification. It is calculated as the percentage of positives that are correctly categorised [29]. With a maximum sensitivity of 98.3%, it outperforms the current system, while CNN and SVM have maximum sensitivity of 92 percent and 86 percent, respectively. Figure 24 illustrates the sensitivity relation. Figure 24 represents the sensitivity comparison.Figure 24
Sensitivity comparison.The proposed method’s specificity values change in a zig-zag pattern as the number of samples increased [30], with a maximum specificity of 99% for the proposed method and 93 percent and 95.6 percent for CNN and SVM classifiers, respectively [31].Figure25 represents the comparison of specificity. The measure of various contents in the ECG signal [32] such as class, sinus rhythm, artifact, ventricular tachycardia, atrial fibrillation, bigeminy, and PVC is computed in terms of R, P, S, and F1. From the comparison table, it is clear that the estimation [33] by the proposed RBFNN is more than the conventional methods. Table 1 represents the accuracy comparison [34].Figure 25
Comparison of specificity.Table 1
Comparison of aggregate accuracy.
Aggregate accuracy comparisonModelTraining (%)Validation (%)Test (%)Baseline—LSTM66.866.365.6Baseline—CNN68.672.268.8Stacked unidirectional—LSTM80.578.179.2Stacked bidirectional—LSTM82.279.580.2Stacked unidirectional—LSTM80.479.479.3Deep residual—CNN84.775.374.7Combined unidirectional LSTM—CNN83.477.779.6Combined bidirectional LSTM—CNN93.274.876.8Proposed RBFNN9984.498.5The training, validation, and testing efficiencies of the proposed method are compared with conventional methods. The training efficiency of our method is much higher than the other methods [35]. Table 2 represents the classification metrics.Table 2
Comparison of classification metrics.
RhythmBDLSTMResidualLSTM-CNNProposed RBFNNClassRPSF1RPSF1RPSF1RPSF1Sinus rhythm0.820.830.940.840.640.880.860.760.790.800.950.790.850.870.960.89Artifact/noise0.880.820.940.830.890.970.940.820.810.830.940.810.890.850.920.84Ventricular tachycardia0.160.510.950.260.480.920.960.080.560.570.970.430.550.340.940.67Atrial fibrillation0.810.830.940.820.780.930.920.760.730.690.890.840.880.810.970.81Bigeminy0.720.650.820.670.890.980.980.160.670.670.960.550.840.830.910.80PVC0.780.760.880.760.780.930.930.830.790.770.920.720.810.820.950.89From Table3, the overall F1 score of the proposed method is 90.2%, which is more the existing methods in which the least performance is shown by the residual method [36].Table 3
F1 score class comparison.
F1 score class comparisonRhythm classBDLSTMResidualLSTM-CNNProposed RBFNNSinus rhythm0.8120.7340.7930.883Artifact/noise0.8340.8180.8430.923Ventricular tachycardia0.2650.1690.4170.721Atrial fibrillation0.8370.7630.7640.852Bigeminy0.6630.1360.5530.754PVC0.7690.8210.7240.912Overall0.8130.7280.7420.902By concatenating the classification methods, the performance can be improved, which is shown in Table4.Table 4
F1 score class comparison.
F1 score class comparisonRhythm classBDLSTMResidualLSTM-CNNProposed RBFNNMultiSingleMultiSingleMultiSingleMultiSingleSinus rhythm0.8120.6120.7340.6920.7930.7020.8830.813Artifact/noise0.8340.7340.8180.7460.8430.7740.9230.874Ventricular tachycardia0.2650.0650.1690.0850.4170.1450.7210.835Atrial fibrillation0.8370.3370.7630.7970.7640.7170.8520.857Bigeminy0.6630.2630.1360.0730.5530.5230.7540.873PVC0.7690.6690.8210.7090.7240.7090.9120.879


## 4. Conclusion

Our proposed work enhances the diagnosis accuracy by eliminating the redundant and noise highlights. The algorithm presented here provides sensitivity and accuracy above 98.5%. These are computationally facile algorithm that can be applied for practical application and aids in processing of a massive set of databases. By this work, the objective gets achieved and the artifacts can be detected by analogizing with the results from the algorithm for additional analysis. It gives better acknowledgement exactness when compared with various other existing frameworks. In defining the path of development of arrhythmia detectors, the experience of the last 20 years, since the release of the MIT-BIH Arrhythmia Database and the AHA Database soon afterwards, may be considered a big experiment in shaping the direction of development. Performance statistics were of little or no value until databases became available, because it was widely accepted that each manufacturer designed its products using its own data and designed its statistics to present the products in a favourable light, so performance statistics were of little or no value until databases became available. The temptation to match their rivals’ products feature for feature, rather of investing time and money on enhancements that could not be measured and hence did not add perceived value to the product, challenged conscientious developers who attempted to increase the accuracy of their algorithms.Was the experiment a success or a failure, and what were the outcomes? The introduction of databases in the early 1980s signaled a sea shift in the development community’s efforts. End users and regulatory bodies started to inquire of manufacturers about the effectiveness of their gadgets when subjected to conventional testing. Manufacturing companies could not avoid doing the tests and reporting the results, and those whose algorithms did not perform as well as their rivals spent their development expenditures on focused attempts to enhance performance.As a result of the availability of databases, the overall level of performance of commercial arrhythmia detectors has increased significantly in recent years.Although it would be incorrect to suggest that manufacturers were capable of producing significantly better products in the late 1970s and instead chose to add bells and whistles in response to their customers’ apparent lack of interest in performance, it is possible to infer this from the fact that manufacturers were capable of producing significantly better products in the late 1970s.



---

*Source: 7194419-2022-04-13.xml*