0% found this document useful (0 votes)
58 views6 pages

ECG Signal Denoising Techniques

The ECG signal contains important information for diagnosing heart conditions, but is often contaminated by noise that can interfere with analysis. There are three main types of noise: baseline wander below 0.5 Hz, electromyography interference, and powerline interference at 50 or 60 Hz. To remove these, the team designed a filter using FIR high-pass filtering with a 0.5 Hz cutoff to remove baseline wander. For powerline interference, they designed an IIR notch filter centered at 50 or 60 Hz with a bandwidth of 5 Hz. Testing on an ECG signal showed these filters could remove the low-frequency baseline wander noise and powerline interference while preserving the ECG signal.

Uploaded by

talha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views6 pages

ECG Signal Denoising Techniques

The ECG signal contains important information for diagnosing heart conditions, but is often contaminated by noise that can interfere with analysis. There are three main types of noise: baseline wander below 0.5 Hz, electromyography interference, and powerline interference at 50 or 60 Hz. To remove these, the team designed a filter using FIR high-pass filtering with a 0.5 Hz cutoff to remove baseline wander. For powerline interference, they designed an IIR notch filter centered at 50 or 60 Hz with a bandwidth of 5 Hz. Testing on an ECG signal showed these filters could remove the low-frequency baseline wander noise and powerline interference while preserving the ECG signal.

Uploaded by

talha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Complex Engineering Problem

Submitted by: 2018-EE-503 ([Link])

2018-EE-506 (Ali Raza)

Statement:
The ECG test measures the electrical activity of the heartbeat and plays key role in diagnosing
diverse kinds of heart diseases. With each beat, an electrical impulse (or “wave”) travels through
the heart. This wave causes the muscle to squeeze and pump blood from the heart. A normal
heartbeat on ECG will show the timing of the top and lower chambers.

Because the pulses produced by heart may have subtle differences from each other and noise
affects the decision accuracy, the ECG is commonly organized using precise electronic
equipment. Accurate measurements are especially required when data are used to extract features
of ECG signals and make decisions about different kinds of heart diseases employing special
software. However, even very precise measurements are typically contaminated by artefacts and
noise. Artefacts may result from a variety of internal and external causes, such as the
Parkinsonian muscle tremors drying electrode gel. Different kinds of noises may contaminate the
ECG signal during its acquisition and transmission, such as the high frequency noise
(electromyogram noise, additive white Gaussian noise, and power line interference) and low
frequency noise (baseline wandering). Because noise may lead to wrong interpretation, ECG
signal denoising is required. 

"There exist three types of noise that contaminate the ECG signal: the baseline wander noise
(BW), electromyographic interference (EMG), and the power line interference. The BW is
induced by electrodes’ changes due to perspiration, movement and respiration, and is typically
below 0.5 Hz. The power line interference either 50 Hz or 60 Hz and its harmonics are a
significant source of noise."

Our goal in designing the filter is to attenuate baseline wander noise and powerline interference.
It would take more sophisticated processing to track and cancel the EMG noise because EMG
noise appears in the same frequencies as the ECG signal.
Design and estimate the bandpass filter specifications.

Introduction:

Electrocardiogram (ECG) is a signal that describes the electrical activity of the heart. The ECG
signal is generated by contraction (depolarization) and relaxation (repolarization) of atrial and
ventricular muscles of the heart. The ECG signal contains- a P wave (due to atrial
depolarization), a QRS complex (due to atrial repolarization and ventricular depolarization) and
a T wave (due to ventricular repolarization). In order to record an ECG signal, electrodes
(transducers) are placed at specific positions on the human body. Artifacts (noise) are the
unwanted signals that are merged with ECG signal and sometimes create obstacles for the
physicians from making a true diagnosis. Hence, it is necessary to remove them from ECG
signals using proper signal processing methods.

Designing a filter:

The low pass filter is for 50 or 60 Hz noise and High pass filter is used to rectify
baseline wander.

