Method for correcting leach based on root mean square distance and operator threshold

By introducing the root mean square distance value and operator-corrected threshold function of the LEACH protocol, the cluster head selection is optimized, solving the problem of premature network aging caused by unreasonable cluster head selection, and achieving better energy balance and extended network lifetime.

CN116209025BActive Publication Date: 2026-03-31CHANGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

The existing LEACH protocol does not fully consider node density, energy and distance factors when selecting cluster heads, leading to the problem of premature network aging.

Method used

The optimal number of cluster heads is determined by introducing the root mean square distance value, and the threshold function is modified by combining the spacing operator, the remaining energy operator and the node density operator to optimize the cluster head election process. The node communication radius, the energy distribution of nodes in the cluster and the distance of the cluster head from the base station are considered, and the node entry cost function is calculated to select the optimal cluster head.

Benefits of technology

The LEACH-enhance protocol significantly extends network lifetime and improves node energy balance. Simulation results show that the LEACH-enhance protocol improves node lifespan by 68.0%, 60.1%, and 58.7% compared to LEACH-improve, LEACH-E, and LEACH-OR, respectively, thus extending the network lifetime.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116209025B_ABST
    Figure CN116209025B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of LEACH, in particular to a method for correcting LEACH based on a root mean square of distance and an operator threshold value, which comprises the following steps: determining the optimal number of cluster heads by referring to the root mean square value of distance in an energy consumption model; correcting a threshold function by calculating a distance operator, a residual energy operator and a density operator; obtaining a cost function by the communication radius of a node, the energy that can be distributed by a node in a cluster and the distance between a cluster head and a base station; calculating the optimal value of the node by the cost function and adding the cluster head. The application aims at the problem that, when the LEACH protocol selects a cluster head, the threshold value does not consider factors such as node density, energy and distance, and then some low-energy cluster heads are selected, so that the whole network appears the problem of early decay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of LEACH technology, and more particularly to a method for correcting LEACH based on root mean square distance and operator threshold. Background Technology

[0002] WSN (Wireless Sensor Network) is a network composed of randomly distributed sensor nodes within a certain range in a certain form. It can be applied to various fields such as medicine and military. However, due to the limitations of the hardware itself, the research focus of WSN is still energy saving.

[0003] To improve energy efficiency, scholars both domestically and internationally have proposed WSN protocols based on clustering, with the LEACH protocol being a typical example. Due to the limitations of LEACH, numerous improvements have been made to it in recent years.

[0004] Han Guanghui et al. proposed the LEACH-E algorithm, which improves the threshold formula using the network's current average energy operator and the node's remaining energy operator, making cluster head election more reasonable; however, it does not consider node density. Huang Xiaoli et al. proposed the LEACH-improve protocol, which adds a spacing operator, a node density operator, and a remaining energy operator to the threshold formula, optimizing the cluster head election method; however, its probability of cluster head election is constant, causing some unnecessary overhead. These improved methods optimize the selection criteria of cluster head nodes from multiple aspects, but the summary of influencing factors is not comprehensive enough. Summary of the Invention

[0005] To address the shortcomings of existing algorithms, this invention addresses the issue that the LEACH protocol does not consider factors such as node density, energy, and distance when selecting cluster heads, resulting in the selection of some low-energy cluster heads and causing premature aging of the entire network.

[0006] The technical solution adopted in this invention is: a method for correcting LEACH based on root mean square distance and operator threshold, comprising the following steps:

[0007] Step 1: Determine the optimal number of cluster heads by using the root mean square value of the distance in the energy consumption model;

[0008] Furthermore, specifically including:

[0009] Step 11: Calculate the energy E consumed by the cluster head in sending m bits of information to the base station. CH ;

[0010] Step 12: Calculate the energy consumption E of a node within the cluster sending m bits of data to the cluster head. non-CH ;

[0011] Step 13: Calculate the distance from ordinary nodes to cluster head nodes.

[0012] Furthermore, the calculation formula is as follows:

[0013]

[0014] Where ρ(x,y) represents the density when the cluster head node of a region of arbitrary shape is located in the middle of the cluster, and d toCH It is the distance from a node within a cluster to the cluster head, M×M is the number of networks, and Q is the number of network clusters.

[0015] Step 14: Calculate the total energy consumed by the entire network in each cycle;

[0016] Step 15: Calculate the optimal number of cluster heads and the probability of cluster heads being selected when the total energy consumed by the network is minimized;

[0017] Furthermore, the formula for calculating the optimal number of cluster heads is:

[0018]

[0019] Where N is the number of nodes in the M×M network, ε fs ε is the free space attenuation coefficient. amp E is the multi-channel attenuation coefficient. elec d represents the power consumed by the transmitting and receiving circuits in radio communication. toBS This represents the distance from the cluster head node to the base station.

[0020] Step 2: Correct the threshold function by calculating the spacing operator, residual energy operator, and density operator;

[0021] Furthermore, the threshold function formula is:

[0022]

[0023] Where p is the percentage of cluster heads out of all nodes, r is the round number corresponding to the current loop, and E re λ1, λ2, and λ3 are the residual energy operator, w is the spacing operator, ρ represents the density operator, and λ1, λ2, and λ3 are the weighting values.

[0024] Step 3: Obtain the cost function by taking the node communication radius, the energy that can be allocated to the nodes in the cluster, and the distance of the cluster head from the base station. Calculate the optimal value of the node using the cost function and add it to the cluster head.

[0025] Specifically, it includes:

[0026] Step 31: Define the previous neighbor node and the previous cluster head node;

[0027] Step 32: Define the conditions for a node to join the set of cluster head nodes;

[0028] Furthermore, the conditions are:

[0029] Condition 1: N(CH) s )={CH s |CH s ∈V,d(i,CH s )<R}, where, d(i,CH s ) < R indicates cluster head CH s The distance to node i is within the node's communication radius R, and V represents the set of all cluster head nodes;

[0030] Condition 2: Based on Condition 1, perform the following calculations:

[0031]

[0032] Among them, E min This represents the minimum energy required for a node to survive. Let E(i,n) represent the current remaining energy of cluster head i, n represent the number of nodes that have joined cluster head i, and E(i,n) represent the energy of each node when n nodes have joined cluster head i.

[0033] Condition 3: If conditions 1 and 2 are satisfied, perform the following calculation:

[0034] cost(CH)=ωf(d CH )+(1-ω)×g(d CHtoBS (19)

[0035] Where cost(CH) is the distance cost for a typical node to select a cluster head, d CHtoBS Let w be the distance from the cluster head to the base station, and d be the spacing operator. toCH Let f and g represent the distances from nodes within the cluster to the cluster head, respectively. CH d CHtoBS A function for numerical normalization.

[0036] Step 33: Calculate the cluster entry cost function for nodes;

[0037] Furthermore, the formula is:

[0038]

[0039] Where a represents a coefficient, E(i,n) represents the energy of a node when n nodes join cluster head i, and cost(CH) is the distance cost of a node choosing a cluster head.

[0040] The beneficial effects of this invention are:

[0041] 1. First, the root mean square value of distance is used in the energy consumption model to determine the optimal number of cluster heads. Then, the spacing operator, residual energy operator and node density operator determined according to energy consumption are added to correct the threshold function.

[0042] 2. When selecting a node to join a cluster, three conditions are considered: the node's communication radius, the energy that the nodes in the cluster can allocate, and the distance between the cluster head and the base station. A cost function is then given, and the node ultimately selects the cluster head corresponding to the optimal value to join.

[0043] 3. MATLAB simulations confirm that, in the first node death cycle, LEACH-enhance improves energy balance by 68.0%, 60.1%, and 58.7% compared to LEACH-improve, LEACH-E, and LEACH-OR, respectively. The data shows that LEACH-enhance provides better energy balance in terms of cluster head selection and node entry. Attached Figure Description

[0044] Figure 1 This is a flowchart of the LEACH method based on root mean square distance and operator threshold correction according to the present invention;

[0045] Figure 2 This is the energy consumption model diagram of the present invention;

[0046] Figure 3 This is a simulation diagram comparing the root mean square value and the mean value of the present invention;

[0047] Figure 4 This is a node simulation diagram of the present invention;

[0048] Figure 5 This is a simulation comparison chart of the number of network surviving nodes according to the present invention;

[0049] Figure 6 This is a simulation diagram of the network's remaining energy changing with the number of rounds according to the present invention;

[0050] Figure 7 This is a simulation diagram showing the relationship between the proportion of dead nodes and the number of cycles in this invention. Detailed Implementation

[0051] The present invention will be further described below with reference to the accompanying drawings and embodiments. The drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0052] like Figure 1 As shown, a method for correcting LEACH based on root mean square distance and operator threshold includes the following steps:

[0053] Step 1: Determine the optimal number of cluster heads by using the root mean square value of the distance in the energy consumption model;

