Secure Cluster-Head Selection Algorithm Using Pattern for Wireless Mobile Sensor Networks

: Selecting a cluster head (CH) in wireless mobile sensor network is a crucial task. Numerous algorithms have been presented for this purpose in recent literature. In these algorithms, all nodes are permitted to contend in CH selection process regardless of their less resource. This meaningless participation of ineligible nodes in the CH selection process causes unnecessary communication cost. Similarly the use of real data for CH selection increases communication cost. Additionally, no one algorithm has focus in security aspect of CH selection process. In this article Pattern Based secure CH Selection algorithm has been presented. This algorithm filters the ineligible nodes, puts them to sleep mode thereby restricting them from not participating in the CH selection process. Additionally the uses of pattern instead of real data in CH selection decrease communication cost and increase security of CH selection process. The simulation results show the improvement in lifetime and enhancement in security of CH selection.


INTRODUCTION
With the rapid and historic advancement in communication technologies over the last two decades, the Wireless Sensor Networks are matured enough as a capable tool for monitoring the physical world [15]. These networks consist of hundreds or even thousands of autonomous micro devices called "motes" or simply sensor nodes with some sensing, processing and communicating capabilities. A typical wireless sensor network consists of a collection of static sensor nodes, mobile sensor nodes or a mixture of static and mobile sensor nodes which can communicate with each other for transferring data efficiently. The wireless sensor networks whose all or some sensors have the capability of movement around the deployed area are called Mobile Wireless Sensor Networks (MWSN).
The nodes are limited in terms of processing power, storage space and most importantly the energy resources. The energy minimization and routing are the two major limitations of a static as well as mobile WSN due to the moving sensors. Mobile sensor nodes consume more energy than static nodes because they have to move around the network, hence such type of nodes faces severe energy dissipations [2].
The sensors are usually installed in a vast variety of environments where human access is almost impossible and monitoring of specific events become difficult. The sensor networks are ideally used in commercial, civil and military applications for continuous event detection and location sensing which include surveillance, vehicle tracking, climate and habitat monitoring, intelligence, medical, and acoustic data gathering or monitoring of natural or man-made crises like severe weather, earthquakes, volcanic activities and WAR field monitoring [3].
The energy consumption of a node in a sensor network is directly linked to the life time of the network. As human access to the network nodes is difficult and it may be impossible to retrieve these large number of nodes in order to replace or recharge the batteries. In this perspective the key challenge in sensor networks is to maximize the lifetime of an individual node which contributes to the overall network life time. In any network the node energy is consumed for three main purposes such as data transmission, signal processing and computations. Data transmission among these has higher energy consumption. Therefore, along with computational operations of nodes, the communication protocols used by the network must be made as energy efficient as possible.
Researchers have put a lot of efforts to develop best suitable energy efficient protocols in WMSN in order to enhance the lifetime of the network which is the time from the deployment of sensor nodes till the death of the first node in the network. The hierarchical [2] protocol segregates the network nodes into sub sections called clusters. Each cluster of the network contains the cluster head and cluster members. The cluster member nodes are responsible for gathering information from the environment and send this information to the relative cluster head where redundant data is fused and then passed to the base station directly or through other cluster heads. This illustrates that the redundant data do not need to be communicated more than once to the base station and hence the energy is preserved by decreasing the number of communicating messages. The example of hierarchical protocol is low energy adaptive routing protocol (LEACH) [7].
The introduction of node mobility in wireless sensor networks brought a new set of challenges like resource management, routing, topology organization, energy consumption etc. Therefore the protocols which are designed for static WSN are not capable to be applied without modification in mobile WSN. These algorithms should be designed in such a way that the maximum throughput is with minimum energy utilization. Being a part of clustering, Cluster Head selection has remained the main focus in these algorithms for WMSN. With the advent of mobile WSN it has been observed that these protocols need to consider different mobility metrics for CH selection process [4].
In such case the nodes with lower energy level are not likely to be selected as CH, but still these nodes take part in the competition of CH selection in each round and consume unnecessary energy. In this scenario, though they cannot be selected as a CH because of strong competitors they consume energy by executing the CH selection algorithm and exchange messages unnecessarily. If this process continues in each round the nodes with lesser energy will die more quickly. Secondly the above algorithms do not consider the mobility speed and direction of CH node relative to other sensor nodes. Also the nodes whose movements are relatively fast should not be selected as CH, so that premature and frequent CH selection process can be restricted and optimal energy dissipation can be achieved. To minimize the unnecessary energy utilization in above two cases, the nodes should be identified before CH selection phase begins.
Furthermore, the CH selection process depends on the real data of node like residual energy, relative distance and mobility. The transmission of real data has high communication cost. There is need to use less size data for CH selection process. CH is responsible of overall cluster functionality and that way it is more vulnerable to attacker. Additional without security mechanism, the exchange of real data among node for CH selection is open to malicious nodes. The use of security algorithm further increases the communication cost. There is a need of secure CH selection algorithm without use of any security scheme.
We propose a secure pattern based energy efficient CH Selection algorithm which considers both CH selection and security concepts together in cluster-based MWSN. The major objectives of our proposed scheme are to restrict ineligible node for not participating in CH selection process and secure the CH selection process. These objectives should be achieved by using less energy than traditional schemes and increase network lifetime. Also pattern usage makes it difficult for the anomaly nodes to differentiate between the data and the pattern code, thereby preventing the anomaly nodes from taking part in the cluster head selection process without keys distribution.
The rest of the paper is organized as follows. Section 2 provides the literature review of some well-known Cluster Head selection algorithms for mobile WSNs. Section 3 describes the network model and assumption. Section 4 describes the sleep mode. Section 5 presents the proposed scheme. Section 6 presents the energy consumption model and section 7 discusses mobility model of our scheme. Section 8 describes the simulation results of our proposed scheme and section 9 discusses the security analysis of the proposed scheme.

