WSN reference point iterative positioning algorithm based on distance deviation factor

文档序号:1963133 发布日期:2021-12-14 浏览:9次 中文

阅读说明:本技术 一种基于距离偏差因子的wsn参考点迭代定位算法 (WSN reference point iterative positioning algorithm based on distance deviation factor ) 是由 陈静 缪坤坤 谢鹏 夏超 于 2021-09-01 设计创作,主要内容包括:本发明公开了一种基于距离偏差因子的无线传感器网络(WSN)参考点迭代定位算法,包括以下步骤:步骤一,搭建定位模型,该模型至少布置三个锚节点,一个目标节点。步骤二,利用RSSI值,计算初始的锚节点与目标节点的距离。步骤三,计算参考点和目标节点的初始位置坐标。步骤四,引入距离偏差因子,进一步计算新的参考点,通过不断迭代更新参考点,计算目标节点的坐标。步骤五,设置正确的迭代终止条件。本发明引入距离偏差因子,根据距离偏差因子重新计算锚节点与目标节点之间的距离,通过不断迭代更新参考点,计算目标节点的坐标,进而使复杂环境因素对RSSI的影响在定位迭代过程中被弥补,可广泛用于复杂的室内环境,实现高精度定位。(The invention discloses a distance deviation factor-based Wireless Sensor Network (WSN) reference point iterative positioning algorithm, which comprises the following steps: step one, a positioning model is built, and at least three anchor nodes and one target node are arranged on the positioning model. And step two, calculating the distance between the initial anchor node and the target node by using the RSSI value. And step three, calculating initial position coordinates of the reference point and the target node. And step four, introducing a distance deviation factor, further calculating a new reference point, and calculating the coordinates of the target node by continuously iterating and updating the reference point. And step five, setting a correct iteration termination condition. According to the method, the distance deviation factor is introduced, the distance between the anchor node and the target node is recalculated according to the distance deviation factor, the reference point is continuously updated in an iteration mode, and the coordinates of the target node are calculated, so that the influence of the complex environmental factors on the RSSI is compensated in the positioning iteration process, and the method can be widely used in the complex indoor environment and realizes high-precision positioning.)

1. A Wireless Sensor Network (WSN) reference point iterative positioning algorithm based on distance deviation factors is characterized in that: the positioning algorithm comprises the following steps:

step one, building a (WSN) positioning model, wherein at least three anchor nodes and one target node are arranged in the model.

Step two, by using the data communication between the anchor node and the target node, the anchor node can measure the received signal strength indicator RSSI of the signal sent by the target node, eliminate abnormal values and use a common ranging model: the Log-Distance Pass Loss model (LDPL) calculates the Distance between the initial anchor node and the target node.

And step three, calculating reference point coordinates by the coordinates of each anchor node and the initial distance between each anchor node and the target node, forming a triangle by taking the reference point as a vertex, and taking the centroid of the triangle as the initial position coordinates of the target node.

And step four, introducing a distance deviation factor on the basis of the initial position of the target node, recalculating the distance between the given anchor node and the unknown target node according to the distance deviation factor, further calculating a new reference point, and calculating the coordinates of the target node by continuously iterating and updating the reference point.

And step five, the key of the iterative positioning algorithm is the setting of a termination condition, the correct iterative termination condition is set, and higher positioning accuracy can be obtained within a small number of iteration times.

2. A WSN reference point iterative location algorithm based on distance deviation factor according to claim 1, characterized in that: the second step is specifically as follows:

and calculating the initial distance between each anchor node and the target node according to the received signal strength RSSI of the anchor node through an LDPL (Linear discriminant propagation) model, namely formula (1).

P(d)=P(d0)-10n log10(d/d0)+Xσ (1)

In formula (1), n represents a path loss factor; x is a shadow coefficient and is a Gaussian random variable which takes 0 as a mean value and sigma as variance; p (d) is the RSSI value when the distance between two nodes is d; p (d)0) Is that the distance between two nodes is d0RSSI value of time, wherein d0Take 1m for the reference distance.

