# Research on Distributed Cooperative Intelligent Spectrum Sensing of UAV Cluster

Authors: Wensheng Chi; Hai Wang; Wenjun Xie; Peng Zhang; Le Ru
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

Spectrum sensing is important to improving the survivability of unmanned aerial vehicles (UAVs) in complex electromagnetic environments. At a low signal-to-noise ratio (SNR), a UAV cluster has more prominent advantages in cluster distributed cooperative sensing than a single UAV. Aiming at this urgent need, joint optimal design is carried out for adaptive spectrum sensing algorithm and distributed estimation algorithm to realize the distributed cooperative intelligent spectrum sensing of UAV cluster. In this paper, the adaptive theory is analyzed first, and the performance of the conventional energy-aware sensing method and the least mean square (LMS) spectrum sensing algorithm is compared. In a complex electromagnetic environment, it is proposed to replan the real-time network by deleting erroneous data nodes in order to eliminate parameter estimation deviations caused by data errors. Under the condition of ensuring detection probability, the fast spectrum sensing algorithm based on SNR estimation is optimized by adaptively selecting and setting the SNR threshold to solve the problem of complex and slow calculation. The superiority of distributed spectrum estimation algorithm without erroneous data nodes is verified at a low SNR, showing that the algorithm has a good steady-state error curve and avoids the impact of data errors on detection results. In addition, the effectiveness of optimizing the fast spectrum sensing algorithm by selecting and setting the SNR threshold is verified to improve the distributed cooperative intelligent spectrum sensing rate of UAV cluster.


---

## Body

## 1. Introduction

UAV cluster is an important operational form in the future information battlefield. A single UAV needs to contact other UAVs while completing specified instructions. This is conductive to information sharing and accurate estimation but also poses higher requirements for the communication technology and communication payloads of UAVs. The electromagnetic environment in the battlefield is particularly complex, and extreme weather, electromagnetic interference, and cyberattack may pose serious threat to the communication system of UAV cluster, resulting in decline in the credibility of signal transmission and inability of UAVs to communicate properly, which in turn may cause failure to complete missions. Therefore, it is necessary and urgent to maintain the stability of UAV communication network for a long time.The electromagnetic environment in modern battlefields is extremely complicated. The whole space is filled with various radio signals, resulting in the crowding of spectrum resources. How to search and use the spectrum resources which are in good communication condition and not used in a wide range of spectrums is very important to improving the communication quality between UAVs and fully utilizing the combat power of UAV cluster.Cognitive radio is the key technology to alleviate the current shortage of spectrum resources, and spectrum sensing is one of the core technologies of cognitive radio. At present, it is a common method to search stable channels by means of data fusion to filter spectrum resources in the environment. In order to solve the problem of data fusion between network nodes of users with different reputations, Zhang et al. regarded each user as an agent and selected cooperative user from neighboring individual to carry out consensus fusion by using reinforcement learning algorithm. Users with low reputation were gradually filtered out by the sensing network. Finally, a consensus fusion method was used to reach a consensus throughout the network, which was then compared with the decision threshold to complete the cooperative spectrum sensing [1]. According to the networking characteristics of the distributed cognitive network, Li et al. proposed a MAC layer superframe structure for intersection operation, which improved the performance of the whole cognitive network with the support of this structure. Based on the spectrum sensing of secondary users and the accumulation and analysis of channel usage, an intelligent spectrum library of secondary users was established to provide policy support for the channel access of secondary users [2]. Song et al. studied and proposed a cluster-based cooperative spectrum sensing algorithm applied in emergency communication scenarios. By dividing nodes in the network into several clusters, data fusion based on two levels of multiuser cooperation is completed within and between clusters to reduce the influence of channel attenuation, improve the accuracy of its spectrum sensing, and effectively solve the problem of emergency communication in case of sudden disasters [3]. Li proposed a spectrum sensing algorithm based on credibility data fusion, which effectively fused two traditional frequency estimation algorithms. Based on the degree of credibility, the frequency values calculated from multiple paths were comprehensively estimated. This method greatly improved the detection accuracy, reduced the rate of misjudgment, and expanded the spectrum sensing range [4]. Wang et al. analyzed the situation under nonsecure conditions in the study of distributed adaptive networks. The impact of malicious nodes on global estimation was reduced using an algorithm, assumption and summary were conducted on the attack model, the MF-DLMS algorithm was proposed based on median filtering, and the shortcomings of MF-DLMS algorithm in the face of the changing number of nodes and the dynamic structure of network were identified. On this basis, the ODD-DLMS algorithm with better adaptability was proposed to improve algorithm performance through data detection and early warning [5]. Li studied the distributed LMS algorithm with variable step size and proposed a new componentwise diffusion LMS algorithm with variable step size. The algorithm was compared with the traditional LMS algorithm and similar algorithms in the case of coefficient parameter estimation. On this basis, an improved algorithm that can effectively suppress impulse noise was proposed [6]. In view of the complex electromagnetic environment in which UAVs perform their missions, Zhang and Deng proposed a spectrum sensing algorithm for UAVs based on SNR estimation. Firstly, the SNR environment was estimated, and then, a more appropriate basic sensing algorithm was selected to ensure the detection performance in low SNR environments [7].


## 2. Distributed Network Architecture and Data Fusion Algorithm for UAV Cluster

A UAV cluster control structure can be divided into centralized and distributed basic network control structure depending on the internal communication mode of the cluster.The main characteristics of a centralized control network are as follows: there is a unique central node inside the system, which integrates, judges, and distributes all information and has the highest decision-making power and control over the entire UAV cluster system. The main disadvantages of this network communication mode are as follows: when the amount of information in the UAV cluster system is too large, the data processing of the central node will fall into a bottleneck, and it is difficult to meet the requirements of the system. Once the central node is damaged, the cluster system will be paralyzed. The main characteristics of the distributed control network are as follows: the status of all UAVs in the cluster system is equal, and all UAVs perceive the surrounding environment, make a preliminary estimate of the target, and cooperate through information interaction. However, the algorithm of distributed network is more complex. It requires UAVs to have strong adaptability and is suitable for controlling UAV clusters with certain communication basis and mature technology at a certain scale. In distributed network mode, data fusion can be used to improve the reliability of spectrum sensing. Multiple UAV nodes detect the spectrum, conduct local screening and processing, and then integrate the data to improve the accuracy of spectrum sensing.UAV cluster cooperation requires UAVs to communicate with each other to share effective information and resources and expand the area of cooperation. The control structure of the cooperative network for UAV cluster cooperation has two basic forms: centralized structure and distributed structure.A centralized network has a unique central node, which integrates, judges, and distributes all the information, has the highest decision-making power and control power, and presents the relationship between the main UAV and subordinate UAVs; that is, subordinate UAVs act as per the instructions transmitted by the main UAV. The advantages and disadvantages of this type of network communication are prominent. In a distributed network, each UAV has no obvious principal-subordinate relationship as in the centralized network, and it is more to complete its own functions independently. UAVs autonomously perceive the environment, make preliminary estimate of the target, and then connect with each other when cooperation is needed. However, the algorithm of distributed network is complex and requires adaptive ability of UAVs. It is suitable for UAV cluster which is controlled under certain scale and has certain communication basis and relatively mature technology. In the distributed network mode, the reliability of spectrum sensing can be improved by data fusion, and multiple UAV nodes detect the spectrum, conduct local screening and processing, and then integrate the data to improve the accuracy of spectrum sensing.The three topological structures shown in Figure1 are common distributed structures, namely, incremental network, diffusion network, and probabilistic diffusion network. In an incremental network, nodes are connected through an end-to-end ring where data is constantly transferred. The topology of a probabilistic diffusion network is the same as that of a diffusion network; that is, information is exchanged and processed between nodes and neighboring nodes. Diffusion network has attracted the attention of many scholars at home and abroad for its robustness and reliability, and a number of distributed estimation algorithms have been developed to solve practical problems.Figure 1
Common models of distributed network.


## 3. Energy Spectrum Sensing Algorithm

