# Optimal User Association Strategy for Large-Scale IoT Sensor Networks with Mobility on Cloud RANs
## 3 Problem Formulation
### Optimal Load-Balancing Association  
We begin with introducing an optimal load-balancing association strategy. As mentioned above, evenly distributing the traffic load among RRHs is essential to prevent congestion and to reduce network delay (Reducing the network delay is essential for C-RANs. Since passing the signals upward/downward via the fronthaul network already requires a certain amount of time, to guarantee the target network delay defined in 5G, it is important to prevent network congestion as much as \begin{table}
\begin{tabular}{c l} \hline \hline
**Notation** & **Meaning** \\ \hline
**N** & Proximity matrix, \(\textbf{N}=[n_{r,i}]_{\{r\in\mathcal{R},i\in\mathcal{I}\}}\) \\ \(\mathcal{R}\) & Index set of RRHs, \(\{1,2,3,\cdots,r,\cdots\}\) \\ \(\mathcal{I}\) & Index set of IoT devices, \(\{1,2,3,\cdots,i,\cdots\}\) \\ \(l_{i}\) & Number of data packets to transmit by IoT device \(i\) to its associated RRH in a time slot \\ \(c\) & RRH’s data processing capacity (i.e., number of data packets per time slot) \\ \(b_{r}\) & Amount of background traffic (i.e., number of data packets) at RRH \(r\) at the given time slot \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Summary of notations. possible, therefore aiming to avoid causing any additional delay.). The optimal load-balancing problem is formulated as below (called P. (1)):  
\[\min_{\mathbf{X}}\ \ \max\{b_{r}+\sum_{\forall i\in\mathcal{I}}l_{i} \times x_{r,i},\forall r\in\mathcal{R}\}\] (1a) subject to: \[\forall r\in\mathcal{R}:\ b_{r}+\sum_{\forall i\in\mathcal{I}}l_{i }\times x_{r,i}\leq c \tag{1b}\] \[\forall i\in\mathcal{I}:\ \sum_{\forall r\in\mathcal{R}}x_{r,i}=1\] (1c) \[\forall r\in\mathcal{R},\forall i\in\mathcal{I}:\ 0\leq x_{r,i}\leq n _{r,i}\] (1d) \[\forall r\in\mathcal{R},\forall i\in\mathcal{I}:\ x_{r,i}\ \text{binary} \tag{1e}\]  
The problem formulation is quite straightforward. The one and only decision variable is \(\mathbf{X}=[x_{r,i}]_{r\in\mathcal{R},i\in\mathcal{I}}\). As defined in Equation (1e), \(x_{r,i}\) is binary indicating whether RRH \(r\) is associated with IoT device \(i\) (i.e., \(x_{r,i}=1\)) or not (i.e., \(x_{r,i}=0\)). The objective function in Equation (1a) minimizes the largest traffic load handled by individual RRHs. Consequently, portions of the traffic handled by different RRHs can become close to each other, hence, balancing the traffic load among them. Equation (1b) states that, for each RRH \(r\), the sum of its background traffic and the total traffic from its associated IoT devices cannot exceed the RRH capacity limit. Each IoT device \(i\) needs to associate with one RRH within a single time slot to satisfy the QoS (Quality of Service) requirement as defined in Equation (1c). IoT device \(i\) can associate with RRH \(r\) only when it is close enough to \(r\); in other words, the association can happen only if \(i\) is within the transmission range of \(r\), as stated in Equation (2d). To enable P. (1) to be easily computed by a computer solver, we slightly modify the problem by introducing a new decision variable \(k\). Rewriting the resulting problem yields the following problem formulation (called P. (2)), which is equivalent to P. (1):  
\[\min_{\mathbf{X}k}\ \ \ k\] (2a) subject to: \[\forall r\in\mathcal{R}:\ b_{r}+\sum_{\forall i\in\mathcal{I}}l_{i }\times x_{r,i}\leq c \tag{2b}\] \[\forall i\in\mathcal{I}:\ \sum_{\forall r\in\mathcal{R}}x_{r,i}=1\] (2c) \[\forall r\in\mathcal{R},\forall i\in\mathcal{I}:\ 0\leq x_{r,i} \leq n_{r,i}\] (2d) \[\min_{\mathbf{X}}\ \ \max\{b_{r}+\sum_{\forall i\in\mathcal{I}}l_{i} \times x_{r,i},\forall r\in\mathcal{R}\}\]0 (2e) \[\min_{\mathbf{X}}\ \ \max\{b_{r}+\sum_{\forall i\in\mathcal{I}}l_{i} \times x_{r,i},\forall r\in\mathcal{R}\}\]1 (2f) \[\min_{\mathbf{X}}\ \ \max\{b_{r}+\sum_{\forall i\in\mathcal{I}}l_{i} \times x_{r,i},\forall r\in\mathcal{R}\}\]2  
The first proposed algorithm ALGO-1 makes use of the optimal association decision from P. (2) as follows. For each time slot, the BBU runs the optimization problem to compute the optimal association.