Low-cost Beacon Beacon arrangement method supporting failure tolerance in Bluetooth terminal side positioning

文档序号:142818 发布日期:2021-10-22 浏览:40次 中文

阅读说明:本技术 蓝牙终端侧定位中支持失效容忍的低成本Beacon信标布置方法 (Low-cost Beacon Beacon arrangement method supporting failure tolerance in Bluetooth terminal side positioning ) 是由 邱树伟 李�浩 董晓庆 王会林 李建忠 廖晓鹏 于 2021-06-18 设计创作,主要内容包括:一种蓝牙终端侧定位中支持失效容忍的低成本Beacon信标布置方法,首先,给出蓝牙信号的传播模型,推导出蓝牙设备收发双方的距离与接收信号强度之间的关系表达式;其次,给出三维空间三边定位的方法;然后,提出以最小化Beacon信标数量为目标函数,以失效容忍为约束的优化问题;最后,设计了基于遗传算法Beacon信标布置方法对优化问题进行求解。本发明所提出的方法能够在满足给定的失效容忍度的前提下最小化Beacon信标的数量,降低蓝牙终端侧定位系统的部署成本。(A low-cost Beacon Beacon arrangement method supporting failure tolerance in Bluetooth terminal side positioning comprises the steps of firstly, providing a propagation model of a Bluetooth signal, and deducing a relational expression between the distance between a receiving party and a receiving party of a Bluetooth device and the strength of a received signal; secondly, providing a three-dimensional space trilateral positioning method; then, an optimization problem is put forward, wherein the minimum Beacon Beacon number is used as an objective function, and the failure tolerance is used as a constraint; and finally, a Beacon Beacon arrangement method based on a genetic algorithm is designed to solve the optimization problem. The method provided by the invention can minimize the number of Beacon beacons on the premise of meeting the given failure tolerance, and reduce the deployment cost of the Bluetooth terminal side positioning system.)

1. A low-cost Beacon Beacon arranging method supporting failure tolerance in Bluetooth terminal side positioning is characterized by comprising the following steps:

1) giving a propagation model of the Bluetooth signal, and deducing a relational expression between the distance between the receiving and transmitting sides of the Bluetooth equipment and the strength of the received signal;

2) providing a three-dimensional space trilateral positioning method; then, an optimization problem is put forward, wherein the minimum Beacon Beacon number is used as an objective function, and the failure tolerance is used as a constraint;

3) a Beacon Beacon arrangement method based on a genetic algorithm is designed to solve the optimization problem.

2. The method for low-cost Beacon placement with support for fault tolerance in bluetooth terminal-side positioning according to claim 1, wherein in the step 1), the propagation model of bluetooth signals is as follows:

RSSI=PBeacon+GTX-Ploss+GRx (2)

wherein the content of the first and second substances,

Ploss=Pref+10lg(dη)+χ (3)

in equations (2) and (3), RSSI represents the received signal strength of the receiving side; pBeaconIndicating the transmission power of the sender; gTxAnd GRxRespectively representing the antenna gains of the transmitting side and the receiving side; plossRepresents the path loss of the signal; prefIs the reference path loss when the receiver and sender are 1m apart; d is the distance between the sender and the receiver; η is the path attenuation exponent; χ represents a standard deviation of the environmental negative fading, and is obtained according to equations (2) and (3):

by rhothIndicating the threshold of the received signal strength, let RSSI be rhothAnd obtaining the effective communication radius r of the Beacon as follows:

with dijRepresenting the ith target point qiAnd the jth Beacon Beacon bjIf d isijR is less than or equal to r, then the target point q isiLocated in Beacon bjI ═ 1,2,., | Q |; j ═ 1,2, ·, | B |.

3. The method for arranging the Beacon Beacon with low cost and fault tolerance in the Bluetooth terminal side positioning as claimed in claim 1 or 2, wherein in the step 2), the three-dimensional space trilateral positioning method is as follows: three Beacon beacons b in known three-dimensional space1,b2And b3The three beacons can be regarded as the spherical centers of three spherical surfaces and the coordinates are known, which are: (x)1,y1,z1),(x2,y2,z2) And (x)3,y3,z3) Within the signal coverage area of the three Beacon beacons, there is a point q with unknown coordinates, which is expressed by (x, y, z), and the points q and b1,b2And b3Is calculated by the equation (4) assuming d is respectively1,d2And d3Thus, the following system of equations is obtained:

obtaining coordinates (x, y, z) of q by solving an equation set (6);

on the premise of meeting the condition that the failure tolerance is n, the number of Beacon beacons required by the positioning system is minimized, so that the optimization problem is established as follows:

