In this paper, a nonfiducial electrocardiogram (ECG, the process of recording the electrical activity of the heart over a period of time using electrodes placed on the skin) identification system based on the common spatial pattern (CSP) feature extraction technique is presented. The single- and multilead ECG signals of each subject are divided into nonoverlapping segments, and different segment lengths (1, 3, 5, 7, 10, or 15 seconds) are investigated. Features are extracted from each signal segment through projection on a CSP projection matrix. The extracted features are then used to train a radial basis function kernel-based Support Vector Machine (SVM) classifier, which is then employed in the identification phase. The proposed identification system was evaluated on 10, 20, …, 200 reference subjects of the Physikalisch-Technische Bundesanstalt (PTB) ECG database. Using a single limb-based lead (I) with 200 reference subjects, the system achieved an identification rate of 95.15% and equal error rate of 0.1. The use of a single chest-based lead (V3) for 200 reference subjects resulted in an identification rate of 98.92% and equal error rate of 0.08.

1. Introduction

Biometric recognition aims at uniquely identifying the individuals based on their physiological and/or behavior characteristics such as fingerprint, face, retina, palm print, gait, or speech [1]. Today, subject identification is vital for many applications including financial transactions, e-commerce, data protection, access control, entertainment, voting, and health [29]. However, the various biometrics that are currently being adopted exhibit different issues related to performance, measurability, robustness, and liveness detection [1014].

The electrocardiogram (ECG) is one of the more recent means of biometric identification to be explored. An ECG is the physical interpretation of depolarization electrical activity that the heart muscles create. This electrical activity is then propagated throughout the body as a wave [15]. This propagating wave produces a current that is unique for each individual and depends on the anatomic structure of the individual’s heart and body. The resulting current can be detected quite easily using skin electrodes.

The ECG satisfies the requirements for serving as a biometric characteristic: measurability (the characteristics are obtainable if proper settings in practice are maintained), permanence (there is no change in the characteristics over time), universality (which means individual possession of the characteristics), and uniqueness (no two individuals possess the same characteristic) [1619].

An ECG is made up of three primary electrical entities: the wave, the QRS complex, and the wave. The wave is generated by the muscular contraction of the heart’s atria. The QRS complex indicates the end of atria contraction and the start of ventricular contraction. The wave then marks the end of ventricular contraction.

In 1977, Forsen et al. reported that ECG could be used as a biometric trait [20]. Hoekema et al. in 1999 [21] and van Oosterom et al. in 2000 [22] studied the relevance of the geometrical characteristics in the intersubject variability of the ECG. However, the first attempt of using ECG for biometric purposes was presented by Biel et al. in 1999 and 2001 [23, 24]. Since then the researchers devoted much of their efforts to utilizing different methodologies to improve the ECG-based biometric performance [1, 7, 8, 2527]. Different databases, both private and public, are used to evaluate the proposed approaches [28]. The most used databases containing ECG signals are publicly available at the PhysioNet repository [29].

There are three main ECG signal acquisition methods: in-the-person, on-the-person, and off-the-person. With the in-the-person acquisition method, the signal is acquired via implantable device such as artificial cardiac pacemaker, while an on-the person signal is acquired using a device attached on the subject’s body. When the devices that acquire the signal are integrated in objects or surfaces with which the subjects interact and do not require special preparation, the signal is termed off-the-person [28].

Generally, a biometric identification system is comprised of two phases: enrollment and identification. In each phase, preprocessing and feature extraction stages are performed. In the identification phase, classification (an additional final stage) is also performed. In the preprocessing stage, different tasks are executed such as detrending and noise reduction [3034]. For feature extraction, there are two main feature extraction algorithms that can be used: fiducial-based [12, 24, 31, 3540] and non-fiducial-based [4146]. In the classification stage, researchers have utilized different classifiers such as -nearest neighbors (-NN) algorithm, neural network (NN), random forest, and Support Vector Machine (SVM) [30, 31, 33, 47, 48].

