Skip to Content
SensorsSensors
  • Article
  • Open Access

17 April 2025

36 Pages

Trusted Energy-Aware Hierarchical Routing (TEAHR) for Wireless Sensor Networks

,
,
and
1
Computer Science and Engineering, Birla Institute of Technology, Mesra 835215, India
2
Computer Science and Engineering, Harcourt Butler Technical University, Kanpur 208002, India
3
Computer Science and Engineering, Delhi Skill and Entrepreneurship University, Delhi 110077, India
*
Author to whom correspondence should be addressed.

Abstract

These days, wireless sensor networks (WSNs) are expanding fast and are used in many fields such as healthcare, battlefields, etc. Depending upon the type of sensor, they are transmitting a considerable amount of data in a short duration, so security is a significant issue while transferring the data. So, it is essential to solve security concerns while transferring data by secure routing in wireless sensor networks. We address this challenge by proposing Trusted Energy-Aware Hierarchical Routing (TEAHR), a new framework for a multi-level trust assessment that raises the security level in WSNs. TEAHR introduces a variety of trust metrics ranging from energy trust to forwarding trust to consistency trust to behavioral trust to anomaly detection, unlike existing models, enabling it to effectively address the challenges of dynamic network topologies and evolving cyber threats. Trust-based routing mechanisms are usually associated with high computation and storage complexity and susceptibility to collusive attacks such as spoofing. The mechanism in TEAHR overcomes these challenges by placing an adaptive trust assessment mechanism that adapts to the background network conditions and real-time activities of the nodes. We show through empirical analysis in this paper that TEAHR not only uses computational and storage resources efficiently but also enhances network performance and security. Our experimental setup presents the simulation approach to prove our proposed protocol of TEAHR in comparison with typical trust models under different scenarios of node mobility, variable node density, and sophisticated security attacks such as Sybil, wormhole, and replay attacks. TEAHR keeps the network connected, even when the nodes are isolated due to trust misbehavior, and demonstrates that widely it reduces the chances of misjudgment in trust evaluation. Moreover, we explore the scalability of TEAHR across large networks as well as its performance in computationally constrained contexts. We have verified through our detailed investigation that the energy metrics used uniquely in TEAHR extend the life of the network while increasing data routing trust and trustworthiness. The comparisons of TEAHR with conventional techniques show that the proposed algorithm reduces total latency by 15%, enhances energy efficiency by around 20%, and maintains a stable packet forwarding rate, which is highly desirable for accurate operation in adversarial environments, as demonstrated through comparative analysis. Through in-depth theoretical and practical analysis, TEAHR is confirmed as a high-performance framework that outperforms currently existing studies for WSN security, making TEAHR a strong candidate for use in industrial IoT applications and urban sensor networks.

1. Introduction

Trust, a fundamental component of human interactions, serves as a conceptual keystone for establishing secure and reliable communication among sensor nodes. In WSN, Trust assesses node behavior and encompasses a multifaceted evaluation of communication patterns, data integrity, and overall trustworthiness. Integrating trust models provides an upward route to defend WSNs from malicious features, generates fidelity of transmitted messages, and grows the life span of the network in operation. Abstract With the dramatic proliferation of wireless sensor networks, much is expected to provide a broad range of services and applications that come up with an overwhelming need for cost-effective, robust security solutions. Conventional WSNs, despite being irreplaceable in terms of their data-acquisition potential, are subject to limitations such as node compromise, which is tempered with data and communication interruptions. The vulnerabilities, escalated by the inherent resource constraints of sensor nodes, point towards a dire need for new ways to enhance the dependability and efficiency of wireless sensor networks. WSNs are naturally vulnerable because wireless communication is open, so we see many security threats. The concept of trust management for WSNs provides an easy and straightforward solution to couple the security and cooperation problem, which measures the degree/level by which sensor nodes in improving network performance are being trusted or distrusted. WSNs are capable of providing multi-tiered detection capability, as they can gather information wirelessly and communicate. However, there are also security flaws in their open messaging, unattended deployment, and limited resources. Malicious nodes (compromised or faulty) can inject erroneous data, disrupt routing protocols, and consume energy, thereby jeopardizing the network integrity and application performance.
Recent studies have proposed various trust evaluation models for assessing the trustworthiness of sensor nodes. Z. Ye. et al. [1] have proposed a dynamic trust evaluation model (DTEM), considering several factors of communication, called communication trust, data storage, and processing demands for adaptively evaluating data flow quality, which is referred to here for DTEM as energy-aware reputation-based scheduling in CSPs. This model calculates direct Trust and evaluates indirect Trust using trusted third-party recommendations. The integration of direct and indirect Trust was achieved by assigning and combining dynamic weights. Trust-based security mechanisms involve the development of lightweight security protocols tailored to the resource-constrained environments of WSNs. These are trust-based cluster head election mechanisms, location-aware trust-based mechanisms for detecting and isolating compromised nodes, and scalable enforcement algorithms using many-to-one balanced evolutionary game theory. Mathematical models underpin these techniques and provide a theoretical foundation for trust management systems. Trust management systems are comprehensive frameworks that include the collection, storage, modeling, transferring, and decision-making of trust-related information [2]. They are designed to detect and defend against internal attacks such as DoS, bad-mouthing, and on-off attacks, among others. Trust models offer an appropriate mechanism for formally setting up and handling trust relationships among sensor nodes. The Trust of sensor nodes is evaluated in many dimensions, including data trust, behavior trust, comprehensive Trust, and historical trust [3]. Relay nodes are also subjected to trust evaluation to ensure the integrity of the data transmission. A trust list was maintained to keep track of the trustworthiness of nodes within the network. Trust in wireless sensor networks is always considered a broader concept than just the evaluation of single-node behavior. This refers to communication patterns, data correctness verification, and collaborative decision-making. Through the amalgamation of trust metrics, anomaly detection algorithms, and cryptographic techniques, a comprehensive trust-based framework has emerged, which is promising for significantly enhancing the security posture of wireless sensor networks.
In WSNs, trust management requires customization of applications as trust management (TM) is challenging owing to the nature of WSNs, deployment of sensor nodes, and how the dynamic characteristics of sensor nodes change over time. The deployed sensor nodes create numerous complications in TM [4]. Hostile surroundings can harm or physically impact a sensor node, causing it to function poorly. In addition, sensors are vulnerable to physical capture and temptation because of the distant and unsupervised nature of the environment. This results in a node behaving in an intelligent but incorrect manner, further complicating this issue. The network’s topology is dynamic, causing the neighborhood to vary dynamically. It is crucial to manufacture sensors at a low cost, which results in limitations in their computational power, communication range, and battery capacity. Therefore, in light of these aspects, it is essential to develop trust estimations (TEs) that are effective in terms of energy and processing resources to align with the limitations of sensor nodes while also ensuring that they are strong enough to fulfil the security needs of TM. Furthermore, exchanging trust values between nodes may be restricted because of the increased energy consumption and congestion in the limited bandwidth caused by the message overhead. Proposing a trademark while considering the aforementioned considerations can be challenging. Executing TE and managing each Node in a large number of neighboring nodes is a tedious task. Despite numerous proposed studies, current computational techniques need a comprehensive analysis of all essential design factors for TM. Furthermore, while TM is still in its early stages, numerous research difficulties require attention, particularly the confusion between TM, reputation management, and trust establishment.
To ensure secure communication in WSNs, it is essential to ensure that the intermediate nodes responsible for forwarding data packets are trustworthy within the network. Hence, an effective trust model needs to be created. Each sensor node should evaluate the trustworthiness of its neighboring nodes based on model parameters. The trust model is one of the critical issues in WSNs. Various studies have also shown that a trust management system is a beneficial approach to identification and protection from threats [5]. Moreover, to avoid captured/compromised nodes from internal attacks, the trust model used here, the author has designed a trust management system. Trust management systems are employed to assess the attributes of information, provide network trustworthiness services such as authentication and sensing the rogue nodes, and facilitate secure resource sharing. This is a more profound research area in understanding Trust Management technology mechanisms, designs, and objectives of Trust management for WSNs, along with related study and open challenges. To find Trust, we need to cover the fundamental concepts of Trust, i.e., ideas and design elements. To construct a Trust Establishment (TE) scheme appropriately, it is crucial to have a thorough understanding of the fundamentals, i.e., the definition, values, and properties of Trust. Furthermore, TM-related attacks, protection methods, and applications are discussed to provide a comprehensive understanding of TM. Understanding the concept, values, and features of Trust is crucial for estimating the trust levels of nodes. The trust model establishes and manages trust connections between two nodes to ensure that legitimate nodes may be trusted to participate in the information transmission process [2]. Trust is the level of belief in the future actions of other nodes as determined by prior experiences and observations of their behavior. Trust in WSNs is as follows: The Trust that Node A has in Node B can be defined as the confidence, expectation, or assurance that Node B will be good in a manner that is sincere, competent, and honest in an upcoming activity or behavior. Trust value: A wide variety of forms and ranges are used, which can be in the range of 0 or 1, 0 to 100; the form can be discrete or continuous. Trust properties: Trust properties are yet another essential component of both trust estimation and establishment. We consider the following trust properties: the subjective attribute indicates that multiple trust values can be assigned to the same Node. The current degree of Trust may be influenced by past experiences. Continually changing leads to the possibility that trust values increase or decrease over time. The evaluation of Trust is influenced by the researcher’s subjective viewpoint, and there is no consensus on the specific traits that should be included. In previous studies, the authors in [6] categorized trust as Trust relationships built on context attributes that encompass information about the relevant participant’s situation. It is challenging to assess and monitor trust characteristics. These traits are related to cognitive and social Trust. Trust factors that may be assessed and tracked. These qualities focus on computing Trust. The authors [7] have defined trust qualities into numerous attributes, such as Trust is not 100%, i.e., one object cannot trust another object completely. The degree of Trust between nodes R and V and between nodes R and G is related to the transferability of Trust. This crucial quality can be used to reason through complex relationships. In the past, researchers have proposed various trust management approaches for WSNs, each with its strengths and limitations. WSNs are increasingly becoming a critical component of modern technology infrastructure. WSNs have evolved into a fundamental technology for collecting and transmitting data in a variety of settings. However, the decentralized and often unattended nature of these networks makes them particularly vulnerable to security threats. There are many challenges, and trust management is essential for ensuring the trustworthiness, security, and integrity of the data and the network itself. The deployment of WSNs in open, often hostile environments poses unique challenges that differ from traditional wired or centralized networks. The critical characteristics of WSNs include limited power resources, constrained computational capabilities, and the absence of a fixed infrastructure. These characteristics make WSNs highly susceptible to a range of attacks, such as data tampering, eavesdropping, and node capture. Furthermore, the ad hoc nature of these networks means that nodes must often rely on each other for routing data, making the network’s overall security dependent on the trustworthiness of individual nodes.
The motivation for selecting trust management in WSNs is also driven by the need to choose an approach that aligns with the specific requirements of the network and its applications. In trust-based routing protocols, the trustworthiness of nodes is considered when selecting routes for data transmission; considering this approach helps ensure that data are transmitted through reliable nodes, thus reducing the risk of data being intercepted or tampered with. Another approach is reputation systems, in which nodes monitor the behavior of their neighbors and assign reputation scores based on their observed behavior. Nodes with low reputation scores are considered untrustworthy and may be excluded from participating in the network. When you need to identify malicious behavior, you have to consider context-aware trust management systems, which are useful in dynamic environments where the behavior of nodes may vary depending on external factors such as environmental conditions or the presence of interference. By considering the context, these systems can make more accurate trust assessments. So, for WSNs, trust management is an essential focus for researchers and practitioners alike. By selecting trust management, WSNs can achieve higher levels of security, resilience, and efficiency, enabling them to support a wide range of critical applications across different domains. Trust is a dynamic concept, and it is possible for it to exist for some time. It is inevitable that the level of confidence shifts over time. WSNs are assailable to several types of attacks. Therefore, it is necessary to create a robust and secure design and use secure algorithms. This paper is further divided in the following ways: in Section 2, we discuss related studies. In Section 3, we focus on the proposed study and the discussion; Section 4 discusses the results, and Section 5 is the conclusion of the paper.