An unmanned aircraft system (UAS) consists of aircraft platform, ground station, and data link, of which the data link is responsible for data transmission and receiving of UAVs. Whether the important information between platforms can be transmitted smoothly influences the completion of the combat mission. For UAV clusters, an air-to-air link is needed in addition to the ground-to-air link. However, signals are often interfered in the air. Spectrum sensing plays an important role in UAV communication. To find a stable and available channel, it is necessary to detect and utilize the spectrum resources in space. UAV cluster perceives the battlefield environment in a distributed manner, detects the spectra in space by cooperating with each other, and makes effective use of idle spectra.There are a large number of radio signals in space, and different signals occupy different spectra. In fact, the spectra in space are not occupied all the time, and those not occupied are available for use, provided that the use of such spectra does not affect the communication of their primary users. To determine whether this condition is satisfied more accurately, it is necessary to detect the spectra. A binary state assumption is used to describe the channel occupancy:(1)H1:di=h∗m+niH1:di=ni,where h is the transmission capacity of the channel, i.e., the channel gain, m is the radio signal sent to the space by primary users, ni is an additive white Gaussian noise with a mean of 0 and a variance of σn2, and di represents the signal that can be received by secondary users. It is clear that H1 means that the channel is occupied by primary users and is not available to secondary users for the moment. H0 means that the primary users in the channel do not transmit information. To facilitate calculation, the channel gain h and the signal m sent by primary users remain unchanged.The common methods of spectrum sensing include energy detection, matched filter detection, and cyclostationary characteristic detection. Energy detection is the most common and most widely used spectrum sensing algorithm. Energy detection is a noncoherent detection method that eliminates the need to know the statistical characteristics of signals. In this algorithm, discrete sampling is performed for collected signals, the statistic value of energy is calculated, and the corresponding decision threshold is set. After comparison, the channel occupancy can be determined.If sampling is conducted for received signals, andN is the number of sampling points, the statistic KED of energy detection can be expressed as
(2)KED=∑i=0Ndi2.The decision thresholdγ is set in advance. If KED>γ, H1 is established; if KED<γ, H0 is established. γ is related to the preset false alarm probability Pf. The statistic of KED conforms to Gaussian distribution. When there are enough sampling points, KED can be simplified to normal distribution based on the central limit theorem. According to the above analysis, the relationship between detection probability Pd and γ can be obtained as [5]
(3)Pd=Qγ−Nσn2−Nσd2σn22Nσn2+4Nσd2.σd is the average energy of user signals and σn2 is the average energy of noise. Where Qx=1/2π∫x+∞e−ω2/2dω, the decision threshold γ when the specific Pf is satisfied is as follows:
(4)γ=Nσn2+σn22NQ−1Pf.It can be seen that the test statistic of the conventional energy algorithm is the superposition of signal energy and noise energy. Assuming that the signal amplitude can be directly estimated, it will be easier to obtain the energy of signals of primary users and therefore is conducive to more accurate spectrum sensing.


## 4. Distributed Spectrum Sensing of UAV Cluster Based on Diffusion Strategy

The nodes of UAV cluster form a distributed network and are connected with neighboring nodes. The whole network structure is represented by an undirected graphG=V,B, where V=1,2,3,⋯,N represents a set of nodes and B=l,k∣l,k∈D represents a set of interconnected links between nodes in Figure 2. When nodes l and k belong to the set elements of V and can be linked to each other, nodes l and k are called neighboring nodes. The number of neighboring nodes of node k is represented by Nk.Figure 2
Network structure of random nodes.In the diffusion algorithm, neighboring nodes transfer information based on certain weights, and nodes estimate the collected and transmitted information according to the weights. The selection of fusion weights is closely related to the speed and convergence performance of the algorithm. Nodes can only exchange data with neighboring nodes, and there is no way to obtain global information directly. Therefore, fusion weights should be selected based on the specific connection of surrounding nodes. Several common fusion weight criteria are shown in Table1.Table 1
Common fusion criteria.
Fusion criterionWeightcl,k,l∈Nk and l≠kNoncooperative0Proximity criterion1/NkMetropolis criterion1/maxNk,NlCriterion of relative degrees of freedomNl/∑m∈NkNmCriterion of variance of relative degrees of freedomNlσv,l2/∑m∈NkNmσv,l2It can be seen that the fusion weightcl,k is directly related to the network topology and is influenced by the number of neighboring nodes. For the convenience of calculation and the stability of the algorithm, the Metropolis criterion is used as the calculation criterion of fusion weights.The steps of the algorithm are as follows:Step 1.
Initialization.
Firstly, detect the signal in space locally through the cognitive nodek and obtain its own observed value δik of the environment.Step 2.
Diffusion-weighted fusion.
At timei, the cognitive node k conducts diffusion clkδik with neighboring nodes based on its own observed value δik according to the selected fusion weights and obtains an estimated value x^=∑l∈Nkclkδil.Step 3.
Decision.
Make decision on the estimated valuex^.
(5)θ=H1,x^>ε,H0,x^<ε,where ε is the decision threshold.In the absence of primary user, it is decided asH0. In this case, there is only noise in the channel. But in fact, the spectrum sensor is not always accurate. According to the theory of detection, it can be divided into false dismissal probability, false alarm probability, and detection probability.
(1)
False dismissal probabilityPm: when a primary user exists, the probability that the sensor makes a decision as H0, that is, the probability of deciding as nonexistence, is the false dismissal probability. If the false dismissal probability is too high, the sensor may use the channel as if there is no primary user in the channel, causing interference to the signal of primary user(2)
False alarm probabilityPf: the probability that the sensor decides as existence when no primary user exists. Too high false alarm probability will result in a waste of spectrum resources, because the decision device always makes a decision H1 on the channel so that the channel cannot be used effectively(3)
Detection probabilityPd: the probability of deciding as H1 when a primary user exists is the probability of effective detection. For the spectrum sensor, the detection probability represents the performance of the sensor and relates to the utilization rate of spectra. Thus, it follows that Pd=1−Pm


## 5. Distributed Spectrum Sensing LMS Algorithm Based on Diffusion Strategy

The distributed diffusion spectrum sensing algorithm can integrate the data of nodes and make the data more accurate and reliable to a certain extent. However, a single spectral energy sensor will be interfered while detecting the spectral energy in space, resulting in errors between the received data and the desired signal. Such errors will be alleviated in the process of diffusion, but they have a certain impact. In such case, the function of self-adaptation is particularly important. The sensor node first performs local self-adaptation to the acquired data, then performs fusion estimation through diffusion effect, and finally forms a decision. This is helpful to improve the accuracy. Therefore, this paper presents an LMS spectrum sensing algorithm based on diffusion strategy to decide the signal spectra in space and improve the communication quality.


### 5.1. Algorithm Principle

#### 5.1.1. Distributed Diffusion LMS Spectrum Sensing

In this paper, the amplitude of signal energy is used as the object of estimation and the test statistic of the algorithm. Assuming that the network consists ofN nodes, k∈1,2,3,⋯,N, h is the channel gain, and assuming that the channel gain is a constant, that is, the channel gain does not change, it follows that
(6)dki=h∗m+niH1,dki=niH0,where dki is the observed quantity of node k at time i and m is the signal sent by the primary user. ni represents a noise signal with a mean of 0 and a variance of σn2. Take eki as the error between the actual value and the estimated value xi−1 of the signal at the ith iteration of node k:
(7)eki=di−h∗xi−1.According to the LMS principle, it follows that(8)xi=xi−1+uh∗eki,where u is the step size of the LMS algorithm, which controls the convergence performance of the algorithm and has a value range as follows:
(9)0<μ<2τ,where τ is replaced by the largest eigenvalue of the autocorrelation matrix of the transmitted signal. Therefore, the iterative formula of the whole algorithm can be expressed as
(10)φik=wi−1k+uh∗di−h∗wi−1k,(11)wik=∑l∈Nkcl,kφil.Equation (10) is the adaptive process in algorithm iteration. φikk is an intermediate estimated value obtained by sensor node k through adaptive steepest gradient descent of the difference between the last fusion result wi−1k and the desired signal. Then, equation (11) fuses the intermediate estimated value φikk∈N of each surrounding node through the diffusion weight matrix according to the previously selected fusion criterion and obtains the fused estimated value wik. The weight coefficient cl,k is nonnegative and has a value only when cl,kl∈Nk is satisfied. In other cases, it is 0, indicating that no node is connected and no data fusion is conducted.The fused estimated value is compared with the decision thresholdε. If wik>ε, it is decided as H1, indicating that the channel is temporarily unavailable. If wik<ε, it is decided as H0, indicating that the primary user sending the signal does not occupy the channel and the channel can be used for the time being.Since the mean value of noiseni is 0 and the variance is σk,i2, wik should also conform to normal distribution, i.e.,
(12)xi=Na0,σ0H0,Na1,σ1H1,where
(13)a0=0,a1=∑i=0n1−uhi−1uhm,σ02=σ12=∑i=0n1−uh2i−1u2hσn2.It is known from [19] that
(14)Pd=Qε−∑i=1n1−uhi−1uhm∑i=1n1−uh2i−1u2hσn2.When a false alarm probabilityPf is given, its decision threshold ε is
(15)ε=∑i=1k1−uh2i−1u2hσn2Q−1Pf.


#### 5.1.2. Strategy Selection

The distributed least mean square (DLMS) algorithm based on diffusion consists of two basic steps: local data adaptation and diffusion-weighted fusion of data. The data can be fused with surrounding nodes based on the diffusion weight after local adaptive processing, or diffusion weighed fusion can be directly conducted through the information collected by each node. Then, the node conducts adaptive processing based on the fused estimated value obtained. The above two strategies are, respectively, called ATC (Adaptive-Then-Combine) DLMS and CTA (Combined-Then-Adapt) DLMS. The steps of the algorithm of ATC strategy have been analyzed before and are no longer repeated here. The formula is as below:(16)φik=wi−1k+uh∗di−h∗wi−1k,wik=∑l∈Nkcl,kφil.Based on the strategy of CTA,φik is diffused in accordance with the criterion of weight matrix to obtain the estimated value. Then, adaptive processing is carried out based on the error between the estimated value obtained by diffusion-weighted fusion and the value of previous moment and the desired signal to obtain the estimated value wik after processing. Next, wik is compared with the decision threshold ε to judge the channel occupancy and improve the channel utilization rate.In the CTA DLMS algorithm, the new value is estimated by the local iterative adjustment result of the node itself, while in the ATC DLMS algorithm of first adaptation and then fusion, the value of multinode diffusion-weighted fusion is taken as the updated value. This difference also makes the latter superior to the former in steady-state performance and convergence rate [6]. Based on such advantages, the simulation methods in this paper are all based on ATC implementation.
(17)φi−1k=∑l∈Nkcl,kwi−1l,wik=φi−1k+uh∗di−h∗φi−1k.