[0054] like Figure 2 During data transmission, the energy consumption of a node mainly consists of two parts: the power loss of the power amplifier circuit and the energy loss of transmitting data. Furthermore, different transmission distances correspond to different power calculation methods.

[0055]

[0056]

[0057] In the formula: E sd-elec (m) represents the power amplifier circuit loss, E sd-amp (m,d) represents the energy loss during data transmission, E elec This represents the power consumed by the transmitting and receiving circuits in radio communication, where m represents bit data, d is the signal transmission distance, and ε is the signal transmission distance. fs ε is the free space attenuation coefficient. amp The multichannel attenuation coefficient is given by t = 2 when d < d0 and t = 4 when d ≥ d0, where t represents the power of d in the formula. The two energy attenuation models are called the free space attenuation model and the multichannel attenuation model, respectively.

[0058] Suppose there are N randomly distributed nodes in an M×M network, and the entire network is divided into Q clusters. Each cluster contains N / Q nodes. Since the distance between the base station and the cluster head is relatively large, energy consumption is calculated using t=4. Therefore, the energy E consumed in sending mbit of information is... CH for:

[0059]

[0060] Let the coordinates of the base station be (x... BS y BS If the distance from the node to the base station is , then the distance can be expressed as:

[0061]

[0062] In equation (3), d toBS E represents the distance from the cluster head node to the base station. DA This refers to the cost associated with data fusion.

[0063] When transmitting each frame of data, each node within a cluster only needs to transmit data to the cluster head node; assuming the distance between the nodes within a cluster and the cluster head node is not far, the energy consumption is calculated using the free space propagation model; therefore, the energy consumption E for transmitting mbit of data is... non-CH for:

[0064] E non-CH=m×(E elec +ε fs (d toCH ) 2 (5)

[0065] Each cluster occupies an area of ​​approximately M. 2 / Q, assuming a cluster head node is located in the middle of a cluster and is in an arbitrary-shaped region with density ρ(x,y), then the distance from a regular node to the cluster head node is:

[0066]

[0067] Where ρ(x,y) represents the density when the cluster head node of a region of arbitrary shape is located in the middle of the cluster, and d toCH It is the distance from a node within the cluster to the cluster head;

[0068] In Equation 5, d toCH Its value is equal to that in equation 6. Therefore, the following operations use... To represent d toCH .

[0069] It can be seen that during each round of data transmission of one frame, the total energy consumption in each cluster is determined by E. CH and E non-CH Composed of two parts, the total energy consumed by the entire network in each cycle is:

[0070]

[0071] Substitute equations (3), (5), and (6) into equation (7), and set:

[0072]

[0073] For f s (Q) Find the first derivative of Q and set it equal to zero, then we get:

[0074]

[0075] Because f s (Q) The second derivative of Q is always positive. Therefore, the function has a minimum value, and the optimal number of cluster heads corresponding to the minimum total energy consumed by the network is:

[0076]

[0077] The probability p of a node being elected as a cluster head is:

[0078]

[0079] like Figure 3As shown, when determining the probability of cluster head selection through an energy consumption model, this invention introduces the root mean square (RMS) value when calculating the distance from the node to the cluster head. Simulation results show that the RMS value of the number of rounds corresponding to the death of the first node is greater than the mean value, demonstrating the effectiveness of the improvement.

[0080] Step 2: Correct the threshold formula;

[0081] Step 21: Calculate the spacing operator:

[0082] like Figure 4 As shown, the network center point is 'center', the distance from any node to 'center' is 'd2', and the distance to the base station (BS) is 'd1'. From the diagram, 'd1' is much larger than 'd2'. Therefore, when calculating the distance operator, the distance from a node to the base station is treated as a multi-channel attenuation model, and the distance from a node to the center point is treated as a free-space attenuation model. Different models are selected based on different situations, so that nodes closer to the base station have a greater probability of being selected as cluster heads. The distance operator is defined as follows:

[0083]

[0084] Step 22: Calculate the node residual energy operator, the formula is:

[0085]

[0086] Among them, E c E represents the current remaining energy of the node. m represents the initial energy of the node.

[0087] Step 23: Calculate the density operator:

[0088] The set of neighboring nodes is defined as:

[0089] N nb ={j|d(i,j)≤R,j∈N},i∈{1,2,...,N} (14)

[0090] Where d(i,j) represents the distance between node i and node j, R represents the node communication radius, and N represents the number of nodes. The formulas corresponding to the communication radius R and the density of node i are as follows:

[0091]

[0092]

[0093] Where ρ is defined as the density operator, iN nbLet S be the number of neighboring nodes of node i within its standard communication radius, S be the size of the node region, N be the number of nodes within the network range, p be the percentage of cluster heads to all nodes, and (1 / p-1) be the number of nearby nodes in the standard cluster. Therefore, taking into full account the residual energy operator, spacing operator, and density operator of the candidate cluster heads, the update threshold formula is:

[0094]

[0095] Where p represents the percentage of cluster heads out of all nodes, r is the round number corresponding to the current loop, and E re Let w represent the residual energy operator, w represent the spacing operator, ρ represent the density operator, and λ1, λ2, and λ3 represent the weighting values.

[0096] This invention was verified through Matlab simulation. Setting the weighted value of the density factor λ3 to 0.2 yielded better simulation results. As the number of rounds increases, it is necessary to focus on the remaining energy factor. Therefore, λ1 can be gradually increased as the cycle progresses. In the early stage of node data transmission, the energy of each node is relatively large, so λ1 is set to 0.4 and λ2 is set to 0.4. When the energy of a node is less than 50%, λ1 is set to 0.6 and λ2 is set to 0.2.

[0097] Step 3, the process of selecting the optimal cluster head to join is as follows:

[0098] Several definitions are given below:

[0099] 1. Previous neighbor node: FN(i)={j|j∈N(i),d(j,BS)<d(i,BS)}, where d(i,BS) is the distance from node i to the base station;

[0100] 2. Forward cluster head node: CN(CH) i )={j|j∈FN(i),d(CH j ,BS)<d(CH i ,BS)}, where d(CH) i ,BS) is CH i Distance to the base station;