3. Proposed Studies

In WSNs, identifying compromised or malicious nodes that can disrupt data flow or infuse harm is a sensor network, and in order to evaluate the trust, the trust mechanism can be used. In this paper, we propose a Trusted Energy-Aware Hierarchical Routing (TEAHR) protocol, which is capable of addressing the following issues that WSNs have to encounter, such as limited energy, network security, and scalability. Sensor nodes are equipped with tiny batteries, so energy management must be taken care of cautiously. WSNs are threatened by many attacks, and trust mechanisms can resist malicious behavior. TEAHR protocols can efficiently cope with large-scale WSNs. Table 1 summarizes the above various types of trust management in WSN.
Table 1. Comparative analysis of trust models.

3.1. Research Contribution

In this paper, we proposed an energy-efficient framework to enhance the wireless sensor network security and detect anomaly detection. The TEAHR framework is designed to improve the security and performance of WSNs by dynamically assessing the trustworthiness of sensor nodes based on multiple criteria. The core idea behind TEAHR is to integrate trust evaluation with energy-aware routing to create a robust and efficient network. In the proposed framework, by considering factors such as energy consumption, packet forwarding effectiveness, consistency in behavior, and adherence to network protocols, the TEAHR framework provides a comprehensive approach to managing Trust and enhancing the trustworthiness of WSNs. The critical components of TEAHR are as follows:
  • Energy Trust: Energy trust refers to the evaluation of a node’s remaining energy levels as a measure of its operational trustworthiness and expected lifespan. In WSNs, energy efficiency plays a critical role due to the limited power resources of sensor nodes, which are often powered by tiny batteries. Nodes with higher energy reserves are more likely to continue functioning reliably, making them more trustworthy within the network.
  • Forwarding Trust: Forwarding Trust assesses a node’s effectiveness in forwarding packets to their intended destination. In a WSN, the ability of a node to reliably forward data is crucial for maintaining data integrity and ensuring that information reaches the intended recipients. A node’s forwarding Trust is determined by monitoring its packet forwarding history, including metrics such as the number of successfully forwarded packets, packet loss rates, and transmission delays. Nodes that demonstrate consistency and trustworthiness in forwarding behavior are assigned higher trust scores, which make them more favorable for inclusion in routing paths.
  • Consistency Trust: The level of consistency in a node’s behavior over time, particularly in relation to packet forwarding, is evaluated by consistency trust. This metric helps detect deviations that may signal potential malignancy or hardware failure. Inconsistencies in a node’s behavior, such as sudden drops in forwarding success rates or erratic energy consumption, can indicate that the Node has been compromised or is experiencing technical issues. TEAHR can identify nodes that may pose a risk to the network and adjust routing decisions accordingly to maintain overall network stability.
  • Behavioral Trust: Behavioral Trust examines a node’s adherence to network protocols and its past activity patterns to detect anomalies or potential security breaches. This metric is critical for identifying nodes that may be engaging in malicious activities, such as data tampering, unauthorized access, or collusion with other compromised nodes. Behavioral Trust is assessed by analyzing a node’s interaction with other nodes, its response to protocol commands, and any deviations from expected behavior. Nodes that exhibit suspicious or non-compliant behavior are assigned lower trust scores and may be excluded from critical network functions.
  • Anomaly Detection: a vital feature of the TEAHR framework, enabling the identification and isolation of malicious nodes within the network. When a node’s trust score falls below a certain threshold due to suspicious behavior, it is flagged as potentially compromised. The TEAHR system then takes proactive measures to manage the anomaly, such as restricting the Node’s access to the network or isolating it entirely. This approach ensures that the impact of malicious nodes is minimized and that the network remains secure and operational. Additionally, the system continuously monitors the trust scores of all nodes, allowing for dynamic adjustments based on real-time behavior.
  • Energy Efficiency: TEAHR improves energy efficiency across the network by using energy metrics in trust computation. Nodes that are more energy-efficient are rated positively in trust evaluations, which incentivizes the use of energy-saving practices among nodes. This focus on energy efficiency not only extends the operational life of the network but also enhances its overall performance by reducing the likelihood of node failures due to energy depletion.