In this work, we present a new approach for subject identification that is based on the common spatial pattern (CSP) feature extraction technique using single- and multi-ECG signals. CSP is a nonfiducial approach to extract features; therefore, it can work directly on the time-domain ECG-sampled signals, irrespective to individual heartbeats. This algorithm finds spatial filters such that the variance of the filtered signal is maximal for one class and minimal for the other class. Therefore, it has found wide applications in different areas including motor imagery brain-computer interface [4951], myoelectric control [50], and seizure detection and prediction [5161]. To the best of our knowledge, this is the first time that CSP is applied to subject identification using ECG signals. Note that the CSP algorithm requires multichannel information. For identification using only a single-lead ECG signal, we apply Hilbert transform to construct an additional channel. The CSP algorithm is then applied to the single-lead ECG signal and its Hilbert transform to extract features, which are the inputs to the SVM for identification. Based on extensive investigations using different reference populations of 10 to 200 subjects from the PTB database, it has been found that a data segment length of 7 seconds from a single limb-based lead (I) gives an identification rate of 95.15% and equal error rate of 0.1, while a single chest-based lead (V3) gives an identification rate of 98.92% and equal error rate of 0.08. These results are obtained using 200 reference subjects. For the multilead case with the same number of reference subjects, 6 chest channels give an identification rate of 92.08% and zero equal error rate.

The rest of the paper is organized as follows. The CSP mathematical formulation is discussed in Section 2. The description of the methodology used is given in Section 3. Section 4 presents the experimental results. Finally, Section 5 gives the concluding remarks.

2. Common Spatial Pattern (CSP)

Koles et al. [55, 56] introduced the common spatial pattern (CSP) statistical approach to the field of EEG (EEG is an electrophysiological monitoring method to record electrical activity of the brain.) analysis in order to differentiate between normal subjects and those having a neurological disorder. The CSP approach is used in this work to differentiate between a subject-related ECG signal and non-subject-related ECG signals. The mathematical formulation for the CSP approach is summarized below [55, 56]. (1)Let be the segment of an ECG signal belonging to the subject, where is the number of leads and is the number of samples(2)Compute the normalized covariance matrix of the subject, as follows: where is the number of segments, and is the transpose operation(3)Compute the normalized covariance matrix obtained from other subjects. where is the number of subjects(4)Obtain the composite covariance matrix, as follows: (5)Perform the singular value decomposition (SVD) on the matrix to obtain the matrix of eigenvalues and the normalized eigenvector matrix , as follows: (6)Perform a whitening transform on both covariance matrices, and , using the whitening matrix to obtain the matrices and . (7)Decompose and such that The matrices and share common eigenvectors, and , where is the identity matrix. and represent the matrix of eigenvectors and the diagonal matrix of eigenvalues, respectively(8)Compute the CSP projection matrix of size , as follows: Each row of represents a spatial filter, and each column of represents a spatial pattern. In Section 3.3, we showed how to utilize to extract features

3. Materials and Methodology

The ECG-based identification system is comprised of two phases: enrollment and identification. Each phase consists of three stages: preprocessing, feature extraction, and classification. The first two stages are common between the phases. In the preprocessing stage, a single- or multilead ECG signal is detrended, Hilbert transformed (if single-lead), and segmented. Then, the features are extracted using the CSP algorithm. The extracted features in the enrollment phase will be used to train the classifier in the identification stage; the trained classifier is then tasked to identify the subject through one-versus-all classification approach. Figure 1 presents the overall scheme of the proposed approach. The details of each stage are provided in the following subsections.

3.1. Clinical Data

The dataset used in this study is a publicly available database, Physikalisch-Technische Bundesanstalt (PTB), that has been compiled by the National Metrology Institute of Germany. It contains both normal and abnormal subjects’ recordings. These combinations of digitized ECGs are provided for research via the link PhysioNet.org [29]. Each record includes 15 simultaneously measured signals: the conventional 12 leads (I, II, III, AVR, AVL, AVF, V1, V2, V3, V4, V5, and V6) together with the 3 Frank lead ECGs (Vx, Vy, and Vz). All signals are sampled at 1000 samples/second with 16-bit resolution. In this research, 52 healthy (normal) subjects and 148 nonhealthy subjects are included. For each subject, the length of recording session is 115.2 seconds.

3.2. Preprocessing

In the preprocessing stage, three tasks are performed on the single- or multilead ECG signal: detrending, Hilbert transforming (for single-lead signal), and then partitioning the signal into segments. Note that PTB database has some linear trend that may come from different sources (subject’s muscle movements, voltage fluctuations in the recording device, etc.), which can sometimes hinder the data analysis. Therefore, it needs to be removed before further processing. The ECG signal is detrended by subtracting the least-squares-fit straight line of data from each lead. In case of longer ECG recordings with trends due to the result of respiratory sinus arrhythmia, which is the variation in the heart rate due to respiration, a cyclic model needs to be used. Note that the ECG signals could also be upside-down and need to be inverted.

