# Interference Aware Resource Control for 6G-Enabled Expanded IoT Networks
## 3 Interference-Aware Scheduling of APs and Nodes
### Proposed Algorithm  
The proposed algorithm allows the optimal scheduling of nodes and APs and their association based on minimum interference due to neighbouring APs and neighbouring nodes on the intended AP-node link. First of all, each node \(k\) selects the AP \(l\), which hasthe strongest channel gain to it. To accommodate the increasing user density, orthogonal pilots of length \(\tau_{p}\) are reused among the user nodes. To avoid the interference, each AP can serve a maximum of \(\tau_{p}\) sensor nodes. But there is a fair possibility of each AP serving more than \(\tau_{p}\) nodes. Let us define \(\mathcal{L}_{o}\), a set of APs that serve more than \(\tau_{p}\) nodes. Next, for each AP in the set \(\mathcal{L}_{o}\), a set of cluster nodes are found. Let \(\bar{U}_{l}\) define a set of user nodes, which is being served by AP \(l\in\mathcal{L}_{o}\). Next, for each node in \(\bar{U}_{l}\), the alternate AP \(l^{\prime}\) is chosen based on minimum channel loss criteria \(\Delta=\xi_{kl}-\xi_{kl^{\prime}}\). The user node \(i^{\prime}\) in \(\bar{U}_{l}\) with the minimum channel loss is selected and associated with AP \(l\). The association between the node and AP is enabled by setting \(\rho_{i}{}^{\prime}l=1\). This is repeated till the association is found for all APs in \(\mathcal{L}_{o}\). Next, the allocation of pilots to the nodes is carried out. Initially random pilot allocation is performed for all the nodes. Then, to avoid pilot contamination, a set \(N_{k}\) containing the \(\tau_{p}-1\) neighbouring nodes of node \(k\) is defined. For each \(k\in N_{k}\), the interference metric is calculated using Equation (18) for all \(t\in\left\{1,2\ldots\tau_{p}\right\}\). The pilot \(t^{\prime}\) at which the interference metric is maximum for a given \(k-l\) link is allotted to that node \(k\). This is repeated till all nodes in \(N_{K}\) are assigned pilots. Thus, the process results in optimal node-link association with optimal pilot allocation. The steps of the proposed scheduling algorithm are given in Algorithm 1 and the flowchart is given in Figure 2.  
```
Input : \(L\), \(\tau_{p}\), \(K\), \(\xi_{kl}\) Output : \(\rho_{kl}\) and \(t_{k},\forall k\in\{1,2\ldots K\},l\in\{1,2\ldots L\}\)  1. Initialize \(\rho_{kl}=0\) and \(\mu_{kl}=0\). 2. Each user node finds an AP with the strongest channel gain to it for\(k\)=1:\(K\)do for\(l\)=1:\(L\)do  find \(\xi_{kl}\) \(l_{k}=arg\ max\ l_{\in\{1,\ldots,l\}}\xi_{kl}\) 3. Find the APs which are selected by more than \(\tau_{p}\) nodes \(\mathcal{L}_{o}=\left\{l:\sum_{k}\rho_{kl}\succ\tau_{p}\right\}\) 4. Make the values of user nodes that have selected the same AP such that \(\bar{U}=\left\{k:\rho_{kl}=1,l\in L_{o}\right\}\)  5. For each \(k\in\bar{U}\), choose another AP with the next maximum channel gain to it \(l^{\prime}=arg\ max_{j\
eq l,\mu_{jl+1}}\xi_{jl}\)  6. Compute the loss \(\Delta=\xi_{kl}-\xi_{kl^{\prime}}\)  7. Find the user node \(i^{\prime}\) which has the minimum channel loss \(i^{\prime}=arg\ min\ k_{\in\ \mathcal{L}_{o}}\Delta\)  8. Enable the association by assigning \(\rho_{rl}=1\)  9. Repeat steps 4 to 8 till \(\mathcal{L}_{o}=\mathcal{O}\) and \(\sum_{k}\rho_{kl}=K,\forall\ l\in\mathcal{L}_{o}\)  10. Allocate pilots randomly for\(k\)=1:\(K\)do \(\tau_{k}=\tau\) where \(\tau\in\left\{1,2\ldots\ldots\tau_{p}\right\}\)  11. For each \(k\), make a set \(N_{k}\) containing node \(k\) and its \(\tau_{p}-1\) neighbours with strongest channel gain to its selected AP \(l\). 12. For each \(i\in N_{k}\), find the interference metric \(l_{i,l,\tau}\forall\tau\in\left\{1,2\ldots\tau_{p}\right\}\)  13.