The terminal combinations localization method that a kind of sensor is auxiliary and device
Technical field
The invention belongs to space orientation technique field, relate to the auxiliary terminal combinations localization method of a kind of sensor and device.
Background technology
According to statistics, have more than 80% relevant with " position " in the information used people.Along with the development of mobile interchange technology, location-based service (LocationBasedSevers, LBS) technology and market will obtain development at full speed.Increasing along with the flourish of LBS and heavy construction, the demand of people to the service of indoor and outdoor seamless location constantly increases, and the fields such as public safety, emergency management and rescue, anti-terrorism are anti-probably, production safety, Internet of Things, special population love, smart city also all need to use positional information accurately.
GPS, the satellite navigation systems such as the Big Dipper achieve outdoor positioning, but cannot in-door covering be realized, in recent years for the further investigation of general fit calculation and Distributed Communication Technology, indoor wireless communication and network technology is made to enter the develop rapidly stage, and then derived based on WLAN(WirelessLocalAreaNetworks, WLAN (wireless local area network)), Bluetooth(bluetooth), WSN(wirelesssensornetwork, wireless sensor network) indoor positioning technologies, that location-based service enters the new stage of indoor and outdoor seamless service by outdoor service, wherein, due to WLAN popularizing on mobile phone and the application of other intelligent electronic device, location technology based on WLAN is the most universal.
At present, indoor positioning technologies emphasis place based on networks such as WLAN, WSN can reach 2 ~ 3m, but input cost with expend time in all larger, precision in most of commercial situation is generally 5 ~ 10m, in outdoor positioning, the civilian precision of mobile phone of the location technologies such as GPS is also generally 5 ~ 10m in urban environment.How to utilize the hardware facility of existing mobile phone, intelligent terminal, the positioning precision promoting the systems such as WLAN, WSN, GPS is further the target that location-based service manufacturer is constantly pursued.Current smart mobile phone, intelligent terminal etc. all possess the sensor such as accelerometer, electronic compass, all obvious acceleration change can be produced because pedestrian often transports to move a step, meter step can be carried out to the motion of personnel by accelerometer, by the electronic compass then direction run to personnel of cocoa, both combine, and can try to achieve the movable information of personnel, thus adopt the filtering techniques such as conventional Kalman, the velocity information that the positional information obtain systems such as WLAN, WSN, GPS and sensor obtain carries out filtering jointly, realize integrated positioning, improve positioning precision.
But at present the electronic compass of a lot of mobile phone points to and is inaccurate, and error reaches more than 40 °, and the direction of motion of people is pointed to electronic compass and inconsistent (as adept machine, retrogressing is walked) sometimes.Above-mentioned situation will cause pedestrian movement's walking direction to occur comparatively serious mistake, now, adopt the sensor auxiliary positioning of classic method not only can not promote positioning precision, positioning precision can be caused even on the contrary to decline.
Summary of the invention
In view of this, the terminal combinations localization method that the object of the present invention is to provide a kind of sensor auxiliary and device, the method utilizes walking step number and the direction situation of change of accelerometer in mobile phone or other intelligent terminal and electronic compass survey crew, the imperfect velocity information that cannot be obtained by sensor in exactly determined situation in personnel's direction of motion (only has velocity magnitude, lack velocity reversal) combine with wireless/satellite positioning tech, improve positioning precision.
For achieving the above object, the invention provides following technical scheme:
The terminal combinations localization method that a kind of sensor is auxiliary, the elements of a fix are obtained by WLAN, WSN, GPS wireless location and satellite positioning tech, utilize accelerometer to treat the walking step number of locating personnel between this is located and positioning time last time is poor to measure, and according to estimating the translational speed of step size computation personnel to be positioned; By filtering algorithm, filtering is carried out to this positioning result, obtain the accurate coordinates of this location and the translational speed in all directions, translational speed is combined with above-mentioned location technology and realizes locating next time.
Further, described filtering algorithm adopts Kalman filtering, and personnel to be positioned obtain the coordinate (x of kth time location by location technology
k', y
k'), the walking step number N during utilizing accelerometer measures kth time location to locate for-1 time with kth
k, obtain the velocity magnitude of current persons | v
k|=N
kl
k/ T, wherein l
kfor the personnel's step-length estimated, T is the interval time of twice location; By (x
k', y
k') carry out Kalman filtering as positioning result, obtain result (x after filtering
k, y
k, vx
k, vy
k), wherein x
k, y
k, vx
k, vy
kbe respectively the x coordinate finally obtaining kth time location, y coordinate, x direction movement velocity size, y direction movement velocity size; On carrying out once Kalman filtering iterative process before, to vx
k, vy
kcarry out correction as follows:
Thus will | v
k| information and wireless, satellite positioning information combine, improve positioning precision.
Further, when personnel's direction of motion keeps stablizing, current positioning result (x is utilized
k, y
k) with the N-1 time front positioning result (x
k-N+1, y
k-N+1) line direction calculating personnel motion velocity reversal.
Further, described personnel's direction of motion keeps stable condition to be: think that direction of motion keeps stable when the standard deviation of electronic compass measured value is less than pre-determined threshold delt in N continuous time location.
Further, according to the velocity reversal obtained and velocity magnitude, speed amount is decomposed x, y-axis, obtain measured value vx
k', vy
k', obtain the secondary coordinate (x located of kth with wireless, satellite positioning tech
k', y
k') common as input quantity, carry out Kalman filtering calculating.
Further, when direction of motion keeps stablizing, current positioning result (x is utilized
k, y
k), positioning result (x before the N-1 time
k-N+1, y
k-N+1), accumulative walking number Δ N between twice location
k, k+1-N, step-length l is estimated in adjustment
kfor
Further, when the standard deviation of electronic compass measured value is greater than pre-determined threshold delt2 in continuous N time location, think that personnel's direction of motion changes, now need to recalculate velocity reversal and realize location.
Present invention also offers the terminal combinations locating device that a kind of sensor is auxiliary, this application of installation combinations thereof localization method, adopt walking step number and the direction situation of change of accelerometer and the electronic compass survey crew carried in current mobile phone or other intelligent terminal, thus be combined with conventional alignment systems, realize accurately locating.
Beneficial effect of the present invention is: utilize the accelerometer in existing mobile phone or intelligent terminal and electronic compass, / satellite positioning tech wireless with existing WLAN, WSN, GPS etc. is combined, when not increasing hardware facility, general positioning precision is promoted to 3 ~ 5m by 5 ~ 10m, and then significantly can promote indoor and outdoor seamless location service quality, expanding location service new business, the fields such as, production safety, Internet of Things, special population love anti-probably in public safety, emergency management and rescue, anti-terrorism, smart city are applied, and obtain important economic results in society.
Accompanying drawing explanation
In order to make object of the present invention, technical scheme and beneficial effect clearly, the invention provides following accompanying drawing and being described:
Fig. 1 is the schematic flow sheet of the method for the invention.
Embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described in detail.
Fig. 1 is the schematic flow sheet of the method for the invention, the invention provides a kind of terminal combinations localization method possessing higher accuracy, specific as follows:
Utilize WLAN, WSN, GPS etc. wireless/satellite positioning tech obtains the coordinate (x of kth time location
k', y
k'), utilize accelerometer measures personnel kth time location and kth locate for-1 time between walking step number N
k, obtain the velocity magnitude of current persons | v
k|=N
kl
k/ T, wherein l
kfor the personnel's step-length estimated, T is the interval time of twice location.Make (x
k', y
k') carry out Kalman filtering as positioning result, obtain result (x after filtering
k, y
k, vx
k, vy
k), wherein x
k, y
k, vx
k, vy
kbe respectively the x coordinate finally obtaining kth time location, y coordinate, x direction movement velocity size, y direction movement velocity size.On carrying out once Kalman filtering iterative process before, to vx
k, vy
kcarry out correction as follows:
Thus will | v
k| information and wireless/satellite positioning information combine, improve positioning precision.
In the present embodiment, Kalman filtering process is specific as follows:
Output vector is made to be m
k=[x
k, y
k, vx
k, vy
k]
t, initial value m
1can obtain according to front twice wireless/satnav result, state-transition matrix is
Process noise covariance matrix
Wherein q
1, q
2, q
3, q
4for preset value, representative value can get 0.2,0.2,0.05,0.05 respectively, calculation matrix
Measurement noises covariance matrix
R
1, r
2for preset value, determine according to accuracy of wireless location system, representative value can get 49,49, measurement result Z respectively
k=[x
k', y
k']
t.Matrix P is the matrix of a 4*4, can upgrade in Kalman's iterative process always, and initial value can rule of thumb not grudged, as
Following kth time output vector is m
kcomputation process as follows:
S
k=A·m
k-1(2)
P
k=A·P
k-1·A
T+A
T·Q·A(3)
K
k=P
kH
T/(HPH
T+R)(4)
P
k=P
k-K(HPH
T+R)K
T(5)
m
k=S
k+K
k(Z-HS
k-1)(6)
When personnel's direction of motion keeps stablizing, utilize current positioning result (x
k, y
k) with the N-1 time front positioning result (x
k-N+1, y
k-N+1) line direction calculating personnel motion velocity reversal (such as can be set to
also can be according to different coordinates definition and adopt different formulas).Above-mentioned judgement personnel direction of motion keeps stable condition to be: when the standard deviation of electronic compass measured value in N continuous time location (can be set to 15 in the present embodiment) is less than pre-determined threshold delt (can be set to 10 ° in the present embodiment).That is: although do not obtain accurate personnel's direction of motion information by electronic compass, when personnel direction can be utilized constant compass can not illustrate change this characteristic judge whether personnel's direction of motion is stablized.
The velocity reversal obtained according to said process again and velocity magnitude, decompose x by speed amount, y-axis, obtain measured value vx
k', vy
k', obtain the secondary coordinate (x located of kth with wireless/satellite positioning tech
k', y
k') jointly carry out Kalman filtering calculating.Specific implementation process for: calculation matrix described in above-mentioned steps is rewritten as
Measurement noises covariance matrix is rewritten as
Measurement result is rewritten as Z
k=[x
k', y
k', vx
k', vy
k']
t, calculate kth time positioning result by formula (2) to formula (6), positioning result can be promoted further.
Meanwhile, when described personnel's direction of motion keeps stablizing, current positioning result (x is utilized
k, y
k), positioning result (x before the N-1 time
k-N+1, y
k-N+1), accumulative walking number Δ N between twice location
k, k+1-N, in set-up procedure 1, estimate step-length l
kfor
Further lifting positioning precision.
In above process, when the standard deviation of electronic compass measured value in continuous N time location (can be set to 5 in the present embodiment) is greater than pre-determined threshold delt2 (30 ° can be set in the present embodiment), think that personnel move to change, then velocity reversal and velocity magnitude are redefined.
What finally illustrate is, above preferred embodiment is only in order to illustrate technical scheme of the present invention and unrestricted, although by above preferred embodiment to invention has been detailed description, but those skilled in the art are to be understood that, various change can be made to it in the form and details, and not depart from claims of the present invention limited range.