### 5.2. Distributed Estimation Based on Erroneous Data Elimination

In most algorithms related to distributed estimation, it is assumed that the whole network is in a stable condition without data error. However, in practice, UAV nodes may have substantial deviations due to their own problems or external factors. The erroneous data is diffused through the network, and each iteration of the diffusion will transfer the erroneous data in the network and seriously affect the performance of the whole distributed estimation. For distributed estimation, the impact of data diffusion of such erroneous nodes has greatly reduced the performance advantage of a distributed structure, and its overall estimation performance is even far inferior to that of a single node. Therefore, it is important to distinguish erroneous nodes and reduce the impact of erroneous data on the algorithm performance.


#### 5.2.1. Erroneous Data Model

The UAV network transmits and diffuses data through the connection between nodes. When a node has an error, the data will follow the network to diffuse into the estimated values of each node. Assuming that the observed data obtained by the UAV isdi, which contains noise ni, but the observed value is wrong due to data processing of the UAV itself, the erroneous data di can be expressed as
(18)di=ϑhm+ni,where ϑ is a scaling factor for controlling erroneous data and the magnitude of ϑ influences the deviation between the observed value di and the actual value. If ϑ=1, it means that the node has no error, and its observed value di is normal and can be used normally. The erroneous data causes the estimated value in the fusion and diffusion stage to change towards the direction of ϑ and deviate from the normal estimation range.


#### 5.2.2. Erroneous Data Judgment Model

The ground station system is used to monitor and track the state of the whole UAV cluster when UAVs are in cluster operation. The ground station has a clear picture of the current state of each UAV, including the number of UAVs that have made an error. It is assumed that under the condition of knowing the number of erroneous nodes, the specific UAV is judged and erroneous UAV nodes are distinguished, so that the node data can be processed conveniently in the following algorithm. Assuming that the sequence number of UAVs isk, k∈1,2,3,⋯,N, and the received data is d1i,d2i,d3i,d4i⋯ at time i, first sort the k pieces of data at time i, and the data of erroneous node will enlarge by default, that is, ϑ>1. Then, filter the k pieces of data. Since the number of erroneous nodes has been known, the erroneous data is most likely to appear at the end of the sort. Extract the data at upper end, and mark the node of the corresponding data as erroneous node.


#### 5.2.3. Algorithm Steps

(1)
Data judgmentThe UAV node collects a set of observed datad1i,d2i,d3i,⋯,dNi at time i and sorts this set of data to obtain an ascending order sequence. The last z pieces of data in the sequence are labeled according to the number z of nodes known to be erroneous, and corresponding records are made.
(2)
Replanning of weightsAfter the informationM of erroneous node is obtained, the connection structure of the UAV will change, and the information of the node determined to be erroneous will be isolated and disconnected and no information will be exchanged or fused with it. At this point, the values of the diffusion matrix cl,k need to be readjusted.
(3)
Fusion estimationAfter the weight of the diffusion matrix is redetermined at timei, local adaptation is conducted on the data of remaining security nodes by the above-mentioned distributed fusion and diffusion estimation method, the LMS algorithm with the steepest gradient is used for estimation, and then, weighted fusion is conducted based on the new cl,k to obtain the estimated value wik.After the information of erroneous nodes is eliminated, it is possible to effectively guarantee the overall data stability and prevent deviations of the estimated values due to erroneous data which may degrade the algorithm performance in steady state.


### 5.3. Fast Spectrum Sensing Algorithm Based on SNR Estimation

A detection method based on energy is extremely sensitive to the condition of SNR spectrum sensing. It estimates the occupation state of a channel by detecting whether the relationship between the signal energy and the noise energy in the channel satisfies its decision condition. It can be known from the foregoing discussion that a single-point LMS spectrum sensing algorithm already can estimate the spectrum information accurately at a low SNR, and the accuracy of distributed spectrum sensing based on diffusion strategy is further improved. However, distributed cooperation makes the algorithm computationally intensive and the parameter estimation process slow, while in a rapidly changing battlefield environment, time relates to the success or failure of the war. To reduce the time complexity of spectrum sensing algorithm while ensuring its accuracy, a fast spectrum sensing algorithm based on SNR estimation is proposed. Whether UAVs adopt single-point LMS spectrum sensing or distributed diffusion cooperative spectrum sensing is determined based on the set threshold of SNR, thus effectively solving the problem of slow running of the distributed cooperative sensing algorithm under a better SNR condition.


#### 5.3.1. Process of Algorithm

The fast spectrum sensing algorithm based SNR estimation was aimed at solving the problem of slow running of spectrum sensing algorithm in a better communication environment. Firstly, in Figure3, the corresponding SNR is obtained by comparing the sampled energy mean value of the collected signal to be detected and the noise signal. At the same time, the algorithm needs a SNR threshold determined based on experience. This threshold is inferred from a large amount of experimental data; that is, the selected algorithm is acceptable in detection performance at this threshold. To shorten the detection time, this threshold is used to select the corresponding spectrum sensing algorithm.Figure 3
Process of algorithm.For this algorithm, its threshold plays an important role. When the estimated SNR is greater than the threshold, it can be considered that the current channel is in good condition, and a faster LMS detection algorithm can be used. On the contrary, when the estimated SNR is smaller than the threshold, it can be inferred that the signal is weak in the current environment, and a single-point LMS algorithm is not enough to meet the communication requirement. In this case, a more reliable distributed detection algorithm with a higher detection probability is needed to estimate the spectrum state.Set a desired detection probabilityP¯d in Figure 4. If the actual detection probability Pd is greater than expected, it indicates that the channel condition has satisfied the communication requirement, and the computing resources can be optimized by adjusting the threshold; if the actual detection probability Pd is less than expected, it indicates that the detection algorithm cannot meet the communication requirement under the current SNR condition, the threshold needs to be adjusted, and a suitable algorithm for low SNR is needed to obtain more accurate parameter estimation. Therefore, the expression for threshold adjustment is set as
(19)βi+1=βi+n∗P¯d−Pd,where βi represents the ith threshold, n is the adjustment factor, and n>0; the magnitude of n determines the adjustment speed of the threshold.Figure 4
Process of threshold adjustment.


#### 5.3.2. SNR Estimation

SNR is an important parameter to reflect the channel state, and an energy-based spectrum sensing method requires a high SNR. SNR estimation is not only a judgment of the surrounding communication environment but also a basic step in the whole algorithm.To estimate SNR, it is required to calculate the ratio of energy mean between the signal to be detected and the noise sampling point first:(20)Esnr=PsPw=1/N∑n=1Nyn21/N∑n=1Nwn2,where Ps is the power of the detected signal to be estimated, Pw is the power of noise sampling point, and N is the number of samples. The above formula is converted into the signal-to-noise ratio S in dB:
(21)S=Esnr∣dB=10∗log1/N∑n=1Nyn21/N∑n=1Nwn2.The estimation of the surrounding SNR helps to know about the state of the current communication channel. In a low SNR environment, the distributed detection algorithm can be selected to achieve more accurate estimation of parameters through the distributed network structure, while in a high SNR environment, the disadvantages of the distributed algorithm, such as complexity of calculation and slow running, are highlighted. Therefore, on the condition of ensuring a credible detection probability, the single-point detection algorithm is more suitable to meet the actual requirements of UAVs.


### 5.4. Simulation Results and Analysis

#### 5.4.1. Simulation Conditions

In the simulation experiment, it is assumed that a distributed UAV network consists of 20 independent UAVs, as shown in Figure5. The distributed diffusion algorithm is simulated in the network structure shown. The noise received by each independent UAV is Gaussian white noise with a mean value of 0 and a variance of σn=1.
(1)
The data in the experiment is generated randomly by the simulation software(2)
ATC strategy is used as the fusion strategy(3)
The steady-state error performance index of the evaluation algorithm uses the global mean square deviation (MSD), which can be expressed asMSDi=1/N∑i=1NEwi−w02(4)
Metropolis criterion is used to select the weights of the fusion matrix(5)
The final result of each experiment is derived from the mean value of several independent experimentsFigure 5
Network structure.


#### 5.4.2. Experimental Results

