Abstract

The present study proposes a new algorithm for device-to-device (D2D) user density identification in a 5G network based on resource allocation. The method initially established a multiobjective optimization function that calculates system throughput and quality of service (QoS) of D2D users. The optimal resource allocation result of the multiobjective function is obtained via the improved whale optimization algorithm (IWOA). System throughput after resource allocation exhibits a linear relationship with the number of users. Therefore, the D2D user density areas are accurately identified via the throughput value. The simulation result reveals that the accuracy of D2D user density identification reaches 95%.

1. Introduction

With the popularization and performance improvement of smartphones, it is important for a 5G network to satisfy individuals’ demands for ultrahigh traffic density and connection density. Conversely, it is necessary to consider the effect of different resource allocation strategies under different scenarios and traffic loads [1]. The resource allocation method of device-to-device (D2D) technology in D2D and cellular hybrid networks improves system throughput and decreases transmission delay, and D2D technology allows adjacent users to directly communicate. The transmitting power of the node is low and can eliminate self-interference and solve the resource allocation problem in crowd-gathering scenarios [2], and throughput after resource allocation effectively reflects regional D2D user density. Thus, the performance of the resource allocation algorithm directly determines the accuracy of the D2D user density.

Currently, the main achievements of extant studies on D2D resource allocation technology are as follows. The study [3] considers a communication scenario, and each D2D technology can reuse a cellular resource. The study proposes a method to solve the optimal power allocation scheme via establishing an optimal objective function. The study [4] examines a scenario in which a pair of D2D multiplexers reuses a cellular downlink resource. Additionally, the study proposes a resource allocation method based on user interrupt probability and connection probability to maximize system throughput. The study [5] proposes a new resource allocation method based on the interference control mechanism of DT maximum/minimum power standard, and this decreases the interference of hybrid cellular networks. The study [6] proposes a method that guarantees the quality of service (QoS) although the method does not improve the throughput. The study [7] proposes the resource allocation method under a 28 GHz bandwidth, and this improves system throughput via limiting the interference value although it does not significantly decrease interference. The study [8] proposes an adaptive power control method based on the cellular user interference threshold that maximizes energy efficiency under the condition of satisfying the minimum QoS of D2D users. In [9], the resource allocation problem in the underlying cellular network of D2D communication was defined as a game of alliance formation, and the power allocation was optimized by the whale optimization algorithm (WOA). This method maximizes the throughput of the D2D system and guarantees the minimum rate per user. But it does not show any difference between the WOA and traditional optimization algorithms.

In summary, the aforementioned methods including those in [35] are unable to guarantee the QoS of D2D users, and thus, this constitutes a simple choice for cellular users based on distance. The aforementioned methods including those in [69] guarantee the QoS of D2D users although most of them do not limit the interference value and improve system throughput. Therefore, the result of the resource allocation technology does not reflect real D2D user density areas.

For the aforementioned problem, this study presents a new resource allocation method in the 5G network. The method initially establishes a multiobjective optimization function that contains system throughput and QoS of D2D users. Furthermore, the multiobjective optimization function is solved via the improved whale optimization algorithm (IWOA), and the result corresponds to an optimal resource allocation method. The method guarantees an approximate linear relationship between the system throughput and the number of users. Therefore, D2D user density areas are accurately identified by the throughput value after performing the optimal resource allocation method.

This study consists of four main sections: Section 2 describes the 5G communication scenario and existing problems. Section 3 describes resource allocation based on the IWOA. Section 4 presents simulated results. Experimental results indicate that the proposed algorithm obtains a high-accuracy result for D2D user density identification.

2. Scenario Description

In this study, we assume that there are D2D users and cellular users in a scenario. Furthermore, there is disturbance between the D2D users and the cellular users. To satisfy the users’ QoS, each cellular resource can be multiplexed by only one D2D pair, and each D2D pair can multiplex the multilink resource of cellular users. The D2D users can share spectrum resources of cellular users. The D2D users can communicate with each other through the cellular mode, D2D special mode, and D2D multiplexing mode. The D2D users can be grouped into the same group by distance [10]. Figure 1 shows the D2D and cellular hybrid network system.

