I. Introduction
In recent years, many authors have focused their investigations on wireless sensor network (WSN) lifetime improvement by mobilitybased technology. Some studies [1]–[2] tried to change the initial deployment of the network by mobile nodes; some other approaches [3]–[5] utilized MSs to collect data in order to enhance the sensing coverage, connectivity, and network lifetime as well. However, there has been little research work on WSN closed operating cycles to find an optimal solution for improving the network lifetime. Therefore, in this paper, we focus on extending the network lifetime by improving system energy efficiency in a closed cycle, including cluster head election, data collection, and data transmission.
It is known that in order to achieve efficient energy management, clustering is a promising technique by which all cluster member nodes (CNs) transmit their sensing data to a cluster head (CH) node before forwarding them to the MS. Furthermore, the energy resources and traveling time of an MS can also be limited. Therefore, it needs efficient energy use in order to collect the sensing data with minimum energy consumption, and within the predefined time deadline. In this paper, we also consider several problems of mobilitybased technology, such as where, when, and how to obtain sensing data while minimizing sensor node energy consumption in a given limited time.
It is proved that a CH will consume much more energy than the normal nodes. Therefore, the choice of the CH is highly critical for balancing the energy consumption among the nodes to increase the WSN network lifetime.
Many studies on CH election in WSNs [6], [7] in order to reduce energy consumption and prolong network lifetime have been performed. Lowenergy adaptive clustering hierarchy (LEACH) [8] is one of these wellknown clustering protocols. The key technology of LEACH is randomized rotation of local CHs to distribute energy among the nodes in the network. One normal node (n) may be a CH in the recent (t mod (1/p)) rounds with probability P:
(1) 
where p is the desired percentage of CHs, t denotes the current round, and Q indicates the set of nodes that have not been a CH in the last (1/p) rounds. As indicated in [9], LEACH can save energy consumption using a time division multiple access schedule. Unfortunately, this clustering protocol still has several shortcomings: (i) A single hop directly between a CH and the base station (BS) will be impossible with a large sensing field, and it may dissipate much energy for data transmission; (ii) it is unreasonable for load balancing when changing the CHs if it does not take into account the residual energy and geographic location of each sensor node; and (iii) it is not certain that CHs will be uniformly distributed throughout the network when a normal node is chosen to be a CH on the basis of a random number. Therefore, energy dissipation becomes inefficient. In order to overcome these shortcomings, some improved versions of LEACH have been proposed. The ImproLEACH algorithm in [10] is one example that can improve the network lifetime by modifying the LEACH threshold formula. In that study, a node that has higher residual energy (E_{r}), would have a higher probability (P(n)) of becoming a CH. This probability also depends on the number of times this node becomes a CH or vice CH (VCH), indicated by CH_{t} and VCH_{t}, respectively. Therefore, the authors in [10] tried to modify the LEACH threshold formula and improve the network lifetime by reducing the frequency of reclustering. In the steady phase, CHs also collect CNs’ information, which helps a CH choose a VCH in a later period of the steady phase. A CH will choose one sensor node that has the largest residual energy in the cluster to take over the CH role, and the selected node is called the VCH. In this way, it is proved that this approach can improve the energy balancing among nodes in the network. However, it still compares a random number with the probability to elect CHs as proposed in LEACH. Therefore, the method proposed in [10] does not overcome the drawbacks of the LEACH method.
Moreover, these methods are still essentially designed for CH election, and do not take into account the combination of energy consumption in each sensor node and the energy balance expenditure among nodes in the network. To eliminate this problem, we propose an efficient algorithm for choosing: (i) The number of clusters in a network, which guarantees energy balance among nodes; (ii) The best location of a single CH for each cluster, where the CH not only can receive data from all CNs with the minimum energy consumption, but also guarantees the energy balance among nodes in the network.
We also consider scenarios related to MS trajectory in mobile wireless sensor networks. Herein, an optimal trajectory of the MS is obtained when both minimizing energy consumption and the constraint time in data gathering are met. As proposed in [4], an MS is utilized to gather sensed data in the network. During data gathering, the residual energy information of the CHs is also collected by the MS for scheduling its next movement strategy. However, the MS always moves towards energyrich areas, thereby causing huge data delivery latency from those areas where more events occur. Another interesting idea for the data collecting schedule is proposed in [11]. In that study, Tashtarian and others proposed an energyefficient data collection algorithm that collects data in reporting by using the mixed integer linear programming mathematical model. However, if the MS has not enough time to visit all CHs in the network, the transmission ranges of all CHs must increase to create two or more “range overlapped” areas. Therefore, the MS can save its traveling time by moving to these range overlapped areas to collect data. Unfortunately, the energy consumption of the CHs increases exponentially as their radio transmission ranges grow. The long radio transmission range may disrupt communications and increase the data transmission delay. Moreover, it is not reasonable when all CH transmission ranges increase at the same level while they have different residual energy. Therefore, in our approach the CH transmission ranges are increased only after maximizing the speed of the MS, and the transmission range of each CH will be increased on the basis of its residual energy.
In the literature, some authors utilized the traveling salesman problem (TSP) to find the optimal trajectory of the MS [12], [13]. In these works, a node may be visited more than once before all other nodes are visited. However, in our model, we keep the original TSP technique to find the optimal trajectory, but the time cost of the MS is total time for moving and collecting data. In this paper, we investigate the problem of controlled mobility to find optimal movement strategy for the MS, which can reduce the total communication cost within a predefined reporting time for each data transmission round.
The contributions of this paper are highlighted as follows:

