This paper proposes a clustering algorithm for wireless sensor networks with the goal of helping the cluster-based intrusion detection schemes to detect malicious attackers.It partitions the whole network into a set of clusters with each cluster sensing a similar phenomenon.The sensors within the same cluster are physically close to each other.This feature insures that the intrusion detection schemes can identify anomaly nodes more easily and can achieve a lower false alarm rate and a higher detection accuracy rate than the existing detection schemes.At the same time
it can also make innetwork processing simpler
so it can reduce the nodes power consumption and prolong the network lifetime.