LITERATURE REVIEW
In this section we are going to discuss different cluster head selection algorithms specifically designed for mobile WSN. Before going to discuss these algorithms, we need to illustrate the LEACH [7] algorithm for static WSN, because some of the recent algorithms specially designed for mobile WSN are based on LEACH protocol. The LEACH round consists of two phases i.e. set-up phase and steady-state phase.
In set-up phase the CHs are selected probabilistically and then the member nodes join their respective CH to form the clusters. In this process each node generates a random number between 0 and 1 and then compares the threshold value with T(n) which is calculated by Eq. (1) given below where P is the percentage of cluster heads over the total number of nodes, r is the number of round of selection of CH, and G is the number of nodes that are not selected as CH in previous 1/P rounds. Do-Seong and Yeong-Jee Chung developed the LEACH-Mobile protocol [5]. This algorithm ensures that each mobile sensor node is able to communicate with a specific cluster head and reorganize the cluster accordingly. But on the other hand the CH cannot be a mobile node after selection. LEACH-Mobile does not consider the fact how to cope with such situation.
G. Santhoosh Kumar et al. presented the LEACH-ME [6] as an enhancement of LEACH-M. To consider the fact that CH may move to another cluster at some time due to the mobile nature of the nodes, LEACH-ME proposes a modification in CH selection process which considers the node mobility as well. Therefore in LEACH-ME the nodes maintain some additional information for managing node mobility, role, mobility factors, member list and TDMA Schedule.
Chuan-Ming Liu et al. [3] presented a distributed cluster head election algorithm which focuses on the counting of CHs to be selected in a specific round. The performance of this algorithm varies for mobility model being used.
In [4] the authors proposed a mobility-based clustering (MBC) in which cluster head is selected on the basis of residual energy and mobility. Every non-CH node makes link stability with a CH during cluster formation according to the estimated connection time. So this made a node to avoid more packet loss when it has lost or is going to lose its connection with its cluster head.
R. U. Anitha et al. proposed an energy efficient cluster head selection algorithm for WMSN [20]. In this scheme the authors introduced the sink node and gateway nodes which are static and the rest of the nodes are mobile. Different factors ensure the selection of such a node as CH which has average mobility and residual energy belonging to a dense area as well.
A. Ahmad and S. Qazi proposed LEACH-MAE [1] as an extension of LEACH-M by considering the residual energy of each individual sensor node in a particular round for CH selection. This scheme also proposed that all the sensor nodes in the mobile network should follow a mobility pattern which can improve the performance of the network.
In [27] is proposed a scheme (E2R2) which divided network in clusters using three parameters. Every cluster contains one CH, and the CH is helped by two nodes, which are additionally called cluster management nodes. The author examines the execution of the proposed scheme through simulation and comparison with M-LEACH. The proposed convention beats M-LEACH regarding lifetime and throughput. Similarly Topology Control for node Mobility (TCM) [28] is an efficient clustering algorithm, which supports sensor node movement.
Ma Changlin [14] proposed a new clustering algorithm which is based on difference ratio of residual energy. The residual energy difference ratio is calculated using residual energy of sensor nodes and average residual energy of network, which prevent nodes with low residual energy being selected as cluster heads.
There is quite adequate opportunity to work on energy efficient clustering in the area of MWSN. Some energy efficient CH selection algorithms [29,30,31] have been presented, but most of them do not consider the security aspect of CH selection process. So a secure and energy efficient cluster head selection method is necessarily required to reduce energy consumption for the achievement of better performance in MWSN. To overcome the identified issues, we have proposed a Pattern Based Energy Efficient Cluster Head Selection Scheme. The major objectives of the proposed scheme are to identify ineligible nodes for CH selection in advance and prevent them to not take part in the CH selection competition. Also to use smaller size pattern instead of large size real data of nodes for CH selection and as a result reduce resource consumption. Further, the CH selection process should be secure, without use of any security scheme.

