A Markov Process-based Opportunistic Trust Factor Estimation Mechanism for Efficient Cluster Head Selection and Extending the Lifetime of Wireless Sensor Networks

INTRODUCTION: The lifetime of a sensor network completely relies on the potentialities of the utilized Cluster Head (CH) selection scheme that aids in building efficient Wireless Sensor Networks (WSNs). Most of the existing CH selection approaches use an impractical condition which mainly emphasizes that the nodes that are trustworthy and highly energy competitive have better likelihood of being selected as CHs. OBJECTIVES: In this paper, a Markov Process-based Opportunistic Trust Factor Estimation Mechanism (MPOTFEM) is proposed for achieving optimal CH selection that enhances the possibility of maintaining network lifetime and energy stability in the network. METHODS: MPOTFEM is proposed for ensuring efficient CH selection and thereby enhancing the lifetime of WSNs. The proposed MPOTFEM incorporates the merits of Markov process for computing the Opportunistic and Trust factors that assesses the maximum likelihood of nodes with the possibility of being selected as the CH by exploring multiple transition states of nodes in the networks. RESULTS: The results of the propounded MPOTFEM confirm to be significant in improving the network longevity by analysis. CONCLUSION: The results prove that MPOTFEM is better when compared to the benchmarked CH selection schemes in terms of network lifespan and energy stability


Introduction
Wireless Sensor Networks (WSNs) are suitable for potential applications used in monitoring real-time environments including military operations, weather forecasting, health monitoring and network surveillance (Rajarajeswari et al 2015). This WSNs involve hundreds and thousands of sensor nodes for achieving sensing and data aggregation operation (Janakiraman 2018).
However, the limited energy and memory, computation time and ability of sensor nodes introduce crucial issues that have a negative influence on the performance of the network. Further, the lifespan of the network is purely based on the amount of resources available and adoption of suitable clustering algorithms (Rambabu et al 2019a). In this context, the clustering process which organizes closely located sensor nodes into groups called clusters are determined to be suitable for achieving effective and efficient management of clusters. However, the significance of the clustering algorithms is based on the incorporated Cluster Head (CH) selection process (Rambabu et al 2019b). Further, the clustering schemes should be capable of balancing energy of nodes in the network. More number of clustering algorithms are available in the literature using random or probabilistic CH election mechanisms to mainly focus on the energy balance which in turn improves network lifetime (Priya et al 2020; Janakiraman & Priya 2020). At this juncture, the problem definition is presented as follows: Given a set of sensor nodes deployed in the network with predefined energy levels, then the problem is to focus on the selection of CH nodes that aid in the clustering process wherein multiple clusters are formed with maximized energy level and optimized inter and intra-cluster distance between them.
In this paper, a Markov Process-based Opportunistic Trust Factor Estimation Mechanism (MPOTFEM) is propounded for efficient CH selection in WSNs so as to offer enhanced lifetime of the network. The consecutive steps in the implementation of the propounded MPOTFEM technique with the necessary algorithm and flowchart are presented. It shows the simulation and the results of the implementation of the proposed mechanism for varying number of sensors.

