You are on page 1of 4

2013 European Modelling Symposium

Median Filter Approach for Removal of Baseline Wander


in Photoplethysmography Signals

Adewale Emmanuel Awodeyi Stephen R. Alty Mohammad Ghavami


Dept. of Engineering and Design Dept. of Engineering and Design Dept. of Engineering and Design
London South Bank University London South Bank University London South Bank University
London, United Kingdom London, United Kingdom London, United Kingdom
e-mail: awodeyia@lsbu.ac.uk e-mail: steve.alty@lsbu.ac.uk e-mail: ghavamim@lsbu.ac.uk

Abstract— Removal of baseline wander is a crucial step in the The operation can be used in data processing to reject
signal conditioning stage of photoplethysmography signals. glitches, align events and to pass step functions as well as
Hence, a method for removing the baseline wander from enhance discontinuities in the data. After this brief overview,
photoplethysmography based on two-stages of median filtering the properties of median filtering will be presented in section
is proposed in this paper. Recordings from Physionet database IV. The methods and experimental results are described in
are used to validate the proposed method. In this paper, the section V. The correlation co-efficient is used to measure the
two-stage moving average filtering is also applied to remove performance of the proposed method.
baseline wander in photoplethysmography signals for
comparison with our novel two-stage median filtering method.
Our experiment results show that the performance of two- II. BACKGROUND
stage median filtering method is more effective in removing
baseline wander from photoplethysmography signals. This In order to develop the necessary sensors to collect
median filtering method effectively improves the cross relevant data for further processing and effective
correlation with minimal distortion of the signal of interest. classification algorithms to accurately separate them into
Although the method is proposed for baseline wander in healthy and unhealthy characteristics in biomedical
photoplethysmography signals, it can be applied to other application of signal processing for assessing cardiovascular
biomedical signals as well. health, we decided to understand anatomy and physiology of
human body and develop a hand-held device to quickly,
Keywords- photoplethysmography; cardiovascular; baseline accurately and non-invasively assess a patient’s risk of
wander. developing cardiovascular disease in the next ten years. The
human body is made up of many component systems which
I. INTRODUCTION
include the nervous system, the cardiovascular system and
Photoplethysmography (PPG) is a non-invasive optical the musculoskeletal system, among others. Biomedical
technique for detecting cardiovascular characteristics from application of signal processing for assessing cardiovascular
the fingertip while the heart is pumping [1]. It uses an health have been applied to investigate a host of biological
infrared light source to illuminate the finger on one side, and and physiological systems that manifest themselves as
a photo detector placed on the other side measures the small signal.
variations in the transmitted or reflected light intensity. The
variations in the photo detector signal are related to changes
in blood volume inside the tissue with heart rate. The plot for III. PPG FEATURES AND PARAMETERS
this variation against time is typically referred to as a The quality of the PPG signal depends on artifacts, the
photoplethysmographic or PPG signal, but are commonly spacing between the pulse waves and the variations in the
contaminated by baseline wander (BW) caused by stroke volume of the heart can be seen as changes in the
respiration at frequencies varying between 0.15 and 0.5 Hz amplitudes of the pulse wave. However, the information has
[2]. The transmittance and reflectance are two basic types of shown to be useful in diagnosis and in gauging the severity
photoplethysmography. The transmittance or reflectance of illness in newborns. Photoplethysmography signals
PPG is applicable to a restricted body part, such as the consist of a large DC component, which is attributed to the
finger or the ear lobe because of the limited penetration total blood volume of the examined tissue, and a pulsatile
depth of the light through organ tissue. Therefore, it is very AC component, which is synchronous to the pumping action
important that the signal is correctly filtered to remove BW of the heart. The two maxima observed in the PPG waveform
but preserve as far as possible important information. The are called systolic and diastolic peaks, and they can provide
median filter is currently enjoying greater theoretical valuable information about the cardiovascular system [3].
attention and practical application. Nonetheless, there are yet The time duration between two consecutive systolic peaks
relatively few papers published on median filter behavior. gives the instantaneous heart rate. The AC component is
Median filters operate by selecting the middle value of an superimposed onto a large DC component. The DC
ascending-ordered sequence of numbers. These numbers are component must be removed to measure the AC waveform
taken from a moving window on the data to be processed. with a high signal–to–noise ratio. Since the useful AC signal

978-1-4799-2578-0/13 $31.00 © 2013 IEEE 248


