Summary of the invention
The shortcoming that the object of the invention is to overcome prior art, with not enough, provides a kind of indoor orientation method based on rotating antenna, has realized indoor single-point location, has overcome because node is many, the defect of error that indoor complex environment causes stack.
Object of the present invention is achieved through the following technical solutions, and a kind of indoor orientation method based on rotating antenna, comprises the following steps:
Step 1, set a reference mode, set up one and take the two-dimensional coordinate system that described reference mode is initial point, described two-dimensional coordinate system comprises transverse axis and the longitudinal axis; Node to be measured drops in the plane of two-dimensional coordinate system, and between node to be measured and reference mode, the angle of line and transverse axis is orientation angle, and the distance between node to be measured and reference mode is orientation distance;
Step 2, at described reference mode, place rotating antenna, in the process rotating a circle at rotating antenna, the corresponding angle of maximum signal that node to be measured receives is orientation angle; The difference of the maximum signal receiving by witness mark node transmit signal strength and node to be measured is calculated deamplification intensity, according to the transmission frequency of deamplification intensity and reference mode, calculates orientation distance;
Step 3, by described orientation angle and orientation distance, calculate the two-dimensional coordinate that node to be measured is fastened at two-dimensional coordinate, so that node to be measured is positioned.
In the step 2 of the above-mentioned indoor orientation method based on rotating antenna, the expression formula of compute location distance is:
L=10 ∧ [(P
_{send}-P
_{receive}-20Log(f)-36.6)/20]
Wherein L is orientation distance, P
_{send}for transmit signal strength, P
_{receive}for the maximum signal receiving, f is transmission frequency.
In step 2, described rotating antenna is directional antenna.
In the process that step 2 rotates a circle at rotating antenna, described node to be measured is sampled to the signal intensity of rotating antenna, and the signal intensity analysis that sampling is obtained show that signal intensity is constantly maximum, according to described maximum, constantly calculate node to be measured with respect to the phase information of reference mode, then obtain orientation angle according to phase information.
After having located, the more described two-dimensional coordinate calculating in step 3 is analyzed, analyzed the measuring error size of its node to be measured and the deviation of directivity of corresponding two-dimensional coordinate, so that the position of the node to be measured recording is proofreaied and correct.
Principle of work of the present invention: the present invention is by the reference mode of single known location, realized the location to node to be measured, reference mode carries out respectively the measurement of relative angle and relative distance to node to be measured, the rotating antenna algorithm that the measurement of angle is mentioned by the present invention is realized, the measurement of distance adopts a kind of distance and the algorithm of energy relationship model to realize, and to taking measurement of an angle and apart from calculating, realizing the location to node to be measured; Algorithm of the present invention is at two-dimensional coordinate planar development, form with geometric coordinate provides positioning result, analyze theoretically based on WLAN (wireless local area network) and locate related algorithm, by means of distance and algorithm and the geometric algorithm of the model of energy relationship, realize position fixing process, whole location positioning procedure is divided into this three phases of measuring phases, positioning stage and calibration phase, the target of positioning system of the present invention is that mobile device is positioned, and has realized following function:
(1) can scan the WAP (Access Point is called for short AP) in LAN (Local Area Network);
(2) can read the RSS value of AP;
(3) can and read the RSS value storage in database;
(4) can judge the region at mobile device place;
(5) derive two-dimensional direct angular coordinate;
(6) import angle geometric algorithm, find out region intersection point;
(7) realize location.
The present invention has following advantage and effect with respect to prior art:
(1) significantly improved the degree of accuracy of location; The present invention, in conjunction with indoor wireless local area network environment, from single-point location, builds location implementation.Position fixing process is divided into this three phases of modelling phase, measuring phases and positioning stage.First stage is the modelling phase, sets up a two-dimensional coordinate system that comprises location node and reference mode, and subordinate phase is measuring phases, in conjunction with directional antenna principle, measures the signal intensity that node to be measured receives, and records ceiling capacity and corresponding rotational time.Phase III is positioning stage, by measured data, in conjunction with fingerprint identification technology, calculate impact point and euclidean distance between node pair to be measured and corresponding phase poor, after having located, also location structure is proofreaied and correct, according to experimental result error, carry out algorithm adjustment, to reach more accurately location, the present invention meets indoor wireless local area network layout, signal attenuation while having avoided passing through cement wall, degree of accuracy is significantly improved.
(2) the error stack of having avoided multipoint positioning to bring, the present invention is in conjunction with existing network environment and can realize easy degree, proposed a kind of based on WLAN (Wireless Local Area Networks, abbreviation WLAN) single-point indoor positioning scheme, the error that this scheme relies on single-point to locate to reduce to cause due to indoor complex environment superposes, the present invention is at matrix experiment chamber (Matrix Laboratory, abbreviation MATLAB) on platform, indoor positioning scheme is carried out to analog simulation, experimental result and reference point actual value compare analysis, and experimental result is shown: the indoor positioning scheme that the present invention proposes based on WLAN has higher degree of accuracy, particularly in indoor complex environment, position fixing process has been avoided the error stack that multipoint positioning is brought like this.
(3) the present invention has realized the single-point location on two-dimensional coordinate; The rotating antenna algorithm that the present invention proposes, has realized the single-point location on two-dimensional coordinate.
Embodiment
Below in conjunction with embodiment and accompanying drawing, the present invention is described in further detail, but embodiments of the present invention are not limited to this.
Embodiment
The present embodiment comprises the steps:
Step 1, as shown in Figure 1, sets a reference mode, sets up one and take the two-dimensional coordinate system that described reference mode is initial point, and described two-dimensional coordinate system comprises transverse axis and the longitudinal axis; Node to be measured drops in the plane of two-dimensional coordinate system, and between node to be measured and reference mode, the angle of line and transverse axis is orientation angle, and the distance between node to be measured and reference mode is orientation distance;
Step 2, at described reference mode, place rotating antenna, in the process rotating a circle at rotating antenna, the corresponding angle of maximum signal that node to be measured receives is orientation angle, the difference of the maximum signal receiving by witness mark node transmit signal strength and node to be measured is calculated deamplification intensity, according to the transmission frequency of deamplification intensity and reference mode, calculates orientation distance, method is: described orientation angle is that maximum angle corresponding to ceiling capacity recording while rotating a circle by node perceived reference mode to be measured (being rotating antenna) draws, rotating antenna starts rotation from 0 degree of setting, node to be measured starts to record the corresponding angle of rotary course from zero moment simultaneously, after rotating antenna rotates a circle, node to be measured shows the coordinate axis information in received energy and two-dimensional coordinate plane corresponding to rotational time, the maximum energy value of the energy distribution showing by node to be measured, calculate the orientation angle and the orientation distance that need measurement, described orientation distance is by a kind of distance, to realize ceiling capacity with the algorithm of energy relationship model to measure, and calculate orientation distance according to described ceiling capacity,
Step 3, by described orientation angle and orientation distance, calculate the two-dimensional coordinate that node to be measured is fastened at two-dimensional coordinate, so that node to be measured is positioned.
In described step 2, the expression formula of compute location distance is:
L=10 ∧ [(P
_{send}-P
_{receive}-20Log(f)-36.6)/20]
Wherein L is orientation distance, P
_{send}for transmit signal strength, P
_{receive}for the maximum signal receiving, the transmission frequency that f is rotating antenna, the detailed process of location is carried out in two-dimensional coordinate plane: the setting coordinate of reference mode, be (0,0), the setting coordinate of node to be measured, be unknown coordinates (x, y), arrival when the sampling antenna of node to be measured rotates a circle, energy, to draw, be up to Danone and the maximum time value that arrives, imported two-dimensional coordinate algorithm, and by measuring phase differential and the range difference between node to be measured and known node, calculate node to be measured at the two-dimensional coordinate of two-dimensional coordinate system.
In described step 2, the measurement of described orientation angle completes by phase information measurement, the measuring method of described orientation distance adopts radio wave energy damped method, by recording the difference of reference mode end transmit signal strength and node side received signal strength to be measured, calculate deamplification intensity, according to deamplification intensitometer, calculate orientation distance.
In described step 2, described rotating antenna is by a fixed angular speed rotation, in one-period, do the wireless environment scanning of 360 degree, to find node to be measured, described rotating antenna has fixing cycle and fixing angular velocity of rotation, within a week, the signal intensity that described node to be measured rotates a circle and receives according to antenna, show that node to be measured is with respect to the direction of reference mode.
In described step 2, as shown in Figure 3, described rotating antenna is directional antenna, and the sweep limit of described directional antenna is limited in certain little angle, as shown in Figure 4, has stronger radiation signal in the scope of its radiation, radiationless signal beyond the scope of its radiation.
In described step 2, modeling process chart as shown in Figure 2, wherein said node receiving end to be measured carries out signal intensity collection to reference mode rotating antenna by certain frequency, sampling period is that antenna rotates a circle the used time, the signal intensity that node to be measured obtains sampling is simultaneously done intellectual analysis, show that signal is constantly maximum, and record the maximum signal that this is constantly sampled and obtains simultaneously, according to described maximum, constantly calculate node to be measured with respect to the phase information of reference mode, then obtain orientation angle according to phase information.
Described step 2 comprises the following steps:
(1) computing reference node side antenna transmission power and node side antenna reception to be measured are to the energy difference between the power of maximum signal;
(2) according to energy loss formula and described maximum signal, calculate the orientation distance between node to be measured and reference mode;
(3) maximum angle corresponding to ceiling capacity recording while rotating a circle by node perceived rotating antenna to be measured calculates orientation angle.
In described step 2, rotating antenna is with the rotation of constant angular velocity, and node to be measured maintains static, and when t1 position and nodal distance to be measured are when nearest, the energy receiving is maximal value; Antenna rotates with angular velocity, and sense of rotation is clockwise direction, by time corresponding to ceiling capacity and angular velocity of rotation, can obtain needing the arrival angle of measurement, as orientation angle, is denoted as θ, wherein θ=v* Δ t.Δ t=t
_{x}mod (360 ° of ÷ v), θ
_{x}=v*[t
_{x}mod (360 °) ÷ v], t wherein
_{x}moment value during for ceiling capacity (being maximum signal), it really normal root according to the mensuration of ceiling capacity, by maximum time of arrival and angular velocity of rotation, can determine the phase information that location is required.Antenna rotation in the present invention and receiving end are measured and are kept strict synchronous, but are not very high to the requirement of time, and common time synchronized operation can meet.
In described step 2, described orientation distance is by distance, to realize ceiling capacity with the algorithm of the model of energy relationship to measure, and calculate according to the energy recording, the present invention adopts radio wave energy damped method as beasurement base, radio wave energy damped method records transmit signal strength and received signal strength, subtract each other and obtain deamplification intensity, according to this, calculate to obtain reference mode and internodal orientation distance to be measured:
p=20Log(L)+20Log(f)+36.6
Wherein L is reference mode and internodal orientation distance to be measured, and p is the energy loss value from transmitting terminal to receiving end, and f is that megahertz launches wave frequency.The in the situation that of known p and f, can calculate the value of L, wherein the following formula of the measurement of p is described:
P
_{accept}=P
_{send}-p=P
_{send}-20Log(L)+20Log(f)+36.6
Wherein receive signal energy and equal transmitted signal energy and deduct communication process loss of signal energy, transmitted power is made as a fixing given value, and the signal energy of reception is the peak signal energy that sampling obtains for a week, can draw so the value of p, further obtains L value:
L=10 ∧ [(P
_{send}-P
_{receive}-20Log(f)-36.6)/20]
The interference of the existence of considering the barriers such as wall in actual environment to signal, adopts wall attenuation coefficient model as described below, sets up signal attenuation and distance relation, and concrete model is as follows:
$P\left(d\right)\left[\mathrm{dBm}\right]=P\left({d}_{0}\right)\left[\mathrm{dBm}\right]-10\mathrm{nlo}{g}_{10}\left(\frac{d}{{d}_{0}}\right)-\left\{\begin{array}{c}\mathrm{mW}\×\mathrm{WAF},\mathrm{nW}<C\\ C\×\mathrm{WAF},\mathrm{nW}\≥C\end{array}\right.$
Wherein, the path attenuation index that n is signal, the signal intensity when signal sending for reference distance place arrives base station; D is the distance between mobile node and base station, is the wall number between mobile node and base station; C is biggest obstacle thing (wall) number that decay factor is changed; My wall attenuation coefficient factor of WAF.Generally, n and WAF rely on and the structure of building and the material of use, can use experience value.The distance of the real-time computing node of above formula and base station, according to the actual signal intensity recording, is used in base station.
The concrete position fixing process of described step 3 is as follows: positioning stage is recording on the basis that arrives distance and arrival angle, further import algorithm, determine node coordinate to be measured, it is (0 that position rotating antenna coordinate is set, 0), the coordinate of node to be measured is (x, y), and location algorithm is unfolded as follows under two dimensional surface:
First, import two-dimensional geometry algorithm coordinate, find out moving target.
(1) each some definition vector:
R=[R1,R2,…,Rn],Ri=(MAOA,MRSS,APi)
(2) from reference angle, rotate to the energy maximum angular time:
ΔT=T?max-T0
Also can be denoted as: Ri=(Δ Ti, MRSS, APi) wherein: MRSS is the ceiling capacity of rotating antenna while rotating a circle, and MAOA corresponding anglec of rotation when arriving ceiling capacity, is called Maximum Acceptance Angle degree.APi is indoor node AP label, and R is the set of matrices of all node corresponding informances, and T0 is the initial time of antenna rotation, and Tmax is the time of rotating while arriving ceiling capacity, and Δ T is the time used.
Reference mode is denoted as (x
_{1}, y
_{1}), by measuring, learn the value of orientation distance L and orientation angle θ, according to geometric coordinate formula, can calculate and draw node to be measured:
x
_{2}=L*cosθ
(x
_{2},y
_{2})y
_{2}=L*sinθ
Known L=10 ∧ [(P
_{send}-P
_{receive}-20Log(f)-36.6)/20], θ
_{x}=v*[t
_{x}mod (360 ° of ÷ v)], draw:
X
_{2}=10 ∧ [(P
_{send}-P
_{receive}-20Log(f)-36.6)/20] * cos[v* (t
_{x}mod (360 ° of ÷ v))]
Y
_{2}=10 ∧ [(P
_{send}-P
_{receive}-20Log(f)-36.6)/20] * sin[v* (t
_{x}mod (360 ° of ÷ v))]
Wherein: P
_{send}for transmit signal strength, P
_{receive}for maximum signal, the f receiving is that transmission frequency, v are for selecting angular velocity, t
_{x}time value when maximum angle being detected.Coordinate displayed value is positioning result derivation value, in measuring phases by the receiving end corresponding arrival energy constantly while showing that antenna rotates a circle of sampling, by sampling, within one week, draw and be up to Danone and the maximum time value that arrives, and imported positioning stage, import two-dimensional coordinate algorithm, at positioning stage, by measuring phase differential and the range difference between node to be measured and known node, finally draw node coordinate to be measured, complete location.
For the degree of accuracy that guarantees that the present invention locates, also the positioning result recording is carried out to error correction.After having located, again the coordinate information recording in step 3, compare with actual coordinate nodal information, analysis is to the measuring error size of node to be measured and the deviation of directivity of corresponding two-dimensional coordinate, so that the position of the node to be measured recording is proofreaied and correct, the possible outcome of error has following three kinds:
(1) phase deviation: need to adjust while rotating zero and the time of sampling and starting.Solution: Maximum Acceptance Angle degree is corresponding constantly as unknown parameter, node actual coordinate value to be measured as a result of, substitution ranging formula, the t value of trying to achieve and maximum comparison time of arrival, get the mistiming, postpones and adjust the start time of sampling.
(2) range deviation: because weak the causing of signal that indoor complex environment causes, solution can, by attenuation coefficient model, by this model substitution net result, be tried to achieve WAF decay factor coefficient.The weak decay bringing of signal be can avoid, destination node and internodal distance error to be measured namely reduced.
(3) distance, phase place, while deviation: minute two kinds of possibilities, a kind of is because sampling ceiling capacity is made mistakes, and causes maximum time and ceiling capacity to be made mistakes simultaneously, needs to check positioning system.Another kind is the combination of above-mentioned two kinds of errors, like this need carry out respectively twice data acquisition to model, then the formula of substitution simultaneously composition system of equations, records respectively sampling time and decay factor value.
Positioning error is proofreaied and correct and need to be repeated test, repeatedly proofreaies and correct, until test findings degree of accuracy while no longer changing, has just stopped positioning error correction.
Described in establishment step 1, the method for two-dimensional coordinate system is as follows:
First on MATLAB platform, simulate the network environment of a WLAN (wireless local area network), simulated environment is arranged, for algorithm design is below carried out place mat, to complete better algorithm performance.Fig. 2 is the simulated technological process of this algorithm, as shown in table 1 to arranging of the coefficient of antenna and WLAN (wireless local area network).
Table 1
According to WLAN feature, in order to carry out WLAN (wireless local area network) simulation in MATLAB, the network of node locating is made to following setting:
(1) WLAN node is deployed on the plane domain of two-dimensional coordinate system, and reference mode coordinate and specifying information are set as given value.
(2) WLAN (wireless local area network) is the network of same framework, all nodes have identical characteristic, namely there is identical communication capacity, storage capacity and computing power, between node, traffic model adopts free space electric wave mode, the communication radius of node is consistent, and radiation scope is that take is certainly radius as round dot, radiation scope.
(3) between each node, can find adjacent node, between neighbor node, can communicate by letter mutually, in adjacent node, the node of energy sensing maximum is elected to be reference mode.
(4) between node, link two-wayly, have symmetrical communication function, and all message finally can both be correctly received.
Concrete measuring process is as follows:
(1) aerial radiation modeling
The necessary serial number of it line computation can be realized with very short shell script rwg1.m-rwg5.m.Last shell script can show the Surface current distribution that feed voltage produces on half-wave doublet, shell script efield1.m, efield2.m, efield3.m can provide spatial point radiation signal, comprise the radiation pattern of three-dimensional figure and antenna gain.
(2) rotating antenna location algorithm flow process
Simulation for the ease of network environment realizes, and divides four steps to carry out concrete simulation work:
The first step, design rotating antenna, can reach 360 degree rotation sweeps, make rotating antenna strictly reach signal radiation and have very strong signal energy in certain little angle, and there is no energy spread in other scopes, according to the transmission frequency of signal, angular velocity of rotation is set, guarantees that node to be measured can comprehensive received radiation signal.
Second step, arranges acceptance point and receives signal model, carries out sampled form and periodically collects, and according to sampling theorem, determines sample frequency, draws time energy coordinate diagram.
The 3rd step, intellectual analysis is collected signal coordinates, takes out ceiling capacity and corresponding angle, and substitution algorithm is analyzed and is calculated to obtain node two-dimensional coordinate to be measured.
The 4th step, will record result and actual value contrasts, analytical error and improvement way.
(3) antenna directivity setting
Controlling party tropism mainly will consider three factors: (1) geometric structure factor, and (2) phase factor, (3) array element number, has two basic array type, is respectively orthogonal array and end-fire array.Its directivity or controlled by array element distance, or controlled by the relative phase of feed voltage.Broad side array greatest irradiation direction perpendicular to array axes to; Contrary end-fire array sponsor to along array axes to.As seen from Figure 5, shape and the gain of spacing appreciable impact radiation orientation diagram between array element.When two dipole spacing are when very little, array radiation efficiency is low.During d=0.2 λ, array gain is 2.8dB, only than the large 0.6dB of single half-wave doublet.If two dipole spacing are greater than half wavelength, orthogonal array lobe is just very narrow.Yet huge spot occurred, entire gain has also declined.Optimal selection is, d=0.5 λ, and the gain of generation is maximum, is 5.9dB.Antenna pattern does not have secondary lobe simultaneously.
(4) node sample to be measured
Node to be measured is zero moment to start sampling from t, the signal of receiving be take t and is presented on two-dimensional coordinate as horizontal ordinate, p as ordinate, detect maximum No. P, letter and the corresponding time T thereof of receiving, as the input of subordinate phase location algorithm, sampled result as shown in Figure 6 again.
In sample phase, we obtain ceiling capacity and maximum time, and as the input of following algorithm, final Output rusults shows (x
_{2}, y
_{2}) value, be net result:
X
_{2}=10 ∧ [(P
_{send}-P
_{receive}-20Log(f)-36.6)/20] * cos[v* (t
_{x}mod (360 ° of ÷ v))]
Y
_{2}=10 ∧ [(P
_{send}-P
_{receive}-20Log(f)-36.6)/20] * sin[v* (t
_{x}mod (360 ° of ÷ v))]
Positioning result output as shown in Figure 7.
Above-described embodiment is preferably embodiment of the present invention; but embodiments of the present invention are not restricted to the described embodiments; other any do not deviate from change, the modification done under Spirit Essence of the present invention and principle, substitutes, combination, simplify; all should be equivalent substitute mode, within being included in protection scope of the present invention.