Advantages of the Proposed TEAHR Framework. The TEAHR framework offers several advantages over traditional trust management and routing protocols in WSNs:
  • Enhanced Security: By incorporating multiple trust metrics, including energy, forwarding, consistency, and behavioral Trust, TEAHR provides a comprehensive approach to identifying and mitigating security threats. This multifaceted trust evaluation process makes it more difficult for malicious nodes to evade detection, thereby enhancing the overall security of the network.
  • Optimized Energy Consumption: The integration of energy trust into the routing process ensures that nodes with sufficient energy reserves are prioritized, reducing the likelihood of network disruptions due to node failures. This focus on energy efficiency helps to extend the lifespan of the network and reduces the need for frequent maintenance or node replacement.
  • Improved Network trustworthiness: TEAHR’s emphasis on forwarding trust and consistency trust ensures that data are transmitted through reliable and consistent nodes, which enhances the integrity of the data and reduces the likelihood of packet loss or delays. This improved trustworthiness is essential in critical applications where accurate and timely data transmission is essential.
  • Scalability: The hierarchical nature of the TEAHR framework allows it to efficiently manage trust and routing decisions in large-scale WSNs. The system can scale to accommodate networks with a large number of nodes without compromising on performance or security, making it suitable for deployment in diverse and expansive environments.
  • Dynamic Trust Management: TEAHR’s ability to dynamically assess and adjust trust scores based on real-time behavior ensures that the network can quickly respond to emerging threats and changes in node behavior. This adaptability is crucial in environments where network conditions and node behavior can change rapidly, such as in battlefield or disaster response scenarios.
The proposed TEAHR framework represents a significant advancement in the field of WSNs, offering a robust and energy-efficient solution for trust management and routing. By integrating multiple trust metrics and focusing on energy efficiency, TEAHR addresses the critical challenges of security, trustworthiness, and scalability in WSNs. The framework’s ability to dynamically assess Trust and manage anomalies ensures that the network remains secure and operational, even in the face of evolving threats. As WSNs continue to expand and find applications in critical areas, the TEAHR framework provides a valuable tool for enhancing network performance and security. Figure 4 shows the flow of the proposed algorithm.
Figure 4. Flowchart of TEAHR.
In the proposed TEAHR framework, we deploy the sensor nodes in a 1000 × 1000 m area and start the cluster head (CH) initialization and selection process. To choose the CH, we define the threshold value (which is defined above; check the Trust Evaluation Reference) based on the energy level of each sensor node. If the trust level is less than the Threshold, then check for malicious activities. If the sensor node is a malicious (anomaly) node, then discard it; otherwise, participate in sending, receiving, and forwarding the data to CH. If the Trust is more than the Threshold, then use those sensor nodes to select the CH for data transfer activities.

3.2. Proposed Algorithm

