Distributed Sequential Detection for Cooperative Spectrum Sensing in Cognitive Internet of Things

The rapid development of wireless communication technology has led to an increasing number of internet of thing (IoT) devices, and the demand for spectrum for these devices and their related applications is also increasing. However, spectrum scarcity has become an increasingly serious problem. Therefore, we introduce a collaborative spectrum sensing (CSS) framework in this paper to identify available spectrum resources so that IoT devices can access them and, meanwhile, avoid causing harmful interference to the normal communication of the primary user (PU). However, in the process of sensing the PUs signal in IoT devices, the issue of sensing time and decision cost (the cost of determining whether the signal state of the PU is correct or incorrect) arises. To this end, we propose a distributed cognitive IoT model, which includes two IoT devices independently using sequential decision rules to detect the PU. On this basis, we define the sensing time and cost functions for IoT devices and formulate an average cost optimization problem in CSS. To solve this problem, we further regard the optimal sensing time problem as a finite horizon problem and solve the threshold of the optimal decision rule by person-by-person optimization (PBPO) methodology and dynamic programming. At last, numerical simulation results demonstrate the correctness of our proposal in terms of the global false alarm and miss detection probability, and it always achieves minimal average cost under various costs of each observation taken and thresholds.


Introduction
As wireless communication technology rapidly develops, spectrum resources cannot meet the growing number of internet of thing (IoT) devices and their applications.However, the frequency spectrum of primary users (PUs) still lies in an insufficient state in the time or space domain.To address this concern, cognitive radio (CR) is regarded as a prospective technology to identify available spectrum resources and allow IoT devices to opportunistically access them [1,2] without causing harmful interference to PUs [3].But the spectrum-sensing behaviors of a single IoT device are susceptible to inherent factors of wireless propagation.Consequently, the cooperative spectrum sensing (CSS) paradigm is formulated to exploit spatial diversity and then improve the sensing accuracy of the PU signal through the observations of spatially positioning IoT devices.However, IoT architectures differ from traditional network architectures, which imply a high degree of reconfigurability, adaptability, mobility, and heterogeneity and present some insurmountable challenges to spectrum sensing.Traditional spectrum sensing techniques must be carefully redesigned for use in complex and scalable IoT systems [4].
Sensors 2024, 24, 688 2 of 14 In the past, some researchers have investigated spectrum sensing for IoT systems.An energy-efficient, reliable decision transmission in Zhu et al. to was proposed to decrease packet error and packet loss in industrial IoT [5].In a low signal-to-noise ratio (SNR) environment, to minimize energy consumption and sensing time, Ansere et al. proposed a dynamic spectrum sensing algorithm [6].Wan et al. proposed an energy-efficient CSS scheme to reduce the negative impact of spatial correlation [7].Since the previous energy detector is usually limited by noise uncertainty, Miah et al. also proposed an energy-efficient CSS-based CR-enabled IoT network under the interference constraint [8].Considering that battery-limited IoT devices are densely interconnected, Dao et al. optimized the sensing efficiency to leverage a lightweight but effective adaptive medium learning method [9].Long et al. developed a harvesting-sensing-transmission tradeoff problem-based cognitive IoT to take the diversity of energy harvesting efficiency, spectrum sensing performance, and quality-of-service (QoS) of data transmission into consideration [10].In order to enhance spectrum utilization in a 5G-based IoT, Abbas et al. proposed a hybrid mode of underlay and interweave-enabled scheme [11].Gharib et al. proposed a heterogeneous multi-band multi-user CSS scheme to realize secondary users' scheduling to sense a subset of channels in heterogeneous distributed CR networks [12].Ejaz et al. presented a multiband CSS and resource allocation framework in a CR-enabled IoT 5G network to minimize energy consumption under the performance requirement [13].To maximize the effective throughput, Zhang et al. jointly optimized the sensing time and packet error rate in cognitive IoT [14].Miah et al. presented a CSS technique in a noise-uncertain environment to comprise the use of the Kullback-Leibler divergence in CR-based IoT [15].To encourage spectrum sharing among unlicensed IoT devices, Lu et al. integrated the incentive mechanism into an orthogonal frequency division multiplexing (OFDM)-based cognitive IoT network with multiple unlicensed IoT devices in the context of incomplete information [16].In the CSS of high real-time scenes of IoTs, Gao et al. considered an improved CSS scheme to decrease the latency and increase low throughput, where each cognitive node performs a truncated sequential probability ratio test (SPRT) over each observation vector [17].Wu et al. achieved CSS between micro-sensing slots in cognitive unmanned aerial vehicle networks and approximated the error probability and the sensing time [18].Moreover, an optimal CSS for CR networks is performed using offset quadrature amplitude modulation and universally filtered multicarrier non-orthogonal multiple access methodologies [19].Mehmood et al. proposed an efficient QoS-based multi-path routing scheme for wireless body area networks [20].In addition, Lin et al. investigated a destructive beamforming design in IoT networks from the perspective of a malicious active reconfigurable intelligent surface (RIS) and proposed a general optimization framework to solve the SNR minimization problem [21].Ma et al. investigated the feasibility and performance of covert communication with a spectrum-sharing relay in the finite block length regime [22].An et al. investigated the secrecy performance of a cognitive satelliteterrestrial network [23].However, there is little research on the performance and efficiency of CSS for IoT devices.
A lot of efforts have been paid to CR-enabled IoT, considering issues such as achievable throughput, energy efficiency, frequency efficiency, or joint optimization with the spectrum resource allocation algorithm.These issues are also common on traditional CR networks.However, they did not take into account the cost issues in cognitive IoT, such as the sensing time and the cost of incorrect decisions, especially when considering CSS among multiple IoT devices.Hence, efficient spectrum sensing and resource allocation can be achieved only by realizing low-cost PU detection and ensuring spectrum sensing performance.Therefore, this article considers the optimal decision rule in cognitive IoT from the perspective of cost.To this end, a distributed cognitive IoT model is first established, including a pair of IoT devices for CSS and sequential detection, on the basis of which the sensing time and decision cost are defined, and the joint optimization problem between them is proposed.The optimal sensing time and threshold are analyzed by dynamic programming to obtain In a cognitive IoT without a centralized FC, there is a PU and a pair of IoT devices participating in CSS, as shown in Figure 1.To protect the PUs normal operation from detrimental interference, each of the IoT devices S 1 and S 2 individually exploits spectrum sensing technology to sense the PU at the sensing slot and then derives a final local decision about the PUs presence through a predetermined combination rule through observations of the PU activity information at each multiple micro-sensing slot.According to the global decisions of IoT devices, a distributed CSS algorithm is adopted to derive a global decision after the sensing slot to decide whether to allow IoT devices to access the channel.At last, a pair of IoT devices are allowed to utilize the free spectrum band via a predetermined spectrum resource algorithm during the transmitting slot if the PU is declared as absent.
Sensors 2024, 24, x FOR PEER REVIEW 3 of 14 dynamic programming to obtain the optimal decision rule.The main contributions of this article can be summarized as follows: • We formulate a distributed cognitive IoT model without a centralized fusion center (FC) and make use of energy detection to evaluate the local spectrum sensing performance of the IoT device.Furthermore, we also present a sequential detection framework to pave the way for the CSS of a pair of IoT devices.