NETWORK MODEL AND ASSUMPTIONS
In our proposed scheme, we have assumed a network model in which the sensor nodes and network have the following properties.
• The sensor nodes are deployed randomly in the 2D plane which continuously monitors the environment • The BS is stationary • All sensor nodes of the network are homogeneous in terms of energy initially.

SLEEP MODE FOR CH SELECTION PROCESS
The generated pattern helped in the decision of every node to set active or sleep mode for the cluster head selection duration. If the generated pattern code of the node becomes less than qualifying code then this node does not take part in the cluster head selection process and set mode to sleep (CH_mode=sleep). If the pattern code of this node is less than qualifying code for next rounds then sleep mode duration becomes double subsequently. Otherwise, the node takes part in the cluster head selection process. The term sleep is used to refer to turning off the cluster head selection process of the node rather than turning off the radio or sensing. The total life time of the network is divided on rounds. Each round consists of setup and steady state phase. In the setup phase there are sub phases i.e. pattern generation, pattern comparison and decision phases. At the start of every round each node updates its local buffer based on the sensing event and generated pattern code using pattern generation algorithm 1.2. After the sleep mode algorithm 1.1 starts work making decision about node participation in CH selection process. If the pattern code is greater than qualifying code then the node exchanges its pattern code with neighbour for comparison. Figure 1 shows the setup and steady phase. The algorithm 1.1 shows the node participation in CH selection process.

Pattern Generation, Comparison, Decision
Round P1 In the active mode duration, a sensor node cooperates with its neighbours to identify the Cluster head in the cluster. Here is the algorithm for sleep mode.

PATTERN BASED CLUSTER HEAD SELECTION ALGORITHM
Our proposed scheme "Secure Pattern Based Cluster Head Selection algorithm for MWSN" is based on the LEACH. In this research work only the CH selection phase of LEACH has been targeted, while the data transmission phase remains unchanged. To preserve the energy resources of the network, only those sensor nodes have been permitted to take part in the CH selection process, which are likely to consume minimum energy, low mobility and less packet drop. For this purpose in our proposed scheme we have introduced the concept of a pattern code which identifies the fitness of a sensor node in terms of its energy consumption ratio, relative mobility and packet drop ratio. If the fitness factor meets specified criteria, it should be allowed to take part in the CH selection process to become a CH, otherwise it is restricted, only plays its role as normal node in a specific round and does not take part in the CH selection process.
Initially the energy level of all sensor nodes is identical in the network, so the cluster formation in the first round is done by random selection of CH as in basic LEACH. During each round, sensor nodes calculate its energy consumption ratio, relative mobility and packet drop ratio to generate a pattern code. This pattern code is representative value of the residual energy, relative mobility and packets drop ratio of sensor nodes in current round and its calculation is carried out at each sensor. The pattern is small in size just of few bits and cost of transmission is very low.
Once the node level pattern code is generated, the base station sends qualifying Reference pattern code to all sensor nodes. The member nodes compare their generated pattern with reference to pattern code. Every cluster head sends the highest pattern code that has been received during cluster head selection to the base station; so that the highest pattern code among these used for the next round is qualifying reference code by the BS. The BS keeps track of recent patterns received from CHs of the network. The qualifying reference code represents the overall network status in terms of residual energy, relative mobility and packets drop ratio which can be used to identify the suitable sensor nodes for CH selection. At the beginning of each round, the BS broadcasts the newly qualifying reference code to all deployed sensor nodes. On reception of qualifying code, each sensor node checks their CH_Mode by executing algorithm 1.1. When CH_ Mode is sleep it means this node does not take part in CH selection process. While on the other hand, if the recent pattern code of a sensor node is equal or greater than the qualifying pattern it behaves like normal node and takes part in the CH selection process. Only one qualifying reference code has been used in one round and for the next round a new qualifying reference code is generated by the BS which depicts the updated state of the network. This is because the energy of each sensor diminishes with the passage of time, and a single qualifying reference code has not been able to represent the actual network state after several rounds. Therefore according to the current state of the network, in each round a new qualifying reference code is generated.
The pattern of node is calculated using number of different parameters like energy consumption ratio, success factor and relative mobility of node. The following sub-sections provide details of parameters used for calculating energy consumption ratio, Relative Mobility and packets drop ratio respectively, at each sensor node for pattern generation.