• We performed a detailed review of the literature about CH election, and utilizing mobility technology in WSNs, which constitute the main features of this study.

• Unlike previous solutions for CH election (CHE), our proposed CHE algorithm tries to find the best candidate node to become a CH for each geographical region, which has both high residual energy and low communication cost. This enables us to investigate the effect of residual energy and balanced energy among nodes on network lifetime improvement. The average improvement in network lifetime of CHE versus the ImproLEACH and LEACH algorithms is up to 10.64% and 26.2%, respectively.

• In this paper, we introduce some solutions to find the optimal trajectory of the MS. The optimal movement strategy (OMS) algorithm exhibits better performance than conventional strategies. The simulation results show that our proposed OMS algorithm can improve the lifespan of the network compared with random, static, and fixedtrajectory scenarios.
The remainder of the paper is organized as follows: In Section II, we describe the system model and its basic assumptions. Section III describes the proposed algorithm. The performance of our algorithm is analyzed and compared to the traditional algorithms in Section IV. Finally, in Section V, we conclude this paper and discuss some directions for future work.
II. System Model and Assumptions
1. Basic Assumptions
Before presenting our algorithms, we first specify the general assumptions about the WSN model we used in this study.

• We consider a network with N homogeneous sensor nodes randomly distributed. They have a limited initial energy E_{0} and are stationary after deployment.

• An MS node can travel freely in the sensing field with unconstrained energy and storage capacity. During the moving time, the MS does not receive any data packets, because the CHs transmit their data only when they can communicate directly with the MS. We assume that the MSs periodically returns to the support center for recharging. Therefore, the energy consumption of the MS operation and movement does not affect the network lifetime.

• The geographic position of the network nodes is known to the MS and used to find the optimal trajectory of the MS.

• In this study, we define the network lifetime of a sensor network as the number of rounds until a certain percentage (ϕ = 85%) of the network nodes run out of power.

• CHs transmit their buffered data to the MS during a specified interval time called the reporting time ξ.

• To evaluate the network lifetime, round (T_{г}) is a cycle in which the MS successfully receives sensed data from all nodes in the network:

(2) 
where ς indicates the cluster election time for M areas, τ_{i} is the data collection time from sensor node S_{i} to its corresponding cluster head node CH_{i}, t_{i} indicates the period of time the MS stops at CH_{i} until all buffered data can be collected, and σ is the total traveling time of the MS.

