Baseline drift removal: a configuration for respiratory signals
28 Feb 2013

Measurement of ExG, hemodynamic or respiratory signals is performed relative to reference values, known as baselines. The baseline for an ECG recording is the isoelectric line, the baseline for a respiratory measurement is the zero flow line.

During the measurement, the baseline is submitted to slow fluctuations known as drift. The drift is due to the sensor sensitivity to properties other than the one being measured. For example, most sensors are influenced by the temperature of their environment.

Drift removal is needed for a correct representation / analysis of the parameter being measured. The baseline for the respiratory flow, the “zero flow” line is described by successive points in the flow signal with zero value. The removal of baseline drift for the flow is based on the observation that the mean of the flow signal should be zero on a quite large time interval.

In this article, we illustrate baseline drift removal with a configuration for respiratory measurements. Analysis of lung resistance and compliance requests measuring the respiratory flow and the transpulmonary pressure. The method and the equipment are described in [1].

The modules used for the configuration below are listed in the following table:

Module name Short description
AVG11a Arithmetic mean & filter options, median and SD calculator
ITP10a Linear interpolation filter
OPR10a Simple arithmetic operation between two signals
RSP30a Restraint animal respiration analyzer
SGF10a Savitsky Golay filter
STA10a Signal statistics within a time window

The drift removal proposed thereafter is a 2-step elaborate filtering: the first step consists in improving mean subtraction while the second step aligns pressure minima to zero. The filtering does not induce delay, so parameters dependent on multiple channels and sensitive to delay are not affected (pulmonary resistance, dynamic compliance).

The modules STA10a1, AVG11a1, ITP10a1 and OPR10a1 perform this removal. The mean is calculated between successive maxima in the flow signal by STA10a1 and averaged on a larger interval by AVG11a1 if needed. ITP10a1 interpolates the mean values to a signal with the same sampling frequency as the flow. OPR10a1 subtracts from the original flow the mean value, assuring that the signal at Flow input of the RSP30a analyzer module has zero mean.

Configuration for respiratory studies with baseline drift removal


The transpulmonary pressure baseline is the line described by the points in the signal with zero value.
The removal of baseline drift in this case is based on calculating averaged minima for each respiratory breath and aligning these minima on the “zero pressure” line.

The modules AVG11a2, STA10a2, ITP10a2, OPR10a2 perform this alignment. AVG11a2 calculates local averages for each pressure cycle (about 10 points for each cycle). STA10a1 extracts the minimum. ITP10a2 and OPR10a2 play the same role as above. An AVG11a module may be inserted between STA10a2 and ITP10a2 if an average on a larger interval is needed.
The signals , original and corrected, are shown on the figure below.

Flow and pressure before (gray) and after drift removal. Orange cross is Mean value of flow between two successive maxima (STA10a1.Average output). Blue cross is Minimum value of pressure (STA10a2.Minimum output).


SGF10a1 and SGF10a2 are Savitzky-Golay filters and are used to smooth the input signals.


1 Heinz Gerd Hoymann (Fraunhofer Institute for Toxicology and Experimental Medicine, Hannover, Germany). Lung Function Measurements in Rodents in Safety Pharmacology Studies. Front Pharmacol. 2012; 3: 156.