## 3 OTFS-Based Radar Sensing
### GLRT-Based Target Detection  
As we encounter the challenge of not knowing the precise number of targets when working with the 2D MF matrix, we have devised a step-by-step algorithm to identify them systematically. Once a target is located, we can simultaneously estimate its crucial characteristics. We continue this process until no more targets can be found. Let us rewrite Equation (15) in a different form using matrices before we get into the details of the target detection algorithm. This will simplify the detection process and enhance comprehension. We achieve this by substituting Equations (13) and (12) into Equation (15) and performing straightforward calculations. \[\mathbf{v}=\sum_{i=1}^{P}h_{i}^{*}e^{j2\pi\frac{\gamma_{1}h_{i}}{M_{S}^{*}N_{T }}}\widetilde{\mathbf{X}}\mathbf{W}_{(\tau_{1},\tau_{1})}^{H}\mathbf{x}^{*}+ \widetilde{\mathbf{X}}^{\text{T}}\mathbf{z}^{*}, \tag{16}\]  
in which the vector \(\mathbf{x}^{*}\) has an \(i\)-th entry in the matrix \(\mathbf{X}\) at row \(k_{1}\) and column \(l_{1}\), and \(\widetilde{\mathbf{X}}\) is a rearranged matrix of transmitted symbols, which are circulant shifts of the symbols in \(\mathbf{X}\). The specific element of the matrix \(\mathbf{X}\) located at row \(k_{1}\) and column \(l_{1}\) is represented as follows:  
\[\widetilde{X}[i,j]=x[[k_{1}-k_{2}]_{N_{T}}[l_{1}-l_{2}]_{M_{S}}]. \tag{17}\]  
Figure 1: The illustration of the received matrix under \(P=3\) targets. In this context, where we define \(i=k_{1}M_{S}+l_{1}\) and \(j=k_{2}M_{S}+l_{2}\), \(k_{(\cdot)}\in[0,N_{T}-1]\) and \(l_{(\cdot)}\in[0,M_{S}-1]\) represent row and column indices of the entry in \(\mathbf{X}\). The element at position \((kM_{S}+l)\) in the EC vector \(\mathbf{h}\) corresponds to the entry in the EC matrix \(\mathbf{h}_{\omega}\) at row \(k\) and column \(l\), and the EC sampling function is represented in matrix form, i.e., \(\mathbf{W}^{\mathbf{H}}_{(T;\
u_{i})}\). The element in the matrix \(\mathbf{W}\) at \(i=k_{1}M_{S}+l_{1}\) and \(j=k_{2}M_{S}+l_{2}\) is defined as follows:  
\[\widetilde{W}[i,j]=\omega(k_{2}-k_{1}-k_{\
u_{i}},l_{2}-l_{1}-l_{\tau_{i}}), \tag{18}\]  
where \(\omega(\
u,\tau)\) is precisely defined as outlined in Equation (14). We conduct a binary hypothesis test to obtain the number of targets. In this test, \(\mathcal{H}_{0}\) means that the \(i\)th target is not present, and \(\mathcal{H}_{1}\) means that the \(i\)th target is present. The observations can be described as follows:  
\[\mathbf{v}= \begin{cases}\widetilde{\mathbf{X}}\mathbf{z}^{*}&,\text{ under }\mathcal{H}_{0}\\ h^{*}\phi^{2\pi}\frac{\
u_{1}k_{\
u}}{M_{S}N_{T}}\widetilde{\mathbf{X}} \mathbf{W}^{\mathbf{H}}_{(\tau,\
u)}\mathbf{x}^{*}&\\ +\widetilde{\mathbf{X}}\mathbf{z}^{*}&,\text{ under }\mathcal{H}_{1}\end{cases} . \tag{19}\]  
To address Equation (19), we consider \(h\), \(\tau\) and \(\
u\) as deterministic but unknown variables, and use the generalized likelihood ratio test (GLRT) [62]. The inspection is as follows:  
\[\Lambda(\mathbf{v})=\max_{h,\tau,\
u}\frac{p(\mathbf{v}|\mathcal{H}_{1};h,\tau,\
u)}{p(\mathbf{v}|\mathcal{H}_{0})}\gtrapprox\mathcal{H}_{1}{\mathcal{H}_{0} }\eta. \tag{20}\]  
Here, where \(\eta\) serves as the threshold, we make the assumption that \(\mathbf{z}\) adheres to a complex Gaussian distribution characterized by parameters \(\mathcal{CN}(0,\sigma^{2})\). Consequently, we can signify that the product \(\widetilde{\mathbf{X}}^{\mathbf{T}}\mathbf{z}^{*}\) also conforms to a complex Gaussian distribution, with parameters \(\mathcal{CN}(0,\frac{\sigma^{2}}{M_{S}N_{T}})\).