The measurement of the respiration and the calculation

Measuring Respiration
Measuring respiration
Version 2.0 January 2013
Jan Peuscher
0|Page
Measuring Respiration
The measurement of the respiration and the calculation
of the respiration rate.
1. Introduction
For several medical purposes, the respiration of a patient has to be measured.
Sometimes we want to have an impression about the pulmonary function,
sometimes we just want to detect and calculate the amount of apneas. An apnea
is a defined as a minimum period where the patient has stopped breathing. It is
even possible to calculate the pulmonary volume out of the respiration signal, but
that is a very special measurement and calculation.
On account of the different backgrounds for this measurement, we have to deal
with different requirements concerning the bandwidth, resolution, accuracy, and
processing algorithms. And of course the same range of requirements count for
the derivatives. So with respect of the requirements, the respiration signal
sometimes is hard, and sometimes easy to measure and to process.
First of all some applications:
The respiration for instance is measured as part of the following medical
examinations:

Sleep analysis

Polygraphy

Pulmonary function

Stress test

Sports

Pulmonary screening

Asthma

COPD

Pediatric screening

Pediatric monitoring- SIDS
1|Page
Measuring Respiration
2. Measurement technologies.
As there are several degrees of requirements, there are several different
measurement techniques for the measurement of respiration. In short the most
important measurement technologies are:

Inductive

Resistive

Piezo

Thermistor

Impedance

Pressure

Magnetic

Optical

