## 3 Theory
### Breathing Signal Detection and Spectrum Estimation  
Unfortunately, \(x(t)\) can be contaminated by noise and residual clutter. A robust spectrum estimation technique must therefore be used in order to estimate the breathing rate from \(x(t)\). In this study, the Lomb periodogram method is used [55,56]. The Lomb spectrum has been used in the study of physiological signals such as heart rate because it can clearly show the very low frequency components of the instantaneous heart rate [56]. It has been found to produce more robust power spectrum density (PSD) estimates in heart rate variability analysis compared to autoregressive (AR) and FFT methods in the presence of noise [57]. For time-series of N data points \(x_{j}=x(t_{j})\) collected at times \(t_{j}\) where \(j=1\),\(2...N\), with a mean of \(\overrightarrow{x}\), the Lomb periodogram was computed from:  
Figure 4: Frequency response of the moving averaging filter with different window lengths, \(M\). \[P_{x}(\omega)=\frac{1}{2}\left(\frac{\left[\sum_{j}(x_{j}-\overline{x})\cos\omega(t _{j}-\tau_{x})\right]^{2}}{\sum_{j}\cos^{2}\omega(t_{j}-\tau_{x})}+\frac{\left[ \sum_{j}(x_{j}-\overline{x})\sin\omega(t_{j}-\tau_{x})\right]^{2}}{\sum_{j} \sin^{2}\omega(t_{j}-\tau_{x})}\right] \tag{14}\]  
where the delay \(\tau_{x}\) is obtained using:  
\[\tau_{x}=\frac{1}{2\omega}\tan^{-1}\left(\frac{\sum_{j}\sin 2\omega t_{j}}{ \sum_{j}\cos 2\omega t_{j}}\right) \tag{15}\]  
A fast implementation of the Lomb periodogram described in [57] is used in this study. As the periodogram is computed using a running window, the computational load and memory required are small. One advantage of this Lomb periodogram is that it can be used on evenly sampled data with periods of missing sections. The algorithm then selects the frequency with the highest amplitude associated with the respiratory component. In order to detect apnoea, the breathing index (BI) is defined as 1 if the power of the breathing signal is higher than a decision threshold \(\sigma_{th}\), and zero otherwise, in this last case assuming that the patient is not breathing and that the signal power hence consists of residual clutter and noise. \[BI= \begin{cases}1,&\sigma_{x}>\sigma_{th}\\ 0,&\sigma_{x}\leq\sigma_{th}\end{cases}  \tag{16}\]  
where \(\sigma_{x}\) is the smooth average deviation of the signal \(x(t)\) and it is computed using a window of length \(L\) in a similar way to (13):  
\[\sigma_{x}(n)=\sqrt{\frac{1}{L}\sum_{i=n-L+1}^{n}x^{2}(i)-\left(\frac{1}{L} \sum_{i=n-L+1}^{n}x(i)\right)^{2}} \tag{17}\]  
For long time series, it is expected that the amplitude of the breathing signal during respiration will change. An adaptive threshold limit will therefore be estimated. In existing CFAR systems, the target decision is commonly performed using the sliding window technique [58]. The data available in the reference window is used for the calculation of the decision threshold by an algorithm. This procedure is illustrated in Figure 5. The first step is to measure the mean clutter power level \(Z\). The decision threshold for each time sample \(n\) is then obtained by multiplying this estimation \(Z\) by a scaling factor \(K\), depending first of all on the estimation method applied and second on the false alarm rate required. The resulting product \(K\,Z\) is directly used as the decision threshold value, \(\sigma_{th}^{2}\). The clutter power is calculated using:  
\[Z(n)=\frac{1}{N/2}\sum_{i=n-N/2-L_{guard}}^{i=n-L_{guard}}\sigma_{x}^{2}(i)+ \frac{1}{N/2}\sum_{i=n+L_{guard}}^{i=n+L_{guard}+N/2}\sigma_{x}^{2}(i) \tag{18}\]  
where in (18), \(N\) is the size of the window used in the averaging, and \(L_{guard}\) is the number of guard cells around the reference sample n left to prevent edge effects. In this work, \(N\) is set to 30, \(K=0.5\), and \(L_{guard}=1\). In order to avoid problems associated with the orientation of the antennas to the body, multiple channels with different orientations can be recorded. The channel with best orientation will achieve a higher breathing signal than other channels.