Related Work
Clustering supports shaping a network into a linked hierarchy, enabling load balancing and extending the lifespan of a network. Fuzzy logic supports wise combinations of diverse parameters. Taheri et al (2012) have propounded an Energy-aware distributed dynamic Clustering Protocol (ECPF) which is based on the following factors namely, non-probabilistic CH selection, use of fuzzy logic and on-demand clustering. The Residual Energies (REs) of nodes are taken as the chief parameters for selecting CHs non-probabilistically based on the delay that is inversely proportional to the RE of a node. CHs are chosen based on their RE, and fuzzy logic is used to assess a node's appropriateness in being elected as a CH from adjacent CHs. Other nodes link to the CH with minimum fuzzy cost.
Nodes in the Region of Interest (RoI) send sensed data to the BS and it always fulfils the frequency of data collection demanded by the BS. Wang & Chen (2012) have propounded a link-aware clustering scheme called Link-aware Clustering Mechanism (LCM) to find an energy-proficient and trusted path. It chiefly takes the node and link status and uses a clustering parameter, Predicted Transmission count (PTX) to assess the requirement of nodes of CHs and Gateways (GWs) to form clusters. Each CH or GW is based on the PTX to find the priority, and the candidate with the maximum priority is elected as the CH and GW.
Clustering prolongs the lifespan of a sensor network by minimizing energy depletion. It extends network lifespan and enhances scalability. Wang et al (2013) have propounded Hybrid Distributed Energy-Efficient Heterogeneous Clustered (HDEEHC) protocol for WSN. This protocol occasionally chooses CHs based on the hybrid of primary and secondary parameters. The RE and node type are the parameters involved in the CH, along with the immediacy to its adjacent nodes or node degree. The nodes with more preliminary RE are more likely to be chosen as CHs than the nodes with lesser energy.
Dynamic clustering supports scalability and energy efficient data accumulation in WSN. Nevertheless, it is prone to unfair energy consumption in inter-cluster communication. Xu et al (2015) have proposed Distributed and Adaptive Routing protocol for Clusterbased wireless sensor networks (DARC) wherein, a dynamic energy threshold is determined for CH to deal with the inter-cluster routing approach, and a cost function is found for relay choice. DARC deals with balancing energy consumption for inter-cluster communication and increases energy proficiency and network lifetime.
Thilagavathi & Gnanasambandan Geetha (2015) have propounded an enhanced binary Particle Swarm Optimization (PSO) algorithm with altered Connected Dominating Set (CDS) based on RE for finding the optimum number of clusters and CHs. This mechanism is propounded with the benefits of maximum likelihood probability in order to determine the correlation between their behaviors. Zhou et al (2016) have propounded a CH selection scheme for dealing with the challenges introduced by insider selective forwarding attack. This mitigating scheme uses specifically chosen nodes like inspector and cluster member for avoiding the damage of the whole network. This CH election mechanism involves composite reputation by estimating excess energy and forwarding rate of nodes. The lifetime of the network and false alarm rate of the propounded scheme are minimized. The inspector observes the transmissions to defend the cluster and the CH transmits packets from members and other CHs, and arbitrarily observes the inspector nodes to determine whether they are working properly. The normal nodes in addition to forwarding data, observe the behaviors of the CH and inspector nodes using a reputation scheme. Wang et al (2016) have proposed a combined energy and trust based CH election mechanism for enhancing the network lifetime. This scheme deals with the scalability by implementing a hierarchical architecture that stabilizes organization of lower and higher end sensors. The CHs are fortified with a Trusted hardware Module (TM). To ensure energy efficiency in a network, a Trusted hardware based Energy Efficient Clustering (TEEC) mechanism is propounded to choose suitable CHs. The lifetime of this approach is extended and promises protection against replay attacks, provides node authentication and information privacy for fighting against the compromise of sensors. Nevertheless, the amount of dead and alive nodes evaluated for varying number of sensor is same as the traditional probabilistic CH election schemes.
Conventional cryptography schemes are not appropriate for WSNs as they have their own power and resource restraints. Managing trust assists in enhancing security and handling threats in WSNs. Trust is the degree of trustworthiness in a node. Low Energy Adaptive Clustering (LEACH), a cluster based routing scheme is better when compared to direct communication protocols but has some security flaws. Miglani et al (2017) have proposed an Energy Efficient and Trust Aware in LEACH (EETA-LEACH) for secured routing. This scheme is an amalgamation of trust-based routing and management for efficient selection of CH.
The durability of a sensor network depends on the efficiency of CH selection that features towards operative management in WSNs. The CHs that are highly energy efficient and trusted are elected as CHs. Amuthan & Arulmurugan (2018) have propounded an Availability Predictive Trust Factor-based Semi-Markov Mechanism (APTFSMM) for efficient CH election so as to enhance its durability in WSNs. The proposed mechanism inherits the advantages of semi-Markov process for assessing the availability prognostic trust factor that enumerates the maximum probability based on which a node can be elected as the CH through increased exploration of several transition states of nodes. A mechanism that focuses on designing energy efficient CH selection considers that the partaking nodes are reliable, while the trust-based CH election schemes consider that nodes are energy efficient. These expectations are not convincing as the historical or present RE of nodes may not assist in determining an optimal CH. Amuthan & Arulmurugan (2018) have presented an integrated energy and trust based prediction scheme called Hyper-Exponential Reliability Factor-based Cluster Head Election (HRFCHE) that is based on Semi-Markovian approach for extending network lifetime.
Mythili et al (2019) have proposed Spatial and Energy Aware Trusted Dynamic Distance Source Routing (SEAT-DSR) algorithm for improving the lifetime of WSNs. The spatial data, RE and data quality are balanced by the energy aware routing algorithms based on Quality of Service (QoS). Further, a clustering algorithm is also included for forming a group of sensors based on the aforementioned parameters along with the trust score and inter-node distance. The scheme makes decisions and a hierarchical trust scheme is presented which is based on network size, energy involved, speed of communication and recommendation. It focuses on the enhanced sliding window time by assuming the presence of attackers to find their inconsistent behavior. Rodrigues & John (2020) have proposed a routing algorithm based on trust for secured routing. Chicken Dragonfly (CHicDra) optimization algorithm is also proposed for supporting trusted communication by finding optimal CHs in the network. Once CHs are chosen with multi-objective Taylor Crow Optimization (TCO), the reliable nodes are confirmed using joint trust that is based on the trust factors that include integrity, consistency, forwarding rate and availability. CHicDra is a variation of the Chicken Swarm Optimization (CSO) with dragonfly algorithm. Lastly, a secure and reliable path is chosen for communication. Sharma et al (2020) have proposed reliable and energy based clustering scheme called energy efficient Trusted Moth Flame Optimization and Genetic Algorithm (eeTMFO/GA). The CHs are selected using MFO in a clustered network. The fitness function is based on parameters like packet forwarding progress, RE, connected node density, mean cluster distance and mean transmission delay.