wherein, thetaijIs an indicator variable when the target point q is reachediWith Beacon bjA distance d betweenijWhen r is less than or equal to r, thetaij1 is ═ 1; otherwise, θij=0。

4. The method for arranging the Beacon Beacon with low cost and supporting the fault tolerance in the Bluetooth terminal side positioning as claimed in claim 1 or 2, wherein in the step 3), the optimization problem (7) is an NP difficult problem, and the problem is solved by designing a Beacon Beacon arranging method based on a genetic algorithm;

in the Beacon Beacon arranging method based on the genetic algorithm, G represents the total times of genetic evolution, PgRepresenting the G generation population, wherein G is 1, 2.

Step 3.1, coding the chromosome by adopting a binary coding method;

step 3.2, putting g to 1;

step 3.3 Generation of an initial population P comprising N chromosomes Using the "initial population" algorithmg

Step 3.4, judging whether G is larger than G, if so, turning to step 9;

step 3.5 calculation of PgThe fitness value of each chromosome, namely the number of Beacon beacons corresponding to each chromosome;

step 3.6 Using the "selection" operation from population PgSelecting N superior parent chromosomes;

step 3.7, putting g to g + 1;

step 3.8 Generation of Next Generation population P Using "Cross, mutation and substitution" operationsgReturning to the step 4;

step 3.9, finding out chromosomes with the lowest fitness value in the current population;

step 3.10, setting B as { the candidate position where the Beacon is arranged }, and outputting B;

step 3.11 ends.

5. The method of claim 4 for low-cost Beacon placement with support for fault tolerance in bluetooth terminal side positioning, wherein in step 3.1, the "binary encoding" method is as follows: the candidate position set C is considered to be a set consisting of | C | binary variables, the element C in CiIf the value of (c) is either 1 or 0iWhen Beacon Beacon is arranged, c is seti1 is ═ 1; otherwise, put ci=0,i=1,2,...,|C|;

The set C after encoding is called a "chromosome", and different elements in C are given different binary values to generate different chromosomes.

6. The method of claim 4 for low-cost Beacon placement with support for fault tolerance in bluetooth terminal side positioning, wherein in step 3.3, at the beginning of the execution of the genetic algorithm, an initial population comprising N chromosomes is generated, each chromosome in the population needs to satisfy the constraint in the optimization problem (7), that is, any target point in the set Q must be covered by at least 3+ N Beacon signals, and the "initial population" algorithm is as follows:

step 3.3.1, setting k to be 1;

step 3.3.2 randomly generates a | C | bit binary number, which is then assigned to | C | elements in the set C in a bitwise corresponding manner to generate a chromosome C(k)

3.3.3, judging the feasibility of the chromosome by adopting a chromosome feasibility judgment algorithm, and if the chromosome is feasible, setting k to be k + 1; if not, returning to the step 3.3.2;

step 3.3.4 judges whether k is greater than N, if so, outputs an initial population P containing N chromosomes1={C(k)},N, go to step 3.3.5; if not, returning to the step 3.3.2;

step 3.3.5 ends.

7. The method of claim 6 for low-cost Beacon placement with support for outage tolerance in bluetooth terminal side positioning, wherein in step 3.3.3, the "chromosome feasibility determination" algorithm is as follows:

step 3.3.3.1 sets B ═ C(k)The position of the Beacon is arranged in the position;

step 3.3.3.2 calculates each target point Q in the set QiTo the position B of each Beacon Beacon in BjDistance d ofijI ═ 1, 2., | Q |, j ═ 1, 2., | B |, if d |, thenijR is less than or equal to r, the Beacon Beacon is added into the set Bc

Step 3.3.3.3 judgement of | BcIf |, is greater than or equal to 3+ n, if yes, setting I ═ TRUE; if not, setting I as FALSE; i ═ TRUE indicates that the chromosome is feasible, I ═ FALSE indicates that the chromosome is not feasible; outputting I;

step 3.3.3.4 ends.

8. The method of claim 4 for low-cost Beacon placement with support for outage tolerance in bluetooth terminal side positioning, wherein in step 3.6, the main role of the "select" operation is to select good quality chromosomes in the current population as parent chromosomes for generating the next generation population, and the "select" operation comprises the following steps:

step 3.6.1 selection of Current population PgThe method is characterized in that the number of chromosomes in the population is x, the fitness value of the chromosomes is the lowest, x belongs to {1,2, … and N/3}, and the value of x is limited to be less than or equal to N/3, so that the limitation can ensure that x good-quality chromosomes in the current population can directly become parent chromosomes, and the problem that the current population is too similar to the next generation population due to the fact that too many chromosomes directly become parent chromosomes is solved;