(1)
Comparison of performance curves between conventional energy detection algorithm and LMS spectrum sensing algorithmThe detection probability of the conventional energy detection algorithm and the LMS spectrum sensing algorithm in different SNR environments is shown in Figure6. The higher the detection probability is, the better the algorithm performance will be. The number of iterations in this experiment is 3200, the step size u is 0.01, and the preset false alarm probability is Pf=0.01.Figure 6
Detection probability of LMS and conventional energy detection algorithms.It can be seen that the detection probability of both methods is relatively low in a low SNR environment, but the detection probability of the conventional energy detection algorithm is almost zero at a low SNR and is completely unable to realize its function. However, the detection probability of a single point using the LMS adaptive algorithm can reach above 0.5, which is greatly improved compared with the conventional energy detection algorithm and can still achieve the detection function at a low SNR. When SNR is about -10 dB, the detection probability of both algorithms is higher than 0.9, ensuring a better detection function. It can be concluded that the LMS-based detection algorithm is superior to the conventional energy detection algorithm in a low SNR environment.(2)
Influence of different step sizes on the performance of LMS spectrum sensingStep size influences the algorithm performance. A too large or too small step size will reduce the detection capability of the algorithm. Under the condition of 3200 iterations and preset false alarm probabilityPf=0.01, different step sizes u are used to analyze the algorithm.It can be seen from Figure7 that the detection performance of the algorithm increases with SNR and changes with the step size. When the step size u is small, the convergence of the algorithm is slow, and the algorithm cannot converge to the desired value in a finite number of iterations, so the parameter estimation is inaccurate and results in inadequate performance. When the step size is close to 0.2, the curve shows a downward trend because the step size is too large and results in instability and fluctuations of the steady-state error as well as undesired parameter estimation.
(3)
Comparison of detection performance of LMS algorithm under different number of iterationsFigure 7
Influence of different step sizes on LMS algorithm.At the same step size, the number of iterations affects the algorithm performance. The performance of the algorithm is analyzed at 800, 1500, 3000, and 5000 iterations, respectively, where the step sizeu=0.01, and the preset false alarm probability is Pf=0.01.The experimental results are shown in Figure8. At the same step size, the detection performance gets better as the number of iterations increases. When the number of iterations is 800 and SNR is -10 dB, the detection probability is around 0.8, while the detection probability at 1500, 3000, and 5000 iterations can reach 0.9, 0.94, and 0.96 under the same SNR condition. In addition, the performance of the algorithm is saturated after a certain number of iterations are reached. When SNR is -10, the difference in detection probability between 800 and 1500 iterations is about 0.1, while at the same SNR, the difference in detection probability between 3000 and 5000 iterations is only 0.02. This indicates that at a given step size u=0.01, the number of iterations is basically stable after reaching 3000.
(4)
Comparison of performance between DLMS spectrum sensing algorithm and LMS spectrum sensing algorithmFigure 8
Detection probability of LMS at different number of iterations.A distributed diffusion detection algorithm is used in order to better detect the signal parameters. The detection performance is improved by adaptation and fusion of the data of different nodes. The number of iterations in this experiment is 3200, the step sizeu=0.01, and the preset false alarm probability Pf=0.01. Comparative analysis is conducted based on the detection result of node 8.The experimental results are shown in Figure9. The performance of the adaptive detection algorithm based on diffusion-weighted fusion is better than that of the single-point LMS detection algorithm. When SNR is -25 dB, the detection probability of the DLMS algorithm is about 0.7, while the detection probability of the single-point LMS algorithm is only up to 0.55 under the same condition. The performance of the two algorithms is basically the same at a high SNR, showing that the distributed diffusion adaptive algorithm can better adapt to signal detection in a low SNR environment.
(5)
Comparison of the performance of distributed diffusion LMS adaptive detection algorithm at different step sizesFigure 9
Detection probability of LMS and DLMS.In this experiment, the number of iterations is 3200, the preset false alarm probability isPf=0.01, and node 16 is selected as the detection result of the algorithm for analysis at step sizes u1=0.01, u2=0.05, and u3=0.1.The experimental results are shown in Figure10. When SNR is -25 dB, the detection probability at step size u=0.01 is about 0.7 and the detection probability at step size u=0.1 is close to 0.9. This indicates that the convergence rate of the algorithm increases with the step size, and the detection probability increases when the algorithm reaches steady state more quickly. When SNR is -10 dB, the probability of the detection algorithm is close to 1 at three step sizes, showing that the step size has little influence on the algorithm performance when SNR reaches a certain level.
(6)
Comparison of the performance of distributed diffusion adaptive detection algorithm at different number of iterationsFigure 10
Detection probability of DLMS algorithm at different step sizes.In this experiment, the false alarm probability isPf=0.01, the step size is u=0.1, and node 16 is selected as the detection result of the algorithm at 800, 1500, and 3000 iterations, respectively.It can be seen that the detection performance gets better as the number of iterations increases in Figure11. Therefore, the detection probability can still reach about 0.7 even at a SNR as low as -25 dB and at a small number of iterations. With this algorithm, the detection function can be basically realized with a small amount of computation.
(7)
Steady-state error analysis of different improved algorithmsFigure 11
Algorithm detection probability at different number of sampling points.The DLMS algorithm is improved using a symbolic algorithm based on quantization error. At a uniform step sizeu=0.01, the steady-state error performance of the two algorithms is analyzed at 1000 iterations.The experimental results are shown in Figure12. It can be that the DLMS algorithm has reached the state of convergence when the number of iterations reaches 100. Although the improved algorithm has a slower convergence rate than the DLMS algorithm, it can also reach steady state quickly.
(8)
Comparison of the convergence performance of several algorithms in case of erroneous dataFigure 12
Steady-state performance curves of different algorithms.In this experiment, it is assumed that the number of data errors increases, and the number of nodes with data error is set to 2. Assume that the step sizeu=0.05, the number of iterations is 1000, and the number of erroneous parameters is ϑ=3.The experimental results are shown in Figure13. In case of erroneous nodes, the steady-state errors of the improved algorithm based on error quantization and the DLMS algorithm with erroneous data nodes removed are -15 dB and -20 dB, respectively. In comparison, the convergence performance of the conventional DLMS algorithm is much inferior, with a steady-state error of only -7 dB. In terms of convergence rate, the DLMS algorithm which eliminates erroneous data nodes has achieved convergence when the number of iterations reaches about 30, showing an improvement compared with the conventional DLMS algorithm. The results show that the improved symbolic algorithm based on quantization error and the DLMS algorithm with erroneous data nodes removed can better estimate the parameters in case of data errors.
(9)
Estimation of the probability of detection algorithm based on SNRFigure 13
Steady-state performance curves in case of data error.In this experiment, the LMS algorithm, the DLMS algorithm, and the detection algorithm based on SNR estimation are compared. The desired probabilityP¯d is set to 0.95, which indicates that the desired detection probability is satisfied when the detection probability reaches 0.95. The initial threshold is set to -10 dB and the adjustment parameter n is set to 10.Figure14 shows that the detection algorithm based on SNR estimation at a low SNR maintains the advantage of distributed estimation under the condition of weak signal as the DLMS algorithm. When SNR is about 16 dB, the detection probability Pd of DLMS is greater larger than the desired probability P¯d, resulting in a decline in threshold. However, under the same SNR condition, the detection probability Pd of LMS is lower than the desired probability P¯d and leads to an increase in threshold. Therefore, the threshold is in a boundary state before -10 dB, and the detection probability Pd remains around 0.95, that is, around the desired probability P¯d. At -10 dB, the detection probability Pd of the LMS algorithm is greater than the desired probability P¯d. The quick adjustment of the threshold makes the SNR estimation and detection run by LMS algorithm consistent with its detection probability.Figure 14
Estimation of detection algorithm probability based on SNR.


## 5.1. Algorithm Principle

### 5.1.1. Distributed Diffusion LMS Spectrum Sensing

In this paper, the amplitude of signal energy is used as the object of estimation and the test statistic of the algorithm. Assuming that the network consists ofN nodes, k∈1,2,3,⋯,N, h is the channel gain, and assuming that the channel gain is a constant, that is, the channel gain does not change, it follows that
(6)dki=h∗m+niH1,dki=niH0,where dki is the observed quantity of node k at time i and m is the signal sent by the primary user. ni represents a noise signal with a mean of 0 and a variance of σn2. Take eki as the error between the actual value and the estimated value xi−1 of the signal at the ith iteration of node k:
(7)eki=di−h∗xi−1.According to the LMS principle, it follows that(8)xi=xi−1+uh∗eki,where u is the step size of the LMS algorithm, which controls the convergence performance of the algorithm and has a value range as follows:
(9)0<μ<2τ,where τ is replaced by the largest eigenvalue of the autocorrelation matrix of the transmitted signal. Therefore, the iterative formula of the whole algorithm can be expressed as
(10)φik=wi−1k+uh∗di−h∗wi−1k,(11)wik=∑l∈Nkcl,kφil.Equation (10) is the adaptive process in algorithm iteration. φikk is an intermediate estimated value obtained by sensor node k through adaptive steepest gradient descent of the difference between the last fusion result wi−1k and the desired signal. Then, equation (11) fuses the intermediate estimated value φikk∈N of each surrounding node through the diffusion weight matrix according to the previously selected fusion criterion and obtains the fused estimated value wik. The weight coefficient cl,k is nonnegative and has a value only when cl,kl∈Nk is satisfied. In other cases, it is 0, indicating that no node is connected and no data fusion is conducted.The fused estimated value is compared with the decision thresholdε. If wik>ε, it is decided as H1, indicating that the channel is temporarily unavailable. If wik<ε, it is decided as H0, indicating that the primary user sending the signal does not occupy the channel and the channel can be used for the time being.Since the mean value of noiseni is 0 and the variance is σk,i2, wik should also conform to normal distribution, i.e.,
(12)xi=Na0,σ0H0,Na1,σ1H1,where
(13)a0=0,a1=∑i=0n1−uhi−1uhm,σ02=σ12=∑i=0n1−uh2i−1u2hσn2.It is known from [19] that
(14)Pd=Qε−∑i=1n1−uhi−1uhm∑i=1n1−uh2i−1u2hσn2.When a false alarm probabilityPf is given, its decision threshold ε is
(15)ε=∑i=1k1−uh2i−1u2hσn2Q−1Pf.


