ecti2013-respiration_rate_20130402_submission.pdf
TRANSCRIPT
-
8/22/2019 ecti2013-respiration_rate_20130402_submission.pdf
1/5
Estimation of Respiratory Rate from Smartphones
Acceleration DataThanakij Pechprasarn
1, Suporn Pongnumkul
2
National Electronics and Computer Technology Center
112 Thailand Science Park, Phahonyothin Road, Klong 1, Klong Luang, Pathumthani 12120, [email protected]@nectec.or.th
AbstractAbnormal respiratory rates have been shown to be an
important predictor of serious clinical illness, but respiratory
rate is a vital sign that is often not recorded because methods for
measuring respiratory rates are cumbersome. We propose an
approach to record and monitor respiratory rate of a patient that
is lying down by placing an accelerometer-equipped smartphone
on the patients chest. We develop an algorithm based on fast
Fourier transform (FFT) to estimate the respiratory rate from
the noisy acceleration data. The main contribution of this paper
is that our proposed algorithm can estimate respiratory rates
using only tri-axial acceleration data from sensor in commodity
smartphones without any other special equipment. Preliminary
results show that our method can reasonably estimate the
respiratory rate.
Keywordsrespiratory rate, accelerometer, time series, movingaverage, Fourier transform
I. INTRODUCTIONRespiratory rate is the number of breaths that a person takes
in one minute while at rest. In practice, medical practitioners
measure respiratory rate by counting how many times the
chest moves up and down within one minute, or within 30seconds and multiply the count by two. The method for
measuring respiratory rate is tedious and time-consuming;therefore, it is a vital sign that is often neglected [1]. However,
as respiratory rates may increase with fever, illness, or other
medical conditions, it is an important predictor of serious
clinical illnesses. The technologies for measuring respiratory
rates are still an active area of research [2].
Most smartphones nowadays offer various built-in sensors
and often include the tri-axial accelerometer, which measures
the acceleration in three orthogonal directions. An
accelerometer can be used to sense vibration, e.g. the vibration
of a machine, orientation, e.g. in human activity monitoring.The tri-axial accelerometer is used as an inclinometer to
reflect the abdomen or chest movement caused by respiration.
We aim at creating a tool that can be used by medical
practitioners and non-practitioners alike; therefore, we keep
the device and the measurement methods simple. The device
we use is an iPhone 4, a commodity smartphone that has tri-
axial accelerometers, and the measurement method is simplyplacing the smartphone on the patients chest for 30 seconds
while the patient is in a lying down position.
The algorithm we developed is based on the fast Fourier
transforms. The data is first pre-processed to reduce noiseusing smoothing and detrending. Then we perform FFT to
find the highest frequency. After that, we derived the
respiratory rate from the three axes of signals by choosing the
strongest frequency.
We conducted an experiment to verify our methods, where
we asked a healthy adult to lie down and had a generalpractitioner to measure the respiratory rate by counting the
chest movements for about 30 seconds. The subject was asked
to simulate fast breathing, normal breathing and slow
breathing. We compare the observed respiratory rate from the
general practitioners, the wave counts from the visual signalsand the answer from our algorithm and found that our method
can reasonably estimate the respiratory rate in all three cases.
Our main contribution is the algorithm for estimating
respiratory rates from just the acceleratory signals from
commodity smartphones.
The rest of this paper is organized as follows. Section II
reviews the related work. Section III describes our algorithm.Section IV describes the experiment including the setup and
the result. Then we conclude in Section V.
II. RELATED WORKRespiratory rate is one of a vital sign that can be used to
monitor the wellness of an individual [3-6]. It helps detect any
malfunction of breathing activities, especially during sleeping.
Respiratory rate is normally estimated from a recorded
waveform. There are 2 main categories of waveform
recording methods. In first category, a waveform of
respiratory efforts is directly recorded. For example,impedance pneumography (IP) measures a respiratory activity
through differential changes in capacitance. Respiratoryinductive plethysmography (RIP) uses stretch sensors on the
chest wall whereas flow thermography utilizes the changes in
temperature of air flow when breathing. These methods can be
viewed as a mainstream for the direct category. IP is the mostwidespread method used in a hospital whereas RIP is the most
common method for overnight monitoring [4]. Another class,
also classified to be in a direct category but much less
common, includes the use of an accelerometer, a laser-based
device, ultrasound, and audio and/or video processing. On the
other hand, it is also possible to record a respiratory waveform
978-1-4799-0545-4/13/$31.00 2013 IEEE
-
8/22/2019 ecti2013-respiration_rate_20130402_submission.pdf
2/5
in an indirect fashion. However, this category would involve
an extra step to rebuild and extract a respiratory waveformfrom other related waveforms. For instance, a respiratory
waveform can be derived from electrocardiogram (ECG),
photoplethysmogram (PPG), arterial blood pressure (ABP)
and the peripheral arterial tonometry (PAT). Derivation of
respiratory rate from ECG is an area that has been studied
extensively compared to the others in the category. Moreover,
recently researchers tend to include various signal sourcessimultaneously in order to improve a final estimate of
respiratory rate. For example, a novelty proposed by Nemati
et al. [7] is also based on data fusion which includes ECG,
PAT, IP and PPG.
Due to an emergence of microelectromechanical systems
(MEMS)-based accelerometer [8], there is more recent
published work that utilizes an accelerometer to estimate
respiratory rate. Primitive reasons for the usage of an
accelerometer, compared to traditional methods, are that it is a
cheaper, non-invasive approach, and also viable to be used
outside hospitals without a supervision of a professional. An
accelerometer can be attached to a different part of the body,for example, a chest/thorax [3,8], a thorax-abdomen wall
(including diaphragm muscle and lower costal margin) [4,5,9],
an abdomen/waist [8,10] and even suprasternal notch [6,8].
Yet, currently there is no consensus on the best placement of
the sensor. In our work, we decide to place a sensor on a
patients chest. Besides placement, the posture of a person is
reported to greatly affect the conducted breathing activity [5].
Thus, many require a patient to sit or lie down steadily to be
able to successfully extract respiratory rate [3-6,8-9]. On the
other hand, A novelty from Liu et al. [10] has studied theeffects of posture changes like walking and running and still
be able to compute respiratory rate out of that particular
activities. Nevertheless, activity detection is not our mainfocus of this paper so we collect data only when a patient lies
down steadily. It is proposed by previous publication [3] thatbreathing frequency is ranging between 0-1 Hz. Based on this
knowledge, it becomes very common to employ a band-pass
or low-pass filter like Butterworth allowing only a certain
range of frequency to persist [3-6,8-11]. In addition, some
groups improve on Butterworth filter by involving an adaptive
computation of the cut off frequencies [3,10]. After applying
the filter, the signal becomes cleaner. Our proposed method
includes an original technique that can also be used for the
purpose of cleansing the noisy data. Next, generally, a high
dimensional accelerometer like a tri-axial accelerometer
would be used. Therefore, many [4,5] have proposed a way toderive 1D respiratory signal out of a 2D/3D accelerometer.
The process can be a manual selection of one dimension to be
a representative of the signal. Bates et al. [5] suggest that we
can compute an angular rate of breathing motions to deal with
the problem of axis fusion. Some researchers prefer that a
method based on principal component analysis (PCA) shouldbe used to reduce the dimensionality [4,10]. In this paper,
because we want to focus on our proposed algorithm, we
employ a manual selection for simplification; however, our
view is that a method like either angular rate derivation or
PCA can cooperate with our algorithm and would help
improve a signal quality before operating. After cleaning,according to Bates [5], there are 3 respiratory derivation
methods including peak findings (counting) [6], threshold
crossing [5,11] and spectral analysis (Fourier analysis or
autoregression) [3-4,10]. Our work involves the use of Fourier
transformation to calculate the respiratory rate.
It would be useful to state that our approach makes use ofonly a smartphone without any other special hardware so our
approach fully takes an advantage of mobility provided by the
smartphone. In addition, in general the capability of a built-in
accelerometer equipped with a smartphone cannot be
compared with a dedicated high quality (i.e. sensitivity)
accelerometer being used in other publications. To the best of
our knowledge, we are the first who reports the work that
utilizes only a smartphones accelerometer. Nevertheless, we
found related work by Ono et al. [9] which also makes use of
an accelerometer of an iPod touch, but with some extra
hardware. In addition, their approach seems to be far obviated
from the common knowledge of the community and their
result is shown to have limited success.
III.OURMETHODThere are three main phases in our approach. The first step
can be viewed as a pre-processing step as it is mainly for
cleaning up the noisy input sensory data, a time series from anaccelerometer. For the second step, the smoothed signal in a
time domain will be transformed into a frequency domain
using a Fourier transform algorithm. After that, the algorithm
will continue to estimate a value of respiratory rate (RP) based
on the power spectrum given by the output of the Fourier
transformation.
A.Pre-Processing StepIn our first pre-processing part, there are two subtasks: 1)
smoothing and 2) detrending.
Firstly, for the smoothing task, our primary intention is to
decrease any obscure or less important features found in the
input and retain dominant characteristics or important features
of the signal. We employ a technique called, moving average
(MA), for this task. Theoretically, a time series can bedecomposed additively into
tttt ISTy . (1)
Where Tt = a trend component, St = a seasonal component
and It = an irregular component. Then, a trend component is
extracted using MA and the signal becomes
tt Ty . (2)
We employ 13-term moving average for all experiments
ranging from slow to fast breathing rate. We find that we donot have to alter a number of terms used in our experiments as
it still can successfully estimate a trend from each data set.
-
8/22/2019 ecti2013-respiration_rate_20130402_submission.pdf
3/5
After the noisy signal has been smoothed, we then proceed
to the second subtask which is to detrend the signal. In orderto have a clearer view of this particular step, we define the
input for this step to be yt*, which would be the result of (2),
i.e.yt* =yt. We repeat the MA technique again as we find that
it has served us well for this detrending purpose. A trend
component has been extracted, but this time is from yt*.
Finally, to remove a trend, we proceed as follows
***
ttt Tyy . (3)
At first it may be not obvious why this second subtask is
required. The reason is because occasionally we find a trendeither upwards or downwards in our certain data sets and this
trend can collapse the outcome of Fourier transform in the
next step. Therefore, the detrending process has been involved
for eliminating the situation.
B. Spectral AnalysisWe make use of a fast Fourier transform (FFT) algorithm to
transform the data given in a time domain and convert it into a
frequency domain. The output of FFT or power spectrum iscomposed of a series of frequency components associated
with their powers. After that, the fundamental frequency, or a
respiratory frequency, can then be revealed in the output
spectrum.
Now it is a good time to discuss about another reason for
the detrending subtask in the previous step. It is for ensuring
that the input signal has an average value of zero before
transforming it with Fouriers algorithm. We find that this step
becomes essential in our work because an input signal without
an average value of zero will yield perplexing output because
the result, frequency components, are not only from a desired
frequency but also from a constant factor silently resided inthe signal. Moreover, in our case, we find that these two tend
to be mixing together as we are calculating respiratory rate;
the targeted frequency could fall in a very small range (i.e.
between 0-1 Hz) and typical values would be as close as zero
like 0.2 Hz which has RP of 12 breaths per minute (BPM).With these low frequency components, it can be easily
obfuscated with zero and almost zero frequencies from a
constant term hidden in the signal due to its non-zero average.
This would yield higher complexity than necessary for further
processing. Hence, detrending is applied in order to obtain a
meaningful output and be able to do further analysis.
C.Derivation of Respiratory RateIn our last step, we try to derive the final respiratory rate
from the power spectrum generated from the previous step.
Before we begin, all the frequencies with very low powers
will be filtered out using a certain value of a threshold. The
value of the threshold is selected in a heuristic fashion after
conducting several experiments. By setting a threshold, we
find that the algorithm performs better in differentiating a
control case like bed and table from typical respiratory cases.
To compute the respiratory rate, firstly, as we knew that the
respiratory frequency would be in a range of 0-1 Hz, so onlythe frequencies within this range are preserved. After that,
there are still many peaks in the spectrum with different
heights (power); however, only the highest peak is considered
to be our fundamental frequency. Next, after we extract the
dominant peak, we compute an estimate of the respiratory rate
based on the breathing frequency of the selected peak.
IV.EXPERIMENT AND RESULTSA.Experimental Setup
We conducted an experiment where we recruited a healthyadult as a subject for measuring respiratory rate. The subject
was asked to lie down with an iPhone 4 placed on her chest.
We collected three sets of data where she was asked vary her
breathing ratebreathe normally, breathe fast, and breathe
slowly. Each data has 30 seconds of data. The accelerometer
is set to log sensory data with a sampling frequency of 10 Hz.
To get a baseline, we also asked a general practitioner to
observe the chest movements and report the respiratory rate of
each of these data sets. Lastly, we also include placements ofa smartphone on a bed and a table for the purpose of being a
control case.
B.Data CollectedThe baseline collected from the countings by a general
practitioner reported that the subjects breathings are 12, 18and 30 BPMs for slow, normal and fast breathing respectively.
The result is consistent with reports for normal breathings in
the literatures. The range of normal breathing rate of an adult
slightly differs from source to source. For instance, [12]
pointed out that 12-16 BPM is normal. On the other hand, 12-
20 BPM becomes normal according to [13]. These counting
reports from the practitioner are for having a general sense ofthe actual rate of the data set. Although the operation is
conducted by a professional, we agree that the counting could
introduce some kind of human errors (which would include
rounding errors.)
Fig. 1 displays a plot of a time series of the sensory data.
According to the figure, the chart is noisy; nevertheless, it
clearly exhibits a sine-wave pattern. This is a positive sign for
us as this suggests that our acceleration data may correspond
to the breathing and would potentially infer the respiratory
rate of a subject. We proceed by counting the number of
waves in the signal for each data set and derive an estimate of
respiratory rate based on this counting. We call the estimatefrom this method as WCRP. We find that the number falls
within about the same range of an estimate from the chest-
movement counting (will be referred to as HCRP) done by a
professional. Further detail is reported in Table I. This finding
would support our argument in using an accelerometer to
estimate the respiratory rate.
-
8/22/2019 ecti2013-respiration_rate_20130402_submission.pdf
4/5
TABLEICOMPARISON OF HUMAN COUNT AND WAVE COUNT
Human Count
(HCRP)
Wave Count
(WCRP)
12 12
18 18
30 40
Fig. 1 A trend found in RP30
In addition to the noisiness of the data, there are other
incurring problems. For example, the signal can also contain
either an upward or downward trend as appeared in Fig. 1.
Moreover, Fig. 2 indicates that the breathing may not be done
at a constant rate for a whole period of time. All of these
would contribute into the more difficulty of the problem.
Fig. 2 A signal with different breathing frequencies
To cope with the noisy data, we employ a smoothing
technique. Next, a detrending process has been used for
removing a trend from the signal. We use 13-term moving
average to handle the situation in both cases. Details of the
smoothing and detrending techniques are given in part III. An
example of results after smoothing is shown in Fig. 3.
Fig. 3 RP18 after smoothing
Furthermore, as we knew that the subject may not breathe
with the same frequency all the time. The difference of
breathing rates in the same signal would actually reconcile
provided that the practitioner still find that the condition forHCRP is met. Then, to show the effectiveness of our
algorithm, we carefully choose a specific range within a signalthat can be a good representative of that particular data set.
The criterion is that the WCRP from this shorter selected
range should be similar to the WCRP shown in Table I. After
this arrangement, we then can show that our proposed
algorithm can estimate the value of respiratory rate as close as
WCRP using the same period.
For instance, in a case of fast breathing set RP30, we have
WCRP of 40, which results in a frequency of 0.67 Hz (a
period of 1.5 second.) In our trials, we find that we need at
least 3 waves in order to obtain a reasonable result out of thisdata set using FFT. Therefore, we look for a range of 4.5
seconds that can fully cover 3 waves. For RP12 and RP18, wecalculate the required number of seconds in the same fashion
and find that they are 15 and 10 seconds, respectively.
Illustrations of this selection are given in Fig. 1 for RP30 and
in Fig. 3 for RP18 with a pair of red lines indicating a selected
range.
C.ResultsNext, we executed our algorithm on the selected portion of
the signal. The final result, an estimate of respiratory rate from
our method, ALRP, is shown in Table II.
TABLEII
RESULTS OF OURPROPOSED ALGORITHM
Data Set Respiratory Rate (BPM)
WCRP ALRP
RP12 12 11.72
RP18 18 18.75
RP30 40 37.50
bed N/A 0.00
table N/A 0.00
-
8/22/2019 ecti2013-respiration_rate_20130402_submission.pdf
5/5
Fig. 4 A power spectrum of RP18
We also display an example of a power spectrum of RP18
after the FFT step in Fig. 4. This intermediate output is used
for determining a breathing frequency.
Lastly, we plot our estimates in a real-time manner to
reveal any inconsistency in breathing of the subject. Inaddition, this plot would make a clearer view that ouralgorithm is not restricted to only specifically selected range.
We select the range just to establish a solid ground for our
experiment that our algorithm can give a similar result to
WCRP. An example of a real-time plot is displayed in Fig. 5.
The plot is updated at every 2 second using last 15, 10 and 4.5
seconds for RP12, RP18 and RP30, respectively.
5 10 15 20 250
20
40
Resp
iratoryRate
Real-time Respiratory Rate
5 10 15 20 250
20
40
RespiratoryRate
5 10 15 20 250
20
40
R
espiratoryRate
Time (sec)
Fig. 5 A real-time plot of RP12, RP18 and RP30 respectively
V. CONCLUSIONSThis paper proposes a method and an algorithm for
measuring and monitoring humans respiratory rates using the
accelerometer data from smartphones. The device setup is
designed to be simpleusing only a commodity smartphone
with no other devices. An algorithm that we developed, based
on fast Fourier transform shows promising results in the
experiment we conducted. This approach can be easily
deployed and assist in measuring and monitoring respiratory
rate by medical practitioners and normal users alike.
REFERENCES
[1] J. Hogan. "Why dont nurses monitor the respiratory rates ofpatients?."British Journal of nursing15, no. 9 (2006): 489-492.
[2] C. Takano, and Y. Ohta. "Heart rate measurement based on a time-lapse image." Medical engineering & physics 29, no. 8 (2007): 853-857.
[3] P. D. Hung, S. Bonnet, R. Guillemaud, E. Castelli, and P. T. N. Yen."Estimation of respiratory waveform using an accelerometer." InBiomedical Imaging: From Nano to Macro, 2008. ISBI 2008. 5th IEEE
International Symposium on, pp. 1493-1496. IEEE, 2008.
[4] A. Jin, B. Yin, G. Morren, H. Duric, and R. M. Aarts. "Performanceevaluation of a tri-axial accelerometry-based respiration monitoring for
ambient assisted living." In Engineering in Medicine and Biology
Society, 2009. EMBC 2009. Annual International Conference of the
IEEE, pp. 5677-5680. IEEE, 2009.
[5] A. Bates, M. J. Ling, J. Mann, and D. K. Arvind. "Respiratory rate andflow waveform estimation from tri-axial accelerometer data." In BodySensor Networks (BSN), 2010 International Conference on, pp. 144-
150. IEEE, 2010.
[6] P. Kh. Dehkordi, M. Marzencki, K. Tavakolian, M. Kaminska, and B.Kaminska. "Validation of respiratory signal derived from suprasternal
notch acceleration for sleep apnea detection." In Engineering in
Medicine and Biology Society, EMBC, 2011 Annual InternationalConference of the IEEE, pp. 3824-3827. IEEE, 2011.
[7] S. Nemati, A. Malhotra, and G. D. Clifford. "Data fusion for improvedrespiration rate estimation." EURASIP journal on advances in signalprocessing2010 (2010).
[8] P. Dehkordi, M. Marzencki, K. Tavakolian, M. Kaminska, and B.Kaminska. "Monitoring torso acceleration for estimating therespiratory flow and efforts for sleep apnea detection." In Engineering
in Medicine and Biology Society (EMBC), 2012 Annual International
Conference of the IEEE, pp. 6345-6348. IEEE, 2012.[9] T. Ono, H. Takegawa, T. Ageishi, M. Takashina, H. Numasaki, M.
Matsumoto, and T. Teshima. "Respiratory monitoring with an
acceleration sensor."Physics in medicine and biology 56, no. 19 (2011):6279.
[10] G. Z. Liu, Y. W. Guo, Q. S. Zhu, B. Y. Huang, and L. Wang."Estimation of Respiration Rate from Three-Dimensional AccelerationData Based on Body Sensor Network." Telemedicine and e-Health 17,
no. 9 (2011): 705-711.
[11] G. B. Drummond, A. Bates, J. Mann, and D. K. Arvind. "Validation ofa new non-invasive automatic monitor of respiratory rate for
postoperative subjects." British journal of anaesthesia 107, no. 3
(2011): 462-469.
[12] S. Moses, Family practice notebook. 2013. Can be accessed online viahttp://www.fpnotebook.com/lung/exam/RsprtryRt.htm.
[13] W. Lindh, M. Pooler, C. Tamparo, and B. M. Dahl. Delmar'scomprehensive medical assisting: administrative and clinical
competencies. Cengage Learning, 2009.