In this scenario, the path loss model can be defined as follows [11]:where denotes the response lognormal shadow, denotes the path loss index, denotes the path loss coefficient, and denotes the communication distance. Normally, the path loss model can be divided into the line-of-sight (LOS) model and the non-line-of-sight (NLOS) model , and equation (1) can be represented as

Based on the Shannon equation, the throughput of the CU and DU is [12]where denotes the signal-to-interference-plus-noise ratio (SINR) of D2D users, , in which M denotes the number of D2D users; denotes the SINR of cellular users, , in which N denotes the number of cellular users; and B denotes the channel resource bandwidth.

and can be defined aswhere denotes the channel gain between and , denotes the channel gain between and the base station, denotes the channel gain between and the base station, denotes the white Gaussian noise, denotes the transmitting power of , and denotes the transmitting power of . When , does not multiplex the resource of . Equation (5) can be rewritten as . When , multiplexes the resource of .

Based on equation (3), the maximum system throughput of D2D users can be defined as

To identify the D2D user density, it is necessary to find the resource allocation method to obtain the optimal system throughput, which has a linear relationship with the number of D2D users. As shown in Figure 2, when the number of D2D users is dense, the throughput of D2D users is larger.

Conversely, to guarantee the QoS of D2D users, the function of satisfaction is used [1214]:where denotes the allocated resources of and denotes the maximum value of . When , can achieve the maximum value, which means the customer’s satisfaction of users reaches the maximum value; namely, the system QoS achieves the optimal value.

3. D2D User Density Identification Based on IWOA

Normally, when the number of D2D users is low, given the linear relationship between the number of D2D users and the throughput, it is possible to identify the area of D2D user density in a 5G network via the throughput estimation in each region. However, for many traditional resource allocation algorithms (e.g., cheat-proof pricing method [15], heuristic method [16], and GA-based method [17]), with the increasing D2D users, the relationship between the number of D2D users and the throughput estimated becomes nonlinear. Thus, the identification of the D2D user density region is more difficult.

In Figure 3, the points correspond to the actual collected data between the number of D2D users and the throughput and the line denotes the fitting curve of the collected data. With increases in D2D users, the interference of D2D communication with cellular communication increases, and interference between D2D communications also increases. The increase of system throughput tends to be gentle. Therefore, it is difficult to accurately estimate the number of D2D users via the traditional method. To solve this problem, an optimal resource allocation algorithm based on the IWOA is proposed.

Firstly, a multiobjective optimization function is established and contains the system throughput and QoS of D2D users. Subsequently, an improved whale optimization algorithm (IWOA) is provided to search for the optimal value of the objective function. Finally, the system throughput will increase linearly with the increasing number of D2D users. The basic principles of the improved algorithm are described as follows.

3.1. Multiobjective Optimization Function

Based on equations (3), (5), and (7) the maximum system throughput of D2D users’ objective optimization function is given as follows:

Equation (9) denotes the objective function, equation (10) denotes the minimum SINR threshold of , equation (11) denotes the minimum SINR threshold of , equation (12) denotes the transmitting power limitation of , equation (13) denotes the transmitting power limitation of , equation (14) means that each D2D user can only share resources with a cellular user, and equation (15) shows that the resource of each cellular user can be multiplexed via the K D2D users.

To guarantee the QoS of D2D users, the QoS objective optimization function is given as follows:

Equation (16) denotes the objective function, equation (17) denotes the minimum value of the allocated resources , and equation (18) denotes the total resources.

Therefore, the multiobjective optimization function is defined as follows:

The constraint condition of equation (19) denotes equations (10)–(15), (17), and (18). Specifically, denotes a constant number within (0, 1). If the optimization objective focuses on optimizing the system throughput, then . If the optimization objective focuses on optimizing the QoS of D2D users, then .

3.2. Resource Allocation Mechanism Based on IWOA

