A bluetooth indoor positioning method and system based on spatial spectrum function and AOA
Patent Information
- Application Number
- CN202611238701.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-15
- Publication Date
- 2026-10-30
AI Technical Summary
因此,相关技术中的蓝牙室内定位方式在噪声条件下由于空间谱估计算法对噪声敏感、角度估计精度下降,导致定位精度较差,无法满足高精度应用需求
[0016]第四方面,本申请提供了一种电子设备,包括处理器、存储器和收发器,所述存储器用于存储指令,所述收发器用于和其他设备通信,所述处理器用于执行所述存储器中存储的指令,以使所述电子设备执行如上述任意一项方法。
Smart Images

Figure CN123021348A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of indoor positioning technology, specifically to a Bluetooth indoor positioning method and system based on spatial spectrum function and AOA. Background Technology
[0002] With the rapid development of IoT technology and smart terminal devices, the demand for indoor positioning technology is increasing. Global Positioning System (GPS) fails indoors due to signal attenuation and electromagnetic interference. Bluetooth indoor positioning technology, with its advantages of low power consumption, ease of integration and deployment, and the widespread availability of Bluetooth modules in smart terminals, is gradually becoming the mainstream technology in the indoor positioning field. Bluetooth indoor positioning systems deploy multiple Bluetooth base stations indoors to receive and analyze Bluetooth signals emitted by target devices, calculating the target's location using signal propagation characteristics, thus achieving real-time positioning and tracking.
[0003] In related Bluetooth indoor positioning technologies, angle-of-arrival (AOA) based positioning methods calculate the target position by measuring the angle of arrival of the signal at each base station and using triangulation principles. This method relies on spatial spectrum estimation to calculate the AOA. However, in real indoor environments, Bluetooth signals are affected by noise such as thermal noise, electromagnetic interference, and multipath propagation. Noise components superimposed on the received signal cause deviations in the phase and amplitude relationship of the received signal from the antenna array, resulting in shifts in the peak position of the spatial spectrum function, blurred shape, and even spurious peaks. When the noise intensity is high, the angle resolution capability of the spatial spectrum estimation algorithm is significantly reduced, and the AOA estimation error is transmitted and amplified through triangulation principles into the final position calculation result. Therefore, in noisy conditions, Bluetooth indoor positioning methods suffer from poor positioning accuracy and cannot meet the requirements of high-precision applications due to the sensitivity of the spatial spectrum estimation algorithm to noise and the resulting decrease in angle estimation accuracy. Summary of the Invention
[0004] This application provides a Bluetooth indoor positioning method and system based on spatial spectrum function and AOA, which can improve indoor positioning accuracy in noisy environments.
[0005] In a first aspect, this application provides a Bluetooth indoor positioning method based on spatial spectral function and AOA, the method comprising:
[0006] Describing the technical effects of the proposed solution requires deriving them from the solution itself. It's essential to maintain consistency in the naming of the technical features and to present the solutions logically and comprehensively, avoiding point-by-point arguments.
[0007] By employing the above technical solution, eigenvalue decomposition is performed on the covariance matrix constructed from the received signal vector. The differences in eigenvalue magnitudes are used to separate the signal space from the noise space. The noise subspace determined from the eigenvectors accurately reflects the statistical distribution characteristics of the noise. The spatial spectrum function constructed based on the noise subspace utilizes the mathematical property that the signal steering vector is orthogonal to the noise subspace, forming a clear spectral peak distribution in the angular domain. Even in noisy environments, it maintains high angular resolution, and the arrival angle estimate obtained by searching for spectral peaks exhibits good noise immunity. An error vector equation is used to fuse observation information from multiple base stations. An optimization algorithm balances the measurement deviations of each base station holistically, reducing the impact of individual base station angular errors on the positioning results. Finally, the least squares method is used to solve for and comprehensively utilize the angular observation data from all base stations. Through multi-source information fusion, the influence of measurement errors from each base station is effectively averaged, thus significantly improving indoor positioning accuracy in noisy environments.
[0008] Secondly, this application provides a Bluetooth indoor positioning system based on spatial spectral function and AOA, the system comprising:
[0009] An initialization module is used to deploy multiple Bluetooth base stations in an indoor positioning area, each of which includes multiple receiving antenna elements;
[0010] The sampling module is used to sample the Bluetooth received signal through multiple receiving antenna array elements to obtain a received signal vector, and to calculate the covariance matrix of the Bluetooth received signal based on the received signal vector.
[0011] The eigenvalue decomposition module is used to perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues and eigenvectors, and to determine the noise subspace from the eigenvectors based on the magnitude of the eigenvalues;
[0012] The peak search module is used to construct a spatial spectrum function based on the noise subspace, search for the peak value of the spatial spectrum function, and obtain the estimated angle of arrival value at each of the Bluetooth base stations;
[0013] The equation construction module is used to construct the error vector equation for each Bluetooth base station based on the coordinate position of each Bluetooth base station, the corresponding estimated angle of arrival, and the measurement error term.
[0014] The solution module is used to establish an optimization objective that minimizes the norm of the error vector equation and to obtain the coordinate estimate of the target position by using the least squares method.
[0015] Thirdly, this application provides a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing any of the methods described above.
[0016] Fourthly, this application provides an electronic device including a processor, a memory, and a transceiver, wherein the memory is used to store instructions, the transceiver is used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform any of the methods described above.
[0017] In summary, the beneficial effects of the technical solution of this application include:
[0018] By employing the above technical solution, eigenvalue decomposition is performed on the covariance matrix constructed from the received signal vector. The differences in eigenvalue magnitudes are used to separate the signal space from the noise space. The noise subspace determined from the eigenvectors accurately reflects the statistical distribution characteristics of the noise. The spatial spectrum function constructed based on the noise subspace utilizes the mathematical property that the signal steering vector is orthogonal to the noise subspace, forming a clear spectral peak distribution in the angular domain. Even in noisy environments, it maintains high angular resolution, and the arrival angle estimate obtained by searching for spectral peaks exhibits good noise immunity. An error vector equation is used to fuse observation information from multiple base stations. An optimization algorithm balances the measurement deviations of each base station holistically, reducing the impact of individual base station angular errors on the positioning results. Finally, the least squares method is used to solve for and comprehensively utilize the angular observation data from all base stations. Through multi-source information fusion, the influence of measurement errors from each base station is effectively averaged, thus significantly improving indoor positioning accuracy in noisy environments. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating a Bluetooth indoor positioning method based on spatial spectrum function and AOA according to an embodiment of this application;
[0020] Figure 2 This is a schematic diagram of the structure of a Bluetooth indoor positioning system based on spatial spectrum function and AOA according to an embodiment of this application;
[0021] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0022] Explanation of reference numerals in the attached drawings: 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. Detailed Implementation
[0023] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0024] In the description of the embodiments of this application, words such as "illustrative," "for example," or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "illustrative," "for example," or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Rather, the use of words such as "illustrative," "for example," or "for example" is intended to present the relevant concepts in a specific manner.
[0025] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0026] Please see Figure 1 This document presents a flowchart illustrating a Bluetooth indoor positioning method based on spatial spectrum functions and AOA, as provided in an embodiment of this application. This method can be implemented using a computer program, a microcontroller, or run on a Bluetooth indoor positioning system based on the von Neumann architecture and spatial spectrum functions and AOA. The computer program can be integrated into the application or run as a standalone utility application. The specific steps of the Bluetooth indoor positioning method based on spatial spectrum functions and AOA are described in detail below.
[0027] S101: Deploy multiple Bluetooth base stations in the indoor positioning area, each Bluetooth base station including multiple receiving antenna elements;
[0028] Indoor positioning areas refer to enclosed or semi-enclosed spaces where target location tracking and positioning are required, such as the interiors of shopping malls, office floors, warehouses, and workshops. A Bluetooth base station is a fixed-location device with Bluetooth signal reception capabilities, used to receive Bluetooth signals emitted by the target to be located. Each base station has known precise coordinates. A receiving antenna element refers to multiple antenna units arranged in a specific geometric configuration on a Bluetooth base station. Common arrangements include uniform linear arrays, uniform circular arrays, or planar arrays. For example, four antenna elements can be arranged in a straight line with a spacing of half a wavelength. Deployment refers to selecting suitable locations in space to install multiple Bluetooth base stations based on the geometry and size of the positioning area, ensuring that the positioning area is fully covered by the receiving range of multiple base stations. For example, installing one base station at each of the four corners of a rectangular room.
[0029] Specifically, the first step is to design the number and installation location of Bluetooth base stations based on the actual area, shape, and obstacle distribution of the indoor positioning area. Generally, at least three base stations are required to achieve two-dimensional planar positioning; more base stations can improve positioning accuracy and reliability. Then, the Bluetooth base station equipment is installed at the selected locations. Each base station is equipped with multiple receiving antenna elements, maintaining a precise geometric spacing between these elements. Typically, the spacing is set to half the Bluetooth signal carrier wavelength to meet the requirements of subsequent signal processing algorithms. After installation, the coordinates of each Bluetooth base station need to be accurately measured and recorded to establish a unified coordinate system, such as a two-dimensional Cartesian coordinate system with a corner of the room as the origin. These base station coordinates will serve as known parameters for subsequent positioning calculations.
[0030] In some embodiments, the deployment of Bluetooth base stations and the configuration of antenna arrays can be achieved in various ways. Optionally, a uniform linear array configuration scheme can be adopted. First, three to five base station installation points are selected at the boundary of the indoor positioning area to ensure that these installation points can form a good geometric distribution to avoid positioning blind spots. Then, four receiving antenna elements are configured for each base station, arranged in a straight line at equal intervals, with the interval set to half the wavelength corresponding to the center frequency of the Bluetooth signal. Finally, high-precision measuring equipment such as a total station or laser rangefinder is used to measure the precise coordinate position of each base station, and the coordinate information is entered into the configuration database of the positioning system.
[0031] S102: Sample the Bluetooth received signal through multiple receiving antenna array elements to obtain the received signal vector, and calculate the covariance matrix of the Bluetooth received signal based on the received signal vector;
[0032] In this context, the receiving antenna element refers to an independent antenna unit on a Bluetooth base station used to receive wireless signals. Each element can independently acquire signals and convert them into electrical signals. Sampling refers to the process of numerically measuring and recording continuous analog signals at discrete time points. The sampling frequency needs to satisfy the Nyquist sampling theorem to avoid signal distortion. The Bluetooth received signal refers to the Bluetooth radio wave signal transmitted from the target to be located, received by each antenna element. This signal contains the directional information of the target's position. The received signal vector is a complex vector formed by arranging the signal amplitude and phase information acquired by multiple antenna elements at the same time according to the element order. The dimension of the vector is equal to the number of antenna elements; for example, a four-element system corresponds to a four-dimensional complex vector. The covariance matrix is a square matrix used to represent the statistical correlation between the components of the received signal vector. The matrix elements reflect the degree of correlation between the received signals of different antenna elements, and its size is equal to the square of the number of antenna elements.
[0033] Specifically, multiple receiving antenna elements in each Bluetooth base station simultaneously receive Bluetooth signals from the target to be located. Due to the different spatial positions of each element, the arrival time of the same signal at different elements varies slightly, resulting in different phases of the signals received by each element. The base station's signal processing unit performs analog-to-digital conversion and down-conversion on the analog signals of each element, sampling at multiple consecutive time points. The signal amplitude and phase information of each element at each moment are combined into a complex vector, i.e., the received signal vector. To obtain stable and reliable statistical characteristics, multiple snapshots of the received signal vectors need to be collected within a time window. Then, the covariance matrix is calculated using these received signal vectors. Specifically, the received signal vector at each moment is multiplied by its conjugate transpose to obtain a matrix. The matrices obtained from multiple moments are then averaged, i.e., the expected value is calculated, ultimately yielding the covariance matrix of the received signal.
[0034] S103: Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues and eigenvectors, and determine the noise subspace from the eigenvectors based on the magnitude of the eigenvalues;
[0035] The covariance matrix, calculated in the previous step, is a square matrix reflecting the statistical characteristics of the received signal, containing information from both the signal and noise subspaces. Eigenvalues are scalars satisfying specific mathematical relationships, representing the degree of scaling of the covariance matrix along the corresponding eigenvector direction; their magnitude reflects the energy intensity of the corresponding component. Eigenvectors are vectors corresponding to eigenvalues that, under covariance matrix transformation, only undergo scaling without changing direction; multiple eigenvectors are mutually orthogonal and span the entire signal space. The noise subspace is the vector space spanned by the eigenvectors corresponding to smaller eigenvalues, representing the space containing the noise components in the received signal, and is orthogonal to the steering vector of the signal's arrival direction.
[0036] Specifically, the covariance matrix is first decomposed into eigenvalues. This is a standard numerical linear algebra problem that can be solved using numerical methods such as the Jacobi iteration method, the QR algorithm, or singular value decomposition. The decomposition yields a set of eigenvalues and corresponding eigenvectors. The number of eigenvalues equals the dimension of the covariance matrix, i.e., the number of antenna elements. These eigenvalues are then arranged in descending order. Larger eigenvalues correspond to the signal subspace, reflecting the energy of the useful signal, while smaller eigenvalues correspond to the noise subspace, reflecting the energy level of the background noise. Theoretically, the number of signal sources determines the dimension of the signal subspace, and the remaining eigenvalues should be equal to the noise power. In practical applications, the number of signal sources needs to be determined based on the relationship between the eigenvalues. Common methods include setting a threshold, the Gaussian circle criterion, or information theory criteria such as the AIC criterion and the MDL criterion.
[0037] In some embodiments, eigenvalue decomposition of the covariance matrix and determination of the noise subspace can be achieved in various ways. Optionally, a direct eigenvalue decomposition method can be used. First, the eigenvalue decomposition function in a numerical computing library such as LAPACK or Eigen is used to perform a complete eigenvalue decomposition of the covariance matrix to obtain all eigenvalues and eigenvectors. Then, the eigenvalues are arranged in descending order, and the eigenvalue distribution curve is plotted to observe its changing trend and identify obvious energy jump points. Finally, based on prior knowledge of the number of signal sources or by automatically determining the number using MDL information theory criteria, the eigenvectors corresponding to the smallest eigenvalues, such as the last MK eigenvalues, are extracted to form the noise subspace projection matrix, where M is the number of array elements and K is the number of signal sources.
[0038] S104: Construct a spatial spectrum function based on the noise subspace, search for the peak value of the spatial spectrum function, and obtain the estimated angle of arrival at each Bluetooth base station;
[0039] The spatial spectrum function is a function of spatial angles constructed based on subspace theory. It reflects the probability of a signal source at different angles by calculating the orthogonality between the steering vector and the noise subspace. The larger the function value, the more likely that angle is the true direction of signal arrival. Typical spatial spectrum functions include the MUSIC spectrum function and the ESPRIT spectrum function. The estimated angle of arrival is an approximation of the angle of arrival calculated by signal processing algorithms. It has a certain error compared to the true angle but is statistically close to the true value.
[0040] Specifically, firstly, a mathematical model of the steering vector is established based on the antenna array's geometry. For a uniform linear array, the steering vector is a function of the angle of arrival, and its elements are determined by the phase difference between the array elements, which is proportional to the sine of the angle. Then, a spatial spectrum function is constructed. The most commonly used is the spectrum function of the MUSIC algorithm, which is expressed as the product of the conjugate transpose of the steering vector and the projection matrix of the noise subspace, multiplied by the steering vector and then taking its reciprocal. This spectrum function exhibits sharp peaks at the actual signal angle of arrival because the steering vector is completely orthogonal to the noise subspace, and the denominator approaches zero. To find these peaks, a search needs to be performed within the possible angle range. Typically, the angle range of 0 to 180 degrees or -90 to 90 degrees is discretized with a certain angular resolution, such as 0.1 degrees or 1 degree. The spatial spectrum function value corresponding to each angle is calculated, and a spatial spectrum curve is plotted. By identifying the peak positions on the spectrum curve, an estimate of the signal angle of arrival can be obtained.
[0041] S105: Based on the coordinates of each Bluetooth base station, the corresponding estimated angle of arrival, and the measurement error term, construct the error vector equation for each Bluetooth base station.
[0042] In this context, the coordinates of a Bluetooth base station refer to the two-dimensional or three-dimensional coordinates of each base station in a unified coordinate system. These coordinates are precisely measured and recorded during system deployment and serve as known parameters for positioning calculations. The measurement error term refers to the deviation between the estimated angle of arrival and the true angle of arrival caused by factors such as signal noise, multipath effects, and hardware non-ideals; it is typically assumed to be a zero-mean random variable. The error vector equation is a system of linear or non-linear equations based on geometric relationships and incorporating measurement errors, connecting the target location coordinates to be determined with the known base station coordinates and angle measurements through mathematical relationships.
[0043] Specifically, for a two-dimensional planar positioning problem, let the coordinates of the i-th base station be (x_i, y_i), the coordinates of the target position be (x, y), and the estimated angle of arrival be θ_i. Based on trigonometric geometry, the tangent function equation tan(θ_i) = (y - y_i) / (x - x_i) can be established. This equation expresses the relationship between the slope and angle of the ray pointing from the base station to the target, and is theoretically accurate. However, due to errors in angle measurement, the actual estimated angle θ_i includes the measurement error Δθ_i. Therefore, an error term needs to be introduced into the ideal geometric relationship. The tangent function equation can be rewritten as tan(θ_i + Δθ_i) = (y - y_i) / (x - x_i), or approximated to a linear form through Taylor expansion, yielding an equation containing the error term. To facilitate subsequent matrix operations and optimization, these equations need to be standardized into a standard linear system of equations, namely the error vector equation e = Wu - h, where e is a vector containing all base station measurement errors, W is a coefficient matrix composed of base station coordinates and angle cosine values, u is the target position coordinate vector to be determined, and h is a constant vector composed of base station coordinates and angle tangent values.
[0044] S106: Establish an optimization objective that minimizes the norm of the error vector equation, and use the least squares method to solve for the coordinate estimate of the target position.
[0045] In this context, the error vector norm refers to the length of the error vector, commonly the Euclidean norm (or L2 norm), calculated as the square root of the sum of the squares of all elements of the error vector. The magnitude of the norm reflects the goodness of fit of the equation system. The optimization objective refers to the mathematical goal to be achieved during the solution process; here, it aims to minimize the norm of the error vector, i.e., to find the optimal coordinate estimate that minimizes the overall error of all equations. Least squares is a classic parameter estimation method that determines the optimal parameters by minimizing the sum of squared residuals between observed and model predicted values. It has advantages such as simple computation and good unbiasedness. The coordinate estimate refers to the optimal estimate of the target position coordinates obtained through optimization, and is the final output of the positioning system.
[0046] Specifically, we first establish a mathematical model for the optimization problem. The optimization objective is to minimize the L2 norm of the error vector, i.e., min||e||2. Substituting the error vector equation e=Wu-h into the model yields min||Wu-h||2. This is an unconstrained convex optimization problem with a unique global optimum. To solve this optimization problem, we use the least squares method to transform the problem, converting norm minimization into minimizing the sum of squared errors, i.e., min(u)=Σe_i²=||Wu-h||2²=(Wu-h)^T(Wu-h). Expanding this quadratic form function, we get S(u)=u^TW^TWu-2u^TW^Th+h^Th, which is a quadratic function of the coordinate vector u. To find the coordinate vector that minimizes S(u), we need to take the partial derivative of S(u) with respect to u and set it to zero, resulting in the normal equation 2W^TWu-2W^Th=0, which simplifies to W^TWu=W^Th. This is a system of linear equations. The coefficient matrix W^TW is a symmetric positive definite matrix, which can be solved by matrix inversion or Gaussian elimination to obtain the least squares solution u=(W^TW)^(-1)W^Th. This solution is the coordinate estimate of the target position, where the first component is the x-coordinate estimate and the second component is the y-coordinate estimate, completing the entire positioning process from angle measurement to position determination.
[0047] Based on the above embodiments, as an optional implementation method, the method of calculating the covariance matrix of the Bluetooth received signal according to the received signal vector in S102 can be implemented through the following steps.
[0048] Substituting the received signal vector into the matrix calculation formula yields the covariance matrix of the Bluetooth received signal.
[0049] The received signal vector is:
[0050] ;
[0051] in, This represents the received signal vector at time t. Indicates direction as array manifold vectors, Let i represent the complex envelope of the i-th signal source at time t. Represents a noise vector;
[0052] The received signal vector is a column vector composed of the complex signal values synchronously acquired by each antenna element at time t, arranged in the order of the elements. The vector dimension is equal to the total number of antenna elements, N. The array manifold vector is a complex vector formed by the phase relationship between the signals received by each element and the reference element when a plane wave signal is incident on the antenna array at a specific angle. This vector is completely determined by the signal arrival angle and the array geometry; different angles correspond to different array manifold vectors. The signal source complex envelope is the complex representation of the baseband signal transmitted by the i-th signal source at time t, containing the amplitude and phase information of the signal and reflecting the modulation characteristics and instantaneous power of the signal. The noise vector is the superposition of undesired signals such as thermal noise, quantization noise, and external interference in the receiving link of each antenna element. It is usually modeled as additive white Gaussian noise, and the noise of each element is statistically independent and has the same power level.
[0053] At time t, N Bluetooth signal sources simultaneously transmit signals to the base station within the indoor positioning area. These signals arrive at the base station's antenna array at different angles. The arrival times of the signals transmitted by each source to different antenna elements differ slightly after spatial propagation; this time difference manifests as a phase difference at the receiver. For the i-th signal source, its transmitted baseband signal propagates through the spatial channel, and the received signal generated at each element can be represented as the product of the complex envelope of that signal source and the array manifold vector at the corresponding angle. Due to the presence of multiple signal sources, the total signal received by each element is the summation of the contributions from all signal sources, forming a summation term. Simultaneously, various noises are inevitably introduced during reception, including thermal noise from the receiver circuitry, quantization noise from analog-to-digital conversion, and electromagnetic interference from the environment. These noise components are superimposed on the useful signal, constituting the noise term of the received signal vector. By summing the useful signal term and adding the noise term, a complete expression for the received signal vector is obtained. This expression establishes the mathematical relationship between the observed data and the unknown parameters. The arrival angle of the signal source is implicit in the array manifold vector. By processing and analyzing the received signal vector, the angle information can be extracted, thereby achieving target localization.
[0054] The formula for matrix calculation is:
[0055] ;
[0056] Where R represents the covariance matrix and E represents the expected value. Let t represent the received signal vector at time t.
[0057] The covariance matrix is the expected value of the received signal vector and its conjugate transpose. It is a square matrix, where the element in the m-th row and n-th column represents the cross-correlation function value between the received signals of the m-th and n-th array elements. The expected value represents the operator for statistical averaging of random variables. It estimates the theoretical expected value by averaging multiple observations, eliminating random fluctuations and obtaining stable statistical properties. The conjugate transpose is the operation of first taking the conjugate of a complex matrix and then transposing it, converting the column vector into a row vector and taking the conjugate of all complex elements. The operator is usually denoted by the superscript H or an asterisk followed by T.
[0058] The calculation of the covariance matrix transforms the received signal vector in the time domain into second-order moment information in the statistical domain, containing the power distribution of the signal and noise, as well as the correlation characteristics between different array elements. According to the definition of the covariance matrix, it is necessary to calculate the expected value of the received signal vector multiplied by its conjugate transpose. The received signal vector is a time-varying random vector, and its value changes with signal modulation and noise fluctuations at different times. Representing the received signal vector at a certain moment as a column vector, and its conjugate transpose as a row vector, multiplies them to obtain a square matrix with dimensions equal to the number of array elements multiplied by the number of array elements. The diagonal elements of this matrix represent the instantaneous power of the received signal at each array element, and the off-diagonal elements represent the instantaneous cross-correlation values of the received signals between different array elements. Due to the randomness of the signal and noise, the matrix obtained from a single observation contains a large amount of random fluctuation and cannot reflect stable statistical characteristics. By averaging the observation matrices from multiple times or multiple snapshots, i.e., calculating the expected value, random fluctuations can be eliminated, and stable statistical information can be extracted.
[0059] Based on the above embodiments, as an optional implementation method, the method of constructing the error vector equation of each Bluetooth base station according to the coordinate position of each Bluetooth base station, the corresponding estimated value of the angle of arrival, and the measurement error term in S105 can be specifically implemented through the following steps S201-S202.
[0060] S201: Construct the tangent function relationship based on the coordinate positions of each Bluetooth base station and the corresponding estimated angle of arrival;
[0061] The coordinates of the Bluetooth base station refer to the known coordinates of the Bluetooth base station in a pre-established two-dimensional or three-dimensional coordinate system within the indoor positioning system. These coordinates are typically determined through precise measurement and stored in the system database during system deployment. The tangent function equation refers to the equation constraint established using the tangent relationship in trigonometric functions, which establishes an equality between the unknown coordinates of the target, the known coordinates of the base station, and the measured angle of arrival. This equation, based on geometric principles, transforms the angular observation into mathematical constraints for position estimation.
[0062] In indoor positioning scenarios, assuming the Bluetooth tag to be located is in an unknown location, multiple Bluetooth base stations distributed in different locations simultaneously receive the signal emitted by the tag. Each base station measures the angle of arrival (AHA) of the signal through its antenna array, obtaining the direction information of the base station pointing towards the target. From a geometric perspective, there is a definite trigonometric function relationship between the known coordinates of the base station, the unknown coordinates of the target, and the measured AHA. Specifically, the tangent of the azimuth angle of the target relative to the base station is equal to the difference between the vertical coordinates of the target and the base station in the coordinate system divided by the difference in their horizontal coordinates. For each base station, by substituting its own vertical and horizontal coordinates, the measured AHA, and retaining the unknown vertical and horizontal coordinates of the target as variables, a tangent function equation is established. When there are multiple base stations, each base station provides an independent tangent function equation, and multiple equations are combined to form a system of equations. The unknowns in these equations are the coordinate components of the target, and the known quantities include the coordinates of each base station and the measured AHA of each base station.
[0063] Optionally, the tangent function expression is:
[0064] ;
[0065] in, Let represent the estimated angle of arrival of the i-th Bluetooth base station, and (x, y) represent the coordinate vector of the location to be solved. This represents the coordinates of the i-th Bluetooth base station.
[0066] Among them, the position coordinate vector to be solved refers to the position representation of the target object in the indoor coordinate system whose value needs to be determined by the positioning algorithm. This vector contains two unknown variables, the horizontal coordinate component and the vertical coordinate component, and is the solution target of the entire positioning problem.
[0067] The construction of the tangent function equation utilizes the trigonometric function definition in plane geometry to link angular observations with spatial positional relationships, establishing a solvable algebraic equation. In a two-dimensional plane coordinate system, when the coordinates of a reference point and the angle between the ray pointing from that reference point to another unknown point and the positive direction of the coordinate axis are known, according to the definition of a right triangle, the tangent value of this angle is equal to the ratio of the difference between the ordinates and the difference between the abscissas of the two points. For indoor positioning scenarios, the i-th Bluetooth base station is taken as the reference point, and its abscissa and ordinate are known constants that have been precisely measured during system deployment. The location of the tag to be located is unknown, and its abscissa and ordinate are variables that need to be solved. The base station measures the angle of arrival of the signal through the antenna array, which represents the angle between the signal propagation direction and the reference direction of the antenna array. According to the definition of the coordinate system and the measurement benchmark of the angle, the angle of arrival is converted into the angle between the ray pointing from the base station to the tag and the positive direction of the coordinate axis.
[0068] Applying the geometric definition of the tangent function, the tangent value of this angle is equal to the difference between the tag's ordinate and the base station's ordinate, divided by the difference between the tag's abscissa and the base station's abscissa. Substituting the known base station coordinate components, the measured angle of arrival, and the unknown tag coordinate components into this geometric relationship forms a nonlinear equation with two unknowns. The left side of the equation is the tangent function value of the angle of arrival, and the right side is a fraction expressed in terms of base station coordinates and tag coordinates. This equation establishes a functional constraint relationship between the angle observation value and the unknown location, a geometric constraint derived from the angle observation of a single base station.
[0069] S202: Introduce the measurement error terms of each Bluetooth base station into the tangent function relationship to obtain the error vector equation of each Bluetooth base station.
[0070] The tangent function equation established in the previous step implicitly assumes that the measurement of the angle of arrival is completely accurate. However, in actual measurement, multiple error sources exist. The multipath effect in indoor environments causes signals to reach the base station via multiple paths after reflection and refraction through walls, furniture, and other objects. These multipath components superimpose and interfere with the angle estimation of the direct path. Noise superimposed in the received signal reduces the accuracy of separating the signal subspace from the noise subspace, causing random bias in angle estimation. Manufacturing errors, installation errors, and calibration errors of the antenna array elements also introduce systematic biases. To reflect these real-world errors in the mathematical model, an error term is introduced into the tangent function equation for each base station. This error term is added to the measured angle of arrival, indicating that the actual measured value equals the true angle plus the measurement error. Substituting the measured angle containing the error term into the tangent function equation transforms the original equation into an equation containing the error variable. Since the error term is a random variable, the left and right sides of the equation are no longer strictly equal; instead, there is a residual caused by the error. For all base stations, the tangent function equation for each base station introduces a corresponding measurement error term, forming a set of error vector equations. The vector form of this set of equations integrates the equations for all base stations, with the error terms forming the error vector and the geometric relationships of each base station forming the components of the vector equations. The establishment of the error vector equations transforms the localization problem from a deterministic optimization problem into a statistical estimation problem. The objective is no longer to find a solution that precisely satisfies all equations, but rather to find the optimal estimate that minimizes a certain norm of the error vector. This provides a theoretical basis for applying statistical estimation methods such as least squares and weighted least squares.
[0071] Optionally, the error vector equation is:
[0072] ;
[0073] ;
[0074] ;
[0075] Where e represents the error vector containing all Bluetooth base stations, Let represent the measurement error term of the i-th Bluetooth base station, h represent the constant vector, W represent the coefficient matrix, and u represent the coordinate vector of the position to be solved. This represents the estimated angle of arrival for the i-th Bluetooth base station.
[0076] The constant vector is a column vector formed by sequentially arranging the known values calculated from the tangent of the arrival angle of each base station and the coordinate components of the base station. This vector is entirely determined by the measurement data and system configuration parameters and does not contain any unknown variables. The coefficient matrix is a matrix that describes the linear relationship between the position coordinate vector to be solved and the error vector. Each row of the matrix corresponds to the geometric constraint of a base station, and each column corresponds to a component of the position coordinate. The matrix elements consist of the tangent of the arrival angle of the base stations and constants.
[0077] The construction process of the error vector equation transforms the nonlinear tangent function into a vector form of a linear system of equations through algebraic transformations, making subsequent numerical solutions and error analysis more convenient. First, the tangent function for each base station is rearranged, expanding the fractional expression on the right-hand side of the equation so that the numerator is listed separately. For the i-th base station, the numerator on the right-hand side of its tangent function is the ordinate of the label to be solved minus the ordinate of the base station, and the denominator is the abscissa of the label to be solved minus the abscissa of the base station. Moving the numerator to the left-hand side of the equation and multiplying the unknown abscissa term in the denominator to the left-hand side, we obtain a linear combination form containing the unknowns of both the ordinate and abscissa.
[0078] Specifically, the tangent of the angle of arrival is multiplied by the x-coordinate of the tag to be solved, and then subtracted from the y-coordinate of the tag to be solved. The result is equal to the tangent of the angle of arrival multiplied by the x-coordinate of the base station and then subtracted from the y-coordinate of the base station. This transforms the nonlinear tangent relationship for each base station into a linear equation about two unknown coordinate components. The linear equations for all base stations are then arranged into a matrix, constructing a coefficient matrix where the element in the i-th row and first column is the tangent of the angle of arrival of the i-th base station, and the element in the i-th row and second column is negative one. A constant vector is constructed where the i-th element is the result of multiplying the tangent of the angle of arrival of the i-th base station by its x-coordinate and then subtracting its y-coordinate. The x-coordinate and y-coordinate of the tag to be solved are then combined to form a position coordinate vector.
[0079] Based on the error vector equation constructed above, as an optional implementation method, the specific way to solve for the coordinate estimate of the target position can be achieved through the following steps S301-S304.
[0080] S301: Based on the error vector equation, construct an optimization function with the goal of minimizing the norm of the error vector;
[0081] In this context, the optimization objective refers to the optimality criterion desired when solving a location problem. This means adjusting the coordinates of the location to be solved to minimize or maximize a certain evaluation index. This criterion determines the optimization direction of the solution algorithm. The optimization function is a mathematical expression that uses the variable to be solved as the independent variable and the optimization objective evaluation index as the function value. The extreme points of the function correspond to the optimal solution to the problem.
[0082] Optionally, the optimization function is:
[0083] ;
[0084] in, argmin_u represents the estimated coordinates of the target location, and argmin_u represents the coordinate vector that minimizes the optimization function. The norm of the error vector;
[0085] The `argmin` operator on the right side of the function searches for the value of the independent variable that minimizes the subsequent expression. The coordinate variable `u` below the operator represents the position coordinates used as the search variable during the optimization process. The vertical bar symbol indicates the vector norm operation, used to measure the size or length of a vector. The expression inside the norm operation is the constant vector `h` minus the product of the coefficient matrix `W` and the coordinate variable `u` to be optimized. This difference is the definition of the error vector, reflecting the residuals of the observation equations of each base station at a given position coordinate.
[0086] The calculation principle of this formula is based on parameter estimation methods in numerical optimization theory, which search the parameter space to find the parameter values that minimize the objective function. The specific calculation process first involves traversing or iteratively searching for different candidate coordinate values across the entire range of position coordinates. For each candidate position coordinate, it is substituted into the expression for the error vector, i.e., the coordinate variable u is replaced with the candidate coordinate. Then, the product of the coefficient matrix and the candidate coordinate is calculated, and this product is subtracted from the constant vector to obtain the corresponding error vector. Next, the norm of the obtained error vector is calculated. The method of norm calculation depends on the chosen norm type; the commonly used 2-norm is obtained by squaring each element of the error vector, summing them, and then taking the square root. This norm value is a non-negative scalar, and its magnitude reflects the degree of fit between the current candidate coordinates and the actual observed data.
[0087] Compare the norm values corresponding to all candidate coordinates and select the candidate coordinates that minimize the norm value as the optimal solution. In actual calculations, when choosing the L2 norm as the optimization criterion, minimizing the norm is equivalent to minimizing the square of the norm, i.e., the sum of squared errors. Since the sum of squared errors is a quadratic function of the position coordinates, the optimal solution can be directly obtained by taking the derivative of this function and setting the derivative to zero, without needing to search point by point. This analytical solution method is computationally efficient and yields a unique and stable result. The linear equation system obtained by differentiation is solved through matrix operations, and the final coordinate values are the optimal estimates that minimize the norm of the error vector.
[0088] The indoor positioning method in this application employs this optimization function formula to extract the optimal estimate of the target location from the arrival angle measurement data of multiple Bluetooth base stations, fully utilizing all observation information and effectively suppressing the influence of measurement errors. Since actual angle measurements involve random and systematic errors, angle observations from a single base station cannot accurately determine the target location, and there are often inconsistencies between observation data from different base stations, making the results obtained by directly solving the equation system unstable. By constructing an optimization function with the objective of minimizing the error vector norm, the positioning problem is transformed into finding the location point that best fits all observation data while satisfying physical constraints. This method provides the most reasonable estimate in a statistical sense. The norm operation in the optimization function comprehensively considers the measurement residuals of all base stations, ensuring that the solution process does not overly rely on the observations of a single base station while ignoring information from other base stations, thus achieving the fusion of multiple observation data.
[0089] S302: For the optimization objective of the optimization function, the least squares method is used to transform it into the sum of squared errors function;
[0090] In the optimization function established in the previous step, the optimization objective is to minimize the norm of the error vector. The norm can be defined in various forms, and different norms correspond to different optimization properties. The least squares method chooses the L2 norm as the optimization criterion. The L2 norm is defined as the square root of the sum of the squares of the elements of the vector. Since the square root function is monotonically increasing, minimizing the L2 norm is equivalent to minimizing the square of the L2 norm, and the square of the L2 norm is exactly equal to the sum of the squares of the elements of the vector. Thus, the optimization objective is transformed into minimizing the sum of squares of the errors. Each component of the error vector is squared, resulting in the same number of squared terms as the number of base stations. All squared terms are summed to form the sum of squares of the errors function. This function takes the position coordinate vector as the independent variable, and the function value is a non-negative scalar representing the cumulative square of the residuals of all base station equations. Starting from the expression of the error vector equation, the constant vector minus the product of the coefficient matrix and the position coordinate vector is taken as the error vector. Each element of this vector is squared. Specifically, the squared error term of the i-th base station is equal to the constant term of that base station minus the square of the difference between the dot product of the i-th row of the coefficient matrix and the position coordinate vector. Summing the squared error terms for all base stations and expanding them yields a complete expression containing quadratic, linear, and constant terms related to the location coordinate components. The sum of squared error function is a quadratic function of the location coordinate components and has a unique global minimum point. The location coordinates corresponding to this minimum point are the least squares solution.
[0091] Optionally, the sum of squared errors function is:
[0092] ;
[0093] Where S represents the sum of squared errors function, This represents the sum of squares of the norms of the error vector.
[0094] The double vertical bar symbol on the right side of the function indicates the L2 norm operation on the vector. The L2 norm is defined as the square root of the sum of the squares of the vector's elements. The superscript 2 after the norm expression indicates that the entire norm is squared, meaning the square of the L2 norm equals the sum of the squares of the vector's elements. The expression inside the norm operation, h minus Wu, is consistent with the content in the aforementioned optimization function. Here, h represents a constant vector, calculated from the tangent of the arrival angle of each base station and the base station coordinate components; W represents a coefficient matrix, whose elements consist of the tangent of the arrival angle of each base station and a constant; and u represents the target position coordinate vector to be solved, containing both x and y components. The result of subtracting the product of the coefficient matrix and the coordinate vector from the constant vector is the error vector. The square of the L2 norm of this error vector is the sum of squared errors.
[0095] The formula's calculation principle transforms the problem of minimizing the vector norm into minimizing the sum of squares of a scalar, simplifying the optimization process by utilizing the algebraic property of the square of the L2 norm. The calculation begins by multiplying the coefficient matrix W with the coordinate vector u, given or assumed location coordinates. The result of this matrix multiplication is a column vector with dimensions equal to the number of base stations. The i-th element of this vector equals the dot product of the i-th row of the coefficient matrix and the coordinate vector. Then, each element of the constant vector h is subtracted from the corresponding element of the matrix multiplication result to obtain the error vector. The i-th element of the error vector represents the residual value of the observation equation for the i-th base station. Next, the L2 norm of the error vector is calculated by squaring each element and summing all the squared terms. Finally, the square root of this sum is taken to obtain the L2 norm. However, since the formula performs a squaring operation on the L2 norm, the square root and squaring operations cancel each other out. Therefore, in actual calculations, the sum of squares of each element of the error vector is directly calculated, without the need for square root calculation. Specifically, the sum of squared errors S equals the sum of the squared errors of the first base station plus the sum of the squared errors of the second base station, and so on until the sum of the squared errors of the last base station. The sum of all these squared terms constitutes the value of the function S. Since the expression for the error vector includes position coordinate variables, the sum of squared errors function S is a function of the position coordinate components. After expanding the sum of squared expressions, the function contains quadratic terms, linear terms, and a constant term for the coordinate components, and is a standard quadratic function.
[0096] The purpose of using the sum of squared errors function formula in this application is to transform the abstract optimization objective into a concrete and computable mathematical expression, providing a clear functional form for subsequent analytical solutions and numerical calculations. Compared to other norm definitions, the L2 norm squared function is characterized by its ease of calculation and excellent mathematical properties. The squaring operation eliminates the nonlinearity of the square root, allowing the overall function to maintain a quadratic form. Differentiating this form of function yields a linear equation, and the system of linear equations has analytical solutions with mature and stable algorithms. Using the sum of squared errors as the optimization objective conforms to the classical theoretical framework of the least squares method. When the measurement error follows a zero-mean Gaussian distribution, the least squares estimation is equivalent to the maximum likelihood estimation, achieving optimal performance in a statistical sense. The estimation results possess unbiasedness and minimum variance characteristics. The formula is concise and uniform, facilitating application in scenarios with varying numbers of base stations. When adding or removing base stations, only the dimensions of the constant vector and coefficient matrix need to be adjusted accordingly, while the calculation process remains unchanged, resulting in strong system scalability. The error sum-of-squares function sums the squared residuals of all base stations. The squaring operation amplifies the impact of larger residuals, causing the optimization process to tend to minimize the largest deviation. This helps avoid the excessive influence of abnormal measurements from a single base station on the overall estimate. The location estimate obtained by minimizing this function comprehensively utilizes the angle observation information of all base stations, achieving multi-source data fusion. Compared with single-base station positioning or simple averaging methods, this significantly improves positioning accuracy and robustness.
[0097] S303: Solve the least squares solution by taking the partial derivatives of the sum of squared errors function with respect to the coordinate vector and setting the partial derivatives to zero. Use the least squares solution as the coordinate estimate of the target position.
[0098] Partial derivatives are the derivatives of a multivariate function with respect to one of the independent variables while keeping the other independent variables constant. The value of a partial derivative reflects the instantaneous rate of change of the function value with respect to that independent variable. Multiple partial derivatives form a gradient vector that indicates the direction in which the function grows the fastest.
[0099] Specifically, the sum of squared errors function is a quadratic function of the coordinate components of the position to be solved. The minimum point of this function must satisfy the condition that all first-order partial derivatives are zero. Taking the partial derivatives of the function with respect to the abscissa and ordinate components respectively yields two partial derivative expressions. When taking the partial derivative with respect to the abscissa component, the ordinate component is treated as a constant. The derivative is calculated according to the differentiation rule for all terms in the function containing the abscissa. Since the function is quadratic, the partial derivative is a linear function with respect to the abscissa. Similarly, taking the partial derivative with respect to the ordinate component yields a linear function with respect to the ordinate. Setting both partial derivatives to zero yields two linear equations with respect to the abscissa and ordinate. These two equations form a system of linear equations. The coefficients of the system are obtained from the elements of the coefficient matrix through matrix operations. Specifically, the transpose of the coefficient matrix is multiplied by the coefficient matrix itself to form the coefficient matrix of the system of equations. The constant term is obtained by multiplying the transpose of the coefficient matrix by the constant vector.
[0100] Taking the partial derivative of the sum of squared errors function with respect to the coordinates to be solved, we obtain the following linear equation: ;
[0101] Solving this system of linear equations yields the values of the x and y coordinates. Methods include standard linear algebra methods such as Gaussian elimination, matrix inversion, or Cramer's rule. When the product of the transpose of the coefficient matrix and itself is invertible, the analytical solution is directly obtained through matrix inversion. The formula is the inverse of the product of the transpose and the coefficient matrix, multiplied by the product of the transpose and the constant vector. The resulting coordinate values are the least squares solution, which minimizes the sum of squared residuals from all base station observation equations and represents the optimal linear unbiased estimate of the target's true location. The least squares solution is output as the coordinate estimate of the target location, completing the entire indoor positioning calculation process based on angle of arrival measurements. The accuracy of the estimate depends on the geometric distribution of the base stations, the magnitude of the angle measurement error, and the number of base stations involved in the positioning process.
[0102] The following are system embodiments of this application, which can be used to execute the method embodiments of this application. For details not disclosed in the system embodiments of this application, please refer to the method embodiments of the application.
[0103] Please see Figure 2 This illustration shows a schematic diagram of a Bluetooth indoor positioning system based on spatial spectrum function and AOA provided in an exemplary embodiment of this application. The system can be implemented as all or part of a system through software, hardware, or a combination of both. The Bluetooth indoor positioning system based on spatial spectrum function and AOA includes:
[0104] An initialization module is used to deploy multiple Bluetooth base stations in an indoor positioning area, each Bluetooth base station including multiple receiving antenna elements;
[0105] The sampling module is used to sample the Bluetooth received signal through multiple receiving antenna array elements to obtain the received signal vector, and calculate the covariance matrix of the Bluetooth received signal based on the received signal vector.
[0106] The eigenvalue decomposition module is used to perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues and eigenvectors, and to determine the noise subspace from the eigenvectors based on the magnitude of the eigenvalues.
[0107] The peak search module is used to construct a spatial spectrum function based on the noise subspace, search for the peak value of the spatial spectrum function, and obtain the estimated angle of arrival at each Bluetooth base station.
[0108] The equation building module is used to construct the error vector equation for each Bluetooth base station based on its coordinate position, the corresponding estimated angle of arrival, and the measurement error term.
[0109] The solver module is used to establish an optimization objective that minimizes the error vector norm in the error vector equation, and uses the least squares method to obtain the coordinate estimate of the target position.
[0110] This application also provides a computer storage medium that can store multiple instructions. The instructions are adapted to be loaded and executed by a processor as described in the above embodiments of the Bluetooth indoor positioning method based on spatial spectrum function and AOA. For the specific execution process, please refer to the detailed description of the embodiments, which will not be repeated here.
[0111] Please see Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 3 As shown, the electronic device 300 may include: at least one processor 301, at least one network interface 304, user interface 303, memory 305, and at least one communication bus 302.
[0112] The communication bus 302 is used to enable communication between these components.
[0113] The user interface 303 may include a display screen and a camera.
[0114] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0115] The processor 301 may include one or more processing cores. The processor 301 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by calling data stored in the memory 305. Optionally, the processor 301 may be implemented using at least one hardware form of digital signal processing, field-programmable gate array, or programmable logic array. The processor 301 may integrate one or more of the following: a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.
[0116] The memory 305 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 305 may include a non-transitory computer-readable medium. The memory 305 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data involved in the various method embodiments described above, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned processor 301. Figure 3 As shown, the memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a Bluetooth indoor positioning method based on spatial spectrum function and AOA.
[0117] exist Figure 3 In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 301 can be used to call an application program stored in the memory 305 that is a Bluetooth indoor positioning method based on spatial spectrum function and AOA. When executed by one or more processors, the electronic device executes one or more methods as described in the above embodiments.
[0118] An electronic device readable storage medium stores instructions that, when executed by one or more processors, cause the electronic device to perform one or more methods as described in the above embodiments.
[0119] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0120] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0121] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some service interfaces; indirect couplings or communication connections between apparatuses or units may be electrical or other forms.
[0122] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0123] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0124] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0125] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of other embodiments of this disclosure upon considering the specification and the disclosure of practical truths. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure.
Claims
1. A Bluetooth indoor positioning method based on spatial spectral function and AOA, characterized in that, The method includes: Multiple Bluetooth base stations are deployed in the indoor positioning area, and each Bluetooth base station includes multiple receiving antenna elements; The Bluetooth received signal is sampled by multiple receiving antenna elements to obtain a received signal vector, and the covariance matrix of the Bluetooth received signal is calculated based on the received signal vector. The covariance matrix is decomposed into eigenvalues to obtain eigenvalues and eigenvectors, and the noise subspace is determined from the eigenvectors based on the magnitude of the eigenvalues. Based on the noise subspace, a spatial spectrum function is constructed, and the peak value of the spatial spectrum function is searched to obtain the estimated angle of arrival at each Bluetooth base station. Based on the coordinate positions of each Bluetooth base station, the corresponding estimated angle of arrival, and the measurement error term, an error vector equation for each Bluetooth base station is constructed. An optimization objective is established for the error vector equation to minimize the error vector norm, and the coordinate estimate of the target position is obtained by solving the least squares method.
2. The method according to claim 1, characterized in that, The step of calculating the covariance matrix of the Bluetooth received signal based on the received signal vector includes: Substituting the received signal vector into the matrix calculation formula yields the covariance matrix of the Bluetooth received signal; The received signal vector is: ; in, This represents the received signal vector at time t. Indicates direction as array manifold vectors, Let i represent the complex envelope of the i-th signal source at time t. Represents the noise vector; The matrix calculation formula is as follows: ; Where R represents the covariance matrix, and E represents the expected value. Let t represent the received signal vector at time t.
3. The method according to claim 1, characterized in that, The step of constructing the error vector equation for each Bluetooth base station based on its coordinate position, the corresponding estimated angle of arrival, and the measurement error term includes: Based on the coordinate positions of each Bluetooth base station and the corresponding estimated angle of arrival, a tangent function relationship is constructed; By incorporating the measurement error terms of each Bluetooth base station into the tangent function relation, the error vector equation of each Bluetooth base station is obtained.
4. The method according to claim 3, characterized in that, The tangent function relationship is as follows: ; in, Let (x, y) represent the estimated angle of arrival of the i-th Bluetooth base station, and (x, y) represent the coordinate vector of the position to be solved. This represents the coordinates of the i-th Bluetooth base station.
5. The method according to claim 3, characterized in that, The error vector equation is: ; ; ; Where e represents the error vector containing all the Bluetooth base stations, Let represent the measurement error term of the i-th Bluetooth base station, h represent the constant vector, W represent the coefficient matrix, and u represent the coordinate vector of the position to be solved. This represents the estimated angle of arrival for the i-th Bluetooth base station.
6. The method according to claim 5, characterized in that, The optimization objective of minimizing the error vector norm is established for the error vector equation, and the coordinate estimate of the target position is obtained by solving the least squares method, including: Based on the error vector equation, an optimization function is constructed with the goal of minimizing the norm of the error vector. For the optimization objective of the optimization function, the least squares method is used to transform it into an error sum of squares function; The partial derivatives of the sum of squared errors function with respect to the coordinate vector are calculated and set to zero to obtain the least squares solution. The least squares solution is then used as the coordinate estimate of the target position.
7. The method according to claim 6, characterized in that, The optimization function is: ; in, The coordinates of the target position are represented by argmin_u, which represents the coordinate vector that minimizes the optimization function. The norm of the error vector is represented; The sum of squared errors function is: ; Where S represents the sum of squared errors function. This represents the sum of squares of the norms of the error vector.
8. A Bluetooth indoor positioning system based on spatial spectral function and AOA, characterized in that, The system includes: An initialization module is used to deploy multiple Bluetooth base stations in an indoor positioning area, each of which includes multiple receiving antenna elements; The sampling module is used to sample the Bluetooth received signal through multiple receiving antenna array elements to obtain a received signal vector, and to calculate the covariance matrix of the Bluetooth received signal based on the received signal vector. The eigenvalue decomposition module is used to perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues and eigenvectors, and to determine the noise subspace from the eigenvectors based on the magnitude of the eigenvalues; The peak search module is used to construct a spatial spectrum function based on the noise subspace, search for the peak value of the spatial spectrum function, and obtain the estimated angle of arrival value at each of the Bluetooth base stations; The equation construction module is used to construct the error vector equation for each Bluetooth base station based on the coordinate position of each Bluetooth base station, the corresponding estimated angle of arrival, and the measurement error term. The solution module is used to establish an optimization objective that minimizes the norm of the error vector equation and to obtain the coordinate estimate of the target position by using the least squares method.
9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, The device includes a processor, a memory, and a transceiver, wherein the memory is used to store instructions, the transceiver is used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1 to 7.