Proposed Markov Process-based Opportunistic Trust Factor Estimation Mechanism (MPOTFEM)
The proposed Markov Process-based Opportunistic Trust Factor Estimation Mechanism (MPOTFEM) incorporates the merits of determining the Opportunistic factor of nodes by merging their up and down times for attaining better CH selection. The Failure (F) and Preventive Maintenance (PM) states of nodes are considered for enumerating their availability in co-operative data distribution in the network. The proposed mechanism is found to be exceedingly trustworthy for CH selection as it securely chooses CHs by identifying the malevolent features of nodes. It is predominant to focus on effective CH selection so as to minimalize the frequency in change of roles of selected CH nodes in the network. It also focuses on the construction of an energy competent CH selection technique that wholly targets in maximizing the network lifetime. The proposed MPOTFEM is an effectual clustering algorithm that aims at efficient choice of CH by predicting the Opportunistic factor of nodes. The proposed MPOTFEM determines this factor as it is an unusual instance of trustworthiness. Availability is analyzed based on the node's resilience during CH selection. Resilience factor is involved as the nodes are expected to be rehabilitative in nature. In particular, the Resilience factor shows significant accessibility rate of nodes with well-defined utilization conditions. The nodes' Opportunistic factors need to be possibly reclaimed at any point of time independent of the risks encountered in the process, thus facilitating indispensable functionalities in the network. Moreover, the opportunistic nature of a node refers to the intrinsic competence of nodes to convert its trustworthiness and resilience into an assessment index that contributes to network performance.
In the proposed MPOTFEM, the nodes are found to be transformed from their failure state. The proposed MPOTFEM takes into consideration the functioning and preventive resilience time of nodes into account. It also takes the operating and failure times of nodes for enumerating their accessibility in the network. The steps

