Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed
Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific
The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Fig. 1 is the implementation flow chart of localization method provided in an embodiment of the present invention, and details are as follows:
In S101, the label position coordinate of the default frame number before present frame is obtained.
In the present embodiment, terminal device can position label according to predeterminated frequency.Such as terminal device can be with
Label is positioned with the frequency of 10 frame per second, one can be carried out according to the data got every 0.1 second terminal device at this time
The label position coordinate of the frame is calculated in secondary positioning.Since label is likely to be at motion state or stationary state, different frame is fixed
The position coordinates for the label that position goes out may be identical, it is also possible to different.
Present frame is the data frame that terminal device is carrying out tag location.Default frame number can carry out according to actual needs
Setting, such as default frame number can be 3,4 etc..The label position coordinate of default frame number before obtaining present frame can be acquisition
The label position coordinate of adjacent default frame number before present frame.For example, presetting frame number is 3 if present frame is the 10th frame, then may be used
To obtain the label position coordinate of the 7th frame oriented before, the 8th frame and the 9th frame;If default frame number is 4, it is available it
Prelocalization go out the 6th frame, the 7th frame, the 8th frame and the 9th frame label position coordinate.
The label position coordinate of default frame number before present frame can be the positioning of the localization method in through this embodiment
Label position coordinate out is also possible to the label position coordinate oriented by common wireless location method.Wherein, it commonly uses
Wireless location method can be triangle centroid method, least square method etc., be not limited thereto.
In S102, sat according to the predicted position that the label position coordinate of the default frame number got calculates current frame tagging
Mark.
In the present embodiment, predicted position coordinate is the possible position coordinates of label.Terminal device can be according to present frame
The label position coordinate of default frame number before predicts the possible position coordinates of current frame tagging, will calculate in order to subsequent
Predicted position coordinate out participates in the location Calculation of current frame tagging.
As an embodiment of the present invention, as shown in Fig. 2, S102 may include:
In S201, the movement speed of label is calculated according to the label position coordinate of the default frame number got.
In the present embodiment, the interval time between every frame is shorter, such as the frequency of 10 frame per second carries out tag location, then
Interval time between every frame is 0.1 second;The frequency of 20 frame per second carries out tag location, then the interval time between every frame be
0.02 second.Therefore it can regard the movement approximation of label in space as uniform motion.Label position by presetting frame number is sat
Be marked with and two frames between interval time, the movement speed of outgoing label can be calculated.
For example, can be found out according to the label position coordinate of adjacent two frame in front and back the movements of two frame period time interior labels away from
From the movement speed of interval time interior label can be found out in conjunction with interval time.It will be according to the label position coordinate for presetting frame number
The movement speed of the multiple interval time interior labels found out is averaged, this is averaged by the average movement speed of available label
Movement speed of the movement speed as label.
In S202, the prediction bits of current frame tagging are calculated according to the position coordinates of previous frame label and the movement speed
Set coordinate.
In the present embodiment, it can be found out according to the time interval between the movement speed of label and present frame and previous frame
The moving distance of label.The moving direction of label is estimated that according to the label position coordinate of the default frame number got.Root
The pre- of current frame tagging can be calculated according to the moving direction of the position coordinates of previous frame label, the moving distance of label and label
Survey position coordinates.
The present embodiment finds out the movement speed of label by presetting the label position coordinate of frame number, according to the label of previous frame
Position coordinates and movement speed predict the predicted position coordinate of present frame.The data volume that the prediction technique calculates is small, Ke Yishi
Existing quick predict to improve the speed of tag location, and can improve the accurate of prediction by increasing frame number per second
Degree, convenient for the flexible modulation between speed and precision.
As another embodiment of the present invention, S102 may include:
The pre- of current frame tagging is calculated according to the label position coordinate of Kalman filtering algorithm and the default frame number got
Survey position coordinates.
In the present embodiment, Kalman filtering algorithm is a kind of using linear system state equation, is inputted by system defeated
Data are observed out, and the algorithm of optimal estimation is carried out to system mode.Kalman filtering algorithm is with least mean-square error for estimation
Optimum criterion, to seek the algorithm of a set of recurrence estimation, basic thought is: using the state space mould of signal and noise
Type updates the estimation to state variable using the estimated value and the observation of current moment of previous moment, finds out estimating for current moment
Evaluation.
Therefore, Kalman filtering algorithm can be used to predict current frame tagging according to the label position coordinate for presetting frame number
Predicted position coordinate.Since Kalman filtering algorithm is the optimum criterion estimated with least mean-square error, filtered by Kalman
Wave algorithm predicts the predicted position coordinate of the label of present frame, and the accuracy of prediction is higher.
In S103, the position coordinates to each ranging base station of current frame tagging ranging and each ranging base station pair are obtained
The distance measurement value answered;Using the predicted position coordinate as the position coordinates of virtual base station;The corresponding distance measurement value of the virtual base station
For pre-determined distance value.
In the present embodiment, label can be carried out wireless communication with the base station within the scope of wireless signal around.With present frame
The base station that label communicates is ranging base station, and ranging base station can pass through the propagation of the wireless signal strength, wireless signal of communication
The calculating such as time are at a distance from label.The ranging base station communicated with label can have one or more, each ranging base station
A corresponding distance measurement value, measurement distance value of the distance measurement value between each ranging base station and label can be calculated.
Other than ranging base station, a base station is added on the predicted position coordinate of current frame tagging, which is virtual
Base station, the predicted position coordinate for the current frame tagging that front is predicted is as the position coordinates of virtual base station.By virtual base station
It is participated in together with other ranging base stations in the position fixing process to current frame tagging.The corresponding distance measurement value of virtual base station, i.e., virtually
Measurement distance value between base station and current frame tagging can be pre-determined distance value.Pre-determined distance value can be set according to actual needs
Determine, such as pre-determined distance value can be set to other values in 0 or allowable range of error.
In S104, according to the position coordinates of each ranging base station got, the corresponding distance measurement value in each ranging base station,
The position coordinates of the virtual base station and the corresponding distance measurement value of the virtual base station calculate the label position coordinate of present frame.
In the present embodiment, the position coordinates of virtual base station and the corresponding distance measurement value of virtual base station are participated in present frame
Label position coordinate calculating process, distance measurement value corresponding with the position coordinates of each ranging base station and each ranging base station
It combines, the label position coordinate of available present frame is calculated by wireless location method, to realize the positioning to label.
The embodiment of the present invention predicts current frame tagging by the label position coordinate of the default frame number before present frame
Predicted position coordinate, using predicted position coordinate as the position coordinates of virtual base station, by virtual base station and other to label ranging
One piece of ranging base station calculated for the position to current frame tagging.The embodiment of the present invention is by being added virtual base station, so that right
The base station number of the tag location of present frame increases, and can be improved the positioning accuracy to label;And when the survey to label ranging
When being approximately at same straight line away from base station, the addition of virtual base station can increase the base station reference point being located at outside straight line,
To reduce the position error of label, the positioning accuracy of label is improved.
As an embodiment of the present invention, as shown in figure 3, S104 may include:
In S301, using the label position coordinate of present frame as known variables, according to each ranging base station got
Position coordinates, the corresponding distance measurement value in each ranging base station, the position coordinates of the virtual base station and the virtual base station it is corresponding
Distance measurement value establish the expression formula of squared error function.
In the present embodiment, if positioning in two-dimensional space to label, label position coordinate can be set to (x, y);If
Label is positioned in three-dimensional space, label position coordinate can be set to (x, y, z).Squared error function can be expressed as f,
For present frame label position coordinate to each base station (including ranging base station and virtual base station) distance and each base station measurement
The quadratic sum of the difference of obtained distance measurement value.
Optionally, the expression formula of the squared error function are as follows:
Wherein, f (x, y, z) is squared error function;For ranging base station, di(x, y, z) is the label position of present frame
The distance between the position coordinates of coordinate and i-th of ranging base station, Di(x, y, z) is the corresponding distance measurement value in i-th of ranging base station;
For the virtual base station, di(x, y, z) is between the label position coordinate of present frame and the position coordinates of the virtual base station
Distance;Di(x, y, z) is the corresponding distance measurement value of the virtual base station.Wherein share n base station, including 1 virtual base station with
N-1 ranging base station.
In S302, the optimal solution of the expression formula of the squared error function is calculated according to global optimization approach, it will be described
Label position coordinate of the optimal solution as present frame.
In the present embodiment, optimal solution when squared error function f is minimum value is calculated by global optimization approach, it will
Label position coordinate of the optimal solution as present frame.Wherein, global optimization approach includes but is not limited to genetic algorithm, calculation of climbing the mountain
Method, particle swarm algorithm and least square method.
Preferably, the global optimization approach uses least square method.Square that least square method passes through minimum error
With the optimal function matching for finding data.Unknown data can be easily acquired using least square method, and these are asked
The quadratic sum of error is minimum between the data and real data obtained.The squared error function is calculated using least square method
The detailed process of the optimal solution of expression formula can be with are as follows: makes partial derivative 0 of the squared error function f about each variable, obtains
Simultaneous Equations;Solution Simultaneous Equations find out the value of each variable, obtain optimal solution.
The present embodiment can rapidly calculate the optimal solution of the expression formula of squared error function by least square method, lead to
The position coordinates and the corresponding distance measurement value of virtual base station for crossing virtual base station give least square method addition constraint condition, can reduce out
A possibility that existing large error, to calculate label position more accurately, and can eliminate the base because participating in location Calculation
The relative position problem stood generates a possibility that large error.
The embodiment of the present invention predicts current frame tagging by the label position coordinate of the default frame number before present frame
Predicted position coordinate, using predicted position coordinate as the position coordinates of virtual base station, by virtual base station and other to label ranging
One piece of ranging base station calculated for the position to current frame tagging.The embodiment of the present invention is by being added virtual base station, so that right
The base station number of the tag location of present frame increases, and can be improved the positioning accuracy to label;And when the survey to label ranging
When being approximately at same straight line away from base station, the addition of virtual base station can increase the base station reference point being located at outside straight line,
To reduce the position error of label, the positioning accuracy of label is improved.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit
It is fixed.
Corresponding to localization method described in foregoing embodiments, Fig. 4 shows positioning device provided in an embodiment of the present invention
Schematic diagram.For ease of description, only the parts related to this embodiment are shown.
Referring to Fig. 4, which includes the first acquisition module 41, the acquisition module 43 of prediction module 42, second and computing module
44。
First obtains module 41, the label position coordinate for the default frame number before obtaining present frame.
Prediction module 42, for calculating the prediction of current frame tagging according to the label position coordinate of the default frame number got
Position coordinates.
Second obtains module 43, for obtaining to the position coordinates of each ranging base station of current frame tagging ranging and each
The corresponding distance measurement value in ranging base station;Using the predicted position coordinate as the position coordinates of virtual base station;The virtual base station pair
The distance measurement value answered is pre-determined distance value.
Computing module 44, for corresponding according to the position coordinates of each ranging base station got, each ranging base station
The label position that distance measurement value, the position coordinates of the virtual base station and the corresponding distance measurement value of the virtual base station calculate present frame is sat
Mark.
Preferably, the prediction module 42 is used for:
The movement speed of label is calculated according to the label position coordinate of the default frame number got;
The predicted position coordinate of current frame tagging is calculated according to the position coordinates of previous frame label and the movement speed.
Preferably, the prediction module 42 is used for:
The pre- of current frame tagging is calculated according to the label position coordinate of Kalman filtering algorithm and the default frame number got
Survey position coordinates.
Preferably, the computing module 44 is used for:
Using the label position coordinate of present frame as known variables, sat according to the position of each ranging base station got
The position coordinates and the corresponding distance measurement value of the virtual base station of mark, the corresponding distance measurement value in each ranging base station, the virtual base station
Establish the expression formula of squared error function;
The optimal solution that the expression formula of the squared error function is calculated according to global optimization approach, using the optimal solution as
The label position coordinate of present frame.
Preferably, the expression formula of the squared error function are as follows:
Wherein, f (x, y, z) is squared error function;For ranging base station, di(x, y, z) is the label position of present frame
The distance between the position coordinates of coordinate and i-th of ranging base station, Di(x, y, z) is the corresponding distance measurement value in i-th of ranging base station;
For the virtual base station, di(x, y, z) is between the label position coordinate of present frame and the position coordinates of the virtual base station
Distance;Di(x, y, z) is the corresponding distance measurement value of the virtual base station.
Preferably, the global optimization approach includes least square method.
The embodiment of the present invention predicts current frame tagging by the label position coordinate of the default frame number before present frame
Predicted position coordinate, using predicted position coordinate as the position coordinates of virtual base station, by virtual base station and other to label ranging
One piece of ranging base station calculated for the position to current frame tagging.The embodiment of the present invention is by being added virtual base station, so that right
The base station number of the tag location of present frame increases, and can be improved the positioning accuracy to label;And when the survey to label ranging
When being approximately at same straight line away from base station, the addition of virtual base station can increase the base station reference point being located at outside straight line,
To reduce the position error of label, the positioning accuracy of label is improved.
Fig. 5 is the schematic diagram for the positioning terminal equipment that one embodiment of the invention provides.As shown in figure 5, the embodiment is determined
Position terminal device 5 includes: processor 50, memory 51 and is stored in the memory 51 and can be on the processor 50
The computer program 52 of operation, such as finder.The processor 50 is realized above-mentioned each when executing the computer program 52
Step in a localization method embodiment, such as step 101 shown in FIG. 1 is to 104.Alternatively, the processor 50 execute it is described
The function of each module/unit in above-mentioned each Installation practice, such as module 41 to 44 shown in Fig. 4 are realized when computer program 52
Function.
Illustratively, the computer program 52 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 51, and are executed by the processor 50, to complete the present invention.Described one
A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for
Implementation procedure of the computer program 52 in the positioning terminal equipment 5 is described.For example, the computer program 52 can be with
It is as follows to be divided into the first acquisition module, prediction module, the second acquisition module and computing module, each module concrete function:
First obtains module, the label position coordinate for the default frame number before obtaining present frame;
Prediction module, for calculating the prediction bits of current frame tagging according to the label position coordinate of the default frame number got
Set coordinate;
Second obtains module, for obtaining position coordinates and each survey to each ranging base station of current frame tagging ranging
Away from the corresponding distance measurement value in base station;Using the predicted position coordinate as the position coordinates of virtual base station;The virtual base station is corresponding
Distance measurement value be pre-determined distance value;
Computing module, for the position coordinates according to each ranging base station got, the corresponding survey in each ranging base station
The label position for calculating present frame away from value, the position coordinates of the virtual base station and the corresponding distance measurement value of the virtual base station is sat
Mark.
The positioning terminal equipment 5 can be the calculating such as desktop PC, notebook, palm PC and cloud server
Equipment.The positioning terminal equipment may include, but be not limited only to, processor 50, memory 51.Those skilled in the art can manage
Solution, Fig. 5 is only the example of positioning terminal equipment 5, does not constitute the restriction to positioning terminal equipment 5, may include than diagram
More or fewer components perhaps combine certain components or different components, such as the positioning terminal equipment can also wrap
Include input-output equipment, network access equipment, bus, display etc..
Alleged processor 50 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 51 can be the internal storage unit of the positioning terminal equipment 5, such as positioning terminal equipment 5
Hard disk or memory.The memory 51 is also possible to the External memory equipment of the positioning terminal equipment 5, such as the positioning is eventually
The plug-in type hard disk being equipped in end equipment 5, intelligent memory card (Smart Media Card, SMC), secure digital (Secure
Digital, SD) card, flash card (Flash Card) etc..Further, the memory 51 can also both include the positioning
The internal storage unit of terminal device 5 also includes External memory equipment.The memory 51 is for storing the computer program
And other programs and data needed for the positioning terminal equipment.The memory 51 can be also used for temporarily storing
Output or the data that will be exported.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing
The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also
To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list
Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system
The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with
It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute
The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as
Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately
A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device
Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation
All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program
Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on
The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation
Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium
It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code
Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM,
Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described
The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice
Subtract, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and
Telecommunication signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality
Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.