As per the definition of Trust, it is not easy to create Trust in the dynamic nature of wireless sensor networks. In our proposed study, we tried to create Trust between sensor-to-sensor nodes and sensor nodes to cluster heads, as well as between the cluster heads. So, on the basis of this Trust, we measure the anomaly in the wireless sensor network, and we propose a framework for that. In the proposed algorithm, it is designed to evaluate the trustworthiness of nodes within a WSN. The variables used in this algorithm are presented next. xi: Represents an individual standard (non-cluster head) Node within the network. CH: Represents a cluster-head node. Cluster heads are specific nodes that take on additional responsibilities, such as coordinating communication within their cluster. CH.T: This is the Trust Table associated with a Cluster Head. It stores trust-related information about the normal nodes in that cluster. On the basis of these variables, the Trust is calculated as follows: T_energy(xi): Energy Trust. Measures how much energy a node has remaining relative to its maximum capacity (E_res(xi)/E_max). Nodes running low on energy might be more susceptible to compromise. T_forward(xi): Forwarding Trust. Calculates how reliably a node forwards data packets as intended (P_forwarded(xi)/P_received(xi)). T_consistency(xi): Consistency Trust.
Ensures that nodes are forwarding data packets consistently (P_consistent(xi)/P_forwarded(xi)). Inconsistent behavior could indicate problems. T_behavior(xi): Behavior Trust. A more complex measure is based on whether the Node follows the network rules and its past activity. So, overall, Trust and Threshold T_overall(xi): Combined trust score for the Node, calculated using a weighted sum of individual trust factors (with weights w1, w2, w3, and w4). T_threshold: Dynamically adjusted Threshold based on the network’s current state and past data. This allows the algorithm to adapt to changing conditions. The algorithm of the proposed study is as follows.
In Algorithm 1 the lines 1–2 Initialization of cluster_head_selection, which takes the network N and cluster head CH. Loop through each node xi in the cluster of CH. Lines 3–9 If xi is in the CH.T trust table, calculate the trust metrics, i.e., Energy Trust, Forwarding Trust, Consistency Trust, and Behavior Trust. Then, compute the overall trust score T_overall(xi)T_overall(xi)T_overall(xi) based on the weighted sum of the individual trust metrics. Then, a dynamic trust threshold T will be set based on network conditions and historical data. Lines 10–21 will perform the decision to find the Trust if the overall trust score T_overall(xi) is below the Threshold: If xi shows signs of malicious behavior, then broadcast an alert about xi and block xi from all network activities. Otherwise, Flag xi for re-evaluation to limit its network participation and update the trust level of xi in the trust table CH.T. If the overall trust score T_overall(xi) is above the Threshold, then confirm xi participation in network activities and update the trust level of xi in the trust table CH.T. Line 22 End the loop for each Node in the cluster.
Algorithm 1: Cluster Head Selection
Input: xi represents the normal Node, and CH represents a Cluster-Head node.
Output: Cluster head selection
1:  function cluster_head_selection(N, CH)
2:         for each xi in CH’s cluster do
3:                 if xi in CH.T then
4:                          T_energy(xi) ⇐ E_res(xi)/E_max
5:                          T_forward(xi) ⇐ P_forwarded(xi)/P_received(xi)
6:              T _ c o n s i s t e n c y ( x i )   ⇐   P _ c o n s i s t e n t ( x i ) / P _ f o r w a r d e d ( x i )
7:                          T_behavior(xi) ⇐ evaluate_behavior(xi)
8:                              T_overall(xi) ⇐ w1*T_energy(xi) + w2*T_forward(xi) + w3*T_consistency(xi) + w4*T_behavior(xi)
9:                          T_threshold ⇐ set_dynamic_trust_threshold()
10:                         if T_overall(xi) < T_threshold then
11:                                if is_malicious(xi) then
12:                                      broadcast_alert(xi)
13:                                      block_node(xi)
14:                                else
15:                                      flag_for_re_evaluation(xi)
16:                                       update_trust_level(CH.T, xi)
17:                                end if
18:                         else
19:                                confirm_participation(xi)
20:                                update_trust_level(CH.T, xi)
21:                         end if
22:                 end if
23:         end for
24: end function
In Algorithm 2 the lines 1–5 Define the function setup_dynamic_trust_thresholds, which takes the network N and cluster head CH. For each node xi in the cluster of CH, calculate the initial trust threshold T_threshold and continuously update it. Lines 6–17 evaluate the Trust for all nodes, the same as in previous algorithm with additional adjusted routes dynamically based on the latest trust assessments. If the overall trust score T_overall(xi) is below the threshold T_threshold, redirect critical communications away from xi. Lines 19–29: If a new member is added for each new Nodenode in network N if the new Nodenode meets or exceeds the trust threshold T_threshold, fully integrate the Nodenode into the network with standard privileges. If the new Node fails to meet the trust threshold T_threshold: If probation is needed, extend the probation period for the Node. Otherwise, the Node can be removed from the network based on security policies. Lines 30–34 Periodically recalculate the trust thresholds. Recalculate T_threshold during significant network events, such as node failures or attack detection. Use adaptive algorithms to set thresholds based on predictive analytics of network conditions and node behavior patterns. Lines 35–42 manage the malicious behavior; if the overall trust score falls below T_threshold and the Node shows signs of malicious behavior, then isolate and remove xi from critical communication routes and broadcast alerts. Line 43 is the end of the loop.
Algorithm 2: Setup Dynamic Trust Thresholds
Input: xi represents a normal node, and CH denotes a cluster-head node managing a cluster of nodes.
Output: Dynamic threshold value
1: function setup_dynamic_trust_thresholds(N, CH)
2:         for each xi in CH’s cluster do
3:                 T_threshold ⇐ calculate_initial_threshold(xi)
4: continuously_update_threshold(T_threshold)
5: end for
6:         for each xi in N do
7:                 if xi in CH.T then
8:                          T_energy(xi) ⇐ E_res(xi)/E_max
9:                          T_forward(xi) ⇐ P_forwarded(xi)/P_received(xi)
10: T_consistency(xi) P_consistent(xi)/P_forwarded(xi)
11:                          T_behavior(xi) ⇐ evaluate_behavior(xi)
12:                          T_overall(xi) ⇐ w1*T_energy(xi) + w2*T_forward(xi) + w3*T_consistency(xi) + w4*T_behavior(xi)
13: adjust_routes_based_on_trust(T_overall(xi), T_threshold)
14:                          if T_overall(xi) < T_threshold then
15:                               redirect_critical_communications(xi)
16:                          end if
17:                 end if
18:         end for
19:         for each new_node in N do
20:                 if new_node meets_or_exceeds T_threshold then
21: integrate_node(new_node)
22:                 else
23:                          if probation_needed(new_node) then
24:                               extend_probation(new_node)
25:                          else
26:                               remove_node(new_node)
27:                          end if
28:                 end if
29:         end for
30:         periodically_recalculate_thresholds()
31: for each significant_event in network_events do
32:                 recalculate_T_threshold()
33:                 set_thresholds_using_predictive_analytics()
34: end for
35:         for each xi in N do
36: if T_overall(xi) < T_threshold and is_malicious(xi), then
37:                          isolate_and_remove(xi)
38:                          broadcast_alerts(xi)
39:                          quarantine_node(xi)
40:                 end if
41:                 update_CH_T()
42:         end for
43: end function
Algorithm 3 is Trust-based hierarchical routing oversees the routing process through trust assessments and energy factors. This method invokes method 1 (cluster_head_selection(N and CH)) to pick cluster heads based on Trust and employs the dynamic trust thresholds established by just previous algorithm for routing decisions. Establishes a hierarchical routing mechanism that is energy-efficient and trust-centric, guaranteeing adequate and secure data transmission across the network. In this algorithm, trust-based routing, data transmission, dynamic trust management, and secure data transmission functions are used to create hierarchical routing.
Algorithm 3: Trust-Based Hierarchical Routing
Input: N—Set of normal nodes, CH—Set of Cluster Heads, BS—Base Station
Output: Efficient and secure routing of data based on Trust
1: function initialize_network(N, CH, and BS)
2:         Deploy N sensor nodes randomly in the network area
3:         Divide N into M clusters using a clustering algorithm
4:         Select initial CHs using cluster_head_selection(N and CH)
5: Initialize trust levels for all nodes in N and CHs in CH
6:         Set up initial routing tables for each Node and CH
7: end function
8: function trust_based_routing_setup(N, CH, and BS)
9:         for each node xi in N do
10:                 Identify the closest Cluster Head CHi based on minimum energy cost
11:                 if T_overall(xi) ≥ T_threshold then
12:                          Assign node xi to cluster CHi
13:                          Update routing table of xi to CHi
14:                 else
15:                          Flag xi for re-evaluation and assign to probationary CH
16:                 end if
17:         end for
18: end function
19: function trust_based_data_transmission(N, CH, and BS)
20:         for each Cluster Head CHi in CH do
21:                 Aggregate data from all nodes in CHi’s cluster
22:                 Calculate Chi _Trust based on T_overall values of nodes in the cluster
23:                 if CHi_trust >= T_threshold then
24:                          Transmit aggregated data to BS using shortest path routing
25:                 else
26:                          Redirect data transmission to secondary or neighboring CH
27:                          Trigger cluster_head_selection(N and CH) for re-election of CH
28:                 end if
29:         end for
30: end function
31: function dynamic_trust_management(N, CH, and BS)
32:         for each node xi in N do
33:                 Recalculate T_overall(xi) using updated parameters
34:                 Adjust cluster membership based on T_overall(xi)
35:                 if T_overall(xi) < T_threshold then
36:                          Trigger re-evaluation or isolate xi based on severity
37:                          Update routing tables accordingly
38:                 end if
39:         end for
40:         Update dynamic trust thresholds using setup_dynamic_trust_thresholds(N and CH)
41:         Adjust routes based on updated trust values and thresholds
42: end function
43: function secure_data_transmission(N, CH, and BS)
44:         for each Cluster Head CHi in CH do
45:                 Verify T_overall(CHi) and establish a secure communication link
46:                 Transmit data to BS via trusted CHs or multi-hop routing if required
47:                 if link failure or malicious behavior is detected, then
48:                          Isolate and reroute data through alternative CH or path
49:                 end if
50:         end for
51:         Periodically monitor the network for any malicious(anomaly) activities
52: end function
53: function maintain_network(N, CH, and BS)
54:         for each node xi in N do
55:                 Monitor energy levels and T_overall(xi)
56:                 Re-elect CHs based on residual energy and trust levels using cluster_head_selection(N, CH)
57:         end for
58:         for each Cluster Head CHi in CH do
59:                 Evaluate performance and reassign nodes if necessary
60:         end for
61:         Perform periodic network maintenance and recalibrate trust parameters
62: end function

3.2.1. Theoretical Analysis of TEAHR

Formal Proof of TEAHR’s Robustness in Trust Evaluation
Theorem 1. 
TEAHR is Robust Against anomaly Sensor Nodes in Trust Estimation. 
Proof 
by Strong Induction. 
Let T(x, y, Δt) denote the trust value assigned by sensor node x to sensor node y at time Δt.
Base Case: No Interaction Between Nodes x and y. If there is no direct interaction between x and y, the trust value T(x, y, Δt) is computed indirectly by the Cluster Head (CH), which aggregates recommendations from neighboring nodes. Since CHs are periodically verified and their trust values are aggregated using weighted averaging, malicious nodes cannot manipulate indirect trust values arbitrarily. TEAHR remains robust even when there are no direct interactions. Inductive Hypothesis (For k Interactions). Assume TEAHR correctly evaluates trust and prevents deception for all cases where the number of interactions ≤ k. Inductive Step (For k+1 Interactions). If the number of successful interactions S(x, y, Δt) is greater than the unsuccessful interactions U(x, y, Δt), then T(x, y, Δt) remains above the trust threshold (T_thresh), allowing normal participation. If U(x, y, Δt) > S(x, y, Δt), TEAHR detects the node as potentially anomaly detection to detect sudden fluctuations in trust scores. Thus, by induction, TEAHR remains robust for all k+1 interactions, proving that no node can manipulate the trust model without detection. □
Theorem 2. 
TEAHR is Robust Against Anomaly Cluster Heads (CHs) in Hierarchical Trust Evaluations. 
Proof 
by Contradiction. 
Suppose TEAHR is not robust, meaning an anomaly CH can manipulate trust scores. Each CH maintains a local trust table (LTT) and exchanges trust metrics with neighboring CHs. If a CH misbehaves (e.g., dropping packets, falsifying reports, or colluding with malicious nodes), TEAHR enforces the cross-verification with other CHs: if CH-A detects that CH-B is lowering trust scores unjustifiably, CH-B is penalized. Adaptive Trust Thresholds: CHs dynamically update the T_thresh, preventing attackers from exploiting static trust models. Anomaly Isolation: If a CH’s behavior deviates significantly, it is flagged, demoted, or isolated. Thus, no CH can manipulate trust scores without being detected, leading to a contradiction. □
Complexity Analysis of TEAHR
Computational Complexity
  • Trust Score Computation: Each node computes its trust score using a weighted sum of metrics (Energy Trust, Forwarding Trust, Consistency Trust, Behavioral Trust). Time Complexity: O(1) per node.
  • Cluster Head Selection: CHs are selected based on energy levels and trust scores. Worst-case Complexity: O(N log N) (sorting-based selection).
  • Anomaly Detection:
    ○
    Sliding window-based detection: O(1) per node.
    ○
    Statistical deviation-based anomaly detection: O(N) time.