261
DOI 10.1109/EMS.2013.45
is only a very small portion of the whole signal, an effective median is that the running median filter can be applied
amplification circuit is also required to extract desired along a given trace, or across adjacent traces. In general,
information from it. A typical PPG waveform is shown in though, a window of values will be used, a median extracted
the figure below. and placed on the output trace at the middle of the window,
the window shifted one data point along the sequence, a
median extracted, window shift, etc. While the median filter
may be used to filter a trace in time, it is also often used as a
spatial process [5].

V. METHOD AND EXPERIMENT RESULTS


The PPG vector or matrix data extracted from Physionet
database [6] is first filtered before yielding a clean signal
called PPG original signal as shown in Figure 2(a). An
artificial baseline wander (BW) is generated by using a
combination of sine and cosine waves as displayed in Figure
Figure 1: A typical PPG waveform, as described by [4].
2(b). The frequencies of the sine and cosine waves are 0.4Hz
and 0.2Hz respectively while their corresponding amplitudes
IV. MEDIAN PROPERTIES are 60mV and 120mV. Thereby, we have corrupted the PPG
original signal with measured amounts of baseline wander to
As noted previously, the median filter M is a data- generate the PPG test signal as shown in Figure 2(c).
dependent operator which extracts a value from a sequence 1500
of numbers. For example, M (5, 1000, 6, - 1, -1, 7, 9) when PPG original signal

ordered, becomes M (-1,-1, 5, 6, 7, 9, 1000) = 6. The 1000


inclusion of a large number that deviate from what is normal Amplitude(mV)

in this sequence disturbs the median selection very little but 500

If a sequence is symmetric about some point (for example,


an event has a symmetric noise distribution), then the median 0

and mean selections will be the same [5]. For example, the
-500
sequence M (0, 5, 6, 7, 8, 9, 14) = 7.
The median selection is also invariant to scaling. That is, -1000
0 2 4 6 8 10
if all the numbers in the sequence are scaled or Time(sec)

exponentiated (assuming positive numbers), then a given (a)


number will occupy the same ordered position before and 200
Baseline wander signal
after scaling. For example, if a positive sequence of 150
numbers has a median Xm, and then the sequence values are 100
all squared, the new median will be X2m. The mean does not
Amplitude(mV)

50
have this exponentiation property.
0

-50

-100

-150

It is also a nonlinear operator, as it does not conform to -200


0 2 4 6 8 10
Time(sec)
the definition of linearity:
(b)
2000
For example, take PPG test signal
1500

1000
M = Median filter
Amplitude(mV)

500

-500

-1000

-1500
0 2 4 6 8 10
Time(sec)
Thus the median filter is nonlinear. If M were instead a (c)
mean filter in the above example, then equation (1) would Figure 2: Signal types (a) PPG original signal (b) Baseline wander signal
hold (with 7 = 7). Another interesting property of the (c) PPG test signal.

262
249
We applied the two-stage median filter (we will refer to performance is measured by root mean square error
this as TSMdF) method to PPG test signal. The TSMdF have (RMSE). The lower RMSE value the better quality of the
variable window sizes for removal of BW in samples with an signal. RMSE can be defined as the square root of the mean
average first stage and second stage of window size set to 0.3 of the square error [9].
and 0.6 respectively. The PPG signal reconstructed after
removing BW is shown in Figure 3(a). As a comparison, a
two-stage moving average filter (TSMaF) is also used to
remove BW in the PPG test signal. Figure 3(b) displays the
result of applying the TSMaF to remove the BW.
1500
PPG signal reconstructed by TSMdF Where yi is the values actually observed, ŷ i is the values
1000 predicted. The RMSE value for PPG signal reconstructed
reach 27.3mV for TSMdF while 41.8mV for TSMaF.
Amplitude(mV)

500

1500
0 PPG original signal
PPG signal reconstructed by TSMdF
-500
1000
-1000
0 2 4 6 8 10
Time(sec)

A m p litu d e (m V )
(a) 500
1500
PPG signal reconstructed by TSMaF

1000
0
Amplitude(mV)

500

0 -500

-500

-1000
-1000
0 2 4 6 8 10 0 2 4 6 8 10
Time(sec)
Time(sec)
(b) Figure 4: The solid red line is the PPG original signal and the dotted line is
Figure 3: Simulation results (a) PPG signal reconstructed by TSMdf (b) the PPG signal reconstructed by the TSMdF method.
PPG signal reconstructed by TSMaF.