step 3.6.2 Place the x chromosomes in set PtempPerforming the following steps; put Pg=Pg\Ptemp;|Pg|=N-x;

Step 3.6.3 defines population PgProbability that the ith chromosome was selected as the parent chromosome:

wherein f isiRepresents PgFitness value of the ith chromosome;

step 3.6.4 combines the interval [0, 1]]The division into N-x subintervals is as follows:

step 3.6.5 randomly generates a real number δ ∈ [0, 1]]If delta belongs to the ith sub-interval, P is addedgPutting the ith chromosome into a set PtempIn, i ∈ {1, 2., (N-x) };

step 3.6.6 repeat step 3.6.5 until | PtempUntil | is N;

step 3.6.7 put Pg=Ptemp

And 3.6.8 ending.

9. The method of claim 4 for low-cost Beacon placement with support for fault tolerance in bluetooth terminal side positioning, wherein in step 3.8, the "crossover, mutation and replacement" operation is to generate next generation population, so that N chromosomes in the population are more diversified to gradually approach the optimal solution, and the steps of the "crossover, mutation and replacement" operation are as follows:

step 3.8.1 randomly dividing N chromosomes in the current population into N/2 groups, each group including two chromosomes;

step 3.8.2 interleaving: for each set of chromosomes, firstly generating a random integer tau epsilon [2, | C | -1], and then carrying out binary value interchange on two chromosomes in the set from the position tau;

step 3.8.3 mutation operation: a small probability value p is given in advancesFor each chromosome, a real number γ ∈ [0, 1] is randomly generated]If gamma is not more than psThen randomly select a value c from the chromosomeiAnd to ciThe value of (c) is inverted, i.e.:

step 3.8.4 alternative operation: the feasibility determination is carried out on each chromosome by adopting a 'chromosome feasibility determination' algorithm, and for each given chromosome C(k)And k belongs to {1, 2.,. N }, and if the returned value of the chromosome feasibility judgment algorithm is I ═ FALSE, the initial population P is randomly selected1Selecting a chromosome to replace;

step 3.8.5 uses the N chromosomes generated after the above operation as the next generation population Pg,g∈{2,3,...,G};

Step 3.8.6 ends.

Technical Field

The present invention relates to a beacon arranging method.

Background

In large parks, such as colleges and universities, comprehensive hospitals, large residential quarters, etc., location-based intelligent services can effectively improve the quality of life of people. At present, location-based intelligent services in large parks mainly include: parking space positioning and navigation, article or pet tracking, personnel positioning and nursing, people flow statistics and analysis, intelligent access control and the like. The services are based on terminal device positioning. However, in a large park, since the buildings are tall and the building groups are dense, the satellite positioning signals are easily attenuated due to the shielding of the buildings, which may cause the satellite positioning accuracy to be reduced, and sometimes even the satellite positioning signals cannot be searched, so that the positioning service cannot be enjoyed. At this point, each item of location-based intelligent service in the large campus will be greatly affected.

In view of this, it is particularly important to deploy dedicated positioning systems in large parks. Currently, the bluetooth terminal side positioning technology based on the iBeacon protocol is widely applied to positioning service of a large-scale park. The technology obtains the signal intensity of the Bluetooth Beacon beacons from the periphery of the terminal equipment by utilizing the terminal equipment, and the approximate distance between the terminal equipment and each Bluetooth Beacon Beacon is calculated according to the signal intensity, so that the position of the terminal equipment is calculated.

The bluetooth terminal side location technology can be applied to the intelligent park as shown in fig. 1. In fig. 1, a campus has multiple roads and a square. Points on roads and squares are the target points to be located, as shown by the small black squares in fig. 1. Generally, the target point to be located can be regarded as a terminal device carried by the user, such as a smart phone, a smart band, a smart tag, and the like. A plurality of Beacon beacons are arranged at specified positions on the two sides of the road and around the square, and the candidate position of each Beacon is the center of the white square in the figure 1. In the present invention, the area where the target point is located is referred to as a "target area", and the target area may be other activity places in the garden besides roads and squares. Further, in the present invention, the candidate positions for arranging Beacon beacons are not limited to the sides of roads and the surroundings of squares.

The main process of positioning at the bluetooth terminal side is as follows: first, a certain number of Beacon beacons are arranged on a given Beacon candidate location. The Beacon arranged must be able to satisfy the following conditions: any one target point in the target area can be covered by signals from 3 Beacon beacons at least at the same time; then, the Beacon periodically broadcasts the data packet with T as a period, for example, the data packet is broadcast once every T ═ 500 ms; then, the terminal device located in the target area periodically receives the data packet from the Beacon, and at the same time, records the source device ID and the received Signal Strength rssi (received Signal Strength indication) of the received data packet, as shown in formula (1):

