💥💥💞💞Welcome to this blog❤️❤️💥💥
🏆Author’s Advantage: 🌞🌞🌞The blog content aims to be logically clear and coherent for the convenience of readers.
⛳️Motto: A journey of a hundred miles begins with a single step.
💥1 Overview
LEACH (Low Energy Adaptive Clustering Hierarchy) is a classic energy-adaptive wireless sensor network (WSN) protocol designed to extend network lifetime. LEACH-C and LEACH-E are improved versions of LEACH, aimed at addressing some of the issues present in LEACH and further enhancing performance.
1. Protocol Overview
LEACH (Low-Energy Adaptive Clustering Hierarchy)LEACH is the first low-power adaptive clustering routing protocol proposed for wireless sensor networks, aiming to balance network energy consumption and extend network lifetime through dynamic clustering and rotation of cluster head nodes. The core idea is to randomly rotate cluster head nodes, evenly distributing the energy load across each sensor node, thereby reducing network energy consumption and improving overall network longevity.
LEACH-C (LEACH-Centralized)LEACH-C is an improved version of LEACH that introduces a centralized cluster head election mechanism. A central node (such as a Sink node) coordinates the election of cluster heads to avoid the imbalance issues caused by random selection. LEACH-C employs a round-robin selection method, ensuring that all nodes have an equal opportunity to become cluster heads, thus improving energy consumption balance.
LEACH-E (LEACH-Energy)LEACH-E is another improved version of LEACH that further optimizes energy consumption by introducing an energy-aware mechanism. LEACH-E uses an energy-threshold-based cluster head election mechanism, making nodes with sufficient energy more likely to be selected as cluster heads, thereby extending network lifetime. Additionally, LEACH-E reduces reliance on the central node through a distributed energy-aware mechanism, lowering system complexity.
2. Protocol Working Principle
LEACHThe working process of the LEACH protocol is divided into two phases: cluster establishment phase and stable operation phase.
Cluster Establishment Phase: Each sensor node randomly generates a number between 0 and 1 and compares it with the threshold T(n). If the selected value is less than T(n), the node becomes a cluster head. The calculation formula for T(n) is:
where P is the expected percentage of nodes becoming cluster heads, and r is the current round number.Once the cluster head is selected, the cluster head node broadcasts its status to the entire network. Non-cluster head nodes choose to join the nearest cluster head based on the signal strength of the received broadcast information and notify the corresponding cluster head. Finally, the cluster head node allocates time slots for each node in the cluster to transmit data using Time Division Multiple Access (TDMA).
Stable Operation Phase: Cluster member nodes transmit the collected data to the cluster head node. The cluster head node fuses the data collected from all nodes in the cluster and then transmits it to the sink node (base station). After a period of stability, the network re-enters the cluster establishment phase for the next round of cluster reconstruction.
LEACH-CLEACH-C introduces a centralized cluster head election mechanism based on LEACH.
Initialization Phase: All nodes send energy information to the Sink node.
Cluster Head Selection Phase: The Sink node selects nodes with higher energy as cluster heads based on the received energy information.
Cluster Member Assignment Phase: The Sink node notifies each node of its assigned cluster head, and nodes join the corresponding cluster based on the notification.
Data Transmission Phase: Similar to the LEACH protocol, the cluster head node is responsible for collecting data from other nodes in the cluster, fusing the information, and transmitting it to the sink node.
LEACH-ELEACH-E optimizes the cluster head election and data transmission processes by introducing an energy-aware mechanism.
Cluster Head Election: LEACH-E employs an energy-threshold-based cluster head election mechanism. Nodes dynamically adjust their probability of becoming cluster heads based on their energy status and a preset energy threshold. Nodes with sufficient energy are more likely to be selected as cluster heads.
Data Transmission: LEACH-E reduces energy consumption during data transmission by introducing multi-hop transmission and data fusion techniques. Nodes within the cluster can relay data to the cluster head node through other nodes, reducing energy consumption for long-distance communication.
3. Protocol Performance Comparison
Energy Consumption Balance
LEACH: Due to the random cluster head election mechanism, the LEACH protocol may lead to some nodes consuming energy too quickly by frequently serving as cluster heads, resulting in uneven energy consumption.
LEACH-C: By introducing a centralized cluster head election mechanism, LEACH-C ensures that all nodes have an equal opportunity to become cluster heads, thus improving energy consumption balance.
LEACH-E: By using an energy-threshold-based cluster head election mechanism, LEACH-E makes nodes with sufficient energy more likely to be selected as cluster heads, further optimizing energy consumption balance.
System Complexity
LEACH: The LEACH protocol employs distributed control, resulting in lower system complexity.
LEACH-C: Due to the use of centralized control, LEACH-C incurs additional communication overhead to maintain the central node, increasing system complexity.
LEACH-E: LEACH-E employs a distributed energy-aware mechanism, reducing reliance on the central node and lowering system complexity.
Network Lifetime
LEACH: The LEACH protocol effectively extends network lifetime through dynamic clustering and rotation of cluster head nodes. However, compared to LEACH-C and LEACH-E, its network lifetime may be shorter.
LEACH-C: By improving energy consumption balance, the LEACH-C protocol further extends network lifetime.
LEACH-E: By optimizing the cluster head election and data transmission processes, the LEACH-E protocol significantly enhances energy efficiency, allowing for a substantial extension of network lifetime.
Applicable Scenarios
LEACH: Suitable for wireless sensor networks with balanced node energy and smaller network scales.
LEACH-C: Suitable for wireless sensor networks with high requirements for energy consumption balance and tolerable system complexity.
LEACH-E: Suitable for wireless sensor networks with uneven node energy, larger scales, or high energy efficiency requirements.
4. Directions for Protocol Improvement
Cluster Head Election Based on Remaining EnergyUse the remaining energy of nodes as an important criterion for cluster head election, prioritizing nodes with higher remaining energy to avoid low-energy nodes being selected as cluster heads, which accelerates energy depletion.
Cluster Head Election Based on Trust ValuesIntroduce a trust mechanism, using trust values as one of the criteria for cluster head election. Prioritize nodes with high trust values and remaining energy to enhance network security and reliability.
Geographically Based ClusteringUtilize the geographical location information of nodes for clustering, ensuring that cluster head nodes are evenly distributed across the network, avoiding concentration in specific areas.
Multi-Hop Clustering StrategyAdopt a multi-hop communication method, allowing cluster nodes to relay data to the cluster head node through other nodes, reducing energy consumption for long-distance communication.
Adaptive Data FusionDynamically adjust data fusion strategies based on network status and requirements to further reduce energy consumption while ensuring data accuracy.
Reliable Transmission MechanismDesign a reliable data transmission mechanism to ensure the integrity and accuracy of data during transmission, reducing energy consumption caused by data retransmission.
Joint Optimization of MAC Layer and Routing LayerConsider the design of both the MAC layer and routing layer comprehensively to achieve cross-layer optimization, further improving network energy efficiency and performance.
📚2 Running Results
2.1 LEACH_C