•
On the basis of the proposed distributed cognitive IoT and CSS models, the sensing time and decision cost are defined, and the joint optimization problem between them is proposed.Then, the person-by-person optimization (PBPO) approach is applied to distributed sequential detection to address this optimization problem.

•
The optimal sensing time and threshold are analyzed by dynamic programming to obtain the optimal decision rule.At last, simulation results show the correctness and effectiveness of our proposed sequential detection rule in terms of sensing time and thresholds.
The remainder of this article is organized as follows: The local spectrum sensing model and sequential detection for CSS in a cognitive IoT are presented in Section 2. The optimal sensing time and decision rule based on distributed sequential detection are proposed and analyzed in Section 3. Comprehensive simulation result analyses and discussions are discussed in Section 4, and Section 5 draws a conclusion about this article.

Spectrum Sensing Model
In a cognitive IoT without a centralized FC, there is a PU and a pair of IoT devices participating in CSS, as shown in Figure 1.To protect the PUs normal operation from detrimental interference, each of the IoT devices  and  individually exploits spectrum sensing technology to sense the PU at the sensing slot and then derives a final local decision about the PUs presence through a predetermined combination rule through observations of the PU activity information at each multiple micro-sensing slot.According to the global decisions of IoT devices, a distributed CSS algorithm is adopted to derive a global decision after the sensing slot to decide whether to allow IoT devices to access the channel.At last, a pair of IoT devices are allowed to utilize the free spectrum band via a predetermined spectrum resource algorithm during the transmitting slot if the PU is declared as absent.