Communication Complexity
  • Trust Exchange (Node-to-CH): O(1) per node, O(N) per cluster.
  • CH-to-CH Trust Verification: O(log N) per CH.
  • Global Network Trust Aggregation (Base Station processing): O(log N).
Thus, TEAHR achieves O(N log N) worst-case complexity, making it scalable for large WSN deployments.
TEAHR Under Adversarial Conditions
i.
Cluster Member-to-Cluster Member (CM-to-CM) Trust Estimation
  • No Interaction (CM x and CM y):
    ○
    Ux,y C, D (Δt) + Sx,y C, D (Δt) = 0 → Trust is computed by CH, ensuring robustness.
  • If Ux,y C, D (Δt) ≥ 1 and Sx,y C, D (Δt) = 0:
    ○
    TEAHR assigns Tx,y C, D (Δt) = 0, preventing malicious deception.
  • If Ux,y C, D (Δt) ≥ Sx,y C, D (Δt):
    ○
    Trust score Tx,y C, D (Δt) < Θ, flagging the node as malicious.
ii.
Prevention of Common WSN Attacks
  • Sybil Attack Prevention
    ○
    TEAHR enforces ID authentication and anomaly detection.
    ○
    Nodes with multiple IDs are flagged when behavioral discrepancies are detected.
  • On-Off Attack Defense
    ○
    TEAHR introduces trust decay factors.
    ○
    Nodes alternating between good and bad behavior face exponential trust score decay, preventing cyclic exploitation.
  • Bad-Mouthing and Ballot-Stuffing Attack Mitigation
    ○
    TEAHR cross-verifies recommendations from multiple sources.
    ○
    Weighted averaging of indirect trust prevents a group of malicious nodes from unfairly penalizing others.
  • Blackhole and Wormhole Attack Prevention
    ○
    TEAHR flags nodes dropping packets at an abnormally high rate.
    ○
    If a CH fails multiple integrity checks, it is demoted, isolated, and replaced.
In Figure 5 shows a dynamic trust evaluation framework for WSN to detect a malicious node and isolate that node. Each node xi is evaluated by its cluster head (CH) based on four metrics i.e., energy trust, forwarding trust, consistency trust and behaviors trust. These trusts are combined using the weighted to calculate overall trust, which is being compared with dynamic threshold value. If trust value meets or exceed the threshold value then that sensor node be consider trustworthiness and continue allow them in network. If it is failed below the threshold but not shows malicious behaviors then allow them to be part of network or if shows the malicious behaviors then discard those sensor nodes. These steps will ensure the security and by continuous monitoring the node behaviors.
Figure 5. The flow of CH selection.

4. Result and Discussion

4.1. Trusted Energy Aware Hierarchical Routing (TEAHR)

Authors [34] demonstrate the effectiveness of the TIOCHR algorithm in enhancing the network lifetime and energy efficiency; it needs to fully explore the potential challenges of implementing such trust-based systems in highly dynamic or adversarial environments where node trustworthiness might frequently change. A dynamically changing WSN experiences node failure, mobility, energy depletion, and varying network traffic. To maintain robustness, TEAHR’s trust assessment mechanism must be adaptive across multiple trust metrics. Trust scores are updated continuously, monitoring nodes’ actions. If a node’s behavior fluctuates (e.g., it forwards packets inconsistently), its trust score is gradually lowered. Nodes with stable, positive behavior receive incremental trust increases. If a node starts dropping packets due to congestion, the system distinguishes unintentional failures from malicious intent by analyzing past behavior. Instead of immediately isolating the node, TEAHR might reduce trust slowly and allow recovery if normal behavior resumes. Furthermore, this study might benefit from a comparative analysis with other trust-based models to establish the specific advantages or limitations of the TIOCHR approach in various real-world applications. In our proposed model, we tried to overcome the drawback of TIOCHR.
In Figure 6 green color is base station which gathers all information of the sensor network, black color is cluster head of which is surrounded by the sensor nodes are blue color. Bule line shows that routing from cluster head to based station and dotted line shows the sensor node communication to cluster head.
Figure 6. Sensor-to-sensor, sensor-to-group head, cluster head to cluster head-to-group head, and cluster head to base station trust and routing.
Table 2 shows the notations descriptions for various trust and selection metrics used in WSN for cluster-based architecture. The parameters such as energy, communication, node behavior and other network related factors to find the trustworthiness.
Table 2. Notation description.

4.2. Initialization

Each Node in the network starts with an initial percentage of being a cluster head (CH) candidate, called the “CH probability” (Pch), and sets its status to undecided. The initial Pch can be a system parameter based on the size and density. Let Pch(i) be the probability of Node i becoming a CH. Each Node I broadcasts its Pch(i) along with its residual energy, Eres(i). The nodes assess their residual energy relative to a reference, which can be the initial energy or an average energy level. This step ensures that nodes with higher energy have a higher chance of becoming a cluster head. Let Eres(i) be the residual energy of Node i, and Eref be the reference energy level, which could be the initial energy level Einit or the average energy level Eavg of all the nodes in the network. The fundamental trust score Tbasic (i) of Node i can be estimated as follows based on the residual energy of Node i:
T b a s i c ( i ) = E r e s ( i ) / E r e f
This equation means that the trust score is directly proportional to the lasting energy of a node compared with the chosen reference energy level. In a more dynamic scenario, where it becomes relevant that a chosen maximum residual energy, Emax, for the network at the time of evaluation could change over time, the normalized trust score would be:
T n o r m ( i ) = E r e s ( i ) / E m a x
The normalization of the trust score is such that it falls within a range [0, 1], with one corresponding to a node with maximum residual energy in the network. Furthermore, F(i) can have several other factors related to the centrality of the Node, its mobility, or historical performance in trust assessment. Then, a weighted trust score T w e i g h t e d ( i ) can be in the form:
T w e i g h t e d ( i ) = w 1 ( E r e s ( i ) / E r e f ) + w 2 F ( i )
where w 1 and w 2 are the weights assigned to the energy-based trust component and the additional factors, respectively, with w 1 + w 2 = 1. For Adaptive CH Probability Update each non-CH candidate node j, the updated CH probability P′ch (j) is calculated as follows:
P c h ′ ( j ) = P c h ( j ) + α ( E r e s ( j ) / E a v g _ a n n − 1 )
Here, E a v g _ a n n is the average of the residual energies announced by neighboring nodes, and α is a scaling factor to adjust the influence of the residual energy difference. So on the basis of that, the tentative CH selection Evaluation for each non-CH node k evaluates tentative CHs based on a suitability metric S(i,k), which could consider the announced Eres and Pch, and selects the one with the highest S(i,k).
S i , k = β 1 E r e s ( i ) + β 2 D ( i , k ) + β 3 P c h ( i )
Here, D(i,k) represents the distance or signal strength between nodes i and k, and β 1 ,   β 2 ,   a n d   β 3 are weights. Nodes with similar E r e s might be further evaluated based on secondary parameters like proximity or communication cost C(i,k), selecting the CH that minimizes this cost. Minimize C(i,k). The final CH set is determined by the nodes that receive confirmations from at least one other Node. Each non-CH Node joins the nearest or most suitable CH based on a composite metric M(i,j) considering Eres, D(i,j), and C(i,j).
M ( i , j ) = γ 1   E r e s ( j ) − γ 2 D ( i , j ) − γ 3 C ( i , j )
Here, γ1 γ2 γ3 are weights. The CH should continuously evaluate the trust values of the existing cluster members based on energy backup, packet forwarding, packet consistency, and any other relevant parameters. The network should define dynamic trust thresholds that can be adjusted over time based on network conditions and requirements. The initial trust T t h r e s h o l d can be set on historical data or network specifications.
T t h r e s h o l d = f ( n e t w o r k   c o n d i t i o n s , h i s t o r i c a l   d a t a )
This T h r e s h o l d is adaptive, based on the network’s historical data and current conditions. Trust-based communication and packet forwarding routes within the cluster should be established based on trust values. Higher trust nodes should be preferred for critical roles, such as data aggregation or relay.

