Disclosure of Invention
The invention provides an RFID (radio frequency identification) indoor multi-target positioning system and method based on carrier phases, which can utilize RFID passive tags to finish multi-target identification and realize 3D (three-dimensional) positioning of a plurality of passive tags, the positioning system is flexible to deploy, and the system can provide high-precision positioning information only by attaching one passive tag to a positioning target.
In order to achieve the purpose, the invention is realized by the following technical scheme:
an RFID indoor multi-target 3D positioning system based on carrier phase;
an RFID indoor multi-target 3D positioning system based on carrier phases comprises an RFID reader-writer, a one-transmitting multi-receiving frequency hopping transceiver, a plurality of RFID passive tags, a plurality of antennas, a kilomega switch, a data processing terminal, a plurality of kilomega network cables and a plurality of radio frequency cables.
The indoor positioning system is based on an RFID technology, the indoor positioning system based on the RFID adopts a frequency hopping technology, an RFID reader-writer of the indoor positioning system based on the RFID is responsible for establishing communication with an RFID passive tag and realizing multi-tag anti-collision, a frequency hopping transceiver of a multi-transceiver of the indoor positioning system based on the RFID is composed of a Radio frequency signal transmitting end and a plurality of Radio frequency signal receiving ends, one transmitting end of the frequency hopping transceiver of the multi-transceiver is composed of a Software Defined Radio (SDR) device connected to an antenna through a Radio frequency cable, a plurality of receiving ends of the frequency hopping transceiver of the multi-transceiver are composed of a plurality of Software Defined Radios (SDR) devices connected to a plurality of antennas through Radio frequency cables, and the transmitting end and the receiving end of the frequency hopping transceiver of the multi-transceiver are connected to a data processing terminal through a gigabit switch and a gigabit network cable, and the data processing terminal of the RFID-based indoor positioning system is responsible for controlling hardware control and subsequent data processing and positioning.
Optionally, the model of the RFID reader-writer is Impinj R420;
optionally, the RFID passive tag model is a commercial tag Impinj M4H 47;
optionally, the antenna model is a VERT 900 omnidirectional antenna;
optionally, the model of the SDR device is Universal Software Radio Peripheral (USRP) N210;
optionally, the gigabit switch has a model number TL-SG 1005D;
optionally, the data processing terminal is configured as an i7-9700 processor, a 16G operating memory, and a storage device containing codes required for controlling the SDR device to perform 3D frequency hopping, pre-process the received signal, and perform a subsequent positioning algorithm;
the invention provides a carrier phase-based RFID indoor multi-target 3D positioning method;
an RFID indoor multi-target 3D positioning method based on carrier phase comprises the following steps:
(1) the RFID reader-writer is used for establishing communication with all RFID passive tags in a positioning range and realizing anti-collision, so that only one passive tag can communicate at the same time;
(2) and acquiring reflected signals of the RFID passive tag under a plurality of different frequency point carriers by using a frequency hopping technology. Because the communication equipment uses IQ modulation, and only one tag is in a communication state at the same time, an Electronic Product Code (EPC) of the current communication tag can be analyzed from a tag reflection signal, and because the frequency hopping frequency and the time interval of the SDR equipment are controllable, the reflection signal corresponding to each frequency point of the current communication tag can be stored in a frequency point manner;
(3) and (3) completing multi-target 3D positioning by utilizing a Joint Particle Swarm Optimization (JPSO).
Further, in the step (3), the JPSO algorithm includes the specific steps of:
firstly, grouping particle swarms according to the number of EPCs solved by a system after one round of frequency hopping is finished, wherein each group is responsible for positioning one target;
secondly, initializing the position and the speed of each particle, then performing iterative computation, wherein in each iteration, each particle respectively computes a distance weight and a direction weight according to multi-frequency point reflection Signal information of a positioning target in charge of a group, a multi-carrier phase ranging principle and a multi-Signal Classification (MUSIC) algorithm principle, and moves according to a computation result;
thirdly, after each iteration is finished, the JPSO algorithm updates the historical optimal coordinates of each particle and the global optimal coordinates of each group according to the weight calculation result, and performs 'double-shock' counting update on each group according to the global optimal coordinates update condition of each group, if the counter reaches a certain value, the group of particle swarm triggers 'double-shock', the position and the speed are randomly distributed again, other groups are not influenced, and the iteration continues;
and finally, when the iteration is finished, each group of historical global optimal coordinates recorded by the JPSO is the multi-target positioning result.
The invention has the beneficial effects that:
(1) the positioning system has simple integral framework and flexible deployment, does not need complicated pre-calibration of equipment, and can be applied to most typical indoor environments;
(2) by means of the technical advantages of RFID, the method can realize target distinguishing and positioning only by attaching RFID tags with extremely low cost to a plurality of targets to be positioned, and the targets to be positioned do not need to carry other equipment;
(3) the JPSO algorithm can realize 3D status for a plurality of targets, omits the geometric retrieval process in the traditional positioning, and has higher positioning speed and higher timeliness;
(4) in the positioning method, the JPSO algorithm considers the situation that when the number of positioning targets is increased and the number of Particle swarms in each group is too small, the situation is easy to fall into local optimization, and provides a 'double-shaking' mechanism aiming at the situation, so that the dependence of the positioning precision of the traditional Particle Swarm Optimization (PSO) on the number of iterations and the number of Particle swarms is reduced, and the timeliness of the system is further improved.
Detailed Description
The invention will be described in further detail with reference to the accompanying drawings. The embodiment described is only one embodiment of the invention, and not all embodiments.
The invention provides a system and a method for RFID (radio frequency identification) indoor multi-target 3D positioning based on carrier phase, and the system structure is shown in figure 1. In this embodiment, the reader in the figure uses Impinj R420 and one VERT 900 omnidirectional antenna, Tag uses a plurality of Impinj M4H47 RFID passive tags, the radio frequency signal transmitting end uses one USRP N210 and one VERT 900 omnidirectional antenna, the radio frequency signal receiving end uses four USRP N210 and four VERT 900 omnidirectional antennas to respectively build 4 receiving ends, the signal of the switch is TL-SG1005D, the positioning server is a data processing terminal, and is configured as a 16G running memory and an i7-9700 processor, and in addition, an external clock source with a model number of OCTOCLOCK-G CDA-2990 is used for USRP device synchronization in this embodiment.
When the method is used, all tags participating in positioning are ensured to be allocated with independent EPCs (the tags can be actively allocated with EPCs by a reader-writer), and then the tags are attached to the surfaces of a plurality of targets to be positioned, and a positioning system is started. In this embodiment, the frequency hopping band of the radio frequency signal receiving end and the radio frequency signal transmitting end of the positioning system is 830MHz to 960MHz, the frequency hopping interval is 10M, the frequency hopping interval is 50ms, the reader/writer can establish communication with each Tag, and ensure that at most one Tag is in a communication state at each moment, the Tag in the communication state can modulate and reflect a pure frequency hopping carrier signal sent by the radio frequency signal transmitting end, the radio frequency signal receiving end can receive a Tag reflection signal and upload data to the positioning server through the gigabit switch, the positioning server can analyze the EPC of the current reflection signal, then store the reflection signal information according to the EPC frequency dividing point, and start to execute the JPSO positioning algorithm.
In the JPSO algorithm flow chart of FIG. 2, the detailed steps for realizing the algorithm are as follows:
the method comprises the following steps: the JPSO algorithm is initialized. After one round of frequency hopping is finished, M EPCs are analyzed, the maximum iteration number of a JPSO algorithm is W, the number of particle swarm particles is G, the G particles are divided into M groups, each group of G/M particles has two attributes of position and speed, and during initialization, the positions and the speeds of all the particlesThe degrees will be randomly assigned. Note that the position of the g-th particle is posg,m=(xg,yg) Velocity vg=(vxg,vyg) And m is the group number of the particle g, and after the initialization is completed, the iteration of the JPSO algorithm is started.
Step two: and (4) multi-target 3D positioning. In the JPSO algorithm iteration process, the position pos of the particle gg,mPos 'in a Next State'g,mThe update formula is:
pos'g,m=posg,m+vg=(xg+vxg,yg+vyg,zg+vzg) (1)
accordingly, vgA lower state v'gThe update formula is:
v'g=α*vg+cpb*(pbg-pos'g)+cgb*(gbm-pos'g) (2)
wherein alpha represents the velocity v of the particle g in the previous stategInfluence factor of cpbThe influence factor, coordinate pb, representing the historical optimum position of the particlegRepresenting the historically optimal position of the particle g, equivalent to the local optimum in FIG. 2, cgbRepresenting a globally optimal influencing factor, coordinate gbmThe global historical optimal position representing the mth group is equivalent to the global optimal position in fig. 2.
In the w-th iterative calculation, pbgThe update formula of (2) is:
where F (x, y, z) is a weight calculation function, and its parameters are coordinate points. On the first iteration, pbg=posg,m(ii) a In subsequent iterations, if the current position pos of the particle gg,mWeight by F (x, y, z) greater than pbgThe weight of the current recording position obtained by F (x, y, z), namely F (pos)g,m)>F(pbg) Then pb willgThe recorded position is updated to the current position of the particle g, otherwise pbgRemain unchanged. Accordingly, gbmThe update formula of (2) is:
on first iteration, gbm(0,0, 0); in subsequent iterations, gbmUpdate rule of pbgSame, but pbgOnly the change in position of the corresponding particle g is monitored, and gbmThe position change of all particles in the m-th group is monitored.
Further, the specific formula of F (x, y, z) is:
let the antenna connected to the ith receiving terminal in the RF signal receiving terminal in FIG. 1 be antenna i, then Dij(x, y, z) represents the coordinate (x, y, z) versus the directional weight of the antenna i and antenna j pair, Ti(x, y, z) represents the distance weight of the coordinate (x, y, z) to the antenna i. Dij(x, y, z) and Ti(x, y, z) does not really realize direction finding and distance measuring, but respectively calculates respective weights by using the MUSIC direction finding principle and the multi-carrier phase distance measuring principle, wherein DijThe larger (x, y, z) represents the closer the coordinates (x, y, z) are to the actual direction of the positioning target, TiThe smaller (x, y, z) the link distance representing the coordinates (x, y, z) is closer to the target actual link distance.
First consider Dij(x, y, z). As one of the classical direction finding algorithms, the MUSIC algorithm strictly demonstrates the orthogonal relationship between a signal subspace and a noise subspace, and realizes the super-resolution retrieval of the signal incidence angle on the basis of the orthogonal relationship. The signal incidence scenario of the MUSIC algorithm is shown in fig. 3, and the antenna array at the radio frequency signal receiving end is a uniform linear array, wherein N receiving antennas are provided, and the spacing between the receiving antennas is d, then the angle of incidence search equation of the MUSIC algorithm is as follows:
where θ is the angle search result, i.e. the signal incident angle, U is the noise subspace extracted by the MUSIC algorithm, α (ψ) is the directional response vector established by the current search angle ψ and the antenna array, c is the speed of light, f is the current signal center frequency, (.)TRepresenting a matrix or vector transpose.
The anti-collision mechanism of the EPC G2 protocol ensures that only one Tag is in communication at the same time, so that the MUSIC algorithm can independently extract the noise subspace of each Tag reflected signal according to IQ two-way amplitudes stored by different EPCs under each receiving antenna, thereby completing the incident direction retrieval of all tags in sequence, namely the number of the information sources is always 1 in the retrieval process, N only needs to be more than or equal to 2 to meet the requirement that the number of the antennas is more than that of the information sources when the MUSIC is retrieved, but the traditional MUSIC algorithm only uses single frequency points, which can reduce the utilization rate of multi-frequency point signals of a frequency hopping system.
Now, the B frequency points are used in common, and the antenna i and the antenna j obtained by the MUSIC algorithm are recorded at fbThe lower Tag reflection signal noise subspace is Uij,b,Uij,all=[Uij,1,Uij,2,...,Uij,B]Represents the set of all frequency point noise subspaces of antenna i and antenna j, DijThe specific formula of (x, y, z) is:
wherein diag (. cndot.) represents taking the diagonal elements of the matrix and arranging them into a row vector, βijA directional response matrix is represented, which is specified as follows:
βij=[β1,β2,...,βb,...,βB]
where dis (i, x, y, z) represents the distance of antenna i from the coordinates (x, y, z), which can be obtained using the Pythagorean theorem. In order to make the best use of the frequency hopping signal,expanding the direction response vector used in the traditional MUSIC algorithm retrieval in the formula (6) into a direction response matrix to obtain betaij,βijOf each column vector betabRepresents the directional response vector of the antenna i and the antenna j under the b frequency point, and because the positions of all the antennas and each particle are known, the beta valuebThe distance difference can be directly calculated, and the angle search in the formula (6) is omitted.
According to the MUSIC algorithm, since the number of antennas in the antenna sub-array is 2, the number of search information sources is 1, and the number of frequency points is B, U is adoptedij,allIs a 2 × B matrix, and betaijAlso 2 × B matrix, and further beta in formula (7)ij T*Uij,allThe results are:
in a similar manner, in formula (7)
The results are:
the denominator of equation (7) results in:
in formula (11), resbThe norm is just obtained for the direction response vector and the noise subspace of the same frequency point, and the method is the same as the direction retrieval mode of the MUSIC algorithm in the formula (6), but the comprehensive direction-finding result of coordinates (x, y, z) of all frequency points can be obtained by the formula (11), the frequency hopping information is fully utilized, and the condition that the noise subspaces of different frequency points are possibly different is avoided.
Equation (11) is inverted to obtain equation (7), and the larger the value of equation (7), the closer the coordinate (x, y, z) is to the positioning target direction, while equation (11) does not realize true direction finding, but calculates the direction weight of coordinate (x, y, z) in F (x, y, z).
Now consider Ti(x,yZ) is calculated. Because the receiving end of the radio frequency signal can only obtain [ -pi, pi [ -]When the signal flight distance exceeds the signal wavelength, the resulting signal phase will contain the integer ambiguity. To estimate the signal link distance, the influence of integer ambiguity needs to be eliminated by using multi-frequency point carrier phase.
Let a complete frequency hopping period contain B frequency points, then the frequency point vector F is:
F=[f1,f2,…,fb,…fB] (12)
make the antenna i in the receiving end of the radio frequency signal at the frequency point f
bTa obtained below
gThe IQ amplitude of the reflected signal is Q
Tag,fbAnd I
Tag,fbThen its corresponding phase
Can be expressed as:
the frequency hopping time is very short, and the flight time t of the Tag reflection signal under each frequency point is considered to be not moved in one frequency hopping period
rAre all the same, i.e.
Can be expressed as:
where mod (A, B) represents the remainder of A on B. Now using the multi-carrier phase pair trAnd (3) estimating:
wherein the search range of t' is0 to T. In the retrieval process, when the formula (15) obtains the minimum value, the residual phase obtained after the time of flight t 'of all frequency points is closest to the actual receiving phase of the radio frequency signal receiving end, namely the t' at the moment is considered to be trThe estimation result is multiplied by the speed of light, and then the estimated value of the link distance of the Tag reflected signal can be obtained, wherein the distance is the distance from the radio frequency signal transmitting end to the Tag reflected signal and then to the receiving antenna in fig. 1.
According to formula (15), T is providediThe specific formula of (x, y, z) is:
where dis (Tx, x, y, z) represents the distance from the transmitting end of the rf signal to the coordinates (x, y, z) in fig. 1, and dis (i, x, y, z) represents the distance from the receiving antenna i to the coordinates (x, y, z) in fig. 1. Because the actual reflected signal phase of each frequency point of Tag received by the antenna i
As known, the flight time of the Tag reflected signal is the total flight time from the radio frequency signal transmitting end to the Tag reflection and then to the antenna i, so after the total link distance is obtained, the phase of each frequency point signal in a period received by the antenna i under the distance is simulated
Then the phase of the signal with the actual phase
Calculating the error of each frequency point by taking the difference, and taking the sum of absolute values of the errors as T
i(x, y, z) results.
Because the Tag reflected signal link is a broken line and the link distance is fixed, an ellipse can be obtained by taking the radio-frequency signal transmitting end and the antenna i as the focal points, and the closer the coordinates (x, y, z) are to the ellipse, the corresponding TiThe smaller the (x, y, z) value will be. And Dij(x, y, z) are analogous, Ti(x, y, z) also does not really achieve ranging, but calculates the distance weight of the coordinates (x, y, z) in F (x, y, z).
By this, the calculation of F (x, y, z) is completed.
Step three: the "heavy shock" mechanism. The process of solving the optimal solution by the PSO algorithm can be approximately regarded as the process of particle swarm convergence, but most particles may occasionally converge in a certain wrong area, the converged particles cannot jump out of the area under the constraint of a particle swarm position updating mechanism, other discrete particles are attracted, and finally the PSO algorithm obtains a wrong solution, and at the moment, the PSO algorithm is considered to be trapped in local optimization.
When the number of the particles in each group is reduced when the number of the positioning targets is increased, the probability that the PSO algorithm is involved in the local optimization is increased, and in order to avoid the situation, a 'heavy shock' mechanism is introduced into the system.
The "re-vibration" mechanism will assign two counters, gCon, to each particle groupmAnd lConmWherein, gConmFor recording "heavy shock" front gbmNumber of iterations of successive stop updates, lConmFor "heavy shock" rear gbmContinuously stopping the updated iteration times; and introduce L _ gbmFor recording gbmThe historical optimal solution of (a).
Wherein, gConmThe update formula of (2) is:
lConmthe update formula of (2) is:
L_gbmthe update formula of (2) is:
i.e. gConmAnd lConmWhether or not to return to zero depends on L _ gbmWhether or not to update, and L _ gbmIs then dependent on gbmWhether an update has occurred. On first iteration, L _ gbmAnd gbmThe same is true.
When a certain group of particle swarm is trapped in local optimum, the PSO algorithm is expressed as gb corresponding to the groupmStop updating, so the system proposes L _ gbmMonitoring gbmTo cope with two situations:
first, gbmThe update is stopped. At this time, L _ gbmThe update is also stopped, resulting in F (gb)m)=F(L_gbm),gConmStart counting when gConmWhen the maximum count value is reached, the system considers that the group of particle swarms is in local optimum, the're-shaking' mechanism is triggered, all the particles with the group code m can be randomly distributed with position and velocity vectors again, and L _ gbmThe value remains unchanged, gConmAnd lConmReturn to zero, gbmGo back to (0,0), then proceed to the next iteration as normal; in gConmUntil the maximum count is reached, as long as L _ gbm is updated, gCon will be updatedmReturn to zero and the iteration continues.
Second, a "heavy shock" mechanism triggers. At this time gbmRecording will be resumed from (0,0,0) due to L _ gbmThe value is unchanged as long as F (gb)m)<F(L_gbm),lConmWill continue to count when lConmWhen its maximum count value is reached, the system triggers a "re-shake" again; in lConmBefore the maximum count is reached, as long as L _ gbmWhen update occurs, gCon will be updatedmAnd lConmReturn to zero and the iteration continues. lConmCan effectively prevent the convergence from being too slow due to too poor random position of the particle swarm after the 'heavy shock' is triggered, or the convergence is too slow at the L _ gbmAnd the local optimum is trapped before the update is triggered.
After W iterations are finished, L _ gbmThe position, i.e. the position estimate for each of the M objects, is recorded. Thus, multi-target 3D positioning is completed. The above-mentioned embodiments are merely preferred embodiments of the present invention, which are not intended to limit the present inventionThe scope of protection is not limited to the embodiments described above, and all equivalent substitutions, modifications, etc. made by the disclosure of the present invention should be included in the scope of protection of the present invention for those skilled in the same field.