# Persistent Homology Approach for Human Presence Detection from 60 GHz OTFS Transmissions
## 4 Experiments
### Persistent Homology and CFAR--Implementation and Settings  
The parameters of persistent homology and CFAR detectors are summarized in Table 2. Three different approaches for target detection have been evaluated--a standard CFAR detector and two variants of the persistent homology detector technique:  
1. Conventional CFAR The standard CFAR detector serves as a reference. The implementation of the CFAR detector from MATLAB's Phased array toolbox was used [27]. The guard and training size parameters \(N_{g}\) and \(N_{t}\) have been found empirically, and they were set to the equal value in both delay and Doppler domains, see Figure 3. Their relation to \(N_{tc}\) in (6) is then given by \[N_{tc}=4N_{t}(1+2N_{g}+N_{t}).\] (7) Since the output of the conventional CFAR is a map of detected targets in a form of clusters of logical ones, an additional topological algorithm was needed for counting the distinct clusters, i.e., targets. The MATLAB function bwconncomp(x, conn) with its connectivity parameter conn set to four was used for this purpose. The results are presented for two sets of \(N_{g}/N_{t}\) cell sizes, i.e., 3/8 and 2/10. 2. Persistent homology applied on observations. In this first variant of the persistent homology detector, the method was applied directly to the estimated absolute values of the delay-Doppler map. For the persistent homology computations, we would like to acknowledge Prof. [PERSON] for his persistent homology toolbox created in Python [32]. To set up a threshold for target detection, the z-scores were calculated from the potential target persistencies. The standardized z-score for the persistence of the \(i\)-th potential target is: \[\text{z-score}_{i}=\frac{\text{persistence}_{i}-\mu}{\sigma},\] (8) where \(\mu\) and \(\sigma\) represent the mean and standard deviation of the persistencies of all potential targets. The z-score of 6 was chosen as the threshold value. 3. Persistent homology applied on SNR map. Before the application of the plain persistent homology approach, a Signal to Noise Ratio (SNR) for each cell from the delay-Doppler grid is computed as the ratio between the power in the cell under test and the noise variance in the training cells, similarly to in Equation (5). If we define the delay-Doppler image as a matrix \(\mathbf{H}\) with dimensions \(N_{\text{r}}\) in the delay domain and \(N_{t}\) in the Doppler domain, the signal part of the SNR map matrix at coordinates \(m,n\) is defined as \[P_{S}(m,n)=H^{2}(m,n),\] (9) where \(H(m,n)\) is a single entry of \(\mathbf{H}\) at coordinates \(m,n\), with \(n\in\langle N_{t}+N_{g},N_{\text{r}}-N_{t}-N_{g}-1\rangle\) and \(m\in\langle N_{t}+N_{g},N_{\text{v}}-N_{t}-N_{g}-1\rangle\). The SNR map matrix dimension is then \(N_{\text{r}}-2N_{t}-2N_{g}\) in the delay domain and \(N_{\text{v}}-2N_{t}-2N_{g}\) in the Doppler domain. The noise part is defined as \[P_{N}(m,n)=\frac{1}{N_{tc}}\sum_{k=-N_{S}-N_{t}}^{N_{c}+N_{t}}\sum_{k^{\prime}=-N_{ g}-N_{t}}^{N_{g}+N_{t}}H^{2}(m+k,n+k^{\prime})-\sum_{l=-N_{S}}^{N_{g}}\sum_{l^{\prime}=-N_{ g}}^{N_{g}}H^{2}(m+l,n+l^{\prime}). \tag{10}\]  
The SNR map matrix entries \(V(m,n)\) are then given by  
\[V(m,n)=\sqrt{\frac{P_{S}(m,n)}{P_{N}(m,n)}}. \tag{11}\]  
The same guard and training cell settings \(N_{g}\) and \(N_{t}\), as used for the reference conventional CFAR detector, were applied. Subsequently, the persistent homology method, with the same properties and settings as in the previous variant of the detector (persistent homology applied on observations), was applied to the SNR map (11). Table 2 also quantifies the time complexity in the seconds necessary to process one delay-Doppler image by each of the investigated detectors. It was estimated on a standard personal computer with Intel(R) Core(TM) i7-2600 CPU @ 3.40 GHz. Note that the complexity of the proposed persistent homology approach implementation is much higher compared to the complexity of the used CFAR detector.