CN112672396B - Wireless sensor network mobile node clustering method based on improved whale algorithm - Google Patents

Wireless sensor network mobile node clustering method based on improved whale algorithm Download PDF

Info

Publication number
CN112672396B
CN112672396B CN202011435340.9A CN202011435340A CN112672396B CN 112672396 B CN112672396 B CN 112672396B CN 202011435340 A CN202011435340 A CN 202011435340A CN 112672396 B CN112672396 B CN 112672396B
Authority
CN
China
Prior art keywords
cluster head
nodes
node
mobile
mobile node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011435340.9A
Other languages
Chinese (zh)
Other versions
CN112672396A (en
Inventor
龙洋
汪汉新
陈浅浅
帅猜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South Central Minzu University
Original Assignee
South Central University for Nationalities
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South Central University for Nationalities filed Critical South Central University for Nationalities
Priority to CN202011435340.9A priority Critical patent/CN112672396B/en
Publication of CN112672396A publication Critical patent/CN112672396A/en
Application granted granted Critical
Publication of CN112672396B publication Critical patent/CN112672396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a wireless sensor network mobile node clustering method based on an improved whale algorithm, which comprises the following steps: constructing a mobile node model of a wireless sensor network, selecting cluster head nodes, clustering non-cluster head nodes and a data transmission process; constructing a mobile node model of the wireless sensor network based on the wireless communication energy consumption model and the random direction and distance movement model; the base station updates the residual energy, the times of selecting the mobile nodes as cluster head nodes and the position information of all the mobile nodes in the wireless sensor network; selecting a plurality of mobile nodes as cluster head nodes respectively by utilizing an improved whale algorithm; and the rest mobile nodes are added into the cluster according to the shortest distance principle to perform data transmission. The invention has the beneficial effects that: the cluster head election algorithm is simple and easy to implement, rapid death of part of nodes is not prone to occurring when the cluster head election algorithm is used in the model, and the overall service life of the network is prolonged.

Description

Wireless sensor network mobile node clustering method based on improved whale algorithm
Technical Field
The invention relates to the technical field of wireless sensor networks, in particular to a wireless sensor network mobile node clustering method based on an improved whale algorithm.
Background
The mobile communication is about to enter the 5G era, the application of the mobile communication is more and more extensive along with the deep research of the wireless sensor network, the fixed network structure cannot meet the newly increased requirement, the introduction of the mobile node expands the application field of the wireless sensor, and the technical challenge is brought. The mobile wireless sensor network aims to collect mobile sensor information in a specific range, realizes regional monitoring, and can be widely applied to the fields of military reconnaissance, environmental monitoring, medical monitoring, agricultural cultivation and the like. Because the mobile node has mobility, small volume and limited energy, and is influenced by working environment, the energy is difficult to be provided from the outside, therefore, the traditional routing protocol is not suitable for the mobile wireless sensor network. How to balance energy consumption and prolong the service life of the network becomes the key point and difficulty of designing a routing protocol of the mobile wireless sensor network.
The LEACH protocol balances the overall network energy consumption by selecting cluster heads by nodes in turn, but due to the randomness of cluster head selection, the condition of too low cluster head energy can occur, the LEACH-C protocol provides the optimal cluster head number on the LEACH protocol, the node position and energy are considered in the process of selecting the cluster heads, but the LEACH-C protocol does not consider the communication condition of the nodes in the cluster. The HEED algorithm is an improved algorithm of the LEACH algorithm, and although the remaining energy of the node is used as a factor for selecting the node, the routing phase requires a large overhead. The LEACH-N algorithm considers the residual energy, and increases the possibility that the common nodes can directly send data to the base station, but the service life of the whole network is low. The PSO is a group intelligent optimization algorithm based on a population, the PSO-C algorithm considers intra-cluster communication distances among nodes and residual energy of all cluster heads, and an optimal cluster head set is selected by utilizing the PSO algorithm, but the convergence is not high. The algorithms are all used for a wireless sensor network fixed node model, the problems of low convergence and rapid death of part of nodes still exist, and the service life of the whole network is short.
Disclosure of Invention
In order to solve the problems, the invention provides a wireless sensor network mobile node clustering method based on an improved whale algorithm, which comprises the following steps: the method comprises the following steps of constructing a mobile node model of the wireless sensor network, selecting cluster head nodes, clustering the nodes and transmitting data, and comprises the following steps:
s1, initializing the wireless sensor network, constructing a mobile node model of the wireless sensor network based on the wireless communication energy consumption model and the random direction and distance movement model, and initializing the mobile node model;
s2, based on the mobile node model in the step S1, the base station updates the residual energy, the position and the time information of the selected cluster head node of all the mobile nodes in the wireless sensor network;
s3, selecting a plurality of mobile nodes as cluster head nodes respectively by utilizing an improved whale algorithm based on the residual energy and the position of the mobile nodes in the step S2 and the information of the times of selecting the mobile nodes as the cluster head nodes;
s4, broadcasting by each cluster head node in the step S3, and adding each non-cluster head node into a cluster by selecting the cluster head node closest to the node until all non-cluster head nodes are added into the cluster, wherein at the moment, a plurality of clusters exist in the wireless sensor network; the cluster comprises a cluster head node and a plurality of non-cluster head nodes, and the cluster head node and the non-cluster head node of each cluster are different;
s5, data transmission is carried out, when the residual energy of any cluster head node in the wireless sensor network is smaller than a preset energy threshold value and at least one mobile node is alive, the step S2 is returned until all the mobile nodes in the wireless sensor network die;
furthermore, the wireless sensor network comprises a plurality of mobile nodes and a base station, the mobile nodes are randomly deployed in a monitoring area, the base station is fixedly deployed at a certain position of the monitoring area, the initial energy of all the mobile nodes is the same and limited, the energy of the base station is not limited and is kept static, the mobile nodes periodically move, and the mobile nodes do not consume energy in the moving process and do not perform the processes of cluster head node selection, node clustering and data transmission;
the mobile nodes all move according to the random direction and distance moving model, wherein the random direction and distance moving model specifically comprises the following steps:
each mobile node randomly selects a position in the monitoring area as the starting point of the mobile node, and the mobile node moves along the moving direction alphahMoved by a certain distance dhThe position reached at this time is the terminal point of the mobile node, and the process is one-time complete movement of the mobile node;
the mobile node moves in the monitoring area according to the following formula:
Figure BDA0002828439570000021
Figure BDA0002828439570000022
wherein the content of the first and second substances,
Figure BDA0002828439570000023
indicating the corresponding abscissa at the end point of the h-th mobile node,
Figure BDA0002828439570000024
indicating the corresponding ordinate at the end point of the h-th mobile node,
Figure BDA0002828439570000025
indicating the corresponding abscissa at the start of the h-th mobile node,
Figure BDA0002828439570000026
denotes the corresponding ordinate at the origin of the H-th mobile node, H ∈ [1, H]H denotes the total number of mobile nodes, alphahIndicates the moving direction of the h mobile node, alphahE (0,2 π), and αhIn the range of (0,2 π) are taken uniformly, dhIndicates the moving distance of the h mobile node, dh∈(dmin,dmax) And d ishIn (d)min,dmax) In the range of average distribution, dminAnd dmaxRespectively representing the minimum distance and the maximum distance of the mobile node moving once in the monitoring area;
the starting point of the next movement of the mobile node is the end point of the last complete movement of the mobile node; if the mobile node reaches a boundary of a certain side of the monitoring area in the last complete movement, the moving direction of the mobile node is not randomly selected any more but is set to move towards the boundary of the certain side of the monitoring area in the next movement process;
further, in step S2, the basis for selecting a cluster head set is: the method comprises the following steps of (1) intra-cluster communication cost, the distance between a cluster head node and a base station, the residual energy of the cluster head node and the times of selecting the cluster head node, wherein the cluster head set is a set formed by a plurality of cluster head nodes selected by using an improved whale algorithm;
in the improved whale algorithm, the method comprises the following steps:
(1) establishing an objective optimization function:
communication cost in a cluster:
Figure BDA0002828439570000031
wherein f is1Represents the sum of the average communication distances of all cluster head nodes in the cluster head set, CHjRepresents the jth cluster head node, j belongs to [1,2]M denotes the total number of cluster head nodes, njIs a cluster head node CHjNumber of neighbor nodes of d (k, CH)j) For any neighbor node k and cluster head node CHjIf a mobile node is located in the cluster head node CHjIn the cluster, the mobile node is called the cluster head node CHjThe neighbor node of (2);
communication cost between cluster head nodes and base stations:
Figure BDA0002828439570000032
wherein f is2Represents the average value of the distances between all cluster head nodes and the base station in the cluster head set, BS represents the base station, and d (CH)jBS) represents the distance between the jth cluster head node and the base station;
③ the residual energy of the cluster head nodes:
Figure BDA0002828439570000041
wherein f is3A reciprocal value, E (CH), representing the sum of the remaining energies of all cluster head nodes in the set of cluster headsj) The residual energy of the jth cluster head node;
fourthly, the elected times of the cluster head nodes are as follows:
Figure BDA0002828439570000042
wherein f is4Indicating the sum of the times of all cluster head nodes selecting cluster head nodes in the cluster head set,
Figure BDA0002828439570000043
the elected times of the jth cluster head node;
(2) establishing a fitness function:
fitness=ζf1+ωf2+χf3+γf4
wherein ζ, ω, χ and γ are f, respectively1、f2、f3And f4The weight value of ζ + ω + χ + γ is 1, and the cluster head nodes are selected to be a plurality of corresponding mobile nodes when the fitness function fitness reaches the minimum value;
(3) adjusting a convergence factor a:
Figure BDA0002828439570000044
wherein, a1And a0Representing the ending value and the starting value of a, l is an adjusting parameter, t is the current iteration number, tmaxIs the maximum iteration number;
(4) adjusting the contraction probability:
psurround the=0.5+t*u
pSteam bubble net=1-pSurround the
Wherein p isSurround theAnd pBubble netRespectively representing the probability value of a manner of surrounding a prey and the probability value of a manner of driving the prey by using a bubble net, mu is an adjusting parameter, and t is the current iteration number;
(5) in the original whale algorithm, chaos variation is introduced, cubic chaos mapping is adopted, and the formula is as follows:
Figure BDA0002828439570000045
the position of whales was varied using the following formula:
Figure BDA0002828439570000051
wherein, ykRepresents a random number between (-1,1), k ∈ [1, n ]]N represents the total number of whales in the population,
Figure BDA0002828439570000052
showing the position of the ith whale before mutation in the t iteration,
Figure BDA0002828439570000053
representing the position of the ith whale after variation in the t iteration;
further, an improved whale algorithm is utilized to select a plurality of mobile nodes to be used as cluster head nodes respectively, and the method specifically comprises the following steps:
s10, initializing whale population, whale position and iteration number, wherein in the initial population, the ith whale is represented as xi={zi1,zi2,...,zimIn which i ∈ [1, n ]]N represents the total number of whales in the population, namely the total number of the selection schemes of the cluster head nodes, each whale represents one selection scheme of the cluster head nodes, zijRepresenting information contained in the jth cluster head node in the ith cluster head node selection scheme by using a vector, wherein m represents the total number of cluster head nodes;
s11, calculating the fitness value of each whale in the population;
s12, carrying out whale population variation, and recording the optimal individual and the position of the optimal individual;
s13, judging whether the optimal iteration times are reached, if so, outputting an optimal solution, and obtaining an optimal cluster head node selection scheme; if not, go to step S14;
s14, updating the convergence factor and the contraction probability according to the current iteration times;
and S15, updating the position of the whale and returning to the step S11.
Further, in step S10, the information includes a cluster head node position, a cluster head node remaining energy, a distance between the cluster head node and the base station, and a number of times of selecting the cluster head node.
The invention has the beneficial effects that: the invention provides a mobile node model of a wireless sensor network, wherein nodes in the wireless sensor network have mobility, and the cluster head election algorithm is simple and easy to implement, so that the situation that part of the nodes die quickly is not easy to occur when the cluster head election algorithm is used in the mobile node model, and the service life of the whole network is prolonged. The concrete embodiment is as follows:
1. a mobile node model of a wireless sensor network is established, and the nodes have mobility and are suitable for a network structure moving in the future;
2. the improved whale algorithm is simple and easy to implement, has good convergence and precision, and avoids falling into local optimum;
3. the cluster head election based on the improved whale algorithm is reasonable, the situation that part of nodes die quickly is not easy to occur, and the overall service life of the network is prolonged.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flow chart of a wireless sensor network mobile node clustering method based on a modified whale algorithm in the embodiment of the invention;
FIG. 2 is a flow chart of a cluster head election algorithm based on an improved whale algorithm in an embodiment of the invention;
FIG. 3 is a diagram showing a comparison of the location of a mobile node before and after moving once in a network;
FIG. 4 is a location diagram of a single mobile node moving 10 times;
FIG. 5 is a graph comparing the number of surviving nodes for a clustering method based on the modified whale algorithm (WOAC) with a clustering method based on the LEACH protocol and the LEAHN protocol;
fig. 6 is a graph comparing the clustering method based on the modified whale algorithm (WOAC) with the clustering method based on the LEACH protocol and the LEACHN protocol in terms of network residual energy.
Detailed Description
For a more clear understanding of the technical features, objects and effects of the present invention, embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
The embodiment of the invention provides a wireless sensor network mobile node clustering method based on an improved whale algorithm.
Referring to fig. 1, fig. 1 is a flowchart of a wireless sensor network mobile node clustering method based on an improved whale algorithm in an embodiment of the present invention, where the method includes building a mobile node model of a wireless sensor network, selecting cluster head nodes, clustering non-cluster head nodes, and transmitting data, and includes the following steps:
s1, initializing the wireless sensor network, constructing a mobile node model of the wireless sensor network based on the wireless communication energy consumption model and the random direction and distance movement model, and initializing the mobile node model;
the wireless sensor network consists of H mobile nodes randomly deployed in a monitoring area and a Base Station (BS) fixedly deployed in the monitoring area and having no energy limitation, and the following assumptions are made about the mobile nodes:
(1) the initial energy of all the mobile nodes is the same and limited, and each mobile node can be selected as a cluster head node;
(2) the neighbor nodes periodically execute monitoring tasks and send data to corresponding cluster heads;
(3) fusing data for minimizing the forwarding amount of the data;
(4) the mobile node can calculate the distance between the mobile node and the base station and other mobile nodes by comparing the received signal strength;
in the wireless sensor network, a mobile node updates the position of the mobile node by periodically moving, and the mobile node does not consume energy in the moving process and does not perform the processes of selecting a cluster head node, clustering nodes and transmitting data;
the mobile nodes all move according to the random direction and distance moving model, wherein the random direction and distance moving model specifically comprises the following steps:
each mobile node randomly selects a position in the monitoring area as the starting point of the mobile node, and the mobile node moves along the moving direction alphahMoved by a certain distance dhThe position reached at this time is the terminal point of the mobile node, and the process is one-time complete movement of the mobile node;
the mobile node moves in the monitoring area according to the following formula:
Figure BDA0002828439570000071
Figure BDA0002828439570000072
wherein the content of the first and second substances,
Figure BDA0002828439570000073
indicating the corresponding abscissa at the end point of the h-th mobile node,
Figure BDA0002828439570000074
indicating the corresponding ordinate at the end point of the h-th mobile node,
Figure BDA0002828439570000075
indicating the corresponding abscissa at the start of the h-th mobile node,
Figure BDA0002828439570000076
denotes the corresponding ordinate at the origin of the H-th mobile node, H ∈ [1, H]H denotes the total number of mobile nodes, alphahIndicates the moving direction of the h mobile node, alphahE (0,2 π), and αhIn the range of (0,2 π) are taken uniformly, dhIndicates the moving distance of the h mobile node, dh∈(dmin,dmax) And d ishIn (d)min,dmax) In the range of average distribution, dminAnd dmaxRespectively representing the minimum distance of one movement of the mobile node in the monitored areaAnd a maximum distance;
the starting point of the next movement of the mobile node is the end point of the last complete movement of the mobile node; if the mobile node reaches a boundary of a certain side of the monitoring area in the last complete movement, the moving direction of the mobile node is not randomly selected any more but is set to move towards the boundary of the certain side of the monitoring area in the next movement process;
all the mobile nodes update the self residual energy according to the wireless communication energy consumption model, wherein the wireless communication energy consumption model specifically comprises the following steps:
the energy consumed by the transmitter to send kbit data to the receiver at distance d is:
Figure BDA0002828439570000081
Figure BDA0002828439570000082
the energy consumed by the receiver to receive the kbit data is:
ERX(k)=kEelec
wherein E iselecDissipated energy per bit of data received or transmitted for the radio model, d0Is a threshold distance, εfsSignal amplification power, epsilon, for free space channel modelsampSelecting different amplification models for the signal amplification power of the multi-channel attenuation model by the transmitter according to the sending distance d;
s2, based on the mobile node model in the step S1, the base station updates the residual energy, the position and the time information of the selected cluster head node of all the mobile nodes in the wireless sensor network;
s3, based on the residual energy and position of the mobile node in the step S2 and the information of the times of selecting the mobile node as a cluster head node, selecting a plurality of mobile nodes as cluster head nodes respectively by using an improved whale algorithm;
basis for selecting a cluster head set: in the cluster head set, the intra-cluster communication cost, the distance between a cluster head and a base station, the residual energy of the cluster head and the times of selecting cluster head nodes are included, wherein the cluster head set is a set formed by a plurality of cluster head nodes selected by an improved whale algorithm;
in the improved whale algorithm, the method comprises the following steps:
(1) establishing an objective optimization function:
in order to reduce the cluster head communication distance, balance the node communication energy consumption, improve the service life of the whole network, have high node residual energy, have small intra-cluster communication distance, and preferentially select a node with a small selection number close to the base station as a cluster head node, therefore, the selection of the cluster head node can be described as an optimization problem with the following 4 targets, as follows:
(ii) intra-cluster communication cost f1
Figure BDA0002828439570000083
Wherein f is1Represents the sum of the average communication distances of all cluster head nodes in the cluster head set, CHjRepresents the jth cluster head node, j belongs to [1,2]M denotes the total number of cluster head nodes, njIs a cluster head node CHjNumber of neighbor nodes of d (k, CH)j) For any neighbor node k and cluster head node CHjIf a node is located in cluster head node CHjIn the cluster, the node is called the cluster head node CHjThe neighbor node of (2);
in order to reduce the communication cost in the cluster, a node with a smaller average communication distance should be selected as a cluster head node as much as possible;
② communication cost f of cluster head node and base station2
Figure BDA0002828439570000091
Wherein f is2Representing all cluster head nodes in the cluster head setDistance average from base station, BS denotes base station, d (CH)jBS) represents the distance between the jth cluster head node and the base station;
because the cluster head needs to transmit a large amount of information from the common nodes in the cluster to the base station, in order to reduce the inter-cluster communication cost, the nodes which are close to the base station should be selected as cluster head nodes as far as possible;
③ the residual energy of the cluster head nodes:
Figure BDA0002828439570000092
wherein f is3A reciprocal value, E (CH), representing the sum of the remaining energies of all cluster head nodes in the set of cluster headsj) The residual energy of the jth cluster head node;
in the communication process of the cluster head, the energy consumption is large, and nodes with higher residual energy should be selected as cluster head nodes as far as possible;
fourthly, the elected times f of cluster head nodes4
Figure BDA0002828439570000093
Wherein f is4Indicating the sum of the times of all cluster head nodes electing the cluster head node in the cluster head set,
Figure BDA0002828439570000094
the elected times of the jth cluster head node;
in the communication process of the cluster head, the energy consumption is high, and the nodes which are selected as cluster head nodes for a few times are selected as cluster head nodes as far as possible;
(2) establishing a fitness function:
fitness=ζf1+ωf2+χf3+γf4
wherein ζ, ω, χ and γ are f, respectively1、f2、f3And f4And ζ + ω + χ + γ ═ 1, the cluster head node is selected such thatA plurality of corresponding mobile nodes when the fitness function fitness reaches the minimum value;
(3) adjusting a convergence factor a:
Figure BDA0002828439570000101
wherein, a1And a0Representing the ending value and the starting value of a, l is an adjusting parameter, t is the current iteration number, tmaxIs the maximum iteration number;
(4) adjusting the contraction probability:
psurround by=0.5+t*u
pSteam bubble net=1-pSurround the
Wherein p isSurround theAnd pBubble netRespectively representing the probability value of a hunting mode and the probability value of a hunting mode by using a bubble net, mu is an adjusting parameter, and t is the current iteration times;
(5) in the original whale algorithm, chaos variation is introduced, cubic chaos mapping is adopted, and the formula is as follows:
Figure BDA0002828439570000102
the position of whales was varied using the following formula:
Figure BDA0002828439570000103
wherein, ykRepresents a random number between (-1,1), k ∈ [1, n ]]N represents the total number of whales in the population,
Figure BDA0002828439570000104
showing the position of the ith whale before mutation in the t iteration,
Figure BDA0002828439570000105
indicating that in the t iteration, the ith whale becomesThe location of the anomaly;
s4, broadcasting by each cluster head node in the step S3, and selecting the cluster head node closest to the node to join the cluster by each non-cluster head node (the mobile node which is not selected as the cluster head node) until all non-cluster head nodes join the cluster, wherein at the moment, a plurality of clusters exist in the wireless sensor network; the cluster comprises a cluster head node and a plurality of non-cluster head nodes, and the cluster head node and the non-cluster head node of each cluster are different;
s5, performing data transmission (data transmission is that non-cluster-head nodes transmit information to the cluster heads, and cluster-head nodes aggregate information to the base station), when the remaining energy of any cluster-head node in the wireless sensor network is less than the preset energy threshold and at least one mobile node is alive (the remaining energy of the mobile node is greater than 0), returning to step S2 until all mobile nodes in the wireless sensor network die (the remaining energy of the mobile node is 0).
Referring to fig. 2, fig. 2 is a flow chart of a cluster head election algorithm based on an improved whale algorithm according to an embodiment of the present invention; the whale algorithm is a swarm intelligence algorithm inspiring foraging behavior of whales with standing heads, predefines the whale population scale, finds a globally optimal solution in a search space, and the globally optimal solution is the position of a prey. The thought of the whale algorithm for solving the optimization problem is to regard the position of each whale as a feasible solution of the problem, simulate the bubble net catching process of the whale, approach the position of a prey and gradually obtain a feasible and optimal solution of the algorithm.
In order to improve the convergence speed and precision of the whale algorithm, the convergence factor and the contraction probability in the whale algorithm are adjusted, and in order to avoid trapping in local optimum, a chaotic variation mechanism is introduced;
in the original whale algorithm, the value of the convergence factor is linearly reduced along with the number of iterations, the algorithm is large in search capacity range in the early stage and strong in search capacity, and individuals gradually tend to the optimal solution in the later stage. Because the value of the convergence factor is linearly reduced, the problems of low convergence speed, small later searching range and insufficient searching precision may occur in the early stage of the algorithm. To address this problem, the convergence factor is changed to the following non-linear reduction equation:
Figure BDA0002828439570000111
wherein, a1And a0Representing the end value and the start value of a, l is a regulating parameter, t is the current iteration number, tmaxIs the maximum iteration number;
meanwhile, in the original whale algorithm, the set value of the contraction probability is 0.5, namely the probability value of the method for enclosing the prey is always equal to the probability of the method for driving the prey by using the bubble net. The algorithm has a problem of slow convergence rate because the two probabilities are always equal. As the number of iterations increases, the individual gradually approaches the optimal solution, the probability of enclosing the prey should be made gradually larger than the probability of using the bubble net to drive the prey, so the contraction probability is changed to the following linear reduction formula:
psurround the=0.5+t*u
pSteam bubble net=1-pSurround the
Wherein p isSurround theAnd pBubble netRespectively representing the probability value of a manner of surrounding a prey and the probability value of a manner of driving the prey by using a bubble net, mu is an adjusting parameter, and t is the current iteration number;
moreover, the original whale algorithm has the problem of easy trapping of local optimization, in order to avoid trapping of local optimization, a chaotic variation mechanism is introduced, cubic chaotic mapping is utilized, the value of a chaotic sequence generated by the cubic chaotic mapping is between (-1,1), and a chaotic phenomenon can be generated as long as an initial value is not 0, and the cubic chaotic mapping formula is as follows:
Figure BDA0002828439570000121
the position of whales was varied using the following formula:
Figure BDA0002828439570000122
wherein, ykRepresents a random number between (-1,1), k ∈ [1, n ]]N represents the total number of whales in the population,
Figure BDA0002828439570000123
showing the position of the ith whale before mutation in the t iteration,
Figure BDA0002828439570000124
representing the position of the ith whale after variation in the t iteration;
if the position fitness value of the generated new whale is better, the new whale is used for replacing the position of the original whale, otherwise, the position of the original whale is reserved, and therefore the diversity of the population is guaranteed. And comparing the fitness of each whale in the new population, finding the optimal whale position from the fitness, and updating the current optimal whale position, so that the optimal solution or the approximate optimal solution is quickly searched, and the algorithm can jump out of local optimality.
In summary, an improved whale algorithm is used to select a plurality of mobile nodes as cluster head nodes (fig. 2), and the specific steps are as follows:
s10, initializing whale population, whale position and iteration number, wherein in the initial population, the ith whale is represented as xi={zi1,zi2,...,zimIn which i ∈ [1, n ]]N represents the total number of whales in the population, namely the total number of the cluster head node selection schemes, each whale represents one cluster head node selection scheme, zijRepresenting the position, residual energy, distance from a base station and the information of the times of selecting as cluster head nodes contained in the jth cluster head node in the ith cluster head node selection scheme by using a vector, wherein m represents the total number of the cluster head nodes;
s11, calculating the fitness value of each whale in the population;
s12, carrying out whale population variation, and recording the optimal individual and the position of the optimal individual;
s13, judging whether the optimal iteration times are reached, if so, outputting an optimal solution, and obtaining an optimal cluster head node selection scheme; if not, go to step S14;
s14, updating the convergence factor and the contraction probability according to the current iteration times;
and S15, updating the position of the whale and returning to the step S11.
To better understand the above process, the present invention is illustrated as follows:
if the network includes 10 mobile nodes (the node numbers are 1-10 respectively), each node includes its coordinate position, remaining energy, distance (coordinate euclidean distance) from the base station, and the number of times when it is selected as a cluster head node;
assuming that an initial population contains 5 whales in the whale algorithm, and selecting 3 mobile nodes as cluster head nodes from the 10 mobile nodes;
the 1 st whale selects the nodes 1,2 and 3 as cluster head nodes, then x1={z11,z12,z13In which z is11Information indicating the position, remaining energy, distance from the base station, and number of times of selection as a cluster head node, z12Information indicating the position, remaining energy, distance from the base station and the number of times of selection as a cluster head node, z, which the node 2 contains13Information indicating the position, residual energy, distance from the base station and the number of times of selecting as a cluster head node included in the node 3;
the 2 nd whale selects the nodes 1,2 and 4 as cluster head nodes, then x2={z21,z22,z23In which z is21Information indicating the position, remaining energy, distance from the base station, and number of times of selection as a cluster head node, z22Information indicating the position, remaining energy, distance from the base station, and number of times of selection as a cluster head node included in the node 2, z23Information indicating the position, remaining energy, distance from the base station, and the number of times of selection as a cluster head node included in the node 4;
here, taking whale 1 as an example, the calculation of each objective function is performed:
for the objective function f1The nodes 1,2 and 3 are used as cluster head nodes, other nodes are added into the cluster according to the shortest distance principle, if the nodes 4,5 and 6 are all added into the cluster z11And nodes 7 and 8 both add z12Nodes 9,10 both join z13(ii) a At this time, the distances from the nodes 4 to 10 to the cluster head nodes in the respective clusters are calculated respectively, and the average value is obtained after all the distances are summed, namely the target function f1A value of (d);
for the objective function f2Respectively calculating the distances from the nodes 1,2 and 3 to the base station, summing all the distances and then averaging to obtain an objective function f2A value of (d);
for the objective function f3Summing the residual energies of the nodes 1,2 and 3 and taking the reciprocal value, namely the objective function f3A value of (d);
for the objective function f4Summing the times of the nodes 1,2 and 3 respectively selecting cluster head nodes to obtain an objective function f4The value of (c).
Calculating the fitness function value of the 1 st whale: ζ f is fixed in the fixed position1+ωf2+χf3+γf4
And after calculating the fitness value of each whale, selecting the whale with the minimum fitness value as an optimal solution, finishing the selection of cluster head nodes, adding the rest nodes into the clusters respectively according to the shortest distance principle, and then carrying out data transmission.
In order to verify the effectiveness of the scheme provided by the invention, the performance of the scheme provided by the invention is evaluated through computer simulation, 100 mobile nodes are randomly distributed in a square area of 100m × 100m, and a simulation platform is set up according to the parameters of the following table. The simulation experiment is realized by Matlab, and the superior type of the algorithm is verified by comparing with other routing algorithms. Wherein each algorithm runs 10 times, the average value of the result data is selected for drawing the result, and the preset parameters are as follows:
parameter(s) Value taking
Base station location (50m,50m)
Initial energy of mobile node 0.5J
Packet size 4000bit
Controlling packet size 32bit
εfs 10pJ/(bit·m2)
εamp 0.0013pJ/(bit·m2)
Eelec 50nJ/bit
EDA 5nJ/bit
ζ 0.1
ω 0.45
χ 0.2
γ 0.25
t max 30
Wherein E iselecDissipated energy per bit data received or transmitted for the radio model, d0Is a threshold distance, εfsSignal amplification power, epsilon, for free space channel modelsampAmplifying the power of the signal for a multipath channel fading model, EDAFusing energy consumption, namely fusing energy consumption of common node data by the cluster head node, wherein zeta is an objective function f1ω is the objective function f2Is the weight value of χ which is the objective function f3Gamma is the objective function f4Weight of tmaxIs the maximum number of iterations.
Referring to fig. 3 and 4, fig. 3 is a comparison graph of positions of a mobile node before and after moving once in a network (in fig. 3, (a) shows the position of the mobile node before moving in the network, (b) shows the position of the mobile node after moving once in the network), and fig. 4 is a graph of positions of a single mobile node after moving 10 times, so that it can be known that the established movement model can make the node move randomly in a monitored area and the distribution after moving is relatively uniform;
referring to fig. 5 and 6, fig. 5 is a graph comparing the clustering method based on the modified whale algorithm (WOAC) with the clustering method based on the LEACH protocol and the LEACHN protocol in terms of the number of surviving nodes, fig. 6 is a comparison graph of the clustering method (WOAC) based on the improved whale algorithm and the clustering method based on the LEACH protocol and the LEACHN protocol on the network residual energy (in fig. 5 and 6, the abscissa is the number of rounds, one round is a data transmission process, including a process in which all non-cluster head nodes send information to corresponding cluster head-to-cluster head fusion data and then send the information to the base station), before 720 rounds, the number of WOAC surviving nodes was significantly higher than LEACH and LEACHN, and the first node of WOAC dies later, the first node of LEACH dies in the 110 th round, the first node of LEACHN dies in the 220 th round, and the first node of WOAC dies in the 380 th round; WOAC's network lifetime is longer than LEACH and LEACHN protocols; as can be seen in fig. 6, the remaining energy of WOAC is higher than LEACH and LEACHN throughout the round.
The invention has the beneficial effects that: the invention provides a mobile node model of a wireless sensor network, wherein nodes in the wireless sensor network have mobility, and the cluster head election algorithm is simple and easy to implement, so that the situation that part of the nodes die quickly is not easy to occur when the cluster head election algorithm is used in the mobile node model, and the service life of the whole network is prolonged. The concrete embodiment is as follows:
1. a mobile node model of a wireless sensor network is established, and nodes have mobile types and are suitable for network structures moving in the future;
2. the improved whale algorithm is simple and easy to implement, has good convergence and precision, and avoids falling into local optimum;
3. the cluster head election based on the improved whale algorithm is reasonable, the situation that part of nodes die quickly is not easy to occur, and the overall service life of the network is prolonged.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (4)

1. A wireless sensor network mobile node clustering method based on an improved whale algorithm comprises the following steps: the method comprises the following steps of constructing a mobile node model of the wireless sensor network, selecting cluster head nodes, clustering non-cluster head nodes and transmitting data, and is characterized in that: the clustering method of the mobile nodes of the wireless sensor network specifically comprises the following steps:
s1, initializing the wireless sensor network, constructing a mobile node model of the wireless sensor network based on the wireless communication energy consumption model and the random direction and distance movement model, and initializing the mobile node model;
s2, based on the mobile node model in the step S1, the base station updates the residual energy, the position and the time information of the selected cluster head node of all the mobile nodes in the wireless sensor network;
s3, selecting a plurality of mobile nodes as cluster head nodes respectively by utilizing an improved whale algorithm based on the residual energy and the position of the mobile nodes in the step S2 and the information of the times of selecting the mobile nodes as the cluster head nodes;
basis for selecting a cluster head set: the method comprises the following steps of (1) intra-cluster communication cost, the distance between a cluster head node and a base station, the residual energy of the cluster head node and the times of selecting the cluster head node, wherein the cluster head set is a set formed by a plurality of cluster head nodes selected by using an improved whale algorithm;
in the improved whale algorithm, the method comprises the following steps:
(1) establishing an objective optimization function:
communication cost in a cluster:
Figure FDA0003562526050000011
wherein f is1Represents the sum of the average communication distances of all cluster head nodes in the cluster head set, CHjRepresents the jth cluster head node, j belongs to [1,2]M denotes the total number of cluster head nodes, njIs a cluster head node CHjNumber of neighbor nodes of d (k, CH)j) For any neighbor node k and cluster head node CHjIf a certain mobile node is located in cluster head node CHjIn the cluster, the mobile node is called the cluster head node CHjThe neighbor node of (2);
the distance between the cluster head node and the base station is as follows:
Figure FDA0003562526050000012
wherein, f2Represents the average value of the distances between all cluster head nodes and the base station in the cluster head set, BS represents the base station, and d (CH)jBS) represents the distance between the jth cluster head node and the base station;
③ the residual energy of the cluster head nodes:
Figure FDA0003562526050000021
wherein f is3A reciprocal value, E (CH), representing the sum of the remaining energies of all cluster head nodes in the set of cluster headsj) The residual energy of the jth cluster head node;
fourthly, selecting the cluster head nodes:
Figure FDA0003562526050000022
wherein f is4Indicating the sum of the times of all cluster head nodes selecting cluster head nodes in the cluster head set,
Figure FDA0003562526050000023
the number of times of electing cluster head nodes for the jth cluster head node;
(2) establishing a fitness function:
fitness=ζf1+ωf2+χf3+γf4
wherein ζ, ω, χ and γ are f, respectively1、f2、f3And f4The weight value of ζ + ω + χ + γ is 1, and the cluster head nodes are selected to be a plurality of corresponding mobile nodes when the fitness function fitness reaches the minimum value;
(3) adjusting a convergence factor a:
Figure FDA0003562526050000024
wherein, a1And a0Representing the ending value and the starting value of a, l is an adjusting parameter, t is the current iteration number, tmaxIs the maximum iteration number;
(4) adjusting the contraction probability:
psurround the=0.5+t*u
pVapour bubble net=1-pSurround the
Wherein p isSurround theAnd pBubble netRespectively representing the probability value of a hunting mode and the probability value of a hunting mode by using a bubble net, mu is an adjusting parameter, and t is the current iteration times;
(5) in the original whale algorithm, chaos variation is introduced, cubic chaos mapping is adopted, and the formula is as follows:
Figure FDA0003562526050000031
the position of the whale was mutated using the following formula:
Figure FDA0003562526050000032
wherein, ykRepresents a random number between (-1,1), k ∈ [1, n ]]N represents the total number of whales in the population,
Figure FDA0003562526050000033
showing the position of the ith whale before mutation in the t iteration,
Figure FDA0003562526050000034
representing the position of the ith whale after variation in the tth iteration;
s4, broadcasting by each cluster head node in the step S3, and adding each non-cluster head node into a cluster by selecting the cluster head node closest to the node until all non-cluster head nodes are added into the cluster, wherein at the moment, a plurality of clusters exist in the wireless sensor network; the cluster comprises a cluster head node and a plurality of non-cluster head nodes, and the cluster head node and the non-cluster head node of each cluster are different;
and S5, performing data transmission, and returning to the step S2 until all the mobile nodes in the wireless sensor network die when the residual energy of any cluster head node in the wireless sensor network is smaller than a preset energy threshold and at least one mobile node is alive.
2. The wireless sensor network mobile node clustering method based on the improved whale algorithm as claimed in claim 1, wherein:
the wireless sensor network comprises a plurality of mobile nodes and a base station, the mobile nodes are randomly deployed in a monitoring area, the base station is fixedly deployed at a certain position of the monitoring area, the initial energy of all the mobile nodes is the same and limited, the energy of the base station is not limited and is kept static, the mobile nodes move periodically, and in the moving process of the mobile nodes, the energy is not consumed, and the selection of cluster head nodes, the clustering of non-cluster head nodes and the data transmission process are not carried out;
the mobile nodes all move according to the random direction and distance moving model, wherein the random direction and distance moving model specifically comprises the following steps:
each mobile node randomly selects a position in the monitoring area as the starting point of the mobile node, and the mobile node moves along the moving direction alphahMoved by a certain distance dhThe position reached at this time is the terminal point of the mobile node, and the process is one-time complete movement of the mobile node;
the mobile node moves in the monitoring area according to the following formula:
Figure FDA0003562526050000035
Figure FDA0003562526050000041
wherein the content of the first and second substances,
Figure FDA0003562526050000042
indicating the corresponding abscissa at the end point of the h-th mobile node,
Figure FDA0003562526050000043
indicating the corresponding ordinate at the end point of the h-th mobile node,
Figure FDA0003562526050000044
indicating the corresponding abscissa at the start of the h-th mobile node,
Figure FDA0003562526050000045
denotes the corresponding ordinate at the origin of the H-th mobile node, H ∈ [1, H]H denotes the total number of mobile nodes, alphahIndicates the moving direction of the h-th mobile node, αhE (0,2 π), and αhIn the range of (0,2 π) are taken uniformly, dhIndicates the moving distance of the h mobile node, dh∈(dmin,dmax) And d ishIn (d)min,dmax) In the range of average distribution, dminAnd dmaxRespectively representing the minimum distance and the maximum distance of the mobile node moving once in the monitoring area;
the starting point of the next movement of the mobile node is the end point of the last complete movement of the mobile node; if the mobile node reaches a boundary of a certain side of the monitoring area in the last complete movement, the moving direction of the mobile node is not randomly selected any more in the next movement process, but is set to move towards the boundary of the certain side of the monitoring area.
3. The wireless sensor network mobile node clustering method based on the improved whale algorithm as claimed in claim 1, wherein:
the method comprises the following steps of selecting a plurality of mobile nodes as cluster head nodes by utilizing an improved whale algorithm, and specifically comprising the following steps:
s10, initializing whale population, whale position and iteration number, wherein in the initial population, the ith whale is represented as xi={zi1,zi2,...,zimIn which i ∈ [1, n ]]N represents the total number of whales in the population, namely the total number of the cluster head node selection schemes, and each stripWhales represent a cluster head node selection scheme, zijRepresenting information contained in the jth cluster head node in the ith cluster head node selection scheme by using a vector, wherein m represents the total number of the cluster head nodes;
s11, calculating the fitness value of each whale in the population;
s12, carrying out whale population variation, and recording the optimal individual and the position of the optimal individual;
s13, judging whether the optimal iteration times are reached, if so, outputting an optimal solution to obtain an optimal cluster head node selection scheme; if not, go to step S14;
s14, updating the convergence factor and the contraction probability according to the current iteration times;
and S15, updating the position of the whale and returning to the step S11.
4. The wireless sensor network mobile node clustering method based on the improved whale algorithm as claimed in claim 1, wherein: in step S10, the information includes the position of the cluster head node, the remaining energy of the cluster head node, the distance between the cluster head and the base station, and the number of times of selecting the cluster head node.
CN202011435340.9A 2020-12-10 2020-12-10 Wireless sensor network mobile node clustering method based on improved whale algorithm Active CN112672396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011435340.9A CN112672396B (en) 2020-12-10 2020-12-10 Wireless sensor network mobile node clustering method based on improved whale algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011435340.9A CN112672396B (en) 2020-12-10 2020-12-10 Wireless sensor network mobile node clustering method based on improved whale algorithm