2.2 LEACH_E


2.3 LEACH_EvsLEACH






2.4 LEACHvsLEACH_C




Partial Code:
%. Sensor node area boundaries (in meters)xm = 100;ym = 100;% (1) Given coordinates of the sink nodesink.x = 0.5*xm;sink.y = 1.75*ym;% Number of sensor nodes in the arean = 100;% Cluster head optimization ratio (probability of being elected as cluster head)p = 0.05;% Energy model (in Joules)% Initial energy modelEo = 0.5;% Eelec=Etx=ErxETX = 50*0.000000001;ERX = 50*0.000000001;% Transmit Amplifier typesEfs = 10*0.000000000001;Emp = 0.0013*0.000000000001;% Data Aggregation EnergyEDA = 5*0.000000001;% Maximum number of iterationsrmax = 2000;% Calculate parameter dodo = sqrt(Efs/Emp);% Packet size (in bits)packetLength = 4000; % Packet sizeP=zeros(n,1);k=5;% Percentage of high-energy nodes exceeding low-energy nodesm = 0.1;a = 3; %% 2. Wireless Sensor Network Model Generation Module% Construct a wireless sensor network, uniformly deploying 100 nodes in the area, and plot the graphfor i = 1:n S1(i).xd = rand(1,1)*xm; S2(i).xd = S1(i).xd; S1(i).yd = rand(1,1)*ym; S2(i).yd = S1(i).yd; S1(i).G = 0; S2(i).G = 0;% S1(i).E = Eo;% S2(i).E = Eo; temp_rnd0 = i; % Random selection of ordinary nodes
🎉3 References
Some content in this article is sourced from the internet, and references will be noted. If there are any inaccuracies, please feel free to contact for removal.
[1] Cao Xing, Zhang Lizeng, Di Jinghao. Simulation and Comparison of LEACH, LEACH-C, LEACH-E, and LEACH-ED [J]. Information and Computer, 2016(4):3. DOI:10.3969/j.issn.1003-9767.2016.04.049.
[2] Gu Xianwen. Research on Low Energy Clustering Routing Protocols in Wireless Sensor Networks [D]. Hefei University of Technology, 2009. DOI:10.7666/d.y1507635.
[3] Sang He and Mu. Evaluation and Improvement of Low Energy Adaptive Clustering Hierarchy Protocol (LEACH) for Wireless Sensor Networks [D]. Harbin Institute of Technology, 2016. DOI:10.7666/d.D01097713.
🌈4 Matlab Code Implementation
Reply in the public account backend: Program download