4.3. Integrating New Cluster Members

When a new node is added to the cluster, an initial trust assessment is conducted. New nodes start with an initial trust value based on standard network entry criteria, possibly lower than the trust threshold for existing members to account for the lack of historical behavior data. This could involve directly monitoring the Node’s behavior in terms of its packet forwarding rate, energy usage, and consistency of data provided.
T n e w ( i , t ) = T i n i t i a l + δ ( T o b s e r v e d   a c t i o n s ( i , t ) )
Here, δ ( T o b s e r v e d   a c t i o n s i , t ) is the trust changes with time t from when a new node joined based on its types of observation, such as packet forwarding behavior, energy consumption, and proper implementation of network protocols. As a first step, the initial trust threshold of new nodes can be set to slightly less than that for current members so they have time to put their performance where their mouth is. Nevertheless, this maximal Threshold should be enough to hinder obviously nefarious nodes from perturbing mission-critical roles. New nodes may serve a probationary term during which they are observed more carefully. The trust value of those peers is prone to change more often, and their network roles are limited to non-critical tasks until a steady-state level of high Trust has been achieved and security checks are performed to verify if the new Node did not arise from known attacks. This could mean checking the Node’s credentials, confirming that its software has not been tampered with, and examining whether it is communicating in an abnormal way. Other nodes in the network watch how new ones on board participate and gradually increase their Trust as it becomes clear they are providing a benefit to the operations of that network. As the trust level of a new node grows and exceeds the dynamic Threshold, it can then be assigned additional tasks (i.e., data aggregation or being a secondary relay) within the cluster.
In our proposed algorithm, hierarchical routing is used and focuses on selecting CH from the group of sensor nodes, which is responsible for maintaining the information about the nodes within its cluster, calculating the Trust and making decisions about whether the Node is trustworthy or malicious. Our proposed algorithm, TEAHR, calculates the trustworthiness of nodes based on energy, forwarding behavior and consistency and dynamically adjusts the Threshold to decide whether a node can participate in selecting CH or should be blocked. As mentioned, the proposed algorithm updates the trust threshold dynamically and recalculates it based on various network events, further emphasizing the hierarchical decision-making process at the CH level.

4.4. Simulation Environment

Table 3 defines the parameters used in this proposed model; in this table, we define the trustworthiness, packet forward rate, anomaly factor, energy, trust level, threshold for detecting the malicious Node (anomaly), etc.
Table 3. Parameters for calculating the Trust.

4.5. Deployment of Sensor Nodes

In this paper, we set up the environment using 1000 × 1000 m2, and 500 sensors are randomly distributed. Figure 7 shows the deployment of the sensor nodes. Trustworthiness (TB(xi)), Packet Forwarding Rate (PFR), Anomaly Factor (AF), Malicious Threshold (TB(xi)), Trust Evaluation Interval, and New Node Trust z are used to evaluate the proposed study. The initial energy for each sensor node is 100 J.
Figure 7. Sensor node deployments.
Cluster Head (CH) Selection: To select the cluster head (CH), the minimum threshold range is from 0 (untrustworthy) to 1 (fully trustworthy). The minimum trust level required for CH selection = 0.7; nodes with >50% of initial energy are eligible for CH selection = 0.5. Malicious Trust threshold = 0.3 will be considered a malicious Node, and the trust level required value is 0.7 for CH selection.
Figure 8 displays the cluster heads chosen out of 500 sensor nodes on the basis of defined energy. Now, we insert the 20% malicious nodes to find the anomaly in the given sensor network as we insert the 20%, i.e., 100 malicious sensor nodes—the energy of overall sensor nodes after selecting the cluster head and identifying the malicious node. The dashed black circle around a CH represents the area within which sensor nodes communicate with each other via cluster head either directly or indirectly.
Figure 8. Cluster head selection.
Initial energy for each node = 1.0, energy consumed for forwarding a packet = 0.01, Threshold below which nodes are blacklisted = 0.3, number of packets each Node attempts to send = 100. Figure 9 displays the total energy consumed by different operations in sensor network mainly three i.e., normal operation, CH selection and anomaly identification. For normal operation such as sensing and communication consume around 1000 units, while CH selection shows the highest energy consumption which is 7000 units and for anomaly identification energy consume approximately 800 unit.
Figure 9. Energy consumption during normal operation, CH selection, and anomaly identification in WSN.
Figure 10 shows various performance indicators while WSN simulation. The metrics are displayed normalized values to compare across different scales. he successful deliveries = 30,000 represent the number of packets delivered, total latency = 154,428 reflects cumulative communication delay in the network, total packets sent = 50,000 shows the overall volume of data generated, packet forwarding rate (pfr) = 0.616 shows the reliability, latency (lt) = 5.013 is average delay per transmission, energy consumption (ec) = 308.00, network longevity as a fraction of alive nodes (NL) = 0.384 shows operation efficiency of the network over time, Routing Overhead (ROH) = 0.0033 shows protocol related overhead.
Figure 10. Successful deliveries, total latency, total packets sent, pfr, lt, ec, nl, and roh.
Identifying the suitable algorithm requires a balance between energy efficiency and latency, especially as the network grows. The graph below represents the trade-offs that different algorithms present when scaling up a network. TIOCHR and especially TEAHR appear to be more scalable solutions with respect to latency.
As defined in Algorithms 1 and 2, the TEAHR adopts a multi-level trust assessment mechanism, which includes energy trust, forwarding trust, consistency trust, behavioral trust, and anomaly detection. These may increase computation and storage overhead. To determine whether it does impose an additional performance burden or not, we have analyzed the performance impact of the multi-level assessment as defined in Algorithms 1 and 2, the result of which is Table 4, which shows that the trust assessment mechanism introduced a minimal additional overhead and the TEAHR approach is feasible without significant performance degradation.
Table 4. Multilevel trust assessment performance analysis.
The multi-level trust assessment mechanism helps in detecting and mitigating anomaly nodes, but it is vulnerable to strategic spoofing attacks where malicious nodes can be able to manipulate trust metrics to evade anomaly detection.
Table 5 provides a range of measures related to spoofing attacks and how these attacks affect network performance and integrity. num_nodes represents the total number of nodes in the network. num_anomaly represents the number of nodes that have been designated as anomalies. These are nodes suspected or confirmed to participate in spoofing or other harmful activities. anomaly_percentage defines the percentage of nodes that are malicious relative to the total number of nodes. This offers a normalized view of how prevalent anomaly activity is within the network. pre_attack_excluded count of nodes or connections that were excluded (or filtered out) by the network’s security mechanisms before any spoofing attack occurred. pre_attack_malicious_excluded nodes excluded before the attack, this column represents those that were malignant. It is an indication of the initial effectiveness of the pre-attack filtering mechanisms in catching malicious nodes. pre_attack_detection_rate is a percentage that illustrates the effectiveness of detection mechanisms before an attack. post_attack_excluded refers to the number of nodes (or connections) that were excluded after the spoofing attack was underway. post_attack_malicious_excluded the nodes after the attack begins; this column counts those that were identified as anomalies. post_attack_detection_rate is a detection rate computed after the spoofing attack begins. spoofing_success_rate metric indicates the success rate of the spoofing attack in terms of how many spoofing attempts or malicious actions were effectively carried out on the network. A higher value suggests that the attack was more successful in bypassing security measures.
Table 5. Spoofing analysis.
Table 5 shows the spoofing attack analysis; in this we compare the spoofing attack in 500, 1000, and 2000 sensor nodes. The percentage of malicious nodes remains consistent across all sample sizes (approximately 29%), but the spoofing vulnerability increases slightly with the full dataset (48.21% compared to 47.26% for 1000 nodes and 42.07% for 500 nodes). This suggests that as the network scales, the percentage of malicious nodes that can successfully spoof the system increases, making larger networks potentially more vulnerable to strategic spoofing attacks. The data demonstrates that anomaly nodes can effectively execute strategic spoofing attacks against TEAHR, with high success rates and significant network compromise levels, particularly as networks scale up in size.
If some nodes are isolated due to misjudgment in WSN, they will be treated as anomaly nodes, and isolating them affects the network connectivity. If we drop those nodes, it leads to reduced global connectivity and might separate the network into many disconnected components. More nodes will be removed, and its size will decrease. The data flow, resiliency, and cooperation among nodes are affected by this. An increase in connectivity can drive down the average path length for small communities; however, homogeneities can form that can reduce end-to-end communications across the network. In general, we avoid connection of anomaly (malicious) nodes to the rest of the network. However, identifying benign nodes as anomalies led to unnecessary fragmentation and weakened the overall robustness of the network. If we reassess those misjudged isolated sensors, they may lead to overhead as it will increase the computation. In TEAHR, reintegration of wrongly isolated nodes should be considered if they were misclassified; for that, adaptive re-routing mechanisms should be optimized to ensure sustained packet delivery rates. Lastly, this further emphasizes the need to strike the right balance of node accuracy to maintain network connectivity while still preserving security. So, in future analysis could focus on the long-term impact on latency and routing overhead.