Estimation of a nodes' Maximum Likelihood Transition Probability
The Maximum Likelihood Transition Probability (MATP) of nodes is found based on the trust and energy values extracted from the network by including probe packets in the control packets utilized for data communication.
MATP is computed for enumerating the probability of nodes during their shift between states [109]. The energy model employed in the propounded MPOTFEM is same as the energy model in the proposed HGRF-OCHP technique. Furthermore, MATP is computed based on direct and indirect interactions among nodes. The maximum transition probability of nodes defined in the propounded MPOTFEM is shown in Table 1. Probability of an operating selfish node entering into cooperative state when the energy of a node is enhanced φ N C Probability of a non-cooperative selfish node getting transformed into a cooperative node by using appropriate energy refining schemes φ S_E Probability of a selfish node to remain in its state due to its inability to improve energy level φ C S,F Node in cooperative state with probability of getting converted to selfish or failed state The transition states of a node in the process of routing in a sensor networks are shown in Figure 1. In addition, the state types in the transition diagram are detailed below.
The state diagram of the propounded MPOTFEM is used for developing the steady state balance equations to predict the stochastic probabilities of node states ( Figure  1). The Stochastic Steady State Probabilities (S 3 P) connected with their compliant states with minimum likelihood to be transformed into other states are shown in Equations (1) and (2) correspondingly.
The S 3 P values of nodes related to the cooperative states with maximum possibilities to be transformed into selfish states are shown in Equations (3) and (4) correspondingly.
The S 3 P values related to selfish nodes with maximum possibilities of being transformed into cooperative state are shown in Equations (5) and (6) correspondingly.
The S 3 P values related to the selfish nodes with maximum possibilities to fail are shown in Equations (7) and (8) correspondingly.
The S 3 P values related to selfish nodes with maximum possibilities to maintain their states are shown in Equations (9) and (10) correspondingly.
The above-mentioned steady state equations are used for enumerating the stochastic values of 'φ S ', 'φ S F ' and 'φ F_E C,S ' states based on the cooperative state 'φ C S,F ' as shown in Equations (11-13) correspondingly. Furthermore, 'φ C S,F ' signifies the S 3 P values of nodes in co-operative state. This probability completely exhibits the uptime to which the nodes could continue to be compliant with the network as shown in Equation (14).
However, the nodes are considered to be accessible in the network based on their up and down times during which, service is enabled for data propagation. Thus, in the process of estimating the Opportunistic factor in the proposed mechanism, the up and down times of nodes are calculated and combined.

Estimation of Markov Process-based Opportunistic Trust Factor (MPOTF)
The probability of node state to be possibly transited to the operating state is shown in Equation (15). The propounded scheme is based on the Preventive Maintenance (PM) approach for retrieval of the potential after downtime.
In this perspective, the probability of the node entering into a failed state despite employing PM approach is shown in Equation (16).
At this point, the cumulative sum of probability relating to the probable states of the node at any definite point of time is computed using the rule of probability as shown in Equation (17).
Hence, the probabilities with which the nodes exhibit a complete operating behavior is recognized based on simultaneous equations as shown in Equation (18).
The Markov Process-based Opportunistic Trust Factor (φ MPOTF ) is computed by taking into account the failure and non-failure states of nodes as shown in Equation (19).
The mean rate of transforming a non-operating node into an operating node is shown in Equation (20).
Furthermore, the mean rate of a node being reformed from its failed to operating state is given in Equation (21).
where, 'φ PAFTF_PM ' is in the range '0' and '1'. Moreover, the time required for rehabilitating a node from its failed state is found using Equation (19) by considering the failure and repair rates, Opportunistic threshold and PM cost of nodes. The value of 'φ PAFTF_PM ' should be more than 0.80 for a node to be elected as the CH.

Algorithm and complexity of the Proposed MPOTFEM
This section details about the algorithm and flowchart of the proposed MPOTFEM.
Input: RE, location of nodes, trust enumerated using packet forwarding competence Output: Optimized CHs for improving the network's lifespan and energy stability

Begin
Initialize the number, energy and location of nodes Consider the positioned nodes' states as primarily compliant with the number of CHs set to 'Φ' Compute the number of adjoining nodes depending on the total number of nodes that are alive till the former iteration Estimate the trust and energy limit based on the utilized energy and trust model Compute the transition probabilities for enumerating the trust factor of the nodes based on 'φ S_E ', 'φ C_E S ', 'φ S_E F ', 'β', 'φ O C ' and 'φ N C ' for exploring the features of nodes Find the stochastic probability vectors 'φ C S,F ', 'φ S C ',

End
The aforementioned algorithm considers a predetermined CH selection threshold of 0.80, which is taken as the Opportunistic factor. This threshold is determined by conducting experiments for varying number of thresholds ranging from 0.60 to 0.90. Energy efficient and trusted CH selection is fairly better only after 0.80. In addition, the threshold supports suitable individuality between operating and non-operating states of nodes. Compared to the HGRF-OCHP technique, the computation complexity of the propounded scheme is also found to be of the order O(n log n) with control message complexity of O(n) and time complexity of O(1) correspondingly.