Publications (2)

Publication Number Publication Date
CN112672396A CN112672396A (en) 2021-04-16
CN112672396B true CN112672396B (en) 2022-06-14

Family

ID=75401788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011435340.9A Active CN112672396B (en) 2020-12-10 2020-12-10 Wireless sensor network mobile node clustering method based on improved whale algorithm

Country Status (1)

Country Link
CN (1) CN112672396B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113364316B (en) * 2021-05-08 2022-06-14 南昌大学 Single-phase grid-connected inverter control parameter setting method based on whale optimization algorithm
CN113569354A (en) * 2021-07-26 2021-10-29 中国科学院工程热物理研究所 Automatic optimization method for mechanical blade of impeller

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108112049A (en) * 2017-12-15 2018-06-01 华中科技大学 A kind of wireless sensor network efficiency optimization cluster-dividing method based on gam algorithm

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101426293A (en) * 2008-12-15 2009-05-06 北京航空航天大学 Partial on demand cluster head replacement method for wireless sensor network clustered routing
CN103781143A (en) * 2014-02-25 2014-05-07 东南大学 Cluster tree hierarchical wireless sensor network routing method with optimized energy efficiency
US10992752B2 (en) * 2019-03-28 2021-04-27 Intel Corporation Sensor network configuration mechanisms

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108112049A (en) * 2017-12-15 2018-06-01 华中科技大学 A kind of wireless sensor network efficiency optimization cluster-dividing method based on gam algorithm