Because the CSP algorithm is applicable only to multichannel data, the Hilbert transform is used to obtain an addition channel from the original single-lead input signal . The signal is obtained, in the time domain, as a convolution between the Hilbert transformer and the signal . Equation (8) shows how is computed, provided that the integral exists [57].

Equivalently, the signal can be obtained by passing through a linear time invariant system whose frequency response (the Fourier transform of ) is equal to –jsgn(f), where sgn(f) is the signum function.

A nonoverlapping sliding window of size 1, 3, 5, 7, 10, or 15 seconds is applied to partition the ECG data into segments. The segmentation process is performed irrespective to the individual heartbeats or specific waves (P, QRS, and T) but with different window sizes to study the effects of the segment length on the identification system.

3.3. Feature Extraction Using CSP

Feature extraction is the most important step in the subject identification process. Using the training segments, the projection matrix is constructed using the CSP algorithm, which is a nonfiducial-based method. The training and testing feature vectors are extracted by projecting each segment of ECG data samples (of size ) onto the matrix (of size ) to obtain the matrix (of size ) such that

Note that could be a segment from the subject or any other subject under consideration. Therefore, the feature vector pertaining to a given segment is defined as the log of the variance of each row of the matrix .

3.4. Identification Stage

In the identification stage, an SVM with a radial basis function (RBF) kernel is utilized [58, 59]. The feature vector extracted from an ECG segment will be an input to the classifier corresponding to the subject. The classifier results are binary “1” for the target () subject and “0” otherwise. Adopting a one-versus-all classification approach resulted in the number of instances of each class in the training dataset being highly unbalanced (i.e., the number of negative instances is much larger than that of positive instances). To achieve a balance between the positive and negative instances, we adopted a strategy of oversampling the positive instances [60].

4. Results and Discussion

The proposed method was evaluated using the PTB dataset with 200 subjects. The recording of each subject is preprocessed. To study the effects of segment length on the identification process, we selected six segment’s lengths (1, 3, 5, 7, 10, or 15 seconds). The feature vectors of data of each subject are extracted using the CSP method and divided into two equal sets, training and testing. We used 50% of the subject’s ECG segments for training and the other 50% of ECG segments of the same subject for testing. The overall training (testing) set is compiled from all 200 subjects.

To evaluate the performance of the proposed approach, we used two metrics: identification rate (IR) and equal error rate (EER). IR is the ratio of the number of correctly identified subjects to the total number of subjects while the EER is the error rate at which both the false positive rate and the false negative rate are equal. Table 1 shows the performance of the proposed approach using different segment lengths averaged over all 200 subjects.

On a single-lead limb-based data, lead (I) achieved the best IR with 96.30% and 0.10 EER using a five-second segment length. Using a 10 seconds segment length, the IR (96.23%) is almost the same while the EER is better (0.09). However, when using a 15-second segment length, the ERR becomes worse (0.11). On a single-lead chest-based, lead (V3) achieved the best IR with 98.92% and 0.08 EER using a seven-second segment length.

Looking at the results for multileads, lead 6-limb achieved the best IR with 90.46% and 0.04 EER using a three-second segment length with very close results when the segment lengths are 5 and 7 seconds. 6-chest reached an IR of 95.17% and 0.0 EER using a one-second segment length. The 12 leads attained an IR of 90.33% and 0.0 EER using a one-second segment length. We noticed that, the chest-based leads (single and multileads) achieved better performance than limb-based leads (single and multileads), which may be attributed to the proximity of the heart.

Table 2 presents the effects of the number of reference subjects on the identification rate. As noticed using 200 subjects, all limb-based single leads achieved an % while the chest-based single leads achieved an %. The top-ranked single-limb lead (I) achieved an IR of 95.15% using 200 reference subjects, and the top-ranked single-chest lead (V3) achieved an IR of 98.92% using the same number of reference subjects. The multilead set 6-limb achieved an IR of 89.89% while 6-chest achieved an IR of 92.08%, and the 12 leads achieved the lowest IR of 85.54%.