### 5.1.2. Strategy Selection

The distributed least mean square (DLMS) algorithm based on diffusion consists of two basic steps: local data adaptation and diffusion-weighted fusion of data. The data can be fused with surrounding nodes based on the diffusion weight after local adaptive processing, or diffusion weighed fusion can be directly conducted through the information collected by each node. Then, the node conducts adaptive processing based on the fused estimated value obtained. The above two strategies are, respectively, called ATC (Adaptive-Then-Combine) DLMS and CTA (Combined-Then-Adapt) DLMS. The steps of the algorithm of ATC strategy have been analyzed before and are no longer repeated here. The formula is as below:(16)φik=wi−1k+uh∗di−h∗wi−1k,wik=∑l∈Nkcl,kφil.Based on the strategy of CTA,φik is diffused in accordance with the criterion of weight matrix to obtain the estimated value. Then, adaptive processing is carried out based on the error between the estimated value obtained by diffusion-weighted fusion and the value of previous moment and the desired signal to obtain the estimated value wik after processing. Next, wik is compared with the decision threshold ε to judge the channel occupancy and improve the channel utilization rate.In the CTA DLMS algorithm, the new value is estimated by the local iterative adjustment result of the node itself, while in the ATC DLMS algorithm of first adaptation and then fusion, the value of multinode diffusion-weighted fusion is taken as the updated value. This difference also makes the latter superior to the former in steady-state performance and convergence rate [6]. Based on such advantages, the simulation methods in this paper are all based on ATC implementation.
(17)φi−1k=∑l∈Nkcl,kwi−1l,wik=φi−1k+uh∗di−h∗φi−1k.


## 5.1.1. Distributed Diffusion LMS Spectrum Sensing

In this paper, the amplitude of signal energy is used as the object of estimation and the test statistic of the algorithm. Assuming that the network consists ofN nodes, k∈1,2,3,⋯,N, h is the channel gain, and assuming that the channel gain is a constant, that is, the channel gain does not change, it follows that
(6)dki=h∗m+niH1,dki=niH0,where dki is the observed quantity of node k at time i and m is the signal sent by the primary user. ni represents a noise signal with a mean of 0 and a variance of σn2. Take eki as the error between the actual value and the estimated value xi−1 of the signal at the ith iteration of node k:
(7)eki=di−h∗xi−1.According to the LMS principle, it follows that(8)xi=xi−1+uh∗eki,where u is the step size of the LMS algorithm, which controls the convergence performance of the algorithm and has a value range as follows:
(9)0<μ<2τ,where τ is replaced by the largest eigenvalue of the autocorrelation matrix of the transmitted signal. Therefore, the iterative formula of the whole algorithm can be expressed as
(10)φik=wi−1k+uh∗di−h∗wi−1k,(11)wik=∑l∈Nkcl,kφil.Equation (10) is the adaptive process in algorithm iteration. φikk is an intermediate estimated value obtained by sensor node k through adaptive steepest gradient descent of the difference between the last fusion result wi−1k and the desired signal. Then, equation (11) fuses the intermediate estimated value φikk∈N of each surrounding node through the diffusion weight matrix according to the previously selected fusion criterion and obtains the fused estimated value wik. The weight coefficient cl,k is nonnegative and has a value only when cl,kl∈Nk is satisfied. In other cases, it is 0, indicating that no node is connected and no data fusion is conducted.The fused estimated value is compared with the decision thresholdε. If wik>ε, it is decided as H1, indicating that the channel is temporarily unavailable. If wik<ε, it is decided as H0, indicating that the primary user sending the signal does not occupy the channel and the channel can be used for the time being.Since the mean value of noiseni is 0 and the variance is σk,i2, wik should also conform to normal distribution, i.e.,
(12)xi=Na0,σ0H0,Na1,σ1H1,where
(13)a0=0,a1=∑i=0n1−uhi−1uhm,σ02=σ12=∑i=0n1−uh2i−1u2hσn2.It is known from [19] that
(14)Pd=Qε−∑i=1n1−uhi−1uhm∑i=1n1−uh2i−1u2hσn2.When a false alarm probabilityPf is given, its decision threshold ε is
(15)ε=∑i=1k1−uh2i−1u2hσn2Q−1Pf.


## 5.1.2. Strategy Selection

The distributed least mean square (DLMS) algorithm based on diffusion consists of two basic steps: local data adaptation and diffusion-weighted fusion of data. The data can be fused with surrounding nodes based on the diffusion weight after local adaptive processing, or diffusion weighed fusion can be directly conducted through the information collected by each node. Then, the node conducts adaptive processing based on the fused estimated value obtained. The above two strategies are, respectively, called ATC (Adaptive-Then-Combine) DLMS and CTA (Combined-Then-Adapt) DLMS. The steps of the algorithm of ATC strategy have been analyzed before and are no longer repeated here. The formula is as below:(16)φik=wi−1k+uh∗di−h∗wi−1k,wik=∑l∈Nkcl,kφil.Based on the strategy of CTA,φik is diffused in accordance with the criterion of weight matrix to obtain the estimated value. Then, adaptive processing is carried out based on the error between the estimated value obtained by diffusion-weighted fusion and the value of previous moment and the desired signal to obtain the estimated value wik after processing. Next, wik is compared with the decision threshold ε to judge the channel occupancy and improve the channel utilization rate.In the CTA DLMS algorithm, the new value is estimated by the local iterative adjustment result of the node itself, while in the ATC DLMS algorithm of first adaptation and then fusion, the value of multinode diffusion-weighted fusion is taken as the updated value. This difference also makes the latter superior to the former in steady-state performance and convergence rate [6]. Based on such advantages, the simulation methods in this paper are all based on ATC implementation.
(17)φi−1k=∑l∈Nkcl,kwi−1l,wik=φi−1k+uh∗di−h∗φi−1k.


## 5.2. Distributed Estimation Based on Erroneous Data Elimination

In most algorithms related to distributed estimation, it is assumed that the whole network is in a stable condition without data error. However, in practice, UAV nodes may have substantial deviations due to their own problems or external factors. The erroneous data is diffused through the network, and each iteration of the diffusion will transfer the erroneous data in the network and seriously affect the performance of the whole distributed estimation. For distributed estimation, the impact of data diffusion of such erroneous nodes has greatly reduced the performance advantage of a distributed structure, and its overall estimation performance is even far inferior to that of a single node. Therefore, it is important to distinguish erroneous nodes and reduce the impact of erroneous data on the algorithm performance.


### 5.2.1. Erroneous Data Model

The UAV network transmits and diffuses data through the connection between nodes. When a node has an error, the data will follow the network to diffuse into the estimated values of each node. Assuming that the observed data obtained by the UAV isdi, which contains noise ni, but the observed value is wrong due to data processing of the UAV itself, the erroneous data di can be expressed as
(18)di=ϑhm+ni,where ϑ is a scaling factor for controlling erroneous data and the magnitude of ϑ influences the deviation between the observed value di and the actual value. If ϑ=1, it means that the node has no error, and its observed value di is normal and can be used normally. The erroneous data causes the estimated value in the fusion and diffusion stage to change towards the direction of ϑ and deviate from the normal estimation range.


### 5.2.2. Erroneous Data Judgment Model

The ground station system is used to monitor and track the state of the whole UAV cluster when UAVs are in cluster operation. The ground station has a clear picture of the current state of each UAV, including the number of UAVs that have made an error. It is assumed that under the condition of knowing the number of erroneous nodes, the specific UAV is judged and erroneous UAV nodes are distinguished, so that the node data can be processed conveniently in the following algorithm. Assuming that the sequence number of UAVs isk, k∈1,2,3,⋯,N, and the received data is d1i,d2i,d3i,d4i⋯ at time i, first sort the k pieces of data at time i, and the data of erroneous node will enlarge by default, that is, ϑ>1. Then, filter the k pieces of data. Since the number of erroneous nodes has been known, the erroneous data is most likely to appear at the end of the sort. Extract the data at upper end, and mark the node of the corresponding data as erroneous node.


### 5.2.3. Algorithm Steps

(1)
Data judgmentThe UAV node collects a set of observed datad1i,d2i,d3i,⋯,dNi at time i and sorts this set of data to obtain an ascending order sequence. The last z pieces of data in the sequence are labeled according to the number z of nodes known to be erroneous, and corresponding records are made.
(2)
Replanning of weightsAfter the informationM of erroneous node is obtained, the connection structure of the UAV will change, and the information of the node determined to be erroneous will be isolated and disconnected and no information will be exchanged or fused with it. At this point, the values of the diffusion matrix cl,k need to be readjusted.
(3)
Fusion estimationAfter the weight of the diffusion matrix is redetermined at timei, local adaptation is conducted on the data of remaining security nodes by the above-mentioned distributed fusion and diffusion estimation method, the LMS algorithm with the steepest gradient is used for estimation, and then, weighted fusion is conducted based on the new cl,k to obtain the estimated value wik.After the information of erroneous nodes is eliminated, it is possible to effectively guarantee the overall data stability and prevent deviations of the estimated values due to erroneous data which may degrade the algorithm performance in steady state.


