## 3 Analytic Modeling
### Modeling Beamforming and Selection Mechanism  
For tracking beamforming and selection mechanism dynamics at the AP, we develop a high-level pragmatic model to track the allocation of the RF chains and beams. We formulate an integer programming problem and develop a greedy beam-selection approach. One can view this as a cross-layer approach, where the beamforming and selection process assigns RF chains and beams to appropriate end devices in order to maximize the total network throughput during each (congestion) window scheduling round at the TRA layer. Consider that \(\mathcal{R}\), \(\mathcal{B}\), and \(\mathcal{I}\) represent the sets of RF chains, beams, and devices, respectively. With normalized transmission power, the throughput, say \(\theta^{i}_{r,b}\) perceived by a link to the device \(i\) using beam \(b\) and chain \(r\), can be estimated as  
\[\theta^{i}_{r,b} = \log(1+SNR^{i}_{r,b}); \tag{2}\] \[SNR^{i}_{r,b} = \mathcal{P}^{i}_{r,b}\Big{/}\Big{(}\sum_{i\in\mathcal{B}}\sum_{j \in\mathcal{R}}\sum_{k\in\mathcal{I}\setminus\{i\}}\mathcal{I}_{i,j}\mathcal{ K}^{b}_{i,j}+\varsigma^{2}\Big{)} \tag{3}\]  
Figure 4: An abstract view of the analytic modeling approach demonstrating interactions between different cross-layer components of the design towards novel insights in developing the three main algorithms in this paper. where \(\mathcal{P}_{r,b}^{t}\) is the effective received power of the \(t^{th}\) device using the \(b^{th}\) beam and the \(r^{th}\) RF chain; \(\mathcal{C}_{ij}^{b}\) represents crosstalk on the \(b^{th}\) beam caused by the simultaneous transmission over the \(t^{th}\) beam using the \(j^{th}\) chain; and \(\varsigma^{2}\) is the noise (say Gaussian). \(\mathcal{I}_{i,j,k}\in\{0,1\}\) is the indicator variable (binary) to track whether the \(i^{th}\) beam and the \(j^{th}\) chain are assigned to \(k^{th}\) link or not. Using this formulation, we implement Algorithm 1, a greedy approach for the joint allocation of RF chains and beams to devices. For a finite number of devices, beams, and RF chains, we can devise a joint _beamforming and device selection mechanism_ as a nonlinear throughput maximization problem  
\[\max_{\boldsymbol{\mathcal{I}}}\sum_{b\in\mathbb{B}}\sum_{r\in \mathcal{R}}\sum_{l\in\mathcal{I}}\mathcal{I}_{b,r,b}\theta_{r,b}^{t}\text{ s.t.}\sum_{b\in\mathbb{B}}\sum_{l\in\mathcal{I}}\mathcal{I}_{b,r,l} \leq 1,\forall r\in\mathcal{R}. \tag{4}\]  
```
procedureSelect RF Chain\(\boldsymbol{\mathcal{I}}\leftarrow\boldsymbol{0},\tilde{\mathcal{R}} \leftarrow\boldsymbol{\phi},\tilde{\mathcal{B}}\leftarrow\boldsymbol{\phi}\) and \(\tilde{\mathcal{I}}\leftarrow\boldsymbol{\phi}\) while\((Allocate\big{(}\tilde{\mathcal{B}}\cup\{b\},\tilde{\mathcal{R}}\cup\{r\},\tilde{ \mathcal{I}}\cup\{t\}\big{)}-Allocate(\tilde{\mathcal{B}},\tilde{\mathcal{R}}, \tilde{\mathcal{I}})\big{)}\leq 0\)do procedure Update\(\tilde{b},\tilde{r},\tilde{t}\leftarrow\max_{b\in\mathcal{R},r\in\mathcal{R}} \setminus\tilde{\mathcal{R}}\cup\{\tilde{\mathcal{R}},\tilde{\mathcal{I}}\in \mathcal{I}}\big{(}Allocate(\tilde{\mathcal{B}}\cup\{b\},\tilde{\mathcal{R}} \cup\{r\},\tilde{\mathcal{I}}\cup\{t\})-Allocate(\tilde{\mathcal{B}},\tilde{ \mathcal{R}},\tilde{\mathcal{I}})\big{)}\)  Increment \(\tilde{b},\tilde{r}\) and \(\tilde{t}\); endprocedure endwhile while\(\iota=1,\iota<|\mathcal{B}|,\iota++\)do\(\hat{b},\tilde{r}\downarrow 1\) endwhile procedure(\(Allocate(\mathcal{B},\mathcal{R},\mathcal{I})\)) while\(\iota=1,\iota<|\mathcal{R}|,\iota++\)do\(I_{b,\tilde{r}\downarrow}\gets 1\)  Return \(\sum_{b\in\mathcal{B}}\sum_{r\in\mathcal{R}}\sum_{\iota\in\mathcal{I}}\mathcal{I}_ {b,r,b}\theta_{r,b}^{t}\) endprocedure
```  
**Algorithm 1** Beamforming and RF chain allocation  
**Remark 1**: _The computational complexity of the proposed beamforming and device selection mechanism is very high and may not be feasible in real-time as it requires an exhaustive search of \(O(|j|^{|\mathcal{R}||\mathcal{B}|})\) operations.