wherein, BcSet of Beacon beacons, | B, representing signals that can be overlaid to a terminal devicecL represents the total number of Beacon beacons that the signal can cover to the terminal device, | Bc| ≧ 3; and finally, the terminal equipment extracts at least 3 rows of data in the matrix M, and the position of the terminal equipment can be calculated by using a three-dimensional space trilateral positioning method.

In the above process, there are two factors that have a significant impact on the cost and performance of the positioning system:

(1) number of Beacon beacons: the number of Beacon beacons is a key factor in determining the cost of deployment of a positioning system. How to reduce the number of Beacon beacons as much as possible on the premise of realizing the required positioning service is a problem to be mainly solved for building a positioning system.

(2) Location of Beacon: users usually require the positioning system to have better fault tolerance and reliability, and even if some Beacon beacons in the positioning system fail, the positioning system can still work normally. To achieve this goal, the positions of Beacon beacons need to be planned in detail in addition to considering the number of Beacon beacons.

Disclosure of Invention

In order to overcome the defects that the prior art is high in cost and does not support failure tolerance and the like, the invention provides a low-cost Beacon Beacon arrangement method supporting failure tolerance in Bluetooth terminal side positioning, and the number of Beacon beacons is minimized on the premise of providing positioning service with failure tolerance, so that the deployment cost is reduced.

The technical scheme adopted by the invention for solving the technical problems is as follows:

a low-cost Beacon Beacon arranging method supporting failure tolerance in Bluetooth terminal side positioning comprises the following steps:

1) giving a propagation model of the Bluetooth signal, and deducing a relational expression between the distance between the receiving and transmitting sides of the Bluetooth equipment and the strength of the received signal;

2) providing a three-dimensional space trilateral positioning method; then, an optimization problem is put forward, wherein the minimum Beacon Beacon number is used as an objective function, and the failure tolerance is used as a constraint;

3) a Beacon Beacon arrangement method based on a genetic algorithm is designed to solve the optimization problem.

Further, in step 1), the propagation model of the bluetooth signal is as follows:

RSSI=PBeacon+GTX-Ploss+GRx (2)

wherein the content of the first and second substances,

Ploss=Pref+10lg(dη)+χ (3)

in equations (2) and (3), RSSI represents the received signal strength of the receiving side; pBeaconIndicating the transmission power of the sender; gTxAnd GRxRespectively representing the antenna gains of the transmitting side and the receiving side; plossRepresents the path loss of the signal; prefIs connected toReference path loss when the receiver and the sender are 1m apart; d is the distance between the sender and the receiver; η is the path attenuation exponent; χ represents a standard deviation of the environmental negative fading, and is obtained according to equations (2) and (3):

by rhothIndicating the threshold of the received signal strength, let RSSI be rhothAnd obtaining the effective communication radius r of the Beacon as follows:

with dijRepresenting the ith target point qiAnd the jth Beacon Beacon bjIf d isijR is less than or equal to r, then the target point q isiLocated in Beacon bjI ═ 1,2,., | Q |; j ═ 1,2, ·, | B |;

still further, in the step 2), the three-dimensional space trilateral positioning method includes: three Beacon beacons b in known three-dimensional space1,b2And b3The three beacons can be regarded as the spherical centers of three spherical surfaces and the coordinates are known, which are: (x)1,y1,z1),(x2,y2,z2) And (x)3,y3,z3). Within the signal coverage of the three Beacon beacons is a point q with unknown coordinates, which are expressed as (x, y, z), and points q and b1,b2And b3The distance of (d) can be calculated by the formula (4) assuming d1,d2And d3Thus, the following system of equations is obtained:

obtaining coordinates (x, y, z) of q by solving an equation set (6);

on the premise of meeting the condition that the failure tolerance is n, the number of Beacon beacons required by the positioning system is minimized, so that the optimization problem is established as follows:

wherein, thetaijIs an indicator variable when the target point q is reachediWith Beacon bjA distance d betweenijWhen r is less than or equal to r, thetaij1 is ═ 1; otherwise, θij=0;

Furthermore, in the step 3), the optimization problem (7) is an NP-hard problem, and the problem is solved by designing a Beacon arranging method based on a genetic algorithm.

In the Beacon Beacon arranging method based on the genetic algorithm, G represents the total times of genetic evolution, PgRepresenting the G generation population, wherein G is 1, 2.