Evidently, the optimization problem of equation (19) corresponds to a nonlinear optimization problem, which belongs to the NP-hard problem. It is difficult to directly obtain the global optimal solution. For the problem, the IWOA is proposed in this study, and the IWOA corresponds to an improved form of the whale optimization algorithm (WOA) [1721].

The IWOA is a bionic intelligent optimization algorithm that imitates the feeding behavior of humpback whales. Specifically, the IWOA includes the following three stages: the walking and foraging stage, the encircling and contracting stage, and the spiral predation stage.(a)In the walking and foraging stage, humpback whales can recognize the location of the prey via the location of a random individual whale. The behavior is represented by the following equations:where and denote coefficient vectors, denotes the distance vector from an agent to target food, denotes the random position vector of the best solution, denotes the current position vector, and denotes the next position vector.The vectors and are defined as follows:where denotes a random vector in [0,1], and linearly decreases from 2 to 0 in the WOA. When , the whales are in the walking and foraging stage, and when , the whales go to the next stage.In this study, the new resource allocation mechanism should satisfy the D2D user’s throughput and QoS, and the QoS of cellular users must also be guaranteed. Therefore, the whale population vector variable is defined as follows:As shown in equation (21), the variables that should be optimized include the following: transmission power variables and , SINR variables and , allocated resources and , and the multiplex variable .(b)In the encircling and contracting stage, when the whales search for food, the other whales approach the optimal whale position and surround their food. The mathematical model is given as follows:where denotes a random position vector selected from the current population.(c)In the spiral predation stage, the whales usually move in a spiral direction towards the optimum position of the whale and create bubble nets to surround the prey for predation. The mathematical model of whale spiral migration for predation is given as follows:where denotes the distance of the whale to the best solution obtained, b denotes a constant to define the shape of the logarithmic spiral, and l denotes a random number in (−1, 1).

Additionally, we then define a random variable p to distinguish the contraction-bounding stage from the spiral predator, and the mathematical model is given as follows:

However, the WOA exhibits the disadvantage of inadequate global search capability in the early stage and slow convergence speed in the later stage [19]. To solve the issues, the IWOA is proposed, and the difference between the IWOA and the WOA is in the spiral predation stage. The equation of spiral walking in the IWOA is defined as follows:where denotes the updated weight and is given as follows:where denotes the humpback whale aggregation factor, denotes the minimum weight value, denotes the maximum weight value, and denotes the variance of the fitness value. In the initial stage of iteration, is big, the value of is close to pi/2, and the value of is close to 0. At the end of the iteration, is small, the value of is close to 0, and the value of is close to 1. Therefore, with the continuous iteration, will increase from to gradually. The optimal objective function is given in equation (19).

In the initial iteration stage of the IWOA, and are higher, and this accelerates the convergence of the algorithm. In the late iteration stage of the IWOA, and are low, and this improves the accuracy of optimization.

Based on the aforementioned principle of the IWOA, the IWOA can be considered a global optimizer. It solves the NP-hard problem and obtains the global optimal solution of equation (19).

3.3. D2D User Density Identification

After optimization by the IWOA, the optimal parameters after resource allocation are achieved as follows:

We assume that the number of regions in a large region corresponds to S, and the optimal throughput of D2D users in each region by the IWOA is expressed as follows:

Furthermore, we assume the number of D2D users in each region is

The proposed method in this study considers the QoS of D2D users that decreases the interference of D2D communication with cellular communication and interference between D2D communications. Therefore, the data distribution between the number of individuals and the throughput in different regions is shown in Figure 4.

As shown in Figure 4, the relationship between the number of D2D users and the system throughput in different regions by data fitting is defined as follows:where k0 and k1 denote the function fitting value, and and satisfy a linear relationship. Although k0 and k1 are unknown, the D2D user density areas can be identified by the throughput value after the optimal resource allocation method provided that they satisfy the linear relationship.

In summary, the flow chart of the proposed method in this study is shown in Figure 5.

3.4. Algorithmic Complexity Analysis

