#### Abstract

In this paper, we conduct a research based on the classified secondary users (SUs). SUs are divided into two categories: higher-priority SU1 and lower-priority SU2, and two types of users generate two types of packets, respectively. Due to the lowest spectrum usage rights of SU2 packets, the SU2 packets’ transmission is easily interrupted by other packets with higher rights. With the purpose of controlling the SU2 packets’ retransmission behavior, we introduce two system parameters, namely, feedback threshold *T* and feedback probability *q*. When the amount of SU2 packets in the buffer reaches the feedback threshold *T*, the interrupted SU2 packets either enter the buffer with probability *q* for retransmission or leave the channel by probability , where *q* is a fixed parameter. We construct a three-dimensional Markov model based on the presented retransmission control mechanism and derive some important performance indicators of SU2 packets based on the one-step transfer probability matrix and steady-state distribution. Then, we analyze the impact of some key parameters on the performance indicators through numerical experiments. Finally, we establish a cost function and use particle swarm optimization algorithm to optimize the feedback threshold and feedback probability.

#### 1. Introduction

With the advent of the communication era, the application of communication technology has become more and more extensive. On the one hand, with the rapid development of communication technology, cognitive radio technology is becoming more mature and rich. On the other hand, with people’s continuous improvement of communication quality and demand, spectrum resources are becoming increasingly scarce. In addition, some studies have shown that the utilization of these scarce spectrum resources is seriously inadequate [1, 2]. To alleviate these problems, more and more researchers began to study the spectrum allocation strategy (SAS) in cognitive radio networks (CRNs). Therefore, proposing a reasonable and effective SAS has become a key in the research of CRNs.

In traditional CRNs, there are two types of users: primary users (PUs) with absolute usage rights to licensed spectrum and secondary users (SUs) with spectrum sensing capabilities. The SUs’ transmission can be interrupted by PUs, so the spectrum can only be used by SUs opportunistically [3]. Considering the diversity in SUs’ transmission delay requirements, some researchers have graded SUs and assigned different hierarchies to SUs. The introduction of classified SUs makes the types of users in CRNs more diverse and adapts to the increasing trend of transmission needs in modern networks.

In CRNs with SU buffer, interrupted SUs can enter the buffer for retransmission. However, a large number of SUs entering the buffer will not only increase the average length of time that users spend in the system, but also reduce the quality of service (QoS) of the system. For another, the addition of a large number of SUs to the system is not conducive to the transmission of PUs, which in turn affects system performance. Therefore, the behavior of SUs (including access behavior and retransmission behavior) should be properly controlled.

In our work, hierarchical SUs are studied. Based on the single-spectrum cognitive radio network with a secondary SU buffer, we mainly conduct research on the retransmission behavior of interrupted secondary SUs and introduce two important parameters of feedback threshold and feedback probability. According to the proposed retransmission control mechanism, we establish a three-dimensional Markov chain (3DMC) model and calculate some important performance indicators of secondary SUs through steady-state analysis. Finally, by establishing an optimization function and combining particle swarm optimization (PSO) algorithm, the feedback threshold and feedback probability are optimized jointly.

The remainder of our paper is structured as follows. Section 2 states related works. The introduction and analysis of the system model are shown in Section 3. In Section 4, we derive some expressions for performance indexes and use them to analyze the system performance. In Section 5, the optimal parameter setting of the system is analyzed. Finally, Section 6 concludes this paper.

#### 2. Related Works

As a very promising technology, cognitive radio can effectively alleviate the serious shortage of spectrum resource utilization. Just as introduced in [4, 5], cognitive radio technology has received extensive attention from industry and academia, and many important results about cognitive radio technology have been obtained. For example, spectrum sensing is one of the most important technologies for cognitive radio and has aroused the attentions of many scholars. In [6], Liang et al. put forward the problem of sensor throughput trade-offs in combination with the interests of users. They studied how to design the sensing slot length to maximize the throughput of the SUs without affecting the PUs and used the energy detection scheme to prove that there was an optimal value for the sensing time. In this way, they got the best trade-off. In [7], Letaief and Zhang discussed techniques for spectrum sensing and antijamming in CRNs and conducted extensive analysis of cooperative communications in centralized and decentralized networks. Their analysis results showed that collaborative communication manner could improve system utilization and spectrum sharing without interfering with the primary system. In [8], in order to improve spectrum utilization and avoid interference, an adaptive cooperative spectrum sensing method was posed, and an optimal spectrum sensing framework was proposed to optimize the sensing parameters. The experimental results showed that the proposed sensing frame could maximize the sensing opportunity and efficiency while satisfying the interference constraints.