Table 3 presents the performance results of the state-of-the-art PTB-based subject identification methods in comparison to the approach proposed in this paper. Agrafioti and Hatzinakos [61] used a nonfiducial autocorrelation-based feature extraction algorithm on a single lead (II) and nearest neighbor as a classifier. They achieved a recognition rate of 96.2% using 13 subjects. In [62], they investigated combining the information from 12 leads using two types of fusions: feature level fusion of leads and decision level fusion. A recognition rate of 95.16% and 100% is achieved for both approaches, respectively, using 14 subjects. Fatemian and Hatzinakos [63] presented a fiducial wavelet-based framework for human recognition of single-lead ECG. They achieved an identification rate of 99.2% using 13 subjects. Safie et al. [64] developed a fiducial human authentication system based on a feature extraction technique known as pulse active ratio (PAR). Their method was validated by experiments on 112 subjects using single lead (I) and achieved a recognition rate of 93.60%. Wang et al. [65] proposed a nonfiducial approach based on autocorrelation (AC) in conjunction with a discrete cosine transform (DCT). They reported a subject recognition rate of 100% using a dataset of 13 subjects. Wübbeler et al. [66] presented a fiducial subject identification system based on a heart vector and a simple distance measure (nearest center) and utilizing two limb leads. Using a test set of 74 subjects, they achieved an identification rate of 98.1% and 0.03 EER. Zhao et al. [46] proposed a nonfiducial identification system based on ensemble empirical mode decomposition. They used the principal component analysis to reduce the dimensionality of the feature space and the -nearest neighbors (-NN) method as a classifier. They applied their method on a test set of 25 subjects and achieved an identification rate of 96%. Jekova and Bortolan [67] presented a fiducial identification method that relies on the assessment of correlation coefficients as well as their linear and nonlinear combinations. This method resulted in an identification rate of 92.9% on a dataset of 14 subjects. Tantawi et al. [3] evaluated quantitatively the information content of the fiducial-based feature set (28 features) in terms of their effect on subject and heart beat classification accuracy using different feature extraction/selection methods. They used two datasets for the evaluation (one with 14 subjects and one with 6 subjects), and three feature selection methods (principle component analysis, information gain ratio, and rough sets). They achieved an identification rate of 100% using dataset 1 and 83.3% using dataset 2. Plataniotis et al. [41] presented a nonfiducial recognition method based on estimating and comparing the significant coefficients of the discrete cosine transform of the windowed autocorrelations of heartbeat records. They reported a subject recognition rate of 100% using a dataset of 14 subjects.

5. Conclusion

This paper presents an ECG identification system based on the CSP feature extraction technique. The system is composed of three stages: preprocessing, CSP-based feature extraction, and identification. The single-lead ECG signal is transformed into two channels using Hilbert transform to facilitate CSP being applied to a single-lead ECG signal. Then, the signals are segmented into nonoverlapping segments. Six segment lengths are investigated, namely, 1, 3, 5, 7, 10, 15 seconds. Then the features are extracted using the CSP algorithm. The extracted features are used to train the classifier in the identification stage; the trained classifier is tasked to identify the subject through one-versus-all classification. The proposed method is tested on different reference subject populations of 10 to 200 subjects from the PTB database. The results show an identification rate of 95.15% and equal error rate of 0.1 on a single limb-based lead (I) and an identification rate of 98.92% and equal error rate of 0.08 using a single chest-based lead (V3) for 200 reference subjects.

It is relevant here to mention that varying levels of physical, mental, or emotional stimulations are known to affect heart rate. Unfortunately, recordings under these stimulations are not available in PTB dataset. Therefore, the robustness of the proposed identification method under the effect of these stimulations will be a research point to consider in our future work.

Data Availability

The (Physikalisch-Technische Bundesanstalt (PTB)) data used to support the findings of this study is available from the National Metrology Institute of Germany “https://physionet.org/physiobank/database/ptbdb/”. The ECGs were collected from healthy volunteers and patients with different heart diseases by Professor Michael Oeff, M.D., at the Department of Cardiology of University Clinic Benjamin Franklin in Berlin, Germany.

Conflicts of Interest

The authors declare that there are no conflicts of interest.


The authors would like to acknowledge the support received from the College of Engineering Research Center, King Saud University.