A node positioning method based on distance vector
Based on the node positioning method based on distance vectors, combined with differential evolution-taboo search hybrid algorithms, the problem of insufficient positioning in the wireless sensor network has been solved, and the more efficient and accurate positioning effect is achieved.
Patent Information
- Application Number
- CN202210638165.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing sensor positioning technology has problems such as poor real-time performance and inaccurate positioning. Especially in wireless sensor networks, it is difficult to effectively reduce the energy consumption and positioning errors of signal transmission and reception between nodes.
A node positioning method based on distance vector is proposed. By setting initialization parameters and thresholds, the minimum hop number and average hop distance errors are corrected, and the differential evolution-tabu search hybrid algorithm is used to calculate the position coordinates of unknown nodes to improve positioning accuracy.
The selection strategy of the anchor node was improved, the minimum jump and the average jumping error was fixed, the positioning accuracy was improved, the energy consumption of the receiving signal between the nodes was reduced, and the real -time and accuracy of the positioning was enhanced.
Smart Images

Figure CN115103296B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a node positioning method, and in particular to a node positioning method based on a distance vector. Background Art
[0002] The continuous development of semiconductor technology, communication technology, modern network and sensor technology has promoted the emergence and research of Wireless Sensor Network (WSN). The rise of Internet of Things (IoT) has further attracted widespread attention to WSN.
[0003] In order to obtain the location information of sensor nodes in WSN, GPS technology or some positioning algorithms are needed. GPS technology has accurate positioning capabilities, but it also has the following two shortcomings: (1) GPS receivers usually have high energy consumption, and for nodes in wireless sensor networks, energy consumption is generally limited. Equipping each node with a GPS receiver will greatly shorten the network life; (2) GPS receivers are relatively expensive. Equipping each node in a wireless sensor network with a GPS receiver requires a lot of investment, especially for large-scale wireless sensor networks. Therefore, compared with GPS technology, positioning algorithms have many advantages such as low cost, low power consumption, simple networking and strong adaptability.
[0004] Based on the above analysis, it can be known that wireless sensor networks have played an important role in various industries, and wireless sensor node positioning technology is an integral part of WSN. Positioning requirements are increasingly penetrating into various fields. Whether it is the transmission of natural environment data in the monitoring area or the transmission of target tracking data, the node location information must be transmitted first. The relevant data without location information is worthless. With the relevant location information, users can take appropriate measures for the corresponding areas and implement reasonable solutions. At the same time, considering that GPS technology cannot be widely used in WSN, a simple and effective sensor positioning technology is needed. In order to achieve real-time and accurate positioning requirements, the present invention relates to an improved positioning algorithm that can be applied to the actual environment.
[0005] The positioning accuracy based on the currently improved DV-Hop algorithm has been improved to a certain extent, but most of them are improved by correcting the average hop distance, the minimum number of hops, the estimated position of unknown nodes, or introducing RSSI technology for ranging, etc. The main energy consumption of nodes occurs in the transmission and reception of signals and causes energy consumption, so this application makes technical improvements from the perspective of minimizing the transmission and reception of signals between nodes, and using error correction and intelligent optimization algorithms to reduce errors. Summary of the invention
[0006] The purpose of the present invention is to solve the problems of poor real-time performance and inaccurate positioning in the existing sensor positioning technology, and to propose a node positioning method based on distance vector.
[0007] A node positioning method based on distance vector is implemented by the following steps:
[0008] Step 1: Set initialization parameters and thresholds;
[0009] Step 2: Set the anchor node to broadcast a Hello data packet, which includes the anchor node ID, anchor node name, real coordinates and the minimum hop count initialized to 0, and select the anchor node set;
[0010] Step 3: Correct the minimum hop count and average hop distance errors, and use the corrected hop value to obtain the minimum hop value and the corrected average hop distance between nodes;
[0011] Step 4: Use the differential evolution-tabu search hybrid algorithm to calculate the position coordinates of the unknown nodes; that is:
[0012] (1) Set the population size, which is equal to the number of unknown nodes; and set the initial position of each population; the initial position refers to the unknown node corresponding to each population and the position of the anchor node closest to the unknown node; calculate the population fitness value and adaptive scaling factor;
[0013] (2) According to the fitness of individuals in the group, the roulette wheel method is used to select the winning individuals in the group;
[0014] (3) Perform mutation operations;
[0015] (4) Performing a crossover operation on the generated mutation vector and individuals in the population through a binomial crossover model to generate an experimental vector;
[0016] (5) Introducing the taboo algorithm into the new offspring generated after crossover, entering the individual fitness value into the taboo table, setting the taboo length and comparing the individual fitness and population fitness values;
[0017] (6) Calculate the value of the fitness function and perform the selection operation;
[0018] (7) Determine whether to continue the loop. If the set number of iterations is met, exit; otherwise, continue the loop until the algorithm terminates.
[0019] (8) Finally, the optimal value is output.
[0020] Preferably, the step of selecting a suitable anchor node set is specifically:
[0021] Similarity is used to indicate the correlation between two nodes. According to the principle that the greater the minimum hop count between two nodes, the smaller the similarity, the following formula (3.1) is obtained:
[0022]
[0023] F sim The function value is the similarity value between nodes i and j. The function is defined as follows: the similarity between two nodes i and j is the minimum number of hops between them ij Negative correlation; n is the similarity attenuation coefficient and is related to the topological structure of the wireless sensor network and the surrounding environment; based on the similarity principle, the similarity value of each node with itself is defined as 100%, and the similarity value of the two farthest anchor nodes is defined as 0;
[0024] Therefore, we can get formula (3.2):
[0025]
[0026] f sim (0) = 100%, F sim (hops max )=0 (3.2)
[0027] Among them, hops max is the maximum number of hops of the anchor node; the parameters α and β are calculated by the similarity condition, and formula (3.3) is obtained:
[0028]
[0029] Introducing the delay coefficient k, according to the existing experimental data, the value range of the delay coefficient k can be obtained as follows:
[0030] hops max ≤k≤2hops max (3.4)
[0031] When n=1, the following formula (3.5) can be obtained:
[0032]
[0033] In order to select a set of anchor nodes whose similarity values with unknown nodes are close to the predicted degree, a threshold T is set:
[0034]
[0035] For different wireless sensor network topology environments, when k = 2 × hops max When , the hop count threshold for selecting and modifying anchor nodes is calculated under different similarity thresholds and the maximum hop count of anchor nodes in the network;
[0036] After the wireless sensor network is initialized, the received anchor node information recorded in the information list of all unknown nodes is stored in ascending order according to the minimum hop count. T When, find the minimum number of hops to the unknown node is less than hops T The anchor nodes of compose the anchor node set, which is used for the next step of position correction calculation.
[0037] Preferably, the step of correcting the minimum number of hops and the average hop distance error is specifically:
[0038] In order to solve the positioning error caused by the number of hops, the relative optimal number of hops is used to restrict the single-hop neighbor nodes within the communication range, as shown in the following formula (3.7):
[0039]
[0040] Among them, H i,j represents the relative optimal hop count, d i,j represents the actual distance between anchor nodes i and j, and R represents the communication radius;
[0041] Compare the minimum number of hops h between anchor nodes i and j i,j and the relative optimal hop count H i,j The difference between i,j , as shown in formula (3.8):
[0042]
[0043] Among them, the deviation coefficient μ i,j It reflects the difference between the minimum number of hops between anchor nodes and the relative optimal number of hops. The hop adjustment factor ε is used i,j To optimize the hop count information to reduce the cumulative error;
[0044]
[0045] Thus, the corrected hop count between anchor nodes is obtained The following formula:
[0046]
[0047] In order to solve the error caused by the average hop distance, we first use formula (3.11) to calculate the average hop distance of the anchor node:
[0048]
[0049] Among them, (x i ,y i ), (x j,y j ), h ij Respectively represent the positions of anchor nodes i and j and the minimum number of hops between them, and estimate the distance to each anchor node through HS×hop unknown nodes;
[0050] The actual distance between an anchor node and other anchor nodes is calculated by formula (3.12):
[0051]
[0052] The estimated distance between anchor nodes is calculated by formula (3.13):
[0053] d eij =HS i ×hop ij (3.13)
[0054] Among them, HS i is the average hop distance of anchor node i, hop ij is the minimum number of hops between anchor nodes i and j;
[0055] Calculate the average per-hop distance error of the anchor node:
[0056]
[0057] The normalized weighting factor of the anchor node is calculated by formula (3.15):
[0058]
[0059] Among them, h i is the number of hops between anchor node i and unknown node, h y is the number of hops between all anchor nodes and unknown nodes; in wireless sensor networks, according to formula (3.15), h i The larger the W i The smaller it is, the average hop distance is corrected by normalizing the weighting factor to obtain the following formula:
[0060]
[0061] Preferably, the process of calculating the position coordinates of unknown nodes using the differential evolution-tabu search hybrid algorithm is specifically as follows:
[0062] Differential evolution algorithm, full name Differential Evolution, referred to as DE, is mainly divided into the following steps:
[0063] 1) Initialize the population;
[0064] Determine the population size NP, the i-th individual X in the population i(i=1, 2, 3, 4, ..., NP) is a D-dimensional vector, represented by X t Represents the population at the tth generation of evolution, and the initial population can be expressed as formula (3.17):
[0065]
[0066] 2) Variation;
[0067] In the differential evolution algorithm, individual mutation is implemented through the differential strategy; three different vectors randomly selected from the t-th generation population are denoted as Where r1, r2, i∈NP, formula (3.19) shows how the target vector forms the mutation vector
[0068]
[0069]
[0070] Among them, formula (3.18) is the difference vector, F is the scaling factor of the algorithm, which is generally between [0, 1] to control the amplification effect of the difference vector;
[0071] 3) Crossover;
[0072] In order to improve the diversity of the population and generate new crossover individuals, the generated variant individuals should be cross-operated with the individuals of the original population; taking the commonly used binomial crossover model as an example, the operation is as follows (3.20):
[0073]
[0074] in, is the experimental vector The jth gene fragment of is the mutation vector The j-th gene fragment, randb is a random number between [0, 1]; CR is the crossover operator, which controls the binomial crossover process, and the range is usually between [0, 1]. The larger the CR value, the greater the possibility of crossover. rand is a randomly generated number in [1, D], which can ensure The jth rand The bit is from This ensures that the experimental vector is different from the target vector and the mutation vector is different, thus avoiding invalid hybridization;
[0075] 4) Selection;
[0076] The differential evolution algorithm adopts a greedy mode, and selects the optimal target vector or experimental vector through the fitness function f(x) as the individual entering the next generation population to ensure that the population evolves towards the optimal solution; the process is shown in the following formula:
[0077]
[0078] After completing this step, the differential evolution operation continues to be repeated until the number of iterations or the fitness function requirements are met, and the algorithm terminates;
[0079] The individuals in the population correspond to the unknown nodes, and all elements are divided into two categories, forbidden elements and free elements; there are many ways to select the taboo length t, t = constant, or Where n is the number of neighbors in the neighborhood; the steps of the taboo algorithm are as follows:
[0080] 1) Select an initial point x and set:
[0081] x * =x, T = empty set (3.22)
[0082] 2) Set the loop exit; if S(x)-T = empty set, stop, otherwise, set k = k+1; S(x)-T = empty, indicating abnormal termination, the cause is: small neighborhood, long T table; the normal setting is that T table length < neighborhood size;
[0083] 3) Neighborhood movement: Each step moves to the optimal solution in the neighborhood that is not in the T table, that is, if:
[0084] C(s k (x))=Opt{C(s(x))|s(x)∈S(x)-T} (3.23)
[0085] Then let:
[0086] x=s k (x) (3.24)
[0087] Update C(x), where C(x) is the optimal objective function value in the current neighborhood;
[0088] 4) Check for violations; if:
[0089] C(s L (x))<A(s,x),s L (x)∈T (3.25)
[0090] and:
[0091] C(S L (x))<C(x) (3.26)
[0092] Then S(x) is not restricted by the T table; even if s(x)∈T, the value is still:
[0093] x=S L (x) (3.27)
[0094] A(s,x) is the desired level function, which is generally the best target value ever achieved in history and depends on the values of s and x;
[0095] 5) Merit selection rules;
[0096] 6) Select and record the historical optimal value and update the desired level; if:
[0097] C(x)<C(x * ) (3.28)
[0098] Then let:
[0099] x * =x,C(x * )=C(x),A(s,x)=C(x * ) (3.29).
[0100] The beneficial effects of the present invention are:
[0101] The present invention belongs to the node positioning technology in wireless sensor networks, and the method adopted is the DV-Hop algorithm in the non-distance measurement method. Specifically:
[0102] 1. When the proportion of anchor nodes reaches a certain threshold, the positioning accuracy of the DV-Hop algorithm will tend to saturate, that is, although the proportion of anchor nodes continues to increase, the positioning accuracy will not be significantly improved. This invention improves the anchor node selection strategy and selects an appropriate number of anchor nodes for positioning. It is expected to improve the positioning accuracy of the algorithm.
[0103] 2. Improved and optimized the minimum hop count and average hop distance in the DV-Hop algorithm, and corrected the minimum hop count error and average hop distance error in the algorithm. i,j The coefficient of variation, and ε i,j Hop adjustment factor to obtain the corrected hop count between anchor nodes In order to solve the problem of average jump distance, de i,j The estimated distance between anchor nodes and w i The anchor node normalized weighting factor is used to obtain the corrected average hop distance. Can improve positioning accuracy.
[0104] 3. The differential evolution-tabu search hybrid algorithm is used to replace the maximum likelihood estimation method to calculate the node position. The differential evolution algorithm has the advantages of stable operation and fast convergence speed. Compared with the genetic algorithm and particle swarm algorithm, it converges faster and the results are very accurate. At the same time, since the genetic algorithm was invented earlier, its application field is relatively wide. Since the invention of the particle swarm algorithm, it has become a hot research issue and has many applications in this area. The differential evolution algorithm has only attracted people's attention in recent years and has good algorithm performance, so its application field will increase. However, if the parameters of the differential evolution algorithm are not set properly, it will cause premature convergence problems; the taboo search algorithm is a search method used to escape the local optimum, so the problem of calculating the unknown node position can be converted into the problem of calculating the optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0105] Figure 1 is a flow chart of the method of the present invention;
[0106] Figure 2 A schematic diagram of calculating the position coordinates of unknown nodes using a differential evolution-tabu search hybrid algorithm according to the present invention;
[0107] Figure 3 The present invention relates to constructing a mutation vector in a two-dimensional parameter space Schematic diagram. DETAILED DESCRIPTION Specific implementation method one:
[0109] A node positioning method based on distance vector in this implementation is as follows: Figure 1 As shown, the method is implemented by the following steps:
[0110] Step 1: Set initialization parameters and thresholds;
[0111] Step 2: Set the anchor node to broadcast a Hello data packet, which includes the anchor node ID, anchor node name, real coordinates and the minimum hop count initialized to 0, and select the anchor node set;
[0112] Step 3: Correct the minimum hop count and average hop distance errors, and use the corrected hop value to obtain the minimum hop value and the corrected average hop distance between nodes;
[0113] Step 4: Use the differential evolution-tabu search hybrid algorithm instead of the maximum likelihood estimation method to calculate the position coordinates of the unknown nodes; Figure 2 As shown, that is:
[0114] (1) Set the population size, which is equal to the number of unknown nodes; and set the initial position of each population; the initial position refers to the unknown node corresponding to each population and the position of the anchor node closest to the unknown node; calculate the population fitness value and adaptive scaling factor;
[0115] (2) According to the fitness of individuals in the group, the roulette wheel method is used to select the winning individuals in the group;
[0116] (3) Perform mutation operations;
[0117] (4) Performing a crossover operation on the generated mutation vector and individuals in the population through a binomial crossover model to generate an experimental vector;
[0118] (5) Introducing the taboo algorithm into the new offspring generated after crossover, entering the individual fitness value into the taboo table, setting the taboo length and comparing the individual fitness and population fitness values;
[0119] (6) Calculate the value of the fitness function and perform the selection operation;
[0120] (7) Determine whether to continue the loop. If the set number of iterations is met, exit; otherwise, continue the loop until the algorithm terminates.
[0121] (8) Finally, the optimal value is output. Specific implementation method 2:
[0123] Different from the first specific implementation mode, in the node positioning method based on distance vector in this implementation mode, the step of selecting a suitable anchor node set is specifically:
[0124] In the vast wireless network topology, two nodes with close actual distance or hop distance have similar positioning parameters and positioning errors. When facing similar external network topology, they have position correlation and positioning error similarity. Therefore, the similarity of the network topology between nodes can be used to correct the initial positioning results.
[0125] Similarity is used to indicate the correlation between two nodes. Based on the previous analysis, it can be concluded that the greater the minimum hop count between two nodes, the smaller the similarity, otherwise the greater the similarity. Therefore, the following formula (3.1) is obtained:
[0126]
[0127] F sim The function value is the similarity value between nodes i and j. The function is defined as follows: the similarity between two nodes i and j is the minimum number of hops between them ij Negative correlation; n is the similarity attenuation coefficient and is related to the topological structure of the wireless sensor network and the surrounding environment; based on the similarity principle, the similarity value of each node with itself is defined as 100%, and the similarity value of the two farthest anchor nodes is defined as 0;
[0128] Therefore, we can get formula (3.2):
[0129]
[0130] f sim (0) = 100%, F sim (hops max )=0 (3.2)
[0131] Among them, hops max is the maximum number of hops of the anchor node; the parameters α and β are calculated by the similarity condition, and formula (3.3) is obtained:
[0132]
[0133] Introducing the delay coefficient k, according to the existing experimental data, the value range of the delay coefficient k can be obtained as follows:
[0134] hops max ≤k≤2hops max (3.4)
[0135] When n=1, the following formula (3.5) can be obtained:
[0136]
[0137] In order to select a set of anchor nodes whose similarity values with unknown nodes are close to the predicted degree, a threshold T is set:
[0138]
[0139] According to the above derivation process and calculation formula, the present invention is aimed at different wireless sensor network topology environments, when k=2×hops max When the similarity threshold is set to different values and the maximum number of hops of anchor nodes in the network, the hop threshold for selecting and correcting anchor nodes is calculated, which provides an analytical basis for correcting the minimum hop error and average hop error of DV-Hop in the next step.
[0140] After the wireless sensor network is initialized, the received anchor node information recorded in the information list of all unknown nodes (ANIL) is stored in ascending order according to the minimum hop count. T When, find the minimum number of hops to the unknown node is less than hops T The anchor nodes of compose the anchor node set, which is used for the next step of position correction calculation. Specific implementation method three:
[0142] Different from the second specific implementation mode, in the node positioning method based on distance vector in this implementation mode, the steps of correcting the minimum number of hops and the average hop distance error are specifically as follows:
[0143] In order to solve the positioning error caused by the number of hops, the relative optimal number of hops is used to restrict the single-hop neighbor nodes within the communication range, as shown in the following formula (3.7):
[0144]
[0145] Among them, H i,j represents the relative optimal hop count, d i,j represents the actual distance between anchor nodes i and j, and R represents the communication radius;
[0146] Compare the minimum number of hops h between anchor nodes i and j i,j and the relative optimal hop count H i,j The difference between i,j , as shown in formula (3.8):
[0147]
[0148] Among them, the deviation coefficient μ i,j reflects the difference between the minimum number of hops between anchor nodes and the relative optimal number of hops, μ i,j The larger the value, the greater the difference between the two. When the communication radius is not large, the minimum hop number is generally not less than the relatively optimal hop number. Therefore, the hop number adjustment factor ε is used to adjust the communication radius. i,j To optimize the hop count information to reduce the cumulative error;
[0149]
[0150] Thus, the corrected hop count between anchor nodes is obtained The following formula:
[0151]
[0152] In order to solve the error caused by the average hop distance, we first use formula (3.11) to calculate the average hop distance of the anchor node:
[0153]
[0154] Among them, (x i ,y i ), (x j ,y j ), h ij Respectively represent the positions of anchor nodes i and j and the minimum number of hops between them, and estimate the distance to each anchor node through HS×hop unknown nodes;
[0155] The actual distance between an anchor node and other anchor nodes is calculated by formula (3.12):
[0156]
[0157] The estimated distance between anchor nodes is calculated by formula (3.13):
[0158] d eij =HS i ×hop ij (3.13)
[0159] Among them, HS i is the average hop distance of anchor node i, hop ij is the minimum number of hops between anchor nodes i and j;
[0160] Calculate the average per-hop distance error of the anchor node:
[0161]
[0162] The normalized weighting factor of the anchor node is calculated by formula (3.15):
[0163]
[0164] Among them, h i is the number of hops between anchor node i and unknown node, h y is the number of hops between all anchor nodes and unknown nodes; in wireless sensor networks, the larger the number of hops between nodes, the larger the error in the estimated distance between nodes, and its influence in positioning should be reduced. According to formula (3.15), h i The larger the W i The smaller it is, the average hop distance is corrected by normalizing the weighting factor to obtain the following formula:
[0165] Specific implementation method four:
[0167] Different from the third specific implementation mode, the node positioning method based on the distance vector in this implementation mode uses the differential evolution-tabu search hybrid algorithm instead of the maximum likelihood estimation method to calculate the position coordinates of the unknown node, specifically:
[0168] The Differential Evolution (DE) algorithm was proposed by Rainer Storn and Kenneth Price in 1997 based on evolutionary ideas such as genetic algorithms. It is essentially a multi-objective (continuous variable) optimization algorithm (MOEAs) used to find the overall optimal solution in multidimensional space.
[0169] The idea of differential evolution comes from the early proposed genetic algorithm (GA), which simulates crossover, mutation, and reproduction in genetics to design genetic operators.
[0170] The difference between the differential evolution algorithm and the genetic algorithm is that both of them randomly generate the initial population and use the fitness value of each individual in the population as the selection standard. The main process also includes three steps: mutation, crossover and selection. The difference is that the genetic algorithm controls the parent hybridization based on the fitness value, and the probability of the offspring being selected after the mutation. In the maximization problem, the probability of individuals with large fitness values being selected will also be larger. The mutation vector of the differential evolution algorithm is generated by the parent differential vector, and crosses with the parent individual vector to generate a new individual vector, which is directly selected with its parent individual. Obviously, the approximation effect of the differential evolution algorithm is more significant than that of the genetic algorithm.
[0171] The differential evolution algorithm starts with initializing the population, and after mutation and crossover selection, the best is saved in the new population. Then it continues to iterate until the termination condition is met to find the optimal solution. The algorithm is mainly divided into the following steps:
[0172] 1) Initialize the population;
[0173] Determine the population size NP, the i-th individual X in the population i (i=1, 2, 3, 4, ..., NP) is a D-dimensional vector, represented by X t Represents the population at the tth generation of evolution, and the initial population can be expressed as formula (3.17):
[0174]
[0175] 2) Variation;
[0176] In the differential evolution algorithm, individual mutation is implemented through differential strategy. Three different vectors randomly selected from the t-th generation population are denoted as Where r1, r2, i∈NP, formula (3.19) shows how the target vector forms the mutation vector
[0177]
[0178]
[0179] Among them, formula (3.18) is the difference vector, F is the scaling factor of the algorithm, which is generally between [0, 1] to control the amplification effect of the difference vector; Figure 3It can be seen intuitively that constructing a mutation vector in a two-dimensional parameter space
[0180] 3) Crossover;
[0181] In order to improve the diversity of the population and generate new crossover individuals, the generated variant individuals should be cross-operated with the individuals of the original population; taking the commonly used binomial crossover model as an example, the operation is as follows (3.20):
[0182]
[0183] in, is the experimental vector The jth gene fragment of is the mutation vector The j-th gene fragment, randb is a random number between [0, 1]; CR is the crossover operator, which controls the binomial crossover process, and the range is usually between [0, 1]. The larger the CR value, the greater the possibility of crossover. rand is a randomly generated number in [1, D], which can ensure The jth rand The bit is from This ensures that the experimental vector is different from the target vector and the mutation vector is different, thus avoiding invalid hybridization;
[0184] 4) Selection;
[0185] The differential evolution algorithm adopts a greedy mode, and selects the optimal target vector or experimental vector through the fitness function f(x) as the individual entering the next generation population to ensure that the population evolves towards the optimal solution; the process is shown in the following formula:
[0186]
[0187] After completing this step, the differential evolution operation continues to be repeated until the number of iterations or the fitness function requirements are met, and the algorithm terminates;
[0188] By making the individuals in the population correspond to the unknown nodes, the traditional process of solving the coordinates of the unknown nodes of the matrix equation Ax=b is changed into the process of solving the optimal value of the population. In the process of solving the optimal value, since the individuals in the population correspond to the unknown nodes, the calculation process in the original algorithm can be reduced by operating the individuals in the population (which can also be understood as the operation of the unknown node position), and the positioning error of the unknown node in the calculation can be effectively reduced.
[0189] Although the differential evolution algorithm has advantages in focusing on the optimal solution of the population, it has the disadvantages of slow convergence speed, low convergence accuracy, and easy to fall into the local optimal solution in the later stage of the algorithm due to the aggregation of individuals in the population and small individual differences. Therefore, the taboo search algorithm is used to escape the local optimal problem.
[0190] The basic idea of the taboo algorithm: using a neighborhood optimization search method, in order to escape the local optimal solution, the algorithm must be able to accept inferior solutions, that is, each solution obtained may not be better than the original solution. However, once an inferior solution is accepted, the algorithm iteration may fall into a loop. In order to avoid loops, the algorithm puts some recently accepted moves in the taboo table and prohibits them in subsequent iterations. That is, only better solutions that are no longer in the taboo table (which may be worse than the current solution) can be accepted as the initial solution for the next iteration. As the iteration proceeds, the taboo table is continuously updated. After a certain number of iterations, the move that first entered the taboo table is unbanned from the taboo table.
[0191] The two main indicators in the taboo table are taboo objects and taboo length. In the taboo algorithm, in order to avoid repeated operations, some elements must be placed in the taboo table to prohibit operations on these elements. These elements are referred to as taboo objects. The taboo length is the number of iterations that the forbidden object is not allowed to be selected. Generally, a number (taboo length) t is given to the forbidden object x, and the object x is required to be banned within t iterations. In the taboo table, tabu(x) = t is used for memory. For each iteration, the indicator is calculated as tabu(x) = t-1 until tabu(x) = 0. Therefore, all elements can be divided into two categories, forbidden elements and free elements; there are many ways to select the taboo length t, t = constant, or Where n is the number of neighbors in the neighborhood; the steps of the taboo algorithm are as follows:
[0192] 1) Select an initial point x and set:
[0193] x * =x, T = empty set (3.22)
[0194] 2) Set the loop exit; if S(x)-T = empty set, stop, otherwise, set k = k+1; S(x)-T = empty, indicating abnormal termination, the cause is: small neighborhood, long T table; the normal setting is that T table length < neighborhood size;
[0195] 3) Neighborhood movement: Each step moves to the optimal solution in the neighborhood that is not in the T table, that is, if:
[0196] C(s k (x))=Opt{C(s(x))|s(x)∈S(x)-T} (3.23)
[0197] Then let:
[0198] x=s k (x) (3.24)
[0199] Update C(x), where C(x) is the optimal objective function value of the current neighborhood. The role of the neighborhood search rule is to ensure the excellent local search function of the taboo algorithm.
[0200] 4) Check for violations; if:
[0201] C(s L (x))<A(s,x),s L (x)∈T (3.25)
[0202] and:
[0203] C(S L (x))<C(x) (3.26)
[0204] Then S(x) is not restricted by the T table; even if s(x)∈T, the value is still:
[0205] x=S L (x) (3.27)
[0206] A(s,x) is the desired level function, which is generally the best target value ever achieved in history and depends on the values of s and x;
[0207] 5) Merit selection rules;
[0208] 6) Select and record the historical optimal value and update the desired level; if:
[0209] C(x)<C(x * ) (3.28)
[0210] Then let:
[0211] x * =x,C(x * )=C(x),A(s,x)=C(x * ) (3.29)
[0212] The embodiments of the present invention disclose preferred embodiments, but are not limited thereto. A person skilled in the art can easily understand the spirit of the present invention based on the above embodiments and make different extensions and changes. However, as long as they do not deviate from the spirit of the present invention, they are all within the protection scope of the present invention.
Claims
1. A node positioning method based on distance vector, characterized in that: The method is implemented by the following steps: Step 1: Set initialization parameters and thresholds; Step 2: Set the anchor node to broadcast a Hello data packet, which includes the anchor node ID, anchor node name, real coordinates and the minimum hop count initialized to 0, and select the anchor node set; Step 3: Correct the minimum hop count and average hop distance errors, and use the corrected hop value to obtain the minimum hop value and the corrected average hop distance between nodes; Step 4: Use the differential evolution-tabu search hybrid algorithm to calculate the position coordinates of the unknown nodes; Right now: (1) Set the population size, which is equal to the number of unknown nodes; and set the initial position of each population; the initial position refers to the unknown node corresponding to each population and the position of the anchor node closest to the unknown node; Calculate the population fitness value and adaptive scaling factor; (2) According to the fitness of individuals in the group, the roulette wheel method is used to select the winning individuals in the group; (3) Perform mutation operations; (4) Performing a crossover operation on the generated mutation vector and individuals in the population through a binomial crossover model to generate an experimental vector; (5) Introducing the taboo algorithm into the new offspring generated after crossover, entering the individual fitness value into the taboo table, setting the taboo length and comparing the individual fitness and population fitness values; (6) Calculate the value of the fitness function and perform the selection operation; (7) Determine whether to continue the loop. If the set number of iterations is met, exit; otherwise, continue the loop until the algorithm terminates. (8) Finally output the optimal value; The step of selecting a suitable anchor node set is specifically as follows: Similarity is used to indicate the correlation between two nodes. According to the principle that the greater the minimum hop count between two nodes, the smaller the similarity, the following formula (3.1) is obtained: F sim The function value is the similarity value between nodes i and j. The function is defined as follows: the similarity between two nodes i and j is the minimum number of hops between them ij Negative correlation; n is the similarity attenuation coefficient and is related to the topological structure of the wireless sensor network and the surrounding environment; based on the similarity principle, the similarity value of each node with itself is defined as 100%, and the similarity value of the two farthest anchor nodes is defined as 0; Therefore, we can get formula (3.2): s.t.F sim (0)=100%,F sim (hops max )=0 (3.2) Among them, hops max is the maximum number of hops of the anchor node; the parameters α and β are calculated by the similarity condition, and formula (3.3) is obtained: Introducing the delay coefficient k, according to the existing experimental data, the value range of the delay coefficient k can be obtained as follows: hops max ≤k≤2hops max (3.4) When n=1, the following formula (3.5) can be obtained: In order to select a set of anchor nodes whose similarity values with unknown nodes are close to the predicted degree, a threshold T is set: For different wireless sensor network topology environments, when k = 2 × hops max When , the hop count threshold for selecting and modifying anchor nodes is calculated under different similarity thresholds and the maximum hop count of anchor nodes in the network; After the wireless sensor network is initialized, the received anchor node information recorded in the information list of all unknown nodes is stored in ascending order according to the minimum hop count. T When, find the minimum number of hops to the unknown node is less than hops T The anchor nodes of compose the anchor node set, which is used for the next step of position correction calculation.
2. A node positioning method based on distance vector according to claim 1, characterized in that: The steps of correcting the minimum number of hops and the average hop distance error are specifically as follows: In order to solve the positioning error caused by the number of hops, the relative optimal number of hops is used to restrict the single-hop neighbor nodes within the communication range, as shown in the following formula (3.7): Among them, H i,j represents the relative optimal hop count, d i,j represents the actual distance between anchor nodes i and j, and R represents the communication radius; Compare the minimum number of hops h between anchor nodes i and j i,j and the relative optimal hop count H i,j The difference between i,j , as shown in formula (3.8): Among them, the deviation coefficient μ i,j It reflects the difference between the minimum number of hops between anchor nodes and the relative optimal number of hops. The hop adjustment factor ε is used i,j To optimize the hop count information to reduce the cumulative error; Thus, the corrected hop count between anchor nodes is obtained The following formula: In order to solve the error caused by the average hop distance, we first use formula (3.11) to calculate the average hop distance of the anchor node: Among them, (x i ,y i ), (x j ,y j ), h ij Respectively represent the positions of anchor nodes i and j and the minimum number of hops between them, and estimate the distance to each anchor node through HS×hop unknown nodes; The actual distance between an anchor node and other anchor nodes is calculated by formula (3.12): The estimated distance between anchor nodes is calculated by formula (3.13): d eij =HS i ×hop ij (3.13) Among them, HS i is the average hop distance of anchor node i, hop ij is the minimum number of hops between anchor nodes i and j; Calculate the average per-hop distance error of the anchor node: The normalized weighting factor of the anchor node is calculated by formula (3.15): Among them, h i is the number of hops between anchor node i and unknown node, h y is the number of hops between all anchor nodes and unknown nodes; in wireless sensor networks, according to formula (3.15), h i The larger the W i The smaller it is, the average hop distance is corrected by normalizing the weighting factor to obtain the following formula:
3. A node positioning method based on distance vector according to claim 2, characterized in that: The process of calculating the position coordinates of unknown nodes using the differential evolution-tabu search hybrid algorithm is specifically as follows: Differential evolution algorithm, full name Differential Evolution, referred to as DE, is mainly divided into the following steps: 1) Initialize the population; Determine the population size NP, the i-th individual X in the population i (i=1, 2, 3, 4, ..., NP) is a D-dimensional vector, represented by X t Represents the population at the tth generation of evolution, and the initial population can be expressed as formula (3.17): 2) Variation; In the differential evolution algorithm, individual mutation is implemented through the differential strategy; three different vectors randomly selected from the t-th generation population are denoted as Where r1, r2, i∈NP, formula (3.19) shows how the target vector forms the mutation vector Among them, formula (3.18) is the difference vector, F is the scaling factor of the algorithm, which is between [0, 1] and controls the amplification effect of the difference vector; 3) Crossover; In order to improve the diversity of the population and generate new crossover individuals, the generated variant individuals should be cross-operated with the individuals of the original population; taking the commonly used binomial crossover model as an example, the operation is as follows (3.20): in, is the experimental vector The jth gene fragment of is the mutation vector The j-th gene fragment, randb is a random number between [0, 1]; CR is the crossover operator, which controls the binomial crossover process, and the range is usually between [0, 1]. The larger the CR value, the greater the possibility of crossover. rand is a randomly generated number in [1, D], which can ensure The jth rand The bit is from This ensures that the experimental vector is different from the target vector and the mutation vector is different, thus avoiding invalid hybridization; 4) Selection; The differential evolution algorithm adopts a greedy mode, and selects the optimal target vector or experimental vector through the fitness function f(x) as the individual entering the next generation population to ensure that the population evolves towards the optimal solution; the process is shown in the following formula: After completing this step, the differential evolution operation continues to be repeated until the number of iterations or the fitness function requirements are met, and the algorithm terminates; The individuals in the population correspond to the unknown nodes, and all elements are divided into two categories, forbidden elements and free elements; there are many ways to select the taboo length t, t = constant, or Where n is the number of neighbors in the neighborhood; the steps of the taboo algorithm are as follows: 1) Select an initial point x and set: x * =x, T = empty set (3.22) 2) Set the loop exit; if S(x)-T = empty set, stop, otherwise, set k = k+1; S(x)-T = empty, indicating abnormal termination, the cause is: small neighborhood, long T table; the normal setting is that T table length < neighborhood size; 3) Neighborhood movement: Each step moves to the optimal solution in the neighborhood that is not in the T table, that is, if: C(s k (x))=Opt{C(s(x))|s(x)∈S(x)-T} (3.23) Then let: x=s k (x) (3.24) Update C(x), where C(x) is the optimal objective function value in the current neighborhood; 4) Check for violations; if: C(s L (x))<A(s,x),s L (x)∈T (3.25) and: C(S L (x))<C(x) (3.26) Then S(x) is not restricted by the T table; even if s(x)∈T, the value is still: x=S L (x) (3.27) A(s,x) is the desired level function, which is generally the best target value ever achieved in history and depends on the values of s and x; 5) Merit selection rules; 6) Select and record the historical optimal value and update the desired level; if: C(x)<C(x * ) (3.28) Then let: x * =x,C(x * )=C(x),A(s,x)=C(x * ) (3.29)。
Citation Information
Patent Citations
Taboo particle swarm optimization DV-Hop positioning method based on irregular region
CN113473355A