Baseline Wander:

Baseline wander or baseline drift is the effect where the base axis (x-axis) of a signal appears to
‘wander’ or move up and down rather than be straight. It is caused due to improper electrodes
(electrode-skin impedance), patient’s movement and breathing (respiration). Since the baseline
signal is a low frequency signal therefore Finite Impulse Response (FIR) high-pass zero phase
forward-backward filtering with a cut-off frequency of 0.5 Hz to estimate and remove the
baseline in the ECG signal.
Wavelet transform can also be used to remove the baseline wander from ECG signal. The
frequency of baseline wander is approximately 0.5 Hz. According to discrete wavelet transform
(DWT), the original signal is to be decomposed using the subsequent low-pass filters (LPF) and
high-pass filters (HPF). The cut-off frequency for LPF and HPF will be half of the sampling
frequency. For example, if the sampling frequency is 250 Hz, then 125 Hz will be the cut-off
frequency for both LPF and HPF in the first level decomposition. In second level decomposition,
the cut-off frequency becomes 62.5 Hz, for third level decomposition it becomes 31.25 Hz and
so on. Thus, it will require nine- level decomposition using DWT to remove a baseline wander of
0.5 Hz frequency. Following is the Matlab code to remove baseline wander from an ECG signal
using DWT.

Designing a high pass filter:

A high-pass filter attenuates signals below a cutoff frequency (stop-band) and allows signal
above the cutoff frequency

We have H(e^jw) = 0 for 0<w<wc and H(e^jw) = 1 for 1<w<pi

Normalized cutoff freq = f/fs = 0.5/250 = 0.002Hz


In MATLAB we write

clear all
Fs = 360; % Sampling Frequency
N = 50; % Order
Fc = 0.667; % Cutoff Frequency
% Construct an FDESIGN object and call its BUTTER method.
h = fdesign. lowpass ('N,Fc', N, Fc, Fs);
Hd = butter(h);
x=load('[Link]'); % load the ECG signal
x1=x(:,2);
x2=x1./ max(x1);
subplot (2,1,1), plot(x2), title ('ECG Signal with low-frequency noise'), grid on
y0=filter (Hd, x2);
subplot (2,1,2), plot(y0), title ('ECG signal with baseline wander REMOVED'), grid on

[b2,a2]= butter(2,5/Fs,’high’)

We use Butterworth 2nd order filter and cutoff frequency 5Hz.

Freqz(b2,a2) gives magnitude and phase responses. And pole zero map by zplane(b2,a2). Then
filtfilt(b2,a2,x2) we used double filter.

Ideal high pass filter is shown as figure:


Output Should be of the form:

(Baseline corrected)

Powerline Interference:
Electromagnetic fields caused by a powerline represent a common noise source in the ECG, as
well as to any other bioelectrical signal recorded from the body surface. Suh noise is
characterized by 50 or 60 Hz sinusoidal interference, possibly accompanied by a number of
harmonics. Such narrowband noise renders the analysis and interpretation of the ECG more
difficult, since the delineation of low-amplitude waveforms becomes unreliable and spurious
waveforms may be introduced. It is necessary to remove powerline interference from ECG
signals as it completely superimposes the low frequency ECG waves.

An ideal low pass filter is shown in figure

A very simple approach to the reduction of powerline interference is to consider a filter defined
by a complex-conjugated pair of zeros that lie on the unit circle at the interfering frequency.

Zeros= a1,2 = e^+- jw0

Such a second-order FIR filter has the transfer function


H(z) = (1-a1z^-1)( 1-a2z^-1)
= 1-2cos(wo)z^-1 + z^-2

Since this filter has a notch with a relatively large bandwidth, it will attenuate not only the
powerline frequency but also the ECG waveforms with frequencies close to wo. It is, therefore,
necessary to modify the filter so that the notch becomes more selective, for example, by
introducing a pair of complex-conjugated poles positioned at the same angle as the zeros but at a
radius r,