Also Published As

Publication number Publication date
CN112672396A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
Karim et al. QL-EEBDG: QLearning based energy balanced routing in underwater sensor networks
Sun et al. An improved routing algorithm based on ant colony optimization in wireless sensor networks
CN112672396B (en) Wireless sensor network mobile node clustering method based on improved whale algorithm
CN109673034B (en) Wireless sensor network clustering routing method based on longicorn stigma search
Murugan et al. Optimal cluster head selection by hybridisation of firefly and grey wolf optimisation
CN110225569B (en) WSNs clustering multi-hop routing protocol method based on improved particle swarm optimization
CN113141592B (en) Long-life-cycle underwater acoustic sensor network self-adaptive multi-path routing method
Lalwani et al. FARW: firefly algorithm for routing in wireless sensor networks
US20220369200A1 (en) Clustering and routing method and system for wireless sensor networks
CN111526555B (en) Multi-hop routing path selection method based on genetic algorithm
CN111970742A (en) WSN multi-hop LEACH routing protocol based on improved chaotic genetic algorithm
Nguyen et al. Unequal Clustering Formation Based on Bat Algorithm forWireless Sensor Networks
CN108684065A (en) Relay selection method based on ant group optimization in a kind of car networking
Shokouhifar et al. An energy efficient routing protocol in wireless sensor networks using genetic algorithm
CN112822747B (en) Routing strategy method based on genetic algorithm and ant colony algorithm
Ziyadi et al. Adaptive clustering for energy efficient wireless sensor networks based on ant colony optimization
Hammodi et al. Optimal placement of single cluster head in wireless sensor networks via clustering
Abro et al. Minimizing energy expenditures using genetic algorithm for scalability and longlivety of multi hop sensor networks
Latiff et al. Hybrid backtracking search optimization algorithm and k-means for clustering in wireless sensor networks
Yang et al. A path planning method for mobile sink in farmland wireless sensor network
Li et al. Mobility-assisted distributed sensor clustering for energy-efficient wireless sensor networks
Treplan et al. Energy efficient reliable cooperative multipath routing in wireless sensor networks
CN113965943B (en) Method for optimizing AODV route based on bidirectional Q-Learning
CN111160513B (en) Energy optimization method for electric power distribution network
Asha A hybrid approach for cost effective routing for WSNs using PSO and GSO algorithms

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant