Bluetooth base station self-calibration method based on AOA
By using AOA positioning technology and particle filtering method, the location of Bluetooth base stations is automatically adjusted, solving the problem of high configuration time of traditional Bluetooth base stations and realizing an efficient and low-cost indoor positioning system.
Patent Information
- Application Number
- CN202410974732.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-12
AI Technical Summary
Traditional Bluetooth base station configuration is time-consuming and prone to errors in indoor positioning, and cannot achieve efficient self-calibration, resulting in low indoor positioning accuracy and efficiency.
A Bluetooth base station self-calibration method based on AOA is adopted. The CTE signal of the base station under test is received by the reference base station. Combined with indoor map and particle filtering technology, the base station position is automatically adjusted to achieve accurate positioning of the base station.
It simplifies the base station deployment process, reduces installation costs, improves the real-time performance and dynamism of the positioning system, and enhances the efficiency of base station deployment and positioning accuracy.
Smart Images

Figure CN118945596A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of indoor wireless positioning, and in particular relates to a Bluetooth base station self-calibration method based on AOA. Background Art
[0002] With the continuous development of information technology, positioning technology plays an important role in human life and work. Since the 21st century, positioning technology has been widely used in many fields such as military, transportation, urban construction, and travel. With the development of global satellite positioning systems such as the Global Positioning System (GPS) and the BeiDou Navigation Satellite System (BDS), the accuracy of outdoor positioning technology has basically met people's daily lives. However, in indoor environments, GPS satellite signals are severely attenuated due to the influence of indoor multipath interference, resulting in a sharp drop in positioning accuracy, and even inability to achieve positioning. In order to achieve indoor positioning, indoor positioning technology came into being. It fills the gap that satellite positioning systems cannot locate in indoor environments and has gradually become a research hotspot.
[0003] Since Bluetooth has the characteristics of low power consumption, low cost, high precision, and wide coverage, it has broad application prospects. Therefore, the research on indoor positioning using Bluetooth has also become a current research hotspot. The Bluetooth fingerprint method requires the collection of Bluetooth fingerprint signals at different locations indoors in advance, which is a large workload; the RSSI positioning method has limited accuracy because the signal strength is affected by environmental interference, multipath propagation and other factors; the positioning method using AOA or AOD calculates the Bluetooth IQ sampling data by calculating the antenna array, which can greatly improve the accuracy of positioning. However, the method of indoor positioning using Bluetooth AOA or AOD positioning requires the deployment of Bluetooth positioning base stations indoors in advance, and the traditional base station configuration relies on manual measurement and complex installation procedures, which is not only time-consuming but also prone to errors. Therefore, a self-calibration method (i.e., the base station can automatically measure the position and use this position information to locate the tag) is urgently needed to achieve more efficient indoor positioning. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention proposes a Bluetooth base station self-calibration method based on AOA, which includes:
[0005] S1: The reference base station receives the CTE signal broadcast by the base station to be tested, and decides to keep the current base station layout or re-layout the base station to be tested according to the CTE signal strength;
[0006] S2: The reference base station forwards its own location information and CTE signal to the location server; the location server calculates the initial location of the base station to be tested based on the location information and CTE signal of the reference base station;
[0007] S3: Obtain an indoor map, and correct the initial position of the base station to be measured according to the indoor map to obtain a corrected position of the base station to be measured;
[0008] S4: Perform particle filtering on the corrected position of the base station to be measured to obtain an accurate positioning result of the base station to be measured.
[0009] S5: The base station to be tested that has obtained the accurate positioning result is used as the reference base station, and the positioning of the base stations to be tested is continued until all the base stations to be tested have completed the positioning.
[0010] Preferably, in step S1, the process of deciding whether to retain the current base station layout or to rearrange the base station to be tested based on the CTE signal includes: the benchmark base station determines whether the signal strength of the received CTE signal is greater than a preset threshold value; if so, it is determined that the location of the base station to be tested is reasonably arranged and the current base station layout is retained; if so, it is determined that the location of the base station to be tested is unreasonable and the base station to be tested is rearranged; the operation is repeated until the location of the base station to be tested is reasonably arranged.
[0011] Preferably, in step S3, the process of correcting the initial position of the base station to be measured according to the indoor map includes:
[0012] S31: converting the indoor map into an indoor map image matrix, in which the pixel points at the position where the base station can be reached are set to 1, and the pixel points at the position where the base station cannot be reached are set to 0;
[0013] S32: converting the initial position of the base station to be tested into a corresponding pixel point in the image matrix;
[0014] S33: Determine whether the pixel point at the initial position is in the staircase building structure. If so, execute step S35; otherwise, use the pixel point as the positioning pixel point and execute step S34;
[0015] S34: The location server determines whether there is a wall blocking the pixel points between the two initial positions calculated by the CTE signals received the last two times. If yes, execute step S35; otherwise, execute step S36;
[0016] S35: Calculate the midpoint of the two initial pixel points by calculating the CTE signals received the most recently; and use the pixel point on the line connecting the two pixel points that is closest to the midpoint and is not in the staircase or wall structure as the positioning pixel point;
[0017] S36: Convert the positioning pixel points into position coordinates in the actual environment rectangular coordinate system to obtain the corrected position of the base station to be measured.
[0018] Furthermore, the process of determining whether the pixel point at the initial position is in the stair building structure includes: performing an AND operation on the indoor map image matrix and the pixel point at the base station position to be measured. If the operation result is 0, it is determined that the pixel point is in the stair building structure; otherwise, it is determined that the pixel point is not in the stair building structure.
[0019] Preferably, in step S4, the process of performing particle filtering on the corrected position of the base station to be measured includes:
[0020] S41: uniformly distributing the particles in a circular area with the corrected position of the base station to be measured as the center and the distance to the nearest reference base station as the radius;
[0021] S42: Transfer particles with a probability that follows a Gaussian distribution;
[0022] S43: Calculate the weights of all particles and normalize them to obtain particle weights;
[0023] S44: resample the particles according to the particle weights to obtain resampled particles;
[0024] S45: Obtaining a precise positioning result of the base station to be measured based on the resampled particle calculation.
[0025] Furthermore, the formula for calculating the weight of a particle is:
[0026]
[0027] in, represents the weight of the ith particle in the circle with the tth reference base station as the center and the distance to the nearest reference base station as the radius, d t represents the position vector from the reference base station to the base station to be tested, represents the position vector from the position of the i-th particle to the base station to be measured, σ 2 It is expressed as the noise variance.
[0028] Furthermore, the process of resampling particles includes:
[0029] Sort the particle weights in ascending order; divide the particle weights to obtain multiple weight intervals, with the left end of each interval being the sum of all the previous particle weights of the particle weight, and the right end being the sum of the particle weight and all the previous particle weights;
[0030] Randomly select M random numbers in the range of 0 to 1, copy the particle corresponding to the last addend at the right end of the interval where the random number falls, and obtain M resampled particles.
[0031] Furthermore, the formula for obtaining the precise positioning result of the base station to be tested based on the resampled particles is:
[0032]
[0033] Among them, p t It represents the precise positioning result of the base station to be tested with the tth reference base station as the center of the circle. represents the position of the mth particle.
[0034] The beneficial effects of the present invention are as follows: the present invention solves the inconvenience of indoor base station calibration, proposes to automatically complete position calibration between base stations, which can simplify the base station deployment steps and reduce the base station installation cost, and the self-calibration can be adjusted according to real-time environmental changes and signal characteristics, so that the positioning system can respond and adapt to changing conditions in a timely manner, thereby improving the real-time and dynamic nature of positioning. The present invention can improve the efficiency of base station deployment, making the overall operation cost of the indoor positioning system lower and maintenance more convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 Flow chart of the Bluetooth base station self-calibration method based on AOA in the present invention
[0036] Figure 2 The node relationship diagram of the reference base station and the base station to be tested in the present invention is
[0037] Figure 3 This is a schematic diagram of the AOA positioning principle in the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] The present invention proposes a Bluetooth base station self-calibration method based on AOA, such as Figure 1 As shown, the method includes the following contents:
[0040] S1: The reference base station receives the CTE signal broadcast by the base station to be tested, and decides to keep the current base station layout or re-layout the base station to be tested according to the CTE signal strength.
[0041] like Figure 2As shown, in the indoor positioning system designed by the present invention, there are multiple Bluetooth base stations, all installed on the same horizontal plane. Each Bluetooth base station can measure the angle information of the other Bluetooth base stations and simultaneously obtain the signal strength information of the other Bluetooth base stations. By measuring the location information of a small amount of Bluetooth base stations in advance, the location information is written into the Bluetooth base station location service center, and it is configured as a reference AOA positioning base station (reference base station). The remaining Bluetooth base stations with unknown location information are AOA Bluetooth base stations to be tested (base stations to be tested).
[0042] The Bluetooth base station self-calibration technology of the present invention is mainly based on Bluetooth AOA positioning technology. Bluetooth 5.1 protocol and above add a constant tone extension signal (CTE) at the end of the traditional Bluetooth data packet.
[0043] The base station to be tested continuously broadcasts CTE signals to the surroundings, and the benchmark base station receives the CTE signals broadcast by the base station to be tested and measures the angle of the location of the base station to be tested. The benchmark base stations whose received broadcast signal strength is greater than the preset threshold are selected. Specifically: the benchmark base station determines whether the signal strength of the received CTE signal is greater than the preset threshold. If it is greater than, the location of the base station to be tested is judged to be reasonably arranged, that is, it is considered that the angle measured by the benchmark base station is reasonable, and the location server can complete the location calculation of the base station to be tested through this base station angle, so the current base station layout is retained; if it is less than, the location of the base station to be tested is judged to be unreasonable, and the base station to be tested is re-arranged, and the operation is repeated until the location of the base station to be tested is reasonably arranged.
[0044] S2: The reference base station forwards its own location information and CTE signal to the location server; the location server calculates the initial location of the base station to be measured based on the location information and CTE signal of the reference base station.
[0045] The location server calculates the initial position of the base station to be tested based on the location information of the reference base station and the CTE signal. Specifically:
[0046] The transmitter sends a Bluetooth data packet containing CTE through a single antenna, and the receiver uses an antenna array to sample the signal data. Since the distances between each antenna in the antenna array of the receiver and the transmitter are different, there is a certain phase difference between the data of each antenna after sampling. When the receiver receives the signal data containing CTE, sampling starts in the reference period to collect the in-phase / quadrature (I / Q) sample data contained in the CTE signal. Using the I / Q data collected by the antenna in the sampling time slot; using the I / Q data collected by the antenna in the sampling time slot, the phase offset of the signal at the antenna end can be calculated, and then the propagation direction of the signal can be further solved; specifically: using the geometric relationship between the antenna array and the signal direction, combined with the phase difference, the arrival angle of the signal can be calculated;
[0047] The process is as follows:
[0048] 1. The base station under test at the transmitting end sends a Bluetooth data packet containing CTE through a single antenna, and the base station at the receiving end samples the data packet using an antenna array, such as Figure 3 As shown:
[0049] 2. Since the distance between the receiving antenna array is known, assuming that the sampled data of two adjacent antennas are expressed as (a1, b1) and (a2, b2) in the Cartesian coordinate system, the phase difference between the two adjacent antennas is It can be calculated by the following formula:
[0050]
[0051] 3. After obtaining the phase difference data of adjacent antennas, combined with the geometric distance of the antenna array, the calculation formula for the signal arrival angle is obtained:
[0052]
[0053] 4. Finally, when two or more reference base stations obtain the signal of the base station to be measured to a large angle, the position coordinates of the base station to be measured can be calculated by triangulation positioning method.
[0054] S3: Acquire an indoor map, and correct the initial position of the base station to be measured according to the indoor map to obtain a corrected position of the base station to be measured.
[0055] S31: Convert the indoor map into an indoor map image matrix. In the image matrix, the pixel points at the position that is reachable by the base station are set to 1, and the pixel points at the position that is unreachable are set to 0.
[0056] Convert the indoor map into an accurate indoor map image matrix I(p x ,p y ), convert the image matrix into a binary image, the points larger than a certain pixel become black, the point is the position that the base station cannot reach, and its matrix pixel point is set to 0; the points smaller than a certain pixel become white, the point is the position that the base station can reach, and it is set to 1; and the indoor position coordinates and the actual position coordinates are matched with each other; among them, a certain pixel can be set to 128, and can be based on the indoor location Figure 2 Adjust the effect of valuation.
[0057] S32: Convert the initial position of the base station to be tested into a corresponding pixel point in the image matrix.
[0058] The kth positioning result of the base station to be tested, i.e. the initial position U k =(x k ,y k ) is converted to the corresponding pixel point in the image matrix I
[0059] S33: Determine whether the pixel point at the initial position is in the staircase building structure. If so, execute step S35; otherwise, use the pixel point as the positioning pixel point and execute step S34.
[0060] Perform AND operation on the indoor map image matrix and the pixel points of the base station to be tested. If the result is 0, It is determined that the pixel point is in the staircase building structure, so correction is required and step S35 is executed. Otherwise, it is determined that the pixel point is not in the staircase building structure and no correction is required.
[0061] S34: The location server determines whether there is a wall blocking the pixel points at the two initial positions calculated by the CTE signals received the last two times. If yes, execute step S35; otherwise, execute step S36.
[0062] The two pixels at the initial positions are calculated from the CTE signals received the last two times, which can be expressed as: The pixel at the initial position of the kth time and the (k-1)th initial position pixel Determine whether there is a wall blocking the pixel points, that is, whether the two pixel points are blocked by a 0-value pixel point; if so, execute step S35, otherwise, execute step S36.
[0063] S35: Calculate the midpoint of the two initial pixel positions by calculating the CTE signals received the two most recently; and use the pixel point on the line connecting the two pixel points that is closest to the midpoint and is not in the staircase or wall structure as the positioning pixel point.
[0064] The midpoint between the kth initial position pixel and the (k-1)th initial position pixel is calculated as:
[0065]
[0066] Find the pixel point on the line connecting the two pixels that is closest to the midpoint and is not in the staircase or wall structure This point is used as the positioning pixel point; if the midpoint itself is not in the stair or wall structure, then the midpoint is the positioning pixel point.
[0067] S36: Convert the positioning pixel points into position coordinates in the actual environment rectangular coordinate system to obtain the corrected position of the base station to be measured.
[0068] Convert the obtained positioning pixel point into the position coordinate U′ of the actual environment rectangular coordinate system k =(x′ k ,y′ k ), and output the position coordinates as the corrected position of the base station to be measured.
[0069] S4: Perform particle filtering on the corrected position of the base station to be measured to obtain an accurate positioning result of the base station to be measured.
[0070] S41: Distribute the particles uniformly in a circular area with the corrected position of the base station to be measured as the center and the distance to the nearest reference base station as the radius.
[0071] Initialize particles. Specifically, in the initialization stage, particles can be distributed according to the corrected position of the base station to be measured, and the base station to be measured is determined as the center of the circle and the distance to the nearest reference base station is determined as the radius, and the particles are evenly distributed in the circular area.
[0072] S42: Transfer particles with a probability that follows a Gaussian distribution.
[0073] Preferably, the horizontal and vertical coordinates of the particles are transferred with the probability of Gaussian distribution; in the transfer stage, the graph information can also play a correction role, that is, if the particles appear in the building structure or pass through the wall during the movement, the movement of these particles can be considered illegal and their weights are set to 0.
[0074] S43: Calculate the weights of all particles and normalize them to obtain particle weights.
[0075] Calculate particle weights:
[0076]
[0077] in, represents the weight of the ith particle in the circle with the tth reference base station as the center and the distance to the nearest reference base station as the radius, d t represents the position vector from the reference base station to the base station to be tested, represents the position vector from the position of the i-th particle to the base station to be measured, σ 2 It is expressed as the noise variance.
[0078] In all particles After the calculation is completed, normalization is performed uniformly:
[0079]
[0080] S44: Resample the particles according to the particle weights to obtain resampled particles
[0081] After the weight is updated, there are some low-weight particles, which are not helpful for positioning and occupy computing resources. The present invention resamples the particles in some way by resampling to ensure that high-weight particles still survive and low-weight particles are eliminated. Specifically:
[0082] The particle weights are sorted in ascending order, and multiple weight intervals are obtained according to the particle weights. The left end of each interval is the sum of the weights of all the previous particles of a particle weight, and the right end is the sum of the particle weight and the weights of all the previous particles.
[0083] For example: the first interval is (0~ω1), the second interval is (ω1~(ω1+ω2), the third interval is ((ω1+ω2)~(ω1+ω2+3))…the Nth interval is ((ω1+ω2+ω3+…+ω n-1 )~1).
[0084] Randomly select M random numbers in the range of 0 to 1, copy the particle corresponding to the last addend at the right end of the interval where the random number falls, and obtain M resampled particles; in particular, if the random number falls at the endpoint of the interval, it means that the point falls into the interval on the left.
[0085] For example, if a random number falls into the second interval, the particle corresponding to ω2 is copied.
[0086] The present invention performs resampling in the above manner, so that for a particle with a larger weight, the probability of generating a random number falling in the corresponding interval will increase, and in the process of resampling, not all large-weight particles are copied, but small-weight particles may also be copied, thereby ensuring the diversity of particles to a certain extent.
[0087] S45: Obtaining a precise positioning result of the base station to be measured based on the resampled particle calculation.
[0088] The ultimate goal of particle filtering is to estimate the current state of the system, that is, the position coordinates; the position estimate can be obtained by weighted averaging the particles obtained after resampling:
[0089]
[0090] Among them, p t It represents the precise positioning result of the base station to be tested with the tth reference base station as the center of the circle. represents the position of the mth particle.
[0091] S5: The base station to be tested that has obtained the accurate positioning result is used as the reference base station, and the positioning of the base stations to be tested is continued until all the base stations to be tested have completed the positioning.
[0092] The final position estimate, i.e., the precise positioning result, is written into the location server, and this calculated position is associated with the base station to be tested. This base station can then be used as a reference base station to complete the position calculation of other base stations to be tested until all base stations to be tested have been positioned.
[0093] After all the base stations to be tested are positioned, all base stations can be used to perform AOA positioning on the IoT devices that need to be positioned indoors, providing users with efficient and accurate positioning services.
[0094] In summary, the present invention first calculates the location coordinates of the transmitter through a triangulated positioning algorithm, then associates the calculated location coordinates with the map information by fusing the indoor map information, and filters out particles that penetrate the wall or have unreasonable positions through a particle filtering method. After completion, the position of the base station to be tested is calculated, and the base station is automatically reset as the reference base station; the above steps are repeated to complete the self-calibration of all base stations to be tested in a cycle. The present invention can effectively reduce the difficulty of calibration and deployment costs of base stations, improve the efficiency of base station deployment, and make the overall operating cost of the indoor positioning system lower and maintenance more convenient.
[0095] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A Bluetooth base station self-calibration method based on AOA, characterized in that: The steps include: S1: The reference base station receives the CTE signal broadcast by the base station to be tested, and decides to keep the current base station layout or re-layout the base station to be tested according to the CTE signal strength; S2: The reference base station forwards its own location information and CTE signal to the location server; The location server calculates the initial location of the base station to be tested based on the location information of the reference base station and the CTE signal; S3: Obtain an indoor map, and correct the initial position of the base station to be measured according to the indoor map to obtain a corrected position of the base station to be measured; S4: performing particle filtering on the corrected position of the base station to be measured to obtain an accurate positioning result of the base station to be measured; S5: The base station to be tested that has obtained the accurate positioning result is used as the reference base station, and the positioning of the base stations to be tested is continued until all the base stations to be tested have completed the positioning.
2. The AOA-based Bluetooth base station self-calibration method according to claim 1, characterized in that: In step S1, the process of deciding whether to keep the current base station layout or rearrange the base station to be tested based on the CTE signal includes: the reference base station determines whether the signal strength of the received CTE signal is greater than a preset threshold value. If so, it is determined that the location of the base station to be tested is reasonable and the current base station layout is retained; if so, it is determined that the location of the base station to be tested is unreasonable and the base station to be tested is rearranged. The operation is repeated until the location of the base station to be tested is reasonable.
3. The AOA-based Bluetooth base station self-calibration method according to claim 1, characterized in that: In step S3, the process of correcting the initial position of the base station to be measured according to the indoor map includes: S31: converting the indoor map into an indoor map image matrix, in which the pixel points at the position where the base station can be reached are set to 1, and the pixel points at the position where the base station cannot be reached are set to 0; S32: converting the initial position of the base station to be tested into a corresponding pixel point in the image matrix; S33: Determine whether the pixel point at the initial position is in the staircase building structure. If so, execute step S35; otherwise, use the pixel point as the positioning pixel point and execute step S34; S34: The location server determines whether there is a wall blocking the pixel points between the two initial positions calculated by the CTE signals received the last two times. If yes, execute step S35; otherwise, execute step S36; S35: Calculate the midpoint of the two initial pixel points by calculating the CTE signals received the most recently; and use the pixel point on the line connecting the two pixel points that is closest to the midpoint and is not in the staircase or wall structure as the positioning pixel point; S36: Convert the positioning pixel points into position coordinates in the actual environment rectangular coordinate system to obtain the corrected position of the base station to be measured.
4. The AOA-based Bluetooth base station self-calibration method according to claim 3, characterized in that: The process of determining whether the pixel point at the initial position is in the stair building structure includes: performing an AND operation on the indoor map image matrix and the pixel point at the base station position to be tested. If the operation result is 0, it is determined that the pixel point is in the stair building structure; otherwise, it is determined that the pixel point is not in the stair building structure.
5. The AOA-based Bluetooth base station self-calibration method according to claim 1, characterized in that: In step S4, the process of performing particle filtering on the corrected position of the base station to be measured includes: S41: uniformly distributing the particles in a circular area with the corrected position of the base station to be measured as the center and the distance to the nearest reference base station as the radius; S42: Transfer particles with a probability that follows a Gaussian distribution; S43: Calculate the weights of all particles and normalize them to obtain particle weights; S44: resample the particles according to the particle weights to obtain resampled particles; S45: Obtaining a precise positioning result of the base station to be measured based on the resampled particle calculation.
6. The AOA-based Bluetooth base station self-calibration method according to claim 5, characterized in that: The formula for calculating the weight of a particle is: in, represents the weight of the ith particle in the circle with the tth reference base station as the center and the distance to the nearest reference base station as the radius, d t represents the position vector from the reference base station to the base station to be tested, represents the position vector from the position of the i-th particle to the base station to be measured, σ 2 It is expressed as the noise variance.
7. The AOA-based Bluetooth base station self-calibration method according to claim 5, characterized in that: The process of resampling particles includes: Sort the particle weights in ascending order; divide the particle weights to obtain multiple weight intervals, with the left end of each interval being the sum of all the previous particle weights of the particle weight, and the right end being the sum of the particle weight and all the previous particle weights; Randomly select M random numbers in the range of 0 to 1, copy the particle corresponding to the last addend at the right end of the interval where the random number falls, and obtain M resampled particles.
8. The AOA-based Bluetooth base station self-calibration method according to claim 5, characterized in that: The formula for obtaining the precise positioning result of the base station to be tested based on the resampled particles is: Among them, p t It represents the precise positioning result of the base station to be tested with the tth reference base station as the center of the circle. represents the position of the mth particle.
