We Are Intechopen, The World'S Leading Publisher of Open Access Books Built by Scientists, For Scientists
We Are Intechopen, The World'S Leading Publisher of Open Access Books Built by Scientists, For Scientists
4,100
Open access books available
116,000
International authors and editors
120M Downloads
154
Countries delivered to
TOP 1%
most cited scientists
12.2%
Contributors from top 500 universities
Chile
1. Introduction
An electrocardiogram (ECG) is a graphical record of bioelectrical signal generated by the
human body during cardiac cycle (Goldschlager, 1989). ECG graphically gives useful
information that relates to the heart functioning (Dubis, 1976) by means of a base line and
waves representing the heart voltage changes during a period of time, usually a short period
(Cuesta, 2001).
Putting leads on specific part of the human body, it is possible to get changes of the
bioelectrical heart signal (Goldschlager, 1989) where one of the most basic forms of
organizing them is known as Einthoven lead system which is shown in Figure 1 (Vidal &
Pavesi, 2004; Vidal et al., 2008).
www.intechopen.com
154 Applications of Digital Signal Processing
Arrhythmias.
Pericarditis.
Generalized suffering affecting heart and blood pressure.
Cardiac medicine effects, especially digital and quinidine.
Electrolytic transformations.
In spite of the special value, the ECG is considered only a laboratory test. It is not an
absolute truth concerning the cardiac pathologies diagnosis. There are examples of patients
presenting string heart diseases which present a normal ECG, and also perfectly normal
patients getting an abnormal ECG (Goldschlager, 1989). Therefore, an ECG must always be
interpreted with the patient clinical information.
2. Electrocardiographic signal
According to (Proakis & Manolakis, 2007) a signal can be analyzed and processed in two
domains, time and frequency. ECG signal is one of the human body signals which can be
analyzed and worked in these two domains.
www.intechopen.com
A DSP Practical Application: Working on ECG Signal 155
As it is appreciated, the amplitude values of human body bioelectrical signals are measured
in micro volts (mV). Furthermore, the amplitude values of these signals are small voltage
values and are being caught using traditional electronic devices. This is an important
characteristic which must be considered to implement an electronic device in order to obtain
bioelectrical signals.
There are different sources of noise at the moment of getting a human body signal. The
frequency domain helps us to know of how additional sources affect the important signal in
the time domain.
Figure 3 shows frequency range of QRS complex of an ECG signal next to the frequency
range of common noise sources.
Fig. 3. Frequency range of QRS complex on an ECG signal next to noise sources (Vidal et al.,
2008)
3. Digital ECG
Building a device to get and process the ECG signal must consider the signal characteristics.
According to (Cuesta, 2001; Vidal & Pavesi, 2004), facing individually each part of the global
problems is a technique applicable in order to get good practical results.
Figure 4 presents each part or block of a basic digital ECG according to reviewed literature
www.intechopen.com
156 Applications of Digital Signal Processing
(Cuesta, 2001; Vidal et al., 2008; Vidal & Gatica, 2010) where the most important part
corresponds to the amplifying module because of a bioelectrical signal that represents a low
potential, and sophisticated amplifiers are required for obtaining and recording it (Vidal &
Pavesi, 2004; Vidal et al., 2008; Vidal & Gatica, 2010).
The following sections present experiences building a device for getting the ECG signal, and
works related to processing ECG signal.
www.intechopen.com
A DSP Practical Application: Working on ECG Signal 157
For these reasons, common mode rejection ratio (CMRR) rate is a desirable characteristic of
an amplifier working on differential mode. On a day today practice, a problem denominated
contact impedance disbalance appears (Townsend, 2001) that is produced when there are
different interfaces impedances between the skin and electrodes in a form that the common-
mode potential is higher in one of the two voltage sources. Therefore, part of the common-
mode voltage is worked as differential voltage and amplified according to the amplifier
gain. This occasionally produces saturation on the next amplifying module stage, if the
amplification module were composed by more stages. This voltage, which is generally
continuous, can be eliminated using a simple high-pass filter. Hence, the output voltage of
the differential amplifier would consist of 3 components (Townsend, 2001; Vidal & Pavesi,
2004):
Wished output due to the differential amplification on the ECG signal.
Common-mode signal not wished due to the CMRR is not infinite.
Common-mode signal not wished due to the disbalance on the impedance contact.
(Wells & Crampton, 2006) indicate that weak signals require an amplification of 1000 at least
to produce adequate signal levels for future works on it. (Vidal & Pavesi, 2004) used an
instrument amplifier model INA131 which presents a fixed CMRR of 100, and according to
the associated datasheet it is adequate for biomedical instrumentation. The analog to digital
conversion stage (A/D conversion) is always done when the signal is amplified. The
electronic schemes of a digital electrocardiographic device according to (Vidal & Gatica,
2010) are presented on figures 6 and 7, respectively. (Vidal & Pavesi, 2004; Vidal & Gatica,
2010) use the TLC1541 A/D converter. It is necessary to indicate that both electronic items,
INA131 and TLC1541, are less expensive.
www.intechopen.com
158 Applications of Digital Signal Processing
www.intechopen.com
A DSP Practical Application: Working on ECG Signal 159
www.intechopen.com
160 Applications of Digital Signal Processing
www.intechopen.com
A DSP Practical Application: Working on ECG Signal 161
H ( z)
1z
(4)
1 z 1
H ( )
1 e 1 cos jsen
j
1 1 cos jsen
j
2 sen2 j 2sen cos
2 2 2
2
2 sen j 2sen cos
2 2 2
sen sen j cos
2 2 2
sen sen j cos
2 2 2 (5)
sen sen j cos sen j cos
2 2 2 2 2
sen sen j cos sen j cos
2 2 2 2 2
sen sen sen cos cos j sen cos sen cos
2 2 2 2 2 2 2 2 2
sen
2
sen cos ( 1) jsen ( 1)
2 2 2
sen
2
www.intechopen.com
162 Applications of Digital Signal Processing
Finally, amplitude and phase responses are showed on Eq. 6 and Eq. 7, respectively.
sen
H ( ) 2 (6)
sen
2
( ) ( 1) (7)
2
The filter’s group delay is ( 1) / 2 , and the associated gain for ω=0 is α determined
evaluating |H (ω=0)|.
Once completely characterized the low-pass filter, designing the high-pass filter is an easy
task using the following transfer function:
( 1) ( 1)
( 1) 1
1 z 1 / z 2 z 2 z /
H ( z) z 2 1 / (8)
1z 1 z1
( 1) ( 1)
y[n] y[n 1] x[n] / x n x n 1 x[n ] / (9)
2 2
Getting amplitude response for this filter is mathematically complex. Nevertheless,
theoretically this filter must have the same cut frequency of the subjacent low-pass filter in
inverse order. Furthermore, the values of phase response and group delay of the high-pass
filter are the equal to the same parameters for the low-pass filter (Smith, 1999).
For a cut frequency of 430 Hz, α values and associated cut frequency (-3 dB.) are shown on
Table 3.
Fig. 14. Low-Pass / High-Pass Lynn’s Filter Amplitude Response - Cut Frequency 0.2 Hz
www.intechopen.com
A DSP Practical Application: Working on ECG Signal 163
Fig. 15. Low-Pass / High-Pass Lynn’s Filter Amplitude Response - Cut Frequency 0.5 Hz
Fig. 16. Low-Pass / High-Pass Lynn’s Filter Amplitude Response - Cut Frequency 5 Hz
Figures 17, 18, 19, 20 and 21 present signals registered by an implement ECG device using
Figure 4 and 5 circuits (Vidal & Gatica, 2010). Figure 15 shows a pure signal ECG without
applying filters to delete noise. Figure 18 shows the 35 Hz low-pass Lynn’s filter application
on the Figure 17 signal. Figure 18 presents the application of a 48 Hz low-pass filter
application over the Figure 17 signal. In Figures 20 and 21 the application of 0.2 and 0.5
high-pass Lynn’s filters respectively on the Figure 17 signal is shown. It is important to be
aware of the group delay effect on the ECG signal after the 0.2 Hz high-pass Lynn’s filter
application, 423 samples in this case (around 1 second). Likewise, for the 0.5 Hz high-pass
Lynn’s filter application there is a group delay of 160 samples.
www.intechopen.com
164 Applications of Digital Signal Processing
Fig. 20. Filtered ECG Signal Using High-Pass 0.2 Hz Lynn’s Filter
Fig. 21. Filtered ECG Signal Using High-Pass 0.5 Hz Lynn’s Filter
The filters application allows improving the ECG signal quality in a remarkable manner.
Figure 22 shows the application of a low-pass Lynn’s filter of 48 Hz and a high-pass Lynn’s
filter of 0.5 Hz.
Fig. 22. Filtered ECG Signal Using a Low-Pass 48 Hz Lynn’s Filter and a High-Pass 0.5 Hz
Lynn’s Filter
www.intechopen.com
A DSP Practical Application: Working on ECG Signal 165
In the literature there are several algorithmic approaches for detecting QRS complexes of
ECG signal with pre-filtering of the signal (Thakor et al., 1984)
The implementation of incremental improvements to a classical algorithm to detect QRS
complexes was realized in an experiment as mentioned in (Vidal et al., 2008; Vidal & Gatica,
2010) which in its original form do not have a great performance. The first improvement
based on the first derivative is proposed and analyzed in (Friese at al., 1990). The second
improvement is based on the use of nonlinear transformations proposed in (Pan &
Tompkins, 1985) and analyzed in (Suppappola & Ying, 1994; Hamilton & Tompkins, 1986).
The third is proposed and analyzed in (Vidal & Pavesi, 2004; Vidal et al., 2008), as an
extension and improvement of that is presented in (Friesen et al., 1994) using characteristics
of the algorithm proposed in (Pan & Tompkins, 1985). It should be noted that the three
algorithmic improvements recently mentioned, used classical techniques of DSP (Digital
Signal Processing). It is noteworthy to indicate that the second improvement proposed in
(Pan & Tompkins, 1985) is of great performance in the accurate detection of QRS complexes,
for even the modern technology are not able to provide better results.
To test the algorithms that work on ECG signal, it is not necessary to implement a data
acquisition system. There are specialized databases with ECG records for analyzing the
performance of any algorithm to work with ECG signals (Cuesta, 2001; Vidal & Pavesi,
2004). One of the most important is the MIT DB BIH (database of arrhythmias at
Massachusetts Institute of Technology,) (MIT DB, 2008).
In Tables 4, 5, 6 and 7, respectively, are the results obtained with the application of
incremental improvements made to the first algorithm for detecting QRS complexes in some
records at MIT DB BIH. A good level of performance reached in the final version of
algorithm of detection of QRS complexes implemented in this work could be appreciated,
(Table 7), compared to its original version (Table 4)
www.intechopen.com
166 Applications of Digital Signal Processing
5. Conclusion
The implementation of equipments for the acquisition and processing of bioelectrical human
signals such as the ECG signal is currently a viable task. This chapter is a summary of
previous works with simple equipment to work with the ECG signal. Currently the authors
are working on:
Improvements to the work done:
Increase the number of leads purchased. The A/D converter allows up to 11
simultaneous inputs and supports a sampling rate of 32 KHz. Under certain conditions.
12 simultaneous leads are required for a professional team.
Modify RC filters in the filter stage for more elaborate filters to ensure a better
discrimination of the frequencies that are outside the pass-band.
Include isolation amplifiers to increase levels for the security of patients, isolating the
direct loop with the computer, which is generated with the design proposed in this
chapter. Even with the probability of a catastrophe to occur which are low, but the
possibility exists and such massive use should be avoided, before including these
amplifiers.
Unifying routine readings of A/D converter and display of results.
Certify the technical characteristics of the circuits mounted in order to validate its
massive use.
Future works:
Increase the use of this equipment for capturing other bioelectrical signals such as
electroencephalographic and electromygraphic.
Implement a tool to validate algorithms of detection QRS, based on the MIT DB.
www.intechopen.com
A DSP Practical Application: Working on ECG Signal 167
Apply wavelets in the design and implementation of filtering algorithms and detector
of waveforms.
Analyze other techniques for detection of parameters like, fuzzy logic, genetic
approaches and neural networks.
Make use of information technologies, such as a database in order to obtain relevant
information of the patients and their pathologies.
Finally, this work is a good demonstration of the potential applications of Hardware -
Software, especially in the field of biotechnology. The quantity and quality of the possible
future works show the validity of the affirmation in academic and professional aspects. In
addition to the likely use of this work in medical settings, it also gives account of the scope
of works such as ECG digital, which are practically limitless.
6. Acknowledgment
To Dr. David Cuesta of the Universidad Politécnica de Valencia for his valuable
contributions and excellent disposition to the authors of this work; to cardiologist Dr.
Patricio Maragaño, director of the Regional Hospital of Talca’s Cardiology department, for
his clinical assessment and technical recommendations for the development of the
algorithmic procedures undertaken.
7. References
Ahlstrom, M. L.; Tompkins, W. J. (1985). Digital Filters for Real-Time ECG Signal
Processing Using Microprocessors, IEEE Transaction on Biomedical Engineering,
Vol.32, No.9, (March 2007), pp. 708-713, ISSN 0018-9294
Clusin, W. T. (2008). Mechanisms of calcium transient and action potential alternans in
cardiac cells and tissues. American Journal of Physiology, Heart and Circle Physiology,
Volume 294, No 1, (October 2007), H1-H10, Maryland, USA.
Cuesta, D. (September 2001). Estudio de Métodos para Procesamiento y Agrupación de
Señales Electrocardiográficas. Doctoral Thesis, Department of Systems Data Processing
and Computers (DISCA) , Polytechnic University of Valencia, Valencia, Spain.
Dubin, D. (August 1976). Electrocardiografía Práctica : Lesión, Trasado e Interpretación, McGraw
Hill Interamericana, 3rd edition, ISBN 978-968-2500-824, Madrid, Spain
Goldschlager, N. (June 1989). Principles of Clinical Electrocardiographic, Appleton & Lange,
13th edition, ISBN 978-083-8579-510, Connecticut, USA
Friesen, G. M.; Janett, T.C.; Jadallah, M.A.; Yates, S.L.; Quint, S. R.; Nagle, H. T. (1990). A
Comparison of the Noise Sensitivity of Nine QRS Detection Algorithms, IEEE
Transactions on Biomedical Engineering, Vol.31, No.1, (January 1990), pp. 85-98., ISSN
0018-9294
Hamilton, P. S.; Tompkins, W. J. (1986). Quantitative Investigation of QRS Detection Rules
Using MIT/BIH Arrhythmia Database, IEEE Transactions on Biomedical Engineering,
Vol.31, No.3, (March 2007), pp. 1157-1165, ISSN 0018-9294
Kohler, B. –U.; Henning, C.; Orglmeister, R. (2002). The Principles of Software QRS
Detection, IEEE Engineering in Medicine and Biology, Vol.21, No.1, (January-
February 2002), pp. 42-57, ISSN 0739-5175
IEEE Transactions on Biomedical Engineering, Vol.31, No.11, (November 1984), pp. 702-706,
ISSN 0018-9294
www.intechopen.com
168 Applications of Digital Signal Processing
Lindner, D. (January 2009). Introduction to Signals and Systems, Mc Graw Hill Company, First
Edition, ISBN 978-025-6252-590, USA
MIT DB. (2008). , MIT-BIH Arrhytmia Database, 20.06.2011, Avalaible from
http://www.physionet.org/physiobank/database/mitdb/
Pan, J.; Tompkins, W. J. (1985). A Real-Time QRS Detection Algorithm, IEEE Transactions on
Biomedical Engineering, Vol.32, No.3, (March 2007), pp. 230-236, ISSN 0018-9294
Proakis, J. ; Manolakis, D. (2007). Digital Signal Processing : Principles, Algorithms, and
Applications, Prentice Hall, 3rd edition, ISBN 978-013-3737-622, New Jersey, USA
Smith, S. W. (1999). The Scientist and Engineer's Guide to Digital Signal Processing, Second
Edition, California Technical Publishing, 1999, ISBN 978-096-6017-632, California,
USA
Suppappola, S; Ying, S. (1994). Nonlinear Transform of ECG Signals for Digital QRS
Detection: A Quantitative Analysis, IEEE Transactions on Biomedical Engineering,
Vol.41, No. 4, (April 1994), pp. 397-400, ISSN: 0018-9294
Thakor, N. V.; Webster, J.; Tompkins, W. J. (1984). Estimation of QRS Spectra for Design of a
QRS Filter, IEEE Transactions on Biomedical Engineering, Vol.31, No.11, (2007), pp.
702-706, ISSN 0018-9294
Townsend, N. (2001). Medical Electronics, Signal Processing & Neural Networks Group, Dept. of
Engineering Science, University of Oxford, 21.06.2011, Available from
http://www.robots.ox.ac.uk/~neil/teaching/lectures/med_elec/
Vidal, C.; Pavesi, L. (January 2004). Implementación de un Electrocardiográfo Digital y
Desarrollo de Algoritmos Relevantes al Diagnóstico Médico. Bacherlor Thesis,
Computer Engineering, Catholic University of Maule, Talca, Chile
Vidal, C.; Charnay, P.; Arce, P. (2008). Enhancement of a QRS Detection Algorithm Based on
the First Derivative Using Techniques of a QRS Detector Algorithm Based on Non-
Linear Transformation, Proceedings of IFMBE 2008 4th European Conference of the
International Federation for Medical and Biological Engineering, Volume 22, Part 6, pp.
393-396, ISBN 978-354-0892-076, Antwerp, Belgium, December 2009
Vidal, C.; Gatica, V. (2010). Design and Implementation of a Digital Electrocardiographic
System, University of Antioquia Engineering Faculty Scientific Magazine, No. 55,
(September 2010), pp. 99-107, ISSN 0120-0230, Antioquia, Colombia
Wells, J. K.; Crampton, W. G. R. (2006). A Portable Bioamplifier for Electric Fish Research:
Design and Construction, Neotropical Ichthyology, Volume 4, (2006), pp. 295-299,
ISSN 1679-6225, Porto Alegre, Brazil
www.intechopen.com
Applications of Digital Signal Processing
Edited by Dr. Christian Cuadrado-Laborde
ISBN 978-953-307-406-1
Hard cover, 400 pages
Publisher InTech
Published online 23, November, 2011
Published in print edition November, 2011
In this book the reader will find a collection of chapters authored/co-authored by a large number of experts
around the world, covering the broad field of digital signal processing. This book intends to provide highlights
of the current research in the digital signal processing area, showing the recent advances in this field. This
work is mainly destined to researchers in the digital signal processing and related areas but it is also
accessible to anyone with a scientific background desiring to have an up-to-date overview of this domain. Each
chapter is self-contained and can be read independently of the others. These nineteenth chapters present
methodological advances and recent applications of digital signal processing in various domains as
communications, filtering, medicine, astronomy, and image processing.
How to reference
In order to correctly reference this scholarly work, feel free to copy and paste the following:
Cristian Vidal Silva, Andrew Philominraj and Carolina del Río (2011). A DSP Practical Application: Working on
ECG Signal, Applications of Digital Signal Processing, Dr. Christian Cuadrado-Laborde (Ed.), ISBN: 978-953-
307-406-1, InTech, Available from: http://www.intechopen.com/books/applications-of-digital-signal-
processing/a-dsp-practical-application-working-on-ecg-signal