Flowchart illustrating the steps in the Proposed MPOTFEM
The flowchart shows the steps of the propounded MPOTFEM ( Figure 2).

Simulation Results and Discussions
The propounded Markov Process-based Opportunistic Trust Factor Estimation Mechanism (MPOTFEM) and the benchmarked HGRF-OCHP, TAREEN-OCHS, EEST-OCHS and TL-LEACH schemes are simulated using ns-2.35. A terrain of 100*100 meters with 1000 nodes is taken. Random Way Point (RWP) and bidirectional models are employed for mobility and communication respectively. The parameters taken for implementation of the existing [20][21][22] and propounded schemes are shown in Table 2.
Simulation is carried out based on different factors. Initially, the performance of the proposed MPOTFEM is assessed in terms of percentages of alive and dead nodes, average RE and average throughput for varying number of rounds of implementation. Secondly, the performance of the proposed and the benchmarked schemes is estimated in terms of Packet Delivery Ratio (PDR), Failure Rate, mean rate of malicious modes to be selected as CH and average Delay for varying percentages of malicious nodes. Thirdly, the performance is examined in terms of average throughput, average delay, average prevention rate and average RE of malevolent nodes to be nominated as the CH for varying number of nodes. Finally, the performance of the proposed approach is assessed based on network lifetime and communication overhead for varying number of nodes positioned in the network.

Investigation based on Varying Number of Rounds of Implementation
In the initial part of examination, the proposed MPOTFEM scheme is evaluated based on the percentage of alive and dead nodes, average RE and average throughput for varying number of rounds of implementation. Figure 3 and Figure 4 show the percentage of alive and dead nodes in the network or varying number of rounds of implementation respectively. The percentage of alive nodes in a network with the proposed MPOTFEM scheme is seen to be better in contrast to the existing CH election mechanisms take for examination. This substantial improvement in the performance of the proposed mechanism is predominantly due to the estimation of the Opportunistic factor that supports estimation of the importance of nodes. The proposed MPOTFEM offers 7.54%, 8.92%, 10.86% and 12.56% better percentage of alive nodes in contrast to HRFCHE, EEST-CHST and HDEEHC schemes ( Figure  3).   The average throughput of the proposed MPOTFEM scheme is found to be better when compared baseline CH election mechanisms. The substantial improvement in average throughput of the propounded MPOTFEM is possible due to the inhibition of selection of malevolent nodes from being elected as CH nodes. The average throughput offered by the proposed MPOTFEM is seen to be 8.28%, 9.75%, 11.28% and 12.96% better when compared to the existing HRFCHE, EEST-CHST and HDEEHC approaches ( Figure 5).

Figure 5. Average Throughput for Varying Rounds of Implementation
Likewise, the proposed MPOTFEM approach maintains average RE of the network to a greater extent as PM process of reorienting nodes. The average RE sustained by the proposed MPOTFEM is 9.12%, 10.64%, 11.84% and 14.29% better when compared to the existing HRFCHE, EEST-CHST and HDEEHC ( Figure 6).

Figure 6. Average Residual Energy for Varying
Rounds of Implementation

Investigation based on Varying Percentage of Malicious Nodes
In the second part of examination, the proposed MPOTFEM scheme is evaluated based on PDR, failure rate, average rate of malicious nodes elected as CH and average delay for varying percentage of malicious nodes. Figure 7 shows the PDR of the proposed and the compared schemes. The PDR of the propounded MPOTFEM scheme is better in contrast to the existing CH selection mechanisms independent of the number of malevolent nodes. Improvement in PDR is primarily due to the Markov process that is capable of predicting the nodes with high Opportunistic factor. The PDR of the proposed MPOTFEM scheme is found to be CH selection techniques.  In addition, Figure 8 shows the failure rate of the proposed and the existing schemes. The failure rate of the nodes of the proposed mechanism is found to be minimal when compared to the existing CH selection approaches not based on the number of malevolent nodes introduced in the network. This probable decrease in the failure rate of the proposed mechanism is predominantly due to the improved degree of prevention rate introduced by the MATF parameter that classifies nodes into cooperative, selfish and failed. The proposed offers 8.54%, 9.65%, 10.54% and 11.84% reduced failure rate in contrast to the existing HRFCHE, EEST-CHST and HDEEHC CH selection techniques. Figure 9 shows the average rate of malevolent nodes elected as CH in the propounded and existing CH election mechanisms. The probability of a malicious nodes getting elected as the CH is reduced in the proposed MPOTFEM scheme when compared to the existing CH election mechanisms independent of the number of malevolent nodes hosted in the network. Preventing malicious nodes from being elected as CHs is possible due to the nonoperating and operating states of Markov process taken for prediction. The prevention rate of malevolent nodes of the proposed MPOTFEM scheme is 8.21, 9.54%, 10.42% and 12.29% reduced in contrast to the existing CH election mechanisms. Furthermore, Figure 10 shows the average delay experienced by the proposed and the existing schemes.
The proposed mechanism involves less average delay due to the high exploration competency forced on the nodes in CH selection. The average delay of the proposed mechanism is seen to be 7.94%, 8.72%, 9.64% and 10.98% less in contrast to the existing CH election mechanisms.