1
...  Energy detection is usually used as a local sensing technology because it is easy to implement and compatible with the PU network.In an energy detector, suppose that the Energy detection is usually used as a local sensing technology because it is easy to implement and compatible with the PU network.In an energy detector, suppose that the hypotheses H 0 and H 1 represent the absence and presence of the PU, respectively, then the attenuated received PU signal at the k-th micro-sensing slot of an IoT device is expressed as [24] where m is the PU signal sampling, n k (m) is the circularly symmetric complex Gaussian (CSCG) noise, s k (m) is the complex-valued phase shift keying (PSK) signal at the PU, n k (m) and s k (m) are independent each other, h k is the channel gain.Then, the test static E k of energy detector is expressed by where M is the sampling number of the received PU signal.Following (2), we evaluate the local performance via a pre-determined detection threshold λ k .Under the hypothesis H 0 , the probability density function (PDF) p 0 (l) of the test static E k follows Chi-square distribution, the local false alarm probability is obtained by where r k is the sensing sample.Suppose M is large enough, the PDF of E k is approximated as a Gaussian distribution where the mean The sampling frequency is f s , the duration time for the k-th micro-sensing slot is τ k , for simplicity of denotation, M = τ k f s .Therefore, the local false alarm probability is given by where Under the hypothesis H 1 , PDF of E k is denoted by p 1 (l), the local detection probability can be expressed by Since the PDF of E k is also regarded as a Gaussian distribution where the mean , where γ k is the received SNR at the k-th micro-sensing slot, the local detection probability can be given by