Energy Consumption Ratio Measurement
The energy level of a sensor node plays a vital role in the selection of CH. A sensor node with higher level of energy at any specific time can lead to higher performance in network activities. Such nodes are given higher priority to become a CH. The residual energy (Ei) of a sensor node i is defined as [23] and energy consumption ratio (ECR) in current round can be calculated as an Eq. (4). The Eq. (2) specifies the node residual in the current round and Eq. (3) calculates the consumed energy in last communication of the current round. Eq. (4) shows the energy consumption ratio with respect to the other relative nodes.
Where: E i -Residual energy of node i; TE i -Total Energy of node i; E c -Energy consumed in last communication; E ci -Total energy consumed in one round by the i th node; α -Energy consumed due to environmental factors; P sk -Number of ACK packets sent; E sk -Energy consumed in sending ACK packets; P rk -Number of ACK packets received; E rk -Energy consumed in receiving ACK packets; P sd -Number of data packets sent; E sd -Energy consumed in sending data packets; P rd -Number of data packets received; E rd -Energy consumed in receiving data packets.

Success Factor Measurement
The success factor of a node is defined as the number of packets successfully transmitted without any dropping or retransmission [23]. The success factor shows the reliability of a sensor node on how much it is suitable to assign the responsibility of a CH. As a CH forwards not only its own data to the BS but it has the responsibility to forward all packets received from the member nodes in a specific round. For this purpose in CH selection, the success factor must be considered to preserve the energy which is being exhausted in re-transmissions of various packets in different rounds. The success factor (Sf) has been calculated as given in Eq. (5) [ ] Where: N t -Total number of packets transmitted; N d -Number of packets discarded; N r -Number of packets retransmitted.

Measuring Relative Mobility of Nodes Using Entropy
In wireless mobile sensor networks some or all sensor nodes are capable of moving in different directions with different speeds. We have used entropy which is widely used to capture the information contents within a system. Perceiving the mobility of a node with respect to another, the probability that a node is moving, and the marginal probability that the node itself is moving can be calculated by the mutual information. For this propose we take advantage of mutual information.
If X and Y are the random variables with joint distribution p(X, Y) and marginal distributions p(x) and p(y), then the mutual information I(X, Y) is the relative entropy between the joint distribution and the product distribution [12]. Hence, I(X, Y) is given in Eq.
Mutual information (Mf) by Eq. (7) is used for calculation of mobility entropy, which is a fitting measure of change based upon previous expectation values. During round each node maintains a history of its neighbours received broadcast (beacon) signals. Every node maintains a list containing the IDs of each node heard within the hearing range of the node.
Let us observe the behaviour of the neighbour list of a particular node i for a time interval of Δt. Let us assume that node j appeared in the list at least once. We measure two quantities. First, the number of times node j appeared. It can be noted that for a node to appear multiple times, it must also disappear that many times. Second, the total amount of time node j stayed in the neighbour list of node i during the interval Δt. The first quantity gives a measure of relative mobility and the second one provides an intuition about the relative stationary of nodes i and j. If a node I counts the number of appearances of other nodes j, then it can compute the joint distribution for all the other nodes, i.e., p(i, j) for all j. Also, p(i) is known to node i, and it can gather information about p(j) from its neighbouring nodes, or the nodes that visited i. Thus, we get the mutual information as was given by Eq. (7).

