Sleep breathing#
An example of a “sleep breathing” detection algorithm assuming that the person is still (as when in sleep) where only the motion from breathing is to be detected.
The algorithm can be divided into three parts; (i) extracting the motion of the breathing person, (ii) performing a Fourier transform of the position over time to search for oscillations, and finally (iii) detecting the respiration rate in the spectra.
Abbreviation |
Description |
Sweep frequency [Hz] |
|
Sweep index |
|
Range index |
|
Data from the IQ Service |
|
Fast filter length [s] |
|
Lowest frequency of interest [Hz], typically 0.1 |
|
Highest frequency of interest [Hz], typically 1 |
|
Range downsampling factor |
|
Sweep (or time) downsampling factor |
|
The phase of sweep s [rad] |
|
Fourier transform time window [s] |
|
Peak to noise detection threshold |
|
Peak to signal at half frequency threshold |
Obtaining motion signal#
The radar is configured to collect IQ radar sweeps with a range covering the chest of a breathing person. For example, the radar sensor could be mounted in a device on the night stand next to the bed where a person is sleeping. The radar should be aimed at the chest of the person and scanning the range of approx. 30 cm to 90 cm. The data samples from the IQ API are represented by
where,
Since neighboring samples in range are strongly correlated, the IQ samples can be downsampled in range to
and
The next step is a simple noise reducing low-pass filter in the time (or sweep) dimension,
where
The last step in this part of the algorithm is the unwrapping of the phase of the IQ samples. Here, it is performed via
where
Searching for oscillations#
The motion of the chest of the sleeping person can be seen in as oscillations in the phase signal,
Since human breathing most often occur in the 0.1-1 Hz frequency range, the typical radar sweep frequency,
Before downsampling in time the phase needs to be low-pass filtered. We apply a second order Butterworth low-pass filter with cut-off-frequency of
where
A Discrete Fourier Transform (DFT) is performed on the last
The spacing of frequency bins are set by the length in time of the data set, so to increase the frequency resolution the frequency of the peak is interpolated assuming a Gaussian peak shape,
where
Breathing detection#
The final step in the algorithm is to see if the peak in the spectra is high compared to the spectral noise. The noise level is estimated as the average power level in the half of the frequency bins with the lowest power. If the peak is higher than the threshold,
Since chest motion during breathing is highly non-sinusoidal, many harmonics of the breathing frequency are often seen in the spectra. To avoid detecting the first harmonic, instead of the fundamental, a final check is carried out to inspect the spectral power at half the frequency of the highest peak in the spectra. This spectral power is compared to a second threshold,
and
These two thresholds has been set after analyzing detector performance on data sets collected on a few adults and children. However, depending on the mechanical integration of the sensor and the trade-off between missed detections and false detection, these thresholds might need tuning to achieve the optimal performance for each design.
Configuration parameters#
- class acconeer.exptool.a111.algo.sleep_breathing._processor.ProcessingConfiguration#
- n_dft#
- Type: floatUnit: sDefault value: 15
- t_freq_est#
- Type: floatUnit: sDefault value: 0.2
- D#
- Type: intDefault value: 124
- f_high#
- Type: floatUnit: HzDefault value: 0.8
- f_low#
- Type: floatUnit: HzDefault value: 0.2
- lambda_p#
- Type: floatDefault value: 40
- lambda_05#
- Type: floatDefault value: 1