# A Crowd Cooperative Spectrum Sensing Algorithm Using a Non-Ideal Channel
## 4 Computer Simulations  
In this paper, we simulate the correct detection probability and the SUs' average utility with MATLAB R2012a, and compare the simulation results with the results of [4]. In the simulation scenario, 6 SUs are randomly distributed in the circle with a radius of 100 m. The coordinate of the PU is (0,0), and the base station's coordinate is (200,200) m. The sampling frequency of the SU \(f_{s}\) is set to 10 kHz. The sensing time cost \(c\) is set to 0.1 per millisecond, and the transmission power cost \(c_{s}\) is set to 0.01 per milliwatts. The incorrect reward \(k^{\prime}\) is 1/10 of the correct reward \(k\), and the target false alarm probability of SUs is set to 0.1. The transmission of signal is based on the empirical path loss model in large scale fading, and the fading coefficient is 2.5. The transmission power of the primary user is 40 mW, and the program runs 3000 times to get the average values.  
Figures 2 and 3 show the changes in the average utility and correct sensing probability of SUs with the reward \(k\). In Figure 2, the SUs average utility of the algorithm increases with remuneration, and is greater than of the comparison algorithm. The reason is that this algorithm is a utility expectation optimal algorithm. By maximizing the sensing time and signal transmission power, the utilities expectation of the SUs get the maximum value. However, the contrast algorithm did not consider the SUs' sensing time and transmission power, so the detective probability and error rate cannot be changed which means it can not get the optimal values. Therefore, the average utility of the SUs is greater than the contrast algorithm. From Figure 3, it can be seen that the correct probability of sensing is also increasing with the reward, and the correct probability of this algorithm is higher than that of the contrast algorithm. The reason is that with the increase of the reward, the number of people involved in sensing will increase, which can improve the correct probability. Because the average utility of this algorithm is greater than the contrast algorithm, the number of people involved in the sensing will be more than the contrast algorithm, so the correct probability is higher than the contrast algorithm.  
Figures 4 and 5 represent the changes in the average utility and correct probability of the SUs with the transmission power of the PU, and the reward \(k\) is set to 0.6. In Figure 4, the two curves are beginning to grow more clearly, and then more slowly. The reason is that when the transmission power of the PU is low, the SUs' acceptance of signal-to-noise ratio is low, the detection error is large, so the utilities are low. With the promotion of the power of the PU, the accuracy of the SUs is improved, so the utilities of the SUs are also improved. Because the reward \(k\) is constant, when the detection probabilities increase, the utilities of the SUs are close to the maximum utility that can be obtained, so the curves are relatively gentle behind. In can be seen from Figure 4 that the secondary user's average utility of this algorithm is greater than that of the contract algorithm. The reason is that this algorithm is a utility expectation optimal algorithm. By maximizing the sensing time and signal transmission power, we can get the maximum utility expectations of the SUs, so the average utility of the SUs is higher than that of the contrast algorithm. From Figure 5, we can see that two curves increase monotonously with the transmission power of the primary users. The correct probability of the algorithm is greater than that of the contrast algorithm. The reason is that the secondary user  
Figure 3: The change of the correct probability with the correct reward.  
Figure 2: The change of the SUs average utility with the correct reward.  
utility of the algorithm is higher than that of the contrast algorithm, so the number of participants is more, and the probability of correctness is higher.