Pattern Generation
The pattern generation process is performed in only those nodes whose CH_mode is set active by algorithm 1. Say N is total number of nodes in network and n are those nodes that have CH_mode active. So pattern generation algorithm is performed in n node instead of N. This restricts those nodes which are not eligible for CH selection and save network resources. Pattern generation is carried out in three stages. In the first stage each sensor generates its local pattern representing the current state, while at second stage pattern comparison and the BS generate the qualifying pattern for the whole network which is used in the subsequent round. And the third stage is decision making of cluster head selection. All the three stages are discussed below.

Stage-1 (Local Pattern Code at Sensor Level)
Residual energy, Success Factor and Relative Mobility of a sensor node are calculated by Eqs. (4), (5) and (7). Each of these values is assumed to have threshold values between 0 and 100 as shown in the following look up Table1 The pattern generation algorithm 1.2 is executed on every sensor node which results in a six bit binary pattern specific to each parameter of the node shown in the look up table. In this algorithm the node parameters are mapped to a set of values whose ranges are identified by a predefined threshold values. The first two bits of the pattern are used to represent the current energy consumption ratio state; next two bits for representing success factor and last two bits are used to represent the relative mobility state of a sensor node. The four categories are represented in the pattern by different combinations of 0 and 1s. The possible values for different combinations of energy consumption ratio, success factor and relative mobility of a sensor node are shown in the following table2. According to Table 2 the pattern 111100 represents the high energy, high success factor and very low mobility of a particular sensor node which is the best case value for the pattern while 000011 represents very low energy, very low success factor and high mobility which is the worst case value for the pattern.

Stage-2 (Pattern Comparison)
In the first round of network, base station selects cluster head randomly. In the next round all CHs send their generated patterns to the BS, BS searches the highest pattern among these and declares it as qualifying reference pattern code (QP). In the next the round base station sends the qualifying pattern to all sensors. All the sensor nodes compare the received qualifying pattern with its recent most generated pattern. The stage-2 pattern comparison is illustrated by the algorithm no 1.2.

Stage-3 (CH Decision)
After the comparison of patterns, each node takes a decision regarding becoming CH or not. All those nodes whose CH_mode is active can take part in the CH selection by sending a hello packet to its neighbour. This packet contain node id, generated pattern in this round and time stamp. Initially one node is selected as a CH randomly. Then every node compares their pattern code with this randomly selected CH node. If their pattern is greater than the selected CH node pattern, then this node is selected as a CH. This process continues until all nodes whose CH_mode is active are checked for CH selection. At the end only node is selected as a CH and broadcasts joint message. The remaining nodes declare themselves as member nodes of this CH.  Upon receiving these hello packets every active mode node compares its generated pattern code with receiving pattern code. If the difference between generated pattern code and receiving code is less than the threshold then node CH-mode becomes sleep and waits for new cluster head joining. Otherwise node takes part in the cluster head selection and sends hello packet to its neighbours. At the end only suitable node is selected as cluster head.

ENERGY CONSUMPTION MODEL
Transmission and receiving cost for a distance of d for k-bit can be calculated as follows, Transmitting cost for kbit as: where E t is the transmitting cost and Cir En is the energy consumption to run the transmitter circuit. Amp EN is the energy dissipation for the transmission amplifier. The cost of Data aggregation is Agr EN and N B denotes the number of transmitted data bits.

MOBILITY MODEL
We have used the Random Waypoint model [22]. According to this model, every mobile node chooses a random waypoint in the 2-dimensional regions, and then it moves towards that waypoint from the current waypoint with speed v between [vmin, v max ]. When the node touches a boundary, it returns back from the border with the equivalent speed. The reflection involves a change in direction of the incident ray. The node waits with random pause time at each waypoint before starting to move towards the next waypoint.

PERFORMANCE EVOLUTION
The proposed solution called Pattern based has been validated through simulation in NS 2.35 and compared its performance with the other three algorithms named LEACH-M, TCM and E2R2. NS 2.35 is open-source event-driven simulator designed specifically for research in communication networks. As our proposed scheme is aimed to preserve as much energy as possible in mobile WSNs, therefore in simulation, we have used mobile sensor nodes. The result of comparison of the proposed scheme with existing scheme will be carried out in terms of the following using table no.3 simulation parameters.