Sequential Detection
Building on the above spectrum sensing model in a cognitive IoT, we further present a sequential detection framework for CSS and make the following assumptions and descriptions: The IoT device S i receives a sequence of observations Z i k , and Z i k is i.i.d. and are independent of one another at a hypothesis, i = 1, 2. Under hypothesis H j , the observations from the i-th IoT device follow a marginal probability density function q (i) j .In addition, the probability of hypotheses H 0 and H 1 are 1 − ρ and ρ, respectively, a probability space is assumed to be (Ω, 1 and P 0 = P Each IoT device S i devises a sequential decision rule [25], T (i) is the time of stopping taking another sample, and θ (i) takes the value 0 or 1 to declare whether one of two hypotheses is accepted.

Distributed Sequential Detection
According to the above model, we delve into the distributed sequential detection for a cognitive IoT in this section, including the optimal sensing time and the optimal sequential detection.

Problem Formulation
To study the cost problem of distributed sequential detection, we define a cost function ∆ θ (1) , θ (2) ; H to indicate the cost of error in any one or both of the decisions made by a pair of IoT devices.To be specific, ∆ 0, θ (2) ; (2) ; H 0 , and ∆ 0, θ (2) ; H 1 ≥ ∆ 0, θ (2) ; H 0 .Similarly, the inequalities apply to θ (1) .From these inequalities, each additional sample of an IoT device also incurs a cost of c. Combining the time of stopping taking another sample and the cost function, there is a following decision problem, such as: inf (1) + cT (2) + ∆ θ (1) , θ (2) ; H .
Before solving (9), a sufficient statistic is preset as and the recursion result from Bayes' formula can be expressed as k q (1) with ρ (1) k forms a Markov process about the filtration F (1) k .Considering the finite horizon problem, the IoT device S 1 discontinues taking another sample and derives a decision not later than time τ.Let J τ k denote the minimal expected cost at the k-th micro-sensing slot, a dynamic programming equation.
The same holds true for ( 13), then we have k q (1) 0 (x) dx.In addition, we define a function with respect to ρ T (1)   , for all k = 0, . . .τ, there are inequalities about f (0) and f (1) which follow their respective definitions, i.e., and Moreover, the monotonicity results of J τ k (ρ) can be given by and since each of the left-hand quantities is a hypo-mundum on a larger set of sensing times than the corresponding right-hand quantity.

Optimal Sensing Time
To solve problem (9), we consider the limit τ → ∞ , the pointwise limit of J τ k exists and is independent of k.More specifically, we have Since CSS begins with two UAVs making decisions about the state of the PU signal within a defined sensing time, the collective sensing information from these UAVs leads to a comprehensive global decision regarding the state of the PU signal, adhering to a precise decision rule.To minimize decision costs, it is essential to determine the most opportune sensing time.To this end, we transform the initial problem (9) into (18), which aligns precisely with the dynamic programming equation (also known as Berman equation).In the dynamic programming equation, the long-term cost in a given sensing frame is equal to the cost from the current sensing time combined with the expected cost from the future actions taken at the following sensing time.Ultimately, we identify the optimal sensing time through this dynamic programming equation by following Theorem 1.
Theorem 1.The minimal expected cost on J(ρ) satisfies the dynamic programming equation [27] J(ρ) = min E ∆ 0, θ (2) ; H , E ∆ 1, θ (2) ; where The optimal sensing time is where a pair of thresholds ξ (1) L , ξ (1) U are described as ξ (1) and ξ (1) Proof of Theorem 1. Taking the limit of (13) and using ( 18) and ( 19) follows.The concavity of J derives from the limit of concave functions.Inequalities like ( 14) and ( 15) also hold.Utilizing these inequalities, the concavity of ∆ J , and J(ρ), the optimal sensing time is the threshold type, as shown in (20), where the threshold is determined by and U } This establishes the proposition.□

Optimal Decision Rule
Similar to an argument used in the proof of Proposition 7.4 [25], the uniqueness of the limit value function for (9) follows.Moreover, since the optimal thresholds ξ ( L and ξ (1) U are coupled from ( 14) and (15), two simultaneous dynamic programming equations should be solved.
Given a value of ∆ T (2) , θ (2) , the optimal local decision rule of the IoT device S 1 is derived, and vice versa.That is to say, when two IoT devices achieve their respective optimal decisions for each other's optimal decision rule, as a result, the global optimal decision rules can be iteratively implemented by continuously fixing the threshold of one IoT device and optimizing the threshold of the other by Theorem 1.
Finally, there are following processes at the optimal decision rule of the IoT devices S i , U , the decision rule continues taking another sample, where a pair of thresholds ξ at the per-IoT device are obtained by and where m and P (i) f are the tolerable miss detection probability and the tolerable false alarm probability, respectively.
A similar method can be utilized for the quickest detection problem.In such a problem, each of the IoT devices S j sequentially receives observations Z (j) k , then there exists a change point t following a geometric distribution with a mass at 0, and correspondingly there is a known marginal density q (j) 0 for k = 1, . . ., t − 1 and q (j) 1 for k = t, . ... Given the change point, IoT device observations are assumed to be conditionally independent, and they are valid within IoT devices and across IoT devices.Now, in order to quickly detect the change point and control the false alarm probability, each IoT device needs to optimally select sensing times T (i) (each measurable with respect to their own filtrations F (i) ) with the aim of minimizing E ∆ T (1) , T (2) ; t , where ∆ T (1) , T (2) ; t = ≥t} .Therefore, the optimal solution can be given by and where a pair of optimal thresholds ξ * 1 and ξ * 2 are coupled via a system of two dynamic programming equations.The term 1 {T (1) <t} 1 {T (2) <t} appears in the cost function that couples the solution.