4.6. Analysis of TEAHR

In Figure 11, the proposed algorithm is compared with other algorithms, and the proposed algorithm reduces total latency by 15% after inserting the anomaly as defined above. As shown in Figure 11, the average latency of the TEAHR algorithm is more stable than other algorithms.
Figure 11. Average latency analysis Energy Efficient Algo [35], Ant Algo [36], and TIOCHR Alo [34].
In Figure 12, we represent the packet forwarding rate analysis when the network grows; in this figure, all four algorithms start with high efficiency in smaller networks but begin to diverge as more nodes are introduced. The Energy Efficient and Ant algorithms show a moderate decrease in packet delivery rate, which might be acceptable in many applications. The TIOCHR algorithm performs slightly better, implying a more robust handling of packet forwarding under scaling conditions. The TEAHR algorithm stands out for its remarkable stability, indicating a robust approach to packet forwarding that is less affected by network scaling.
Figure 12. Packet forward rate analysis Energy Efficient Algo [35], Ant Algo [36], and TIOCHR Algo [34].
Energy consumption plays a pivotal role over time in wireless sensor networks; in Figure 13, all algorithms increase their energy consumption over time; none of them show a decrease in energy, which might be expected as resources are consumed and tasks become more energy-intensive. The TEAHR algorithm stands out as the most energy-conserving algorithm throughout the simulation, maintains a stable packet forwarding rate, and enhances energy efficiency by around 20%. This characteristic could make it a preferred choice in scenarios where energy conservation is crucial, such as in battery-powered devices or remote sensing equipment. The initial energy efficiency of the TIOCHR algorithm may be advantageous in short-term applications, but for more extended simulations or real-time applications, its energy usage becomes less favorable.
Figure 13. Energy consumption analysis Energy Efficient Algo [35], Ant Algo [36], and TIOCHR Algo [34].
While TEAHR offers advanced trust management and robust security features, its computational complexity may not be suitable for all types of sensor networks. TEAHR is designed for moderate-to-large-scale WSNs where security, trust, and resilience are of utmost importance. These networks typically operate in dynamic, high-risk environments, where anomalous activities, unreliable nodes, and false data injection pose significant threats. TEAHR may be suitable for high trustworthiness, resilience against anomaly activity, and hierarchical routing, making it feasible for long-term deployments. While TEAHR excels in security-sensitive applications, it introduces computational and energy overhead that may not be feasible for extremely low-power or highly dynamic networks.

5. Conclusions

By evaluating the consistency of sensor nodes based on their behavior and performance, trust management is a multi-pronged method that improves the safety of wireless sensor networks (WSNs). This is accomplished by analyzing the consistency of sensor nodes. Through the utilization of mathematical models and trust evaluation techniques, wireless sensor networks (WSNs) are able to design communication channels that are safe and protect themselves against threats that originate from within the network boundaries. As the state of the art in technology continues to improve, there is little question that trust management systems will continue to play an essential role in guaranteeing the security and efficiency of wireless sensor networks. Our Trusted Energy-Aware Hierarchical Routing (TEAHR) for Wireless Sensor Networks displays good performance across a variety of parameters, such as an examination of the average latency, an analysis of the packet forwarding rate, and an analysis of the energy usage. After doing these evaluations, it was discovered that the TEAHR algorithm had the lowest energy usage throughout the duration of the simulation. As a result, it was determined to be the most energy-efficient algorithm among those that were selected for comparison. The TEAHR dynamic method makes this algorithm more robust; we need to further test this by utilizing a hybrid technique; then, we can make sure that the algorithm is more resilient, energy efficient, and secure enough to detect anomalies in wireless sensor networks by maintaining Trust among the sensor’s nodes. To do this, we need to make sure that the algorithm is able to detect anomalies in wireless sensor networks. Our proposed algorithm reduces total latency by 15%, enhances energy efficiency by around 20%, and maintains a stable packet forwarding rate. This algorithm is even more potent because of the TEAHR dynamic approach.

Author Contributions

V.: writing—original draft, methodology. C.W.: writing—supervision, conceptualization, formal analysis. B.B.S.: writing—supervision, conceptualization, formal analysis. M.M.: writing, conceptualization, formal analysis, investigation, review, and editing. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The datasets generated and/or analyzed during the current study are available from the corresponding author upon reasonable request.

Acknowledgments

Vikas thanks his supervisors for their continuous support at the time of writing this paper.

Conflicts of Interest

The authors declare that they have no competing interests.

