PROJECT REPORT
Submitted To
Madam Shahinza Manzoor
Submitted By
Hassan Ahmed
Faizan Sheraz
Roll no
212101025
212101020
Subject
Signal and system
Class
BSCE -4
Date
30 March 2023
Signal Processing Techniques for Removing Noise from ECG
Signals
1. Abstract: -
The accurate analysis and interpretation of electrocardiogram (ECG) signals are essential
for diagnosing various cardiovascular disorders. However, these signals are often corrupted by
noise, which can hinder accurate interpretation and diagnosis. In this project report, we explore
signal and system techniques for noise removal from ECG signals, aiming to improve the quality
and reliability of the diagnostic information obtained from these signals.
The project begins by providing a comprehensive overview of ECG signals, highlighting
their importance in clinical settings and the challenges posed by noise interference. Various
sources of noise in ECG signals are identified, including baseline wander, power line
interference, muscle artifacts, and electrode motion artifacts. Understanding the characteristics of
these noise sources is crucial for the subsequent noise removal techniques.
Next, a thorough review of signal processing and system techniques is presented. This
includes the application of digital filters, such as finite impulse response (FIR) filters and infinite
impulse response (IIR) filters, to attenuate noise components while preserving the important
ECG features. The design considerations and implementation aspects of these filters are
discussed, including filter order, cutoff frequencies, and filter coefficients determination.
Furthermore, advanced signal processing techniques are explored, such as wavelet
denoising, adaptive filtering, and independent component analysis (ICA). These methods
leverage the properties of noise and ECG signals to effectively separate and remove noise
components. The advantages, limitations, and implementation considerations of each technique
are examined, providing a comprehensive understanding of their applicability in real-world
scenarios.
To evaluate the performance of the noise removal techniques, a dataset of noisy ECG
signals is utilized. Objective metrics such as signal-to-noise ratio (SNR), mean squared error
(MSE), and peak signal-to-noise ratio (PSNR) are employed to quantify the improvement
achieved by each method. Comparative analyses are conducted to identify the most effective
noise removal technique based on these metrics.
The results obtained from the experiments demonstrate the efficacy of the signal and
system techniques for noise removal from ECG signals. By effectively reducing the noise
interference, the diagnostic accuracy and reliability of ECG signals are significantly improved,
facilitating more accurate interpretation and diagnosis of cardiovascular disorders. The findings
of this project contribute to the advancement of signal processing methods in the field of
biomedical engineering and offer valuable insights for researchers and practitioners working on
ECG signal analysis and noise removal.
2. Introduction: -
The Electrocardiogram (ECG) is a signal that describes the electrical activity of the heart.
It 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). To record an
ECG signal, electrodes (transducers) are placed at specific positions on the human body.
Artifacts (noise) are unwanted signals that are merged with ECG signal and can create obstacles
for the physicians from making a true diagnosis. There are four types of artifacts encountered in
ECG signals: baseline wander, powerline interference, EMG noise and electrode motion
artifacts.
2.1. Baseline Wander: -
Baseline wander is the effect where the base axis (x-axis) of a signal appears to 'wander' or move
up and down rather than be straight. This causes the entire signal to shift from its normal base. In
ECG signals, baseline wander is caused due to improper electrodes, patient movement and breathing.
The frequency content of baseline wander is in the range of 0.5 Hz, but increased movement of the
body during exercise or stress test increases the frequency content. To estimate and remove the
baseline in the ECG signal, Finite Impulse Response (FIR) high-pass zero phase forward-backward
filtering with a cut-off frequency of 0.5 Hz can be used.
2.2. Powerline Interface: -
Electromagnetic fields caused by a powerline are a common noise source in the ECG, as well as
any other bioelectrical signal recorded from the body surface. This noise is characterized by 50-60 Hz
sinusoidal interference, possibly accompanied by harmonics. This narrowband noise renders the
analysis and interpretation of the ECG more difficult, as 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 like P
and T wave. (Figure 1) shows an ECG signal typically affected by a powerline interference.
Figure 1. ECG affected by powerline (50/ 60 Hz) interference
2.3. EMG Noise: -
Muscle noise is a major problem in many ECG applications, especially in recordings acquired
during exercise. It is not removed by narrowband filtering, but presents a much more difficult
filtering problem since the spectral content of muscle activity considerably overlaps that of the
PQRST complex. Techniques can be used to reduce muscle noise in a way similar to the processing
of evoked potentials, but ensemble averaging is limited to one particular QRS morphology at a time
and requires several beats to be available. There is still a need to develop signal processing techniques
which can reduce the influence of muscle noise. Figure below shows an ECG signal interfered by an
EMG noise.
Figure 2. ECG signal with electromyography (EMG) noise
2.4. Electrode Motion Artifacts
Electrode motion artifacts are caused by skin stretching which alters the impedance of the skin
around the electrode. They occur mainly in the range from 1 to 10 Hz and are manifested as large-
amplitude waveforms which are sometimes mistaken for QRS complexes. They are particularly
troublesome in the context of ambulatory ECG monitoring, where they constitute the main source of
falsely detected heartbeats. A typical ECG signal affected by electrode motion artifact is shown in
(Figure 3) below.
Figure 3. ECG affected by electrode motion artifacts
3. Objectives: -
Noise removal from ECG signal is an important task in biomedical signal processing, as
the presence of noise can obscure important information in the signal and lead to inaccurate
diagnosis and treatment of cardiac conditions. The objectives of noise removal from ECG signal
can be divided into several categories, including improving the quality of the signal, enhancing
diagnostic accuracy, and facilitating further analysis of the signal.
The primary objective of noise removal from ECG signal is to improve the quality of the
signal. This involves removing any unwanted noise that may be present in the signal, such as
electrical interference from nearby equipment or other sources of electromagnetic interference.
By removing this noise, the resulting signal will be clearer and easier to interpret, enabling more
accurate diagnosis of cardiac conditions and more effective treatment.
Another objective of noise removal from ECG signal is to enhance diagnostic accuracy.
This involves removing noise that may be confounding diagnostic measurements, such as
baseline wander or muscle artifact, which can make it difficult to identify the presence of
arrhythmias or other cardiac conditions. By removing this noise, clinicians and researchers can
more accurately assess the health of the heart and make more informed decisions about patient
care.
Finally, noise removal from ECG signal can facilitate further analysis of the signal, such
as feature extraction and classification, which can provide insights into the underlying
physiology of the heart. This can be particularly useful in research settings, where large amounts
of ECG data may be analyzed to identify trends or patterns that may not be immediately apparent
from visual inspection of the signal. By removing noise from the signal, researchers can obtain
more accurate and reliable measurements, leading to more meaningful results and a deeper
understanding of the cardiovascular system.
4. Methodology: -
There are various signal processing methods for removing the noise from ECG signal.
These methods are simple yet effective. These techniques are described below.
4.1. Removing Baseline Wander: -
A straightforward approach to the design of a filter is to choose the ideal high-pass filter as a
starting point,
{
H ( e jω )= 0 , 0<|ω|<ω c
1 , ωc <|ω|< π
4.2. Removing Powerline Interface: -
A very simple approach to the reduction of powerline interference is to consider a filter defined
by a complexconjugated pair of zeros that lie on the unit circle at the interfering frequency
± j ω0
z 1 ,2=e
Such a second-order FIR filter has the transfer function
H ( z )=( 1−z1 z−1 )( 1−z 2 z−1 )
−1 −2
¿ 1−2 cos ( ω0 ) z + z
4.3. Removing EMG Noise: -
The EMG noise is a high-frequency noise; hence an n-point moving average (MA) filter may be
used to remove, or at least suppress, the EMG noise from ECG signals. The general form of an MA
filter is
n
y ( n )=∑ bk x (n−k )
k=0
Where x and y are the input and output of the filter, respectively. The bk values are the filter
coefficients or tap weights, k = 0, 1, 2. . . N, where N is the order of the filter.
4.4. Removing Motion Artifacts(electrode): -
One of the widely used techniques for removing the electrode motion artifacts is based on
adaptive filters. The general structure of an adaptive filter for noise canceling utilized in this paper
requires two inputs, called the primary and the reference signal. The former is the d(t) = s(t) + n1 (t)
where s(t) is an ECG signal and n1(t) is an additive noise. The noise and the signal are assumed to be
uncorrelated. The second input is a noise u(t) correlated in some way with n1 (t) but coming from
another source. The adaptive filter coefficients wk are updated as new samples of the input signals are
acquired. The learning rule for coefficients modification is based on minimization, in the mean square
sense, of the error signal e(t) = d(t) − y(t) where y(t) is the output of the adaptive filter. A block
diagram of the general structure of noise cancelling adaptive filtering is shown in figure 13 [10]. The
two most widely used adaptive filtering algorithms are the Least Mean Square (LMS) and the
Recursive Least Square (RLS).
Figure 4. Block Diagram of Adaptive filtering scheme
5. Implementation and Result: -
We acquired a dataset of ECG signal affected with different types of artifacts and using
this dataset we implemented different noise removal techniques for each type of noise. The
techniques used for removing the noise along with the results are given below.
5.1. For Removing Baseline Wander
Finite Impulse Response (FIR) high-pass zero phase forward-backward filtering with a cut-off
frequency of 0.5 Hz is used to estimate and remove the baseline in the ECG signal
Figure 5. Results of removing Baseline Wander
5.2. For Removing Powerline Interface
Powerline interference (50 or 60 Hz noise from mains supply) is removed using a notch filter of
50 or 60 Hz cut-off frequency.
Figure 6. Results of removing PowerLine Interface
5.3. For Removing EMG Noise
EMG noise is removed using a low-pass filter of an appropriate cut-off frequency.
Figure 7. Results of removing EMG Noise
5.4. For Removing Electrode Motion Artifacts
A high-pass filter with a cutoff frequency at 4Hz is applied to remove the motion artifact
superimposed in the ECG signal
Figure 8a. ECG signal with motion artifact 8b. ECG signal without motion artifact
6. Advantages: -
Noise removal from ECG (Electrocardiogram) signals offers several advantages,
including:
6.1. Enhanced Signal Quality:
Removing noise from ECG signals improves the overall quality of the signal by reducing
interference and artifacts. This enables better visualization and analysis of the important features and
characteristics of the ECG waveform.
6.2. Accurate Diagnosis:
Noise in ECG signals can obscure or distort vital information, making it difficult to accurately
diagnose cardiac conditions. By eliminating noise, clinicians and researchers can obtain more reliable
and accurate information about the heart's electrical activity, leading to improved diagnostic
capabilities.
6.3. Improved Signal Analysis:
Noise-free ECG signals facilitate more effective analysis and interpretation. Various algorithms
and techniques can be applied to the clean signals to extract valuable information, such as detecting
abnormalities, identifying arrhythmias, measuring heart rate variability, and assessing cardiac
function.
6.4. Noise Artifacts Reduction:
ECG signals can be affected by different types of noise, such as power line interference, motion
artifacts, electrode contact noise, and muscle noise. Removing these noise components minimizes
false alarms and artifacts, which could otherwise lead to misinterpretation and unnecessary
interventions.
6.5. Increased Sensitivity
Noise reduction enhances the sensitivity of ECG signal analysis. It allows for the detection of
subtle changes in the waveform, which can be indicative of underlying cardiac conditions or
abnormalities that may go unnoticed in the presence of noise.
6.6. Improved Telemedicine and Remote Monitoring
With the advancement of telemedicine and remote monitoring technologies, ECG signals can be
transmitted and analyzed remotely. Noise removal ensures accurate signal transmission, reducing the
chances of misdiagnosis or incorrect treatment decisions due to noise-induced signal distortions.
6.7. Efficient Data Compression:
Clean ECG signals require less storage space, as they do not contain unnecessary noise
components. This is particularly useful when dealing with large volumes of ECG data, enabling
efficient data storage, retrieval, and sharing.
Overall, noise removal from ECG signals leads to improved signal quality, enhanced
diagnostic accuracy, better analysis capabilities, and more reliable interpretations, ultimately
benefiting healthcare providers, researchers, and patients.
7. Applications: -
Noise removal from ECG signals is an essential preprocessing step in electrocardiogram
(ECG) analysis. Removing noise from ECG signals helps improve the accuracy of diagnostic
algorithms, enhances signal quality for visual interpretation, and enables more reliable feature
extraction. Here are some applications of noise removal from ECG signals:
7.1. Clinical Diagnosis
Accurate diagnosis of cardiac abnormalities relies on clean ECG signals. Noise removal
techniques help eliminate artifacts, interference, and baseline wander, ensuring more accurate
detection of abnormalities such as arrhythmias, myocardial infarctions, and conduction disorders.
7.2. Telemedicine and Remote Monitoring
With the increasing popularity of telemedicine and remote patient monitoring, noise removal
becomes crucial for transmitting high-quality ECG signals over network connections. Removing
noise ensures reliable interpretation and analysis of ECG signals by healthcare professionals, even
when monitoring is conducted remotely.
7.3. Signal Processing and Feature Extraction
Noise-free ECG signals provide a better foundation for signal processing techniques, such as
filtering, feature extraction, and time-frequency analysis. These processes are fundamental for
detecting specific features, like QRS complexes, P-waves, and ST segment changes, which aid in
diagnosing various cardiac conditions.
7.4. Biometric Authentication
ECG signals are being explored as a potential biometric modality for individual identification due
to their uniqueness and stability. Noise removal techniques help enhance the reliability of ECG-based
biometric systems by reducing the impact of artifacts and noise on the signal, leading to more
accurate identification.
7.5. Heart Rate Variability (HRV) Analysis
HRV analysis is widely used to assess autonomic nervous system activity and cardiac health.
Noise removal from ECG signals improves the accuracy of HRV measurements by eliminating noise-
induced artifacts, allowing for more precise evaluation of heart rate dynamics and the identification of
autonomic dysfunctions.
7.6. Wearable Health Devices
Wearable ECG monitoring devices are becoming increasingly popular for continuous health
monitoring. Noise removal techniques play a crucial role in enhancing the accuracy of these devices
by minimizing motion artifacts, power line interference, and other sources of noise, ensuring reliable
ECG recordings.
7.7. ECG Data Mining and Research
Noise-free ECG signals facilitate the analysis of large-scale ECG datasets for research purposes.
Removing noise from ECG signals helps identify subtle patterns and abnormalities, supports the
development of machine learning algorithms, and contributes to a deeper understanding of cardiac
diseases and risk factors.
In summary, noise removal from ECG signals has numerous applications ranging from
clinical diagnosis and telemedicine to signal processing, biometrics, and research. By enhancing
signal quality and reducing noise-induced artifacts, these applications benefit from more accurate
and reliable analysis of ECG data.
8. Conclusion
The process of noise removal from ECG signals plays a crucial role in enhancing the
accuracy and reliability of cardiac diagnoses. By effectively removing noise from ECG signals,
healthcare professionals can enhance the accuracy and reliability of cardiac diagnoses, leading to
more precise treatment plans and improved patient outcomes. Noise removal techniques
contribute to the continuous advancement of medical technology and the field of cardiology.
Noise removal from ECG signals is a complex and essential process that requires a combination
of expertise in signal processing, biomedical engineering, and clinical knowledge. With ongoing
research and development in this area, we can anticipate further advancements and innovations
that will continue to enhance the quality and reliability of ECG signal analysis, ultimately
benefiting both healthcare providers and patients.