A Real-Time Microprocessor QRS Detector System with a 1

advertisement
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 3, MARCH 1997
159
A Real-Time Microprocessor QRS Detector
System with a 1-ms Timing Accuracy for
the Measurement of Ambulatory HRV
Antti Ruha,* Member, IEEE, Sami Sallinen, Member, IEEE, and Seppo Nissilä
Abstract— The design, test methods, and results of an ambulatory QRS detector are presented. The device is intended
for the accurate measurement of heart rate variability (HRV)
and reliable QRS detection in both ambulatory and clinical use.
The aim of the design work was to achieve high QRS detection
performance in terms of timing accuracy and reliability, without
compromising the size and power consumption of the device. The
complete monitor system consists of a host computer and the
detector unit. The detector device is constructed of a commonly
available digital signal processing (DSP) microprocessor and
other components. The QRS detection algorithm uses optimized
prefiltering in conjunction with a matched filter and dual edge
threshold detection. The purpose of the prefiltering is to attenuate
various noise components in order to achieve improved detection
reliability. The matched filter further improves signal-to-noise
ratio (SNR) and symmetries the QRS complex for the threshold
detection, which is essential in order to achieve the desired
performance. The decision for detection is made in real-time
and no search-back method is employed. The host computer is
used to configure the detector unit, which includes the setting
of the matched filter impulse response, and in the retrieval and
postprocessing of the measurement results. The QRS detection
timing accuracy and detection reliability of the detector system
was tested with an artificially generated electrocardiogram (ECG)
signal corrupted with various noise types and a timing standard
deviation of less than 1 ms was achieved with most noise types
and levels similar to those encountered in real measurements. A
QRS detection error rate (ER) of 0.1 and 2.2% was achieved with
records 103 and 105 from the MIT-BIH Arrhythmia database,
respectively.
Index Terms— Biomedical monitoring, electrocardiography,
matched filters, signal detection, timing jitter.
I. INTRODUCTION
T
HE goal of this project was to develop a complete
heart rate variability (HRV) measurement system able
to measure, store, and post-process the HRV data obtained
from a subject. The system consists of a host computer and
a QRS detector device. The host computer is used to setup
the measurement parameters and to retrieve the measurement
results from the QRS detector. The QRS detector detects the
waves of the electrocardiogram (ECG) signal and calculates
Manuscript received June 19, 1995; revised September 13, 1996. Asterisk
indicates corresponding author.
*A. Ruha is with the University of Oulu, Department of Electrical Engineering, Oulu FIN-90570 Finland (e-mail: antti@ee.oulu.fi).
S. Sallinen was with the University of Oulu, Department of Electrical
Engineering, Oulu FIN-90570 Finland. He is now with Varian-Dosetek Oy,
Tietajantie, 14 Espoo FIN-02130 Finland.
S. Nissilä is with the University of Oulu, Department of Electrical Engineering, Oulu FIN-90570 Finland.
Publisher Item Identifier S 0018-9294(97)01468-7.
the intervals between two successive
waves to form beatto-beat (commonly abbreviated as RR) interval data set. The
RR interval data is post-processed in the host computer to
calculate statistical figures and visualize them for analysis. The
post-processing algorithm is also capable of correcting to some
extent the errors occurred in QRS detection by filtering out the
false detections caused by noise in the measurement. The false
detections are filtered out by using rules that successive RR
intervals do not differ more than a certain percentage or they
are regarded as noise and discarded [1].
An important part of this work was to develop a QRS
detection algorithm and microprocessor-based detector unit
of a reasonable size and power consumption, which achieves
good timing accuracy in QRS detection even in noisy measurements. In the measurements of ambulatory HRV immunity
to noise is of greater importance than in HRV measurements
at rest. The HRV measurements at rest are usually affected
only by low levels of noise, consisting mainly of amplitude
modulation of the QRS complex and mains coupling, whereas
the measurements of ambulatory HRV are affected by greater
levels of noise, for example, due to motion artifacts. Also in
the HRV measurement during physical exercise good timing
accuracy is desired as the HRV level reduces with increasing
exercise level and can be few milliseconds with high intensity
levels [2]. In order to achieve small timing error with respect
to the biological HRV good tolerance to noise and good timing
accuracy are required and these requirements are considered
as the main objectives in this work.
The QRS detection algorithm in this work is based on
optimized filtering and on a simple decision algorithm as the
optimized filtering is considered to be the key to achieve good
timing accuracy. At this stage, the QRS algorithm has been developed purely for the accurate detection of the QRS complex
and the decision algorithm is kept quite simple to reduce computational load. The decision algorithm is performed in real
time, no search-back is used, and it is based on an amplitude
comparison to an adaptive threshold. More complex decision
rules can be used later if required, and they will provide their
maximum advantage in conjunction with optimized filtering.
II. SYSTEM DESCRIPTION
A. QRS Detector Design Considerations
1) Optimized Filtering: The QRS complex contains signal
components in a relatively wide frequency band from about 2
0018–9294/97$10.00  1997 IEEE
160
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 3, MARCH 1997
to 100 Hz with peak at 10–15 Hz. In ambulatory measurements
the ECG signal is corrupted with noise due to motion artifacts,
mains coupling etc. which must be taken into account in
designing the frequency response of the QRS filter. The
purpose of the signal filtering is to attenuate noise and enhance
those features of the signal used for detection as this leads to an
increased probability for correct decisions. The matched filter
is a known solution to maximize signal amplitude-to-noise
ratio so it is the best solution to be used in QRS detection
based on amplitude comparison. The matched filter frequency
response for a signal corrupted with normal distributed white
noise (Gaussian) is [3]
(1)
is a constant,
is the signal spectra, and
corresponds to the filter delay. The amplitude response
is identical to the amplitude spectra of the signal, but the
phase response is opposite in sign. This means that the
impulse response of the matched filter is identical to the
signal waveform reversed in time domain. The matched filter
for colored noise is a better solution for QRS filter due to
noise types encountered in QRS detection. The matched filter
frequency response for a signal corrupted with colored noise
is [3]
where
(2)
is the noise power spectrum. The frequency
where
response can be calculated and the impulse response obtained
using inverse Fourier transform, if the signal and the noise
spectra are known. the practical method is to use a whitening
prefilter and a matched filter for the prefiltered signal. In
such case, the impulse response for the matched filter can be
defined from the prefiltered signal waveform. For the ultimate
solution the QRS detection the properties of the matched
filter should adapt continuously to temporal variations in the
QRS complex and noise properties. This, however, leads to
increased complexity in realization.
2) Decision Rule: Principles from communications theory
can be applied in defining the threshold level. In communications theory the optimum threshold level is calculated for the
on-off signal corrupted by Gaussian distributed noise. If equal
probabilities of false negatives and false positives are desired,
for the on-off signal is [4]
the optimum threshold level
(3)
and
are the probabilities of two signal values,
where
is the signal amplitude, and
the noise variance (mean noise
power). In binary data transmission where the probability of
ones and zeros are equal, the optimum threshold level is 50%
of the symbol “one” amplitude.
Similarly, in QRS detection the QRS complex (or preprocessed QRS complex) can be thought of as symbol “one”
and the silent segment between the two QRS complexes as
Fig. 1. The HRV interval measurement system.
the symbol “zero” and the corresponding probabilities are the
duration of each “symbol” divided by the duration of the
complete cycle. For example, at a heart rate of 60 beats per
minute (bpm) the durations are roughly 80 and 920 ms and
with a signal-to-noise ratio (SNR) of five (QRS amplitude
1, noise voltage rms value
0.2, thus mean noise power
0.04) the threshold should be around 60% according to
(3). If the number of false positives is to be minimized,
the threshold should correspondingly be set higher and vice
versa for minimized false negatives. In HRV measurements
the threshold should be at a lower level (30–40%) in order
to decrease the amount of false negatives (missed beats). This
is at the expense of an increase in false positives, however,
which can be corrected more easily in the postprocessing than
can false negatives. No fixed threshold level can be used, but
it must adapt to varying signal levels in order to remain at
the same relative level and maintain the desired detection
properties.
B. General Description of the HRV Measurement System
The complete HRV measurement system consists of a
personal computer (PC) as a host computer and the batteryoperated microprocessor-based QRS detector, which can be
connected to the PC with an optoisolated RS-232 link, Fig. 1.
During the measurement the detector unit functions independently of the host computer, but an optically isolated RS-232
communications link was included to provide communications
to a host computer for the measurement setup and results
retrieval while the ECG electrodes are connected to the patient
to guarantee patient safety. The PC provides a graphical
interface to configure the detector device and download the
measurement data from it using an interactive user-interface
program. The configuration task includes the individual sampling of the patient’s QRS complex to set up the matched
filter impulse response. The detector device detects the QRS
complex, with the aid of an algorithm described later, and
calculates RR intervals from two successive detections and
stores the RR interval data in its on-board memory. The PC
unit is then used to download the RR data stored in the detector
unit and to post-process the RR interval data into statistical
figures of the HRV.
C. The QRS Detector
1) The Algorithm:
a) Gain control and prefiltering: The selected QRS detection algorithm employs signal processing in both the analog
RUHA et al.: REAL-TIME MICROPROCESSOR QRS DETECTOR SYSTEM
161
Hz) was chosen so that a typical noise spectra will be whitened,
allowing the full use to be made of a matched filter in
the following stage. The bandpass filter is realized using a
complex-resonator/comb-filter pair which uses the current and
two delayed input samples and two delayed output samples to
calculate the output
Fig. 2. The QRS detection method.
and digital domains. The block diagram for the signal processing path is shown in Fig. 2. The device was fitted with
an amplifier stage with automatic gain control (AGC) and a
fourth-order analog prefilter which attenuates the components
of the measured signal outside the 0.5–35-Hz frequency band.
The frequency response is shown in Fig. 3(a). This enhances
the SNR enough so that the ECG signal can be amplified
to approximately 75% of the maximum input range of the
analog/digital (A/D) converter without baseline variation or
motion artifacts driving the amplifier or A/D converter out of
its dynamic range. The band-limited and amplified signal is
then fed to a 10-bit A/D converter which samples the signal
at 500 samples/s. The AGC algorithm is shown below.
Variable definitions:
HIGH: positive envelope
LOW: negative envelope
ACG TD: AGC decay time constant (2 s.)
AGC MAX, AGC MIN: AGC limit constants
(0.75 and 0.25 of the ADC range)
For (“each input sample
at the ADC output”)
If (
HIGH) then HIGH =
.
If (
LOW) then LOW =
.
If (“AGC TD seconds have passed since
previous update of HIGH or LOW”)
then HIGH = 0.9*HIGH,
LOW = 0.9*LOW.
If (HIGH ACG MAX) or
(LOW
AGC MAX) then (“decrease
the preamplifier gain by a step”).
If (HIGH AGC MIN) and
(LOW
AGC MIN) then (“increase
the preamplifier gain by a step).
b) Filtering: The initial sampling speed of 500 Hz and
interpolation to 2 kHz in subsequent stages was selected
because it was believed to provide sufficiently accurate timing
information. As this frequency is an integral multiple of the
50-Hz power-line frequency being used in Europe, it allows
for a simple implementation of a 50-Hz notch filter which
removes any residual power-line interference from the sampled
signal. The notch filter is realized using a comb filter, which
introduces a transmission zero at 50 Hz by summing the
current and a 10-ms delayed sample together. The amplitude
response in shown in Fig. 3(b).
The second digital filter stage after the comb filter is
a bandpass filter which attenuates the low-frequency noise
caused by, for example, motion artifacts. The passband (15–40
(4)
This stage also introduces a transmission zero at a frequency
near 60 Hz to attenuate the mains-noise of 60 Hz used in
some countries. The amplitude response is shown in Fig. 3(c).
Complex-resonator/comb-filter was chosen for easy implementation. More sophisticated filters based on infinite impulse
response (IIR) or finite impulse response (FIR) structures
could also be used and these would allow more freedom in
choosing the transfer function for the whitening filter. All
the multiplications and divisions required in the comb and
complex resonator filters are by a power of two so they can
implemented with bit shifting. This allows for the filters to
be implemented very efficiently in assembly language. The
combined amplitude response is shown in Fig. 3(d).
The final filtering stage is a matched filter providing an optimal SNR and, more importantly, a symmetrical output pulse
waveform. The matched filter output for the filter impulse
128 is calculated as
response length
(5)
are input samples and
is an output
where
sample of the matched filter. The matched filter impulse
response is optimized for each patient by selecting the filter
coefficients in the beginning of a measurement by selecting
a good representative of the bandpass-filtered QRS complex
from an interactive display on a personal computer. For use
as an impulse response for the matched filter, the sampled
QRS complex is then further processed by removing its dc
component, windowing it, and normalizing it to obtain a
gain of one for the matched filter stage. A typical impulse
response is shown in Fig. 4. While the matched filter is
computationally the most expensive operation used by the
developed device, it is nevertheless crucial for the performance
of the system.
Typical filtered waveforms for almost noiseless and noisy
ECG signals are shown in Figs. 5 and 6. The symmetrical
output pulse waveform of the matched filter is clearly seen
in Fig. 5(c), which is utilized in the threshold detection. The
noisy ECG signals in Fig. 6(a) was recorded while the subject
was running on the spot and represents a typical ECG signal
in ambulatory measurement, in which the noise due to motion
artifacts is dominant. The signal quality improvement due to
bandpass filtering in Fig. 6(b) is probably adequate for QRS
detection, but the matched filter is required to obtain still
improved timing accuracy.
162
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 3, MARCH 1997
(a)
(b)
(c)
(d)
Fig. 3. (a) The amplitude responses of the analog prefilter, (b) digital comb filter, (c) digital bandpass filter, and (d) the combination of these.
In order to provide a better timing-resolution than provided
by the 500 Hz sampling frequency, the signal at the matched
filter output is linearly interpolated to four times the original
sampling rate to 2000 Hz. The linear interpolation is performed
as
(6)
(7)
(8)
(9)
, is the original (2 ms), and
where
is the interpolated sampling period (500 s). Ideally, the
original sampling rate could be higher and interpolation would
be unnecessary, but in that case the matched filter impulse
response length would be 512, i.e., also four times larger
than originally, resulting in a too power-hungry operation.
As the signal is already band limited very well under the
Nyquist frequency of 250 Hz in this system, this interpolation
is feasible.
c) Detection: QRS detection from the filtered signal is
subsequently performed by an adaptive threshold detector
Fig. 4. The matched filter impulse response for a prefiltered QRS complex.
which uses a threshold of about 40% of the maximum value
which has occurred in the filter stage’s output over the last
1.5 s. For 200 ms after each QRS detection the threshold
is raised to 90% of the maximum value previously present
to prevent false detection due to T-wave. The detection and
the threshold adaption algorithm can be described using a
RUHA et al.: REAL-TIME MICROPROCESSOR QRS DETECTOR SYSTEM
163
(a)
(b)
(c)
Fig. 5. (a) Almost noiseless ECG signal, which is (b) bandpass filtered, and (c) matched filtered.
pseudo-code as follows.
Variable definitions:
ENV: matched filter output envelope
THR: threshold constant (0.4–0.6)
THRES: threshold coefficient
DET: binary value detection signal
ETR: envelope rise rate constant (2 s)
ETD: envelope decay rate constant (5–15 s)
EHC: envelope hold time constant (2 s)
T LASTP: detection threshold keep time (200 ms)
For (“each output sample
from the matched filter”)
If (
THRES * ENV)
then DET
else DET
.
If (
ENV) then ENV = ENV + ETR*
.
If (
ENV) and (“EHC seconds has passed
since the previous update”)
then ENV = 0.9*ENV.
If (DET
) and (DET
)
then THRES = 0.9.
If (“more than T LASTP has passed
since the previous detection”) and
(THRES THR) then
THRES = 0.9*THRES.
As the matched filter has the additional property of providing a symmetrical output for the desired inputs, dual edge
threshold detection can be applied successfully, Fig. 7. In dual
edge detection the vertical center-line of the signal exceeding
as
the threshold level value is calculated by
being the fiducial point for the QRS complex. This is known
to reduce the timing error by reducing the sensitivity to lowfrequency additive and multiplicative noise, i.e., the baseline
and amplitude modulation caused by breathing [5]. With such
noise the fiducial point is not affected as
and
are equal. According to our experience,
amplitude variation can be up to 50% of the QRS complex
amplitude when the subject under monitoring is breathing
heavily. When compared to systems which only use rising or
falling edge detection of the QRS complex, this arrangement
provides a better accuracy for QRS detection.
2) Hardware: The preamplifier and prefilter are realized
with analog hardware and the signal processing for QRS
detection is realized in digital domain. The preamplifier utilizes
a commercially available instrumentation amplifier (AMP-04,
Analog Devices) which has good performance in common
mode rejection. In addition, the gain and upper frequency limit
can be set with a minimum amount of external components
(one resistor and capacitor). The preamplifier is combined
with an analog fourth-order bandpass filter (0.5–35 Hz) to
attenuate noise outside the QRS complex spectrum already
in the front-end of the signal processing path. After amplification and filtering but before analog-to-digital conversion the
ECG signal is fed through an AGC stage to keep the signal
amplitude at an optimum level of the A/D converter (ADC)
input range. The AGC is realized with a conventional digitalto-analog (D/A) converter (DAC) by using it as a multiplier,
where the analog signal is connected to the reference input and
the gain-controlling digital word to the data inputs of the DAC.
The digital signal processing (DSP) blocks of the system
were realized using a Motorola 68HC16 DSP microcontroller,
which provides a general purpose 8/16-bit processor core, a
DSP engine with an internal ADC and some advanced system
integration and power conservation functions. The processor
includes a software-controlled clock synthesizer so that its
speed can be adjusted in order to minimize power drain. The
software was written using the HC16 assembly language used
164
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 3, MARCH 1997
(a)
(b)
(c)
Fig. 6. (a) Noisy ECG signal, which is (b) bandpass filtered, and (c) matched filtered.
TABLE I
NOISE TYPES USED IN TESTS
Fig. 7. The dual edge detection principle with amplitude modulated pulse.
in this microcontroller. The power consumption of the device
was found to be a little over 25 mA at a clock speed of 3.41
MHz. At this speed the device is still capable of running the
software with a matched filter tap count of 128. This equates
to more than 35 h of operating time on standard 1000-mAh
Ni–Cd batteries.
III. TEST RESULTS
In this study, verification of the QRS detection performance
achieved with the developed system was carried out by two
separate methods. The timing accuracy was tested with an
artificial QRS complex purposely corrupted by various noise
types, and the QRS detection reliability was tested with
ECG records taken from the MIT-BIH database [6]. Timing
accuracy must be tested with an artificial or a single sampled
QRS complex repeated periodically to achieve a precise time
reference for the test. This cannot be achieved with natural
ECG recordings as the time reference is unknown. Also, the
annotations in the MIT-BIH records cannot be used as time
references as the time resolution in those records is low due to
the low sampling frequency of 360 Hz used. The artificial ECG
signal was generated according to the recommendation in the
Association for the Advancement of Medical Instrumention
(AAMI) standard [7] shown in Fig. 8 and fed to the system
being tested with the aid of a (D/A) converter. Several types
of noise were added to the signal to evaluate timing accuracy
under noisy conditions. Noise types used are shown in Table I.
All measurements were carried out using four different
SNR’s and four different QRS repetition frequencies, 50, 100,
150, and 200 bpm, and the total number of pulses given
were 100, 100, 150, and 150, respectively. The corresponding
ECG signal periods were 1199, 601, 399, and 301 ms to
prevent synchronization of the sine noise signals with the QRS
complex. Testing with different QRS rates is important when
adaptive thresholds are used since the adaptation algorithm
may affect detection performance at different pulse rates. The
standard deviation (sd) and maximum range of the timing error
was calculated from each result set. Detections with timing
error more than 30% of the pulse period were excluded in
the analysis of some test results, but the number of discarded
detections was also low in these cases (always smaller than
2.3%). The number of discarded results are shown in the
individual test results.
The 0.5-Hz additive sine noise simulates the baseline variation due to breathing. The detector shows good tolerance to
RUHA et al.: REAL-TIME MICROPROCESSOR QRS DETECTOR SYSTEM
165
TABLE IV
TEST RESULTS WITH MIT-BIH RECORDS 103
=
Fig. 8. The artificial ECG signal (a 0.5–5 mV [typ. 1 mV], d
ms, dt
180 ms, at
0.4–1.2 mV and qt
350 ms) [7].
=
=
=
= 70–120
TABLE II
THE QRS DETECTION TIMING ACCURACY WITH 5-HZ ADDITIVE NOISE
TABLE III
THE QRS DETECTION TIMING ACCURACY WITH ADDITIVE GAUSSIAN NOISE
this type of noise, the detection timing error is less than 0.9
ms (sd) with pulse rates of 50–200 bpm and noise amplitudes
up to 80% (160% peak-to-peak) of QRS complex amplitude.
The maximum timing error of all detections was 2 ms.
The 5-Hz sine wave represents a noise signal with a
frequency in the upper frequency range of noise due to motion
artifact. The timing error of less than 1 ms (sd) with maximum
error of 2 ms was achieved with sine noise amplitude of
40% (80% peak-to-peak) relative to QRS complex amplitude.
Greater noise amplitude of 80% increased timing error (sd
4 ms) at highest pulse rate of 200 bpm markedly, Table II.
The detector exhibits good tolerance to mains interference
as the comb filter effectively removes the 50-Hz mains-noise,
the timing error is less than 0.5 ms at noise levels up to 80%
(sd) at all pulse rates tested. The maximum timing error of all
1 ms.
detections was 2
Gaussian noise simulates noise due to electromyogram
(EMG) signals and motion artifacts. With a Gaussian noise
level of 25% (rms) of QRS complex amplitude the timing error
is less than 1 ms (sd), maximum timing error for all detections
at this noise level is 3 3 ms. With higher levels of noise
the timing error increased, the results are shown in Table III.
The detector is insensitive to amplitude modulation of the
QRS complex which is important even in HRV measurement
at rest due to amplitude modulation caused by respiration.
Amplitude modulation up to 30% allows the QRS complex
to be detected with timing error less than 0.7 ms (sd). The
AND
105
maximum timing error was 2 1 ms for 99.5% of detections
with pulse frequencies of 50–200 bpm. Higher modulation
increased timing error noticeably.
In order to assess the reliability of the QRS detections,
the system was also tested with clean and noisy ECG signals
obtained from the MIT-BIH arrhythmia database [6]. The same
measurements were carried out on a commercially available
heart-rate detector [8] targeted for sports training to obtain
a reference on the validity of the results. The measurement
setup consisted of the MIT-BIH database on CD-ROM, a
SUN workstation with a CD-ROM drive, and a 16-b D/A data
conversion card, so that the setup could be used as a signal
source with selected signals from the database. The detections
given by the system were compared to the annotations on the
records with software in the host computer.
Two records from the MIT-BIH database were used in
testing. Record number 103 contains a signal with little noise,
and the system was able to detect practically all of the 2082
recorded QRS complexes. The record 105 contains some very
noisy sections due to motion artifacts and the system detected
the QRS complexes with small number of errors, Table IV.
The detection error rate (ER) is according to (10) 0.1 and
2.2%, correspondingly
Detection error rate
Number of false positives Number of false negatives
Total number of QRS complexes
(10)
IV. DISCUSSION
A. QRS Detection Timing Accuracy
In [9] a sampled ECG signal was used to test the QRS
detection performance of nine published algorithms. The noise
types were quite similar to the ones used in this work including
mains-noise, EMG, baseline variation due to respiration, and
motion artifacts. However, no timing accuracy performance
was reported in that work.
The QRS detection timing accuracy achievable with this
system and typical noise levels to be encountered in real measurements are estimated in Table V. The figures are obtained
from the results of the tests with the artificial ECG signal
corrupted with noise of various types. These tests indicate
that a timing accuracy of 1 ms can be achieved in real
measurements corrupted with typical levels of noise.
The test with 5-Hz additive sine noise representing the
higher end of the spectrum of typical noise artefact resulted
in a timing error of 0.9 ms (sd) at noise amplitude of 40%.
Although the noise level due to motion artifacts in real
measurements can be larger in amplitude its spectral content
166
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 44, NO. 3, MARCH 1997
TABLE V
THE DETECTION TIMING ACCURACY WITH TYPICAL
NOISE LEVELS AND HEART RATES OF 50–200 BPM
is located mainly at lower frequencies than 5 Hz [10] and is
thus attenuated by the filtering used in the detector. Thus,
an accuracy of 1 ms and good tolerance to noise due to
motion artifacts can be expected in real measurements even
with higher levels of noise than indicated by the 5-Hz sine
noise amplitude.
In [11] a timing error of 1.65 ms (sd) was achieved with
an SNR of 10 dB (noise rms is 30% of QRS amplitude) in
software tests. The noise band was 0–50 Hz, but the noise
distribution is not reported. The error sd of 1.8 ms was
achieved in [12]. This is probably too optimistic a result as
the portion of detections with a timing error >10 ms was
38% of all detections and they were excluded from the sd
calculation of detection timing error. The timing error of the
developed system was 1 ms (sd) with Gaussian noise at rms
value of 25%. The developed system was less affected by
50-Hz noise (sd 0.5 ms) than the algorithm in [12] (sd 2.5
ms). Although these tests are probably not directly comparable
due to different test setups the overall performance of the
developed system is expected to be favorable in comparison
with the performance of [11] and [12].
B. QRS Detection Reliability
The detector was able to detect practically all of the QRS
complexes of a recorded real signal with little noise (MIT-BIH
record 103), and the test with a noisy signal (MIT-BIH record
105) resulted in a detection ER of 2.2% with respect to the
total number of QRS complexes in this record. The detection
errors with record 105 occur mostly during the noisy sections
(total of 4 min) of the record. Record 105 was also used to test
the QRS detectors in other published papers so performance
comparisons can be made. The test results with other published
results on the MIT-BIH recordings are summarized in the
Table VI.
The performance of the developed system with an ER of
2.2% and number of failed detections (FD) of 56 was better
than with linear bandpass filtering method [15] as expected
(ER
3.5%, FD
89). The performance also exceeds that
obtained by fixed bandpass filtering and threshold detection
2.9%, FD
75), even when a search-back algorithm
(ER
was used [14]. The performance level achieved is between the
performance of linear adaptive filtering (ER
2.4%, FD
TABLE VI
TEST RESULTS WITH MIT-BIH RECORDS 105 (TOTAL OF 2572 QRS COMPLEXES)
62) and neural network-based adaptive matched filtering (ER
0.5%, FD
14) [13].
Adaptive filtering is effective in cases where the signal and
the corrupting noise are stationary (e.g., mains-noise) or their
characteristics alter so slowly that the system is able to adapt to
these variations. This is not the case, however, with noisy ECG
signals where the noise characteristics, mainly motion artifacts,
can vary considerably and adaptive filter probably fails to be
the optimal filtering method [16]. The good performance of
the developed system can also be partially explained by the
fact that the developed method is “adaptive” to each patient’s
QRS complex. It is interesting to note that the commercially
available heart rate monitor based on a highly optimized linear
bandpass filtering and threshold detection achieves a quite
high level of performance (ER
2.8%, FD
71) which
is comparable with results achieved with a similar method
equipped with additional search-back.
Only a software implementation of a method based on a
neural network was able to offer better performance [13].
However, a QRS detector for ambulatory use imposes requirements for low power consumption and physical size
and a microprocessor implementation of a system based on
neural networks, depending on network topology and layer and
neuron number would probably lead to an unacceptable power
consumption due to the high arithmetic capability required.
A digital ASIC solution might be feasible although it would
probably be expensive in terms of the silicon area usage.
Analog very large scale integration (VLSI) implementation
offers on advantages in area and power consumption and
promising results of analog implementation of neural networks
are reported. The analog solutions, however, have disadvantages as they are sensitive to circuit-level nonidealities, offset,
noise in electrical circuits, etc., and they require high expertise
in design.
V. SUMMARY
The design and performance of an ambulatory QRS detector
are presented in this work. The QRS detector is intended for
the accurate measurement of HRV and reliable QRS detection
in both ambulatory and clinical use. The QRS detection
algorithm uses prefiltering in conjunction with a matched
filter and dual edge threshold detection. The purpose of the
prefiltering is to attenuate various noise components in order
to achieve improved detection reliability. The matched filter
further improves SNR and symmetries the QRS complex for
RUHA et al.: REAL-TIME MICROPROCESSOR QRS DETECTOR SYSTEM
the threshold detection which is essential to reduce sensitivity
to low-frequency additive and multiplicative noise. The decision for detection is made in real-time and no search-back
method is used.
The QRS detection timing accuracy and detection reliability
of the detector system was tested with an artificially generated
ECG signal and with records from the MIT-BIH arrhythmia
database. The use of an artificial ECG signal in timing tests
allowed the timing reference for the QRS complex to be
known and also allowed the accurate control of the noise
characteristics. The artificial signal was corrupted with noise
which simulate the noise generated by EMG, respiration,
motion, and power-line interface. The tests indicate that a
timing error less than 1 ms (sd) can be achieved in real
measurements even in noisy conditions. In QRS detection
reliability tests records from the MIT-BIH database were used
as test signals. The QRS detection reliability is better than
that of more complicated methods based on linear filtering
and search-back or adaptive filtering and detection ER of 0.1
and 2.2% was achieved with records 103 and 105 from the
MIT-BIH Arrhythmia database, respectively.
167
[12] K. G. Lindecrantz and H. Lilja, “New software QRS detector algorithm
suitable for real time applications with low signal-to-noise ratios,” J.
Biomed. Eng., vol. 10, pp. 280–284, May 1988.
[13] Q. Xue, Y. H. Hu, and W. J. Tompkins, “Neural-network-based adaptive
matched filtering for QRS detection,” IEEE Trans. Biomed. Eng., vol.
BME-39, pp. 317–329, Apr. 1992.
[14] P. Hamilton and W. Tompkins, “Quantitative investigation of QRS
detection rules using the MIT/BIH arrhythmia database,” IEEE Trans.
Biomed. Eng., vol. BME-33, no. 12, pp. 1157–1165, 1986.
[15] J. Pan and W. Tompkins, “A real time QRS detection algorithm,” IEEE
Trans. Biomed. Eng., vol. BME-32, no. 3, pp. 230–236, 1985.
[16] N. V. Thakor and Y.-S. Zhu, “Applications of adaptive filtering to
ECG analysis: Noise cancellation an arrhythmia detection,” IEEE Trans.
Biomed. Eng., vol. BME-38, pp. 785–794, Aug. 1991.
Antti Ruha (S’88–M’88) received the Diploma
Engineer and Licentiate of Technology degrees in
electronics from the University of Oulu, Finland, in
1988 and 1993, respectively.
He is currently developing ambulatory biomedical
instrumentation, especially heart rate and heart rate
variability measurement instruments. His current research also include applications of low-power VLSI
circuit technology for biomedical applications.
REFERENCES
[1] M. Malik, T. Cripps, T. Farrell, and A. J. Camm, “Prognostic value
of heart rate variability after myocardial infarction. A comparison of
different data-processing methods,” Med. Biol. Eng. Comput., vol. 27,
pp. 603–611, 1989.
[2] Y. Yamamoto, R. L. Hughson, and J. C. Peterson, “Autonomic control
of heart rate during exercise studied by heart rate variability spectral
analysis,” J. Appl. Physiol., vol. 71, no. 3, pp. 1136–1142, 1991.
[3] P. Z. Peebles, Probability, Random Variables, and Random Signal
Principles. New York: McGraw-Hill, 1980, ch. 9, pp. 257–267.
[4] M. Schwarz, Information Transmission, Modulation, and Noise. New
York: McGraw-Hill, 1970, ch. 8, pp. 577–584.
[5] G. J. H. Uijen and J. P. C. de Weerd, “Accuracy of QRS detection in relation to the analysis of high-frequency components in the
electrocardiogram,” Med. Biol. Eng. Comput., vol. 17, pp. 492–502,
1979.
[6] MIT-BIH Database Distribution, Massachusetts Institute of Technology,
77 Massachusetts Avenue, Room 20A-113, Cambridge, MA 02139.
[7] “Standard for Cardiac Monitors, Heart Rate Meters and Alarms (draft),”
Association for the Advancement of Medical Instrumention (AAMI),
Aug. 1981.
[8] Polar Sport Tester manufactured by Polar Electro Oy, Professorintie 5,
FIN-90440 Kempele, Finland.
[9] G. M. Friesen et al., “A comparison of the noise sensitivity of nine
QRS detection algorithms,” IEEE Trans. Biomed. Eng., vol. 37, no. 1,
pp. 85–98, 1990.
[10] N. V. Thakor et al., “Estimation of QRS complex power spectra for
design of a QRS filter,” IEEE Trans. Biomed. Eng., vol. BME-31, pp.
702–705, Nov. 1984.
[11] V. Barbaro, P. Bartolini, and M. Fierli, “New algorithm for the detection
of the ECG fiducial point in the averaging technique,” Med. Biol. Eng.
Comput., vol. 21, pp. 129–135, 1991.
Sami Sallinen (S’92–M’93) received the Diploma
Engineer degree from the University of Oulu, Finland, in 1994.
His professional interests include computing and
especially embedded computing and electronics in
medicine. He is currently involved in developing
software for radiation therapy treatment planning at
Varian-Dosetek Oy, Espoo, Finland.
Seppo Nissilä received the Diploma Engineer, Licentiate of Technology, and Doctor of Technology
degrees in electronics engineering from the University of Oulu, Finland, in 1987, 1990, and 1995,
respectively.
He is an Acting Professor of Optoelectronics in
the Department of Electrical Engineering, University of Oulu. His current research interests include
electrooptical measurements, especially fiber-optics;
and biomedical measurements and devices, especially noninvasive, ambulatory heart rate, and blood
pressure instruments.
Download