Simulation Results
In this section, simulation results are introduced to corroborate the correctness and effectiveness of our proposal with respect to the global performance and the average cost of an IoT device.To this end, in 10 6 spectrum sensing frames, unless otherwise specified, some parameter settings are considered as follows: The number of micro-sensing slots is 20, the probability ρ of the hypothesis H 1 is 0.5, and the local detection probability and the local false alarm probability are set to be 0.6 and 0.4, respectively.Both the tolerable false alarm probability and the tolerable false alarm probability vary from 0.01 to 0.3 within an interval of 0.01.

Performance Analysis
Figure 2 illustrates the relationship between the global false alarm probability Q f and the tolerable false alarm probability P f under various tolerable miss detection probabilities.First of all, it can be seen that as the tolerable false alarm probability becomes more relaxed, the global false alarm probability shows a stepwise increase, and the larger the tolerable false alarm probability, the larger the gradient of the step.This is because for a fixed probability, an increase in the tolerable false alarm probability leads to a decrease in the upper threshold ξ U , and the sequential detection rule is easier to accept H 1 , which in turn results in an increase in the global false alarm probability.Meanwhile, it is worth noting that on the steps before the global false alarm probability jumps, although the tolerable false alarm probability continues to increase, the global false alarm probability remains unchanged.At this point, an increase in the initial sensing time does not bring about a change in the global false alarm probability; that is, an increase in observation does not bring about a change in the global false alarm probability, and the initial sensing time is the optimal sensing time.
Sensors 2024, 24, 688 9 of 14 accept ℋ , resulting in a decrease in the global miss detection probability.Furthermore, in such an environment, the global miss detection probability of a large tolerable miss detection probability decreases first because it increases the lower threshold  , i.e.,  = 0.2.In addition, similar to Figure 2, the steps before the global miss detection probability jumps indicate that although the tolerable false alarm probability continues to increase, the global false alarm probability remains unchanged.At this point, an increase in the initial sensing time does not bring about a change in the global miss detection probability; that is, an increase in observation does not bring about a change in the global miss detection probability, and the initial sensing time is the optimal sensing time.Moreover, the impact of the tolerable miss detection probability on the global false alarm probability can be neglected at the beginning.That is to say, the thresholds (ξ L , ξ U ) of the sequential detection rule are still not satisfied.But as the tolerable false alarm probability increases, the impact of the tolerable missed detection probability becomes more and more obvious.To be specific, the larger the tolerable miss detection probability, the faster the global false alarm probability jumps.Apparently, the larger the tolerable miss detection probability, the larger the upper threshold ξ U , resulting in a more acceptable H 1 .
Under various tolerable miss detection probabilities, the relationship between the global miss detection probability Q m and the tolerable false alarm probability P f is shown in Figure 3.In contrast to Figure 2, the tolerable false alarm probability has a greater effect on the global miss detection probability than the global false alarm probability, and the effect is positive.In details, when the tolerable false alarm probability increases from 0.01 to 0.3, correspondingly, the global miss detection probability basically goes down from 0.95 to 0.22.Since the lower threshold ξ L increases as the tolerable false alarm probability increases according to (25), the sequential detection rule is prone to accept H 0 , resulting in a decrease in the global miss detection probability.Furthermore, in such an environment, the global miss detection probability of a large tolerable miss detection probability decreases first because it increases the lower threshold ξ L , i.e., P m = 0.2.
In addition, similar to Figure 2, the steps before the global miss detection probability jumps indicate that although the tolerable false alarm probability continues to increase, the global false alarm probability remains unchanged.At this point, an increase in the initial sensing time does not bring about a change in the global miss detection probability; that is, an increase in observation does not bring about a change in the global miss detection probability, and the initial sensing time is the optimal sensing time.
Next, we further take the impact of the tolerable miss detection probability on global performance given a fixed tolerable false alarm probability into consideration.As displayed in Figure 4, regardless of the tolerable miss detection probability, it is obvious that a large tolerable false alarm probability leads to a low upper threshold ξ U , therefore being prone to accept H 1 .However, it also should be noted that as the tolerable miss detection probability increases, the global false alarm probability under different tolerable false alarms has jitter at different positions, such as jitter up at P f = 0.05, 0.1, 02 and jitter down when P f = 0.2.This is not a surprise and is a direct result of the fact that a pair of tolerable probabilities simultaneously change and the decision condition is reached within a certain sensing time.
In addition, similar to Figure 2, the steps before the global miss detection probability jumps indicate that although the tolerable false alarm probability continues to increase, the global false alarm probability remains unchanged.At this point, an increase in the initial sensing time does not bring about a change in the global miss detection probability; that is, an increase in observation does not bring about a change in the global miss detection probability, and the initial sensing time is the optimal sensing time.Next, we further take the impact of the tolerable miss detection probability on global performance given a fixed tolerable false alarm probability into consideration.As displayed in Figure 4, regardless of the tolerable miss detection probability, it is obvious that a large tolerable false alarm probability leads to a low upper threshold  , therefore being prone to accept ℋ .However, it also should be noted that as the tolerable miss detection probability increases, the global false alarm probability under different tolerable false alarms has jitter at different positions, such as jitter up at  = 0.05, 0.1, 02 and jitter down when  = 0.2.This is not a surprise and is a direct result of the fact that a pair of tolerable probabilities simultaneously change and the decision condition is reached within a certain sensing time.
Similar to the global miss detection probability in Figure 4, given the tolerable false alarm probability, the positive impact of the tolerable miss detection probability is illustrated in Figure 5.In particular, the trend of the global miss detection probability is exactly opposite to that of the global false alarm probability, and the change interval is larger.There is no doubt that the tolerable miss detection probability makes the lower threshold  smaller so that ℋ is easier to accept.
Following the joint impact of the tolerable performance metrics on the global performance, we further simulate the optimal cost of the tolerable performance under various costs of each observation taken, where the cost of each observation taken  is set to be 0.1 and 1.As shown in Figure 6, for a pair of fixed-tolerable performances, the larger the cost of each observation taken, , the larger the average cost.Moreover, as the tolerable false alarm probability increases, the average cost decreases.This is to say, an increasing tolerable false alarm probability makes the lower/upper threshold larger/smaller, resulting in the global decision being difficult to make.Consequently, the sensing time increases.However, the increasing tolerable false alarm probability also makes the global miss detection probability decrease, as shown in Figure 3.As a result, the global miss detection probability dominates the average cost because the cost of miss detection decreases.Similar to the global miss detection probability in Figure 4, given the tolerable false alarm probability, the positive impact of the tolerable miss detection probability is illustrated in Figure 5.In particular, the trend of the global miss detection probability is exactly opposite to that of the global false alarm probability, and the change interval is larger.There is no doubt that the tolerable miss detection probability makes the lower threshold ξ L smaller so that H 1 is easier to accept.Similar to Figure 6, the higher cost of each observation in Figure 7 leads to a higher average cost.In line with the global miss detection probability depicted in Figure 5, the average cost follows.The simulation result also confirms once again that global missed detection dominates the average cost.In summary, following the PBPO methodology, the optimal sequential detection rule can be reached as the sensing environments to minimize the cost at an IoT device.Following the joint impact of the tolerable performance metrics on the global performance, we further simulate the optimal cost of the tolerable performance under various costs of each observation taken, where the cost of each observation taken c is set to be 0.1 and 1.As shown in Figure 6, for a pair of fixed-tolerable performances, the larger the cost of each observation taken, c, the larger the average cost.Moreover, as the tolerable false alarm probability increases, the average cost decreases.This is to say, an increasing tolerable false alarm probability makes the lower/upper threshold larger/smaller, resulting in the global decision being difficult to make.Consequently, the sensing time increases.However, the increasing tolerable false alarm probability also makes the global miss detection probability decrease, as shown in Figure 3.As a result, the global miss detection probability dominates the average cost because the cost of miss detection decreases.Similar to Figure 6, the higher cost of each observation in Figure 7 leads to a higher average cost.In line with the global miss detection probability depicted in Figure 5, the average cost follows.The simulation result also confirms once again that global missed detection dominates the average cost.In summary, following the PBPO methodology, the optimal sequential detection rule can be reached as the sensing environments to minimize Similar to Figure 6, the higher cost of each observation in Figure 7 leads to a higher average cost.In line with the global miss detection probability depicted in Figure 5, the average cost follows.The simulation result also confirms once again that global missed detection dominates the average cost.In summary, following the PBPO methodology, the optimal sequential detection rule can be reached as the sensing environments to minimize the cost at an IoT device.

