## 5 Two-Stage Spatial Filtering for a PRS  
In order to provide 2D target localization (range and azimuth), a two-stage spatial beamforming approach based on CFAR detection in multiple simultaneous beams and on the estimation of the angle of arrival is proposed. Figure 14 depicts the scheme of this processing method. It is based on modifications of those proposed in [6,7] for ULAs and implemented for the NULA designed in Section 3.2:  
* In [6], Spatial Adaptive Processing (SAP) was analyzed for PRSs, for interference spatial filtering and the estimation of the target's Direction of Arrival (DoA). Time-domain SAP and range-Doppler domain SAP were studied, and an alternative PRS signal processing chain, using both spatial filtering and high resolution DoA estimators working in the range-Doppler domain, was proposed. * In [7], real-time detection and tracking were demonstrated using a two-stage beamforming approach. A smaller set of beams was used in the first stage for CFAR detection. For each [m,p] pair, the beam that provided the maximum power was determined, and the CFAR detector was applied on this beam's outputs. First stage beams were designed under the condition of the maximally flat response between beams' directions. A more crowded set of beams was used in the second stage for DoA estimation using a spatial smoothing-based Bucci algorithm proposed in [32]. The modifications proposed in the two-stage spatial filtering scheme are related to the generation of orthogonal beams using weight vectors calculated under SLL requirements (\(\mathbf{w}_{SLL}\)) for CFAR detection, the CFAR detector threshold estimation in the 3D space defined by range, Doppler and azimuth and the application of DoA techniques to estimate the azimuth of the detected targets using weight vectors calculated to maximize the directivity (\(\mathbf{w}_{MD}\)):  
* The first stage implements a beamforming processing using orthogonal beams calculated under SLL requirements. If orthogonal beams are used, a signal arriving along the maximum radiation axis of a beam will have no output in any other beam; and a signal that is not along the maximum radiation axis will appear in the sidelobes of the other beams [15]. The set of steering directions \(\mathbf{\Phi}_{SLL}=\{\phi_{SLL,1},\phi_{SLL,2},...,\phi_{SLL,\psi_{SLL}}\}\) is defined following an iterative process that starts with the broadside beam and continues defining the maximum radiation axis of the side main beams along the nulls of the broadside beam. This process is iterated until the azimuth sector defined by the single radiating element of the NULA is covered. For each \(\phi_{SLL,i}\) pointing direction and each Doppler shift, \(p\), the optimization problem formulated in Equation (14) must be solved to obtain the weight vector \(\mathbf{w}_{SLL}(p,\phi_{SLL,i})\), generate the associated beam and determine the main radiation  
Figure 14: Two-stage frequency-domain spatial filtering scheme. axis of the side main beams. The result is a three-dimensional matrix called \(\mathbf{S}_{CAF}\), with indexes \(m\), \(p\) and \(\phi_{SLL,i}\), for which elements \(s_{CAF}[m,p,\phi_{SLL,i}]\) are obtained with Equation (15): \[s_{CAF}[m,p,\phi_{SLL,i}]=\mathbf{w}_{SLL}(p,\phi_{SLL,i})^{H}\cdot\mathbf{s}_{ \mathbf{s}}[m,p];\quad i=1,\cdots,N_{\phi_{SLL}}\] (15) The CFAR detection is implemented as follows: 1. For each \([m,p]\) pair, the Cell Under Test (CUT) is the cell \(s_{CAF}[m,p,\phi_{SLL,i}]\) for the \(\phi_{SLL,i}\) value where the maximum power of the echo is received. 2. A 3D reference window with dimensions \(R_{R}xR_{D}xN_{\phi_{SLL}}\) (range xDoppler x steering angle), is generated using the neighbor cells around the CUT and excluding the guard cells, which are defined along the range and Doppler for all of the steering angles, to reduce the impact of extended targets in the threshold estimation. This 3D reference window also excludes \(s_{CAF}[m,p,\phi_{SLL,i}]\), \(i=1,...,N_{\phi_{SLL}}\).