# An Energy-Aware Method for Selecting Cluster Heads in Wireless Sensor Networks
## 3 Proposed Method
### Base Station Controlled Dynamic Clustering Protocol  
In this protocol, it is obvious that selecting an inappropriate cluster head reduces the lifetime because by eliminating the cluster header, the connection between cluster member nodes with the network is disrupted. Thus, it is indispensable to choose a suitable approach to select an appropriate cluster head. The base station controlled dynamic clustering protocol in [26] is a network layer routing protocol and considers energy and distance as essential factors between sensor nodes in cluster heads. The base station plays a critical role in this protocol. Although the protocol, as LEACH, carries out the clustering process in the local phase, the main task of the base station controlled dynamic clustering protocol, such as clustering, routing, and random rotation of cluster heads, is carried out by the base station. Each round of this protocol has two phases, the installation and data transfer stages. In the installation phase, the base station receives the data about the energy level of all nodes, and those with a higher energy level than the average energy level are inserted into a set \((S)\). Cluster head nodes in the current round are selected from \(S\). This selection ensures that nodes with sufficient energy are selected as cluster heads, and the other nodes with lower energy are used in other tasks. In this protocol, the base station utilizes the CSP algorithm to classify the nodes. In the transfer stage, however, the selected cluster heads collect data from the nodes, which belong to the particular cluster, and by using an optimal path determined by the base station, the data are transferred to the base station through the other cluster heads. After the end of each round, the base station forms a new set of cluster head nodes. There are three main reasons for which this protocol is more efficient than similar protocols. This protocol uses the balanced clustering technique to distribute equal load over all clusters. The CSP algorithm is utilized in each round of this protocol to select the cluster head with the maximum distance to the base station in order to distribute the cluster heads all over the environment. In this protocol, the most optimal route is used to transfer the data from the cluster head to the base station. The proposed method is based on the Base Station Controlled Dynamic Clustering Protocol (BCDCP). We use several key factors and the AHP method to select the most appropriate cluster heads. Moreover, computing the optimum number of cluster heads can enhance the BCDCP protocol. In fact, in this paper, we convert the cluster head selection problem into a multi-factor decision-making process. In this model, energy, mobility, distance to the centre, and the size of the data queue are considered as four essential factors. Then, we use the AHP and CSP algorithm to solve the problem. The installation (creating clusters) and data transfer are the two stages in each round of the clustering algorithms. In the proposed method, we use the data transfer method proposed in [26]. Therefore, we describe the installation stage as follows:  
1. Preliminaries: 1. The base station is located at a particular point, and it is far from the nodes of the network. 2. The primary energy of the sensor nodes is the same. 3. In the environment, there are several nodes with low mobility. 2. Energy model: In order to assess the efficiency of the cluster maintenance in WSNs, we use the energy model in [8; 9] with new parameters. These parameters are listed in Table 1.  
The energy to transmit a \(k\) bit message up to distance \(d\):  
\[ \begin{split} E_{TX}(k,d)&=E_{elec}(k)+E_{amp}(k,d) \\ &=\begin{cases}kE_{elec}+k_{efs}d^{2},&d<d_{0}\\ kE_{elec}+k_{mp}d^{4},&d\geq d_{0}\\ d_{0}=\sqrt{\frac{r_{efs}}{\epsilon_{mp}}}\end{cases}\end{split}