Step 3.1, coding the chromosome by adopting a binary coding method;

step 3.2, putting g to 1;

step 3.3 Generation of an initial population P comprising N chromosomes Using the "initial population" algorithmg

Step 3.4, judging whether G is larger than G, if so, turning to step 9;

step 3.5 calculation of PgThe fitness value of each chromosome, namely the number of Beacon beacons corresponding to each chromosome;

step 3.6 Using the "selection" operation from population PgSelecting N superior parent chromosomes;

step 3.7, putting g to g + 1;

step 3.8 Generation of Next Generation population P Using "Cross, mutation and substitution" operationsgReturning to the step 4;

step 3.9, finding out chromosomes with the lowest fitness value in the current population;

step 3.10, setting B as { the candidate position where the Beacon is arranged }, and outputting B;

step 3.11 ends.

Preferably, in step 3.1, the "binary coding" method is as follows: the candidate position set C is considered to be a set consisting of | C | binary variables, the element C in CiIf the value of (c) is either 1 or 0iWhen Beacon Beacon is arranged, c is seti1 is ═ 1; otherwise, put ci=0,i=1,2,...,|C|;

The set C after encoding is called a "chromosome", and different elements in C are given different binary values to generate different chromosomes.

In step 3.3, at the beginning of the execution of the genetic algorithm, an initial population including N chromosomes needs to be generated, each chromosome in the population needs to satisfy the constraint condition in the optimization problem (7), that is, any target point in the set Q must be covered by signals of at least 3+ N Beacon beacons, and the "initial population" algorithm is as follows:

step 3.3.1, setting k to be 1;

step 3.3.2 randomly generates a | C | bit binary number, which is then assigned to | C | elements in the set C in a bitwise corresponding manner to generate a chromosome C(k)

3.3.3, judging the feasibility of the chromosome by adopting a chromosome feasibility judgment algorithm, and if the chromosome is feasible, setting k to be k + 1; if not, returning to the step 3.3.2;

step 3.3.4 judges whether k is greater than N, if so, outputs an initial population P containing N chromosomes1={C(k)},Turning to step 3.3.5; if not, returning to the step 3.3.2;

step 3.3.5 ends.

In said step 3.3.3, the algorithm for "chromosome feasibility determination" is as follows:

step 3.3.3.1 sets B ═ C(k)The position of the Beacon is arranged in the position;

step 3.3.3.2 calculates each target point Q in the set QiTo the position B of each Beacon Beacon in BjDistance d ofijI |, 1, 2., | Q |, j ═ 1, 2., | B |. If d isijR is less than or equal to r, the Beacon Beacon is added into the set Bc

Step 3.3.3.3 judgement of | BcIf |, is greater than or equal to 3+ n, if yes, setting I ═ TRUE; if not, setting I as FALSE; i ═ TRUE indicates that the chromosome is feasible, I ═ FALSE indicates that the chromosome is not feasible; outputting I;

step 3.3.3.4 ends.

In the step 3.6, the main function of the selection operation is to select good-quality chromosomes in the current population as parent chromosomes for generating the next generation population, and the selection operation comprises the following steps:

step 3.6.1 selection of Current population PgThe method is characterized in that the number of chromosomes in the population is x, the fitness value of the chromosomes is the lowest, x belongs to {1,2, … and N/3}, and the value of x is limited to be less than or equal to N/3, so that the limitation can ensure that x good-quality chromosomes in the current population can directly become parent chromosomes, and the problem that the current population is too similar to the next generation population due to the fact that too many chromosomes directly become parent chromosomes is solved;

step 3.6.2 Place the x chromosomes in set PtempPerforming the following steps; put Pg=Pg\Ptemp;|Pg|=N-x;

Step 3.6.3 defines population PgProbability that the ith chromosome was selected as the parent chromosome:

wherein f isiRepresents PgFitness value of the ith chromosome;

step 3.6.4 combines the interval [0, 1]]The division into N-x subintervals is as follows: [0, p ]1)、[p1,p1+p2,)、[p1+

p2,p1+p2+p3)、…、

Step 3.6.5 randomly generates a real number δ ∈ [0, 1]]If delta belongs to the ith sub-interval, P is addedgPutting the ith chromosome into a set PtempIn, i ∈ {1, 2., (N-x) };

step 3.6.6 repeat step 3.6.5 until | PtempUntil | is N;

step 3.6.7 put Pg=Ptemp

And 3.6.8 ending.

In the step 3.8, the operation of "crossing, mutation and replacement" is to generate a next generation population, so that N chromosomes in the population are more diversified to gradually approach the optimal solution, and the steps of the operation of "crossing, mutation and replacement" are as follows:

step 3.8.1 randomly dividing N chromosomes in the current population into N/2 groups, each group including two chromosomes;

step 3.8.2 interleaving: for each set of chromosomes, firstly generating a random integer tau epsilon [2, | C | -1], and then carrying out binary value interchange on two chromosomes in the set from the position tau;

step 3.8.3 mutation operation: a small probability value p is given in advancesFor each chromosome, a real number γ ∈ [0, 1] is randomly generated]If gamma is not more than psThen randomly select a value c from the chromosomeiAnd to ciThe value of (c) is inverted, i.e.:

step 3.8.4 alternative operation: and performing feasibility judgment on each chromosome by adopting a chromosome feasibility judgment algorithm. For each given chromosome C(k)And k belongs to {1, 2.,. N }, and if the returned value of the chromosome feasibility judgment algorithm is I ═ FALSE, the initial population P is randomly selected1In which a chromosomal generation is selectedReplacing the first step with a second step;

step 3.8.5 uses the N chromosomes generated after the above operation as the next generation population Pg,g∈{2,3,...,G};

Step 3.8.6 ends.

The invention has the following beneficial effects: the number of Beacon beacons is minimized on the premise of providing location services with failure tolerance, thereby reducing deployment costs.

Drawings

Figure 1 is a schematic layout of an intelligent campus (local).

Fig. 2 is a flowchart of a Beacon arranging method based on a genetic algorithm.

Detailed Description

The invention is further described below with reference to the accompanying drawings.

Referring to fig. 1, a low-cost Beacon placement method supporting failure tolerance in bluetooth terminal side positioning, the method comprising the steps of:

1) giving a propagation model of the Bluetooth signal, and deducing a relational expression between the distance between the receiving and transmitting sides of the Bluetooth equipment and the strength of the received signal;

the propagation model of bluetooth signals is as follows:

RSSI=PBeacon+GTX-Ploss+GRx (2)

wherein the content of the first and second substances,

Ploss=Pref+10lg(dη)+χ (3)

in equations (2) and (3), RSSI represents the received signal strength of the receiving side; pBeaconIndicating the transmission power of the sender; gTxAnd GRxRespectively representing the antenna gains of the transmitting side and the receiving side; plossRepresents the path loss of the signal; prefIs the reference path loss when the receiver and sender are 1m apart; d is the distance between the sender and the receiver; η is the path attenuation exponent; and χ represents the standard deviation of the environmental negative fading. According to formulae (2) and (3), we obtain:

by rhothIndicating the threshold of the received signal strength, let RSSI be rhothAnd obtaining the effective communication radius r of the Beacon as follows:

with dijRepresenting the ith target point qiAnd the jth Beacon Beacon bjIf d isijR is less than or equal to r, then the target point q isiLocated in Beacon bjI ═ 1,2,., | Q |; j ═ 1,2, ·, | B |;

2) providing a three-dimensional space trilateral positioning method; then, an optimization problem is put forward, wherein the minimum Beacon Beacon number is used as an objective function, and the failure tolerance is used as a constraint;

in the bluetooth positioning system, in order to obtain the position of any target point in a target area, it is required to ensure that the any target point can be covered by signals of at least 3 Beacon beacons. In the three-dimensional space, if the Beacon is regarded as a point, then there are numerous points with the distance d from the Beacon, and these points form a spherical surface with the Beacon as the center of sphere and the radius of d. According to the intersection or tangent relation among the 3 spherical surfaces in the three-dimensional space, the coordinates of the intersection point or the tangent point can be obtained.

The three-dimensional space trilateral positioning method comprises the following steps: three Beacon beacons b in known three-dimensional space1,b2And b3The three beacons can be regarded as the spherical centers of three spherical surfaces and the coordinates are known, which are: (x)1,y1,z1),(x2,y2,z2) And (x)3,y3,z3). Within the signal coverage of these three Beacon beacons there is a point q whose coordinates are unknown, with the coordinates being expressed as (x, y, z). Points q and b1,b2And b3The distance of (d) can be calculated by the formula (4) assuming d1,d2And d3. Thus, the following system of equations is obtained:

by solving equation set (6), the coordinates (x, y, z) of q can be obtained.

The number of Beacon beacons required by the positioning system is minimized on the premise of meeting the failure tolerance of n. Thus, an optimization problem can be established as follows:

wherein, thetaijIs an indicator variable when the target point q is reachediWith Beacon bjA distance d betweenijWhen r is less than or equal to r, thetaij1 is ═ 1; otherwise, θij=0。

3) A Beacon Beacon arrangement method based on a genetic algorithm is designed to solve the optimization problem.

