Introduction

Ventricular fibrillation (VF) and rapid ventricular tachycardia (VT) are the most malignant ventricular arrhythmias, leading to six million deaths in the United States and Europe if no timely defibrillation shockis applied [1]. The effective treatments for VT include implantable cardioverter defibrillation, ablation and anti-arrhythmic mediations; the only effective therapy option for VF is appropriate cardioverter defibrillation [2]. Implantable cardioverter-defibrillators (ICDs) provide different treatments according to the type of arrhythmias. For VT, ICDs usually attempt pace maneuvers. However, effective shocking with an ICD would be a primary choice for VF treatment. Because of the difference in prognosis and medical treatments for VF and VT arrhythmias, the accurate classification of these two arrhythmias is clinically significant in order to provide an effective medical treatment. In the present study, it has been shown that an unnecessary ICD shock is often delivered to patients with an ambiguous ECG rhythm in the overlap zone between VT and VF, which significantly increases mortality [3]. Therefore, accurate classification of the arrhythmias into VT, organized VF (OVF) or disorganized VF (DVF) is crucial to improve successful ICD shock rates. With accurate identification of a DVF arrhythmia, ICD shocking would be performed effectively and unnecessary pacing maneuvers would be avoided. The differences in the arrhythmia signal structures for VT, OVF and DVF groups can be observed from Fig. 1.

Fig. 1
figure 1

Examples of ECGs depicting VT, OVF and DVF

Many methods have been developed for VF and VT rhythm classification. VF and VT signals vary in morphology. A VF rhythm is generally disorganized and chaotic, while a VT rhythm is fundamentally organized. Therefore, VF and VT rhythms embody different features in the time domain and the frequency domain and exhibit different levels of complexity. Within the time domain, temporal/morphological detectors, such as the threshold crossing interval (TCI) [4], the threshold crossing sample count (TCSC) [5], the standard exponential (STE) [6], the bandpass filter and auxiliary counts (BFAC) [6] and the mean absolute value (MAV) [7], were used to explore the morphological characteristics of ventricular arrhythmias. In the frequency domain, spectral detectors such as VF leak [8], M and A2 detectors in a spectral algorithm [9] and the median frequency (FM) [10] were usually applied for VF and VT detection. In addition, VT and VF classification was also carried out according to their complexity, with elements such as complexity measurement (CM) [11], phase space reconstruction (PSR) [12] and sample entropy (SpEn) [13].

However, because the structural characteristic that distinguishes OVF from DVF is time-varying and subtle, no separate classification method is sufficient for efficient ventricular arrhythmia classification [14]. To achieve more accurate shockable rhythm detection, Li and Alonso-Atienza employed up to ten ECG detectors using a machine learning approach [15, 16]. Unfortunately, even these more sophisticated methods ignore the analysis of ambiguous ventricular arrhythmias, including the overlap zone between VT and VF. In the present study, a classification algorithm using a fuzzy logic classifier was proposed for accurately classifying the arrhythmias as VT, OVF or DVF. Compared with other studies, our method aims to combine ten ECG detectors that are calculated in the time domain and the frequency domain in addition to the level of complexity for detecting subtle structural differences between VT, OVF and DVF. The classification in the overlap zone between VT and VF is refined by this study to avoid ambiguous identification. The present method was trained and tested using public ECG signal databases.

Methods

Database

The surface ECG signals from the PhysioNet repository were used in this study [17]. In particular, the MIT-BIH Malignant Ventricular Arrhythmia Database and the Creighton University Ventricular Tachyarrhythmia Database, which are available in the PhysioNet repository, were included for the present algorithm development. A total of 280 ECG episodes with a window length of 8 s were extracted and pre-classified segment-by-segment as VT, DVF (predominantly late VF) and OVF (predominantly early VF) by cardiology experts according to the gold standard. Of the 280 ECG segments, there were 89 VT segments, 95 OVF segments and 96 DVF segments. These 280 ECG episodes were randomly split into training and test sets. The details of the training and test sets are shown in Table 1.

Table 1 Details of training and test sets

ECG signal preprocessing

The ECG signals were sampled at a frequency of 250 Hz. A high-pass filter and a Butterworth low-pass filter with cutoff frequencies of 1 and 30 Hz, respectively, were applied as signal preprocessing for the suppression of the residual baseline and high-frequency noise.

ECG detectors

A set of ten defined detectors were preselected because of their outstanding classification performance reported by previous studies [15, 16]. According to their characteristics, these detectors can be broadly classified into three major categories as time domain, frequency domain and complexity detectors. (For details about these detectors, please see the original manuscripts.)

Time domain detectors/morphological detectors

  • Bandpass filter and auxiliary counts include three auxiliary detectors, which were named Count1, Count2 and Count3 [5]. These detectors represent the number of signal samples with amplitude values within a certain amplitude range. This specific amplitude range is calculated from the absolute values (AFS) and mean deviation (MD) of a digital bandpass filter output, as shown below.

    $${\text{The range of Count1 }} = \, 0. 5\times { \hbox{max} }\left( {|{\text{AFS}}|} \right){\text{ to max}}\left( {|{\text{AFS}}|} \right)$$
    (1)
    $${\text{The range of Count2 }} = {\text{ mean}}\left( {|{\text{AFS}}|} \right){\text{ to max}}\left( {|{\text{AFS}}|} \right)$$
    (2)
    $${\text{The range of Count3 }} = {\text{ mean}}\left( {|{\text{AFS}}|} \right) \, {-}{\text{ MD to mean}}\left( {|{\text{FS}}|} \right) \, + {\text{ MD}}$$
    (3)
  • Threshold crossing sample count (TCSC) represents the number of times the ECG sampling signal crossed a certain threshold value with a 3-s interval [6]. This detector can be evaluated by averaging TCSC values that are calculated within several consecutive 3-s intervals.

Spectral detectors

  • VF-filter leakage measure (Leakage) [8] is the output of a narrow bandstop filter that is applied to the sampled signal with its center frequency value equivalent to that of the mean frequency of the sampled ECG signal segment. The VF-Filter leakage is obtained as

    $$Leakage = \sum\limits_{i = 1}^{m} {\left| {V_{i} + V_{i - (T/2)} } \right|\left[ {\sum\limits_{i = 1}^{m} {(\left| {V_{i} } \right| + \left| {V_{i - (T/2)} } \right|)} } \right]^{ - 1} }$$
    (4)
    $$T = 2\pi \sum\limits_{i = 1}^{m} {\left| {V_{i} } \right|\left( {\sum\limits_{i = 1}^{m} {\left| {V_{i} - V_{i - 1} } \right|} } \right)^{ - 1} }$$
    (5)

    where Vi, m, and T are the signal sample, the number of data points and the mean period of a sampled ECG segment, respectively.

  • Spectral algorithm [9] calculates the power content over different frequency ranges. The power content can be estimated from the amplitude in the frequency domain by Fourier analysis. F is the peak frequency that results in the largest amplitude in the frequency band of 0.5–9 Hz. Then, FSMN and A2 can be calculated by (6) and (7), respectively.

    $$FSMN = \frac{1}{F}\frac{{\sum {Amp_{i} f_{i} } }}{{\sum {Amp_{i} } }}$$
    (6)
    $$A2 = \frac{{\sum {Amp_{j} } }}{{\sum {Amp_{k} } }}$$
    (7)

where fi and Ampi are the ith frequency and corresponding amplitude, respectively, in the fast Fourier transform (FFT) between 0 and 100 Hz, Ampj is the amplitude at the jth frequency in the FFT between 0.7 and 1.4 FHz, and Ampk is the amplitude at the kth frequency in FFT between 0.5 and 20 FHz.

Complexity detectors

  • The time delay algorithm (Timedelay) [12] constructs a two-dimensionalphase space diagram with signal x(t) on the x-axis and x(t + τ) on the y-axis, with τ being a proper delay time constant. The phase space diagram is divided into a 40 × 40 grid, and the number of diagram boxes visited by the ECG curve can be counted. Thus, the Timedelay detector can be defined as follows:

    $${\text{Timedelay}} = \frac{\text{Number of visited boxes }}{\text{Number of all boxed}}$$
    (8)
  • The complexity measurement (CM) algorithm [11] generates a 0/1 binary sequence by comparing the ECG signal to a proper threshold. With the binary sequence, the CM detector is then computed using the Lempel–Ziv complexity measurement.

  • Sample entropy (SpEn) [13] quantifies the morphological consistency of the selected ECG waveform. If the value of SpEn is lower, it indicates that the selected ECG waveform is more similar. Therefore, an organized and disorganized ECG rhythm can be differentiated by a SpEn detector.

Classification feature

The three major features of an ECG waveform, namely, time domain features, frequency domain features and complexity features, comprehensively reflect the detailed characteristics of the ECG signal. Therefore, these features that are normalized and quantified in (9) were used to distinguish between VT, OVF and DVF in this current study.

$$F_{i} = \sum _{j = 1}^{n} W_{ij} \times P_{ij} \left( {\sum _{j = 1}^{n} W_{ij} = 1,F_{ij} \in \left( {0, 1} \right),P_{ij} \in \left( {0, 1} \right)} \right)$$
(9)

where Pij represents the normalized value of the jth detector assigned to the ith feature (ijth detector), Fi is the normalized value of ith feature, n is the number of detectors contained by the ith feature, and Wij is the weight assigned to the ijth detector. The larger the value of Wij is, the more likely it is that the ijth detector is discriminative. The ability of the ijth detector to separate between two sets of labeled data (positive and negatives instances) can be measured by computing the Fscore using the fisher criterion method that has been used in many studies [16, 18]. (A detailed explanation of Fscore and fisher criterion can be found in the Appendix.) Wij corresponding to the ijth detector is thus computed using Eq. (10) with theFscore.

$$W_{ij} = \frac{{Fscore_{ij} }}{{\sum\nolimits_{j = 1}^{n} {Fscore_{ij} } }}$$
(10)

where Fscoreij represents the Fscore value of the ijth detector.

To obtain outstanding performance in ventricular arrhythmia identification, three classification methods based on three ECG features (feature methods) are all well trained using a training dataset. Optimal threshold values for each feature method are defined as the intersection of the sensitivity and specificity curves using the train database. For instance, the Fig. 2 shows the performance of all of the TD values in VF/VT detection and the definition of the optimal threshold value for TD feature. Compared with other values, the optimal threshold value of TD obtains the best tradeoff between the sensitivity and specificity with a sensitivity of 91.5 % and a specificity of 91.7 %. Optimal threshold values for each feature method and the weight values assigned to each detector are shown in Table 2. The ability of each feature to classify an ECG rhythm can also be quantified using fisher criterion method, as shown in Fig. 3.

Fig. 2
figure 2

The performance of all of the TD values in VF/VT detection and the definition of the optimal threshold value for TD feature. The optimal threshold value of TD is 0.21 with a sensitivity of 91.5 % and specificity of 91.7 %. TD time domain feature

Table 2 Optimal threshold values for each feature method and weight values assigned to each detector
Fig. 3
figure 3

Normalized feature ranking weights using fisher criterion methods

Fuzzy logic classification (FLCL) method

To obtain improved performance of ventricular arrhythmia classification, a fuzzy logic classifier based on classification rules summarized from rich experiences was selected. There are three inputs and one output in the fuzzy logic classifier system. The three inputs are normalized time domain feature (TD), normalized frequency domain feature (FD) and normalized complexity feature (CPLX); the output is a quantized value used to distinguish three ventricular arrhythmias: VT, OVF and DVF. The overall structure of the fuzzy logic classifier is shown in Fig. 4.

Fig. 4
figure 4

The structure of the proposed fuzzy logic classifier

The classifier mainly contains the following five sections.

ECG features calculation

As the inputs of the fuzzy logic classifier, the three features (TD, FD, CPLX) with values ranging from 0 to 1 are normalized and quantified by combining three categories of ECG detectors, as shown in (9).

Fuzzification

After computing and normalizing the inputs, they were transformed into a fuzzy quantity and were represented with an appropriate assembly. Because of the simple calculation and outstanding performance, the triangle function is selected as the membership function for fuzzification. The same linguistic variables for TD, FD, CPLX and outputs are VT, OVF and DVF. Using the optimal threshold values shown in Table 2, the membership functions for the inputs and outputs are shown in Fig. 5 as a distribution over the whole output value range from 0 to 1.

Fig. 5
figure 5

Membership function for the normalized values of TD, FD, CPLX and outputs. TD time domain feature, FD frequency domain feature, CPLX complexity feature

Fuzzy classification rule

To achieve accurate classification of ventricular arrhythmias, a fuzzy classification strategy was developed based on the following five design rules:

  • The classification rules are optimized by regulating normalized output value in accordance with the optimal threshold value for features.

  • According to the ability of each feature for VT detection, as shown in Fig. 1, the separation between VT and VF rhythms should be based more on the TD than on both the FD and CPLX.

  • According to the ability of each feature to distinguish between OVF and DVF, as shown in Fig. 1, the classification between OVF and DVF should be based more on the CPLX than on both the TD and FD.

  • If there is agreement between the identification results obtained from two features, this result is considered to be the final result.

  • If there is disagreement among all three identification results, the final result is obtained from the feature that outperforms the other two features in the present ventricular arrhythmia detection. (The ability of all three features in the detection of VT, OVF and DVF can be measured using the fisher criterion.)

Based on the design rules presented above, a total of 27 fuzzy classification rules were established. Because of space constraints, 3 examples from the 27 fuzzy classification rules are illustrated below.

  • #R6: IF TD is OVF and FD is DVF and CPLX is DVF, then OUTPUT is DVF.

  • # R10: IF TD is VT and FD is VT and CPLX is OVF, then OUTPUT is VT.

  • #R26: IF TD is VT and FD is OVF and CPLX is DVF, then OUTPUT is VT.

Defuzzification

The output fuzzy variable is obtained by fuzzy inference that is based on fuzzy classification rules. With the weighted average method, the output fuzzy variable is ultimately converted to a precise variable for further refined classification. This precise output variable is used by a fuzzy logic classifier for ventricular arrhythmia classification.

Ventricular arrhythmia classification rule

Two threshold values (TH_1 and TH_2) were extracted from numbers of output values of the fuzzy logic classifier using a training set. The accurate classification between VT and VF and between OVF and DVF are thus achieved by comparing the present output value with TH_1 and TH_2, respectively.

Statistical method

The performance of ventricular arrhythmia classification is evaluated in terms of the sensitivity (SE), specificity (SP), accuracy (ACC) and the area under the receiver operating characteristic (ROC) curve (AUC). SE is the proportion of correctly detected VT/OVF rhythms, and SP is the proportion of accurately identified VF/DVF rhythms. ACC refers to the ability to make a correct identification. SE, SP and ACC can be calculated as.

$$SE = \frac{TP}{TP + FN}$$
(11)
$$SP = \frac{TN}{TN + FP}$$
(12)
$$ACC = \frac{TN + TP}{TN + FP + TN + FN}$$
(13)

where TP is the number of true-positive decisions, FN is the number of false-negative decisions, TN is the number of true-negative decisions, and FP is the number of false-positive decisions.

Results

Ventricular arrhythmia classification performance

There are two levels for ventricular arrhythmia classifications in this study. The first-level classification was performed to differentiate VT from VF groups. The second-level classification was performed to distinguish between OVF and DVF. The performances of the ten methods using the individual detector and the FLCL method proposed in this study are fully analyzed using the test dataset, as shown in Table 3 and Fig. 6. In both classification levels, all classification methods yielded higher values of SP than of SE. This indicated that VT detection and OVF detection are more difficult than VF detection and DVF detection. All evaluation indexes (SP, SE, ACC, AUC) corresponding to a certain method in the second-level classification (OVF vs. DVF) are much lower than those corresponding to the same method in the first-level classification (VT vs. VF). This indicates that the accurate classification between VT and VF is more easily obtained than that between OVF and DVF. With higher accuracy, the TCSC method that was performed in the time domain, the leakage method that was performed in the frequency domain and the Timedelay method in complexity yielded three relatively better results than other methods using an individual detector in both levels of classification (The accuracy is 86.8 % for TCSC, 88.6 % for Leakage and 85.9 % for Timedelay in first-level classification; 81.3 % for TCSC, 78.2 % for Leakage and 79.1 % for Timedelay in second-level classification). With respect to individual detectors, Count2 yields a largest accuracy value of 90.3 % in detecting VT rhythms but its accuracy is 5.3 % smaller than that of SpEn in the discrimination of OVF and DVF. SpEn is able to distinguish between OVF and DVF very accurately with a accuracy value of 82.9 % but yields a unsatisfactory accuracy which is 8.7 % smaller than that of Count2 in VT/VF detection. In contrast, the FLCL method achieves largest accuracy which is 2.3 % greater than that of Count2 for VF/VT classification and 2.5 % greater than that of SpEn for OVF/DVF classification. With the highest value of SP, SE, ACC and AUC, the FLCL method provides the most robust classifier and significantly outperforms all of the individual detectors in both classification problems.

Table 3 Performance of the ten methods using individual detector and FLCL method
Fig. 6
figure 6

ROC curves calculated on the test set for the a VT versus VF scenario and b OVF versus DVF scenario

Comparative analysis

The comparison between the FLCL method and other three previous methods was given to evaluate the performance of this proposed method. The wavelet and singular value decomposition analysis method (Wavelet–SVD) proposed by Balasundaram was tested due to their ability to classify VT, OVF and DVF. The algorithms developed by Koulaouzidis and Ropella were also implemented due to relatively good performance in distinction between three ventricular arrhythmias: MVT, PVT and VF. For the comparison to be fair, these four algorithms were all tested on the same test dataset.