Capacitive
There is no need to discuss all the measurement technologies in detail. The
inductive and the resistive measurement methods are part of this report. The
examples in this report are measured using the inductive and the resistive
technology.
Specifications:
Amplitude
Frequency waveform
Repetition frequency
2 – 200mV
0 – 150Hz
0 – 20 per minute for adults
0 – 100 per minute for neonates
Derivatives:
Respiration waveform
Respiration rate breath by breath
Respiration rate mean
Breath volume
Respiration regularity
2|Page
Measuring Respiration
Apneas
Obstructive apnea
Central apnea
Hypopnea
Apnea-Hypopnea Index (AHI)
Paradoxical breathing
Periodic breathing
And several correlations between EEG, REM sleep, apneas, quiet sleep, nonquiet sleep and desaturations.
3. The measurement of the respiration
If we use an inductive belt for the measurement of the respiration, the result will
be a DC and stable respiration signal as shown in figure 1.
Figure 1: Respiration signal measured with an inductive belt.
In figure 1 you can see a respiration signal including an apnea of about 20
seconds. The respiration is measured using an inductive belt. The signals from
an inductive belt always have a large amplitude, can be smoothed by choosing
the right sampling frequency or smoothing filter, and are rather stable in relation
to movement artifacts.
3|Page
Measuring Respiration
A resistive belt is cheaper, and easier in use. The amplitude is not as high as
compared with the inductive belt, but high enough to guarantee a good
respiration signal. The signal includes more noise, but the noise can be removed
by smoothing the signal. The sensitivity to movement artifacts is a little bit higher
than the inductive belts. The resistive belt has the disadvantage that all types of
movements will cause in a piezo spike wave distortion. This distortion can be
filtered out for the biggest part, but on the other hand you can use this distortion
to detect for instance movements as walking.
The resistive belt is fit as shown in figure 2.
Figure 2: Wearing the resistive respiration belt.
In figure 3, an example of a measurement with the resistive belt is shown.
4|Page
Measuring Respiration
Figure 3: Example of a respiration measurement with a resistive belt.
In figure 1 and 3, you can clearly see the difference in the waveform. When a
waveform is very important, for instance when the pulmonary breath volume has
to be calculated, you have to use an inductive measurement technique. When
the waveform is less important, it is easier to use the resistive technology.
5|Page
Measuring Respiration
4. The respiration signal
In figure 1 and 3 two nice and smooth respiration signals are shown. Amplitude is
very high, up to hundreds of millivolts, and the waveform is easy to interpret.
But as is shown in the next picture, the measurement of respiration is often
hampered with movement artifacts.
Figure 4: Three respiration signals during sleep analysis showing a lot of movement artifacts.
The upper trace shows a signal that is measured using a thermistor sensor. This
technique is often used when we want to measure the nasal airflow. The middle
and lower trace show the thorax and abdominal respiration effort, measured
using the inductive belts. During this measurement, a lot of movement artifacts
disturb the measurement. In figure 5, the same measurement is shown, but 5
minutes later. This gives you an impression about the stability of the respiration
signals during long term monitoring.
6|Page
Measuring Respiration
Figure 5: The same measurement as shown in Figure 4, now during a period of quiet sleep.
Sometimes we can find some very odd respiration waveforms, as is shown in
figure 6.
Figure 6: Same measurement as in Figures 4 and 5, but here we see an example of periodic breathing.
From the given examples it is clear that the detection of the respiration and the
calculation of the respiration rate is not as simple as it seems. Waveform
detection and the use of a threshold are impossible, because the amplitude and
the repetition frequency are not stable during the measurement. In case we use
a high pass filter, this filter must have a long time constant, because we have
7|Page
Measuring Respiration
respiration rates of 6 up to a 100 per minute. Such a filter can show a lot of DC
movement artifacts as is shown in figure 6, the nasal flow trace. So the question
is how to find the respiration waveform within the large amount of movement
artifacts and low frequency noise. Therefore I developed the following detection
algorithm. First of all we start with a nice and smooth respiration signal as is
shown in figure 7.
Figure 7: Stable and undisturbed respiration signal.
The first processing step is to delay the signal. The delay time should be large
enough to see the differences, and short enough to allow respiration frequencies
of about 100 per minute to be detected. So the delay time must be less than half
of the periodic time when we have a respiration rate of about 100 per minute.
This means that the delay should be less than 0.5 s. In this example I have used
a delay of 0.4 s.
If you draw both signals at the screen using the same time base, you see the
following graph (figure 8).
8|Page
Measuring Respiration
Figure 8: Original and delayed signal on the same baseline.
If we use a comparator for the two signals, we should get a Boolean that tells us
about the periodicity of the signal. This is a very simple operator like:
signal a
signal b
if signal a > signal b
then true
else
false
end if
Of course this algorithm is going to show you a lot of respirations in case of
absence of a respiration signal. If there is an apnea, the comparator will find a lot
of true and false conditions caused by the noise of the amplifier and the sensor.
To avoid that situation we must add a small DC offset to one of the signals. The
offset should be large enough to avoid the detection of respiration in case of
noise, but small enough to detect all the respiration waves.
Normally, the noise is less than about 20 mV, depending of the type of sensor.
The amplitude often is more than 10 mV, sometimes even hundreds of millivolts.
9|Page
Measuring Respiration
I used an offset of 400 mV in this example. Preferred situation is to add 10% of
the mean amplitude with a minimum of 5 times the mean of the noise amplitude.
In figure 9 the result of this comparator operation is given.
Figure 9: The original and delayed signal with offset and the output of the comparator.
In figure 9 you see that all the respiration waves are detected. From that
detection signal it is easy to calculate the respiration rate. The interval calculation
is not very accurate, but as we are interested in the mean respiration rate per
minute, we can smooth the respiration rate signal if necessary. In figure 10 the
result of the respiration rate calculation and smoothing process is shown.
10 | P a g e
Measuring Respiration
Figure 10: Respiration rate calculation during a 30 minutes measurement.
For the detection and calculation of apneas and periodic or paradoxical
breathing, we have to use the Boolean output signal of the comparator. Using
this algorithm for the detection of apneas and periodic breathing, we get the
signal as is shown in figure 11.
Figure 11: Respiration detection during quiet sleep and periodic breathing.
You see that all the respiration waves during quiet sleep are detected without any
problem.
11 | P a g e
Measuring Respiration
Even during the phase of periodic breathing, where a lot of apneas appear, the
detection is no problem. Using this algorithm it is even possible to detect and
classify an apnea. Of course in case of movement artifacts some errors can
occur.
Conclusion:

This algorithm is independent of DC variations in the signal, and is
independent of amplitude of the signal

This algorithm is robust and easy to implement in embedded software
applications.
12 | P a g e