• Each sensor node generates a data sample of an mbit data packet every round and needs to transmit it to its CH.
2. Network Model
Figure 1 briefly presents a network structure with N = 30 sensor nodes deployed randomly in the area of interest A. For clustering purposes, area A is divided into M = 6 equal parts {A_{1}, A_{2}, … , A_{M}}. The number of subareas (M) depends on the size of the monitored area and the node density (ρ), which guarantees that there is no need to send more than one MS to a CH for data gathering.
Our objective is to find the best candidate nodes for CH election, which can minimize the communication cost and balance the energy consumption among all sensor nodes in the network. On the other hand, we also find the optimal movement strategy for the MS, which helps the MS to collect sensing data from all CHs with minimum energy expenditure and within a desired time deadline.
3. Energy Model
Similar to [14], we use a simple model for the radio hardware energy dissipation to calculate the energy consumption. According to whether the distance d between source node and the destination node is shorter or longer than a threshold distance ${d}_{0}=\sqrt{{\epsilon}_{\text{fs}}/{\epsilon}_{\text{mp}}},$ a free space or multipath fading channel model will be used, respectively. ε_{fs} and ε_{mp} denote the free space and multipath transmitter amplifier model, respectively. The amount of energy E_{TX} will be consumed at the source node, if it transmits an mbit data packet over a distance d to the destination node. It can be calculated by
(3) 
where $\{\begin{array}{cc}\epsilon ={\epsilon}_{\text{fs}};\chi =2\hfill & \text{if\hspace{0.17em}\hspace{0.17em}}d<{d}_{0},\hfill \\ \epsilon ={\epsilon}_{\text{mp}};\chi =4\hfill & \text{otherwise}.\hfill \end{array}$
E_{elec} is the electronic energy, which depends on the digital coding, modulation, filtering, and spreading of the signal. E_{amp}(m, d) is the energy needed by the radio amplifier circuit to send m bits d meters. To receive an mbit data packet, the destination node also has to expend E_{RX} amount of energy, calculated as
(4) 
The load L_{k}(t) of node S_{k} during round t is the total power that the node consumes to receive and transmit data in that round.
(5) 
The lifespan of one sensor node T_{k} refers to the time when its residual energy is less than a threshold (θ). Thus, we have
(6) 
It is clear that the higher the load L_{k}(t), the shorter the lifetime of node S_{k}. Hence, minimizing the network load and improving the load balancing among the WSN nodes are prerequisites for achieving the maximum network lifetime.
III. Proposed Approach
1. Cluster Heads Election Algorithm
In this subsection, we focus on the CH election, which helps to save sensor node energy power and prolong the network lifetime. To do this, the CHs should be spread evenly [15]. Therefore, in this study, the sensing field was divided into M equal regions A_{i}, {1 ≤ i ≤ M}. These regions are called clusters, and the CH election is performed within each geographical region. For simplicity, without loss of generality, we focus on CH election for N_{k} sensor nodes randomly deployed in region A_{k}. To begin the CH election procedure, every node broadcasts a “HELLO” message to the network by a controlled flooding method. The format of the “HELLO” is shown in Fig. 2.
After receiving the “HELLO” message from source node S_{k}, one sensor node S_{c} can know whether it is inside or outside the S_{k}’s region by comparing its location with S_{k}’s position. If it is outside the region, it will simply drop the message. If it is inside, the prior values (PV_{k}, PV_{c}) will be compared with each other (these parameters described later in (8)). If PV_{c} ≤ PV_{k}, S_{c} will not broadcast its “HELLO” message and only rebroadcast S_{k}’s “HELLO” message. Otherwise, S_{k}’s “HELLO” message will be dropped and S_{c} will broadcast its own “HELLO” message to the region. As a result, one sensor node knows the ID and location of its CH, whose prior value is the highest in the region. After becoming a CH node, it will announce itself as a CH by broadcasting a CH announcement message (CHAM) to the network. This CHAM contains the CH node’s ID and location. After receiving these CHAMs, one normal sensor node will choose the closest CH (S_{k}) as its CH node. This enables some sensor nodes, which are in other regions but closer to the CH S_{k} than the CH in their regions, to join S_{k}’s cluster in order to reduce their energy consumption. The shortest path routing from each cluster node to its CH will be found for data transmission purposes. In order to gain efficiency in using the CH election method, we state the following Definition:
Definition 1: Assuming that N_{i} sensor nodes are deployed randomly over a subregion of interest A_{i}. E_{k} indicates the residual energy of node S_{k}. l_{k} is the total length of the shortest path routing from node S_{k} to all (N_{i} − 1) nodes in A_{i}. The energy expenditure of one cluster can be minimal if and only if the candidate node S_{k} has
In practical applications, it is not easy to find one candidate node that satisfies (7) in a large area with a large number of CNs. Therefore, in this study, one candidate node will be a CH if it has a maximum priori value, given as
(8) 
where α, β are positive real numbers such that α + β = 1. These are the weighting factors, which are found heuristically in the course of the optimization. Note that the relative importance of the objectives depends on these heuristic constants α, β. In our numerical tests, we ran the CHE algorithm 1,000 times for each set of values (α, β). The most profitable values of (α, β), which are the best balance between l_{k} and E_{k}(t), were chosen for the subsequent simulations.
The CH election procedures for each area can be described in more detail by following the steps of CHE algorithm. In Fig. 3, we illustrate an example CH election process for subarea A_{1}. Figure 3 depicts the sensor deployment of N_{1} = 6 sensor nodes in the area A_{1} with the percentage residual energy.

Algorithm 1. CHE algorithm

Step 1. Compute the shortest path ${\Re}_{k\lambda}^{s}$ from a single source node (node S_{k}) to (N_{i} − 1) normal nodes in A_{i} where k = {1, … , N_{i}}; λ ={1, … , N_{i} − 1} λ ≠ k.

Step 2. Calculate the total length of the shortest path from node S_{k} to (N_{i} − 1) normal nodes in the subregion of interest.

${l}_{k}={\displaystyle \sum _{\lambda =1}^{{N}_{i}1}{\Re}_{k\lambda}^{s}},k=\left\{1,\text{\hspace{0.17em}\hspace{0.17em}}\mathrm{...}\text{\hspace{0.17em}\hspace{0.17em}},L\right\},\lambda \ne k$

Step 3. Calculate the priori value PV_{k} for each node

$P{V}_{k}=\left\{\alpha {\displaystyle \frac{1}{{l}_{k}}}+\beta {\displaystyle \frac{{E}_{k}(t)}{{E}_{0}}}\right\}.$

Step 4. A normal node S_{k} becomes a CH for the subarea (A_{i}) if PV_{k} = max{PV_{1}, PV_{2}, … , PV_{Ni}}.

Step 5. Repeat Steps 1through 4 until CH election for all subareas in the network.
In this example, we set (α = 0.2; β = 0.8). The priori values of all sensor nodes were calculated, and are given in Table 1.
Table 1.
Node ID  Node location  E_{i}(t) (%)  l_{i}  Priori value 

S_{1}  (16, 10)  90  35.2  0.726 
S_{2}  (25, 7)  75  33.8  0.606 
S_{3}  (18, 14)  80  36.1  0.646 
S_{4}  (26, 12)  60  35.6  0.486 
S_{5}  (31, 7)  75  40.0  0.605 
S_{6}  (29, 16)  70  40.7  0.565 
In this example, with the highest priori value, node S_{1} is chosen as the CH, and the shortest path routing of this cluster is described in Fig. 3.
By analyzing the simulation results, we can state several key features of our proposed CHE algorithm: First, uniform distribution of CHs in each geographic region causes more efficient energy use and balanced load in the network. Second, the number of CHs increases with the size of the monitored area. Therefore, it can reduce the packet drop rate and prevents the black hole problem. The last and the most important feature is that one normal node can be elected as a CH depending not only on its residual energy but also on the cluster’s communication cost.
2. Optimizing the Trajectory of the Mobile Sink
In this section, we present the MS trajectory optimization (MSTO) algorithm, whose basic idea is to investigate the path with the smallest time spent on traveling and gathering data. To facilitate the MSTO algorithm, we first introduce the following theorem, which helps to construct the infrastructure of the MSTO algorithm.
Theorem 1: Let K_{min} denote the number of MSs used in data collection; ξ_{0} is a threshold of reporting time, and R indicates the data transmission rate of the MS. It will be an efficient data gathering scheme without loss of sensed data if and only if
(9) 
where ℜ(t) is the total shortest path length of M CHs in the network and v(t) is the velocity of the MS at current round t.
Proof. In order to collect data effectively, all monitored data should be collected in time to avoid the buffer overflow problem occurring at CHs. Thus, the reporting time at every cycle time ξ(t) must remain static at the desired value ξ_{0}. Its value at instant round t can be calculated by
(10) 
If cluster of CH_{i} has V_{i} CNs and R indicates the data transmission rate between a CH node and the MS, the time spent by the MS for data collection at CH_{i} will be
(11) 
where m denotes the data packet size generated by each sensor node in one round. Total traveling time σ(t) of the MS at the current round t can be computed as
(12) 
By inserting (12) and (13) into (11), the reporting time can be rewritten as
(13) 
Thus, the total time spent by K_{min} MSs is given as
(14) 
▄
If ξ_{0} is high enough, a single MS with constant velocity can harvest all the captured data from M CHs in order to reduce the communication cost. Unfortunately, in practical applications, this is not enough time for data collection. In this situation, we have two scenarios to solve this problem: (i) Scenario 1. Change the speed of a single MS; (ii) Scenario 2. Utilize more than one MS to collect data.
The problem here is how to reduce the total length of the MS’s trajectory in order to minimize the execution time and the energy dissipation for data collection [16]. With these definitions, the optimal trajectory of the MS can be formulated as follows. Objective:
(15) 
Subject to:
Constraint (C1) ensures that there is no need to send more than one MS to one CH at the same time for data gathering. Constraint (C2) restricts the data collection time from one CH to the MS. Finally, (C3) is the shortest path routing between M CHs in the current round (t). According to (15), the velocity of the MS or the number of MSs will be calculated depending on the chosen scenario.
Scenario 1. In this scenario, a single MS (K_{min} = 1) moves along the shortest path of all CHs to collect sensed data. Its velocity v(t) will now vary according to the change of the shortest path length ℜ(t):
(17) 
However, if ℜ(t) is too long and v(t) may be greater than a predefined speed v_{max}, the speed of the MS will be kept at v_{max} in these cases. The data transmission range of some CHs can then be changed in order to reduce the total length of the shortest path of CHs. Unfortunately, the larger a CH’s radio transmission range, the longer the process of data packets toward their final destinations. Therefore, the energy dissipation by each CH with the radio transmission range grows exponentially as given in [17]. The problem here is determining which CHs must increase their transmission ranges. To answer this question, we present a solution that can find the best data collection places for the MS after changing the transmission range of each CH. This provides better results than the approach proposed in [11], which may lead to an imbalanced energy dissipation of the sensor nodes in a WSN when the transmission range of all CHs are increased equally.
For simplicity, we consider a sensing field with six CHs as depicted in Fig. 4. As shown in Fig. 4(a), if the total length of the MS’s trajectory (ℜ(t) = O_{1}O_{2} + O_{2}O_{3} + O_{3}O_{6} + O_{6}O_{5} + O_{5}O_{4} + O_{4}O_{1}, where O_{i} denotes the best place for the MS to gather data from CH_{i}), is less than the longest length (ℜ_{max} = ξ_{0} * v_{max}), the MS needs only to change its speed in order to collect the data in time. Otherwise, the communication range of each CH will be changed in order to decrease the MS’s trajectory. In this case, two parameters are recomputed: the new transmission range of each CH and the new optimal trajectory of the MS.
A. Evaluating CH Transmission Range
Let us assume that E_{i}(t) is the residual energy of CH_{i} with N_{i} CNs at the current round (t), and E_{DA} is the energy consumption for data aggregation. The maximum distance that CH_{i} can transmit N_{i}m bits to the MS is
(18) 
The transmission range (tr_{i}) of the CH_{i} will be increased by
(19) 
where ƛ is a coefficient that increases from 0 to 1. According to (19), the increase in radio transmission range of each CH depends on its residual energy. Thus, it guarantees the energy balance among sensor nodes in the network.
B. Evaluating the Best Data Collection Places for the MS
If ℜ(t) > ℜ_{max}, the coefficient ƛ will be increased from 0 to 1 in order to increase the CHs transmission ranges until ℜ(t) = ℜ_{max}. For each increase in step, the trajectory of the MS will be recomputed, and the best data collection places for the MS now are H_{i}, i = 1, … , 6. The change in the MS’s trajectory is shown in Fig. 4(b). After changing the CHs’ transmission ranges, the total length of the MS’s trajectory now can be calculated as follows. ℜ′(t) = H_{1}H_{2} + H_{2}H_{3} + H_{3}H_{6} + H_{6}H_{5} + H_{5}H_{4} + H_{4}H_{1}. It is easily proven that ℜ′(t) ≤ ℜ_{max}, and if ℜ′(t) = ℜ_{max}, the real transmission range of the CH_{i} will be r_{i}′ = O_{i}H_{i}.
Scenario 2. In this scenario, the velocity of the MSs is kept constant at a low level, and the number of MSs needed for data gathering is K_{min}:
(20) 
where ℜ_{i}(t) is traveled path length of the MS ith.
Hence, the main problem is how to schedule the movements of K_{min} MSs, which start and end at a single depot, to visit all CHs within the desired time deadline. We assume that this single depot is the network control center (NCC), which can monitor and control all operations in the system, including number, velocities, and trajectories of the MSs in order to avoid conflicts among them. In this study, the NCC is located at the center of the network field. Similar to the multiple traveling salesman problem (mTSP) [18], each CH must be visited exactly once by an MS in each round.
The strategy of each MS is optimized by minimizing the total cost traveled and within the reporting time. For simplicity without loss of generality, the mTSP in this case can be determined on a graph G = (V, E), where V is the set of M CHs and E is the set of edges. Let C = (t_{ij}) denotes a cost (execution time for data propagation and the MS’s traveling from node i to node j) matrix associated with E. We define the following binary variable:
Then, a general scheme of the assignmentbased directed integer linear programming formulation of the mTSP for one MS(kth) can be given as
(22) 
M_{k} is total number of CHs is visited by MS kth; subject to:
(23) 
(24) 
(25) 
(26) 
(27) 

Algorithm 2. MSTO algorithm

1: Start tour T_{k} for MS_{k} by setting T^{k}_{ex} = 0 (T^{k}_{ex} is the best improvement so far for total execution time of MS_{k}).

2: Estimate the T^{k}_{ex} if choosing the closest (CH_{c}) to the NCC, which is unvisited by an MS, for the next stop of the tour. T^{k}_{ex} = T^{k}_{ex} + t_{p} + t_{c} + (d_{p,c}/v), where d_{p,c} is the distance between CH_{p} and CH_{c}, v is the velocity of the MS, and tp, tc are the total time spent by an MS to collect data from CH_{p} and CH_{c}, respectively. a) If T^{k}_{ex} < ξ_{0}, reject the CH_{c} and continue estimating with the further CH. If all choices ((M − 1) choices) are exhausted without profit, return to Step 1 with a better starting point. b) Otherwise, accept the CH_{c}, add it to the tour, and mark this CH as a visited point of the MS.

