Вы находитесь на странице: 1из 11

APPLICATION OF ADAPTIVE AND NON

ADAPTIVE FILTERS IN ECG SIGNAL


PROCESSING
Kamran Jamshaid*, Omar Akram*, Farooq Sabir*, Dr. Syed Ismail Shah*,
Dr. Jamil Ahmed**
*Faculty of Electronic Engineering, **Faculty of Computer Science and Engineering,
GIK Institute of Engineering Sciences and Technology

ABSTRACT
Over the years Computer aided ECG signal analysis is gaining momentum with
tremendous amount of work being carried out all over the world. This paper is a small
step on our part in that direction. For the process of automation several things have to be
taken into account such as the types of noise present in the ECG signal which might
effect in the detection of various characteristics of the signal such as the R-peak, QRS
complexes, T-waves etc,. The various noise types that were considered were
electromyographic interference, 50Hz power line interference, base line drift due to
respiration, abrupt base line shifts, and a composite noise constructed from all of the
other noise types. Different filter structures are then presented to eliminate these diverse
forms of noise sources and their performance is discussed with reference to efficiency,
distortion of the signal. The ECG signals used in this study were either obtained from
similar work being carried out in University of Pittsburgh or downloaded from the
internet and all the work was done in MATLAB®. However a separate data acquisition
module was also designed which is capable of picking the analog ECG signals from the
existing machines, convert them into digital signals and then transmit them to the
computer via the serial port. This data is then stored as a binary file and can be employed
for the processing purposes.

BIOPOTENTIALS IN THE HEART


The electrical activity of the heart is integral to
the operation of several types of medical
instruments, including the electrocardiograph,
the pacemaker, and the defibrillator. A very
small electrical disturbance can cause this vital
organ to cease pumping blood necessary to
sustain life. The heart consists of two major
smooth muscles the atrium, and the ventricle
which form the syncytium, or fusion of cells, that
conducts depolarization from one cell to the
next. Because of the ionic leakage in the smooth
muscle membrane the tissue of the heart
depolarizes spontaneously from its resting state
and effectively oscillates, or beats. The synoatrial (SA) node beats at a rate of from 70 to 80 beats
per minute (bpm) at rest. The antrioventricular (AV) node beats at 40 to 60 bpm and the bundle
branch oscillate at 15 to 40 bpm.

The SA node, Figure 1, normally determines the heart rate, since it beats at the fastest rate and
causes stimulation of the other tissues before it reaches its self-pacing threshold. Thus, the SA
node can be considered the heart’s pacemaker. 1

The depolarization of the SA node spreads through out the atrium and reaches the AV node in
about 40ms. Because of the low conduction velocity of the AV node tissue, it requires about
110ms for the depolarization to reach the bundle branches called the Purkinje system. The
ventricles then contract, the right ventricle then forcing blood into the lungs, the left ventricle
pushing blood into the aorta and subsequently through the circulation system. The contraction
period of the heart is called systole.

The action potentials in the ventricle hold for 200 – 250ms. This relatively long time allows the
ventricular contraction to empty blood into the arteries. The heart then re-polarizes during the rest
period, called diastole, then the cycle repeats.

ELECTROCARDIOGRAM
During diastole, while the heart is at rest, all
of the cells are polarized so that the potential
inside each cell is negative with respect to the
outside. Normally, depolarization occurs first
at the SA node, making the outside of the
tissue negative with respect to the inside of
the cells and making it negative with respect
to the tissues not yet depolarized. This
imbalance results in an ionic current, I, Figure
2, causing the left arm to measure positive
with respect to the right arm. The resulting
voltage is called the P wave.
After about 90 ms, the atrium is completely depolarized, and the ionic current measured by lead I
reduces to zero. The depolarization then passes through the AV node causing a delay of 110ms.
The depolarization then passes to the right
ventricular muscle depolarizing it and
making it negative relative to the still
polarized left ventricular muscle. Again
the direction of I causes a + to – voltage
from LA to RA called the R-wave.

The complete wave form is called an


electrocardiogram with labels P, Q, R, S,
and T indicating its distinctive features.
The P wave arises from the depolarization
of the atrium. The QRS complex arises
from depolarization of the ventricles. The
magnitude of the R-wave within this
complex is approximately 1mV. The T-
wave arises from re-polarization of the ventricle muscle. The U wave that some times follow the
T-wave is second order effect of uncertain origin and is of little diagnostic significance. The
intervals, segments, and complexes are shown in the Figure 3.

NOISE ARTIFACTS
In recent years the trend towards automated analysis of electrocardiograms has gained
momentum. Many systems have been implemented in order to perform such tasks as 12- lead off-
line electrocardiogram analysis, Holter tape analysis in real-time patient monitoring. This requires
accurate detection of various parameters of interest even in the presence of noise. For accurate
detection however steps have to be taken to filter out or discard the noise. Filtering can alter the
signal and may require substantial computational overhead.
The ECG signals used in this study were spline interpolated and all the work was done in
MATLAB®. However a separate data acquisition module was also designed which is
capable of picking the analog ECG signals from the existing machines, convert them into
digital signals and then transmit them to the computer via the serial port. This data is then
stored as a binary file and can be employed for the processing purposes.
Electrocardiographic signals (ECG) may be corrupted by various kinds of noise. Typical
examples are:

1. Power line interference


2. Electrode contact noise.
3. Motion artifacts.
4. Muscle contraction.
5. Base line drift.
6. Instrumentation noise generated by electronic devices.
7. Electrosurgical noise.

Power line interference

It consists of 50-60Hz pickup and harmonics, which


can be modeled as sinusoids. Characteristics, which
might need to be varied in a model of power line
noise, of 60Hz component (as most of the signals of
study were digitized in USA) include the amplitude
and frequency content of the signal. The amplitude
varies up to 50 percent of the peak to peak ECG
amplitude. It is shown in Figure 4 where power
signal is effecting the signal between 1000 to 3000
units of time.2
Electrode contact noise

It is a transient interference caused by loss of contact between the electrode and the skin that
effectively disconnects the measurement system from the subject. The loss of contact can be
permanent, or can be intermittent as would be the case when a loose electrode is brought in and
out of contact with the skin as a result of movements and vibration. This switching action at the
measurement system input can result in large artifacts since the ECG signal is usually
capacitively coupled to the system.

It can be modeled as randomly occurring rapid base line transition, which decays exponentially to
the base line value and has a superimposed 60Hz component. Typically the values of amplitude
may vary to the maximum recorder output.

Motion Artifacts

Motion artifacts are transient base line


changes caused by changes in the
electrode-skin impedance with electrode
motion. As this impedance changes, the
ECG amplifier sees a different source
impedance which forms a voltage divider
with the amplifier input impedance
therefore the amplifier input voltage
depends upon the source impedance which
changes as the electrode position changes.
The usual cause of motion artifacts will be
assumed to be vibrations or movements of
the subjects. The peak amplitude and duration of the artifact are variable, as illustrated in Figure
5. This type of interference represents an abrupt shift in base line due to movement of the patient
while the ECG is being recorded. It is simulated by adding a dc bias for a given segment of ECG.

Muscle contraction

Muscle contractions cause artifactual milli-


volt level potentials to be generated. The base
line electromyogram is usually in the micro-
volt range and therefore is usually
insignificant. It is simulated by adding
random noise to the ECG signal. The
maximum noise level is formed by adding
random single precision numbers of ±50% of
the ECG maximum amplitude to the
uncorrupted ECG. A plot of the ECG
corrupted by electromyographic noise is
given in the Figure 6.
Base Line Drift with Respiration

The drift of the base line with respiration


can be represented by a sinusoidal
component at the frequency of respiration
added to the ECG signal. The amplitude and
the frequency of the sinusoidal component
should be variables. The variations could be
reproduced by amplitude modulation of the
ECG by the sinusoidal component added to
the base line. Shown in Figure 7.

Noise generated by electronic devices

The parameter detection algorithms cannot correct artifacts generated by electronic devices. The
input amplifier saturates and no information about the ECG reaches the detector. In this case
manual preventive and corrective action needs to be undertaken.

Electrosurgical noise

It completely destroys the ECG and can be represented by a large amplitude sinusoid with
frequencies approximately between 100kHz to 1MHz. Since the sampling rate of an ECG signals
250 to 1000Hz an aliased version of the signal.

FILTERING
BASELINE WANDER

Extraneous low frequency components can severely influence the visual interpretation of an ECG
as well as the results obtained from computer based ECG analysis. Removal of base line wander
is therefore required in the analysis of the ECG signals to minimize the changes in beat
morphology with no physiological counterpart. Respiration and electrode impedance changes due
to perspiration are important sources of base line wander in most types of ECG recordings. The
frequency content of the base line wander is usually in a range well below 0.5Hz. During the
latter stages of the stress test, however, increased movements of the body will further add to the
base line wander activity. Patients unable to perform a traditional treadmill or ergo-meter stress
test may still be able to perform a stress test either by sitting, running an ergo-meter by hand or by
using special rowing device. In these cases base line wander related to motion of the arms may
distort the signal. The bandwidth of such base line wander is then considerably larger than that
caused by respiration and electrode impedance changes.
FILTERING APPROACHES

The approach we have used here for base line wander removal is linear filtering. This posses the
advantage of expressing the base line removal in spectral terms. Both linear filters with finite-
impulse response ( FIR ) as well as infinite-impulse response ( IIR ) can be used. The
performance of IIR filters is in general unacceptable due to nonlinear phase response, which
introduces distortion in various parts of the ECG signal. An IIR filter could, however, be used for
forward / backward filtering which results in linear phase filtering. This technique has been
implemented for off line processing of ECG recordings with good results .By allowing a certain
time delay, forward / backward filtering can also be implemented for on line operation.

NON-ADAPTIVE FILTERING TECHNIQUE USED

There are three widely used analog filters, namely, Butterworth, Chebyshev, and Elliptic filters.
We have employed Chebyshev filters of which there are two types. Type I Chebyshev filters are
all pole filters that exhibit equi-ripple behavior in the passband and a monotonic characteristic in
the stopband. On the other hand, the family of Type II Chebyshev filters contains both poles and
zeros and exhibits a monotonic behavior in the passband and an equi-ripple behavior in the
stopband. The zeros of this class of filters lie on the imaginary axis in the s-plane. Butterworth
filter on the other hand, have monotonic response in both bands.

Let ε be the passband ripple, Ωp be the passband cutoff frequency in rad/sec, A be the stopband
attenuation parameter and Ωs be the stop band cutoff in rad/sec. The parameters ε and A are
related to parameters Rp and As respectively of the dB-scale and the relation is given by:3
ε=(10Rp/10-1)1/2

A= 10As/20

Also Ωc=Ωp and Ωr = Ωs/Ωp. The order N, of the Chebyshev filter is given by

g = ((A2-1)/ε2)1/2
N = [(log10(g+(g2-1)1/2)/(log10(Ωr+(Ωr2-1)1/2)]1/2

The signal shown in Figure 5 was


filtered using the algorithm described
here and the result obtained is shown in
Figure 8.
THE POWER LINE FILTERING (Non-Adaptive Technique)

The power line interference is removed by designing a band reject filter tuned at 60Hz frequency
component. This filter effectively removes the 60Hz component while allowing all other
frequencies to pass through. The filter implemented has a finite impulse response. The order of
the filter is estimated and used with a Parks-McClellan optimal equiripple FIR filter design
algorithm.

The resulting filter will approximately meet the specifications given by the input parameters of
cutoff frequencies in Hz, in ascending order between 0 and half the sampling frequency Fs and a
vector specifying the desired function's amplitude on the bands defined by cutoff frequency.The
corrupted signal as well as the filtered signal is shown in the Figure 9 below.
ADAPTIVE FILTERING
An event related signal could be considered as a process, which can be decomposed into an
invariant deterministic signal time locked to a stimulus and an additive noise uncorrelated with
the signal. The most common signal processing of this type of bioelectric signal separates the
deterministic signal from the noise. Several techniques can be considered of which we are
considering the adaptive signal processing technique. Adaptive filters are self-designing filters
based on an algorithm which allows the filter to “learn” the initial input statistics and to track
them if they are time varying. These filters estimate the deterministic signal and remove the noise
uncorrelated with the deterministic signal.
We have considered adaptive impulse correlated filter which requires the signal and a reference
input. The least mean square algorithm is used to adjust the weights of the adaptive filter in order
to minimize the error and estimate the deterministic component through filter output. This
algorithm is well known and can be expressed by the following equation3

Wk+1=Wk+2µξkXk,

Where Wk is the weight vector, and Xk is the reference input and µ is the convergence factor. The
selection of the convergence factor µ becomes a trade off between convergence rate and the
steady state mean square error. A 16-tap filter was implemented in MATLAB® with a reference
D.C input of 1. The filter traverses through the signal and removes the base line drift due to
motion as well as breathing.
The results of the algorithm are as given in the Figure 10.
Figure 10
THE POWER LINE FILTERING (Adaptive Filtering Technique)

The best results were obtained with the adaptive filtering technique described earlier in this paper.
The filter structure employed was similar to the one used for the base line shift. But with few
modifications
♣ The number of taps in the filter were increased from 16 to 160 for better results.
♣ The reference input was a sinusoid of frequency 60Hz instead of 0Hz constant input DC
supply as done earlier in the adaptive filtering case.
The results obtained from this adaptive technique are shown in the Figure 11.

Figure 11
CONCLUSION:
Though the non-adaptive filtering is faster than the adaptive filtering methods but the adaptive
filtering after tuning the taps to some optimum value gives the best results. Adaptive filtering in
some cases though amplified the S-peaks, but it does not give any serious distortion effects onto
the signal . The power line interference function can be modified to cater for both 50 and 60 Hz
interference as well as their harmonics. Similarly the cutoff frequency of the base line removal
functions can be altered for various frequency interference. After filtering these signals were then
applied for detection of the ECG parameters discussed above i.e. R-peaks, S-peaks, QRS
complexes, T-waves initiation. The P-wave can be only be detected after the adaptive
cancellation of the QRS-T segments of the ECG signal 4 by altering the filter structure with an
impulse train coincident with the start of QRS complexes.

REFERENCES:
1. Aston, Richard. Principles of Biomedical Instrumentation and Measurements

2. M. Friesen, Gary et al. Comparison of noise sensitivity of QRS Detection Algorithms 1990
IEEE Transactions on Biomedical Engineering Vol. 37, No.1.

3. Pablo Lugana, Raimon Jane, Oliver Meste, Peter W. Poon, Pere Caminal and Natish V.
Thakor, Adaptive Filter for Event Related Bio-Electrical Signals Using an Impulse
Correlated Reference Input: Comparison with Signal Averaging Techniques. IEEE
Transactions on Biomedical Engineering Vol. 39, October 1992.

4. Yi-Sheng, Zhu,et al. P-wave detection by an adaptive QRS-T cancellation technique.1987


IEEE.

Вам также может понравиться