In CRNs, how to allocate the spectrum to the network users is an important concern. In the system performance analysis of CRNs, an excellent SAS can improve the system service quality effectively. Therefore, more and more researchers began to study the spectrum allocation in current cognitive radio technology [9, 10]. In [11], Tragos et al. outlined the spectrum assignments in CRNs, introduced some advanced proposals, and showed the most common methods and techniques for solving SAS problems. Finally, an in-depth analysis of these techniques and methods was carried out. In [12], based on the cooperative spectrum allocation, a probability relaying mechanism was introduced and the trade-off relationship between the delays of the two types of users under steady-state conditions was analyzed, and the average delay expression was derived. Through numerical analysis experiments, the relay probability was optimized to ensure the throughput of the system, and the impact of the relay probability on the system performance was revealed. In [13], considering the dynamic change for the availability of channels in CRNs over time, the authors put forward a channel usability assessment scheme according to the characteristics of moving scene. They demonstrated and analyzed the channel availability in different moving scenes. The experimental results revealed many advantages of applying the proposed scheme in CRNs.

With the rapid development of modern communication, data communication shows a trend of diversification. Considering the increasing number of data types in real-world communication networks, many researchers introduced graded cognitive users into CRNs to ensure the QoS of SUs. Just as described in [14, 15], this grading mechanism can improve system performance of CRNs effectively. In [16], Tumuluru et al. divided the SUs into two classes with different priorities and studied the spectrum switching priorities in the centralized and distributed CRN architectures by using a novel dynamic SAS. They established a continuous-time Markov chain and derived performance indicators such as blocking probability and forced termination probability of high-priority and low-priority SUs. The case of subchannel reservation for high-priority SUs was also studied. In [17], El-Toukhey et al. considered two priority levels of SUs. Based on two traditional channel access technologies, random channel access and reserved channel access, a 3DMC model with finite PUs and infinite SUs was proposed. Through the performance analysis, the conclusion that the presented strategy could enhance the performance of radio system was summarized. In [18], Zhao and Bai proposed a new SAS with classified SUs and impatient users. By dynamically modeling the network user’s queue actions into a 3DMC, some principal performance indicators of the secondary SUs were derived. Finally, the authors gave the personal optimal strategy and social optimal strategy of secondary SUs and put forward a pricing strategy to optimize the system behavior of the secondary SUs.

In addition, considering the lower priority of SUs in CRNs, the system access and transmission interruption of SUs in CRNs have attracted some researchers’ attentions in recent years. It is obvious that excessive SUs access to the system will influence the PUs’ transmission, and a large number of interrupted SUs entering the buffer will increase the SUs’ average latency. Hence, how to properly control the access behavior and retransmission behavior of SUs has become a key issue and research hotspot [19, 20]. In [21], Turhan et al. posed an access control strategy to adjust the acceptance of SUs in CRNs. By establishing a two-dimensional Markov model, they used a dynamic programming method to maximize the system profit. Experimental results showed that the best access control strategy was the threshold type, which only lied on the total amount of users in the system. In [22], based on observable queueing rules, an equilibrium threshold blocking strategy of SUs was studied. An access threshold was set, and the SU arriving at the system compared the threshold with the number of SUs in the system and decided whether to join the buffer queue based on the comparison result. Through experiments, the relationship between the access threshold and the social benefits was revealed. In [23], a novel dynamic SAS was proposed that controlled the access behavior of SUs by introducing access threshold and access probability. Through the establishment of the Markov model and the analysis of system steady state, some important performance indicators were derived. In addition, by constructing a benefit function, the authors proposed an iterative algorithm to optimize the system parameters. In [24], a returning threshold and a returning probability were introduced to control the retransmission of SUs. By constructing a two-dimensional queueing model, some important performance metrics of SUs were derived. The authors also found that the returning threshold of the proposed mechanism was a main factor affecting the system performance. Finally, considering the trade-off between the performance metrics of SUs and the returning threshold, the authors established a revenue function to improve the system parameter settings.

In the SAS posed in our paper, based on the classification for SUs, we introduce a feedback threshold and feedback probability to control the retransmission behavior of the interrupted secondary SUs. Our work is a lot different from [24]. First of all, in [24], only two types of users were considered and the SUs were not graded. Secondly, different from [24], a fixed feedback probability is introduced to control the system access of secondary SUs in our work. The effect of this feedback probability on system performance is analyzed specially. Finally, in [24], a benefit function was established to optimize the return threshold. While in our experiments, the feedback threshold and the feedback probability are jointly optimized by establishing a cost function and using the PSO algorithm.

