A dual-cluster-head WSNs adaptive relay routing method based on optimized clustering clustering
By optimizing the dual-cluster head adaptive relay routing method for clustered wireless sensor networks, the problem of uneven node energy consumption in wireless sensor networks is solved, achieving efficient utilization of node energy and extension of network lifetime.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- KUNMING UNIV OF SCI & TECH
- Filing Date
- 2022-11-30
- Publication Date
- 2026-05-29
Smart Images

Figure CN115915327B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an adaptive relay routing method for dual-cluster head WSNs based on optimized clustering, belonging to the field of wireless sensor network clustering routing technology. Background Technology
[0002] In wireless sensor networks (WSNs), sensor nodes can form distributed, self-organizing, multi-hop monitoring networks within a specific area via wireless communication. Because sensor nodes are small, low-cost, and lightweight, and are typically deployed randomly in unattended scenarios, their energy storage components are almost impossible and unnecessary to replace or recharge. However, the network's operating time depends on the energy efficiency of the nodes; therefore, optimizing node energy consumption and balancing node load remains a major technical challenge in WSN applications. To address the energy consumption problem in WSNs, many energy-efficient routing algorithms have been proposed. Among them, clustering routing algorithms have received extensive research due to their advantages of low communication energy consumption, high reliability, and good scalability.
[0003] The technology of this invention originates from the Yunnan Provincial Basic Research Program Key Project (202101AS070016); the Yunnan Provincial "Xingdian Elite Talent Support Program" Industrial Innovation Talent Project (Yunfa Gai Renshi
[2019] No. 1096); the Yunnan Provincial Technological Innovation Talent Project (2019HB113); the Yunnan Provincial Key Laboratory of Computer Technology Application Open Fund; and the Yunnan Provincial Science and Technology Program Major Science and Technology Special Project. Summary of the Invention
[0004] The technical problem to be solved by this invention is to provide an adaptive relay routing method for dual-cluster head WSNs based on optimized clustering. By performing energy-balanced clustering of the sensor monitoring area, selecting the node with the most reasonable energy, location and distribution density as the cluster head, and planning the optimal communication path between nodes, the clustering routing algorithm is optimized in the clustering stage, cluster head election stage and data transmission stage. This optimizes the network topology, improves the energy utilization efficiency of nodes, and extends the network lifetime.
[0005] The technical solution of this invention is: an adaptive relay routing method for dual-cluster head WSNs based on optimized clustering, the specific steps of which are as follows:
[0006] Step 1: Network Initialization. N WSN (Web Sensor Network) nodes are randomly deployed within a two-dimensional monitoring area of M×M. All nodes are isomorphic and possess location awareness and adjustable communication power. Nodes are divided into clusters within the monitoring area. Each cluster can elect inner and outer cluster leaders, transmitting monitoring data to the base station via inter-node forwarding. One complete data monitoring process is recorded as one round, and the network operates periodically in rounds. The base station is located at the center of the area and has unlimited resources. The base station collects information from all nodes in the monitoring area, utilizing its superior performance for centralized clustering, which reduces the computational load during node-level clustering.
[0007] Step 2: Define the energy consumption model. In WSNs, node energy consumption mainly arises from communication energy consumption. A first-order wireless communication model is used for calculation. The energy required for a node to send l-bit data to a node at a distance d is:
[0008]
[0009] In the formula, ε fs and ε mp The power amplifier's power consumption factor. E is the distance threshold. elec This represents the energy consumption coefficient for device operation. The energy consumption for a node to receive lbit data and to merge δ lbit data packets into one is as follows:
[0010] E RX (l)=lE elec E AGG (δ,l)=δlE da
[0011] In the formula, E da The energy required to fuse 1 bit of data for a node.
[0012] Step 3: Analyze the relationship between cluster size and network energy consumption under the dual-cluster head model. Set the optimal cluster size with the goal of minimizing the total network energy consumption. Specify the number of clusters for the FCM algorithm to obtain a more reasonable clustering to balance the problem of low cluster head utilization caused by too many clusters and increased cluster head load caused by too few clusters.
[0013] According to the network and energy consumption model of the present invention, in each round, cluster members send monitoring data to the inner cluster head. The inner cluster head receives the cluster member data, merges it, and forwards it to the outer cluster head. The outer cluster head receives the data from the inner cluster head and receives T. R The relay data is then merged with its own monitoring data and forwarded to the base station. Therefore, the total energy consumption E required for one network cycle is... Total for:
[0014]
[0015] In the formula, C is the cluster size, and d ON Let E be the distance from the outer cluster head to the next-hop outer cluster head (or base station); Total Taking the partial derivative of C with respect to C and finding it to be 0, we can obtain the optimal cluster size C. opt for:
[0016]
[0017] Step 4: Encode AOA individuals into cluster center combinations. Then, AOA uses the objective function of the FCM algorithm as the fitness function to calculate the initial cluster centers before cluster analysis. These initial cluster centers are then fed into the FCM algorithm for centralized clustering, ultimately dividing the entire network into C clusters.
[0018] Step 4.1: Set the encoding format; In order to provide an optimized initial cluster center combination for FCM, the individuals of AOA need to be encoded into a set of C D-dimensional cluster centers in the FCM algorithm. Each individual can be represented by a C×D matrix; Decoding the matrix of each individual in the AOA population can yield a valid set of cluster centers.
[0019] Step 4.2: Set the initial parameters for AOA and FCM algorithms, and randomly initialize the AOA population.
[0020] Step 4.3: Decode the matrix of individuals in the AOA population into C initial cluster center sets V = {v1, v2, ..., v...} C} Calculate the membership matrix U corresponding to the cluster center set:
[0021] i = 1, ..., N, j = 1, ..., C
[0022] In the formula, m is an exponent that controls the degree of clustering blurriness and overlap; the higher the m, the more blurred the final clustering result. X = {x1, x2, ..., x} N} represents the set of all nodes within the monitoring area.
[0023] Step 4.4: Calculate the objective function value J corresponding to the cluster center set and membership matrix in Step 4.3. m (U,V) is used as the fitness value of the current individual in the AOA population, and the calculation formula is as follows:
[0024] 1 <m
[0025] Step 4.5: Repeat Step 4.3-Step 4.4 until all individuals in the AOA population have been traversed and the optimal solution is recorded.
[0026] Step 4.6: Update the search space of the AOA population; determine whether the maximum number of AOA iterations has been reached. If not, return to step 4.3; if so, proceed to step 4.7.
[0027] Step 4.7: Decode the optimal solution of the AOA iteration to replace the initial cluster centers randomly set by the FCM algorithm; the FCM algorithm can improve the clustering accuracy by clustering based on this set of initial cluster centers, and avoid the disadvantage of the FCM algorithm being prone to getting trapped in local optima when randomly initializing cluster centers.
[0028] Step 4.8: Execute the FCM algorithm to obtain J m The clustering result is the membership matrix U and the cluster center set V that have the minimum values of (U,V).
[0029] Step 5: Using node location, energy, and centrality as influencing factors, design independent cluster head evaluation functions based on the working characteristics of both internal and external cluster heads. After dividing the monitoring area into clusters, dynamically rotate cluster heads within each cluster based on the evaluation values.
[0030] Let be the number of surviving nodes in the i-th cluster. Let j be the j-th node in cluster i. To select the node with the largest remaining energy and the lowest energy consumption for transmitting detection data with cluster members as the inner cluster head, we define: The evaluation function for inner cluster heads is:
[0031]
[0032] E res (i,j) is The remaining energy, Let be the average remaining energy of the surviving nodes in cluster i; The centrality of a node is the sum of the squared distances between the node and all other members of the cluster. Let $\frac{i}{i}$ be the average centrality of all surviving nodes in cluster $i$, and the formulas for calculating them are as follows:
[0033]
[0034] The closer the outer cluster head is to the base station, the lower the energy consumption for direct communication with the base station or for relaying data. To select nodes with large remaining energy and close proximity to the base station as outer cluster heads, we define... The outer cluster head evaluation function is:
[0035]
[0036] D bs (i,j) is Distance to base station Let be the average distance between all surviving nodes in cluster i and the base station;
[0037] The node with the highest cluster head evaluation value in the current round is selected as the corresponding inner or outer cluster head.
[0038] Step 6: Calculate the distance applicability conditions of the relay forwarding strategy between outer cluster heads, and select the relay node of the outer cluster head based on the energy consumption rate.
[0039] To avoid blindly adopting inter-cluster multi-hop without considering the cost of forwarding, which could lead to higher energy consumption for multi-hop strategies compared to single-hop strategies, we ensure that the energy consumption of the outer cluster head communicating directly with the base station minus the energy consumption of the outer cluster head relaying through the next hop is greater than 0. Therefore, the distance applicability conditions for the inter-cluster multi-hop strategy are:
[0040]
[0041] In the formula, d BS and d R These represent the distance between the outer cluster head and the base station, and the distance from the outer cluster head to the next hop outer cluster head, respectively; the formula for calculating the energy consumption of the outer cluster head in this round of communication is:
[0042]
[0043] The energy consumption rate of the outer cluster head is E OCH The ratio of energy consumption to remaining energy. To avoid premature overload of individual outer cluster heads, the outer cluster head will select other outer cluster heads that meet the distance applicability conditions of the multi-hop strategy and have the lowest energy consumption rate for multi-hop. If none of them meet the conditions, it will communicate directly with the base station.
[0044] The beneficial effects of this invention are as follows: This invention optimizes the three stages of the clustering routing algorithm. In the clustering stage, the AOA-optimized FCM clustering method based on the optimal clustering size ensures the uniformity of cluster distribution. In the cluster head election stage, the dual cluster heads dynamically elected based on node location, energy, and centrality meet their working characteristics, significantly balancing the load between nodes while maximizing node energy utilization efficiency. In the data transmission stage, the adaptive relay strategy optimizes the data transmission path, delaying the round in which the first node's energy is exhausted, thus achieving more persistent and effective monitoring of the target area. Attached Figure Description
[0045] Figure 1 This is a model diagram of the present invention;
[0046] Figure 2 This is a diagram of the experimental parameters of the present invention;
[0047] Figure 3 This is a flowchart illustrating the implementation of the present invention;
[0048] Figure 4 This is a clustering result diagram of an embodiment of the present invention when the network has run for 200 rounds;
[0049] Figure 5 This is a diagram showing the relationship between the number of energy-depleted nodes and the number of network rounds in an embodiment of the present invention;
[0050] Figure 6 This is a diagram showing the relationship between the total remaining energy of the network and the number of network operation rounds in an embodiment of the present invention. Detailed Implementation
[0051] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0052] Example 1: As Figure 1 As shown, an adaptive relay routing method for dual-cluster head WSNs based on optimized clustering is proposed:
[0053] Step 1: Network Initialization. N WSN (Web Sensor Network) nodes are randomly deployed within a two-dimensional monitoring area of M×M. All nodes are isomorphic and possess location awareness and adjustable communication power. Nodes are divided into clusters within the monitoring area. Each cluster can elect inner and outer cluster leaders, transmitting monitoring data to the base station via inter-node forwarding. One complete data monitoring process is recorded as one round, and the network operates periodically in rounds. The base station is located at the center of the area and has unlimited resources. The base station collects information from all nodes in the monitoring area, utilizing its superior performance for centralized clustering, which reduces the computational load during node-level clustering.
[0054] Step 2: Analyze the relationship between cluster size and network energy consumption under the dual-cluster head model. Set the optimal cluster size with the goal of minimizing the total network energy consumption. Specify the number of clusters for the FCM algorithm to obtain a more reasonable clustering to balance the problem of low cluster head utilization caused by too many clusters and increased cluster head load caused by too few clusters.
[0055] Step 3: Encode AOA individuals into cluster center combinations. Then, AOA uses the objective function of the FCM algorithm as the fitness function to calculate the initial cluster centers before cluster analysis. These initial cluster centers are then fed into the FCM algorithm for centralized clustering, ultimately dividing the entire network into C clusters.
[0056] Step 4: Using node location, energy, and centrality as influencing factors, design independent cluster head evaluation functions based on the working characteristics of both internal and external cluster heads. After dividing the monitoring area into clusters, dynamically rotate cluster heads within each cluster based on the evaluation values.
[0057] Step 5: Calculate the distance applicability conditions of the relay forwarding strategy between outer cluster heads, and select the relay node of the outer cluster head based on the energy consumption rate.
[0058] The invention will now be described in detail through specific examples.
[0059] Step 1: Simulation environment and parameter settings;
[0060] This invention was simulated using the MATLAB R2017a platform. One hundred WSNs sensor nodes were randomly deployed within a 100×100 two-dimensional monitoring area, with the base station located at the center of the sensing area. The performance advantages of this invention compared to the classic clustering routing algorithm LEACH were verified by analyzing clustering results, network lifetime, and energy efficiency. The network model, energy consumption model, and parameter settings for each algorithm in the experiment are as follows: Figure 2 As shown.
[0061] Step 2: Overall Implementation Process;
[0062] like Figure 3 As shown, the specific implementation process of the present invention is as follows:
[0063] First, the network is initialized. In the first round of network operation, the base station collects information on all nodes within the monitoring area. Then, utilizing the base station's powerful processing capabilities, the following clustering steps are executed: ① The optimal cluster size is set based on communication energy consumption; ② The FCM algorithm divides the nodes into clusters according to the initial cluster centers provided by AOA. In subsequent rounds, clustering will only occur again if the number of surviving nodes in the network changes, causing a change in the optimal cluster size.
[0064] Secondly, in each round of network operation, the cluster head is dynamically updated in a distributed manner. The inner cluster head collects monitoring data from cluster members, merges it, and sends it to the outer cluster head. Before cluster head election, a status broadcast is performed to allow nodes to obtain the status information of nodes within the same cluster. Then, based on the monitoring area being divided into clusters, the working characteristics of the inner and outer cluster heads and the factors affecting cluster head energy consumption are analyzed. Independent cluster head evaluation functions are designed for the inner and outer cluster heads respectively, and a distributed dynamic dual cluster head rotation is performed based on these functions.
[0065] Finally, the outer cluster head selects the optimal communication path to forward the intra-cluster data to the base station. The distance applicability conditions of the inter-cluster head relay strategy are analyzed. The outer cluster head will select the remaining outer cluster head that meets the distance applicability conditions of the multi-hop strategy and has the lowest energy consumption rate for multi-hop communication. If none of these conditions are met, it will communicate directly with the base station.
[0066] Step 3: Set up the network model and initialize the network;
[0067] like Figure 1As shown, 100 WSN (Wireless Network System) sensor nodes are randomly deployed within a 100×100 two-dimensional monitoring area. All nodes are isomorphic and possess location awareness and adjustable communication power. The nodes are divided into clusters within the monitoring area, and each cluster can elect inner and outer cluster leaders. Monitoring data is transmitted to the base station via inter-node forwarding. The base station is located at the center of the area and has unlimited resources. It collects information from all nodes in the monitoring area to utilize its strong performance for centralized clustering, reducing the computational load during node-level clustering. One complete data monitoring process is recorded as one round, and the network operates periodically in rounds.
[0068] Step 4: Set up the energy consumption model;
[0069] In WSNs, node energy consumption mainly arises from communication energy consumption. A first-order wireless communication model is used for calculation. The energy required for a node to send l-bit data to a node at a distance d is:
[0070]
[0071] In the formula, ε fs and ε mp The power amplifier's power consumption factor. E is the distance threshold. elec This represents the energy consumption coefficient for device operation. The energy consumption for a node to receive lbit data and to merge δ lbit data packets into one is as follows:
[0072] E RX (l)=lE elec E AGG (δ,l)=δlE da
[0073] In the formula, E da The energy required to fuse 1 bit of data for a node.
[0074] Step 5: Analyze the relationship between cluster size and network energy consumption under the dual-cluster head model. Set the optimal cluster size with the goal of minimizing the total network energy consumption. Specify the number of clusters for the FCM algorithm to obtain a more reasonable clustering to balance the problem of low cluster head utilization caused by too many clusters and increased cluster head load caused by too few clusters.
[0075] According to the network and energy consumption model of the present invention, in each round, cluster members send monitoring data to the inner cluster head. The inner cluster head receives the cluster member data, merges it, and forwards it to the outer cluster head. The outer cluster head receives the data from the inner cluster head and receives T. R The relay data is then merged with its own monitoring data and forwarded to the base station. Therefore, the total energy consumption E required for one network cycle is... Total for:
[0076]
[0077] In the formula, C is the cluster size, and d ON Let E be the distance from the outer cluster head to the next-hop outer cluster head (or base station); Total Taking the partial derivative of C with respect to C and finding it to be 0, we can obtain the optimal cluster size C. opt for:
[0078]
[0079] Will Figure 2 Substituting the parameter values into the above formula, we can obtain C. opt =7, meaning the network should be divided into 7 clusters.
[0080] Step 6: Encode AOA individuals into cluster center combinations. Then, AOA uses the objective function of the FCM algorithm as the fitness function to calculate the initial cluster centers before cluster analysis. These initial cluster centers are then fed into the FCM algorithm for centralized clustering, ultimately dividing the entire network into C clusters.
[0081] Step 6.1: Set the encoding format; In order to provide FCM with an optimized initial set of cluster centers, the individuals of AOA need to be encoded into a set of C D-dimensional cluster centers in the FCM algorithm. Here, C=7 and d=2, so each individual can be represented by a C×D matrix:
[0082]
[0083] Decoding the matrix of each individual in the AOA population yields a valid set of cluster centers.
[0084] Step 6.2: As Figure 2 As shown, the parameters of the AOA and FCM algorithms are set, and the AOA population is randomly initialized.
[0085] Step 6.3: Decode the matrix of individuals in the AOA population into C initial cluster center sets V = {v1, v2, ..., v...} C} Calculate the membership matrix U corresponding to the cluster center set:
[0086] i = 1, ..., N, j = 1, ..., C
[0087] In the formula, m is an exponent that controls the degree of clustering blurriness and overlap; the higher the m, the more blurred the final clustering result. X = {x1, x2, ..., x} N} represents the set of all nodes within the monitoring area.
[0088] Step 6.4: Calculate the objective function value J corresponding to the cluster center set and membership matrix in Step 6.3.m (U, V), and use it as the fitness value of the current individual in the AOA population. Its calculation formula is:
[0089] 1 < m
[0090] Step6.5: Repeat Step6.3 - Step6.4 until all individuals in the AOA population are traversed, and record the optimal solution.
[0091] Step6.6: Update the acceleration coefficient MOA and probability coefficient MOP of AOA. The calculation formulas are respectively:
[0092]
[0093]
[0094] In the formula, t, MAX t are respectively the current iteration number and the maximum iteration number, MAX MOA , MIN MOA are respectively the maximum value and minimum value of MOA, and α is a sensitive parameter that defines the development accuracy in the iteration process;
[0095] Step6.7: Update the search space of the AOA population; Let r1, r2, r3 be random numbers on [0, 1]. In each iteration, when MOA < r1, AOA conducts global exploration. The update formula for individual i in the j - th dimension is:
[0096] τ j = ((UB j - LB j )×σ + LB j )
[0097]
[0098] In the formula, UB j and LB j are the search boundaries in the j - th dimension, and μ is a control parameter for adjusting the search process. is the value of the j - th dimension of the currently obtained optimal solution, and ε is a minimum value; When MOA ≥ r1, AOA conducts local development. The update formula for individual i in the j - th dimension is:
[0099]
[0100] Step6.8: Judge whether the maximum iteration number of AOA is reached. If not, return to Step6.3; if so, execute Step6.9.
[0101] Step 6.9: Decode the optimal solution of the AOA iteration to replace the initial cluster centers randomly set by the FCM algorithm; the FCM algorithm can improve the clustering accuracy by clustering based on this set of initial cluster centers, and avoid the disadvantage of the FCM algorithm being prone to getting trapped in local optima when randomly initializing cluster centers.
[0102] Step 6.10: Execute the FCM algorithm to obtain J m The clustering result is the membership matrix U and the cluster center set V that have the minimum values of (U,V).
[0103] Step 7: Using node location, energy, and centrality as influencing factors, design independent cluster head evaluation functions based on the working characteristics of both internal and external cluster heads. After dividing the monitoring area into clusters, dynamically rotate cluster heads within each cluster based on the evaluation values.
[0104] Let be the number of surviving nodes in the i-th cluster. Let j be the j-th node in cluster i. To select the node with the largest remaining energy and the lowest energy consumption for transmitting detection data with cluster members as the inner cluster head, we define: The evaluation function for inner cluster heads is:
[0105]
[0106] E res (i,j) is The remaining energy, Let be the average remaining energy of the surviving nodes in cluster i;
[0107] for The centrality of a node is the sum of the squared distances between the node and all other members of the cluster. Let $\frac{i}{i}$ be the average centrality of all surviving nodes in cluster $i$, and the formulas for calculating them are as follows:
[0108]
[0109] The closer the outer cluster head is to the base station, the lower the energy consumption for direct communication with the base station or for relaying data. To select nodes with large remaining energy and close proximity to the base station as outer cluster heads, we define... The outer cluster head evaluation function is:
[0110]
[0111] D bs (i,j) is Distance to base station Let be the average distance between all surviving nodes in cluster i and the base station;
[0112] The node with the highest cluster head evaluation value in the current round is selected as the corresponding inner or outer cluster head.
[0113] like Figure 4 As shown, the clustering results of the embodiment of the present invention and the LEACH algorithm are compared after 200 rounds of network operation. It can be seen that the clustering results of the embodiment of the present invention are more reasonable in terms of cluster distribution and cluster size. Furthermore, in the clustering results of the embodiment of the present invention, the inner cluster heads are located closer to the cluster centroid, and the outer cluster heads are located closer to the base station, so the cluster head election results meet the working characteristics and expected requirements of both algorithms. In contrast, LEACH, due to the random generation of individual cluster heads and the proximity of nodes to clusters, results in unreasonable cluster head positions and extremely uneven clustering results.
[0114] Step 8: Calculate the distance applicability conditions of the relay forwarding strategy between outer cluster heads, and select the relay node of the outer cluster head based on the energy consumption rate.
[0115] To avoid blindly adopting inter-cluster multi-hop without considering the cost of forwarding, which could lead to higher energy consumption for multi-hop strategies compared to single-hop strategies, we ensure that the energy consumption of the outer cluster head communicating directly with the base station minus the energy consumption of the outer cluster head relaying through the next hop is greater than 0. Therefore, the distance applicability conditions for the inter-cluster multi-hop strategy are:
[0116]
[0117] In the formula, d BS and d R These represent the distance between the outer cluster head and the base station, and the distance from the outer cluster head to the next hop outer cluster head, respectively; the formula for calculating the energy consumption of the outer cluster head in this round of communication is:
[0118]
[0119] The energy consumption rate of the outer cluster head is E OCH The ratio of energy consumption to remaining energy. To avoid premature overload of individual outer cluster heads, the outer cluster head will select other outer cluster heads that meet the distance applicability conditions of the multi-hop strategy and have the lowest energy consumption rate for multi-hop. If none of them meet the conditions, it will communicate directly with the base station.
[0120] like Figure 5As shown in the diagram, the relationship between the number of energy-exhausted nodes and the number of network rounds is observed in the embodiments of the present invention and the comparative algorithm LEACH. It can be seen that the number of energy-exhausted nodes increases with network operation in both algorithms. However, the first energy-exhausted node in the embodiment of the present invention occurs in the latest round. The first energy-exhausted node in LEACH and the first energy-exhausted node in the embodiment of the present invention occurs in rounds 548 and 1045, respectively, representing a 90.69% extension compared to LEACH. Furthermore, when the first node exhausts its energy in the 1045th round of DRCR, 87 nodes in LEACH have already exhausted their energy, fully demonstrating that DRCR can perform more sustained and effective sensing of the sensing area.
[0121] like Figure 6 As shown in the diagram, the relationship between the total remaining network energy and the number of network rounds is observed for both the embodiment of the present invention and the comparative algorithm LEACH. It can be seen that the total remaining network energy of both algorithms decreases as the number of network rounds increases. However, the total remaining network energy of the embodiment of the present invention is higher than that of the LEACH algorithm at the same number of rounds, meaning that the embodiment of the present invention consumes the least energy per round and has higher energy utilization efficiency.
[0122] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. An adaptive relay routing method for dual-cluster head WSNs based on optimized clustering, characterized in that: Step 1: Network initialization, in an area of... Randomly deployed within the two-dimensional monitoring area There are WSNs sensor nodes. The nodes are divided into clusters within the monitoring area. Each cluster can elect two cluster heads, one inner and one outer. Each data collection is transmitted to the base station through inter-node forwarding. Step 2: Analyze the relationship between cluster size and network energy consumption under the dual-cluster head model, set the optimal cluster size with the goal of minimizing the total network energy consumption, and specify the number of clusters for the FCM algorithm; Step 3: Encode AOA individuals into cluster center combinations. Then, AOA uses the objective function of the FCM algorithm as the fitness function to calculate the initial cluster centers before cluster analysis. These initial cluster centers are then fed into the FCM algorithm for centralized clustering, ultimately dividing the entire network into clusters. A cluster; Step 4: Using node position, energy, and centrality as influencing factors, design independent cluster head evaluation functions based on the working characteristics of internal and external cluster heads, and use the evaluation values as the basis for dynamic rotation of cluster heads within the cluster; Step 5: Calculate the distance applicability conditions of the relay forwarding strategy between outer cluster heads, and select the relay node of the outer cluster head based on the energy consumption rate; Step 3 specifically refers to: Step 3.1: Set the encoding format, encoding each individual in the AOA into a set in the FCM algorithm. indivual If the set of cluster centers is dimensional, then each individual can be represented by a single cluster center. Matrix representation; Step 3.2: Set the initial parameters for AOA and FCM algorithms, and randomly initialize the AOA population; Step 3.3: Decode the matrix of individuals in the AOA population as follows An initial set of cluster centers Calculate the membership matrix corresponding to the cluster center set. : ; In the formula, To control the index of clustered fuzzy overlap, The set of all nodes; Step 3.4: Calculate the objective function values corresponding to the cluster center set and membership matrix from Step 3.
3. This is used as the fitness value of the current individual in the AOA population, and its calculation formula is as follows: ; Step 3.5: Repeat Step 3.3-Step 3.4 until all individuals in the AOA population have been traversed, and record the optimal solution; Step 3.6: Update the search space of the AOA population; determine if the maximum number of iterations of AOA has been reached. If not, return to step 3.3; if so, proceed to step 3.
7. Step 3.7: Decode the optimal solution of the AOA iteration to replace the initial cluster centers randomly set by the FCM algorithm; Step 3.8: Execute the FCM algorithm to obtain... Membership matrix with minimum value and cluster center set This is the clustering result; Step 4 specifically refers to: Cluster The Middle 1 node The inner cluster head evaluation function is calculated as follows: ; For the first The number of surviving nodes in a cluster. for The remaining energy, For clusters The average remaining energy of surviving nodes. for The centrality of a node is the sum of the squared distances between the node and all other members of the cluster. For clusters The average centrality of surviving nodes is calculated using the following formulas: ; The outer cluster head evaluation function is as follows: ; for Distance to base station For clusters The average distance between all surviving nodes and the base station; The node with the highest cluster head evaluation value in the current round is selected as the corresponding inner or outer cluster head.
2. The adaptive relay routing method for dual-cluster head WSNs based on optimized clustering according to claim 1, characterized in that, Step 2 specifically includes: The energy consumption model adopts a first-order wireless communication model, with nodes transmitting... bit data to distance is The energy consumption of the node is: ; In the formula, and The power amplifier's power consumption factor. Distance threshold The energy consumption coefficient for equipment operation, received by the node. bit data and indivual The energy consumption of fusing bit data packets into one is as follows: ; In the formula, The energy required to fuse 1 bit of data for a node; therefore, the energy consumption of the entire network in one round is the sum of the energy consumption of all internal and external cluster heads and cluster members, calculated as follows: ; In the formula, For cluster size, This is the distance from the outer cluster head to the next outer cluster head. Let be the number of relays in the outer cluster head; right Find the partial derivative as The optimal cluster size can be obtained. for: 。 3. The adaptive relay routing method for dual-cluster head WSNs based on optimized clustering according to claim 1, characterized in that, Step 5 specifically includes: If the energy consumption of direct communication between the outer cluster head and the base station minus the energy consumption of the outer cluster head via the next-hop relay is greater than 0, then the applicable distance conditions for the inter-cluster multi-hop strategy can be solved as follows: ; In the formula, and These represent the distance between the outer cluster head and the base station, and the distance from the outer cluster head to the next-hop outer cluster head, respectively. The energy consumption rate of an outer cluster head is the ratio of its current communication energy consumption to its remaining energy. The outer cluster head will select other outer cluster heads that meet the distance applicability conditions of the multi-hop strategy and have the lowest energy consumption rate for multi-hop communication. If none of them meet the conditions, it will communicate directly with the base station.