3: Repeat Step 2 in order to increase the length of the tour, as long as the execution time criterion T^{k}_{ex} ≤ ξ_{0} are satisfied.

4: Check if all CHs are visited. If not, increase the number of MSs k = k + 1 and return to Step 1. If yes, terminate the algorithm.
Constraint (23) forces every CH to be visited once. Constraints (24) and (25) imply that no more than K_{min} MSs are employed for data collection. Constraint (24) ensures that it is not necessary to use more than one MS to collect data at one CH.
Figure 5 illustrates the MSs’ trajectories in three sample rounds (t_{1}, t_{2}, and t_{3}). In round t_{1} (see Fig. 5(a)), the distances between MSs are rather far; therefore, four MSs are utilized to collect data from all CHs in order to finish this work within ξ_{0}. In rounds t_{2} and t_{3}, as shown in Figs. 5(b) and 5(c), these distances are closer and the number of MSs is smaller at two and three MSs, respectively. We now present an outline of the basic heuristic algorithm to find the optimal trajectory of the MS. The procedures of the MSTO algorithm are explained in Algorithm 2.
3. Optimal Movement Strategy for Mobile Sink
In this section, we provide details of the optimal movement strategy (OMS) for an MS. The pseudo code of the OMS is presented in Algorithm 3.