#### 3. Model Description and Model Analysis

##### 3.1. Model Description

In this paper, the retransmission control mechanism for SUs with two levels is considered. In the proposed strategy, there are three types of users; the priorities from high to low are: PU, SU1, and SU2, and thus corresponding three types of packets are generated. We build and analyze a system model based on a single-spectrum cognitive radio network with a capacity of *K* for SU2 buffer. In addition, we introduce two parameters, feedback threshold and feedback probability, for the SU2 packets to dominate its retransmission behavior. According to the different priority levels of the three types of users, combined with the relationship between the feedback threshold and the amount of packets in the system, we will discuss the behavior of three types of packets specifically.

In the case of a new PU packet requesting access to the system, if the spectrum is idle, the new PU packet can directly occupy the spectrum to complete the transmission. If the spectrum is being occupied by another PU packet, the new PU packet will leave this spectrum. If the spectrum is being used for transmission by an SU1 packet or an SU2 packet, since PU packets hold higher usage rights, the new PU packet will preempt the spectrum by interrupting the transmission of packet being transmitted.

In the case of a new SU1 packet requesting access to the system, if the spectrum is idle, the new SU1 packet can directly occupy the spectrum to complete the transmission. If the spectrum is being occupied by one PU or another SU1 packet, the new SU1 packet will leave this spectrum. If there is an SU2 packet that is using the spectrum for transmission, since SU1 packets take precedence over SU2 packets, the new SU1 packet will interrupt the SU2 packet’s transmission and preempt the spectrum.

In the case of a new SU2 packet requesting access to the system, this new SU2 packet can use the spectrum only if the spectrum is empty; otherwise, it must be queued in the SU2 buffer. Moreover, if the new SU2 packet wants to enter the buffer but the buffer is full, then it will be blocked.

For the interrupted SU1 packets, since the system does not set a buffer for the SU1 packets, the interrupted SU1 packets must be away from the system directly. For the interrupted SU2 packets, we introduce two parameters, namely, the feedback threshold *T* and the feedback probability *q*, to control the SU2 packets’ retransmission behavior, where and *q* is a fixed system parameter. When the amount of SU2 packets in the buffer does not reach the preset feedback threshold, the interrupted SU2 packets will be allowed to access the buffer with probability 1. Otherwise, the system will allow them to have the probability of *q* returning to the buffer, or denied their access actions with probability .

In particular, referring to [25], we presume that the interrupted SU2 packets have higher priority over the new SU2 packets. The working principle of the retransmission control mechanism with feedback threshold and feedback probability proposed in this paper is shown in Figure 1.

We divide the time axis into equal time slots in the discrete-time domain and assume that each packet arrives at the system at the beginning of the slot and leaves the system at the end of the slot. The geometric distribution is assigned to the arrival intervals of PU packets, SU1 packets and SU2 packets, and the arrival rates are , , and , respectively. The service times of three types of packets also obey the geometric distribution, and the service rates are , , and , respectively.

We set , , and as the total amount of all packets, the amount of SU1 packets, and the amount of PU packets in the system at time , respectively. Accordingly, the 3DMC composed of has a state space **M** as follows:

##### 3.2. Model Analysis

We use the system state to represent the overall amount of packets in the system. From the buffer’s size *K*, it can be seen that the range of system state varies from 0 to . The form of the state transfer probability matrix **P** used to represent the 3DMC is shown as follows:

Afterwards, we denote , . The specific forms of the nonzero submatrices in **P** will be discussed in detail next.(1) is a one-step transfer probability submatrix when the system state is fixed at 0:(2) is a one-step transfer probability submatrix when the system state increases from 0 to 1:(3) is a one-step transfer probability submatrix when the system state increases from 0 to 2:(4) is a one-step transfer probability submatrix when the system state decreases from 1 to 0:(5)**D** is a one-step transfer probability submatrix when the system state decreases from to , where : is a one-step transfer probability submatrix when the system state decreases from to , where . The form of is the same as **D**.(6)**M** is a one-step transfer probability submatrix when the system state is fixed to , where :(7) is a one-step transfer probability submatrix when the system state is fixed to , where and :(8)**N** is a one-step transfer probability submatrix when the system state increases from to , where :(9) is a one-step transfer probability submatrix when the system state increases from to , where , and :(10)**Q** is a one-step transfer probability submatrix when the system state increases from to , where :(11) is a one-step transfer probability submatrix when the system state increases from to , where , and :(12) is a one-step transfer probability submatrix when the system state increases from *K* to . According to the capacity *K* and the feedback threshold *T*, is discussed in two situations: If , the formula for can be expressed as follows: If , the formula for can be expressed as follows:(13) is a one-step transfer probability submatrix when the system state is fixed to :

