## 6 Simulation and Resource Assignment  
In sensors network, MTC devices access the cellular network periodically every T\({}_{s}\), in order to transmit their payload for a short period of time T\({}_{a}\). During T\({}_{a}\), the devices should achieve a minimum data throughput of R\({}_{b}\geq x_{i}\) for transmitting the devices payload. After that, MTC devices enter a waiting time during which these devices collect new data for a new session. The authors in [3] have investigated the requirements of real-time smart devices under MTC, they have found that data transaction occur every T\({}_{s}\) = 120 s, where these devices make data transaction for T\({}_{a}\) = 430 ms. For the sake of safety, and considering the worst case in this work, an access time for these devices has been set to 400 ms = 400 TTI, where MTC devices need to complete their payload transfer. The simulation and resource assignment of MTC devices is described in Algorithm 1. The simulation is initialised by setting a ROI, in which the BSs and devices (sensors) are generated within that ROI. The simulation lasts for 400 TTIs to allow the sensors to upload their payload. This time has been selected based on stringent MTC devices requirements, as indicated in [3,12]. The number of \(RB\)s is defined as well according to the system bandwidth. The algorithm then checks the available MTC devices that request data transmission and the assigned scheduler try to grant resources, taking into account the fairness among them as well as their data rate flow. Three different schedulers have been used to demonstrate the impact of using DBS architecture for MTC traffic in sensors network. The schedulers used are Round Robin (RR), Proportional Fair (PF) and best CQI (b-CQI) algorithm. After checking the link quality model, the BBUs receive devices feedback and the corresponding scheduler will assign resources. Any \(RB\) that has been assigned will be removed from the available resources to avoid granting the same \(RB\) for more than one device at the same TTIFurthermore, all devices that completed data transaction before T\({}_{\text{a}}\) has elapsed will also be removed from the available set of devices that need access. The resource manager will assign _RB_s until all available _RB_ is exhausted or all devices complete their data transaction. After that the data throughput is calculated for devices that successfully completed data transaction within the allowed time (400 TTI). The peak, average and cell-edge throughput is calculated in order to demonstrate the importance of DBS architecture over CBS. The peak and cell-edge data throughput represent a 5% of the Cumulative Distribution Function (CDF) of the total data throughput, where the peak throughput denotes the average of the best 5% of MTC devices throughput and the cell-edge throughput denotes the average of the worst 5% of MTC devices throughput. For DBS scheme, up to 6 RRUs have distributed per BBU. All MTC devices will have resources scheduling (RS) processed at the BBU end with RR, PF, or best CQI. The BBUs receive the devices CQI through all RRUs, where there is a single RS algorithm that's responsible for resource allocation for all UEs connected to the BBUs and their corresponding RRUs. ```
Define ROI % region of interest set \(\tau\) = 400 it % simulation time, this represents the transmission time T\({}_{\text{a}}\) define network geometry as either:  CBS, with no RRUs % network set as three sectored sites or DBS, with up to 4 RRUs per BBU. % network set as BBU and RRUs set a 4 \(\times\) 4 MIMO system for both CBS&DBS.% MIMO type 4 \(\times\) 4 (CLSM) set network size of 21 BBUs, 6 RRUs per BBU and MTC devices. % network size per 150 m ISD, 21 BBUs, up to 6 RRUs per BBU, with MTC devices. set three RS algorithms: RR, PF, best CQI. % these the scheduling algorithms that can be used to schedule MTC traffic. Generate BBUs/RRUs per ROI % within ROI, generate the network BSs.