Bluetooth positioning tag position calculation method and system, and storage medium
By demodulating the Bluetooth signal, obtaining in-phase orthogonal data, fitting the actual frequency, and directly determining the positioning label position, solving the problems of low computing efficiency and positioning error in the existing technology, and achieving efficient and real-time Bluetooth positioning.
Patent Information
- Application Number
- CN202411203377.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2025-01-03
AI Technical Summary
In the existing Bluetooth positioning tag calculation method, AOA positioning technology requires computing eigenvalues and feature vectors of popular arrays, resulting in low computing efficiency, unable to achieve real-time positioning, and carrier frequency offset leads to positioning errors.
By demodulating the acquired signal to obtain in-phase orthogonal data, obtain the actual frequency based on the phase fitting of in-phase orthogonal data, directly use phase information to determine the position of the positioning label, avoid calculating the eigenvalues and eigenvectors, and reduce calculation costs and delays.
The efficiency of positioning label position calculation is improved, the delay of understanding calculation is reduced, real-time positioning is achieved, and positioning error is reduced by fitting the actual frequency, improving positioning accuracy.
Smart Images

Figure CN119255364A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of Bluetooth AOA positioning, and in particular to the calculation of the position of a Bluetooth positioning tag. Background Art
[0002] The AOA (Angle of Arrival) method is usually used in Bluetooth positioning tag calculations to determine the location of the transmitted signal by measuring the angle at which the signal arrives at the receiver. The AOA positioning principle is a signal processing technology based on antenna arrays. When the receiver receives a signal from a transmitter, the antenna array measures the angle at which the signal arrives, and then uses this angle information to calculate the transmitter's location.
[0003] However, in the prior art, the arrival angle algorithm needs to first calculate the eigenvalues and eigenvectors of the popular array, and then obtain the arrival angle through the data covariance matrix constructed by the eigenvectors, so as to calculate the position of the positioning tag. This makes the calculation inefficient and causes a large delay in the entire system, which cannot achieve the purpose of a real-time system.
[0004] In view of this, the present application demodulates the collected signal to obtain in-phase orthogonal data, fits the phase of the in-phase orthogonal data to obtain the actual frequency of the collected signal, and then determines the position of the positioning tag according to the phase of the actual frequency, thereby greatly reducing the computing cost, which is beneficial to improving the calculation efficiency of the positioning tag position, and is beneficial to reducing the delay of the positioning tag solution, so as to achieve the purpose of real-time calculation of the tag position. Summary of the invention
[0005] The embodiments of the present application provide a method, system and storage medium for calculating the position of a Bluetooth positioning tag.
[0006] In the first aspect, standard Bluetooth signals sent by the positioning tag at different times are collected to obtain collected signals, wherein the standard Bluetooth signals are non-modulated signals with fixed frequencies;
[0007] Demodulating the collected signal to obtain in-phase and quadrature data;
[0008] Perform fitting according to the phase of the in-phase and quadrature data to obtain the actual frequency of the collected signal;
[0009] The position of the positioning tag is determined according to the phase of the actual frequency.
[0010] Optionally, the positioning base station collects standard Bluetooth signals sent by the positioning tag at different times according to a reference period, and the fitting is performed according to the phase of the in-phase orthogonal data to obtain the actual frequency of the collected signal, including:
[0011] The slope is calculated according to the preset number of acquisitions;
[0012] An intercept is calculated according to the phase of the in-phase and quadrature data, the preset number of acquisitions and the slope;
[0013] The actual frequency of the collected signal is calculated according to the slope.
[0014] Optionally, the positioning tag includes an antenna array, and determining the position of the positioning tag according to the phase of the actual frequency includes:
[0015] A phase matrix is obtained according to the phase of the actual frequency, wherein the phase matrix includes X rows and Y columns, wherein the X rows correspond to the phases of the collected signals collected by the positioning base station for each antenna in the antenna array, and the Y columns correspond to the phases of the collected signals collected by the positioning base station for each antenna at each moment;
[0016] Determine the elevation angle and azimuth angle of the positioning tag relative to the positioning base station according to the phase matrix;
[0017] Determine the position coordinates of the positioning tag according to the pitch angle and the azimuth angle;
[0018] The determined position coordinates of the positioning tag are used as the position of the positioning tag.
[0019] Optionally, determining the elevation angle and azimuth angle of the positioning tag relative to the positioning base station according to the phase matrix includes:
[0020] Obtaining an intermediate vector according to the phase matrix calculation;
[0021] Calculate and obtain a spatial spectrum according to the intermediate vector;
[0022] The elevation angle and azimuth angle of the positioning tag relative to the positioning base station are determined according to the maximum value of the spatial spectrum.
[0023] Optionally, calculating the intermediate vector according to the phase matrix includes:
[0024] dividing the phase matrix into a first sub-matrix and a second sub-matrix;
[0025] Calculate a propagation vector according to the first sub-matrix and the second sub-matrix;
[0026] An intermediate vector is calculated based on the propagation vector.
[0027] Optionally, before using the determined position coordinates of the positioning tag as the position of the positioning tag, the method includes:
[0028] Calculating a first spatial propagation distance according to the location coordinates of the positioning tag and the location coordinates of a preset positioning base station;
[0029] Calculating a second spatial propagation distance according to the signal strength of the collected signal;
[0030] A determination is made based on the first spatial propagation distance and the second spatial propagation distance whether to use the location coordinates of the positioning tag as the location of the positioning tag.
[0031] Optionally, judging whether to use the location coordinates of the positioning tag as the location of the positioning tag according to the first spatial propagation distance and the second spatial propagation distance includes:
[0032] If the ratio of the first spatial propagation distance to the second spatial propagation distance or the ratio of the second spatial propagation distance to the first spatial propagation distance satisfies a condition greater than or equal to a first threshold and less than or equal to a second threshold, the position coordinates of the positioning tag are used as the position of the positioning tag.
[0033] In a second aspect, an embodiment of the present application provides a system for calculating the position of a Bluetooth positioning tag, the system comprising:
[0034] A collection module, used for collecting standard Bluetooth signals sent by the positioning tag at different times to obtain collected signals, wherein the standard Bluetooth signal is a non-modulated signal with a fixed frequency;
[0035] A demodulation module, used for demodulating the collected signal to obtain in-phase and quadrature data;
[0036] A fitting module, used for fitting according to the phase of the in-phase and quadrature data to obtain the actual frequency of the collected signal;
[0037] The positioning tag position determination module is used to determine the position of the positioning tag according to the phase of the actual frequency.
[0038] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described above when executing the computer program.
[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described above is implemented.
[0040] The present application demodulates the collected signal to obtain in-phase orthogonal data, fits the phase of the in-phase orthogonal data to obtain the actual frequency of the collected signal, and then determines the position of the positioning tag according to the phase of the actual frequency. In the process, only phase information is needed, and there is no need to calculate the eigenvalues and eigenvectors of the signal array, which greatly reduces the calculation cost, is conducive to improving the calculation efficiency of the positioning tag position, and is conducive to reducing the delay of the positioning tag solution, so as to achieve the purpose of real-time calculation of the tag position. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 This is a schematic diagram of the Bluetooth AOA positioning principle provided by an embodiment of the present application;
[0043] Figure 2 It is a schematic diagram of a method for calculating the position of a Bluetooth positioning tag provided in an embodiment of the present application;
[0044] Figure 3 The embodiment of this application provides Figure 2 Schematic diagram of the specific steps of S300;
[0045] Figure 4 The embodiment of this application provides Figure 2 Schematic diagram of the specific steps of S400;
[0046] Figure 5 The embodiment of this application provides Figure 5 Schematic diagram of specific steps of S402;
[0047] Figure 6 It is a schematic diagram of an algorithm flow of a Bluetooth positioning tag position provided in an embodiment of the present application;
[0048] Figure 7 It is a structural diagram of a system for calculating the position of a Bluetooth positioning tag provided in an embodiment of the present application;
[0049] Figure 8 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0051] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0052] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0053] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0054] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0055] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0056] The AOA (Angle of Arrival) method is usually used in Bluetooth positioning tag calculations to determine the location of the transmitted signal by measuring the angle at which the signal arrives at the receiver. The AOA positioning principle is a signal processing technology based on antenna arrays. When the receiver receives a signal from a transmitter, the antenna array measures the angle at which the signal arrives, and then uses this angle information to calculate the transmitter's location.
[0057] However, in the prior art, the arrival angle algorithm needs to first calculate the eigenvalues and eigenvectors of the popular array, and then obtain the arrival angle through the data covariance matrix constructed by the eigenvectors, so as to calculate the position of the positioning tag. This makes the calculation inefficient and causes a large delay in the entire system, which cannot achieve the purpose of a real-time system.
[0058] In the Bluetooth AOA system, most traditional arrival angle algorithms use MUSIC (multi-signal classification) and ESPRIT (rotation-invariant parameter estimation) algorithms, among which the principle of multi-signal classification is that for the data covariance matrix received by the array, the MUSIC algorithm uses its eigenvectors to construct the signal subspace, and uses the eigenvector corresponding to the minimum eigenvalue to construct the noise subspace. By performing matrix decomposition on the array output model, the MUSIC algorithm can obtain the eigenvector corresponding to the signal, thereby realizing the estimation of the incident angle of the signal. The rotation-invariant parameter estimation constructs the cross-covariance matrix through the covariance matrix, decomposes the eigenvalues of the cross-covariance matrix, takes the minimum mean value as the estimate of the z noise variance, obtains the matrix bundle according to the noise variance, decomposes the matrix bundle again, and estimates the incident angle of the received signal according to the decomposed characteristics.
[0059] On the one hand, the existing tag solution method needs to calculate the eigenvalues and eigenvectors of the popular array, which makes the calculation efficiency low, resulting in a large delay in the entire system, and cannot achieve the purpose of the real-time system. On the other hand, due to the frequency mismatch between the transmitter (positioning tag) and the receiver (positioning base station) oscillator, and secondly, the transmitter (positioning tag) and the receiver (positioning base station) will produce a Doppler effect. These two reasons will cause carrier frequency offset, and finally the positioning base station demodulates to a frequency that is not the standard 250Khz. Under the prior condition, the CTE frequency emitted by the positioning tag is assumed to be 250Khz, but due to the frequency offset, the positioning base station receives a frequency that is not the standard 250Khz, which may be 270Khz, etc., with a small fluctuation. At this time, the positioning base station still uses the 250Khz signal to calculate and will calculate the wrong position. Therefore, it is necessary to calculate the actual frequency of the signal received by the positioning base station and solve the position of the positioning tag according to the actual frequency.
[0060] In view of this, the present application demodulates the collected signal to obtain in-phase orthogonal data, fits the phase of the in-phase orthogonal data to obtain the actual frequency of the collected signal, and then determines the position of the positioning tag according to the phase of the actual frequency. In the process, only phase information is needed, and there is no need to calculate the eigenvalues and eigenvectors of the signal array, which greatly reduces the calculation cost, is conducive to improving the calculation efficiency of the positioning tag position, and is conducive to reducing the delay of the positioning tag solution, so as to achieve the purpose of real-time calculation of the tag position.
[0061] Figure 1 Schematic diagram of the Bluetooth AOA positioning principle provided by the embodiment of the present application, such as Figure 1 shown.
[0062] The AOA (Angle of Arrival) method is usually used in Bluetooth positioning tag calculations to determine the location of the transmitted signal by measuring the angle at which the signal arrives at the receiver. The AOA positioning principle is a signal processing technology based on antenna arrays. When the receiver receives a signal from a transmitter, the antenna array measures the angle at which the signal arrives, and then uses this angle information to calculate the transmitter's location.
[0063] In the embodiment of the present application, the positioning tag refers to a signal transmitter, which can be an antenna array. The antenna array is formed by feeding and spatially arranging two or more single antennas working at the same frequency according to certain requirements. The antenna radiation units constituting the antenna array are called array elements. The positioning base station refers to a signal receiver, that is, a signal sent by a receiving signal generator. In the present application, the number of positioning base stations is at least one. The embodiment of the present application is described by taking the single base station solution as an example. When multiple base stations are solved, more than two positioning base stations are reported, and the location of the positioning tag is output using the method of multi-azimuth joint solution and the joint solution of collecting signal strength to calculate the distance.
[0064] like Figure 1 As shown, in a possible implementation manner, the positioning base station can be installed horizontally or tilted by a rotation angle. Installing the positioning base station at different angles is suitable for solving the positioning tag position in various scenarios.
[0065] The positioning base station receives the signal sent by the positioning tag and calculates the elevation angle and azimuth angle of the positioning base station relative to the positioning tag. The elevation angle is the angle between the line of sight and the horizontal line in the vertical plane where the line of sight is located when the line of sight is above the horizontal line. The depression angle is the angle between the horizontal line and the downward descending line segment in the vertical plane. The range of the elevation angle is 0° to 180°. The azimuth angle is the horizontal angle from the north direction line of a certain point to the target direction line in a clockwise direction.
[0066] Based on the introduction of the above basic concepts, the problem solved by this application is how to quickly calculate the position coordinates (x, y) of the positioning tag through the Bluetooth positioning method. Figure 2 Schematic diagram of a method for calculating the position of a Bluetooth positioning tag provided in an embodiment of the present application. Figure 2 As shown, the method includes:
[0067] S100, collecting standard Bluetooth signals sent by the positioning tag at different times to obtain collected signals, wherein the standard Bluetooth signals are non-modulated signals with a fixed frequency.
[0068] In the embodiment of the present application, the standard Bluetooth signal refers to the CTE signal (Constant Tone Extension) in the Bluetooth signal, which is a signal extension function specifically used for direction perception and positioning. The CTE signal enables the positioning base station to determine the location of other devices by the angle of the received signal, thereby achieving more accurate indoor positioning. Under the prior conditions, the CTE frequency emitted by the default positioning tag is a fixed 250Khz unmodulated signal, but because the positioning tag and the positioning base station oscillator frequency do not match, and secondly, the positioning tag and the positioning base station will produce a Doppler effect. These two reasons will cause a carrier frequency offset, and finally the positioning base station demodulates to a frequency that is not a standard Bluetooth signal. In view of this, this step collects the signal with a carrier frequency offset received by the positioning base station to obtain a collected signal.
[0069] S200, demodulating the collected signal to obtain in-phase and quadrature data.
[0070] In the field of signal processing, the Chinese name of IQ data is usually called "in-phase quadrature data" or "I / Q data". Among them: I (In-phase) is usually translated as "in-phase", and Q (Quadrature) is usually translated as "quadrature". In the embodiment of the present application, the signal received by the positioning base station will be processed in the hardware, and the hardware will demodulate the signal to obtain IQ data.
[0071] S300, performing fitting according to the phase of the in-phase and quadrature data to obtain the actual frequency of the collected signal.
[0072] According to the description of S100, it is known that due to the carrier frequency offset generated by the positioning tag and the positioning base station, the frequency demodulated by the positioning base station is not a standard Bluetooth signal. In the embodiment of the present application, the positioning base station demodulates the collected signal into IQ data through S200, calculates the phase based on the IQ data, and then fits the phase based on the IQ data reference period to obtain the actual frequency of the collected signal, which may not match the 250khz frequency sent by the positioning base station.
[0073] S400: Determine the position of the positioning tag according to the phase of the actual frequency.
[0074] In the embodiment of the present application, the pitch angle and the azimuth angle are obtained through a rectangular array according to the actual frequency calculated in S300, and the position of the positioning tag is determined according to the pitch angle and the azimuth angle.
[0075] Specifically, the collecting of standard Bluetooth signals sent by the positioning tag at different times by the positioning base station to obtain the collected signals includes:
[0076] S101, determining a Bluetooth broadcast frequency band.
[0077] In the embodiment of the present application, the channel selection is to select the Bluetooth broadcast frequency band. Since some frequency bands are seriously interfered by the environment during the signal transmission process, the positioning effect is not very good, and it is necessary to select a frequency band with a good signal.
[0078] S102: The positioning base station collects standard Bluetooth signals sent by the positioning tag at different times in the Bluetooth broadcast frequency band to obtain an initial signal.
[0079] S103: Filter the signals in the initial signal that are not sent by the positioning tag and the signals whose signal strength is less than a preset strength threshold to obtain a collection signal.
[0080] In the embodiment of the present application, the initial signal data is preprocessed, and the data quality is first filtered. The data quality filtering includes removing non-AOA data, removing data that is not within the RSSI specified range, and removing data with a history of high CTE frequency. The non-AOA data is the signal sent by the non-positioning tag, and the RSSI is an indication of the strength of the signal received by the positioning base station. In the embodiment of the present application, since the received signal includes a signal with lower strength, a strength threshold is preset, and some signals with low signal strength are filtered through RSSI, and signals with high signal strength are selected for positioning. The standard frequency of CTE is 250khz, so it is necessary to remove signal data with a frequency higher than the standard frequency.
[0081] Secondly, it is also necessary to filter the system tags. The Bluetooth tags that need to be located all have MAC addresses. In the embodiment of the present application, only the positioning tag data is needed, and excluding data from other sources is called tag filtering.
[0082] In the embodiment of the present application, after the initial signal is filtered, a high-quality received signal remains, and the retained high-quality received signal is referred to as an acquisition signal.
[0083] In the embodiment of the present application, the collected data is obtained according to S100, and the collected data is converted into in-phase orthogonal data through the hardware in the positioning base station. The initial phase is directly calculated based on the in-phase orthogonal data using the conventional method in the field. Due to the delay of the antenna, the improvement of the present application is to compensate the initial phase to obtain the phase of the in-phase orthogonal data. S300 of the present application calculates the actual frequency after the phase of the compensated in-phase orthogonal data. In S300, it will be specifically introduced how to obtain the actual frequency received by the positioning base station.
[0084] Figure 3 The embodiment of this application provides Figure 2 The specific steps of S300 are shown in the figure below. Figure 3 As shown, the positioning base station collects the standard Bluetooth signal sent by the positioning tag at different times according to the reference period, and the phase fitting is performed according to the in-phase orthogonal data to obtain the actual frequency of the collected signal, including:
[0085] S301, calculating a slope according to a preset number of acquisition times.
[0086] In the embodiment of the present application, the hardware will divide the collection into two cycles according to the time of collection (agreed upon in the Bluetooth specification protocol), the first cycle is called the reference cycle, and the second cycle is called the switching cycle.
[0087] The phases of the obtained in-phase and quadrature data are fitted. In a possible implementation, the slope of the reference period is calculated according to the following formula using the least squares method.
[0088]
[0089] Among them, x i is a natural number from 1 to 8, n is the number of acquisitions, y is the phase of the reference cycle calculated from the in-phase and quadrature data, and β1 is the slope calculated from the reference cycle.
[0090] S302, calculating an intercept according to the phase of the in-phase and quadrature data, the preset number of acquisitions and the slope.
[0091] In the embodiment of the present application, the intercept is calculated based on the phase of the in-phase and quadrature data, the preset number of acquisitions, and the slope calculated from the reference period, in combination with the following formula.
[0092]
[0093] Among them, y is the phase of the reference period calculated by the in-phase orthogonal data, β0 is the calculated intercept, and β1 is the slope calculated by the reference period.
[0094] S303: Calculate the actual frequency of the collected signal according to the slope.
[0095] In the embodiment of the present application, the actual frequency of the collected signal is calculated according to the following formula.
[0096]
[0097] In the embodiment of the present application, the actual frequency of the collected signal is obtained through S300. In this step S400, it will be specifically introduced how to determine the position of the positioning tag through the phase of the actual frequency. The positioning tag includes an antenna array. Specifically, Figure 4 The embodiment of this application provides Figure 2 The specific steps of S400 are shown in the figure below. Figure 4 As shown, determining the position of the positioning tag according to the phase of the actual frequency includes:
[0098] S401, obtaining a phase matrix according to the phase of the actual frequency, the phase matrix comprising X rows and Y columns, the X rows corresponding to the phases of the collection signals collected by the positioning base station for each antenna in the antenna array, and the Y columns corresponding to the phases of the collection signals collected by the positioning base station for each antenna at each moment.
[0099] In the embodiment of the present application, a phase matrix is obtained according to the phase of the actual frequency. The phase matrix [X*Y] includes X rows and Y columns. The phase in the X row is the phase of the collected signal obtained by the positioning base station collecting the signal sent by each antenna in the antenna array, and the phase in the Y column is the phase of the collected signal obtained by the positioning base station collecting the signal sent by each antenna at each moment.
[0100]
[0101] Among them, the matrix is an R*k matrix, each row of the matrix represents a different antenna, each column represents the phase collected by different antennas at the same time, and X(t) represents the required phase matrix.
[0102] S402: Determine the elevation angle and azimuth angle of the positioning tag relative to the positioning base station according to the phase matrix.
[0103] According to the phase matrix obtained in S401, the algorithm of this application directly uses the phase matrix to estimate the pitch angle and azimuth angle, instead of using the matrix to calculate the covariance. The algorithm relies on calculating the propagation vector q and divides the phase matrix into the following two sub-matrices, namely the first sub-matrix and the second sub-matrix. Specifically, Figure 5 The embodiment of this application provides Figure 4 The specific steps of S402 are shown in FIG. Figure 5As shown, determining the elevation angle and azimuth angle of the positioning tag relative to the positioning base station according to the phase matrix includes:
[0104] S4021, calculating an intermediate vector according to the phase matrix.
[0105] Specifically, the calculating the intermediate vector according to the phase matrix includes:
[0106] S1, dividing the phase matrix into a first sub-matrix and a second sub-matrix;
[0107] u=[x1(t1)x1(t2)…x1(t k )]
[0108]
[0109] Among them, u is the first sub-matrix, and U is the second sub-matrix.
[0110] S2. Calculate a propagation vector according to the first sub-matrix and the second sub-matrix.
[0111]
[0112] Where q is the propagation vector representing the relationship between the first row (phase data received from the first antenna) and the other rows, and H is the conjugate transpose.
[0113] S3, calculating an intermediate vector according to the propagation vector.
[0114] e=[1,q] T
[0115] Among them, e is the intermediate vector, indicating the correlation with the first row, and T is the matrix transpose.
[0116] S4022: Calculate and obtain a spatial spectrum according to the intermediate vector.
[0117] P(θ)=|A(θ) H e|
[0118] Among them, P(θ) is the spatial spectrum and A(θ) is the direction vector.
[0119] S4023 determines the elevation angle and azimuth angle of the positioning tag relative to the positioning base station according to the maximum value of the spatial spectrum.
[0120] In the embodiment of the present application, according to the spatial spectrum obtained in S4022, the largest number in the spatial spectrum is the azimuth and elevation angle of the tag.
[0121] S403: Determine the position coordinates of the positioning tag according to the pitch angle and the azimuth angle.
[0122] In the embodiment of the present application, according to the Bluetooth AOA commonly used in the art, the positioning tag position (x, y) is calculated based on the pitch angle and azimuth calculated.
[0123] S404: Using the determined position coordinates of the positioning tag as the position of the positioning tag.
[0124] In an embodiment of the present application, before using the determined location coordinates of the positioning tag as the location of the positioning tag, the method includes:
[0125] A1. Calculate a first spatial propagation distance according to the location coordinates of the positioning tag and the location coordinates of a preset positioning base station.
[0126]
[0127] Among them, (x, y, z) represents the spatial coordinates of the positioning tag, (x1, y1, z1) represents the spatial coordinates of the pre-installed preset positioning base station, and D1 represents the calculated spatial straight-line distance between the positioning tag and the positioning base station, that is, the first spatial propagation distance.
[0128] A2, calculating a second spatial propagation distance according to the signal strength of the collected signal.
[0129]
[0130] Among them, RSSI is the signal strength received by the positioning base station, A represents the signal strength of the positioning base station and the tag 1 meter apart, and n is the environmental attenuation factor
[0131] A3: Determine whether to use the position coordinates of the positioning tag as the position of the positioning tag according to the first spatial propagation distance and the second spatial propagation distance.
[0132] Specifically, if the ratio of the first spatial propagation distance to the second spatial propagation distance or the ratio of the second spatial propagation distance to the first spatial propagation distance satisfies a condition greater than or equal to a first threshold and less than or equal to a second threshold, the position coordinates of the positioning tag are used as the position of the positioning tag.
[0133] In the embodiment of the present application, since the (X, Y) calculated by the pitch angle is not filtered or optimized, it is hoped that the positioning coordinates of (X, Y) can be optimized by D1 and D2. If 0.8≤D1 / D2≤1.2 or 0.8≤D2 / D1≤1.2 is satisfied, the position coordinates of the positioning tag obtained in S403 are regarded as the correct coordinate output (x, y).
[0134] Figure 6is a schematic diagram of an algorithm flow for determining the position of a Bluetooth positioning tag provided in an embodiment of the present application, such as Figure 6 As shown, the embodiment of the present application provides an algorithm for the position of a Bluetooth positioning tag. First, the Bluetooth broadcast frequency band is selected through channel selection, and then the signal collected under the broadcast frequency band is preprocessed. The specific process and steps of the preprocessing are as described in S100. The specific process and steps of fitting the actual frequency of CTE according to the least squares method are as described in S300. When there are multiple positioning base stations, the base station with the largest collected signal strength is selected and the IQ data corresponding to the positioning base station is obtained. The corresponding phase is obtained according to the IQ data. In a possible implementation manner of the present application, the direct phase obtained by directly calculating the IQ data can be compensated. The specific process and steps of calculating the pitch angle and azimuth angle according to the compensated phase and the positioning tag solution algorithm of the present application are as described in S401 and S402. The specific process and steps of calculating the positioning tag (x, y) according to the pitch angle and azimuth angle are as described in S403. Then, by calculating D1 and D2, it is further determined whether the obtained positioning tag coordinates (x, y) are accurate. If the conditions are met, the specific process and steps of outputting the coordinates are as described in A1-A3.
[0135] The beneficial effects of this application include three points: (1) High real-time performance: only phase information is needed to calculate the tag position, which greatly reduces the calculation cost, is conducive to improving the calculation efficiency of the positioning tag position, is conducive to reducing the calculation delay, and achieves the purpose of real-time calculation of the tag position. (2) High precision: by fitting the actual frequency sent by the CTE signal and then aligning the phase, it is more in line with reality, and combined with RSSI distance comparison, it can meet the actual positioning situation. (3) The algorithm is highly portable: there is no need to call a special linear algebra library, and the spatial spectrum of the angle can be calculated by directly constructing the vector.
[0136] See also Figure 7 , shows a schematic diagram of the structure of a Bluetooth positioning tag position calculation system provided in an embodiment of the present application. For the sake of ease of explanation, only the parts related to the embodiment of the present application are shown.
[0137] The Bluetooth positioning tag position calculation system 500 may specifically include the following modules:
[0138] The collection module 510 is used to collect the standard Bluetooth signals sent by the positioning tag at different times to obtain collected signals, wherein the standard Bluetooth signals are non-modulated signals with a fixed frequency;
[0139] A demodulation module 520, used for demodulating the collected signal to obtain in-phase and quadrature data;
[0140] A fitting module 530, configured to perform fitting according to the phase of the in-phase and quadrature data to obtain the actual frequency of the collected signal;
[0141] The positioning tag position determination module 540 is used to determine the position of the positioning tag according to the phase of the actual frequency.
[0142] The acquisition module 510 includes the following submodules:
[0143] A channel selection module 511 is used to determine the broadcast frequency band of Bluetooth;
[0144] An initial signal module 512 is used to collect standard Bluetooth signals sent by the positioning tag at different times according to the positioning base station in the Bluetooth broadcast frequency band to obtain an initial signal;
[0145] The pre-processing module 513 is used to filter the signals not sent by the positioning tag and the signals whose signal strength is less than a preset strength threshold in the initial signal to obtain the collected signal.
[0146] The fitting module 530 includes the following submodules:
[0147] The slope module 531 is used to calculate the slope according to a preset number of acquisitions;
[0148] An intercept module 532, configured to calculate an intercept according to the phase of the in-phase and quadrature data, the preset number of acquisitions and the slope;
[0149] The actual frequency module 533 is used to calculate the actual frequency of the collected signal according to the slope.
[0150] The step of determining the position of the positioning tag according to the phase of the actual frequency includes:
[0151] The positioning tag position determination module 540 includes the following submodules:
[0152] A phase matrix module 541 is used to obtain a phase matrix according to the phase of the actual frequency, wherein the phase matrix includes X rows and Y columns, wherein the X rows correspond to the phases of the collected signals collected by the positioning base station for each antenna in the antenna array, and the Y columns correspond to the phases of the collected signals collected by the positioning base station for each antenna at each moment;
[0153] Angle module 542, used to determine the elevation angle and azimuth angle of the positioning tag relative to the positioning base station according to the phase matrix;
[0154] A coordinate calculation module 543, used to determine the position coordinates of the positioning tag according to the pitch angle and the azimuth angle;
[0155] The position determination module 544 is configured to use the determined position coordinates of the positioning tag as the position of the positioning tag.
[0156] The angle module 542 specifically includes the following units:
[0157] An intermediate vector unit 5421, configured to calculate an intermediate vector according to the phase matrix;
[0158] A spatial spectrum unit 5422, configured to calculate a spatial spectrum according to the intermediate vector;
[0159] The angle calculation unit 5423 is used to determine the elevation angle and azimuth angle of the positioning tag relative to the positioning base station according to the maximum value of the spatial spectrum.
[0160] The intermediate vector unit 5421 is specifically used for:
[0161] dividing the phase matrix into a first sub-matrix and a second sub-matrix;
[0162] Calculate a propagation vector according to the first sub-matrix and the second sub-matrix;
[0163] An intermediate vector is calculated based on the propagation vector.
[0164] The system further includes a condition judgment module, which includes the following subunits:
[0165] A first space propagation distance calculation unit, configured to calculate a first space propagation distance according to the location coordinates of the positioning tag and the location coordinates of a preset positioning base station;
[0166] A second spatial propagation distance calculation unit, configured to calculate a second spatial propagation distance according to the signal strength of the collected signal;
[0167] A judging unit is used to judge whether to use the position coordinates of the positioning tag as the position of the positioning tag according to the first spatial propagation distance and the second spatial propagation distance.
[0168] The judging unit is specifically used for:
[0169] If the ratio of the first spatial propagation distance to the second spatial propagation distance or the ratio of the second spatial propagation distance to the first spatial propagation distance satisfies a condition greater than or equal to a first threshold and less than or equal to a second threshold, the position coordinates of the positioning tag are used as the position of the positioning tag.
[0170] Figure 8 Schematic diagram of the structure of the terminal device provided in the embodiment of the present application. Figure 8 As shown, the terminal device 700 of this embodiment includes: at least one processor 710 ( Figure 8Only one is shown in the figure), a memory 720, and a computer program 721 stored in the memory 720 and executable on the at least one processor 710, wherein the processor 710 implements the steps in the above method embodiment when executing the computer program 721.
[0171] The terminal device 700 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 710 and a memory 720. Those skilled in the art will appreciate that Figure 8 It is only an example of the terminal device 700 and does not constitute a limitation on the terminal device 700. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.
[0172] The processor 710 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0173] In some embodiments, the memory 720 may be an internal storage unit of the terminal device 700, such as a hard disk or memory of the terminal device 700. In other embodiments, the memory 720 may also be an external storage device of the terminal device 700, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device 700. Further, the memory 720 may also include both an internal storage unit of the terminal device 700 and an external storage device. The memory 720 is used to store an operating system, an application program, a boot loader (Boot Loader), data and other programs, such as the program code of the computer program, etc. The memory 720 may also be used to temporarily store data that has been output or is to be output.
[0174] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0175] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0176] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0177] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0178] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0179] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0180] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0181] The present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed through a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing.
[0182] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above-mentioned embodiments, a person skilled in the art should understand that the technical solutions described in the above-mentioned embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method for calculating the position of a Bluetooth positioning tag, characterized in that: The method comprises: Collecting standard Bluetooth signals sent by the positioning tag at different times to obtain collected signals, wherein the standard Bluetooth signal is a non-modulated signal with a fixed frequency; Demodulating the collected signal to obtain in-phase and quadrature data; Perform fitting according to the phase of the in-phase and quadrature data to obtain the actual frequency of the collected signal; The position of the positioning tag is determined according to the phase of the actual frequency.
2. The method according to claim 1, characterized in that: The positioning base station collects the standard Bluetooth signal sent by the positioning tag at different times according to the reference period, and the phase fitting is performed according to the in-phase orthogonal data to obtain the actual frequency of the collected signal, including: The slope is calculated according to the preset number of acquisitions; An intercept is calculated according to the phase of the in-phase and quadrature data, the preset number of acquisitions and the slope; The actual frequency of the collected signal is calculated according to the slope.
3. The method according to claim 1, characterized in that: The positioning tag includes an antenna array, and determining the position of the positioning tag according to the phase of the actual frequency includes: A phase matrix is obtained according to the phase of the actual frequency, wherein the phase matrix includes X rows and Y columns, wherein the X rows correspond to the phases of the collected signals collected by the positioning base station for each antenna in the antenna array, and the Y columns correspond to the phases of the collected signals collected by the positioning base station for each antenna at each moment; Determine the elevation angle and azimuth angle of the positioning tag relative to the positioning base station according to the phase matrix; Determine the position coordinates of the positioning tag according to the pitch angle and the azimuth angle; The determined position coordinates of the positioning tag are used as the position of the positioning tag.
4. The method according to claim 3, characterized in that: The step of determining the elevation angle and the azimuth angle of the positioning tag relative to the positioning base station according to the phase matrix includes: Obtaining an intermediate vector according to the phase matrix calculation; Calculate and obtain a spatial spectrum according to the intermediate vector; The elevation angle and azimuth angle of the positioning tag relative to the positioning base station are determined according to the maximum value of the spatial spectrum.
5. The method according to claim 4, characterized in that: The step of calculating the intermediate vector according to the phase matrix comprises: dividing the phase matrix into a first sub-matrix and a second sub-matrix; Calculate a propagation vector according to the first sub-matrix and the second sub-matrix; An intermediate vector is calculated based on the propagation vector.
6. The method according to claim 3, characterized in that: Before using the determined location coordinates of the positioning tag as the location of the positioning tag, the method includes: Calculating a first spatial propagation distance according to the location coordinates of the positioning tag and the location coordinates of a preset positioning base station; Calculating a second spatial propagation distance according to the signal strength of the collected signal; A determination is made based on the first spatial propagation distance and the second spatial propagation distance whether to use the location coordinates of the positioning tag as the location of the positioning tag.
7. The method according to claim 6, characterized in that: The determining, according to the first spatial propagation distance and the second spatial propagation distance, whether to use the position coordinates of the positioning tag as the position of the positioning tag includes: If the ratio of the first spatial propagation distance to the second spatial propagation distance or the ratio of the second spatial propagation distance to the first spatial propagation distance satisfies a condition greater than or equal to a first threshold and less than or equal to a second threshold, the position coordinates of the positioning tag are used as the position of the positioning tag.
8. A system for calculating the position of a Bluetooth positioning tag, characterized in that: The system comprises: A collection module, used for collecting standard Bluetooth signals sent by the positioning tag at different times to obtain collected signals, wherein the standard Bluetooth signal is a non-modulated signal with a fixed frequency; A demodulation module, used for demodulating the collected signal to obtain in-phase and quadrature data; A fitting module, used for fitting according to the phase of the in-phase and quadrature data to obtain the actual frequency of the collected signal; The positioning tag position determination module is used to determine the position of the positioning tag according to the phase of the actual frequency.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Inventory tracking management system based on RFID
CN120579930A