The form of matrix **P** shows that 3DMC is positive recurrent, aperiodic, and irreducible [26]. We denote the steady-state distribution of by , which is given as follows:where *y* and *z* cannot be 1 at the same time.

We use to represent the steady-state probability vector. is given as follows:

In order to get the result of , we list the formulas according to the equilibrium equation and normalization conditions, where **e** is the column vector whose elements are all 1. Through the numerical calculation method, we can gain the numerical result of [27].

#### 4. Performance Measures and Experimental Analysis

##### 4.1. Performance Measures

The SU2 packets’ blocking rate *B* is defined by the amount of new arrived SU2 packets blocked within a unit time slot. According to the buffer capacity *K* and the feedback threshold *T*, the blocking rate *B* is discussed in two cases.

If ,

If ,

The SU2 packets’ interrupted losing rate *I* is defined by the amount of interrupted SU2 packets leaving the system within a unit time slot. Our discussion of interrupted losing rate *I* is given below. There are two cases can be discussed:(1)When an SU2 packet is interrupted, it has a probability that is rejected by the system into the buffer.(2)When an SU2 packet is interrupted, it has a probability *q* returning to the buffer. If the interrupted SU2 packet can return to buffer yet there is no vacancy in the buffer, it will be removed from system.

Therefore, the express of *I* is derived as follows:

The SU2 packets’ throughput *U* is defined by the amount of SU2 packets completed for transmission within a unit time slot. The following equation shows the expression for throughput *U*:

The SU2 packets’ average latency *L* is defined by the average length of SU2 packets from entering the system to leaving the system. According to Little’s formula [28], the average latency *L* can be derived as follows:where is given as follows:

##### 4.2. Experimental Analysis

For more intuitive observation and analysis of system performance, we use Matlab tool to plot the trends of performance indicators of SU2 packets with feedback probability *q* in Figures 2–5. Some common parameter settings are demonstrated as follows: the capacity of SU2 buffer is , the arrival rate of SU2 packets is , the service rates of the three types of packets are , , and .

As can be seen from Figures 2–5, when fixing other parameters, as the feedback probability *q* increases, the blocking rate *B*, throughput *U*, and average latency *L* of the SU2 packets increase, while the SU2 packet’s interrupted losing rate *I* decreases. This is because an increase in the feedback probability means that the interrupted SU2 packets hold a greater probability of returning to the buffer, which will cause more SU2 packets coming into the buffer, and the number of blocked new SU2 packets will also increase, so the blocking rate will increase. Moreover, the more SU2 packets in the buffer are, the longer the average duration of SU2 packets staying in the system is; therefore, the average latency will increase. In addition, the greater the probability that the SU2 packets return to the buffer is, the more SU2 packets that can be successfully transmitted, so the throughput will increase. Moreover, as the feedback probability increases, the probability that the interrupted SU2 packets leaving the system directly will decrease, so the interrupted losing rate will decrease.

Figures 2–5 also show that when fixing other parameters, as the feedback threshold *T* increases, the blocking rate *B*, throughput *U*, and average latency *L* of the SU2 packets show an upward trend, while the interrupted losing rate *I* of the SU2 packet presents a downtrend. The reason can be explained as follows: the bigger the feedback threshold is, the more interrupted SU2 packets having a chance to return to the buffer, so the interrupted losing rate will be reduced. Simultaneously, the more SU2 packets entering the buffer is, the more newly arrived SU2 packets may be blocked, so the blocking rate will increase. Moreover, the more packets in the buffer is, the more SU2 packets that can be successfully transmitted, so the throughput will increase. Moreover, a large amount of SU2 packets entering the buffer queue will increase the average latency.

