International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 5, Issue 5, May 2014)
125
The implementation of Joint QRS Detection and Data
Compression Scheme for Web Based High Accuracy ECG
Detection and Healthcare System
Mayur A. Gurule
1, R. R. Bhambare
21M.E. Student, 2Associate Professor, Department of E&TC, SVIT COE, Chincholi, Nashik, India
Abstract— This paper presents the design of a complete package for an embedded programmable ECG monitoring system and detection of ECG characteristic points using joint QRS detection and data compression technique. The system also detects and monitors the other important parameters related to the human body, such as blood pressure and body temperature and displays it on the LCD screen. This system is expected to work more conveniently and accurately for the doctor to monitor the patient’s condition sitting in his own office without being physically present near to the patient’s bed. A low-voltage and high performance analog signal conditioning circuit is built to insure high signal quality. A joint approach for QRS detection and lossless data compression (JQDC) will result in lower overall system complexity. By sharing the computational load among multiple essential signal-processing tasks, the average complexity per task can be kept at low level. The algorithm for joint QRS detection and lossless data compression is based on an adaptive linear data prediction scheme which achieves high sensitivity and positive prediction (+P). Lower system complexity and better performance will make this algorithm suitable for portable ECG application. The web based wireless transmission technique is used so that the detected human body parameters can be transmitted to the doctor remotely. The system is built using ARM 7 processor which ensures high accuracy performance and consistent result in the timing operation of the system.
Keywords— ECG, QRS detection, lossless data compression, JQDC, adaptive linear data prediction, wireless transmission, ARM 7 processor.
I. INTRODUCTION
The electronics technology has entered almost in all aspects of day-to-day life, and the medical field is not an exception to that. The need for well-equipped hospitals and diagnostic centers is increasing day by day as the people are becoming more conscious about their health problems. The quality of life in this scenario can be improved by focusing on prevention and early detection of diseases. This can be achieved by long-term monitoring of individual’s cardiovascular health using low-cost and low power, wearable electrocardiogram (ECG) sensor devices (e.g. [1], [2], [3]).
The electrocardiogram (ECG) provides a physician with a view of the heart’s activity through electrical signals generated during the cardiac cycle which is detectable by placing the electrodes on the outer surface of the skin. ECG's clinical importance in cardiology is well established, being used for example to determine heart rate, investigate abnormal heart rhythms, regularity of the heart beats and causes of chest pain [3]. Other than ECG detection, the blood pressure and body temperature of the patient under observation are also the important parameters to be looked after. Fig.1 shows the basic block diagram of the web based high accuracy ECG detection and healthcare system.
The most significant feature of the ECG signal is the QRS complex a great deal of clinical information can be derived from its features, the peak of which is specified as R-peak. The RR interval is the time interval between two consecutive R peaks, which can be used to detect irregularities in the heart normal operation, called arrhythmia [5]. Identification of this feature in an ECG is known as QRS detection, and it is a vital task in automated ECG analysis, portable arrhythmia monitoring, and many other applications. Many QRS detection algorithms were proposed and widely studied over a few decades. A comprehensive review of some existing approaches can be found in [4]. However, most of the approaches mainly focused at increasing the accuracy of detection by using complex signal-processing techniques. The basic QRS detection techniques are based on the amplitude such as first derivative or first and second derivatives of the signal [6]. More complicated algorithms such as wavelet-based QRS detection [2] [7], filter-bank methods [8], neural network approaches, mathematical morphology [9]. Most of these algorithms need complex computations that restrict their use. Due to predominantly focus on high accuracy most of the detection techniques, get too complicated in terms of the algorithms used.
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 5, Issue 5, May 2014)
126 The lossless compression technique is used so as to prevent the possibility of losing any patient information for potential diagnostic value. Most of the existing techniques on lossless ECG compression, concentrate on achieving higher compression ratios (CR) [10]. However, in the context of ambulatory devices and wireless devices, the energy and memory savings obtained from the compression technique should be higher than what is consumed by the compressor itself.
The electrical signals generated during the cardiac cycle are typically in mV. A further signal conditioning and amplification are to be done in order to bring the signal at the considerable level. This amplified signal is then processed by feature extraction algorithm discussed above to extract the desired parameters. The collected data are to be transferred to the doctor for monitoring and diagnosis purpose. For remote wireless operation the selected transmission technology is web based transmission, so that the collected information can be transferred over long distance.
This paper is organized as follows. Section II describes an ECG signal conditioning circuit. Section III introduces the concept of the joint QRS detection compression (JQDC) scheme. In Section IV, the details of QRS detection scheme are discussed. Section V describes the lossless compression scheme. Web based transmission is detailed in Section V. Concluding remarks are given in Section VI.
II. SYSTEM DESCRIPTION
[image:2.612.321.563.126.263.2]Normally, the patient's heart rate is near to seventy five per minute. But the situation of abnormality, the heart rate increases or decreases. In brief the phenomenon is known as arrhythmia, such abnormal situation should be noticed, hence the heart pumping pulses per minute is sensed with the help of ECG electrodes [3][8]. The output of these sensors is in millivolts and contains noise signal. So further processing is required to get an accurate ECG signal to detect the R peak and QSR complex. An ECG signal is the difference voltage between the electrode pair. The signal conditioning circuit contains the low power instrumentation amplifier which amplifies this difference voltage.
Fig. 1 Basic block diagram of the system
The advantage of using an instrumentation amplifier is, it has very high input impendence and high CMRR. Thus, after signal conditioning the ESG signal is transferred to the controller for feature extraction. This system also measures blood pressure and body temperature of the patient under observation. The SPO2 sensor is used to measure the blood pressure followed by signal conditioning circuit. To measure the body temperature LM35 sensor is used because it gives best result in its class. These detected parameters are transferred to the ARM 7 processor, LPC 2138 for further processing. The basic block diagram of the system is illustrated in Fig. 1.
In this proposed system, Joint QRS detection compression (JQDC) technique is used for detection of QRS complex from ECG signal and to compress the data to transmit over the web. The detected ECG signal and other detected parameters are displayed locally on the LCD screen and also transmitted to a web server so that doctor can analysis this data related to patients' health remotely.
III. JOINT QRSDETECTION COMPRESSION
There are several forward predictions-based approaches which can be used for QRS detection such as in [4]. In such kind of approaches, a forward predictor is used to estimate the current sample of the ECG signal from its past samples. However, for signal like QRS complex, there are signal regions with steep amplitude variations, so the predictor statistics are considerably different and hence will result in a higher prediction error.
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 5, Issue 5, May 2014)
[image:3.612.321.564.118.237.2]127 Fig. 2 JQDC scheme: General block diagram.
The transfer function of this filter can be given as (1). In the further process by using a high - pass filter, the QRS complex can be extracted.
E(z) = (1)
The linear predictive coding is a main part of lossless data compression techniques [11] for the redundancy reduction between neighboring signal samples. This motivates to develop a scheme that jointly performs QRS detection and lossless compression (JQDC) as shown in Fig. 2. Because of this, the computational load of the linear predictive coding can be shared between QRS detection and data compression.
In the stated JQDC scheme, the current samples are
estimated by using a linear predictor based on previous m
samples. The instantaneous prediction error is calculated by subtracting estimated valve from the actual sample. The instantaneous prediction error, after further processing is used for identifying the location of the QRS complex. Also the prediction error is encoded and packaged so as to obtain a compressed lossless representation of the original data which can be used for wireless transmission or local storage.
IV. QRS DETECTION
To locate the QRS complex from the ECG signal, the instantaneous prediction error, e(n), from the adaptive SSLMS predictor is used. This is because the error corresponding to QRS segment is relatively higher than that of P, T wave and baseline variations. The high frequency impulse noise of prediction error has to be filtered out so as to easily locate the QRS complex. Moving average filters are effective in removing impulse noises and smoothening of such signals. However, in doing so, the shape and the height of the error peaks corresponding to the QRS complex also gets smoothens and distorted. It is important to maintain the integrity of the signal content corresponding to QRS complex, while smoothening the high-frequency and impulse noise that corresponds to the other regions of ECG.
Fig. 3 QRS detection block diagram.
To tackle this, a Savtizky–Golay (SG) filter is used to remove the high-frequency impulse noise from the prediction error. After removing the impulse noise, the signal is further enhanced by using a squaring and moving sum operation for adaptive thresholding and false peak detection. The block diagram of the QRS detection scheme is illustrated in Fig. 3.
Savtizky–Golay (SG) filter [12] smoothing the incoming signal by approximating the signal within a specified window of size L to a polynomial of order K, which best matches the given signal in a least-squares sense. A polynomial of order K is defined as,
(2)
It is shown in [2] that this polynomial fitting and revaluation is equivalent to discrete convolution with a fixed impulse response,
(3)
Where, is the SG filtered prediction error.
SG filters are beneficial in maintaining the higher order moments in the input signal. While suppressing the impulse noise, SG filter maintains the features of distribution, such as relative maxima, minima, and width and reduces the smoothening of peak heights [12]. The noise suppression capability of SG filters is not as well as moving average filter. After suppressing the impulse noise level relative to the QRS peaks, a moving average operation can be used to further smoothen the signal.
[image:3.612.52.286.140.200.2]International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 5, Issue 5, May 2014)
[image:4.612.55.280.136.464.2]128 (4)
Fig. 4 Threshold adaptation routine for QRS detection.
Fig. 5 Peak detection
The number of samples for moving integration, M, is selected such that it corresponds to the width of the QRS complex in the ECG signal.
The enhanced signal, eno(n), is continuously scanned to find QRS peaks. An adaptive threshold is used for detection because the signal amplitudes vary across patients and based on external conditions. The threshold is
initialized with a default value, in the beginning, and
a new threshold value is calculated based on the maximum value of the signal in a training period of the first 2 s, that means the threshold is updated with 25% of the maximum value during this period. After that, each time the signal exceeds the threshold value, the peak detection algorithm
detects and locates the presence of a peak, . The
average threshold is computed as 25% of the
average of last four detected peaks, i.e.,
. (5)
In order to prevent sudden amplitude changes from affecting the threshold adaptation, an automatic threshold reduction mechanism is used to ensure that a decrease in the peak amplitude of the signal corresponding to QRS peaks does not cause a lockup condition. Because of this subsequent peaks are not detected due to a higher threshold. For this purpose, the RR intervals from past four
successful detections are averaged to find . For every
duration, if a new peak is not detected, then the
average threshold is reduced to 75% of its current value. To ensure that the noise signal should not be picked up as QRS peaks, this threshold reduction continues until the average threshold hits a predefined minimum value. The threshold
adaptation routine is given in Fig. 4. The is
calculated as,
. (6)
[image:4.612.52.283.475.655.2]International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 5, Issue 5, May 2014)
129 Fig. 6 Lossless data compression scheme.
In the detection, the maximum signal amplitude within this search window is considered as the new threshold, Tamp. A falling edge is determined by a continuous decrease in the signal amplitude.
V. LOSSLESS DATA COMPRESSION
The dynamic range of the prediction error signal e(n) is low and centers around zero except for the segment corresponding to the QRS complex. To preserve the data without any loss, we need (M + 2) bits to fully represent e(n), where M is the width of x(n). To reduce the bit-width of e(n) without incurring any data loss, the different coding scheme can be used. Only the coded data have to be stored or transmitted instead of transmitting the whole sample resulting in power/memory savings. For coding e(n), variable length coding schemes like Huffman and Arithmetic coding [11] can be used, which produce prefix free codes. The JQDC scheme is compatible with any of these existing coding schemes. Further packaging is required to make it practical fixed-length packets that can be stored in fixed word length SRAM/Flash or interfaced through a standard I/O like SPI. The general lossless data compression scheme is illustrated in the Fig. 6. In this JQDC scheme, a simple bit packaging scheme which can pack data samples of varying bit widths dynamically to produce a fixed-length data output of 16 bits. Each individual data packet will be marked with a unique header so as to easily identify and decode the data while decompressing. The dynamic data packaging scheme uses a simple priority encoding technique to frame fixed-length data from samples of multiple bit widths. By using prediction error coding and dynamic data packaging the ECG signal is compressed with minimum data loss.
VI. PERFORMANCE RESULTS
To evaluate the performance of QRS detection, false positive (FP) and false negative (FN) detections are used. FP indicates the declaration of a QRS peak when there is actually no beat present and FN indicates that the algorithm failed to detect an actual beat.
By using FP and FN, the sensitivity (Se) and positive prediction (+P) are calculated using the following equations:
(7)
(8)
Here, TP stands for True Positive, i.e., the number of QRS peak correctly detected.
To evaluate the performance of data compression technique used in this system, the bit compression ratio (BCR) is computed by using bit widths of compressed and uncompressed samples.
(9)
Where and refers to the bit widths of
compressed and uncompressed samples, respectively. The joint coding-packaging scheme gives fixed-length frames, which are compatible with Memory/SPI, etc., at a very low complexity compared to [2] and [11]. The used joint approach implements two functions, i.e., compression and QRS detection, both of which are essential for wearable applications and share the computational complexity. All the other approaches stated till date implement only one of the functions.
VII. CONCLUSION
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 5, Issue 5, May 2014)
130 REFERENCES
[1] C. J. Deepu and Y. Lian, " A joint QRS detection and data compression scheme for wearable sensors", IEEE Transactions Biomedical Engineering, vol. 62, no.1, January 2014.
[2] Hyejung Kim, Sunyoung Kim, Nick Van Helleputte, Antonio Artes, Mario Konijnenburg, Jos Huisken, Chris Van Hoof, Refet Firat Yazicioglu, " A Configurable and Low-Power Mixed Signal SoC for Portable ECG Monitoring Applications", IEEE Transactions Biomedical Circuit and systems, vol. 8, no.2, April 2014.
[3] Nassim Ravanshad, Hamidreza Rezaee-Dehsorkh, Reza Lotfi, and Yong Lian, " A level-crossing based QRS-detection algorithm for wearable ECG sensors", IEEE Transactions of Biomedical and Health Informatics, vol. 18, no.1, January 2014.
[4] B.-U. Kohler, C. Hennig, and R. Orglmeister, ―The principles of software QRS detection,‖ IEEE Eng. Med. Biol. Mag., vol. 21, no. 1. pp. 42–57, Jan./Feb. 2002.
[5] F. Zhang and Y. Lian, ―QRS detection based on multiscale mathematical morphology for wearable ECG devices in body area networks,‖ IEEE Trans. Biomed. Circuits Syst., vol. 3, no. 4, pp. 220–228, Aug. 2009.
[6] N. Arzeno, Z. Deng, and C. Poon, ―Analysis of first- derivative based QRS detection algorithms,‖ IEEE Trans. Biomed. Eng., vol. 55, no. 2, pp. 478–484, Feb. 2008.
[7] Shubha Kadambe, Robin Murray, and G. Faye Boudreaux-Bartels, "Wavelet Transform-Based QRS Complex Detector", IEEE Transactions Biomedical Engineering, vol. 46, no.7, July 1999. [8] Valtino X. Afonso, Willis J. Tompkins, Truong Q. Nguyen, and
Shen Luo, "ECG Beat Detection Using Filter Banks", IEEE Transactions Biomedical Engineering, vol. 46, no.2, February 1999. [9] Philip de Chazal, Maria O’Dwyer, and Richard B. Reilly,
"Automatic Classification of Heartbeats Using ECG Morphology and Heartbeat Interval Features", IEEE Transactions Biomedical Engineering, vol. 51, no.7, July 2004.
[10] S.-G. Miaou and S.-N. Chao, ―Wavelet-based lossy-to-lossless ECG compression in a unified vector quantization framework,‖ IEEE Trans. Biomed. Eng., vol. 52, no. 3, pp. 539–543, Mar. 2005. [11] E. Chua and W. Fang, ―Mixed bio-signal lossless data compressor
for portable brain-heartmonitoring systems,‖ IEEE Trans. Consum. Electron., vol. 57, no. 1, pp. 267–273, Feb. 2011