Performance Comparision
Following the proposed sequential detection and the tolerable miss detection probability  = 0.3, the performance comparison with classical sequential detection and Neyman-Pearson (N-P) is further promoted in the following Figure 8. Firstly, we can see that both the false alarm and miss detection probabilities of N-P are basically not affected by the increase in tolerable false alarm probability, and they are basically fixed at 0.42 and 0.18, respectively.This is because N-P is a fixed-sample-size rule (with the tolerable false alarm probability as a single threshold), and the required sensing time is also fixed.When taking the optimal sensing time of the proposed sequential detection rule as the stopping time of N-P, its performance will not be affected by a single threshold because the tolerable false alarm probability as a threshold may be too large or too small.Secondly, compared with N-P, two sequential detection rules are affected by both tolerable false alarm and miss detection probabilities.Figure 8 shows that the tolerable false alarm probability gradually increases, the global false alarm probability gradually increases, and the missed detection probability gradually decreases in a stepwise manner.However, after optimization, the sequential detection rule, whether in terms of false alarm probability or missed detection probability, has less performance than the classic one.That is to say, under the same sensing time (the optimal sensing time), the sequential detection performance proposed in this paper is the best.Finally, it should be noted that as the tolerable false alarm probability increases, that is, the probability of deciding that the PU is present also increases, so the global false alarm probability also increases.At the same time, the false alarm probability decreases.It can also be seen that there is a trade-off between false alarm and miss detection probabilities.
In addition to the above results, other rules of the same type (such as Bayesian detection) cannot meet the performance comparison under the influence of the miss detection probability with a fixed false alarm probability.In addition, the comparison of average cost can also be seen from the performance of N-P, because the only difference between Bayesian detection and N-P is the threshold.Therefore, under the same local decision cost, the average cost of N-P is still higher than that of the proposed sequential detection rule.

