Abstract:For the low attack detection rate and high computational complexity of the existing attack detection algorithm in wireless sensor networks, a new attack detection method based on clustering is proposed. The method uses the idea of sample halving, by which the halved two parts of the cluster averages are checked against each other. Under the same experimental conditions, the new algorithm is compared with the sample halving and the t-test method. Simulation results show that the performance of the new algorithm is better than the existing attack detection algorithm.