## 5.2.1. Erroneous Data Model

The UAV network transmits and diffuses data through the connection between nodes. When a node has an error, the data will follow the network to diffuse into the estimated values of each node. Assuming that the observed data obtained by the UAV isdi, which contains noise ni, but the observed value is wrong due to data processing of the UAV itself, the erroneous data di can be expressed as
(18)di=ϑhm+ni,where ϑ is a scaling factor for controlling erroneous data and the magnitude of ϑ influences the deviation between the observed value di and the actual value. If ϑ=1, it means that the node has no error, and its observed value di is normal and can be used normally. The erroneous data causes the estimated value in the fusion and diffusion stage to change towards the direction of ϑ and deviate from the normal estimation range.


## 5.2.2. Erroneous Data Judgment Model

The ground station system is used to monitor and track the state of the whole UAV cluster when UAVs are in cluster operation. The ground station has a clear picture of the current state of each UAV, including the number of UAVs that have made an error. It is assumed that under the condition of knowing the number of erroneous nodes, the specific UAV is judged and erroneous UAV nodes are distinguished, so that the node data can be processed conveniently in the following algorithm. Assuming that the sequence number of UAVs isk, k∈1,2,3,⋯,N, and the received data is d1i,d2i,d3i,d4i⋯ at time i, first sort the k pieces of data at time i, and the data of erroneous node will enlarge by default, that is, ϑ>1. Then, filter the k pieces of data. Since the number of erroneous nodes has been known, the erroneous data is most likely to appear at the end of the sort. Extract the data at upper end, and mark the node of the corresponding data as erroneous node.


## 5.2.3. Algorithm Steps

(1)
Data judgmentThe UAV node collects a set of observed datad1i,d2i,d3i,⋯,dNi at time i and sorts this set of data to obtain an ascending order sequence. The last z pieces of data in the sequence are labeled according to the number z of nodes known to be erroneous, and corresponding records are made.
(2)
Replanning of weightsAfter the informationM of erroneous node is obtained, the connection structure of the UAV will change, and the information of the node determined to be erroneous will be isolated and disconnected and no information will be exchanged or fused with it. At this point, the values of the diffusion matrix cl,k need to be readjusted.
(3)
Fusion estimationAfter the weight of the diffusion matrix is redetermined at timei, local adaptation is conducted on the data of remaining security nodes by the above-mentioned distributed fusion and diffusion estimation method, the LMS algorithm with the steepest gradient is used for estimation, and then, weighted fusion is conducted based on the new cl,k to obtain the estimated value wik.After the information of erroneous nodes is eliminated, it is possible to effectively guarantee the overall data stability and prevent deviations of the estimated values due to erroneous data which may degrade the algorithm performance in steady state.


## 5.3. Fast Spectrum Sensing Algorithm Based on SNR Estimation

A detection method based on energy is extremely sensitive to the condition of SNR spectrum sensing. It estimates the occupation state of a channel by detecting whether the relationship between the signal energy and the noise energy in the channel satisfies its decision condition. It can be known from the foregoing discussion that a single-point LMS spectrum sensing algorithm already can estimate the spectrum information accurately at a low SNR, and the accuracy of distributed spectrum sensing based on diffusion strategy is further improved. However, distributed cooperation makes the algorithm computationally intensive and the parameter estimation process slow, while in a rapidly changing battlefield environment, time relates to the success or failure of the war. To reduce the time complexity of spectrum sensing algorithm while ensuring its accuracy, a fast spectrum sensing algorithm based on SNR estimation is proposed. Whether UAVs adopt single-point LMS spectrum sensing or distributed diffusion cooperative spectrum sensing is determined based on the set threshold of SNR, thus effectively solving the problem of slow running of the distributed cooperative sensing algorithm under a better SNR condition.


### 5.3.1. Process of Algorithm

The fast spectrum sensing algorithm based SNR estimation was aimed at solving the problem of slow running of spectrum sensing algorithm in a better communication environment. Firstly, in Figure3, the corresponding SNR is obtained by comparing the sampled energy mean value of the collected signal to be detected and the noise signal. At the same time, the algorithm needs a SNR threshold determined based on experience. This threshold is inferred from a large amount of experimental data; that is, the selected algorithm is acceptable in detection performance at this threshold. To shorten the detection time, this threshold is used to select the corresponding spectrum sensing algorithm.Figure 3
Process of algorithm.For this algorithm, its threshold plays an important role. When the estimated SNR is greater than the threshold, it can be considered that the current channel is in good condition, and a faster LMS detection algorithm can be used. On the contrary, when the estimated SNR is smaller than the threshold, it can be inferred that the signal is weak in the current environment, and a single-point LMS algorithm is not enough to meet the communication requirement. In this case, a more reliable distributed detection algorithm with a higher detection probability is needed to estimate the spectrum state.Set a desired detection probabilityP¯d in Figure 4. If the actual detection probability Pd is greater than expected, it indicates that the channel condition has satisfied the communication requirement, and the computing resources can be optimized by adjusting the threshold; if the actual detection probability Pd is less than expected, it indicates that the detection algorithm cannot meet the communication requirement under the current SNR condition, the threshold needs to be adjusted, and a suitable algorithm for low SNR is needed to obtain more accurate parameter estimation. Therefore, the expression for threshold adjustment is set as
(19)βi+1=βi+n∗P¯d−Pd,where βi represents the ith threshold, n is the adjustment factor, and n>0; the magnitude of n determines the adjustment speed of the threshold.Figure 4
Process of threshold adjustment.


### 5.3.2. SNR Estimation

SNR is an important parameter to reflect the channel state, and an energy-based spectrum sensing method requires a high SNR. SNR estimation is not only a judgment of the surrounding communication environment but also a basic step in the whole algorithm.To estimate SNR, it is required to calculate the ratio of energy mean between the signal to be detected and the noise sampling point first:(20)Esnr=PsPw=1/N∑n=1Nyn21/N∑n=1Nwn2,where Ps is the power of the detected signal to be estimated, Pw is the power of noise sampling point, and N is the number of samples. The above formula is converted into the signal-to-noise ratio S in dB:
(21)S=Esnr∣dB=10∗log1/N∑n=1Nyn21/N∑n=1Nwn2.The estimation of the surrounding SNR helps to know about the state of the current communication channel. In a low SNR environment, the distributed detection algorithm can be selected to achieve more accurate estimation of parameters through the distributed network structure, while in a high SNR environment, the disadvantages of the distributed algorithm, such as complexity of calculation and slow running, are highlighted. Therefore, on the condition of ensuring a credible detection probability, the single-point detection algorithm is more suitable to meet the actual requirements of UAVs.


## 5.3.1. Process of Algorithm

The fast spectrum sensing algorithm based SNR estimation was aimed at solving the problem of slow running of spectrum sensing algorithm in a better communication environment. Firstly, in Figure3, the corresponding SNR is obtained by comparing the sampled energy mean value of the collected signal to be detected and the noise signal. At the same time, the algorithm needs a SNR threshold determined based on experience. This threshold is inferred from a large amount of experimental data; that is, the selected algorithm is acceptable in detection performance at this threshold. To shorten the detection time, this threshold is used to select the corresponding spectrum sensing algorithm.Figure 3
Process of algorithm.For this algorithm, its threshold plays an important role. When the estimated SNR is greater than the threshold, it can be considered that the current channel is in good condition, and a faster LMS detection algorithm can be used. On the contrary, when the estimated SNR is smaller than the threshold, it can be inferred that the signal is weak in the current environment, and a single-point LMS algorithm is not enough to meet the communication requirement. In this case, a more reliable distributed detection algorithm with a higher detection probability is needed to estimate the spectrum state.Set a desired detection probabilityP¯d in Figure 4. If the actual detection probability Pd is greater than expected, it indicates that the channel condition has satisfied the communication requirement, and the computing resources can be optimized by adjusting the threshold; if the actual detection probability Pd is less than expected, it indicates that the detection algorithm cannot meet the communication requirement under the current SNR condition, the threshold needs to be adjusted, and a suitable algorithm for low SNR is needed to obtain more accurate parameter estimation. Therefore, the expression for threshold adjustment is set as
(19)βi+1=βi+n∗P¯d−Pd,where βi represents the ith threshold, n is the adjustment factor, and n>0; the magnitude of n determines the adjustment speed of the threshold.Figure 4
Process of threshold adjustment.


## 5.3.2. SNR Estimation

SNR is an important parameter to reflect the channel state, and an energy-based spectrum sensing method requires a high SNR. SNR estimation is not only a judgment of the surrounding communication environment but also a basic step in the whole algorithm.To estimate SNR, it is required to calculate the ratio of energy mean between the signal to be detected and the noise sampling point first:(20)Esnr=PsPw=1/N∑n=1Nyn21/N∑n=1Nwn2,where Ps is the power of the detected signal to be estimated, Pw is the power of noise sampling point, and N is the number of samples. The above formula is converted into the signal-to-noise ratio S in dB:
(21)S=Esnr∣dB=10∗log1/N∑n=1Nyn21/N∑n=1Nwn2.The estimation of the surrounding SNR helps to know about the state of the current communication channel. In a low SNR environment, the distributed detection algorithm can be selected to achieve more accurate estimation of parameters through the distributed network structure, while in a high SNR environment, the disadvantages of the distributed algorithm, such as complexity of calculation and slow running, are highlighted. Therefore, on the condition of ensuring a credible detection probability, the single-point detection algorithm is more suitable to meet the actual requirements of UAVs.