Algorithm 3. Optimal Movement Strategy for MS

1: While min {E_{k}(t) ≥ θ} do

2: CHE by the CHE algorithm.

3: CHs broadcast announcements and one normal node will join the cluster whose CH is nearest to its position.

4: According to the shortest path routing, normal nodes will transmit or forward data to their CHs.

${E}_{k}(t)={E}_{0}{L}_{k}(t),\text{}k=1,\text{\hspace{0.17em}\hspace{0.17em}}\mathrm{...}\text{\hspace{0.17em}\hspace{0.17em}},N.$

5: Compute the minimal spanning tree routing between M CHs in the sensing field.

6: Choose the scenario on the basis of the total shortest path length, and the requirement of reporting time:

7: Find the optimal trajectory of the MS(s) by the MSTO algorithm.

8: After collecting sensed data from all CHs, increase the number of rounds for estimating the network lifetime t = t + 1; go back to Step 1.

9: End While
IV. Performance Evaluation and Discussion
In this section, we provide simulation results of our algorithm performed in a MATLAB environment.
1. Simulation Environment
In our simulations, the parameter settings are summarized in Table 2. One normal node is called a “dead node” if its residual energy is less than θ = 0.1 mJ.
Table 2.
Parameter  Value 

Node deployment  Random and uniform 
# initial energy (E_{0})  0.1 J 
E_{elec}  50 nJ/b 
ε_{fs}  10 pJ/b/m^{2} 
ε_{mp}  0.0013 pJ/b/m^{4} 
Maximum speed of MS (v_{max})  25 m/s 
MSs’ velocity in Scenario 2: (v2)  15 m/s 
Packet length (m)  4,000 bits 
Transmission range (tr)  30 m 
Data transmission rate (R)  250 kb/s 
Reporting time (ξ_{0})  60 s 
2. Numerical Results and Discussion
A. Cluster Head Election Performance Analysis and Experimental Comparison
For using the CHE algorithm efficiently, we conducted some experimental studies in a static network. N = 150 sensor nodes were deployed in an area of 300 × 300 (m^{2}). A single static BS was located at B_{1}(150, 350). Herein, for comparison between methods, after collecting data from the sensor nodes, each CH node transferred its data to the BS directly.
We first ran simulations with different values of (α, β) to find the best profit weighting factors (α, β). The simulation results, are given in Table 3, indicated that the set (α = 0.6, β = 0.4) is the best solution with the highest network lifetime. Therefore, we used these values of (α, β) in the subsequent simulations.
Table 3.
α  β  # of rounds  α  β  # of rounds 