Investigation based on Varying Number of Nodes
In the third fold of investigation, the predominance of the propounded scheme is based on percentage enhancement in average throughput, percentage sustenance of average RE, average delay and average inhibition rate of malevolent nodes to be elected as the CH for increasing number of nodes. Figure 11 shows the percentage upsurge in average throughput of the proposed and the existing schemes for varying number of nodes. There is a percentage increase in the throughput of the proposed mechanism when compared to the existing CH election mechanisms as it includes the benefits of including the Opportunistic factor using the continuous Markov chain process for effective election of CH. The proposed mechanism offers 8.28%, 9.74%, 10.52% and 12.74% better average throughput in contrast to the existing HRFCHE, EEST-CHST and HDEEHC schemes.  In addition, Figure 12 shows the percentage sustenance in the average RE of the proposed and the existing CH election mechanisms for varying number of nodes. This improved percentage sustenance in the proposed MPOTFEM scheme is found to be better when compared to the existing CH selection approaches, as it utilizes the Opportunistic parameter in CH selection. The average RE sustenance of the proposed MPOTFEM scheme is found to be 8.82%, 11.84%, 12.92% and 13.82% better in contrast to the HRFCHE, EEST-CHST and HDEEHC selection schemes. reasonably low in contrast to other CH election mechanisms as it circumvents least energy competent nodes from being elected as the CH. The average delay of the proposed MPOTFEM scheme is found to be 8.73%, 10.28%, 11.32% and 12.84% better in contrast to HRFCHE, EEST-CHST and HDEEHC selection schemes.

Figure 13. Average Delay for Varying Number of Nodes
In addition, the mean prevention rate of malevolent nodes from being elected as the CH in the proposed MPOTFEM and the CH election mechanisms for varying number of nodes is shown in Figure 14. The mean prevention rate of malevolent nodes from being elected as the CH is guaranteed to be less in the proposed scheme when compared to the other CH election approach as it is capable of classifying the states of nodes based on trust and energy. The proposed MPOTFEM scheme offers 8.28%, 9.48%, 11.13% and 12.64% better mean prevention rate in contrast to the existing HRFCHE, EEST-CHST and HDEEHC selection schemes. The proposed MPOTFEM scheme is examined in terms of percentage increase and decrease in network lifetime and communication overhead respectively for varying number of nodes. The proposed MPOTFEM scheme offers 7.21%, 9.28%, 11.46% and 12.94% percentage increase in network lifetime for varying number of nodes in contrast to the HRFCHE, EEST-CHST and HDEEHC selection schemes ( Figure 15).

Conclusion
The proposed Markov Process-based Opportunistic Trust Factor Estimation Mechanism (MPOTFEM) is a trustworthy approach for electing appropriate Cluster Head (CH) based on the use of Opportunistic parameter. This proposed MPOTFEM scheme includes Markov chain and Preventive Maintenance (PM) concept for assessing the degree to which the network is serviced. It is seen that, malevolent nodes are not elected as CHs by mitigating frequent election of CHs. From the simulation results, it is seen that the proposed mechanism is prime in sustaining the percentage of alive and dead nodes in the network by 10.82% and 11.36% on average in contrast to the existing schemes. The results show that the proposed mechanism is competent in offering 9.14% and 10.56% improved PDR and Throughput on average in contrast to the prevalent CH election mechanisms.