## 5.4. Simulation Results and Analysis

### 5.4.1. Simulation Conditions

In the simulation experiment, it is assumed that a distributed UAV network consists of 20 independent UAVs, as shown in Figure5. The distributed diffusion algorithm is simulated in the network structure shown. The noise received by each independent UAV is Gaussian white noise with a mean value of 0 and a variance of σn=1.
(1)
The data in the experiment is generated randomly by the simulation software(2)
ATC strategy is used as the fusion strategy(3)
The steady-state error performance index of the evaluation algorithm uses the global mean square deviation (MSD), which can be expressed asMSDi=1/N∑i=1NEwi−w02(4)
Metropolis criterion is used to select the weights of the fusion matrix(5)
The final result of each experiment is derived from the mean value of several independent experimentsFigure 5
Network structure.


### 5.4.2. Experimental Results

(1)
Comparison of performance curves between conventional energy detection algorithm and LMS spectrum sensing algorithmThe detection probability of the conventional energy detection algorithm and the LMS spectrum sensing algorithm in different SNR environments is shown in Figure6. The higher the detection probability is, the better the algorithm performance will be. The number of iterations in this experiment is 3200, the step size u is 0.01, and the preset false alarm probability is Pf=0.01.Figure 6
Detection probability of LMS and conventional energy detection algorithms.It can be seen that the detection probability of both methods is relatively low in a low SNR environment, but the detection probability of the conventional energy detection algorithm is almost zero at a low SNR and is completely unable to realize its function. However, the detection probability of a single point using the LMS adaptive algorithm can reach above 0.5, which is greatly improved compared with the conventional energy detection algorithm and can still achieve the detection function at a low SNR. When SNR is about -10 dB, the detection probability of both algorithms is higher than 0.9, ensuring a better detection function. It can be concluded that the LMS-based detection algorithm is superior to the conventional energy detection algorithm in a low SNR environment.(2)
Influence of different step sizes on the performance of LMS spectrum sensingStep size influences the algorithm performance. A too large or too small step size will reduce the detection capability of the algorithm. Under the condition of 3200 iterations and preset false alarm probabilityPf=0.01, different step sizes u are used to analyze the algorithm.It can be seen from Figure7 that the detection performance of the algorithm increases with SNR and changes with the step size. When the step size u is small, the convergence of the algorithm is slow, and the algorithm cannot converge to the desired value in a finite number of iterations, so the parameter estimation is inaccurate and results in inadequate performance. When the step size is close to 0.2, the curve shows a downward trend because the step size is too large and results in instability and fluctuations of the steady-state error as well as undesired parameter estimation.
(3)
Comparison of detection performance of LMS algorithm under different number of iterationsFigure 7
Influence of different step sizes on LMS algorithm.At the same step size, the number of iterations affects the algorithm performance. The performance of the algorithm is analyzed at 800, 1500, 3000, and 5000 iterations, respectively, where the step sizeu=0.01, and the preset false alarm probability is Pf=0.01.The experimental results are shown in Figure8. At the same step size, the detection performance gets better as the number of iterations increases. When the number of iterations is 800 and SNR is -10 dB, the detection probability is around 0.8, while the detection probability at 1500, 3000, and 5000 iterations can reach 0.9, 0.94, and 0.96 under the same SNR condition. In addition, the performance of the algorithm is saturated after a certain number of iterations are reached. When SNR is -10, the difference in detection probability between 800 and 1500 iterations is about 0.1, while at the same SNR, the difference in detection probability between 3000 and 5000 iterations is only 0.02. This indicates that at a given step size u=0.01, the number of iterations is basically stable after reaching 3000.
(4)
Comparison of performance between DLMS spectrum sensing algorithm and LMS spectrum sensing algorithmFigure 8
Detection probability of LMS at different number of iterations.A distributed diffusion detection algorithm is used in order to better detect the signal parameters. The detection performance is improved by adaptation and fusion of the data of different nodes. The number of iterations in this experiment is 3200, the step sizeu=0.01, and the preset false alarm probability Pf=0.01. Comparative analysis is conducted based on the detection result of node 8.The experimental results are shown in Figure9. The performance of the adaptive detection algorithm based on diffusion-weighted fusion is better than that of the single-point LMS detection algorithm. When SNR is -25 dB, the detection probability of the DLMS algorithm is about 0.7, while the detection probability of the single-point LMS algorithm is only up to 0.55 under the same condition. The performance of the two algorithms is basically the same at a high SNR, showing that the distributed diffusion adaptive algorithm can better adapt to signal detection in a low SNR environment.
(5)
Comparison of the performance of distributed diffusion LMS adaptive detection algorithm at different step sizesFigure 9
Detection probability of LMS and DLMS.In this experiment, the number of iterations is 3200, the preset false alarm probability isPf=0.01, and node 16 is selected as the detection result of the algorithm for analysis at step sizes u1=0.01, u2=0.05, and u3=0.1.The experimental results are shown in Figure10. When SNR is -25 dB, the detection probability at step size u=0.01 is about 0.7 and the detection probability at step size u=0.1 is close to 0.9. This indicates that the convergence rate of the algorithm increases with the step size, and the detection probability increases when the algorithm reaches steady state more quickly. When SNR is -10 dB, the probability of the detection algorithm is close to 1 at three step sizes, showing that the step size has little influence on the algorithm performance when SNR reaches a certain level.
(6)
Comparison of the performance of distributed diffusion adaptive detection algorithm at different number of iterationsFigure 10
Detection probability of DLMS algorithm at different step sizes.In this experiment, the false alarm probability isPf=0.01, the step size is u=0.1, and node 16 is selected as the detection result of the algorithm at 800, 1500, and 3000 iterations, respectively.It can be seen that the detection performance gets better as the number of iterations increases in Figure11. Therefore, the detection probability can still reach about 0.7 even at a SNR as low as -25 dB and at a small number of iterations. With this algorithm, the detection function can be basically realized with a small amount of computation.
(7)
Steady-state error analysis of different improved algorithmsFigure 11
Algorithm detection probability at different number of sampling points.The DLMS algorithm is improved using a symbolic algorithm based on quantization error. At a uniform step sizeu=0.01, the steady-state error performance of the two algorithms is analyzed at 1000 iterations.The experimental results are shown in Figure12. It can be that the DLMS algorithm has reached the state of convergence when the number of iterations reaches 100. Although the improved algorithm has a slower convergence rate than the DLMS algorithm, it can also reach steady state quickly.
(8)
Comparison of the convergence performance of several algorithms in case of erroneous dataFigure 12
Steady-state performance curves of different algorithms.In this experiment, it is assumed that the number of data errors increases, and the number of nodes with data error is set to 2. Assume that the step sizeu=0.05, the number of iterations is 1000, and the number of erroneous parameters is ϑ=3.The experimental results are shown in Figure13. In case of erroneous nodes, the steady-state errors of the improved algorithm based on error quantization and the DLMS algorithm with erroneous data nodes removed are -15 dB and -20 dB, respectively. In comparison, the convergence performance of the conventional DLMS algorithm is much inferior, with a steady-state error of only -7 dB. In terms of convergence rate, the DLMS algorithm which eliminates erroneous data nodes has achieved convergence when the number of iterations reaches about 30, showing an improvement compared with the conventional DLMS algorithm. The results show that the improved symbolic algorithm based on quantization error and the DLMS algorithm with erroneous data nodes removed can better estimate the parameters in case of data errors.
(9)
Estimation of the probability of detection algorithm based on SNRFigure 13
Steady-state performance curves in case of data error.In this experiment, the LMS algorithm, the DLMS algorithm, and the detection algorithm based on SNR estimation are compared. The desired probabilityP¯d is set to 0.95, which indicates that the desired detection probability is satisfied when the detection probability reaches 0.95. The initial threshold is set to -10 dB and the adjustment parameter n is set to 10.Figure14 shows that the detection algorithm based on SNR estimation at a low SNR maintains the advantage of distributed estimation under the condition of weak signal as the DLMS algorithm. When SNR is about 16 dB, the detection probability Pd of DLMS is greater larger than the desired probability P¯d, resulting in a decline in threshold. However, under the same SNR condition, the detection probability Pd of LMS is lower than the desired probability P¯d and leads to an increase in threshold. Therefore, the threshold is in a boundary state before -10 dB, and the detection probability Pd remains around 0.95, that is, around the desired probability P¯d. At -10 dB, the detection probability Pd of the LMS algorithm is greater than the desired probability P¯d. The quick adjustment of the threshold makes the SNR estimation and detection run by LMS algorithm consistent with its detection probability.Figure 14
Estimation of detection algorithm probability based on SNR.


## 5.4.1. Simulation Conditions