However, careful comparison between Figure 3(a) and 1500


3(b) indicate that TSMdf is better at removing BW than PPG original signal
TSMaF. In order to compare the results, we evaluate the PPG signal reconstructed by TSMaF
performance of the correction methods with cross-correlation 1000
[7].
A m p litu d e (m V )

500

Where Xi is each X0 value through X(n-1) of PPG original 0


signal, Yi is each Y0 value through Y(n-1) of the PPG signal
reconstructed. The cross correlation Rxy of the PPG original
and the PPG signal reconstructed reach 0.9989 for TSMdF
correction method while only 0.9975 for TSMaF. The PPG -500
test signal and corresponding PPG signal reconstructed are
shown in Figure (4) and Figure (5) respectively. The
relationship is illustrated graphically using a normalized XY
plot in Matlab [8]. Where two sets of signals are strongly -1000
0 2 4 6 8 10
linked together, we say they have a higher positive Time(sec)
correlation as in Figure 6, while Figure 7 shows a noticeably Figure 5: The solid red line is the PPG original signal and the dotted line is
lower positive correlation. The embedding distortion the PPG signal reconstructed by the TSMaF method.

263
250
XY Scatter Plot for Original vs. TSMdF XY Scatter Plot for Original vs. TSMaF
1500 1500

y = 0.9961*x + 1.124e-013 y = 0.9836*x + 4.164e-014

1000 1000

500 500

TSMaF
TSMdF

0 0

-500 -500
data 1 data 1
linear linear

-1000 -1000
-1000 -500 0 500 1000 1500 -1000 -500 0 500 1000 1500
PPG Original PPG Original

Figure 6: Scatter plot for TSMdF vs. Original PPG, showing a higher Figure 7: Scatter plot for TSMaF vs. Original PPG, showing a lower
correlation than Figure 7. correlation than Figure 6.

VI. CONCLUSION REFERENCES


The present paper has used various quality of [1] J. Allen, “Photoplethysmography and its application in clinical
measurement. In this paper, the results of experiment and physiology measurement,” Physiological Measurement, vol. A28, IoP
Publishing, 2007.J. Clerk Maxwell, A Treatise on Electricity and
correlation coefficient measure indicate clearly that our Magnetism, 3rd ed., vol. 2. Oxford: Clarendon, 1892, pp.68–73.
method can give a very satisfactory performance on removal [2] Zahoor-uddin, “Baseline Wandering Removal from Human
of baseline wander in photoplethysmography signal. Ten Electrocardiogram Signal using Projection Pursuit Gradient Ascent
extracted photoplethysmography signals from Physionet Algorithm,” International Journal of Electrical & Computer Sciences
database were also used to evaluate the performance of the IJECS/IJENS, vol. 9, No:9, pp. 11-13.
presented method. Work is underway on cascaded filtering [3] NHS Choices, http://www.nhs.uk/conditions/cardiovascular-
of photoplethysmography signals to remove other artifacts disease/pages/introduction.aspx [accessed 05/06/13].
commonly found in PPG signals: spikes, power line [4] Jayasree, V K; Dr. Radhakrishnan, P. Selected cardiovascular studies
interference and noise. Future work will involve peak based on photoplethysmography technique. PhD Thesis.Cochin
University of Science and technology:India, Jan. 2009.
detection and heart rate extraction from
[5] Robert R. Stewart, “Review and A New F/K Analogue Design,”
photoplethysmography signals and data from various Median Filtering, vol. 21, Dec. 1985, pp. 54-63.
patients will be analyzed for healthy and unhealthy [6] Physionet database, http://physionet.org/cgi-bin/atm/ATM [accessed
classification. 02/06/13].
[7] S. Nahar and M. ShahNoor bin Munir, "Automatic detection of
premature ventricular contraction beat using morphological
ACKNOWLEDGMENT transformation and cross-correlation," in Signal Processing and
Communication Systems, 2009. ICSPCS 2009. 3rdInternational
The first author would like to express his thanks to Conference on, 2009, pp. 1-4.
biomedical engineering and communications (BiMEC) for
[8] Matlab, http://www.mathworks.co.uk/help/matlab/ref/tstool.html
providing facility to work at London South Bank University [accessed 07/08/13].
and my supervisor for providing moral support and [9] Wikipedia, http://en.wikipedia.org/wiki/Root-mean-square_deviation
encouragement towards research. [accessed 07/08/13].

264
251

You might also like