# Malicious Cognitive User Identification Algorithm in Centralized Spectrum Sensing System
## 4 Algorithm Simulation and Performance Analysis  
### \(\beta\)-MIAMC Algorithm Availability Validation  
In order to verify the availability of the proposed algorithm with different probabilities of attack from malicious users, the Monte Carlo simulation method is used. The experimental parameters are set as follows:  
1. The total available bandwidth is divided into \(N=100\) subchannels and the number of main users is \(K=10\) (that is, the occupied proportion of the spectrum is \(10\%\));
2. Cognitive radio networks include a data fusion center and \(J=20\) cognitive users, which contain honest cognitive users and malicious cognitive users;
3. At the initial stage, the reputation value of the cognitive user is set to \(0.5\);
4. The false alarm probability of honest cognitive users \(p_{f}=10\%\);
5. In the data fusion center, the memory depth of each cognitive user prestige evaluation is L = 200 and the forgetting factor \(\lambda=0.8\);
6. In order to strengthen the privacy of malicious users, set the number of malicious cognitive users \(J_{A}=1\).  
Figure 4 depicts that in different attack probabilities, the reputation judgement results of the algorithm represent those of malicious users and one of the honest users at different perceived intervals in this paper.  
As can be seen from the Figure 4:  
1. With an increase in malicious user attack probability, the gap between the honest user reputation and malicious user reputation becomes larger. Essentially, with an increase in malicious user attack probability, honest users and malicious users can be more easily distinguished;
2. From Figure 4c,d, we can see that when the malicious user attack probability is large, the honest user's reputation fluctuates widely and the malicious user's reputation is gradually stabilized. This is because in this experiment, the honest user's false alarm probability is set to 10%, which creates an illusion of attack. However, in the subsequent judgment, the good performance of honest users will return the prestige value back to normal so the reputation of honest users with the perception of the interval will produce changes. When the attack probability is large, the use of feedback iterative mathematical algorithm results in the malicious users being basically in the attack state, so the popularity of malicious users tends to be fixed.  
In order to verify the relationship between the convergent reputation value of the honest users and the malicious users at the different attack probabilities, we carried out 2000 Monte Carlo simulations and the concrete results are shown in Figure 5. It can be seen that as the attack probability increases, the reputation value of honest users gradually increases and tends to be stable, while the reputation value of malicious users is gradually reduced and tends to be fixed. Therefore, we set the median of the reputation value of the honest users and malicious users to the decision threshold. We can see that with this median as the decision threshold, we can accurately distinguish honest users and malicious users.  
Figure 4: The change in reputation value of cognitive users with different attack probabilities with sensing intervals.  
It can be seen from Figure 5 that when the probability of attack is greater than 7%, the reputation value of malicious users tends to be stable. Combined with Figure 4, the malicious users with an attack probability greater than 7% can be defined as Class II malicious users, while the malicious users with an attack probability less than 7% can be defined as Class I malicious users.