Abnormal ECG signal detection based on Compressed Sampling in Wearable ECG sensor 1,2
Hao Ding School of Electronic Information, Wuhan University, Wuhan, China 2 LIMOS Laboratory UMR 6158 CNRS, University of Blaise Pascal, Clermont-Ferrand II, France Email:
[email protected]
1
1
Abstract— Nowadays to diagnose cardiac arrhythmias Holter device is used to record 1 or 2 ECG leads during 24 or 48h. Power consumption limitations determine that the amount of data needs to be diminished without damaging the quality of information. To get a solution, we introduce a novel method based on Compressed Sensing (CS) technique to the Wearable ECG sensor (WES). The main principle underlying this framework is to sample analog signals at sub-Nyquist rate at the analog-digital converters (ADCs) and to classify directly compressed measurement into normal and abnormal state. Those compressed measurements which imply a risk of cardiac anomaly will be stored in a multimedia flash memory card or be transferred to the terminal of the network for a cardiologist to make an off-line diagnosis of cardiac arrhythmias using the reconstructed signals from the compressed measurements. In this paper we propose a scheme to directly classify compressed ECG samples into normal or abnormal states, thus avoiding reconstruction of the entire signal to perform this task. Our algorithm takes advantage of estimating parameters directly from the compressed measurements; thereby eliminating the reconstruct stage and reducing the computational complexity in WES. Direct cardiac arrhythmia detection based on CS reduces 34% energy consumption and 90% storage in WES for the reconstructed performance of 41dB. Keywords- electrocardiography (ECG); compressed Sensing (CS); cardiac arrhythmia, wearable ECG sensor; system on Chip (SoC)
I.
INTRODUCTION
Cardiac arrhythmias present abnormal electrical activities due to cardiovascular diseases. In France, it has been estimated more than 60,000 annual sudden deaths due to cardiac arrhythmias [1]. In fact the traditional technique such Holter and R.test are not totally efficient to prevent cardiac arrhythmias sudden death. Thus it is necessary to propose a new user-friendly technique to detect cardiac arrhythmias. Wireless body sensor network (WBSN) enables wireless communication between the miniaturized body sensor unit and a single body central unit worn on the body in next generation ambulatory personal telecardiology. WES seems to be a good tool to help to prevent cardiac arrhythmia sudden death. This wearable, miniaturized and wireless sensor is able to monitor
2
Hong Sun School of Electronic Information, Wuhan University, Wuhan, China Email:
[email protected] Kun-mean Hou LIMOS Laboratory UMR 6158 CNRS, University of Blaise Pascal, Clermont-Ferrand II, France Email:
[email protected]
ECG signals and wireless report cardiac signals to a coordinator, which is responsible to transmit them to a local and remote surveillance server for tele-health [1,2]. In our previous work, a platform dedicated to real-time cardiac arrhythmia tele-assistance and monitoring is implemented responding to the last AHA (American Heart Association) recommendations [1]. The WES prototype is a real-time wireless embedded portable sensor based on the Texas Instruments ultra low power microcontroller MSP430. The WES enables to capture in real-time 4 leads ECG signals sampled at 500Hz. It has two running modes: in on-line mode, the monitoring and diagnosis messages are sent to the local server over a wireless medium such as Wi-Fi, Bluetooth and ZigBee; in off-line mode, sample ECG signals are stored in a Multimedia flash memory card (MMC). The duration of the ECG records depends on the capacity of the MMC, the sampling frequency and the number of ECG leads [2]. In this work we focus on the development of the new technique which enables to implement SoC wearable ECG sensor by reducing its energy consumption. The abnormal compressed sensing ECG data is recorded into the Flash memory instead of sending to a local or remote server. The Compressed Sensing (CS) framework [3-5] asserts the underlying signal can be recovered precisely from fewer samples so as the signal is sparse in a particular domain. In [6], the authors have introduced some practical application of CS on remote sensing approach, for example sampling Photoplethysmogram (PPG) signals with fewer samples than with uniform sampling without losing the accuracy of heart rate and blood pressure estimated values. A configuration of combination of compression and sampling is shown in Fig. 1. The goal is the implementation of compressed sensing ADC, which results in sampling the input signal at a compressed rate. Consequently, it allows to lower the sample rate and to implement the compression algorithm in the sampling stage. Subsequently we introduce a scheme to directly classify compressed samples of ECG signals into normal and abnormal while incurring minimum computational complexity. The compressed samples presenting anomaly are transmitted to the local or remote surveillance, where they are been constructed
64 978-1-4577-1010-0/11/$26.00 ©2011 IEEE
may be associated with atrial flutter, atrial fibrillation of sinus arrest.
for providing more accurate and detailed information to cardiologist. The remaining samples holding non-information of cardiac arrhythmias are all discarded but the information of heartbeat extracting from them. Direct cardiac arrhythmia detection avoids reconstructing the ECG signal from the compressed samples to the Nyquist rate of samples on WES, and transfers computational complexity of reconstruction to local or remote surveillance having more computation power and no power supply constraint.
Wavelet transform is being adopted in the field of analyzing medical signal [7]. From the discussion of these articles, ECG signals can be sparsely represented in Wavelettransform space, by choosing significant wavelet coefficients by abandoning all the other smaller coefficients [8, 9]. The ECG signals are projected on sparse presentation. The original signal is illustrated in Fig. 2a and its wavelet transform is depicted in Fig. 2b, to enhance visibility these wavelet coefficients have been arranged in random order. From the figures, we can get a verdict: most wavelet coefficients are small, and the few coefficients are large. If we set an appropriate threshold, all the wavelet coefficients under the threshold is set to zero, so only the wavelet coefficients greater than the threshold are kept. Thus, we maintain only less than 100 wavelet coefficients having high amplitude, and set the rest wavelet coefficients to zero. The outcome of measurements can be seen as the randomization of the sequence of ECG signals, which are affected by the role of sensing matrix. (a) 1 0.5 0 -0.5
Figure 1. Comparison of traditional and CS ADC. (a) Traditional ADC converts a continuous quantity x(t) or x to a discrete time digital representation x(n), (b)The CS-ADC samples time domain signal x(t) and generates the lower measurement y(m), m is smaller than n. The subscript “n” refers to normal and “abn” indices abnormal.
The reminder of the paper is organized as follows. The next section introduces a signal model which demonstrates sparsity so that compressive sensing can be applied. In section 3, we divide the measurements into two categories based on the estimation of statistic characteristics based on Bayesian Compressed Sensing. We show the experimental results in section 4 and make the conclusion in the last section. II.
100
200
300
400
500 (b)
600
700
800
900
1000
100
200
300
400
500 (c)
600
700
800
900
1000
50
100
150
200
250
300
350
400
450
500
1 0 -1 -2
1.1 1 0.9
Figure 2. (a) Original ECG signals of 1024 points with normalized values in the range, (b) Its wavelet transform coefficients arranged in random sequence for enhanced visibility, most wavelet coefficients are close to zero, only a few of them are conduce to information of ECG signals. (c) From the measurements by sampling 512 points from ECG signals in (a).
CARDIAC SIGNAL MODEL
The cardiac signal model is formally defined, which describes the compressed sensing methodology and the physiological signal evaluated.
B. Compressed Sensing From a Bayesian perspective [10], all of the unknowns are treated as stochastic quantities and characterized by a prior probability distribution function.
A. Wavelet Transform for Cardiac Signals The ECG signal records the electrical potential generated by the myocardium, as detected by electrodes attached to the body surface. The QRS complex is originated from ventricular depolarization and is the foremost ECG wave. Cardiac arrhythmia may result in a heartbeat that is too fast, too slow or irregular to supply enough blood to meet the body's needs. This manifests as a lower blood pressure and may cause lightheadedness or dizziness, or fainting. The presence of the QRS complex is an important component to identify cardiac arrhythmias. Calculate the atrial and ventricular heart rates by counting the number of QRS complex per minute. A rate of less than 60 beats per minute (bpm) is bradycardia and greater than 100 bpm is tachycardia. The rhythm of regular or irregular is determined by accessing the RR intervals, the distance between adjacent QRS complexes. If the rhythm is irregular, it
In reality, the sensing process can be expressed as: Ф
Ф (
)
(1)
Where that is the surplus identical to the smallest elements for x projected onto Wavelet transform bases. is the measurement noise. is zero-mean uncorrelated Gaussian noise with unknown variance . Using the ℓ -regularized formulation to search for the sparse set of coefficients as arg min
65
Ф
ℓ
ℓ
(2)
Where is a regulation parameter controlling the relative importance applied to the Euclidian error and the sparseness, converting the problem of the optimum to the basis pursuit by iterative threshold. III.
signals in (a), a red circle marks the irregular distance of the abnormal ECG signals. (c) Compressed measurements of signals in (a), the length is 6400 owing to the compression ratio 50%. (d) Energy distribution of measurements in (c), a red circle marks the measurements presenting abnormal ECG signal.
Consider its statistical signal analysis of ECG signals, whose characteristics can well be applied to show the difference between normal and abnormal status. The energy function of signal is defined as:
ANOMALY DETECTION USING BCS
In essence, BCS is a useful theorem to map the compressed time domain measurements y to the Nyquist rate frequency domain sampled signal X . It may be a desired model to entirely reconstruct the signal X , however a good overall signal of X is not our primary concern, our goal is to detect abnormal and normal ECG signal but not to implement realtime cardiac arrhythmias diagnosis. Based on the above analysis, the measurements of patients’ heart status are classified as normal and abnormal [12,13]. There are mainly two abnormal situations: 1) irregular peak form value, as depicted in Fig. 3; 2) irregular distance between peaks of ECG signals, as depicted in Fig. 4. It represents our estimate of the parameters of QRS complex, including location, magnitude and signal parameter estimation. (a) Original Signal
()
The variance of signal holds the information about location and amplitude of peaks, showed in Fig. 3 and Fig. 4. Derived from the above equation, the estimation of ECG signal using the compressed samples can be stated as: (
1
0.5
0.5
0 8000
12000
,
50
(c) Compressed Measurements
150
1
0.5
0.5
4000
6000
50
100
150
200
Figure 3. Statistical characteristic of irregular peak values of ECG signals. (a) Original ECG signals are expressed with 12800 points data. Irregular ECG signals are marked by a red circle. (b) Energy distribution of signals in (a), two red circles mark the irregular value of the abnormal ECG signals. (c) Compressed measurements of signals in (a), the length is 6400 owing to the compression ratio 50%. (d) Energy distribution of measurements in (c), two red circles mark the measurements presenting abnormal ECG signal. (a) Original Signal 1
0.5
0.5
0
0 4000
8000
12000
50
(c) Compressed Measurements
150
200
150
200
(d) Energy Ey
1
1
0.5
0.5
0
100
0 2000
4000
6000
50
100
, ,
)
(4)
,Σ ,
(5)
From the above figures, it is easy to see that the peaks of variance corresponding to each QRS complex in the area of normal heart beat occurred. The first and second plots of the figures identify two points which have basically the same amplitude and the same distance for all peaks encircling the area of normal ECG signals. In the area of abnormal ECG signals in Fig. 4, the amplitude of abnormal QRS complex is far greater than the normal one, without the loss of location information. Another abnormal situation is abrupt change of heartbeat, which induces irregular interval between QRS complex peaks of ECG signals. This case is depicted in the last plot of Fig. 4. These signals have normal amplitude but abnormal cardiac rhythm. From the distribution variance of the measurements of ECG signals, it is clear that the QRS peaks of abnormal signals are not as steep as normal signals. Because we calculate the distribution variance divided into segments. In this abnormal situation there is more than one heartbeat in one segment, showing multiple QRS peaks. The length of the segment tracks heart rate of normal signal.
(b) Energy Ex
1
,
Fig. 3 and Fig. 4 provide a more detailed view of the relation of signal in abnormal situations and its measurements. These figures show that the actual signal distribution variance and the estimation of its measurements hold most information of normal and abnormal heart beats. In Fig. 3, there are 12 normal peaks between 2 abnormal peaks as QRS complex in the opposite direction. And Fig. 4 shows a premature ventricular complex (abnormal peak) in the middle part.
0 2000
,
Where p represents the location of QRS complex, m represents the magnitude of QRS complex, and E represents the estimation energy of entire ECG signals.
200
(d) Energy Ey
1
0
100
,
,
A composite feature point to describe the QRS complex is made by 4 parameters
0 4000
,
,
(b) Energy Ex
1
(3)
Figure 4. Statistical characteristic of irregular distance between the peaks of ECG Signals. (a) Original ECG signals are expressed with 12800 points data. Irregular ECG signals are marked by a red circle. (b) Energy distribution of
66
IV.
with compressed ratio of 50%. (d) Pseudo-SNR is 3.51 dB by Haar wavelet transform matrix Ψ with compressed ratio of 50%.
SIMULATION
In previous work shown in [2], heart rate (HR) is estimated by defining as the number of QRS peaks in ECG signal. According to this idea, the first step of our experiment is to divide the compressed measurements into two categories of normal and abnormal. The second step is to estimate HR from the measurements on behalf of the normal signal. The last step is to save the measurements representing abnormal ECG signals sequence into the Flash memory. To diagnose the cardiac arrhythmias (by cardiologist), the stored compressed measurements should be entirely reconstructed to original ECG signal through the algorithm as mentioned earlier. The last procedure is to be operated in remote surveillance terminal, transferring the power consumption and the complex mathematics calculation of WES to the local or remote server.
Many empirical researchers have reported the ratio of fourto-one practical rule for exact recovery, which means to construct one unknown nonzero term from about four incoherent samples. The sparsity of ECG signals is about 80 in previous example. This shows that the number of measurement samples is about 400. Fig. 6 shows the pseudo-SNR of ECG signals obtained from different wavelet basis. 35 30
pseudo-SNR (dB)
25
Because the measurements of ECG signal contain a frequency component equal to nearly half the original sampling rate. It is not necessary to provide higher ADC clock frequency for the application. Due to lower ADC clock (sample frequency), this new technique decreases significantly the WES energy consumption.
20 15 10 5
0 6.25%
The power consumption is 453.5 μW with the CS mechanism with an ADC stage having 2.5 V power supply. The WES ADC consumes 777 μW. The ratio between two power consumption is 0.56, almost equaling to the ratio of CS matrix M/N, 0.46.
12.5%
25%
50%
Compressed Ratio
Figure 6. The recovery performance of ECG signals from MIT-ECG database.
The final experiment is to illustrate the performance of power consumption, storage and reconstruction. The matrix Ψ has been applied to the decompositions provided by the Symmlets wavelet (10 levels). Experiment data from four patients is recorded during 80 minutes. Fig. 7 shows system performance for different sampling rates.
To evaluate quantitatively the performance of the recovery, a variety of experiments demonstrate that the impression of choice of wavelet basis according to normal and pathological ECG signals obtained from the MIT-ECG database. The pseudo-SNR is defined as a quantitative standard 20
Haar Daubechies -4 Daubechies-10 Symmlets-4 Symmlets-10
1.5
Heart Rate Storage Performance of Reconstruction Power consumption
(6)
And is the original ECG signals and fre is the corresponding recovery counterpart. The different results of pseudo-SNR of ECG signal with various wavelet basis are presented in Fig. 5, showing the better recovery performance in appropriate transform basis.
1
0.5 (a)
(b)
1
1
0.5
0.5 0
0
0
-0.5
-0.5 500
1000
1500
2000
-1
500
1000
1500
6.25%
12.5%
25%
50%
Original Sample Rate
Figure 7. Heart Rate, Storage, Performance and Power consumption for Compressive Sensing versus original sampling.
2000
(c) (d)
1
The classification algorithm successfully divided the ECG measurements into normal and abnormal instance, so the heart rate and the decrease of storage are constant. The reduction of power in ADC is clearly visible with the increase of compression ratio. The performance of reconstruction is greatly dependent on the choice of measurement matrix Ф.
1
0.5 0
0
-1
-0.5 500
1000
1500
2000
500
1000
1500
2000
Figure 5. Original signal (blue) and reconstruction (red) from the Measurements. (a) Pseudo-SNR is 26.52 dB by Symmlet (levels 4) wavelet transform matrix Ψ with compressed ratio of 50%. (b) Pseudo-SNR is 10.07 dB by Symmlet (levels 4) wavelet transform matrix Ψ with compressed ratio of 12.5%. (c) Pseudo-SNR is 22.2618 dB by Haar wavelet transform matrix Ψ
The reduction of power in ADC is clearly visible with the increase of compression ratio. The performance of reconstruction is greatly dependent on the choice of measurement matrix Ф. The algorithm has an advantage to
67
classify normal sinus rhythm and 5 class cardiac arrhythmias: Premature atrial contractions (PAC), Premature ventricular complexes (PVC), Supraventricular tachycardia (SVT), Ventricular tachycardia (VT) and Ventricular Fibrillation (VF). A sensitivity of 99.4% and a specificity of 98.5% are obtained in the detection of shared records of MIT-BIH database. A sensitivity of 99.2% and a specificity of 97.9% are obtained in the CSD database. V.
[2]
[3]
CONCLUSION
[4]
Choosing wavelet transform can sparsely represent as a set of coefficients that are composed primarily of zeros accounting for the original ECG signals. The maximum wavelet filter length and number of decomposition levels can be determined, which guarantee wavelet expression of the original ECG signals to be at least as sparse. The statistic characteristic of signal is indirectly obtained from the measurements, which are outcome of signal through the measurement matrix. The measurements of abnormal cardiac arrhythmias and the heart rate got from the measurements of normal ECG signals are saved in memory of WES. In addition the number of measurements is three times more than the sparse expression of ECG signals over wavelet basis, the reconstructed ECG signals could help cardiologist to diagnose the specific heart disease. Finally this new technique enables to implement a small form factor and low energy consumption System on Chip Holter. Moreover this technique also increases significantly the duration of the recorded ECG signal.
[5]
REFERENCES
[13]
[1]
[6]
[7] [8] [9] [10] [11] [12]
H. Y. Zhou, K. M. Hou, J. Ponsonnaille, L. Gineste, J. Coudon, G. D. Sousa, C. D. Vaulx, J. J. Li, P. Chainais, R. Aufrère, A. Amamra, J. P. Chanet, “Remote Continuous Cardiac Arrhythmias Detection and
68
Monitoring,” in Studies in Health Technology and Informatics, IOS Press, pp. 112-120, 2004. H. Y. Zhou, K. M. Hou, J. Ponsonnaille, L. Gineste, C. d. Vaulx, J. Coudon, G. D. Sousa, J. J. Li, P. Chainais, R. Aufrère, A. Amamra, J. P. Chanet, “Real-time Cardiac Arrhythmia Tele-Assistance and Monitoring Platform: RECATA,” Proc. ICOST’05. From Smart Homes to Smart Care, Assistive Technology Research Series, 15: 99-106, 2005. R. Robucci, L. K. Chiu, J. Gray, J. Romberg, P. Hasler, D. Anderson, “Compressive Sensing on a CMOS Separable Transform Image sensor”, IEEE Int. Conf. Acoustics, Speech, and Signal Processing, 4: 51255128, 2008. E. J. Candès, and M. B. Wakin, “An Introduction To Compressive Sampling,” IEEE Signal Proc Mag., 25: 21-30, 2008. R. G. Baraniuk, “Compressive Sensing,” IEEE Signal Proc Mag., 24: 118-120, 2007. P. K. Baheti, and H. Garudadri, “An Ultra Low Power Pulse Oximeter Sensor Based On Compressed Sensing,” IEEE Computer Society, Sixth Int. Workshop on Wearable and Implantable Body Sensor Networks, 144-148, 2009. L. Senhadii, G. Carrault, J. J. Bellanger, and G. Passariello, “Comparing Wavelet Transforms for Recognizing Cardiac Patterns,” IEEE Eng. Med. Biol. Mag., 14: 167-172, 1995. M. Unser, “A Review of Wavelet in Biomedical Applications,” Proc. IEEE., 84: 626-638, 1996. C. W. Li, C. X. Zheng and C. F. Tai, “Detection of ECG characteristic points using wavelet transforms,” IEEE T. Bio-Med. Eng., vol. 42, pp. 21-28, 1995 J.M. Bioucas-Dias andM. A.T. Figueiredo, “A New TwIST: Two-step Iterative Shrinkage/Thresholding Algorithms for Image Restoration,” IEEE T. Image. Process, vol. 16, no. 12, pp. 2992-3004, 2007. M. E. Tipping, “Sparse Bayesian Learning and the Relevance Vector Machine,” J. Mach. Learn. Res., V1. 2001. J. Haupt, R. Castro, R. Nowak, G. Fudge, A. Yeh, “Compressive Sampling for Signal Classification,” Proc. 40th Asilomar Conf. on Signals, Systems, and Computers, 1430-1434, 2006. M. Mishali, Y. C. Eldar, J. A. Tropp, “Efficient Sampling of Sparse Wideband Analog Signals,” Electrical and Electronics Engineers in Israel, 290-294, 2008.