The optimization problem (7) is an NP difficult problem, and can be solved by designing a Beacon Beacon arrangement method based on a genetic algorithm.

In the Beacon Beacon arranging method based on the genetic algorithm, G represents the total times of genetic evolution, PgRepresenting the G generation population, wherein G is 1, 2.

The algorithm is as follows: beacon Beacon optimal arrangement algorithm

Inputting: c, Q, N, G, N, etc

And (3) outputting: b is

Step 3.1, coding the chromosome by adopting a binary coding method;

step 3.2, putting g to 1;

step 3.3 Generation of an initial population P comprising N chromosomes Using the "initial population" algorithmg

Step 3.4, judging whether G is larger than G, if so, turning to step 9;

step 3.5 calculation of PgThe fitness value of each chromosome, namely the number of Beacon beacons corresponding to each chromosome;

step 3.6 Using the "selection" operation from population PgSelecting N superior parent chromosomes;

step 3.7, putting g to g + 1;

step 3.8 Generation of Next Generation population P Using "Cross, mutation and substitution" operationsgReturning to the step 4;

step 3.9, finding out chromosomes with the lowest fitness value in the current population;

step 3.10, setting B as { the candidate position where the Beacon is arranged }, and outputting B;

step 3.11 ends.

The flow chart of the above steps is shown in fig. 2.

In step 3.1, the "binary coding" method is as follows: the candidate position set C is considered to be a set consisting of | C | binary variables, the element C in CiThe value of (d) is either 1 or 0. If at position ciWhen Beacon Beacon is arranged, c is seti1 is ═ 1; otherwise, put ci=0,i=1,2,...,|C|。

The set C after encoding is called "chromosome". It is readily appreciated that assigning different binary values to different elements in C may result in different chromosomes. For example, assuming that there are 5 candidate positions of the Beacon in total, wherein the 1 st, 4 th and 5 th positions have Beacon arranged therein, and the 2 nd and 3 rd positions have no Beacon arranged therein, the chromosome obtained after encoding may be represented as C ═ 10011. If C is feasible, then one solution to the problem, B, is obtained1,b2,b3}={1,4,5}。

In step 3.3, at the beginning of the execution of the genetic algorithm, an initial population including N chromosomes needs to be generated, and each chromosome in the population needs to satisfy the constraint condition in the optimization problem (7), that is, any target point in the set Q must be covered by at least 3+ N signals of Beacon beacons. The "initialize population" algorithm is as follows:

the algorithm is as follows: initializing a population

Inputting: c, N, N, etc. parameters

And (3) outputting: initial population P comprising N chromosomes1

Step 3.3.1, setting k to be 1;

step 3.3.2 randomly generates a | C | bit binary number, which is then assigned to | C | elements in the set C in a bitwise corresponding manner to generate a chromosome C(k)

3.3.3, judging the feasibility of the chromosome by adopting a chromosome feasibility judgment algorithm, and if the chromosome is feasible, setting k to be k + 1; if not, returning to the step 3.3.2;

step 3.3.4 judges whether k is greater than N, if so, outputs an initial population P containing N chromosomes1={C(k)},Turning to step 3.3.5; if not, returning to the step 3.3.2;

step 3.3.5 ends.

In said step 3.3.3, the algorithm for "chromosome feasibility determination" is as follows:

the algorithm is as follows: chromosome feasibility determination

Inputting: c(k)K is equal to the parameters of {1,2,. eta., N }, N, Q and the like

And (3) outputting: indicating the variable I, if C(k)If so, then I ═ TRUE; otherwise, I ═ FALSE

Step 3.3.3.1 sets B ═ C(k)The position of the Beacon is arranged in the position;

step 3.3.3.2 calculates each target point Q in the set QiTo the position B of each Beacon Beacon in BjDistance d ofijI |, 1, 2., | Q |, j ═ 1, 2., | B |. If d isijR is less than or equal to r, the Beacon Beacon is added into the set Bc

Step 3.3.3.3 judgement of | BcIf |, is greater than or equal to 3+ n, if yes, setting I ═ TRUE; if not, setting I as FALSE; i ═ TRUE indicates chromosomal feasibility, I ═ FALSE indicates stainingColor bodies are not feasible; outputting I;

step 3.3.3.4 ends.

In the step 3.6, the main function of the selection operation is to select good quality chromosomes in the current population as parent chromosomes for generating the next generation population. The steps of the "select" operation are as follows:

step 3.6.1 selection of Current population PgThe x chromosomes with the lowest fitness value in the middle, x is equal to {1,2, …, N/3 }. It is defined herein that x is less than or equal to N/3. The limitation can ensure that x good-quality chromosomes in the current population can directly become parent chromosomes, and can avoid the problem that the current population is too similar to the next generation population due to the fact that too many chromosomes directly become parent chromosomes.

Step 3.6.2 Place the x chromosomes in set PtempPerforming the following steps; put Pg=Pg\Ptemp(ii) a Known easily, | Pg|=N-x;

Step 3.6.3 defines population PgProbability that the ith chromosome was selected as the parent chromosome:

wherein f isiRepresents PgFitness value of the ith chromosome;

step 3.6.4 combines the interval [0, 1]]The division into N-x subintervals is as follows: [0, p ]1)、[p1,p1+p2,)、[p1+

p2,p1+p2+p3)、…、

Step 3.6.5 randomly generates a real number δ ∈ [0, 1]]If delta belongs to the ith sub-interval, P is addedgPutting the ith chromosome into a set PtempIn, i ∈ {1, 2., (N-x) };

step 3.6.6 repeat step 3.6.5 until | PtempUntil | is N;

step 3.6.7 put Pg=Ptemp

And 3.6.8 ending.

In the step 3.8, the operation of "crossing, mutation and replacement" is to generate a next generation population, so that N chromosomes in the population are more diversified to gradually approach the optimal solution, and the steps of the operation of "crossing, mutation and replacement" are as follows:

step 3.8.1 randomly dividing N chromosomes in the current population into N/2 groups, each group including two chromosomes;

step 3.8.2 interleaving: for each set of chromosomes, a random integer τ e [2, | C | -1 is first generated]Then, the two chromosomes in the set are binary-value interchanged starting at position τ. For example, for a given set of chromosomes:and after crossing the two chromosomes become: and

step 3.8.3 mutation operation: a small probability value p is given in advancesFor each chromosome, a real number γ ∈ [0, 1] is randomly generated]If gamma is not more than psThen randomly select a value c from the chromosomeiAnd to ciThe value of (c) is inverted, i.e.:

step 3.8.4 alternative operation: and performing feasibility judgment on each chromosome by adopting a chromosome feasibility judgment algorithm. For each given chromosome C(k)And k belongs to {1, 2.,. N }, and if the returned value of the chromosome feasibility judgment algorithm is I ═ FALSE, the initial population P is randomly selected1Selecting a chromosome to replace;

step 3.8.5 uses the N chromosomes generated after the above operation as the next generation population Pg,g∈{2,3,...,G};

Step 3.8.6 ends.

In the invention, the Bluetooth terminal side positioning system mainly comprises the following two types of equipment: beacon beacons and terminal devices. The Beacon can be arranged in a candidate position with known coordinates, and the terminal device is positioned in the target area. With the set C ═ C1,c2,…,c|C|Denotes the set of candidate positions of the Beacon, element ciRepresents the ith candidate position, i ═ 1, 2., | C |; candidate position ci0 or 1 Beacon may be arranged. With set B ═ B1,b2,...,b|B|Denotes the set of positions of the arranged Beacon beacons, known,

furthermore, the target area is divided into a number of square grids of length l on a side, as shown by the red squares in fig. 1. Assuming that the three-dimensional space position of the terminal device is just vertically projected on the central point of the grid, the central point of the grid is the target point to be located. With the set Q ═ { Q ═ Q1,q2,...,q|Q|Denotes a set of target points. The side length l of the square grid can be properly adjusted according to the precision requirement. When the accuracy requirement is higher, the length of/can be reduced to increase the number of grids and vice versa.

The fault tolerance of the positioning system is denoted by n, which is 0,1, 2. When n is 0, the positioning system is not tolerant to failure; when n >0, it means that the positioning system can tolerate at most n Beacon failures. The value of n may be determined in advance before the positioning system is deployed.

In order to provide reliable positioning service with failure tolerance n, any target point in the set Q must be covered by at least the signals of 3+ n Beacon beacons, that is, when there are n Beacon failures in the positioning system, any target point in the set Q can still be covered by at least the signals of 3 Beacon beacons.

In summary, the problems to be solved by the present invention can be summarized as follows: given set C, Q and the failure tolerance n, the set of positions B of the disposed Beacon beacons is found and the value of | B | is as small as possible.

The embodiments described in this specification are merely illustrative of implementations of the inventive concepts, which are intended for purposes of illustration only. The scope of the present invention should not be construed as being limited to the particular forms set forth in the examples, but rather as being defined by the claims and the equivalents thereof which can occur to those skilled in the art upon consideration of the present inventive concept.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于WiFi网络日志挖掘的人员聚集感知方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类