Performance Comparision
Following the proposed sequential detection and the tolerable miss detection probability P m = 0.3, the performance comparison with classical sequential detection and Neyman-Pearson (N-P) is further promoted in the following Figure 8. Firstly, we can see that both the false alarm and miss detection probabilities of N-P are basically not affected by the increase in tolerable false alarm probability, and they are basically fixed at 0.42 and 0.18, respectively.This is because N-P is a fixed-sample-size rule (with the tolerable false alarm probability as a single threshold), and the required sensing time is also fixed.When taking the optimal sensing time of the proposed sequential detection rule as the stopping time of N-P, its performance will not be affected by a single threshold because the tolerable false alarm probability as a threshold may be too large or too small.Secondly, compared with N-P, two sequential detection rules are affected by both tolerable false alarm and miss detection probabilities.Figure 8 shows that the tolerable false alarm probability gradually increases, the global false alarm probability gradually increases, and the missed detection probability gradually decreases in a stepwise manner.However, after optimization, the sequential detection rule, whether in terms of false alarm probability or missed detection probability, has less performance than the classic one.That is to say, under the same sensing time (the optimal sensing time), the sequential detection performance proposed in this paper is the best.Finally, it should be noted that as the tolerable false alarm probability increases, that is, the probability of deciding that the PU is present also increases, so the global false alarm probability also increases.At the same time, the false alarm probability decreases.It can also be seen that there is a trade-off between false alarm and miss detection probabilities.