[0101] When selecting cluster heads, the communication distances and overall cluster sizes vary depending on the distance of the cluster head from the base station and the energy of the cluster head nodes. Considering these factors, for a node i, the set of cluster head nodes CH it can join is... s The following three conditions must be met:

[0102] Condition 1: N(CH) s )={CH s |CH s ∈V,d(i,CHs )<R}, where, d(i,CH s ) < R indicates cluster head CH s The distance to node i is within the node's communication radius R, and V represents the set of all cluster head nodes;

[0103] Condition 2: Based on Condition 1, perform the following calculations:

[0104]

[0105] Among them, E min This represents the minimum energy required for a node to survive. Let E(i,n) represent the current remaining energy of cluster head i, n represent the number of nodes that have joined cluster head i, and E(i,n) represent the energy of each node when n nodes have joined cluster head i.

[0106] Condition 3: If conditions 1 and 2 are met, perform the following calculation:

[0107] cost(CH)=ωf(d toCH )+(1-ω)×g(d CHtoBS (19)

[0108] Where cost(CH) is the distance cost for a typical node to select a cluster head, d CHtoBS Let w be the distance from the cluster head to the base station, and d be the spacing operator. toCH Let f and g represent the distances from nodes within the cluster to the cluster head, respectively. CH d CHtoBS Functions for numerical normalization

[0109] When selecting a cluster head for a node, the distance between the node and the desired cluster head has a greater impact than the distance between the node and the cluster head and the base station. Simulations show that ω = 0.8 yields the best results. cost(CH) represents the distance cost for a typical node selecting a cluster head, where f and g represent the distance cost for node selection. CH d CHtoBS The function used for numerical normalization, where ω is the weight between 0 and 1; let f and g be:

[0110]

[0111]

[0112] Where d in f max d min d in g represents the expected maximum and minimum distances from cluster members to the cluster head, respectively, determined by the node density; max d minand represent the minimum and maximum distances from the cluster head to the sink node, respectively, which are determined by the positions of the sink node and the cluster head. The node entry cost function is shown in Equation 22:

[0113]

[0114] In equation (22), a represents a coefficient, E(i,n) represents the energy corresponding to each node when n nodes join cluster head i, and cost(CH) represents the distance cost of a general node choosing a cluster head.

[0115] Energy factors generally play a larger role in cluster selection, and simulations show that a value of 0.6 yields the best results. In summary, when z(i) reaches its maximum value, the node is selected to join the corresponding cluster head.

[0116] In the process of node selection for cluster entry, this invention, in addition to considering the energy corresponding to each node in the cluster, adds the distance cost of node selection for cluster head, and thus gives the cost function z(i) for selecting cluster head, making node selection for cluster entry more optimal and making the energy consumption of the entire network more balanced.

[0117] like Figure 5 As shown, the number of network surviving nodes corresponding to the LEACH-enhance protocol can be obtained. The number of decay rounds corresponding to the first node of LEACH-improve, LEACH-E, LEACH-OR, and LEACH-enhance are 428 rounds, 449 rounds, 453 rounds, and 719 rounds, respectively. Compared with the other three protocols, LEACH-enhance improves the lifespan by 68.0%, 60.1%, and 58.7%, respectively. The data shows that the LEACH-enhance protocol extends the lifespan of nodes.

[0118] like Figure 6 As shown, the LEACH-enhance protocol consumes the least amount of energy, and therefore has a longer network lifetime.

[0119] like Figure 7 As shown: at round 754, LEACH-Improve, LEACH-E, and LEACH-OR, 50% of nodes died; while at round 1171, 50% of nodes died in LEACH-Enhance, corresponding to round 1483. The lifetime of the improved protocol was increased by 0.97 times, 1.09 times, and 0.27 times compared to LEACH-Improve, LEACH-E, and LEACH-OR, respectively.

[0120] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.

Claims

1. A method for correcting LEACH based on the root mean square and distance operator threshold, characterized in that, The method comprises the following steps: Step one, determining the optimal cluster head number by referencing the root mean square value of distance in the energy consumption model; Step one specifically comprises: Step 11, the cluster head calculates and sends m bit information to the base station consumed energy ; Step 12, calculate intra-cluster node transmission m bit data to cluster head energy consumption ; Step 13, calculate the distance from common node to cluster head node ; Step 14, calculating the total energy consumed by the entire network in each round of circulation; Step 15, calculating the optimal cluster head number and the probability of cluster head election when the total energy consumed by the network is the minimum; Wherein, the probability of cluster head election ; is the optimal cluster head number, N is the node number; Step two, modifying the threshold function by calculating the distance operator, the residual energy operator and the density operator; Spacing operator is defined as: (12) wherein, d 1 is the distance of the node to the base station BS; d 2 is the distance of the node to the base station BS. The formula of the threshold function is: (17) wherein, r is the number of rounds corresponding to the current cycle, is the remaining energy operator, is the spacing operator, denotes the density operator, , , is the weighting value; Step three, obtaining the cost function by the node communication radius, the energy that can be distributed by the nodes in the cluster and the distance of the cluster head from the base station, calculating the optimal value of the node by the cost function and adding the cluster head.

2. The LEACH based on the root mean square of distance and operator threshold correction method according to claim 1, characterized in that, The formula of the distance of the ordinary node to the cluster head node is: (6) wherein, denotes the density when the cluster head node of the region of any shape is in the middle of the cluster, is the distance of the nodes within the cluster to the cluster head, is the number of networks, Q is the number of network clusters.

3. The LEACH based on the root mean square of distance and operator threshold correction method according to claim 2, characterized in that, The formula of the optimal cluster head number is: (10) wherein, N is the number of network nodes, is the free space attenuation coefficient, is the multi-path channel attenuation coefficient, is the power value consumed by the transmission and reception circuit for radio communication, is the distance of the cluster head node to the base station.

4. The LEACH based on the root mean square of distance and operator threshold correction method according to claim 1, characterized in that, Step three specifically comprises: Step 31, defining the previous neighbor node and the previous cluster head node; Step 32, defining the condition of the cluster head node set that can be joined by the node; Step 33, calculating the node cluster entry cost function.

5. The LEACH based on the root mean square of distance and operator threshold correction method according to claim 4, characterized in that, The condition of the cluster head node set that can be joined by the node comprises: Condition one: wherein, denotes cluster head to node is within the communication radius R of the node, denotes the set of all cluster head nodes; Condition two: on the basis of condition one, the following operation is performed: (18) wherein, represents the minimum energy required for the node to be alive, represents the cluster head current residual energy, n represents the number of nodes currently joining the cluster head , represents the energy corresponding to each node when n nodes join the cluster head; Condition three: in the case of satisfying conditions one and two, the following operation is performed: (19) wherein, a distance cost for a general node to select a cluster head, a distance from a cluster head to a base station, a distance operator, a distance from an in-cluster node to a cluster head, respectively represent a pair of , a function for numerical normalization.

6. The LEACH based on the root mean square of distance and operator threshold correction method according to claim 4, characterized in that, The formula of the node cluster entry cost function is: (22) wherein, denotes a coefficient, denotes that there are n nodes join the cluster head, the energy corresponding to the node, is the distance cost for selecting a cluster head for a general node.