The optimization algorithm proposed in this study consists of initializing the whale population, calculating the fitness function, and updating the whale location. When the whale population corresponds to N and the dimension of the optimization problem corresponds to D (D denotes the number of variables in equation (23)), the complexity of the proposed algorithm is analyzed as follows: the complexity of the initial whale population corresponds to O(ND), and the complexity of fitness calculation corresponds to O(NlogN). In the whale-position-updating process, the computational complexity corresponds to O(ND). Therefore, in each iteration, the complexity of the algorithm corresponds to O(NlogN + 2ND).

4. Simulation and Analysis of the Proposed Method

The proposed algorithm is validated in a 5G network scenario of a large region, and many cells exist in the scenario. The D2D users and cellular users are randomly distributed in the cells. The proposed algorithm is simulated through MATLAB to identify D2D user density.

4.1. Parameters of the Simulation Experiment

The simulation parameters are shown in Table 1. The system performance of the algorithm proposed in this study is simulated and analyzed via MATLAB.

4.2. Simulation and Experimental Analysis

The simulation scenario and D2D user scatter map are shown in Figure 6.

In Figure 6, “+” denotes the D2D sender, “” denotes the D2D receiver, and “o” denotes the cellular user. Figure 6 shows areas with different D2D user densities. Table 2 lists the system throughput and user satisfaction of different algorithms including the random distribution, heuristic distribution [16], and geometric programming resource allocation [22].

As shown in the simulation results in Table 2, increases in D2D users linearly increase the throughput from the proposed algorithm. When the number of D2D users exceeds 40, the throughput of other algorithms increases slowly. Therefore, it is difficult to identify the density from the throughput indicators. Conversely, the QoS of the proposed algorithm also exceeds that of the other three algorithms.

To compare the advantages of the algorithm more clearly, we change the number of D2D user pairs from 10 to 80. Then, the system throughput performance comparison is shown in Figure 7.

The system QoS performance comparison is shown in Figure 8.

As shown in Figure 7, increases in D2D users also increase the complete system throughput. Furthermore, the growth of the proposed algorithm exceeds that of the other three reference algorithms. The number of D2D users and throughput satisfy a linear relationship. This is because the proposed algorithm selects the optimal D2D users for cellular users to multiplex. However, the interference of D2D communication with cellular communication increases, and the interference between the D2D communications also increases through the other three algorithms. Therefore, the performance of the proposed algorithm exceeds that of the other reference algorithms.

Based on the simulation result in Figure 6, the linear relationship between the number of D2D users and the system throughput satisfies the following expression:

As shown in Figure 8, with increases in D2D users, the QoS of the proposed algorithm is maintained at approximately 80%. The QoS of the other three reference algorithms decreases. It is worth noting that there is a drop in the QoS at 20 D2D users for the proposed algorithm. This is because the number of simulation cycles is fewer, which may cause some drops at some points.

Finally, we analyze the D2D user density based on the conclusion of equation (33), and the accuracy of the proposed algorithm is listed in Table 3.

Table 4 lists the accuracy of different algorithms including the random distribution, heuristic distribution [16], and geometric programming resource allocation [22].

The simulation results show that D2D user density in different areas is accurately calculated by the algorithm proposed in this study.

5. Conclusion

In this study, a new resource allocation method is proposed for the problem of D2D user density identification in a 5G network. The method initially establishes an optimization function that contains the system throughput and QoS of D2D users. Additionally, the optimization function is solved via the IWOA. The method obtains a linear relationship between the system throughput and the number of users. Therefore, the D2D density is accurately identified by the system throughput. The experimental results indicate that the proposed algorithm obtains high-accuracy results for D2D user density identification. In the future work, we will research a more general model, which is suitable for various 5G communication scenarios. On the contrary, we may introduce some deep learning ideas to improve the algorithm to improve the accuracy.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

This work was supported in part by the National Key Research and Development Program of China under Grant No. 2018YFC1504403-03 and by the Research and Practice Project of Higher Education Teaching Reform in Hebei Province under No. 2017GJJG091.