0  1.00  1,008  0.55  0.45  1,528 
0.10  0.90  1,167  0.60  0.40  1,602 
0.15  0.85  1,195  0.65  0.35  1,554 
0.20  0.80  1,248  0.70  0.30  1,536 
0.25  0.75  1,281  0.75  0.25  1,568 
0.30  0.70  1,316  0.80  0.20  1,521 
0.35  0.65  1,363  0.85  0.15  1,430 
0.40  0.60  1,405  0.90  0.10  1,312 
0.45  0.55  1,491  0.95  0.05  1,217 
0.50  0.50  1,512  1  0  831 
The better performance of the CHE algorithm was evaluated and compared with the method proposed in [8] and [10], when changing the network size. It is proved that LEACH can prolong the network lifetime when compared with direct transmission and minimumtransmissionenergy routing. However, as can be seen in Fig. 6, the network lifetime of the LEACH algorithm is limited to t = 1,261 (rounds), whereas for the CHE algorithm, this number is t = 1,631 (rounds). Therefore, our proposed CHE algorithm can improve the network lifetime up to 29% compared with the LEACH algorithm. Meanwhile, the ImproLEACH proposed in [10] has better results with 1,454 (rounds) than LEACH algorithm. With 177 more rounds, CHE can prolong the network lifetime up to 12% compared with ImproLEACH. However, it is worth to noting here that our algorithm has more balanced energy consumption among all sensor nodes, and the network continues to work with a high number of live nodes to the last round.
In the LEACH and ImproLEACH algorithms, the number of dead nodes increases over time. For evaluating the CHE, ImproLEACH, and LEACH algorithms, we conducted experimental studies with different numbers of sensor nodes (varying from 50 to 500), which were deployed randomly in the sensing field of 300 × 300 m^{2}.
The network lifetime improvement L_{i} in these experimental studies can be computed as (28)
(28) 
The results of the network lifetime comparison are summarized in Fig. 7. It can be seen that the CHE algorithm has a longer lifespan than the LEACH and ImproLEACH algorithms in most of the cases. The improvement achieved in network lifetime by the CHE algorithm is 26.2% and 10.64% compared with the LEACH and ImproLEACH algorithms, respectively.
B. Performance Analysis of the Mobile Sink Trajectory Optimization Algorithm
In this subsection, we evaluate the performance of two scenarios of the OMS algorithm (we define scenario 1 as OMS1 and scenario 2 as OMS2) by comparing them with two other conventional strategies: (i) static sink, where a stationary sink node is located at the center of the network B_{0}(150,150); (ii) random moving strategy, where an MS moves randomly in the sensing field; and (iii) MSs moving along the boundary of the network as proposed in [19].
Figure 8 depicts the comparison of the network lifetime between these five schemes. It is clear that with increasing node density, the network lifetime of each scheme decreases, because the more sensors, the more data reported to the BS. However, a small number of sensor nodes deployed over a larger geographic area means a longer distance between sensor nodes, thus reducing the network lifetime. As shown in Fig. 8, our proposed schemes (OMS1 and OMS2) have longer lifetimes than the three other strategies because with the controlled mobility, OMS1 and OMS2 avoid the hotspot problem completely, which is the main reason for short network lifetime in the stationary scheme and fixedtrajectory attempt. In the random scheme, the MS randomly moves in the sensing field, therefore, it cannot guarantee balanced energy consumption among sensor nodes in the network.
The OMS2 scheme provides better performance, and the network lifetime in this scheme is always higher than that in the OMS1 scheme. However, it is rather expensive to equip more than one MS in the network. Thus, each scenario of the OMS algorithm should be chosen depending on the specific application requirement.
V. Conclusions
In this study, we examined the optimization problem for maximizing network lifetime in WSNs by CH election and finding the optimal trajectory of the MS. Our investigation was based on the number and location of CHs in each round to optimize the travel paths of the MSs. The experimental results demonstrate that our proposed CHE algorithm can greatly extend the network lifetime by 10.64% to 26.20% compared with the ImproLEACH and LEACH algorithms, respectively. Moreover, in optimizing the MS’s trajectory, our proposed OMS algorithm with two scenarios adapts well to the different network sizes, and improves the network lifespan and exhibits better performance than the random, stationary, and fixedtrajectory schemes.