When d is0When 1m is taken and the RSSI is used to represent the signal strength at d, equation (2) can be simplified as follows:

RSSI(d)=A-10n log10(d)+Xσ (2)

in the formula (2), a is an RSSI standard value when the node distance is 1 m.

3. A WSN reference point iterative location algorithm based on distance deviation factor according to claim 1, characterized in that: the third step is specifically as follows:

due to A1(xr1,yr1) At anchor node M1(x1,y1) As a circle center, M1Distance d from target node1On a circle of radius, then:

(xr1-x1)2+(yr1-y1)2=d1 2 (3)

at the same time, A1(xr1,yr1) The condition to be satisfied can be represented by equation (4):

in the formula (4), d2And d3Are respectively a circle M2And the circle M3Radius, | A1M2|、|A1M3Is reference point A1(xr1,yr1) And anchor node M2(x2,y2)、M3(x3,y3) The distance between can be expressed as:

reference point A calculated by equations (3) to (6)1There may be multiple solutions, only Δ M needs to be retained1M2M3Internal solution A1(xr1,yr1) The method can be judged by determining a straight line by the two anchor nodes and enabling the reference point and the other anchor node to be positioned on the same side of the straight line. Similarly, the circle M can be calculated2And the circle M3Reference point A on2(xr2,yr2) And A3(xr3,yr3)。

Forming a triangle by taking the three reference points as vertexes, and taking the centroid of the triangle as the initial positioning coordinate G of the target nodeI(xg,yg) It can be obtained from equation (7):

4. a WSN reference point iterative location algorithm based on distance deviation factor according to claim 1, characterized in that: the fourth step is specifically as follows:

recording the distance between the initial positioning coordinate of the target node and the anchor node coordinate as dOiCalculating the distance between the target node and the anchor node by adopting an LDPL model, and recording the distance as dIiDistance deviation factor CiCan be defined by formula (8) for representing dIiAnd dOiThe degree of deviation therebetween.

Ci=dIi/dOi (8)

In formula (8), I is the number of iterations of the reference point, and I is 1, 2, and 3.

Each iteration may calculate 3 distance bias factors, typically using their mean and median number as parameters for the statistical population. Since it may happen that the extreme values of the 3 distance deviation factors are too large or too small, they are flatThe use of the mean values for the calculation will deviate the final result from the actual value, so their median value (denoted C) is usually usedmid) To express the overall distance deviation characteristics based on CmidRecalculating the distance (denoted as d) between the anchor node and the target node(I+1)i) It can be represented by formula (9):

d(I+1)i=dIi/Cmid (9)

based on new distance d(I+1)iAnd iterating the reference points, and further continuously updating the positioning coordinates of the target nodes.

5. A WSN reference point iterative location algorithm based on distance deviation factor according to claim 1, characterized in that: the step five specifically comprises the following steps:

the key of the iterative positioning algorithm is the setting of a termination condition, the correct termination condition is set, and higher positioning accuracy can be obtained within a small number of iteration times. An iteration experiment shows that when the iteration number is larger than 6, the improvement of the coordinate precision is rapidly slowed down, so that the preset iteration number 6 is selected as the termination condition of the iteration, and the method has high precision and good timeliness.

Technical Field

The invention relates to the technical field of RSSI (received signal strength indicator) based positioning, in particular to a WSN (wireless sensor network) reference point iterative positioning algorithm based on a distance deviation factor.

Background

With the rapid development of wireless communication, internet technology and artificial intelligence, the positioning technology has gained wide attention. The outdoor Positioning technology is mainly used for Positioning a target object through a Global Positioning System (GPS) or a beidou Positioning System. However, when entering the indoor positioning system, the GPS or beidou positioning system basically loses the positioning accuracy, and further loses the indoor positioning function. The indoor positioning technology is mainly used for completing positioning of a target node through a plurality of anchor nodes by building an indoor positioning system. Currently, indoor positioning technologies are mainly classified into two categories, ranging and non-ranging. Common ranging-based methods mainly include algorithms based on Received Signal Strength Indication (RSSI), signal time of flight (TOA), time difference of flight (TDOA), and angle of arrival (AOA). The RSSI-based positioning algorithm has the main idea that according to the signal strength value RSSI of a target node received by an anchor node, the Euclidean distance from the anchor node to the target node is calculated, and the position information of the target node is obtained according to a trilateral positioning algorithm.

