Overall framework
As shown in Figure 2, the proposed portable ECG device was designed using the following blocks: a simplified analog front-end, an ARM processor to realize signal monitoring and analysis, an interactive display unit, and a power source. The features of the individual blocks are as follows below.
-
Reduced hardware complexity: We aimed to develop a powerful software working platform using an ARM processor to simplify the hardware requirements. Consequently, portability of the device can be accomplished. The minimization analog front-end was realized by implementing most of the analog functions (highpass, lowpass, and notch filters) using digital filters. In addition to device compatibility, this also helped to reduce power consumption of the device and extended battery life.
-
Real-time processing: Computational complexity is one of the major obstacles while implementing hardware in real-time. However, to alleviate this drawback, the proposed software was modified and implemented in an ARM processor [16, 17]. Furthermore, the digital filter removes various types of noises and baseline wander from the preprocessed ECG data and then it tends to extract and classify the features from the filtered ECG data for analysis. The processed ECG data and results of the analysis can be displayed using an interactive LCD display. To summarize the analysis results, the device reports averaged feature values and detected diseases every minute.
-
Simultaneous feature extraction for AFib and ischemia: We considered two distinct diseases corresponding to atrial and ventricular activity. To simultaneously describe heart activity, we implemented features for irregularity, shape, area, slope, and distribution of ECG data [16, 17]. Feature extraction methods to represent irregularity were simplified without compromising detection performance. Furthermore, the extracted features from the ECG signal were classified into AFib and myocardial ischemia. Therefore, if target diseases are changed or added, we can easily adjust the feature extractors and train the classifiers accordingly.
Analog front-end
ECG signals that are generated by electrical activity in the heart are a small pulse train of which the amplitude is less than 2 mV and bandwidth ranges from 0.05 to 150 Hz. Because the ECG signal is often corrupted by various noises originating from the body and analog signal processing hardware, efforts have been made to capture a clean ECG signal with error-prone analog circuits, such as amplifiers and filters [33–35]. In the current study, analog signal processing was minimized by realizing most of the signal processing in the software using a cheap and general purpose ARM processor to enable a small system for portability and reconfigurable for use in various conditions. The analog front-end has two major functions (1) amplifying the ECG signal to be sampled and quantized properly by an analog-to-digital converter (ADC), and (2) attenuating high-frequency noises that can corrupt the sampled ECG signal because of an aliasing effect. For the sake of cost reduction and simplicity of hardware, an ADC embedded in the ARM processor was used instead of using an additional high-performance ADC. An ADC running at a sampling frequency (F
S
) of 1 kHz has a 12-bit resolution with a reference voltage (V
REF
) of 1.8 V.Figure 3 shows a block diagram of the analog front-end. The analog front-end contains an amplifier with a first-order high-pass filter for DC or offset rejection, two gain stages with a level shifter, and a second-order low-pass filter (LPF) as an anti-aliasing filter. Because the peak ECG signal has an amplitude of approximately 2 mV, the required gain is 900 (V/V), and this is implemented by spreading it over the gain stages. The amplifier has a gain of 15 V/V and the two gain stages are 10 and 6 V/V.
ECG signal processing and learning on the ARM processor
The proposed software has two different operating modes of the training phase and test phase. A schematic setup of the proposed software is shown in Figure 4. The software can be divided into three functional blocks, including preprocessing, feature extraction, and classification. At the preprocessing stage, the noise and baseline wander of the measured ECG data were removed. We simultaneously labeled the locations of the QRS complex, P wave, and T wave by using the QRS complex detector. Later, using the labeled QRS complex, we calculated interbeat intervals and created Poincaré plots. In the feature extraction process, we extracted feature values for irregularity and morphological shape from a sliding window. Eventually, at the classification block, we built a trained support vector machine (SVM) model that could detect heart disease from the test data. Furthermore, the trained SVM model was moved to the ARM processor and operated to classify heart disease based on the test phase. In this study, we trained our proposed system to detect AFib based on the MIT-BIH AF, Arrhythmia, CinC 2001, and CinC 2004 databases, and to detect myocardial ischemia using the European ST-T databases [36]. Primarily, the training phase was conducted to train our proposed SVM model, by exploiting these databases. Conversely, the test phase provided the analytical results of the measured ECG signals that were acquired using the proposed electrodes.
Preprocessing with digital filters
As mentioned above, in addition to filtering provided at the analog-front end, ECG data are processed by digital filters to further reduce the noise and interference, which are caused by the following artifacts: contraction of skeletal muscle, fluctuation of the power supply, and mechanical force on electrodes. The digital filters have the advantage of being able to easily change the filter characteristics (i.e., modification of filter coefficients). Therefore, to remove accumulated noise, we combined 0.05-Hz highpass, 60-Hz notch, and 40-Hz lowpass filters using Butterworth filters, which are a type of infinite impulse response. Advantages are that the implemented filters require a small number of operations per time step.
Similarly, to remove baseline wandering effects, we decomposed the signal vectors using a wavelet operator, which has a similar shape as QRS complexes. In this step, we used Daubechies8 as mother wavelet since Daubechies wavelet family have similar shapes with QRS complex. Measured ECG data is decomposed into eight levels with detail and approximation coefficients. The sequences of detail coefficients represent prominent points and segments, and the sequences of approximation coefficients represent an unexpected wandering baseline. Therefore, important sequences of detail coefficients can be retained from the input ECG data. Subsequently, to detect QRS complexes, we assigned proper locations of QRS complexes using the wavelet scale selection method. From the decomposed coefficients, we substituted the zero-vector to all sequences, except for one detail coefficient sequence. By repeating this step to all acquired sequences of detail coefficients, we measured the score to find the protruding segment. The QRS complex was then assigned as Q R S
i
by maximum protruding values for each target segment. And the interbeat interval I
i
is RR interval which is calculated from the difference of two consecutive QRS complexes as follows: I
i
=Q R S
i
−Q R S
i−1. More detailed descriptions for detecting QRS complexes have been previously reported [17].
Feature extraction and classifications
We used sliding windows of size 10 seconds and included about 10 consecutive interbeat intervals. The sliding window continuously moves to the next interbeat interval, overlapping the half of the interval. Therefore, the features for irregularity and morphological shape can be extracted from the sliding window. To represent irregularity on ECG data, we created a Poincaré plot, which showed self-similarity in periodic functions and sequences. A point in the plot can be defined as P
k
=(I
k
,I
k+1), where I
k
is k-th interbeat interval. If the measured points converge near to a central point, this phenomenon implies the interbeat intervals are almost the same in the observed sliding window. In contrast, a pattern with diffused points represents irregular interbeat intervals.
In real-time processing, to represent irregularity to detect AFib, we modified three features based on our previous study [16]: (1) a simplified mean stepping increment, (2) the sum of the distance from the major interbeat interval point, and (3) the number of clusters in a Poincaré plot. These features are extracted from the current sliding window which contains n interbeat intervals. The first feature is a simplified mean stepping increment. The distance between two consecutive points P
k
and P
k+1 in the plot using the Euclidean distance can be formulated as follows: . If the two consecutive points are regular beats, the distance converges to zero. However, irregularity of ECG signals is accumulated with increasing distances. Furthermore, by removing the common points, the simplified value of the summation can be implemented in the portable device. The simplified version of mean stepping increment was modified as follows:
(1)
The second feature is the sum of the distance from a diagonal line in a Poincaré plot. If a point is located around a diagonal line in the plot, then it denotes that x and y positions have similar values. This characteristic also means that interbeat intervals are regularly generated. This dispersion feature illustrates how to distribute the points in a plot from regular interbeat intervals as follows:
(2)
The third feature is the number of clusters in a Poincaré plot, and this is decided from the spectral clustering method [37]. In normal cases, the interbeat intervals are regular. Therefore, the corresponding points in the Poincaré plot are grouped as a small cluster, i.e., closely located points. After the clustering process, a plot of normal ECG signals shows a consistent group of points. However, a plot of AFib shows scattered points.
To capture characteristics related to myocardial ischemia, we focused on the shape of the ST segment and QRS complexes. We can extract significant morphological information through QRS complexes and the T wave peak. The first feature of ischemia is cumulative voltage values, which measure how the T wave is elevated from a normal QRS onset point. If the ST segment deviates from normal levels, this feature value is highly increased. The mean value of the ST segment is usually located at around the QRS onset point. The second and third features are a voltage deviation in the ST segment and a slope from the QRS onset to the offset point, respectively.
As explained above, at the training phase, feature values are agglomerated together to a feature space. At the test phase, extracted features from preprocessed ECG signals are classified using support vector machines every minute. We classified the extracted test feature values using the trained SVM model.
Implementation and programming environment
The proposed device captures ECG signals from the human body using a four-pole clip electrode through the analog front-end. Furthermore, we used three-lead ECG signals from the left arm, right arm, and right leg. The size of the analog front-end module is (H,W,D)=(0.1 c m,3.5 c m,7.7 c m), which can easily be embedded into a wearable ECG acquisition device. The instrumentation amplifier (TI INA216) and the OP-Amp (LM358) are used to obtain regulated ECG signals from the human body. These circuits are suitable for a portable device with the data acquisition system.To provide portability, as well as an interactive service, we attached a compact (4.3” TFT) LCD display device on top of the ARM processor. The LCD4 display provides a simple and compact display solution with touch screen capability. This display offers a good resolution of 480×272 and a four-wire resistive touch screen provides the opportunity to design various types of graphic user interfaces. This system is equipped with a compact lithium polymer single cell battery with 1300 mAh and the battery should last for approximately 3 hours with a full charge. The hardware implementation is shown in Figure 5.
For scalability, we developed our software using C++ language and QT for embedded Linux. Preprocessing, feature extraction, classification, and graphic user interface for the software were implemented and tested in the ARM processor. The classifier was used based on libSVM, which provides an integrated library for support vector machines [38]. The software consists of three screen activities, including the main signal view, a Poincaré plot, and data description view.
Figure 6 shows the ECG monitoring and real-time test results on human subjects. The proposed device simultaneously records ECG signals from a user, then displays it on the real-time screen. By collecting ECG signals continuously for one minute, we can then calculate inter-beat intervals for each QRS complex. Furthermore, the Poincaré plot is drawn from extracted inter-beat intervals and is updated after every minute. The plot shows heart activity by regular drawing of points. The activity of points converging on one centroid represents that heart activity is regular and normal. On the other hand, when the points are irregularly distributed, this plot represents one of the typical AFib cases [39, 40].
Additionally, the data description view is displayed after the measured ECG data are analyzed. The description view provides essential information with the average extracted feature values and classification results. The numbers with AF and ischemia represent the existence of corresponding diseases as (0 for nonexistence and 1 for existence). The numbers with “feat (1,2,3)” represent a set of three features for detecting AFib as follows: (1) simplified mean stepping, (2) the sum of the distance from the major interbeat interval point, and (3) the number of clusters in a Poincaré plot. Similarly, the numbers with “feat (4,5,6)” represent a set of three features for detecting myocardial ischemia as follows: (4) cumulative voltage value, (5) voltage deviation in the ST segment, and (6) slope from the QRS onset to the offset. Since the range of feature values varies widely, all ranges of features are normalized. The summarized information and corresponding ECG records would help medical decision for physicians.