## 4 Signal Processing
### Respiration Signal Analysis  
After the radar signal has been normalized, the resulting phase can be converted into a relative distance change. This signal then reflects the distance change between radar and PUT. Considering a PUT at rest, the distance signal consists of a respiration and heartbeat motion. First, the slow changing respiration with distance changes of 4-12 mm is analyzed. It is necessary to distinguish whether apnea phases are to be detected in the signal or whether the respiratory rate of the PUT is to be determined. In a lowpass filtered distance signal the apnea phases can be recognized easily, whereas in a bandpass filtered signal the respiratory rate can be determined more reliably. Taking the respiratory rate of a healthy person of 12-20 BrPM into account, the cutoff frequencies of the bandpass filter are selected at 0.05 Hz and 0.5 Hz for a corresponding range of 3-30 BrPM. Accordingly, for the lowpass filter only the upper cutoff frequency of 0.5  Hz, corresponding to 30 BrPM, is used. Both filters are designed with a fourth order Butterworth characteristic. An exemplary section of apnea is shown in Figure 8, here only the frequency response differs. Figure 8a,b show the filtered reference ICG and radar distance signals. The reference system (Task Force Monitor) uses two band electrodes placed at the neck and the upper abdomen, respectively. These are used to insert an alternating current at a frequency of 40 kHz and to measure the resulting voltage across the thorax. The ratio of both quantities yields the time-dependent transthoracic impedance, from which the respiratory signal can be extracted by appropriate filtering [41]. Whereas in Figure 8a a fourth order Butterworth lowpass filter is used, Figure 8b shows the result of using a fourth order Butterworth bandpass filter. If one compares the lowpass filtered breathing of the two sensors in Figure 8a, one can see that the apnea area is visible in both signals. The only difference between both filters is the intensity of the inspiration, because an error in unwrapping the phase occurred in the radar signal, which led to a constant offset error. The apnea phase in the bandpass filtered signals in Figure 8b can no longer be identified that easily, because constant components are filtered out. In addition, the offset error is not significant anymore. Figure 7: A flowchart showing the overall signal processing steps. After filtering, the breath signals are split into 30 s windows and are further analyzed. In order to compare different methods for respiratory rate calculation, a measurement is divided into windows and for each of these windows the respiratory rate is determined with the four listed methods:  
* **Autocorrelation**: With the help of the autocorrelation (ACF) periodicity can be found in the respiration signal. After calculating the ACF, \(\hat{R}_{xx}(m)\) corresponds to: \[\hat{\mathsf{R}}_{xx}(m)= \begin{cases}\sum\limits_{n=0}^{N-m-1}x_{n+m}\cdot x _{n}^{*},&m\geq 0,\\ \hat{\mathsf{R}}_{xx}^{*}(-m),&m<0,\end{cases} \] (4) where \(x\) is the windowed breathing signal with length \(N\). Subsequently, the respiration rate can be determined by selecting the largest peak in the range of possible respiration durations. In case of the filter limits selected here, the range spans from 3 s to 30 s, which is converted into points using the known sampling frequency. The extracted lag is then converted into the respiratory rate \(\text{RR}_{ACF}\). * **Peaksearch**: Using the Matlab internal function 'findpeaks' with specifying a minimum peak distance and prominence all minima and maxima can be found. The minimum distance of two peaks has to include at least the highest respiration frequency. Therefore, a minimum distance of 3 s is chosen. By differentiation of the minima and maxima locations the durations for both extrema are calculated. Finally, the values are averaged and translated to the respiration rate \(\text{RR}_{PS}\). * **Zero crossing**: Considering the bandpass filtered signal, the respiration is centered around zero.