References

  1. Ye, Z.; Wen, T.; Liu, Z.; Song, X.; Fu, C. An Efficient Dynamic Trust Evaluation Model for Wireless Sensor Networks. J. Sens. 2017, 2017, 7864671. [Google Scholar] [CrossRef] [Scilit]
  2. Fang, W.; Zhang, W.; Chen, W.; Pan, T.; Ni, Y.; Yang, Y. Trust-Based Attack and Defense in Wireless Sensor Networks: A Survey. Wirel. Commun. Mob. Comput. 2020, 2020, 2643546. [Google Scholar] [CrossRef] [Scilit]
  3. Chen, Z.; Tian, L.; Lin, C. Trust Model of Wireless Sensor Networks and Its Application in Data Fusion. Sensors 2017, 17, 703. [Google Scholar] [CrossRef] [Scilit]
  4. Vikas; Sagar, B.B.; Munjul, M. Security issues in wireless sensor network—A survey. J. Discret. Math. Sci. Cryptogr. 2021, 24, 1415–1427. [Google Scholar] [CrossRef] [Scilit]
  5. Fang, W.; Cui, N.; Chen, W.; Zhang, W.; Chen, Y. A Trust-Based Security System for Data Collection in Smart City. IEEE Trans. Ind. Inf. 2021, 17, 4131–4140. [Google Scholar] [CrossRef] [Scilit]
  6. Djedjig, N.; Tandjaoui, D.; Romdhani, I.; Medjek, F. Trust Management in the Internet of Things. In Security and Privacy in Smart Sensor Networks; IGI Global: Hershey, PA, USA, 2018; pp. 122–146. [Google Scholar] [CrossRef] [Scilit]
  7. Mon, S.F.A.; Winster, S.G.; Ramesh, R. Trust Model for IoT Using Cluster Analysis: A Centralized Approach. Wirel. Pers. Commun. 2022, 127, 715–736. [Google Scholar] [CrossRef] [Scilit]
  8. Prathap, U.; Shenoy, P.D.; Venugopal, K.R. PCAD: Power control attack detection in wireless sensor networks. In Proceedings of the 2016 IEEE International Conference on Advanced Networks and Telecommunications Systems (ANTS), Bangalore, India, 6–9 November 2016; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
  9. Chae, Y.; DiPippo, L.C.; Sun, Y.L. Trust Management for Defending On-Off Attacks. IEEE Trans. Parallel Distrib. Syst. 2015, 26, 1178–1191. [Google Scholar] [CrossRef] [Scilit]
  10. Gangwani, P.; Perez-Pons, A.; Upadhyay, H. Evaluating Trust Management Frameworks for Wireless Sensor Networks. Sensors 2024, 24, 2852. [Google Scholar] [CrossRef] [Scilit]
  11. Wagh, S.; More, A.; Khavnekar, A. Identification of selfish attack in cognitive radio ad-hoc networks. In Proceedings of the 2015 IEEE International Conference on Computational Intelligence and Computing Research (ICCIC), Madurai, India, 10–12 December 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 1–4. [Google Scholar] [CrossRef] [Scilit]
  12. Dong, W.; Liu, X. Robust and Secure Time-Synchronization Against Sybil Attacks for Sensor Networks. IEEE Trans. Ind. Inf. 2015, 11, 1482–1491. [Google Scholar] [CrossRef] [Scilit]
  13. Ajaykumar, N.; Sarvagya, M.; Parandkar, P. A novel security algorithm ECC-L for wireless sensor network. Internet Technol. Lett. 2020, 3, e150. [Google Scholar] [CrossRef] [Scilit]
  14. Fang, W.; Zhang, W.; Yang, Y.; Liu, Y.; Chen, W. A resilient trust management scheme for defending against reputation time-varying attacks based on BETA distribution. Sci. China Inf. Sci. 2017, 60, 040305. [Google Scholar] [CrossRef] [Scilit]
  15. Feng, R.; Han, X.; Liu, Q.; Yu, N. A Credible Bayesian-Based Trust Management Scheme for Wireless Sensor Networks. Int. J. Distrib. Sens. Netw. 2015, 11, 678926. [Google Scholar] [CrossRef] [Scilit]
  16. Wahi, C.; Chakraverty, S.; Bhattacherjee, V. A trust-based secure AODV routing scheme for MANET. Int. J. Ad. Hoc Ubiquitous Comput. 2021, 38, 231. [Google Scholar] [CrossRef] [Scilit]
  17. Alshehri, M.D.; Hussain, F.K. A fuzzy security protocol for trust management in the internet of things (Fuzzy-IoT). Computing 2019, 101, 791–818. [Google Scholar] [CrossRef] [Scilit]
  18. Reddy, V.B.; Venkataraman, S.; Negi, A. Communication and Data Trust for Wireless Sensor Networks Using D–S Theory. IEEE Sens. J. 2017, 17, 3921–3929. [Google Scholar] [CrossRef] [Scilit]
  19. Prabha, V.R.; Latha, P. Fuzzy Trust Protocol for Malicious Node Detection in Wireless Sensor Networks. Wirel. Pers. Commun. 2017, 94, 2549–2559. [Google Scholar] [CrossRef] [Scilit]
  20. Patra, M.; Acharya, S. A Fuzzy Logic-Based Trust Management Scheme for Wireless Sensor Network. In Advances in Distributed Computing and Machine Learning: Proceedings of ICADCML 2022; Springer Nature: Singapore, 2022; pp. 155–166. [Google Scholar] [CrossRef] [Scilit]
  21. Han, D.; Du, X.; Wang, L.; Liu, X.; Tian, X. Trust-Aware and Fuzzy Logic-Based Reliable Layering Routing Protocol for Underwater Acoustic Networks. Sensors 2023, 23, 9323. [Google Scholar] [CrossRef] [Scilit]
  22. Patel, R.; Acharya, S. A Fuzzy Logic Based Trust Evaluation Model for IoT. In International Conference on Machine Learning, IoT and Big Data; Springer Nature: Singapore, 2024; pp. 147–156. [Google Scholar] [CrossRef] [Scilit]
  23. Abdalzaher, M.; Seddik, K.; Elsabrouty, M.; Muta, O.; Furukawa, H.; Abdel-Rahman, A. Game Theory Meets Wireless Sensor Networks Security Requirements and Threats Mitigation: A Survey. Sensors 2016, 16, 1003. [Google Scholar] [CrossRef] [Scilit]
  24. Abdalzaher, M.S.; Samy, L.; Muta, O. Non-zero-sum game-based trust model to enhance wireless sensor networks security for IoT applications. IET Wirel. Sens. Syst. 2019, 9, 218–226. [Google Scholar] [CrossRef] [Scilit]
  25. Adnan, M.; Yang, T.; Das, S.K.; Ahmad, T. Utility of Game Theory in Defensive Wireless Sensor Networks (WSNs). In International Conference on Innovative Computing and Communications: Proceedings of ICICC 2020, Volume 1; Springer: Singapore, 2021; pp. 895–904. [Google Scholar] [CrossRef] [Scilit]
  26. Wang, E.K.; Chen, C.-M.; Zhao, D.; Ip, W.H.; Yung, K.L. A dynamic trust model in internet of things. Soft Comput. 2020, 24, 5773–5782. [Google Scholar] [CrossRef] [Scilit]
  27. Yu, X.; Li, F.; Li, T.; Wu, N.; Wang, H.; Zhou, H. Trust-based secure directed diffusion routing protocol in WSN. J. Ambient. Intell. Humaniz. Comput. 2022, 13, 1405–1417. [Google Scholar] [CrossRef] [Scilit]
  28. Parvathi, C.; Talanki, S. Energy Saving Hierarchical Routing Protocol in WSN. In Wireless Sensor Networks—Design, Deployment and Applications; IntechOpen: London, UK, 2021. [Google Scholar] [CrossRef] [Scilit]
  29. Palan, N.G.; Barbadekar, B.V.; Patil, S. Low energy adaptive clustering hierarchy (LEACH) protocol: A retrospective analysis. In Proceedings of the 2017 International Conference on Inventive Systems and Control (ICISC), Coimbatore, India, 19–20 January 2017; pp. 1–12. [Google Scholar] [CrossRef] [Scilit]
  30. Lindsey, S.; Raghavendra, C.S. PEGASIS: Power-efficient gathering in sensor information systems. In Proceedings, IEEE Aerospace Conference; IEEE: Big Sky, MT, USA, 2002; p. 3. [Google Scholar] [CrossRef] [Scilit]
  31. Perkins, C.E.; Royer, E.M. Ad-hoc on-demand distance vector routing. In Proceedings WMCSA’99. Second IEEE Workshop on Mobile Computing Systems and Applications; IEEE: New Orleans, LA, USA, 1999; pp. 90–100. [Google Scholar] [CrossRef] [Scilit]
  32. Bao, F.; Chen, I.-R.; Chang, M.; Cho, J.-H. Hierarchical Trust Management for Wireless Sensor Networks and its Applications to Trust-Based Routing and Intrusion Detection. IEEE Trans. Netw. Serv. Manag. 2012, 9, 169–183. [Google Scholar] [CrossRef] [Scilit]
  33. Wang, L.; Petrova, K.; Yang, M.L. Trust Models in Wireless Sensor Networks for Defending Against Denial-of-Service Attacks: A Literature Review. Appl. Sci. 2025, 15, 3075. [Google Scholar] [CrossRef] [Scilit]
  34. Babu, S.S.; Geethanjali, N. Lifetime improvement of wireless sensor networks by employing Trust Index Optimized Cluster Head Routing (TIOCHR). Meas. Sens. 2024, 32, 101068. [Google Scholar] [CrossRef] [Scilit]
  35. Mostafaei, H. Energy-Efficient Algorithm for Reliable Routing of Wireless Sensor Networks. IEEE Trans. Ind. Electron. 2019, 66, 5567–5575. [Google Scholar] [CrossRef] [Scilit]
  36. Li, X.; Keegan, B.; Mtenzi, F.; Weise, T.; Tan, M. Energy-Efficient Load Balancing Ant Based Routing Algorithm for Wireless Sensor Networks. IEEE Access 2019, 7, 113182–113196. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.