Theoretically, the target node can be positioned by a positioning algorithm based on RSSI. However, obstacles may exist in the indoor environment, the shape of the object is irregular, and the position of the object may also be randomly changed, so that the linear propagation of the wireless signal is influenced. Meanwhile, the indoor environment has the phenomena of signal reflection, signal refraction, human movement and the like, so that the RSSI value measured by the anchor node has errors, and finally, the indoor positioning accuracy is not ideal enough.

Disclosure of Invention

The invention aims to provide a WSN reference point iterative positioning algorithm based on a distance deviation factor aiming at the problem of low positioning accuracy caused by a complex indoor environment. The method is characterized in that prior information of the indoor environment does not need to be acquired, and the method can be widely applied to complex indoor environments and realizes high-precision indoor positioning.

The invention adopts the following technical scheme that the WSN reference point iterative positioning algorithm based on the distance deviation factor specifically comprises the following steps:

step one, building a (WSN) positioning model, wherein at least three anchor nodes and one target node are arranged in the model.

Step two, by using the data communication between the anchor node and the target node, the anchor node can measure the received signal strength indicator RSSI of the signal sent by the target node, eliminate abnormal values and use a common ranging model: the Log-Distance Pass Loss model (LDPL) calculates the Distance between the initial anchor node and the target node.

And step three, calculating reference point coordinates by the coordinates of each anchor node and the initial distance between each anchor node and the target node, forming a triangle by taking the reference point as a vertex, and taking the centroid of the triangle as the initial position coordinates of the target node.

And step four, introducing a distance deviation factor on the basis of the initial position of the target node, recalculating the distance between the given anchor node and the unknown target node according to the distance deviation factor, further calculating a new reference point, and calculating the coordinates of the target node by continuously iterating and updating the reference point.

And step five, the key of the iterative positioning algorithm is the setting of a termination condition, the correct iterative termination condition is set, and higher positioning accuracy can be obtained within a small number of iteration times.

Further, the second step specifically includes:

and calculating the initial distance between each anchor node and the target node according to the received signal strength RSSI of the anchor node through an LDPL (Linear discriminant propagation) model, namely formula (1).

P(d)=P(d0)-10n log10(d/d0)+Xσ (1)

In formula (1), n represents a path loss factor; x is a shadow coefficient and is a Gaussian random variable which takes 0 as a mean value and sigma as variance; p (d) is the RSSI value when the distance between two nodes is d; p (d)0) Is that the distance between two nodes is d0RSSI value of time, wherein d0For reference distances, 1m is typically taken.

When d is0When 1m is taken and the RSSI is used to represent the signal strength at d, equation (2) can be simplified as follows:

RSSI(d)=A-10n log10(d)+Xσ (2)

in the formula (2), a is an RSSI standard value when the node distance is 1 m.

Further, the third step specifically includes:

due to A1(xr1,yr1) At anchor node M1(x1,y1) As a circle center, M1Distance d from target node1On a circle of radius, then:

(xr1-x1)2+(yr1-y1)2=d1 2 (3)

at the same time, A1(xr1,yr1) The condition to be satisfied can be represented by equation (4):

in the formula (4), d2And d3Are respectively a circle M2And the circle M3Radius, | A1M2|、|A1M3Is reference point A1(xr1,yr1) And anchor node M2(x2,y2)、M3(x3,y3) The distance between can be expressed as:

reference point A calculated by equations (3) to (6)1There may be multiple solutions, only Δ M needs to be retained1M2M3Internal solution A1(xr1,yr1) The method can be judged by determining a straight line by the two anchor nodes and enabling the reference point and the other anchor node to be positioned on the same side of the straight line. Similarly, the circle M can be calculated2And the circle M3Reference point A on2(xr2,yr2) And A3(xr3,yr3)。