Poles= b1,2= re^+-jwo

Where 0 < r < 1. Thus, the transfer function of the resulting IIR filter is given by

H(z) = (1-a1z^-1)( 1-a2z^-1) / H(z) = (1-b1z^-1)( 1-b2z^-1)

= 1-2cos(wo)z^-1 + z^-2 / 1-2rcos(wo)z^-1 + r^2.z^-2

[b1 a1] = cheby(8,80,50/Fn)

Chebyshev type 2 ,8th order, 80db stopband filter,


X2 = filtfilt(b1,a1,x);

Matlab code:

Clear all
Fs = 360; % Sampling Frequency
Fnotch = 0.67; % Notch Frequency
BW = 5; % Bandwidth
Apass = 1; % Bandwidth Attenuation
[b, a] = iirnotch (Fnotch/ (Fs/2), BW/(Fs/2), Apass);
Hd = dfilt.df2 (b, a);
x=load ('[Link]');
x1=x (:, 2);
x2=x1. / max(x1);
Subplot (3, 1, 1), plot(x2), title ('ECG Signal with baswline wander'), grid on
y0=filter (Hd, x2);
Subplot (3, 1, 2), plot(y0), title ('ECG signal with low-frequency noise (baswline wander) Removed'), grid on
Fnotch = 60; % Notch Frequency
BW = 120; % Bandwidth
Apass = 1; % Bandwidth Attenuation
[b, a] = iirnotch (Fnotch/ (Fs/2), BW/ (Fs/2), Apass);
Hd1 = dfilt.df2 (b, a);
y1=filter (Hd1, y0);
Subplot (3, 1, 3), plot (y1), title ('ECG signal with power line noise Removed'), grid on
`

Contribution:

2018-EE-503 (Research + Report writing)


2018-EE-506 (MATLAB work + Research)

Common questions

Powered by AI

The trade-off between filter complexity and performance in ECG noise filtering involves balancing the technical requirements of noise reduction efficacy against computational resources and potential signal distortion. Complex filters, like the IIR notch filters with pole-zero configurations, provide precise attenuation at selected frequencies but increase computational load and risk signal distortion . For simpler ECG denoising tasks, FIR filters or basic high-pass/low-pass designs might suffice, reducing complexity but potentially offering less precise filtering capabilities. The choice depends on the noise characteristics and the application's sensitivity to signal alterations . Employing MATLAB simulation can aid in testing filter performance and adjusting parameters like cutoff frequency and filter order, as seen in examples provided .

Artifactual contamination of ECG signals can significantly impact clinical diagnoses by introducing misleading information or masking critical signal features, leading to potential misdiagnoses or overlooking significant pathologies. Noise such as baseline drift, powerline interference, or EMG activities can superimpose real ECG waves, distorting their appearance or generating false anomalies . Strategies recommended to ameliorate these issues include applying targeted filtering methods like high-pass filters for baseline wander, notch filters for specific narrowband noise (e.g., powerline interference), and applying wavelet transformations for complex noise patterns. These strategies aim to clean the ECG signals while preserving the natural waveform for accurate clinical analysis .

Removing both high and low frequency noises from ECG signals is necessary to ensure accurate signal interpretation and diagnosis. High frequency noises, like powerline interference and electromyographic noise, can obscure high-frequency components of the ECG, while low frequency noises like baseline wander can mask slower waves. High-pass filters are used to address baseline wander, as low-frequency components are attenuated, whereas a notch filter specifically targets the narrowband powerline interference . Techniques like FIR and IIR filtering, wavelet transformations, and complex pole-zero configurations for IIR notch filters are implemented to effectively isolate and remove these disturbances while preserving the essential components of the ECG signal .

MATLAB plays a crucial role in simulating the ECG signal filtering process by allowing for experimentation and performance evaluation of different filter designs under controlled conditions. It provides tools to develop various types of filters, like Butterworth, Chebyshev, and notch filters, as well as simulate their effects on ECG signals with added noise . MATLAB's ability to visualize the frequency response and signal plots helps developers adjust parameters such as filter order, cutoff frequency, and notch width to optimize noise reduction while preserving signal quality. This feedback loop aids in enhancing comprehension of filter behavior and refining strategies to manage noise interference in ECG signals through computational experimentation .

Baseline drift, also known as baseline wander, influences the accuracy of ECG readings by causing the baseline of the ECG signal to move up and down, obscuring true signal values. This drift can mislead diagnostic interpretations, making it critical for clinicians to correctly assess the heart's electrical activity. Baseline wander usually results from changes in electrode-skin impedance or movements such as breathing and can mask genuine signal features significant for diagnosing heart diseases . Addressing baseline drift involves using high-pass filters or wavelet transform techniques to stabilize and correct the baseline, thereby improving the clarity and diagnostic value of the ECG signal .

Selecting an appropriate filter order is significant because it directly impacts the filter’s ability to adequately attenuate noise while preserving the integrity of the ECG signal. A higher order filter generally provides sharper cutoff characteristics and better separation between signal and noise frequencies but increases the complexity and potential instability of the filter design. In contrast, a lower order filter is simpler and more stable but may not effectively separate noise from the signal . For example, the design of a second-order Butterworth high-pass filter with a cutoff frequency at 5 Hz serves to address baseline wander efficiently while maintaining minimal signal distortion . Proper determination of filter order helps in achieving a balance that meets both noise reduction and computational efficiency requirements.

Frequency-specific filters, such as notch filters, are crucial in reducing powerline interference, which is characterized by narrowband sinusoidal noise at 50 or 60 Hz . An IIR notch filter is designed using complex-conjugated pole-zero pairs, which effectively creates a notch at the interfering frequency. The zeros are located at the unit circle at the interfering frequency's phase angle, and poles are placed slightly inside the circle to adjust the filter's selectivity . This configuration allows the filter to attenuate the powerline interference efficiently while minimally affecting surrounding frequencies . The Chebyshev type 2 8th order filter mentioned is one example of an implementation for selective notch filtering, providing substantial attenuation around the target frequency .

Baseline wander noise, a low frequency noise approximately at 0.5 Hz, can be effectively filtered out in ECG signals using a high-pass filter. A commonly used method is applying Finite Impulse Response (FIR) high-pass zero phase forward-backward filtering with a cutoff frequency of 0.5 Hz . Wavelet Transform is another technique that can be used, where the signal is decomposed through low-pass and high-pass filters, with each subsequent decomposition lowering the cutoff frequency. This approach requires a nine-level decomposition using Discrete Wavelet Transform (DWT) to adequately remove baseline wander . Additionally, designing a high-pass Butterworth filter with a specific cutoff frequency, like 0.667 Hz as stated for a low-pass filter example, is essential for accurately targeting and removing the baseline wander .

Frequency decomposition using wavelets assists in removing low-frequency noise like baseline wander by breaking down the ECG signal into different frequency components at multiple scales. Wavelet transforms allow separation of signal components across varying frequency bands, enabling isolated examination and filtration. Specifically, the Discrete Wavelet Transform (DWT) separates the signal through successive low-pass and high-pass filtering, iteratively halving the frequency at each decomposition level . For instance, in removing baseline wander noise at approximately 0.5 Hz, the ECG signal undergoes a process of nine-level decomposition, isolating and attenuating the offending low-frequency component while preserving the essential morphological characteristics of the ECG waveforms .

Tracking and canceling electromyographic (EMG) noise in ECG signals is challenging because EMG noise shares similar frequency bands with the ECG signals, making it difficult to differentiate between the two. The document suggests more sophisticated processing techniques are needed to address this issue, though it primarily focuses on attenuating noise through filtering methods such as high-pass filters for baseline noise and considers complex pole-zero configurations for more selective notch filtering . Specific EMG noise removal is not thoroughly detailed, indicating a gap in the proposed solutions .

You might also like