## 1 Introduction  
Nowadays, wireless sensor networks (WSNs) are used in various application areas such as ecological monitoring, traffic control, healthcare, and industrial automation. A WSN contains sensor nodes that can sense the physical environment for data acquisition, data computation, and communication [1]. A sensor node has limited processing capabilities and contains signal-processing circuits, microcontrollers, and wireless transmitters or receiver antennas. Sensor nodes send their collected data to the base station (BS), if the BS is within communication range. Otherwise, the data are sent to other sensor nodes through routing protocols. A BS is a device that has more energy capacity, processing power, and memory than common sensor nodes. The batteries of the sensor nodes do not require recharging from the time these nodes are randomly deployed in the sensing fields. Therefore, prolonging the lifespan of a WSN is a hot research topic. The lifespan of a WSN can be measured by using certain parameters such as the time that all of the sensor nodes lose their transmitting capabilities (all dead). Various energy efficiency techniques can prolong the lifespan of WSNs, such as the following:  
* Energy-efficient routing protocols [2; 3]. * Duty-cycling [4] and medium access control (MAC) protocols [5; 6]. * Topology control [7; 8; 9; 10]. Energy efficient data aggregation schemes [11; 12; 13]. * Cross-layer optimization techniques [14; 15]. Routing techniques affect the energy conservation of sensor nodes since the communicating module of a sensor node consumes considerably more energy than the computing module [16]. The energy consumed during communication mostly depends on the distance between the sending and the receiving nodes. Therefore, many routing solutions have been proposed on how to optimize the distance. Clustering in hierarchical WSNs reduces the number of nodes, which send data to the BS. Several nodes form a cluster, and one of them is elected as the cluster head (CH). The CH collects information from normal nodes and sends aggregated data to the BS or to other CHs (Figure 1). Thus, CHs consume considerably more energy than normal nodes and die faster. The majority of clustering algorithms randomly select several sensor nodes as CHs. This random selection of CHs causes uneven energy consumption. Consequently, the energy load on every sensor node should be balanced in order to avoid a reduction of network lifespan. Many factors, such as the number of cluster members and their distance to the BS, can impact on the energy consumption of CHs [17]. Also, from a global viewpoint, the energy dissipation of the network is affected by the distribution of the CHs. For example, if the CHs are close to one another, energy dissipation will be unevenly distributed. The location of CHs affects network lifetime significantly. By relocating the CHs to better locations, network load can be balanced and lifetime can be prolonged. From another viewpoint, the ability of the sensors to sense a particular phenomenon is spatially limited. Most of the sensors must be in their location most of the time. Moving or relocating all the sensors (in the clusters) from their initial positions can cause two serious problems:  
* It is possible that the sensing of the phenomenon (in the whole area and throughout the time of interest) will not be done correctly. * It is possible that the sensor nodes will not have enough energy to move during the next round (a concept that will be discussed later). To this direction, the motivation of our work was to introduce an algorithm that will relocate a small number of CHs (usually 5-7 CHs in each round) in a hierarchical WSN in order to prolong network lifetime. In this article, we propose an algorithm (called _CH-active_) that relocates CHs. By moving to the center of masses, the CH minimizes the distance to the cluster members and saves energy during receiving. The CH also helps the other cluster members as they save energy (the distance decreases) while transmitting to the CH.