3.1. Algorithm Description
In this section, we propose a cross-NP uplink resource-allocation algorithm. This algorithm allocates the subframes of the current NP and uses the following NP’s uplink resources without affecting the uplink resources available to the next NP. Furthermore, this algorithm allocates UEs using the subframes that cannot be used in the next NP because of scheduling delays to increase resource utilization and use the as few subframes as possible to satisfy the needs of all UEs.
This algorithm first determines the allocation order of UEs based on the transmission spectrum efficiency. The UE with the highest spectrum efficiency is selected first. Moreover, because NPRACHs may use some subframes, this algorithm considers the number of remaining subcarriers in each subframe to select the used modulation and unit type for the UE. In addition, because the NB-IoT resource allocation protocol for the uplink should meet Equation (
1), an NPUSCH start subframe is a substantial subframe. This NPUSCH start subframe occupied by a UE without efficiently using the following NPUSCH subframes will cause some subframes to never be used. Therefore, this algorithm checks whether vacating an occupied NPUSCH start subframe of a UE can release more usable subframes to serve other UEs.
The pseudo-code of the cross-NP uplink resource allocation is presented in Algorithm 1. In the first line, the number of
P NPs to meet the data requirements of all UEs is set to 0. In line 3, we call the Transmission-Performance() function to calculate the transmission performance (bits) of each UE
d with each unit type
u and modulation strategy
m in a subframe and store it in table
. The Transmission-Performance() function is revised from the UPLOAD-SIZE() function proposed in [
12]. In Line 4, we sort the UE index in descending order according to the data requirement
of each UE
d. That is, we give a higher priority to the UE with a higher data requirement.
Algorithm 1: Cross-NP Uplink Resource Allocation |
|
In lines 5–25, we try to schedule D UEs in an NP and search for a combination of the four parameters, the unit type, modulation, available DCI, and scheduling delay value, for a UE. For a selected UE , we should select one combination of unit type u with modulation m from the selections (Line 6). According to table , this algorithm chooses the j-th combination of and with the highest spectrum efficiency for UE (Line 7). Then, in Lines 8–16, we find a DCI c with a scheduling delay value for UE . If NPUSCH start subframe is farther than the farthest unusable subframe of the next NP (i.e., ) or has no empty subcarriers (i.e., + ≥ F), DCI c using scheduling delay is unavailable. Therefore, we try the next one (Lines 8–11). Otherwise, it indicates that the cell currently has sufficient radio resources using the four parameters for the UE. Used DCI and scheduling delay value index are set as c and i, respectively (Lines 13–14). The j-th combination of and can be used for the UE, and indicator is set as 1. Because this algorithm finds four available parameters for the UE, we break the three for loops (Lines 15–16). If this algorithm cannot find a combination of the four parameters for UE , it goes to Line 5 to serve the next UE.
In Line 17, we call the Subframe-Allocation() function to allocate subcarriers and subframes for UE using the four parameters. This function returns the number of allocated units for UE (i.e., ) and the last allocated subframe index , which is designed for the NSF-Adjustment() function. When the subframe allocation is finished for UE , if the resource assignment index h is larger than or equal to 1, we set the corresponding parameters and call the NSF-Adjustment() function (Lines 18–25).
The NSF-Adjustment() function is designed to reduce the number of allocated units for UE if a sacrificed unit from UE can be used to serve more UEs. When the resource assignment is adjusted, we allocate the number of subcarriers through continuous subframes (Lines 20–21). If we allocate subframes of the next NP (i.e., ) for UE , is set as true to denote that the UE cannot be scheduled in the next NP because the UE cannot monitor its search space (Lines 22–23). Because DCI in the P-th NP is assigned to UE , is set to 1 (Line 24), and the data requirement of UE is decreased by (Line 25). When the radio resources of an NP are exhausted, or no UE should be served, the number of used NPs is increased by 1 (Line 26). Then, we check that if the data requests of all UEs are fulfilled, the algorithm is terminated, and the five parameters are returned (Lines 27–29).
The Transmission-Performance() function (Algorithm 2) calculates table . In Line 2, we initialize to as unavailable, . Then, this function estimates whether UE d can use resource unit type u and modulation strategy m to achieve the required reliability. If the required reliability cannot be met, the number of repetitions used for transmitting data is −1, and we look for the next combination (Lines 6–7). Otherwise, the UE can transmit data using the unit type with the modulation, and we calculate its spectrum efficiency recorded in in Lines 8–16.
Algorithm 2: Transmission-Performance |
|
In Line 8, the resource assignment index h is initialized as 0. Then, the function checks whether this NP has sufficient subframes for each unit type, and the need for UE d is sufficient (in Lines 9–16). In every test, index h is increased by one until the maximum number of resource units is achieved (Lines 9–10). In Line 11, UE d transmitting units with type u and modulation strategy m requires NPUSCH subframes. Because an NP that crosses over the next NP has L subframes at most, means that UE d can deliver bits in this NP. The spectrum efficiency is (Lines 11–12). Otherwise, we terminate the while loop because this NP does not have sufficient resources for using this unit type and modulation (Lines 15–16). If the number of resource units can satisfy the need of UE d, we also terminate the while loop (Lines 13–14). When we complete , this function returns in Line 17.
The Subframe-Allocation() function (Algorithm 3) calculates the number of units that can be continuously allocated for UE using unit type with modulation from NPUSCH start subframe . In Line 2, variable is initialized to −1. is used to indicate the currently allocated subframe from NPUSCH start subframe . Variable , initialized as 0, indicates that the number of subframes is allocated. Variable h, initialized to 0, is the resource assignment index (i.e., for UE ). In Lines 3–14, as long as the requirement of UE has not been met, this function will try to allocate subframes continuously one by one (i.e., in Line 4) until the maximum resource units are allocated for the UE (i.e., ). In Lines 5–6, if the current subframe position exceeds the NPUSCH start subframe comprising the first DCI with the minimum scheduling delay in the next NP (i.e., ), it means that no more subframes can be allocated in this NP, and we break the while loop. In Lines 7–8, if all the subcarriers of the subframe are occupied by NPRACHs (i.e., ), we skip this subframe.
Algorithm 3: Subframe-Allocation |
|
In Lines 9–10, if the unused subcarriers are sufficient for UE using resource , the number of currently allocated subframes for the UE is increased by 1. Then, in Lines 11–12, we check whether the number of allocated subframes meets the number of data repetitions required for UE using unit type and modulation . If it is satisfied, the index h of the resource assignment is incremented by 1, and we record the last subframe position of UE . will be used for the NSF-Adjustment() function to increase the subframe utilization by adjusting the allocated units of UE . If this subframe does not have sufficient subcarriers for the UE, this function breaks the while loop (Lines 13–14).
The NSF-Adjustment() function (algorithm 4) determines whether freeing up an occupied NPUSCH start subframe of UE by subtracting one resource unit to release more usable subframes to serve other UEs. In Line 2, , initialized as 0, is the number of subframes that NPRACHs fully occupy. In Line 3, if the last subframe allocated to UE exactly is an NPUSCH start subframe and index h of the resource assignment for UE is larger than 1, we calculate the number of usable subframes when the NPUSCH start subframe is vacated in Lines 4–11. Because this paper considers cross-NP resource allocation, is the last allocable subframe of this NP, which can cross over the length L of this NP (Line 4).
Algorithm 4: NSF-Adjustment |
|
In Lines 5–11, we view each subframe to count the number of usable subframes from NPUSCH start subframe to the last allocable subframe. For each subframe x, if NPRACHs fully occupy the subframe, is increased by 1, and we go to check the next subframe (Lines 6–8). If the available subcarriers of the subframe are all allocated to UEs or the subframe is another NPUSCH start subframe, the last allocable subframe is updated as the current subframe x, and we break the for loop (Lines 9–11). In Line 9, the first condition is because we should ensure that the allocable subframes are continuous. The second condition is that an NPUSCH start subframe is a vital subframe, which should be reserved for another UE. In Lines 12–13, if the released subframes (i.e., ) by vacating the NPUSCH start subframe are greater than the sacrificing subframes from UE , we decrease the number of resource units allocated to UE and index h is decreased by 1.