In the simulation experiment, it is assumed that a distributed UAV network consists of 20 independent UAVs, as shown in Figure5. The distributed diffusion algorithm is simulated in the network structure shown. The noise received by each independent UAV is Gaussian white noise with a mean value of 0 and a variance of σn=1.
(1)
The data in the experiment is generated randomly by the simulation software(2)
ATC strategy is used as the fusion strategy(3)
The steady-state error performance index of the evaluation algorithm uses the global mean square deviation (MSD), which can be expressed asMSDi=1/N∑i=1NEwi−w02(4)
Metropolis criterion is used to select the weights of the fusion matrix(5)
The final result of each experiment is derived from the mean value of several independent experimentsFigure 5
Network structure.


## 5.4.2. Experimental Results

(1)
Comparison of performance curves between conventional energy detection algorithm and LMS spectrum sensing algorithmThe detection probability of the conventional energy detection algorithm and the LMS spectrum sensing algorithm in different SNR environments is shown in Figure6. The higher the detection probability is, the better the algorithm performance will be. The number of iterations in this experiment is 3200, the step size u is 0.01, and the preset false alarm probability is Pf=0.01.Figure 6
Detection probability of LMS and conventional energy detection algorithms.It can be seen that the detection probability of both methods is relatively low in a low SNR environment, but the detection probability of the conventional energy detection algorithm is almost zero at a low SNR and is completely unable to realize its function. However, the detection probability of a single point using the LMS adaptive algorithm can reach above 0.5, which is greatly improved compared with the conventional energy detection algorithm and can still achieve the detection function at a low SNR. When SNR is about -10 dB, the detection probability of both algorithms is higher than 0.9, ensuring a better detection function. It can be concluded that the LMS-based detection algorithm is superior to the conventional energy detection algorithm in a low SNR environment.(2)
Influence of different step sizes on the performance of LMS spectrum sensingStep size influences the algorithm performance. A too large or too small step size will reduce the detection capability of the algorithm. Under the condition of 3200 iterations and preset false alarm probabilityPf=0.01, different step sizes u are used to analyze the algorithm.It can be seen from Figure7 that the detection performance of the algorithm increases with SNR and changes with the step size. When the step size u is small, the convergence of the algorithm is slow, and the algorithm cannot converge to the desired value in a finite number of iterations, so the parameter estimation is inaccurate and results in inadequate performance. When the step size is close to 0.2, the curve shows a downward trend because the step size is too large and results in instability and fluctuations of the steady-state error as well as undesired parameter estimation.
(3)
Comparison of detection performance of LMS algorithm under different number of iterationsFigure 7
Influence of different step sizes on LMS algorithm.At the same step size, the number of iterations affects the algorithm performance. The performance of the algorithm is analyzed at 800, 1500, 3000, and 5000 iterations, respectively, where the step sizeu=0.01, and the preset false alarm probability is Pf=0.01.The experimental results are shown in Figure8. At the same step size, the detection performance gets better as the number of iterations increases. When the number of iterations is 800 and SNR is -10 dB, the detection probability is around 0.8, while the detection probability at 1500, 3000, and 5000 iterations can reach 0.9, 0.94, and 0.96 under the same SNR condition. In addition, the performance of the algorithm is saturated after a certain number of iterations are reached. When SNR is -10, the difference in detection probability between 800 and 1500 iterations is about 0.1, while at the same SNR, the difference in detection probability between 3000 and 5000 iterations is only 0.02. This indicates that at a given step size u=0.01, the number of iterations is basically stable after reaching 3000.
(4)
Comparison of performance between DLMS spectrum sensing algorithm and LMS spectrum sensing algorithmFigure 8
Detection probability of LMS at different number of iterations.A distributed diffusion detection algorithm is used in order to better detect the signal parameters. The detection performance is improved by adaptation and fusion of the data of different nodes. The number of iterations in this experiment is 3200, the step sizeu=0.01, and the preset false alarm probability Pf=0.01. Comparative analysis is conducted based on the detection result of node 8.The experimental results are shown in Figure9. The performance of the adaptive detection algorithm based on diffusion-weighted fusion is better than that of the single-point LMS detection algorithm. When SNR is -25 dB, the detection probability of the DLMS algorithm is about 0.7, while the detection probability of the single-point LMS algorithm is only up to 0.55 under the same condition. The performance of the two algorithms is basically the same at a high SNR, showing that the distributed diffusion adaptive algorithm can better adapt to signal detection in a low SNR environment.
(5)
Comparison of the performance of distributed diffusion LMS adaptive detection algorithm at different step sizesFigure 9
Detection probability of LMS and DLMS.In this experiment, the number of iterations is 3200, the preset false alarm probability isPf=0.01, and node 16 is selected as the detection result of the algorithm for analysis at step sizes u1=0.01, u2=0.05, and u3=0.1.The experimental results are shown in Figure10. When SNR is -25 dB, the detection probability at step size u=0.01 is about 0.7 and the detection probability at step size u=0.1 is close to 0.9. This indicates that the convergence rate of the algorithm increases with the step size, and the detection probability increases when the algorithm reaches steady state more quickly. When SNR is -10 dB, the probability of the detection algorithm is close to 1 at three step sizes, showing that the step size has little influence on the algorithm performance when SNR reaches a certain level.
(6)
Comparison of the performance of distributed diffusion adaptive detection algorithm at different number of iterationsFigure 10
Detection probability of DLMS algorithm at different step sizes.In this experiment, the false alarm probability isPf=0.01, the step size is u=0.1, and node 16 is selected as the detection result of the algorithm at 800, 1500, and 3000 iterations, respectively.It can be seen that the detection performance gets better as the number of iterations increases in Figure11. Therefore, the detection probability can still reach about 0.7 even at a SNR as low as -25 dB and at a small number of iterations. With this algorithm, the detection function can be basically realized with a small amount of computation.
(7)
Steady-state error analysis of different improved algorithmsFigure 11
Algorithm detection probability at different number of sampling points.The DLMS algorithm is improved using a symbolic algorithm based on quantization error. At a uniform step sizeu=0.01, the steady-state error performance of the two algorithms is analyzed at 1000 iterations.The experimental results are shown in Figure12. It can be that the DLMS algorithm has reached the state of convergence when the number of iterations reaches 100. Although the improved algorithm has a slower convergence rate than the DLMS algorithm, it can also reach steady state quickly.
(8)
Comparison of the convergence performance of several algorithms in case of erroneous dataFigure 12
Steady-state performance curves of different algorithms.In this experiment, it is assumed that the number of data errors increases, and the number of nodes with data error is set to 2. Assume that the step sizeu=0.05, the number of iterations is 1000, and the number of erroneous parameters is ϑ=3.The experimental results are shown in Figure13. In case of erroneous nodes, the steady-state errors of the improved algorithm based on error quantization and the DLMS algorithm with erroneous data nodes removed are -15 dB and -20 dB, respectively. In comparison, the convergence performance of the conventional DLMS algorithm is much inferior, with a steady-state error of only -7 dB. In terms of convergence rate, the DLMS algorithm which eliminates erroneous data nodes has achieved convergence when the number of iterations reaches about 30, showing an improvement compared with the conventional DLMS algorithm. The results show that the improved symbolic algorithm based on quantization error and the DLMS algorithm with erroneous data nodes removed can better estimate the parameters in case of data errors.
(9)
Estimation of the probability of detection algorithm based on SNRFigure 13
Steady-state performance curves in case of data error.In this experiment, the LMS algorithm, the DLMS algorithm, and the detection algorithm based on SNR estimation are compared. The desired probabilityP¯d is set to 0.95, which indicates that the desired detection probability is satisfied when the detection probability reaches 0.95. The initial threshold is set to -10 dB and the adjustment parameter n is set to 10.Figure14 shows that the detection algorithm based on SNR estimation at a low SNR maintains the advantage of distributed estimation under the condition of weak signal as the DLMS algorithm. When SNR is about 16 dB, the detection probability Pd of DLMS is greater larger than the desired probability P¯d, resulting in a decline in threshold. However, under the same SNR condition, the detection probability Pd of LMS is lower than the desired probability P¯d and leads to an increase in threshold. Therefore, the threshold is in a boundary state before -10 dB, and the detection probability Pd remains around 0.95, that is, around the desired probability P¯d. At -10 dB, the detection probability Pd of the LMS algorithm is greater than the desired probability P¯d. The quick adjustment of the threshold makes the SNR estimation and detection run by LMS algorithm consistent with its detection probability.Figure 14
Estimation of detection algorithm probability based on SNR.


## 6. Conclusion

In this paper, the superiority of adaptive algorithm in spectrum sensing is proved first by comparing the LMS adaptive spectrum sensing algorithm with the conventional energy detection algorithm. On this basis, the principle of adaptation is added to the distributed network estimation algorithm, and a distributed adaptive spectrum sensing algorithm based on diffusion is proposed and compared with other improved algorithms. The superiority of the algorithm is proved by analyzing its performance in detection and convergence. Using an improved algorithm which eliminates erroneous nodes, simulation analysis is conducted on several algorithms in the case of erroneous nodes. It is concluded that the algorithm produces a better steady-state error curve in case of data error and leads to a more accurate estimate. Finally, a detection algorithm based on SNR estimation is analyzed and experimented. By adjusting the threshold and comparing different algorithms, it is proved that the algorithm has a high detection probability at a low SNR and a high computational efficiency at a high SNR.



---

*Source: 1981533-2022-07-13.xml*