# Smart Beamforming for Direct LEO Satellite Access of Future IoT
## 4 Resource Sharing Beamforming Access
### Determination of the Number of Terminals  
The proposed beamforming technique must be aware of the number of terminals that pick a given repetition pattern. To acquire this information one option is to exploit the structure of \(\mathbf{R}_{ir}+\mathbf{R}_{ir}^{\mathrm{H}}\), for \(1\leq i\leq P\). The analysis conducted in this section reveals that \(\mathbf{R}_{ir}+\mathbf{R}_{ir}^{\mathrm{H}}\) is of rank \(N_{U_{i}}\). Admittedly, \(\mathbf{R}_{ir}\) is only available through (26) that is a noisy estimate, owing to the fact that the average is taken over a finite number of samples. Hence, the smallest \(N_{R}-N_{U_{i}}\) singular values of \(\hat{\mathbf{R}}_{ir}+\hat{\mathbf{R}}_{ir}^{\mathrm{H}}\) are not equal to zero. Yet, the number of terminals can be estimated in the presence of noise within the framework of signal detection [36]. To benefit from [36], the data must follow a Gaussian model and in addition, an estimate of the autocovariance matrix should be available. Regrettably, the structure of \(\mathbf{R}_{ir}+\mathbf{R}_{ir}^{\mathrm{H}}\) is not consistent with an autocovariance matrix. In addition, the data set that is used to estimate (26), which is given by \(\left\{\mathbf{Y}_{m,l}\mathbf{C}_{i}\mathbf{Y}_{m,2}^{\mathrm{H}}+\mathbf{Y} _{m,2}^{\mathrm{H}}\mathbf{C}_{i}^{\mathrm{H}}\mathbf{Y}_{m,1}^{\mathrm{H}}\right\}\), cannot be modeled as Gaussian signals. Thus, the adoption of detection methods based on the assumption of Gaussian data, such as [36], will yield an uncertain result. To avoid departing from Gaussianity, we refrain from processing \(\mathbf{R}_{ir}+\mathbf{R}_{ir}^{\mathrm{H}}\). Alternatively, we consider a different approach to determine the multiplicity of the noise singular values. The difficulty in estimating \(N_{\mathrm{U}_{i}}\) from \(\hat{\mathbf{R}}_{ir}+\hat{\mathbf{R}}_{ir}^{\mathrm{H}}\), leads to separately estimate \(N_{\mathrm{U}}\) and \(N_{\mathrm{U}}-N_{\mathrm{U}_{i}}\). With these two estimates it is straightforward to get \(N_{\mathrm{U}_{i}}\). First, we focus the attention on \(N_{\mathrm{U}}\). In light of the findings of this section, we know that \(\mathbf{R}_{r}\) is a full rank matrix that can be split into signal and noise subspaces. From the singular value decomposition we know that the \(N_{\mathrm{U}}\) dominant singular values are associated to the signal subspace. The rest of singular values correspond to noise and have the same magnitude. Let \(\left\{\gamma_{1},\cdots,\gamma_{N_{\mathrm{R}}}\right\}\) be the sample singular values of \(\hat{\mathbf{R}}_{r}\). In light of Appendix A discussion, we can assume that in OFDM-like signals, \(\mathbf{y}[j]\) and \(\mathbf{y}[l]\) are statistically independent, for \(j\
eq l\). Therefore, the column vectors that form \(\left\{\mathbf{Y}_{m,2}\right\}\) can be assumed to be statistically independent and can be modeled as Gaussian random vectors. These properties allow us to benefit from the theory developed in [36] to estimate the number of signals as:  
\[\hat{N}_{\mathrm{U}}=\underset{0\leq l\leq N_{\mathrm{R}}-1}{\mathrm{argmin}} \ \mathrm{AIC}_{\gamma}(l), \tag{29}\]  
\[\mathrm{AIC}_{\gamma}(l)=-2(N_{\mathrm{S}}L_{R})\log\left[\frac{\prod_{i=l+1} ^{N_{\mathrm{R}}}\gamma_{i}}{\left[\frac{1}{N_{\mathrm{R}}-l}\sum_{i=l+1}^{N_{ \mathrm{R}}}\gamma_{i}\right]^{N_{\mathrm{R}}-l}}\right]+2l(2N_{\mathrm{R}}-l). \tag{30}\]  
Figure 5: Beampattern displayed in the \(uv\)-plane. The beamformer points at a terminal that is located at \((\theta,\phi)=(24.91^{\circ},7.89^{\circ})\) or, equivalently \(u=0.4172,v=0.0578\). There are nine interfering users and three of these select the same pattern as the user of interest. Next, we tackle the estimation of \(N_{\text{U}}-N_{\text{U}_{i}}\).