In addition, we conclude from Figures 2–5 that when other parameters are constant, the blocking rate *B*, interrupted losing rate *I* and average latency *L* of SU2 packets will increase with the PU packets’ arrival rate increases, while the throughput *U* is opposite. The reason can be explained as follows: the higher the arrival rate of PU packets is, the less the opportunity for SU2 to occupy spectrum, so the throughput will be reduced. Moreover, an increase in the PU packets’ arrival rate means more PU packets can join the system, causing more interrupted SU2 packets. This means more interrupted SU2 packets are rejected by the system into the buffer, so the interrupted losing rate will increase. On the other hand, more SU2 packets are interrupted, and then the number of packets entering the buffer increases, which in turn increases the average latency and blocking rate. Furthermore, the SU1 packets’ arrival rate has the same effect on the performance indicators of SU2 packets as the PU packets’ arrival rate

#### 5. System Optimization

##### 5.1. Optimization Analysis

In the optimization analysis of CRNs, throughput and average latency are two important performance metrics for SU2 packets and are also the main factors reflecting the system performance. From the previous section, we can see that the throughput *U* and average latency *L* of SU2 packets will raise with the increase of feedback probability *q* and feedback threshold *T*. This trend in throughput benefits the system while average latency reverses. In order to balance these two performance indicators that have different effects on the system, we establish a cost function to get the optimal value of the feedback probability *q* and feedback threshold *T*. The form of is given as follows:where *m* and *n* are the influence factors of the cost function.

According to equation (25), the optimal feedback value is drawn as follows:

Since the feedback probability *q* is a continuous variable, we cannot accurately derive the value of the optimal feedback probability . Referring to [29], we use the standard particle swarm optimization (PSO) algorithm to solve the optimal . We firstly calculate the optimal feedback probability and the corresponding for different feedback thresholds *T* and then find the optimal value . In the PSO algorithm, each particle finds the optimal solution by iteration. In each iteration, the particle updates itself by tracking two “extreme values.” The algorithm steps for solving the optimal value of the feedback probability using the PSO algorithm are shown in Table 1.

##### 5.2. Optimization Experiment Results

According to the optimization analysis in Section 5.1, we use Matlab tool to realize the system optimization design and summarize the experimental results in Table 2. By referencing [29], some common parameters in the experiment are set as follows: , , , , , , and .

As can be seen from Table 2, when the PU packets’ arrival rate is , the minimum value of system cost function is and the corresponding joint optimal value for feedback threshold and feedback probability is (8, 0.01). When , the minimum value of the system cost function is and the corresponding joint optimal value for feedback threshold and feedback probability is (7, 0.01).

In Table 2, we can find that when other parameters are unchanged, the optimal feedback probability gradually decreases as the feedback threshold *T* increases. The reason can be explained as follows: as the feedback threshold increases, the amount of SU2 packets entering the buffer will increase, so the SU2 packets’ average delay will also increase. According to equation (25), the increase of average delay will lead to more system costs. Therefore, in order to decrease the value of cost function, the system must set a lower feedback probability.

In addition, we can also conclude from Table 2 that when the feedback threshold *T* and other parameters of the packets remain unchanged, the optimal feedback probability decreases with the increase of PU packets’ arrival rate . This is because when the PU packets’ arrival rate is relative large, more PU packets will enter the system, which will cause more SU2 packets’ transmission being interrupted and entering the buffer, so the SU2 packets’ average delay will increase. In order to decrease this performance index, the feedback probability needs to be set lower.

#### 6. Conclusions

In our work, based on the graded SUs, we proposed a SAS with feedback threshold and feedback probability to control the retransmission behavior of SU2 packets. According to the proposed system model, we established a 3DMC and carried out the steady-state analysis. Then, we derived some important performance indicators of SU2 packets, including blocking rate, throughput, interrupted losing rate, and average latency. In the numerical experiments section, we showed and analyzed the impact of some key parameters on the performance indicators of SU2 packets. For instance, when we set a large feedback probability, the SU2 packets’ interrupted losing rate would decrease, but the average delay would increase. When we set a small feedback probability, the SU2 packets’ blocking rate would decrease, but the throughput would also decrease. We also found that the feedback threshold had a similar impact on system performance metrics. Finally, in order to balance the impact of key parameters on system performance indicators, we established a cost function and adopted a PSO algorithm to optimize the feedback threshold and feedback probability jointly. Through the optimal results, we concluded that when the feedback threshold of the system was set to be large, the feedback probability should be set smaller to improve the system performance.

#### Data Availability

The data used to support the findings of this study are included within the article.

#### Conflicts of Interest

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

#### Acknowledgments

This work was supported by the National Natural Science Foundation of China (grant no. 61701097) and the Natural Science Foundation of Hebei Province, China (grant no. F2016501073).