Energy Consumed for the CH selection
Tab. 4 shows the energy consumption comparison for the selection of CH in different number of nodes. The proposed scheme consumed less energy as compared to the rest of schemes because of the CH selection on the basis of pattern instead of real data. The size of pattern message is very small which consumed less energy when transmitted.

Average Energy Consumption (EAV)
In the simulation each sensor node has been assigned initially an equal level of energy and the energy consumption has been calculated thoroughly. The energy consumption of proposed scheme has been compared to those of existing schemes. Fig. 2 shows that the proposed scheme consumed less energy as compared to other because of the use of pattern code, which is very small and consumed less energy. Eq. (11) is used for calculating average energy consumption, where E i , E c , r and n represent residual energy, energy consumed in last communication, round no and total sensor nodes. 1 1 av  The proposed scheme measured the time span of the network for which it can perform the designated tasks and compare these results with the existing approach using Eq. (12), where j means number of times last communication was performed. Fig. 3 shows the comparison of the proposed scheme with other schemes of network lifetime. It is clear from Fig. 3 that lifetime of network has increased in proposed scheme because of usage of pattern code for cluster head selection.

Data Packet Delivery Ratio
The proposed solution should minimize the data lost during the network lifecycle due to the restriction of non- suitable nodes to take part in CH selection meaningless. Therefore we have computed the data packet delivery ratio during the network lifetime. Data Packet Delivery Ratio is the ratio of packets received by BS to the total number of packets generated by the network to send information. It can be illustrated by the Eq. (13). So Fig. 4 indicates that the proposed scheme has a higher packet delivery ratio because of ignoring un-necessary messages in the CH selection process.

No of Packets Recieved by BS PDR
Total No of Packets Generated by network = (13)

Throughput of Network
Throughput means the total number of packets received by BS and total number of packets sent by networks. So average packet delivery ratio P(dr) of network is calculated as Eq. (14). If the number of sent and received packets is equal then its P(dr) values will be 1 and if P(dr) is less than 1 then it mean some packets drops. This shows that the proposed scheme obtains better throughput as compared to the rest of schemes.

Cluster Duration Stability Ratio VS Node Speed
The average cluster duration ratio means the cluster stability ratio with respect to its member nodes. The higher cluster duration leads to higher stability ratio of cluster and as a result re-clustering does not occur frequently. Fig. 6 shows the average cluster stability ratio with its member nodes. It is clear from Fig. 6 that the proposed scheme increases the cluster duration stability ratio with respect to its member nodes speed because all the cluster members have approximately same relative mobility. The higher mobility means that a node has frequently changed its neighbouring nodes to either its own high speed or neighbouring nodes having higher speed.

SECURITY ANALYSIS
Most of the CH selection algorithms do not consider the security aspect when designing. The malicious nodes easily take apart in the selection process of CH and nominated as CH, which interrupts the whole network operation. Therefore, attackers can manoeuvre the whole network by selecting compromising nodes as CH in the network. To prevent the attackers from fabricating CH election results, a CH election algorithm should guarantee important properties such as unpredictability, nonmanipulability, and agreement property of the election results. A symmetric key algorithm has high communication cost and not resilient against compromised nodes. So a strong authentication mechanism is needed to The pattern based CH selection algorithm prevents the network from malicious node to become a CH or take part in the selection process. Because the malicious node is enable to distinguish between pattern and the real data of sensor node. The CH selection is based on the pattern instead of real data, thereby preventing the anomaly nodes from taking part in the cluster head selection process without keys distribution. Also the detection of ineligible nodes prevents it from the cluster head selection process made with less energy consumption. In case anomaly nodes predicate the qualifying pattern code that is used for CH selection then this pattern code is change in the next round. So in the next round anomaly nodes are unable to predicate the new qualifying pattern code.

CONCLUSION
This paper has presented pattern based cluster head algorithm based on LEACH protocol. The proposed scheme has used a technique that selects suitable node as a CH using pattern code and restricts ineligible nodes to not take part in the selection process. The cluster heads are nominated by considering the pattern code of residual energy, relative mobility and success factor of the mobile sensor nodes. The pattern based CH selection has reduced the consumption of the energy during the round time of a network. Pattern based selection has also enhanced the security of CH selection process without adapting any security algorithm. This scheme is compared with energy efficient protocols like LEACH-Mobile, TCM and E2RR2. The simulation results show that Pattern based algorithm is much better when compared to the rest of schemes in terms of different metrics like Energy consumption, Network life time, Throughput, Security and packet delivery ratio.