Forming a triangle by using the three reference points as the vertexesAngular form, using the centroid of the triangle as the initial positioning coordinate G of the target nodeI(xg,yg) It can be obtained from equation (7):

further, the fourth step specifically includes:

recording the distance between the initial positioning coordinate of the target node and the anchor node coordinate as dOiCalculating the distance between the target node and the anchor node by adopting an LDPL model, and recording the distance as dIiDistance deviation factor CiCan be defined by formula (8) for representing dIiAnd dOiThe degree of deviation therebetween.

Ci=dIi/dOi (8)

In formula (8), I is the number of iterations of the reference point, and I is 1, 2, and 3.

Each iteration may calculate 3 distance bias factors, typically using their mean and median number as parameters for the statistical population. Since it may happen that the extreme values of the 3 distance deviation factors are too large or too small, the average of which is used for the calculation to deviate the final result from the actual value, their median value (denoted C) is usually usedmid) To express the overall distance deviation characteristics based on CmidRecalculating the distance (denoted as d) between the anchor node and the target node(I+1)i) It can be represented by formula (9):

d(I+1)i=dIi/Cmid (9)

based on new distance d(I+1)iAnd iterating the reference points, and further continuously updating the positioning coordinates of the target nodes.

Further, the fifth step specifically includes:

the key of the iterative positioning algorithm is the setting of a termination condition, and if the termination condition is set correctly, higher positioning accuracy can be obtained within a small number of iterations. An iteration experiment shows that when the iteration number is larger than 6, the improvement of the coordinate precision is rapidly slowed down, so that the preset iteration number 6 is selected as the termination condition of the iteration, and the method has high precision and good timeliness.

The invention has the technical effects that: and introducing a distance deviation factor, recalculating the distance between the given anchor node and the unknown target node according to the distance deviation factor, further calculating a new reference point, continuously iterating and updating the reference point, and calculating the coordinates of the target node, so that the influence of the complex environmental factors on the RSSI is compensated in the positioning iteration process, and the RSSI positioning method can be widely applied to complex indoor environments to realize high-precision positioning.

Drawings

FIG. 1 is a flow chart of an iterative reference point location algorithm

FIG. 2 is a schematic diagram of reference point coordinate calculation

FIG. 3 is a graph of position error rates for different iterations

FIG. 4 is a distribution diagram of anchor nodes and target nodes

FIG. 5 is a TCP positioning result

FIG. 6 shows WCP positioning results

FIG. 7 is a reference point iterative positioning result based on a distance deviation factor

Detailed Description

In order to facilitate the understanding and implementation of the present invention for those of ordinary skill in the art, the present invention is further described in detail with reference to the accompanying drawings and examples, it is to be understood that the embodiments described herein are merely illustrative and explanatory of the present invention and are not restrictive thereof.

As shown in fig. 1, a specific process of an embodiment of the WSN reference point iterative positioning algorithm based on distance deviation factors according to the present invention includes the following steps:

step one, building a (WSN) positioning model, wherein at least three anchor nodes and one target node are arranged in the model.

Step two, by using the data communication between the anchor node and the target node, the anchor node can measure the received signal strength indicator RSSI of the signal sent by the target node, eliminate abnormal values and use a common ranging model: the Log-Distance Pass Loss model (LDPL) calculates the Distance between the initial anchor node and the target node.

And step three, calculating reference point coordinates by the coordinates of each anchor node and the initial distance between each anchor node and the target node, forming a triangle by taking the reference point as a vertex, and taking the centroid of the triangle as the initial position coordinates of the target node.

And step four, introducing a distance deviation factor on the basis of the initial position of the target node, recalculating the distance between the given anchor node and the unknown target node according to the distance deviation factor, further calculating a new reference point, and calculating the coordinates of the target node by continuously iterating and updating the reference point.

And step five, the key of the iterative positioning algorithm is the setting of a termination condition, the correct iterative termination condition is set, and higher positioning accuracy can be obtained within a small number of iteration times.

The second step is specifically as follows:

and calculating the initial distance between each anchor node and the target node according to the received signal strength RSSI of the anchor node through an LDPL (Linear discriminant propagation) model, namely formula (1).

P(d)=P(d0)-10n log10(d/d0)+Xσ (1)

In formula (1), n represents a path loss factor; x is a shadow coefficient and is a Gaussian random variable which takes 0 as a mean value and sigma as variance; p (d) is the RSSI value when the distance between two nodes is d; p (d)0) Is that the distance between two nodes is d0RSSI value of time, wherein d0For reference distances, 1m is typically taken.

When d is0When 1m is taken and the RSSI is used to represent the signal strength at d, equation (2) can be simplified as follows:

RSSI(d)=A-10n log10(d)+Xσ (2)

in the formula (2), a is an RSSI standard value when the node distance is 1 m.

As shown in fig. 2, step three is A1(xr1,yr1) In the anchorNode M1(x1,y1) As a circle center, M1Distance d from target node1On a circle of radius, then:

(xr1-x1)2+(yr1-y1)2=d1 2 (3)

at the same time, A1(xr1,yr1) The condition to be satisfied can be represented by equation (4):

in the formula (4), d2And d3Are respectively a circle M2And the circle M3Radius, | A1M2|、|A1M3Is reference point A1(xr1,yr1) And anchor node M2(x2,y2)、M3(x3,y3) The distance between can be expressed as:

reference point A calculated by equations (3) to (6)1There may be multiple solutions, only Δ M needs to be retained1M2M3Internal solution A1(xr1,yr1) The method can be judged by determining a straight line by the two anchor nodes and enabling the reference point and the other anchor node to be positioned on the same side of the straight line. Similarly, the circle M can be calculated2And the circle M3Reference point A on2(xr2,yr2) And A3(xr3,yr3)。

Forming a triangle by using the three reference points as vertexesThe centroid of the shape is used as the initial positioning coordinate G of the target nodeI(xg,yg) It can be obtained from equation (7):

the fourth step is specifically as follows:

recording the distance between the initial positioning coordinate of the target node and the anchor node coordinate as dOiCalculating the distance between the target node and the anchor node by adopting an LDPL model, and recording the distance as dIiDistance deviation factor CiCan be defined by formula (8) for representing dIiAnd dOiThe degree of deviation therebetween.

Ci=dIi/dOi (8)

In formula (8), I is the number of iterations of the reference point, and I is 1, 2, and 3.

Each iteration may calculate 3 distance bias factors, typically using their mean and median number as parameters for the statistical population. Since it may happen that the extreme values of the 3 distance deviation factors are too large or too small, the average of which is used for the calculation to deviate the final result from the actual value, their median value (denoted C) is usually usedmid) To express the overall distance deviation characteristics based on CmidRecalculating the distance (denoted as d) between the anchor node and the target node(I+1)i) It can be represented by formula (9):

d(I+1)i=dIi/Cmid (9)

based on new distance d(I+1)iAnd iterating the reference points, and further continuously updating the positioning coordinates of the target nodes.

As shown in fig. 3, in step five, the number of iterations is determined through an iteration experiment. And a correct termination condition is set, so that higher positioning accuracy can be obtained within a small number of iterations. In order to determine the appropriate number of iteration stops, 20 iteration simulations were performed under different node communication radii (communication radius R is 10m and R is 20m) and different numbers of anchor nodes (number of anchor nodes J is 10 and J is 20). The average position error rate for each iteration is shown in figure 2.

It can be seen that, under different conditions, when the iteration number is less than 6, the average positioning error rate decreases with the increase of the iteration number, and does not change after 6 iterations, that is, the positioning accuracy of the target node reaches convergence, so the iteration termination number is set to 6 herein.

As shown in fig. 4, which is a comparison experiment between the actual positions of the target node and the anchor node, the WSN reference point iterative positioning algorithm (fig. 7) based on the distance deviation factor and other positioning algorithms (fig. 5 and 6) shows that the position of the target node determined by the positioning algorithm of the present invention is closer to the actual position, and has higher accuracy compared with other positioning algorithms.

It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种用于以太网自动协商模式下的测距方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!