The results for the different methods are presented in the last column of Table 4. From the result it can be observed that the FLCL method provides the most outstanding performance in ventricular arrhythmias classification. In first-level classification (VT vs. VF), although Wavelet–SVD algorithm yields a slightly higher SP of 96.7 %, FLCL method achieves the highest SE of 90.2 % which is prominently higher than that of Wavelet–SVD with the difference of 4.1 %. In second-level classification (OVF vs. DVF), FLCL method outperforms the other three algorithms with a SE of 81.3 % and SP of 88.9 %. Compared with FLCL and Wavelet–SVD, phase space reconstruction and spectral coherence methods performed especially poor in second-level classification, which is similar to the result provided by Balasundaram et al. [14].

Table 4 Comparative analysis

Discussion

VF and VT seriously affect the survival rate of cardiac arrest patients. VF treatment is immediate shocking, while pacing maneuvers is the primary choice for VT treatment. In addition, the spatio-temporal organization during VF is reported to be associated with maintaining VF [2125]. Therefore, VT/VF detection and the sub-classification of VF into OVF or DVF in a short time have an important benefit to assisting ICDs and improve treatment options.

In this study, a novel detection algorithm (FLCL method) that combines ten ECG detectors in the time domain, frequency domain and complexity with a fuzzy logic classifier has been developed for optimal classification of ventricular arrhythmias. In comparison with related algorithms using individual ECG detectors (Count1, Count2, Count3, TCSC, Leakage, FSMC, A2, Timedelay, CM and SpEn), the FLCL method outperforms these previous algorithms that consider each detector individually with the test database. Because the individual detector represents only one of three characteristics (TD, FD and CPLX), the subtle morphological differences between VT, OVF and DVF may not be captured effectively by a single detector. This could explain the relatively lower performance of these algorithms using an individual detector for the proposed classification. The individual discriminative power of a single ECG detector is not sufficient to obtain a robust and accurate discrimination. The FLCL detector can quantify TD, FD and CPLX features comprehensively and could provide a better metric on the transition from organized VT to disorganized VF. The combination of the ten detectors used by the FLCL method appears to provide complimentary information. For instance, the power in the half bandwidth of the signal centered on the central frequency is measured by Count2 while the power in the sidebands outside the central frequency is measured by Leakage. In comparison with few of the previous studies [14, 19, 20], the proposed method still performs excellently in overall. It could be observed that the majority of the previous methods did obtain comparative classification between VF and VT; however, with much lower SP and SE, their ability to separate OVF from DVF is significantly poorer than FLCL method. The FLCL method based on these mutually complimentary detectors makes detection of subtle ECG morphology differences possible.

Limitation

There are three limitations in our study. First, like other individual detector methods, the ability of the FLCL algorithm on sub-classification between OVF and DVF is relatively poor. Because VT is an organized signal and VF is an irregular signal, the difference in TD, FD and CPLX between VT and VF is significantly remarkable. In contrast to VT, OVF and DVF are essentially disorganized and the tiny partial organized component in OVF is thus not enough to make OVF obviously different from DVF. There is still potential for improving the OVF/DVF detection performance of the FLCL if more discriminative features/detectors are incorporated into the FLCL method. Second, the FLCL performance in the presence of severe noise is not examined. In the standard databases, ECG data are often hand-picked to be of high quality, so an ECG episode that is disturbed by severe noise is absent from these standard datasets. The FLCL method’s performance should be further evaluated using corrupted ECG segments that are sampled in clinical practice. Third, other combination methods, such as support vector machine and neural net algorithm, were not included and analyzed in the present study. The purpose of this study is to prove that the method based on ECG detector combination outperforms that using an individual ECG detector in ventricular arrhythmia classification. As one of methods based on detector combination, fuzzy logic method is thus applied for comparative analysis in this study. In the future study, the other methods based on ECG detector pre-processor combination will be compared with the FLCL method.

Conclusion

The proposed study based on a fuzzy logic classifier performs an accurate and automatic classification of ventricular arrhythmias and in particular, corrects sub-classification of VF into OVF and DVF. The validation results indicate that the proposed method has superior performance in identifying the organization level among the three types of arrhythmias (VT, OVF and DVF). As a computer-aided diagnosis tool, the FLCL method that is proposed in this study is promising for improving the appropriate therapy choice and decreasing the possibility of sudden cardiac death.