Conclusions
In this article, we delved into the distributed sequential detection rule for CSS in the context of cognitive IoTs.To begin, we established a spectrum sensing model within the periodic spectrum sensing frame structure and presented a sequential detection framework.Based on this framework, we defined the sensing time and cost functions for IoT devices and formulated an optimization problem regarding average cost.Furthermore, we employed the PBPO method to solve this finite horizon problem, enabling us to analyze the optimal sensing time for optimal sequential detection.Finally, through a series of numerical simulations, we demonstrated the accuracy and effectiveness of our proposed sequential detection rule in terms of sensing time and thresholds.In addition to the above results, other rules of the same type (such as Bayesian detection) cannot meet the performance comparison under the influence of the miss detection probability with a fixed false alarm probability.In addition, the comparison of average cost can also be seen from the performance of N-P, because the only difference between Bayesian detection and N-P is the threshold.Therefore, under the same local decision cost, the average cost of N-P is still higher than that of the proposed sequential detection rule.

Conclusions
In this article, we delved into the distributed sequential detection rule for CSS in the context of cognitive IoTs.To begin, we established a spectrum sensing model within the periodic spectrum sensing frame structure and presented a sequential detection framework.Based on this framework, we defined the sensing time and cost functions for IoT devices and formulated an optimization problem regarding average cost.Furthermore, we employed the PBPO method to solve this finite horizon problem, enabling us to analyze the optimal sensing time for optimal sequential detection.Finally, through a series of numerical simulations, we demonstrated the accuracy and effectiveness of our proposed sequential detection rule in terms of sensing time and thresholds.

Figure 1 .
Figure 1.The periodic spectrum sensing frame structure of a cognitive IoT.

Figure 1 .
Figure 1.The periodic spectrum sensing frame structure of a cognitive IoT.
of P j to the corresponding filtrations

Figure 2 .
Figure 2. The global false alarm probability vs. the tolerable false alarm probability.

Figure 2 .
Figure 2. The global false alarm probability vs. the tolerable false alarm probability.

Figure 3 .
Figure 3.The global miss detection probability vs. the tolerable false alarm probability.

Figure 4 .
Figure 4.The global false alarm probability vs. the tolerable miss detection probability.

Figure 4 .
Figure 4.The global false alarm probability vs. the tolerable miss detection probability.

Figure 5 .
Figure 5.The global miss detection probability vs. the tolerable miss detection probability.

Figure 6 .
Figure 6.The average cost vs. the tolerable false alarm probability under various costs of each observation taken.

Figure 5 .
Figure 5.The global miss detection probability vs. the tolerable miss detection probability.

Sensors 2024 , 14 Figure 5 .
Figure 5.The global miss detection probability vs. the tolerable miss detection probability.

Figure 6 .
Figure 6.The average cost vs. the tolerable false alarm probability under various costs of each observation taken.

Figure 6 .
Figure 6.The average cost vs. the tolerable false alarm probability under various costs of each observation taken.

Sensors 2024 , 14 Figure 7 .
Figure 7.The average cost vs. the tolerable miss detection probability under various costs of each observation taken.

Figure 7 .
Figure 7.The average cost vs. the tolerable miss detection probability under various costs of each observation taken.

Figure 8 .
Figure 8.The global false alarm and miss detection probabilities of three rules vs. the tolerable false alarm probability.

Figure 8 .
Figure 8.The global false alarm and miss detection probabilities of three rules vs. the tolerable false alarm probability.