Preview only show first 10 pages with watermark. For full document please download

Implementation Of Real-time Filter Using An Open-source Platform Oriented To R-wave Detection

The electrocardiographic signal (ECG) reflects the electrical behavior of the human heart. The ECG signal is composed by different waveforms: P, Q, R, S and T. The R wave is normally the easiest waveform to identify on the ECG. The R wave is also the

   EMBED


Share

Transcript

    978-1-5090-3797-1/16/$31.00 ©2016 IEEE Abstract   The electrocardiographic signal (ECG) reflects the electrical behavior of the human heart. The ECG signal is composed by different waveforms: P, Q, R, S and T. The R wave is normally the easiest waveform to identify on the  ECG. The R wave is also the component with the highest amplitude and its detection allows the estimation of the heart rate. This paper is devoted to present the design of a digital filter implemented on an open hardware platform called Arduino to detect the R wave of the ECG signal. The filter design is based on the integration of a smooth  filter and the first order derivative. The implemented digital filter has been tested using different ECG signals  generated by a patient simulator. Finally, this paper  shows a positive performance of the implemented filter in tests related to R wave detection even in the presence of unwanted noise components. 1.   Introduction The electrocardiographic signal (ECG) describes the electrical behavior of the heart. ECG is composed by different waves: P, Q, R, S and T [1]. The component of ECG with higher amplitude is R wave. The detection of R wave is the principal process in heart rate estimation [2]. Figure 1 shows an example of ECG signal including a QRS complex. Figure 1. ECG signal and QRS complex . Techniques for R wave detection have been developed using time and frequency domain. Examples of time domain techniques are bank filters [3], threshold based in ECG histogram [4], adaptive threshold [5] and integral  projection [6]. The papers mentioned are based on Pan- Thompkins theory about bandwidth of R wave with central frequency: (5 – 15 Hz) [4]. Meanwhile, Hilbert Transform [7], Wavelet transform [8,9], empirical mode decomposition [10] and the combinations of both [11] are methods based on frequency domain [12]. Currently, literature reports methods oriented to R wave detection implemented in portable devices [13]. Positive results have been obtained using Field-Programmable Gate Array (FPGA) [14], Digital Signals Processors (DSP) [15], Microcontrollers [16] and the prototypes based on Arduino Platforms [16]. On the other hand, the Arduino Platforms is an open-hardware tool oriented to devices design [18] and its frequently application is acquisition data block [19]. Arduino sketches are written in C language and its integrated development environment (IDE) contains a text editor for writing code [20]. In this paper, a digital filter methodology is proposed. The methodology aims to detect the R wave, this detection is mainly related to highlight numerically the R wave over the other parameters. The design is based on the integration of smooth filter and first order derivative. The smooth filter is based on differential equation shown in (1). The filter order is the variable L and describes the number of samples of input signal  x[n]  [21 ,22]. [] = 1[ −]   1  Where Y[n] is the output sample, n  is the current sample and k   indicates in the index for the former samples. First order derivative is described in (2) and the output sample is calculated by the difference between actual sample and the former one. [] = []−[ −1]  (2) Implementation of Real-Time Filter Using an Open-Source Platform Oriented to R-wave Detection   Javier Gonzalez, Eduard Galvis, Cristian Velandia Faculty of Electronic Engineering Universidad Santo Tomas Colombia {javiergonzalezb, eduardgalvis, crisianvelandia}@usantotomas.edu.co     2 One goal of this paper is to show results related to design and implementation of the filtering system. The filtering system has a cascade configuration. Two parts make up the filtering system: the first one is used for signal smoothing and the second one calculates the first order derivative. This system allows the R wave detection of ECG signal without time-to- frequency transforming. The system has been implemented in an open-source  platform for real time processing. 2.   Materials and Methods The ECG signal is acquired using the Shield EKG – EMG which is an extension module for Arduino platform. The shield is up to 6 shields forming 6 channels and each one converts the analog differential signal (ECG) from electrodes over skin surface into a single analog ECG signal, which is amplified and filtered. As a previous step, the shield has a High voltage rejection followed by a high frequency (HF) rejection stage. In order to amplify and filter the signals it has an instrumental amplifier (Gain=10), followed by a variable gain Operational amplifier (Gain set in = 6.101) in between two high pass 1  pole filters with cut off frequency of 0.16 Hz and finally a low pass 3 rd  order analog “Besselworth” filter with cut off frequency of 40 Hz [24]. The main component of the filtering system is an open-source platform Arduino DUE, which allows obtaining a discretized ECG signal. The Arduino DUE platform is composed by a 32 bits ARM cortex microcontroller. For signal acquisition purpose, the platform has a 12 bit-resolution analog to digital converter (ADC) [23]. A device called “vital signs simulator PROSIM 2” manufactured by Fluke Inc. is used as the ECG signal source due to its portability and high-quality waveforms. The PROSIM 2 can generate ECG signals with different frequency and amplitude values and even noise caused by  power line interferences or baseline wander [25]. Figure 2 shows a data acquisition block diagram with its components interconnection. The sequence of the algorithm implemented the  platform is shown in Figure 3. The first stage is the sample acquisition using an analog-to-digital converter. Then, the acquired sample becomes the input of the smoothing filter and the following stage is the first derivative filter. The last stage is de output sample generated by the digital-to-analog converter (DAC). The system was designed using a 1ms-delay and it is taken as sampling period ( Ts ). Considering Ts , the sampling frequency (  Fs ) is 1000 Hz. The smooth filter was designed and simulated in the Matlab computing environment using (1). The order of smooth filter was selected according to the bandwidth. Figure 4 shows the relation between bandwidth and order of the smooth filter. The cut of low frequency of smooth filter is selected based on the bandwidth of R-wave frequency components. The implementation of the smoothing filter is illustrated in Figure 5. In the algorithm, the variable called “  sample”  has the input sample from the ADC and it is the input of the smoothing filter. The smoothing filter output is stored in a variable called “ C  ” and then it is divided by 2 using a shift register. Figure 2. Hardware interconnection diagram of theimplemented system. Figure 3. Block diagram of the implemented system. Figure 4. Frequency response of the smooth filter.   3 The first order derivative filter (based on equation 2) is simulated in Matlab environment and its frequency response is illustrated in Figure 6. The implementation of first order filter derivative is shown in Figure 7. According to the algorithm, the output is calculated from the difference between variables M0 and M1. 3.   Results. The experiment setup is depicted in figure 8. Left side shows the implementation based on elements mentioned in figure 2. The real-time output signals obtained after the filtering process is shown at the rightmost side of figure 8. Signals were acquired using Digital Oscilloscope Tektronix TDS 2024C. In order to confirm the sampling frequency value, a  primary test was executed using a binary signal to indicate the start and the end of the filtering process. The results of this experimental test are illustrated in Figure 9. The test for the execution time of the smoothing filter and the first order derivative filter are shown in Figure 10. Test using ECG signal generated by vital signs simulator were done with different frequency values, Figure 11 shows the R waves detection using 60 beat per minute (bpm). Figure 5. Implemented algorithm for smooth filtering purposes. Figure 6. Frequency response of first order derivativefilter. Figure 7. Implemented algorithm for the first order derivative. Figure 8. Experiment Setup. Figure 9. Sampling frequency test. Figure 10. Timing test for the smooth and first order filters.   4 The results using an ECG signal of 180 bpm are shown in Figure 12. A test using ECG signal under noise components is illustrated in Figure 13. This test shows the result using ECG signal with additive muscle artifact. The noise is also generated by patient simulator. Figure 14 shows the test results using ECG signal with drift baseline. 4.   Conclusions The system described in this paper allows detection of R-wave using smooth filter and first order derivative. Results highlight the performance of filtering systems using ECG signal with different frequencies and noise components. The system was implemented in an open-source  platform and its execution time does not alter the sampling  period. The filtering process proposed in this paper has not  been compared numerically with other techniques, however the proposed strategy does not requires complex mathematical operations, which means an advantage  because it decreases the computational burden, which is typically relates to the filtering process fulfilled with complex algorithms. Acknowledgments This work was partially supported by Found for Research (FODEIN 2015-2016) by Universidad Santo Tomas, Colombia. The results were obtained in the research  project: “Informatics Platform for Heart Rate Variability Analysis oriented to Analysis services and Descripts Calculation. Step III”. Project Code: 1608304-014. References [1]   Hall, John Edward; Guyton, Arthur C. Textbook of medical  physiology. London: Saunders, 2011. Figure 11. R wave detection using 60 bpm ECG signal. Figure 12. R wave detection using 180 bpm ECG signal. Figure 14. Test results using ECG signal with drift base line. Figure 13. Test results using ECG signal with muscle artifacts.   5 [2]   Cygankiewicz, Iwona; Zareba, Wojciech. Heart rate variability. Handb Clin Neurol, 2013, vol. 117, no 3, p. 379-393. [3]   G. Javier, M. Davis, V. Cristian and N. Johann, "R-wave detection algorithm using integration of virtual instruments," Signal Processing, Images and Computer Vision (STSIVA), 2015 20th Symposium on, Bogota, 2015,  pp. 1-6. [4]   Gonzalez, Javier E. Threshold calculation for R wave detection in complex cardiac. TecnoLógicas, 2014, vol. 17, no 32, p. 47-55. [5]   G. Chen, X. Wang and W. Wan, "An ECG R-wave detection algorithm based on adaptive threshold," 2015 International Conference on Smart and Sustainable City and Big Data (ICSSC), Shanghai, 2015, pp. 145-149. [6]   Yurun Ma, Yi Tian, Yide Ma, Yan Zhang and Kun Zhan, "A new real-time R-wave detection algorithm based on integral projection function," Biomedical Engineering and Sciences (IECBES), 2012 IEEE EMBS Conference on, Langkawi, 2012, pp. 837-842. [7]   T. Chanwimalueang, W. von Rosenberg and D. P. Mandic, "Enabling R-peak detection in wearable ECG: Combining matched filtering and Hilbert transform," 2015 IEEE International Conference on Digital Signal Processing (DSP), Singapore, 2015, pp. 134-138. [8]   J. Felix, R. Alcaraz and J. Rieta, "Adaptive wavelets applied to automatic local activationwave detection in fractionated atrial electrograms of atrial fibrillation," 2015 Computing in Cardiology Conference (CinC), Nice, 2015, pp. 45-48. [9]   C. C. Lin, W. Hu and Y. W. Lin, "A wavelet-based high-frequency analysis of fragmented QRS complexes in  patients with myocardial infarction," 2015 Computing in Cardiology Conference (CinC), Nice, 2015, pp. 565-568. [10]   R. Mabrouki, B. Khaddoumi and M. Sayadi, "R peak detection in electrocardiogram signal based on a combination between empirical mode decomposition and Hilbert transform," Advanced Technologies for Signal and Image Processing (ATSIP), 2014 1st International Conference on, Sousse, 2014, pp. 183-187. [11]   B. Khiari, E. Ben Braiek and M. Jemni, "R-wave detection using EMD and bionic wavelet transform," Electrical Engineering and Software Applications (ICEESA), 2013 International Conference on, Hammamet, 2013, pp. 1-5. [12]   Sornanathan, L.; Khalil, I., "Fitness monitoring system  based on heart rate and SpO2 level," in Information Technology and Applications in Biomedicine (ITAB), 2010 10th IEEE International Conference, pp.1-5, 3-5 Nov. 2010. [13]   Xuwen Li; Qiang Wu; Shuicai Wu, "Hardware design of ADSP-BF548 based portable patient monitor," in Electrical and Control Engineering (ICECE), 2011 International Conference on, pp.5948-5951, 16-18 Sept. 2011. [14]   E. H. El Mimouni and M. Karim, "A MicroBlaze-based Multiprocessor System on Chip for real-time cardiac monitoring," Multimedia Computing and Systems (ICMCS), 2014 International Conference on, Marrakech, 2014, pp. 331-336. [15]   Jia-Wei Jhuang and Hsi-Pin Ma, "A patch-sized wearable ECG/respiration recording platform with DSP capability," 2015 17th International Conference on E-health  Networking, Application & Services (HealthCom), Boston, MA, 2015, pp. 298-304. [16]   P. Kumar, M. Jain and S. Chandra, "Low Cost, Low Power QRS Detection Module Using PIC," Communication Systems and Network Technologies (CSNT), 2011 International Conference on, Katra, Jammu, 2011, pp. 414-418. [17]   Ungson, Y.; Reyna, M.A.; Bravo-Zanoguera, M.E., "Development of an ambulatory ECG system based on Arduino and mobile telephony for wireless transmission," in Health Care Exchanges (PAHCE), 2014 Pan American,  pp.1-5, 7-12 April 2014. [18]   Y. A. Badamasi, "The working principle of an Arduino," Electronics, Computer and Computation (ICECCO), 2014 11th International Conference on, Abuja, 2014, pp. 1-4. [19]   M. Matijevic and V. Cvjetkovic, "Overview of architectures with Arduino boards as building blocks for data acquisition and control systems," 2016 13th International Conference on Remote Engineering and Virtual Instrumentation (REV), Madrid, 2016, pp. 56-63. [20]   A. A. Galadima, "Arduino as a learning tool," Electronics, Computer and Computation (ICECCO), 2014 11th International Conference on, Abuja, 2014, pp. 1-4. [21]   Jackson, Leland B. Digital Filters and Signal Processing: With MATLAB® Exercises. Springer Science & Business Media, 2013. [22]   González, Javier E.; Velandia, Cristian; Nieto, Johann. Implementation of real-time digital filter for the R wave detection. TecnoLógicas, 2015, vol. 18, no 34, p. 75-86. [23]   Arduino. In https://www.arduino.cc/ . Consulted on July 30 2016. [24]   https://www.olimex.com/Products/Duino/Shields/SHIELD-EKG-EMG/ Consulted on July 30 2016. [25]   Fluke.http://www.flukebiomedical.com/biomedical/usen/biomedical-test/simulators-controllers/prosim-2-and-3-vital-signs-patient-simulators.htm?pid=76347. Consulted on July 30 2016.