Telemedicine has been widely studied recently. In past research, allowing congestive heart failure patients to monitor their condition at home offered great economic advantages. Electrocardiograms (ECGs) are an important tool that provide useful information about the functional status of the heart. An automated method that accurately diagnoses cardiac diseases through the analysis of ECG signals is critical in healthcare [1
], especially for real-time processing. Past research has addressed the problems of heart rate detection and classification of cardiac rhythms. The heart rate signal detects the QRS wave of the ECG and calculates inter-beat intervals [2
]. The classification of cardiac rhythms is based on the detection of the different types of arrhythmia from the ECG waveforms [10
However, ECG signals have coupling noises, due to factors such as 50/60 Hz power line signals, the baseline drift caused by patient breathing, bad electrodes, improper electrode location, or electromyograms. These noises result in false QRS wave detections. Thus, some studies have compared the robust performance of different algorithms for QRS wave detection [2
]. Widrow et al.
applied the adaptive filter to reduce noises that resulted from 60 Hz power lines and baseline drift, and then detect the QRS wave [14
]. Pan and Tompkins designed a digital filter to reduce the noise and used a dynamic threshold to detect the QRS wave [4
]. Trahanias used the mathematical morphology of the QRS complex to detect heart rates [5
]. Chang used the ensemble empirical model decomposition to reduce noises in arrhythmia ECGs [15
]. Fan used approximate entropy (ApEn) and Lempel-Ziv complexity as a nonlinear quantification to measure the depth of anaesthesia [16
]. In these studies, the normal sinus ECG signal added different noise types and energy was used to evaluate the performance of these algorithms. Several researchers have extracted the features of ECG waveforms to detect the QRS complexes based on the arrhythmia database. Li et al.
proposed the wavelet transforms method for detecting the QRS complex from high P or T waves, noise, and baseline drift [6
]. Yeh and Wang proposed the difference operation method to detect the QRS complex waves [8
]. Mehta and Lingayat used the support vector machine (SVM) method to detect the QRS complexes from a 12-leads ECG [9
]. They also used the K-mean algorithm for the detection of QRS complexes in ECG signals [17
Arrhythmia can be defined as either an irregular single heartbeat or a group of heartbeats. Some classification techniques are based on the ECG beat-by-beat classification with each beat being classified into several different arrhythmic beat types. These include artificial neural networks [11
], fuzzy neural networks [18
], Hermite functions combined with self-organizing maps [19
], and wavelet analysis combined with radial basis function neural networks [20
]. In these methods, the ECG waveform of each beat was picked up manually and different features were extracted to classify the arrhythmic types. Tsipouras et al.
used the RR-interval signal to classify certain types of arrhythmia based on a group of heartbeats [12
]. All the above methods have high classification accuracies that were obtained based on the complete morphology of the ECG or the correct RR-interval that was detected manually.
In this study, we propose an automatic configuration integrating digital signal processing and an artificial intelligence method to detect the position of heartbeats and recognize these heartbeats as belonging to the normal sinus rhythm (NSR) or four arrhythmic types. The four arrhythmic types are premature ventricular contraction (PVC), premature atrium contraction (PAC), left bundle branch block (LBBB), and right bundle branch block (RBBB). ECG signals are provided by the MIT-BIH Arrhythmia Database [21
]. This automatic configuration had three steps, as follows:
The Lead II signals were normalized and filtered to reduce the coupled noise (Section 2.2).
The positions of QRS-complexes in Lead II were detected and marked via a well-trained SVM. Two waveforms of each heartbeat in Lead II and V1 were individually extracted according the markers in Lead II (Section 2.3).
The extracted waveform was used as a feature to recognize the arrhythmic type of a heartbeat. In this configuration, a self-constructing neural fuzzy inference network (SoNFIN) was used to recognize the arrhythmic type of the heartbeat using the raw Lead II and V1 signals (Section 2.4).
Moreover, the heartbeat detection accuracy has been increased by the SoNFIN classification results.
3. Results and Discussion
In heartbeat marking results, Figure 3
shows the markers of ECG heartbeats for four types (NSR, PVC, LBBB, and RBBB). In Figure 3(a)
, since the NSR has a standard QRS complex, the range of the marker includes a full QRS complex. In Figure 3(b)
, the PVC beat has an inverse QRS complex. The marker only happens in the position of the positive peak. For LBBB case, the Q-wave was lost and there were two neighboring positive peaks in one beat as shown in Figure 3(c)
. Therefore, post-processing did the merging function for this situation. Table 2
shows the number of correct markers (TP), missing markers (FN), and mistaken markers (FP) in all files. There were a total of 22 missing markers and 572 mistaken markers from all files. The FN ratio was 0.17%, the FP ratio was 4.48%.
Classification results of the SoNFIN have two conditions. The first condition doesn't care about the the FN and FP of the heartbeat detection. Figure 4
shows the marked and classified results for the subject of file number 212. It has continuous LBBB beats and NSR beats. In Figure 5
, the subject in file number 221 has discrete PVC beats in the continuous NSR beats. Figure 6
shows continuous PVC beats in the RBBB beats for the subject in file number 231. The classified test results are shown in Table 3
, where each cell contains the raw number of exemples classified for the corresponding combination of desired and actual outputs. In this table, 9,189 beats were correctly classified to NSR, 684 beats were correctly classified to PVC, 1,287 beats were correctly classified to RBBB, and 1,419 beats were correctly classified to LBBB. The classification performances of SoNFIN were examined based on sensitivity, specificity, and total classification accuracy. The sensitivity was the number of TP divided by the number of actual positive cases. Specificity was the number of TN divided by the number of actual negative cases.
Total classification accuracy was the number of correct decisions divided by the total number of cases. Table 3
showed the sensitivity, specificity, and averaged accuracy. Under these conditions, the average accuracy was 98.8%. In a real scenario, the FN and FP of the heartbeat detection must happen. Therefore, the second condition was to classify all marked waves including 572 false heartbeats. The output value of the false heartbeat would be higher than that of a truthful heartbeat. Thus, we designed a threshold, 2.5, to determine the false heartbeats belonging to the noise, as shown in Table 4
. The false heartbeats were reduced to 301. The classification accuracy is only 96.4%. Moreover, the specificity of false heartbeat is 100% in heartbeat classification, and the FP also decreased to 2.4% in heartbeat detection.
The digital processing method for determining heartbeats in real time was to enhance the QRS complex of a one-lead ECG signal with a differential method and set a threshold to find the position of the R-wave [2
]. In enhancing QRS complex waves, non-differential methods like Hilber transform [29
], wavelet transform [6
], moving averaging incorporating with wavelet [30
], principle component analysis [31
], and Karhunen-Loève transform [32
] were used. Recently, Mehta et al.
used the SVM method [9
] and K-mean algorithm [17
] for 12 lead ECG signals to detect heartbeats. SVM found a hyperplane for separating the maximum margin of the classified set. Mehta and Lingayat used 1,488 heartbeats to evaluate the performance of their algorithm [9
]. Since the SVM method easily marked the larger P or T waves as the heartbeats, Mehta's method had 24 mistaken markers and four missing markers. Moreover, they used 12 lead ECG signals to detect the heartbeats, which was easier than using a one-lead ECG signal. The measurement of 12 lead ECG signals was not suitable for a real-time or portable system.
The significance of our study can be summarized as follows: we only used one-lead ECG, Lead II and its differential signal, as the input to mark QRS complexes. The proposed scheme was suitable for a portable system. A total of 12,776 heartbeats were used to test the performance of our scheme. The hyperplane of SVM in the two dimensions worked as a threshold to detect the QRS complex. Therefore, the deletion and merging processes were used to reduce the mistaken markers that occurred from noises or cardiac diseases. The results showed that the sensitivity of our method is 99.8%, the FN ratio is 0.17%, and the FP ratio is 4.48%. When all marked waves were classified by SoNFIN, the larger P waves, T waves, or noises could be filtered. Thus, the number of mistaken markers decreased to 301. The FP decreased to 2.4%, and the accuracy was increased to 97.5%. Table 5
displays the comparison of the various QRS detection algorithms with the same input method. Although some previous studies had shown better performance, as shown in Table 5
], however, as we emphasized, our method used the raw signal and the differential signal of only one-lead ECG as input. This major difference was that we have successfully developed a portable ECG monitoring system for patient use at home.
demonstrates how the SoNFIN increased the accuracy of the SVM heartbeat recognition. Figure 7(a)
shows the filtered and normalized Lead II and V1 signals from 47 s to 51 s for the subject of file 213.
Since the filtered ECG signals have some noises, there are five mistaken markers in the upper Figure 7(b)
. These mistaken markers were deleted (four mistaken markers) via the SoNFIN as shown in the lower Figure 7(b)
. The residual mistaken marker was classified as the RBBB beat.
Since the heart is an elastic and relative solid organ, clinical diagnosis needs 12 lead ECG signals to identify different cardiac diseases. Therefore, the less lead-signal numbers there are, the less classification types it receives. Therefore, the recognition and classification are more difficult.
In conclusion, we have proposed an automatic scheme integrating the SVM and SoNFIN, and used only one-lead ECG (Lead II) to detect the heartbeats. Two-lead ECG (Lead II and V1) were used to identify the type of arrhythmia. In a real scenario, the average accuracy for the arrhythmia identification was 96.4%. This accuracy is clinically acceptable for a portable monitor system for only two-lead ECG input. The proposed configuration was applicable for homecare or long-term automatic ambulatory cardiac diagnosis.