Disclosure of Invention
In order to overcome the defects of the above technologies, the invention provides a Bluetooth signal positioning method, a multi-signal fusion positioning method and a system, which realize real-time follow-up of Bluetooth signal positioning and automatic adjustment of a target position to realize accurate positioning, and realize a fusion personnel positioning method of Bluetooth, GPS, UWB and 5G base station signals. Factors such as difficulty in implementation and deployment of enterprise personnel positioning schemes, complex field environment and the like are fully considered, a user can be effectively helped to freely select the positioning schemes, and the safety management and control of enterprises and the enterprise cost are improved.
In order to achieve the above object, the present invention provides a bluetooth signal positioning method, which includes calculating an attenuation model of a beacon signal segment based on a beacon position and a distance segment of a distance beacon; s2, acquiring the beacon signal strength of each beacon received by the equipment to be positioned; s3, filtering the acquired beacon signal strength based on a preset threshold value and determining whether an optimal point exists; s4, determining a positioning point with a positioning device based on the optimal point or the segmented attenuation model; and S5, comparing the advancing angle of the mth positioning point calculated based on the steps S1-S4 and the previous 3 positioning points of the mth positioning point, acquiring the actual positioning point of the mth positioning point based on the preset step, and outputting the actual positioning point as a result, wherein m is larger than 3.
Further, step S1 specifically includes, S11, collecting beacon signal strength based on the beacon position and the distance segment of the distance beacon; and S12, fitting the attenuation curve of the region by adopting a least square method to the acquired beacon signal intensity, thereby obtaining a segmented attenuation model.
The segmented model calculates the beacon distance accurately under the condition that the actual production environment is influenced by environmental factors.
Further, step S3 specifically includes: s31, filtering the beacon signals smaller than the first preset threshold value based on the first preset threshold value; s32, sorting the intensity of the filtered beacon signals from high to low; and S33, if the beacon signal with the highest signal strength is greater than a second preset threshold value, judging that the beacon signal is the optimal point, otherwise, judging that no optimal point exists.
Further, step S4 specifically includes S41, if it is determined that the position is the optimal point, the position of the optimal point is the positioning point of the device to be positioned; and S42, if no optimal point exists, respectively substituting the filtered beacon signal intensity into a piecewise attenuation model to calculate the distance from each beacon, and calculating the positioning point of the equipment to be positioned through centroid weighting.
By determining the optimal point, the positioning error is reduced.
Further, the step S5 specifically includes, S51, calculating the mth positioning point obtained through the steps S1 to S4 and the determined mth-1 positioning point to obtain a first traveling angle; s52, calculating the m-1 th positioning point and the m-2 th positioning point to obtain a second advancing angle, and calculating the m-2 th positioning point and the m-3 th positioning point to obtain a third advancing angle; and S53, comparing the first advancing angle with the second advancing angle and the third advancing angle, and determining the actual positioning point of the mth point according to the comparison result and the preset step.
Further, step S53 includes comparing the first travel angle with the second travel angle and the third travel angle, and calculating the travel distance based on the comparison result to compare the travel distance with the preset step or continuing to compare the first travel angle with the second travel angle; and obtaining a preset travelling step or waiting for the next calculation based on the comparison result of the first travelling angle and the second travelling angle and the optimal point.
Further, step S53 specifically includes comparing the first travel angle with the second travel angle and the third travel angle, and if the first travel angle, the second travel angle, and the third travel angle are the same, comparing the calculated travel distance with the preset step: if the travelling distance is smaller than the preset step, determining that the equipment to be positioned travels according to the travelling distance; if the advancing distance is larger than the preset step, advancing according to the preset step; otherwise, comparing the first advancing angle with the second advancing angle, and advancing according to a first preset pace if the first advancing angle is consistent with the second advancing angle and has an optimal point; if the first advancing angle is inconsistent with the second advancing angle and has an optimal point, advancing according to a second preset step; otherwise, wait for the next calculation.
The second aspect of the invention provides a multi-signal fusion positioning method, which comprises the following steps that a portable positioning terminal selects a corresponding positioning mode and a positioning signal to report to a positioning engine based on received various positioning signals and the priorities of various positioning signals, wherein the various positioning signals at least comprise any one of UWB signals, Bluetooth signals, 5G base station signals and GPS positioning signals; and the positioning engine analyzes the received positioning mode and the positioning signal to obtain a positioning result, and operates the Bluetooth signal positioning method for positioning the portable positioning terminal if the positioning engine receives the Bluetooth signal positioning mode and the Bluetooth signal.
The various positioning signal fusion modes of UWB signals, Bluetooth signals, 5G base station signals and GPS positioning signals are more flexible and more practical in practical application, and the requirement on the complexity of deployment is lower.
Further, the portable positioning terminal selects a corresponding positioning mode to report to the positioning engine based on the received multiple positioning signals and the priorities of the multiple positioning signals, and specifically includes: the portable positioning terminal selects a corresponding positioning mode to report to the positioning engine based on the priority of the obtained various positioning signals, and if the priority of the GPS signal obtained by the portable positioning terminal is the highest, the GPS positioning mode is adopted to report the GPS data to the positioning engine; if the priority of the 5G base station signal acquired by the portable positioning terminal is highest, reporting the 5G base station signal to a positioning engine by adopting a 5G base station signal positioning mode; if the UWB signal priority obtained by the portable positioning terminal is highest, reporting the UWB signal to a positioning engine by adopting a UWB positioning mode; and if the Bluetooth signal priority acquired by the portable positioning terminal is highest, reporting the beacon RSSI signal to a positioning engine by adopting a Bluetooth positioning mode, and calculating to obtain the position of the equipment to be positioned based on the signal intensity and the beacon coordinate information.
The priority of the positioning signal received by the general portable positioning terminal is UWB signal > Bluetooth signal > 5G base station signal > GPS signal. And based on the positioning precision requirement, the portable positioning terminal correspondingly sends a positioning signal and a positioning mode corresponding to the positioning engine. And selecting a proper positioning mode for positioning according to indoor or outdoor requirements and positioning accuracy and cost requirements.
The third aspect of the invention provides a multi-signal fusion positioning system, which at least comprises at least one beacon for transmitting Bluetooth signals and a plurality of UWB positioning tags; the portable positioning terminal at least comprises a UWB positioning module, a Bluetooth module GPS module and a 5G communication module, and is used for selecting a positioning mode with the highest positioning priority and a positioning signal reporting positioning engine based on the received UWB signals, Bluetooth signals, 5G base station signals and the signal priority of the GPS positioning signals; and the positioning engine is used for receiving and analyzing the positioning signal sent by the portable positioning terminal, and if the positioning engine receives the Bluetooth signal positioning mode and the Bluetooth signal, the positioning engine runs the Bluetooth signal positioning method and is used for positioning the portable positioning terminal.
The invention has the beneficial effects that:
1. the distance from the beacon emission source is calculated by using a piecewise attenuation model, and the positioning is accurate;
2. through the determination of the optimal point and the control of the travel distance, even if the fluctuation of the Bluetooth signal is large, the positioning error is small;
3. by calculating and judging the advancing steps and the advancing angles, the real-time follow-up of the target is realized, and the position of the target can be automatically adjusted;
4. the Bluetooth beacon has low power consumption and accurate positioning, can generate signals uninterruptedly, and can receive information without redundant operation once the equipment to be positioned enters the signal coverage of the Bluetooth beacon;
5. the Bluetooth beacon has low power consumption, does not need additional power supply and is convenient to install;
6. the method realizes the multi-signal fusion positioning of Bluetooth, GPS, UWB and 5G base station signals and the like, and effectively helps a user to freely select a positioning scheme according to an application scene and the acquired positioning signal priority;
7. for the area with low requirement on outdoor positioning accuracy, a GPS positioning mode is adopted, and for the area with high requirement on indoor positioning accuracy, UWB and Bluetooth positioning modes are adopted, so that the enterprise cost is reduced, and the implementation and installation period is shortened;
8. and a positioning mode based on a 5G base station is adopted, and the field implementation is more convenient and faster depending on the existing equipment.
Detailed Description
In order to facilitate a better understanding of the invention for those skilled in the art, the invention will be described in further detail with reference to the accompanying drawings and specific examples, which are given by way of illustration only and do not limit the scope of the invention.
Before describing a bluetooth signal based positioning method of the present invention, some terms are first explained:
beacon: and the electronic equipment is fixed on the ground and transmits Bluetooth signals.
The optimal point is as follows: we consider signal strengths within one meter from the beacon to be trusted. For example, the signal strength measurement value at 1 meter from the beacon is-60, and if the collected signal strength is-40, the beacon position corresponding to the signal is the optimal point.
Signal attenuation curve: curve of signal intensity versus distance.
Centroid weighting: the coordinates of each vertex are added up by weight. If the coordinates of the points a, B and C are (x1, y1), (x2, y2) and (x3, y3), respectively, and the corresponding weights are a and B, respectively, the position coordinates obtained after the centroid weighting calculation are (a x1+ B x2+ C x3, a x1+ B y2+ C y 3).
Kalman filtering: the method is an algorithm for carrying out optimal estimation on the system state by using a linear system state equation and inputting and outputting observation data through a system. The optimal estimation can also be seen as a filtering process, since the observed data includes the effects of noise and interference in the system.
Based on the above explanation, the following is a detailed description of the technical solution of the present invention.
As shown in fig. 1, the positioning method based on bluetooth signals according to this embodiment includes the following steps:
in step S1, an attenuation model of the beacon signal segment is calculated based on the beacon signal strength and the distance segment.
In this embodiment, the step S1 specifically includes the following steps:
s11, acquiring beacon signal strength based on the beacon position and the distance segment from the beacon position; the distances from the beacons are segmented for signal strength collection. As shown in fig. 2, the signal strength from 0 to n meters from the beacon is collected, and the signal strength from n to m meters from the beacon is collected.
And S12, fitting the acquired signal intensity by adopting a least square method to fit the attenuation curve of the region, and fitting and calculating the acquired segmented signal intensity according to the least square method to obtain the attenuation curve of the region.
And step S2, obtaining the beacon signal strength of each beacon received by the equipment to be positioned.
Because the Bluetooth signal is an uninterrupted signal, the equipment to be positioned enters a beacon signal coverage area, and the equipment to be positioned automatically starts to be positioned after receiving the beacon signal.
Step S3, filtering the acquired beacon signal strength based on a preset threshold and determining whether there is an optimal point.
S31, filtering the beacon signals smaller than the first preset threshold value based on the first preset threshold value;
if the strength of some beacon signals detected by the device to be positioned is less than the first preset threshold, the received signal strength can be considered weak, and the beacon signals are filtered out.
S32, sorting the intensity of the filtered beacon signals from high to low;
and S33, if the highest beacon signal strength is greater than a second preset threshold value, judging that the beacon signal strength is the optimal point, otherwise, judging that the beacon signal strength is not the optimal point.
And if the signal strength of the beacon is greater than a second preset threshold value, indicating that the position of the equipment to be positioned is near the beacon.
And step S4, determining the positioning point of the equipment to be positioned based on the optimal point or the segmented attenuation model. The method specifically comprises the following steps:
s41, if the position is judged to be the optimal point, the position of the optimal point is the positioning point of the equipment to be positioned;
and S42, if the signal intensity of the beacon arranged from strong to weak is not the optimal point, respectively substituting the signal intensity of the beacon arranged from strong to weak into a piecewise attenuation model to calculate the distance from each beacon, and calculating the positioning point of the equipment to be positioned through centroid weighting.
In one embodiment of the present invention, the steps S2-S4 are repeated to obtain 3 initial positioning points of the device to be positioned.
I.e. the first three anchor points all directly get the result through steps S2-S4 without performing the following steps.
And S5, comparing the advancing angle of the mth positioning point calculated based on the steps S1-S4 and the previous 3 positioning points of the mth positioning point, acquiring the actual positioning point of the mth positioning point based on the preset step, and outputting the actual positioning point as a result, wherein m is larger than 3.
In this embodiment, the determination of the 4 th positioning point is performed by preliminarily determining a positioning point according to steps S2-S4, then performing the travel angle comparison according to the positioning points of the previous 3 times, and obtaining and determining the actual travel distance based on the preset step.
S51, calculating the calculation position of the 4 th positioning point and the determined 3 rd positioning point to obtain a first advancing angle; in this embodiment, the first travel angle is the difference between the offset angle of the 4 th positioning point from the positive direction of the Y axis and the offset angle of the third positioning point from the positive direction of the Y axis. In some embodiments, the line connecting the fourth positioning point and the third positioning point may also be offset from the positive direction of the Y axis.
S52, calculating a second advancing angle by the 3 rd positioning point and the 2 nd positioning point, and calculating a third advancing angle by the 2 nd positioning point and the 1 st positioning point;
similar to the calculation of the first travel angle, a second travel angle and a third travel angle are obtained.
And S53, comparing the first advancing angle with the second advancing angle and the third advancing angle, and determining the actual positioning point of the 4 th point according to the comparison result and the preset step. Specifically, the method comprises the following steps of,
if the first, second and third advancing angles are consistent, and the advancing distance of the preliminary positioning point obtained by the 4 th point through calculation is compared with the preset step, and if the advancing distance is smaller than the preset step, the equipment to be positioned is determined to advance according to the advancing distance; if the advancing distance is larger than the preset step, advancing according to the preset step;
and if the first, second and third travel angles are not consistent, judging whether the first travel angle is consistent with the second travel angle.
If the first advancing angle is consistent with the second advancing angle and is judged to be the optimal point, advancing according to a first preset step; otherwise, waiting for the next calculation; if the two are not consistent and the two are judged to be optimal points, advancing according to a second preset step; if not, it waits for the next calculation.
In this embodiment, the first predetermined step is the predetermined step, and the second predetermined step is smaller than the first predetermined step. As a preferred embodiment, the second preset step is half the first preset step.
And waiting for the next calculation, and not performing position movement after the current calculation.
In some embodiments, the method further comprises a step S6 of filtering the output anchor point.
In this embodiment, kalman filtering is used for filtering, so that the anchor point is smoother.
In some embodiments, the beacon location is marked with an inkpot map, which is more accurate than the traditional longitude and latitude marks.
As shown in fig. 4, the bluetooth signal-based positioning apparatus operating the bluetooth signal positioning method for positioning the position of the portable positioning terminal according to the present invention includes a model building module for calculating an attenuation model of a beacon signal segment based on a beacon position and a distance segment of a distance beacon; the beacon signal acquisition processing module is used for acquiring the beacon signal strength of each beacon received by the equipment to be positioned and filtering the beacon signals with the signal strength smaller than a first preset threshold; and the positioning module is used for determining an optimal point based on the second preset threshold and the filtered beacon signal, and calculating and determining the positioning point of the equipment to be positioned based on the optimal point and the traveling angle of the equipment to be positioned.
As shown in fig. 5, the present invention provides a bluetooth signal positioning system, wherein the system at least comprises a plurality of beacons for transmitting bluetooth signals, a portable positioning terminal, a base station and a server. The portable positioning terminal is used for carrying out Bluetooth communication with the beacon; the base station is used for receiving signals of the portable positioning terminal; and the server receives the base station signal, operates the positioning method for positioning the position of the portable positioning terminal and displays the real-time position of the portable positioning terminal.
Through field test, the positioning effect is better, and through the control of the optimal point and the advancing distance, even if the signal fluctuation is larger, the positioning error is small, and a good actual use effect can be achieved. Through a beacon, accurate positioning can be realized, and the cost is reduced.
The positioning method, the positioning apparatus and the positioning system of bluetooth signals shown in the above embodiments are further explained by the practical operation examples shown in fig. 3, fig. 4 and fig. 5, so that those skilled in the art can better understand the technical solution of the present invention.
S1, testing the Bluetooth signal intensity sent by each beacon 2 in a segmented manner by using testing equipment, and fitting the testing result by adopting a least square method to obtain an attenuation model of the signal segment;
s2, as shown in fig. 3, in this embodiment, the device to be positioned is a portable positioning terminal, which is also called a chest card 1: is worn on the body and receives the Bluetooth signal sent by the beacon 2. Beacon 2 distributes according to the demand and sets up in waiting to detect the position region, and the chest card enters and waits to detect the position region and has detected the bluetooth signal, then begins to fix a position automatically. As shown in fig. 3, the staff wears the chest card 1, the chest card 1 transmits the beacon signal strength information of the received beacon 2 to the base station, and the base station transmits the beacon signal strength information to the server. The bluetooth beacon shown in fig. 3 has low power consumption, does not need power supply, and is internally provided with a positioning chip, a communication module and a battery to realize communication with the beacon.
S3, the server filters out the beacon signal strength lower than the first preset threshold based on the first preset threshold, and determines whether the point with the strongest beacon signal strength is the optimal point based on the point with the strongest beacon signal strength after filtering and the second preset threshold. .
Because the bluetooth signal shows the characteristics of decay along with the distance, so beacon signal intensity weak signal and the distance deviation of actually fixing a position are great, are filtered.
S4, the attenuation of the bluetooth signal is trusted when it is very close to the beacon, and if the signal strength is greater than the set threshold, it is considered to be the optimum point. And if the signal strength is not the optimal point, taking each filtered signal strength into a piecewise attenuation model to calculate the distance from each beacon, and then calculating the position according to the centroid weighting.
And S5, directly calculating the positioning result for the first three times of positioning.
The positioning of any point behind is judged according to the travel angle of the 3 points ahead, for example, the 8 th point is judged according to the offset angles of the 7 th point, the 6 th point and the 5 th point. And judging the travel distance according to the preset travel steps and the consistency of the travel angle. If the condition is not met, the calculation is stopped, the positioning point is not determined, and the next recalculation of positioning is waited.
S6, the server performs kalman filtering on the outputted localization point to make the localization point smoother, and displays the localization point in the map real-time location display application shown in fig. 4. According to the obtained locating point information, the monitoring of the factory operation place and the operation time can be conveniently realized in a factory automation system.
As shown in fig. 6, the flowchart of an embodiment of the multi-signal fusion positioning method of the present invention includes a step in which the portable positioning terminal selects a corresponding positioning mode and a corresponding positioning signal to report to the positioning engine based on the received multiple positioning signals and the priorities of the multiple positioning signals, where the multiple positioning signals at least include UWB signals, bluetooth signals, 5G base station signals, and GPS positioning signals. Specifically, if the priority of the GPS signal acquired by the portable positioning terminal is highest, the GPS data is reported to the positioning engine in a GPS positioning manner;
if the priority of the 5G base station signal acquired by the portable positioning terminal is highest, reporting the 5G base station signal to a positioning engine by adopting a 5G base station signal positioning mode;
if the UWB signal priority obtained by the portable positioning terminal is highest, reporting the UWB signal to a positioning engine by adopting a UWB positioning mode;
and if the Bluetooth signal priority acquired by the portable positioning terminal is highest, reporting the beacon RSSI signal to a positioning engine by adopting a Bluetooth positioning mode, and calculating to obtain the position of the equipment to be positioned based on the signal intensity and the beacon coordinate information. Wherein, the priority is UWB signal > Bluetooth signal > 5G base station signal > GPS signal.
The problems of high deployment complexity, long construction period and high cost of a single positioning mode in various scene applications can be solved by adopting the fusion of various positioning modes.
In some embodiments, some areas are solutions that do not require high precision positioning, and the higher the precision is, the higher the cost is, therefore, for areas with low positioning precision, a GPS positioning mode may be used, and for areas with high precision requirements, positioning modes such as UWB and bluetooth may be used, which effectively reduces the cost of enterprises and implements installation period.
The GPS positioning method is suitable for outdoor positioning and cannot be normally used indoors with shielding, so that the indoor positioning scheme is generally realized by adopting UWB and Bluetooth. The GPS scheme adopted outdoors can reduce the implementation complexity and can also reduce the cost for enterprises. As a new scheme, the 5G base station positioning is based on the existing equipment, the field implementation is more convenient, namely the 5G base station positioning can be realized according to the existing installed 5G base station.
The invention relates to a multi-signal fusion positioning system, which comprises at least one beacon for transmitting Bluetooth signals and a plurality of UWB positioning tags; the portable positioning terminal at least comprises a UWB positioning module, a Bluetooth module, a GPS module and a 5G communication module, and is used for selecting a positioning mode with the highest positioning priority and a positioning signal reporting positioning engine based on the signal priorities of received UWB signals, Bluetooth signals, 5G base station signals and GPS positioning signals; and the positioning engine is used for receiving and analyzing the positioning signal sent by the portable positioning terminal, and if the positioning engine receives the Bluetooth signal positioning mode and the Bluetooth signal, the positioning engine runs the Bluetooth signal positioning method and is used for positioning the portable positioning terminal.
The foregoing merely illustrates the principles and preferred embodiments of the invention and many variations and modifications may be made by those skilled in the art in light of the foregoing description, which are within the scope of the invention.