A CSI-based adaptive iterative visible light positioning method and system
By using a CSI-based adaptive iterative visible light positioning method, an initial position set is constructed using line-of-sight path distance and cyclic least squares method. Combined with a preset position weight threshold and an improved WKNN algorithm, the accuracy and stability problems caused by nonlinear errors in existing CSI positioning algorithms are solved, achieving high-precision and high-stability indoor positioning with low complexity.
Patent Information
- Application Number
- CN202310506619.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2043-05-06
AI Technical Summary
Existing CSI-based LS positioning algorithms are affected by nonlinear errors in indoor positioning, resulting in low positioning accuracy and stability.
By using CSI to estimate the line-of-sight path distance, constructing an initial position set using the cyclic least squares method, and then performing adaptive iterative estimation using a preset position weight threshold and an improved WKNN algorithm, the final estimated position of the receiver is obtained.
It fully utilizes positioning information with low complexity, effectively reduces the impact of nonlinear errors, improves positioning accuracy and stability, and supports complex indoor positioning scenarios.
Smart Images

Figure CN116626588B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of indoor positioning, in particular to a CSI-based adaptive iterative visible light positioning method and system. BACKGROUND
[0002] Visible light communication (VLC) is a technology that uses the intensity variation of visible light to transmit information, and has the advantages of high security, green and no radiation, rich spectrum resources, no need for authorization and resistance to electromagnetic interference, etc., and can provide a practical solution for indoor positioning. Among them, the RSS (Received Signal Strength) algorithm can determine the position of the receiver according to the signal strength of multiple visible light signals reaching the receiver, and is the most widely used due to its low device requirements, and the LS (Least Square estimation) positioning algorithm based on CSI (Channel State Information) can effectively reduce the influence of reflection paths.
[0003] However, although the existing CSI-based LS positioning algorithm can meet the needs of indoor positioning to a certain extent, it will be affected by nonlinear errors when using the LS algorithm for position estimation, thereby resulting in low positioning accuracy and stability, and affecting the actual application effect. SUMMARY
[0004] The purpose of the present application is to provide a CSI-based adaptive iterative visible light positioning method, which constructs an initial position set by using the line of sight (LOS) path distance estimated by CSI and the cyclic least squares method, and combines a preset position weight threshold and an improved WKNN (Weighted K-Nearest Neighbors) algorithm for adaptive iterative estimation to obtain the final estimated position of the receiver, solving the application defects of the existing CSI-based visible light positioning, fully utilizing the positioning information under the premise of low complexity, effectively reducing the influence of nonlinear errors in position estimation, improving the positioning accuracy and stability, supporting complex indoor positioning scenarios, and having high application value.
[0005] In order to achieve the above-mentioned purpose, it is necessary to provide a CSI-based adaptive iterative visible light positioning method and system in view of the above technical problems.
[0006] In a first aspect, the present application provides a CSI-based adaptive iterative visible light positioning method, which comprises the following steps:
[0007] receive a plurality of positioning light signals sent by a plurality of LED light sources, and process each positioning light signal to obtain a channel impulse response vector;
[0008] estimate a line-of-sight path distance between each LED light source and the receiver according to the channel impulse response vector, and obtain a first horizontal distance between each LED light source and the receiver according to each line-of-sight path distance;
[0009] construct an initial position set by using a recursive least square method according to the first horizontal distance between each LED light source and the receiver, and obtain a final estimated position of the receiver according to the initial position set and a preset position weight threshold.
[0010] Further, the step of constructing the initial position set by using the recursive least square method according to the first horizontal distance between each LED light source and the receiver comprises:
[0011] obtaining a receiver position coordinate equation set according to the first horizontal distance between each LED light source and the receiver;
[0012] selecting a receiver position coordinate sub-equation in the receiver position coordinate equation set in sequence, and obtaining a plurality of updated receiver position coordinate equation sets by respectively subtracting the selected receiver position coordinate sub-equation from the remaining receiver position coordinate sub-equations;
[0013] solving each updated receiver position coordinate equation set by using a least square method to obtain the initial position set.
[0014] Further, the step of obtaining the final estimated position of the receiver according to the initial position set and the preset position weight threshold comprises:
[0015] calculating a position weight vector corresponding to the initial position set, and obtaining an initial position according to the position weight vector;
[0016] iteratively calculating the final estimated position according to the position weight vector, the initial position, the initial position set and the preset position weight threshold.
[0017] Further, the step of calculating the position weight vector corresponding to the initial position set and obtaining the initial position according to the position weight vector comprises:
[0018] obtaining a position weight vector corresponding to the first horizontal distance between each LED light source and the receiver; each position weight in the position weight vector is expressed as:
[0019]
[0020] In the formula, x represents the position weight, and d represents the first horizontal distance.
[0021]
[0022] wherein, and W k respectively represent the line-of-sight path distance between the kth LED light source and the receiver, the first horizontal distance and the corresponding position weight; H represents the vertical distance between the LED light source and the receiver; N represents the total number of LED light sources;
[0023] According to the initial position set and the position weight vector, the initial position is obtained based on the WKNN algorithm.
[0024] Further, the step of calculating the position weight vector corresponding to the initial position set and obtaining the initial position according to the position weight vector comprises:
[0025] The second horizontal distance between each position in the initial position set and each LED light source is calculated, and a first distance matrix is constructed according to the second horizontal distance;
[0026] The difference between each second horizontal distance and the corresponding first horizontal distance is calculated respectively, and each difference is arranged in ascending order to obtain a distance difference sequence and a corresponding index vector;
[0027] According to the distance difference sequence and the corresponding index vector, the optimal K value of the WKNN algorithm is iteratively calculated;
[0028] According to the optimal K value and the distance difference sequence, the position weight vector is obtained;
[0029] According to the initial position set and the position weight vector, the initial position is obtained based on the WKNN algorithm.
[0030] Further, the step of iteratively calculating the optimal K value of the WKNN algorithm according to the distance difference sequence and the corresponding index vector comprises:
[0031] The values in a preset K value range are selected as candidate values in turn, and a candidate weight vector is calculated according to the candidate values and the distance difference sequence; each position weight in the candidate weight vector is represented as:
[0032]
[0033] wherein, w k represents the kth position weight in the candidate weight vector; F k ' and F p ' represent the kth and pth distance difference values in the distance difference sequence respectively; K represents the candidate value;
[0034] sequentially selecting an index subvector corresponding to the number of candidate values from the index vector, and selecting a distance vector corresponding to the index subvector from the first distance matrix to generate a second distance matrix;
[0035] obtaining a third distance matrix according to the second distance matrix and the position weight vector;
[0036] obtaining a distance difference value vector by subtracting each distance element in the third distance matrix from a corresponding first horizontal distance;
[0037] obtaining a candidate value corresponding to a minimum element in the distance difference value vector as the optimal K value.
[0038] Further, each position weight in the position weight vector is represented as:
[0039]
[0040] wherein K' represents the optimal K value; w' k represents the kth position weight in the position weight vector; F k ' and F p ' represent the kth and pth distance difference values in the distance difference value sequence respectively.
[0041] Further, the step of iteratively calculating the final estimated position according to the position weight vector, the initial position, the initial position set and the preset position weight threshold comprises:
[0042] obtaining a maximum weight value in the position weight vector, and determining whether the maximum weight value is greater than a preset position weight threshold;
[0043] If not, the initial position is taken as a first center position, an iterative position set is constructed according to the first center position, and the iterative position set is iteratively updated according to the third horizontal distances between the calculated positions in the iterative position set and the LED light sources until a preset termination condition is reached to obtain the final estimated position;
[0044] If yes, the initial position is taken as the final estimated position.
[0045] Further, the step of iteratively updating the iterative position set according to the third horizontal distances between the calculated positions in the iterative position set and the LED light sources until a preset termination condition is reached to obtain the final estimated position comprises:
[0046] calculating the difference values between each third horizontal distance and a corresponding first horizontal distance respectively, and taking the position corresponding to a minimum difference value in the iterative position set as a second center position;
[0047] determining whether the second center position is the same as the first center position;
[0048] if yes, exiting the iteration, taking the second center position as the final estimated position;
[0049] if no, updating the iteration position set according to the second center position and continuing the iteration until a preset iteration number is reached, obtaining the final estimated position.
[0050] In a second aspect, an embodiment of the present application provides a CSI-based adaptive iteration visible light positioning system, which comprises:
[0051] a preprocessing module, configured to receive positioning light signals sent by a plurality of LED light sources, and process each positioning light signal to obtain a channel impulse response vector;
[0052] a distance estimation module, configured to estimate a line-of-sight path distance between each LED light source and the receiver according to the channel impulse response vector, and obtain a first horizontal distance between each LED light source and the receiver according to each line-of-sight path distance;
[0053] a position estimation module, configured to construct an initial position set by using a circular least square method according to the first horizontal distance between each LED light source and the receiver, and obtain a final estimated position of the receiver according to the initial position set and a preset position weight threshold.
[0054] In a third aspect, an embodiment of the present application further provides a computer device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above method when executing the computer program.
[0055] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the steps of the above method.
[0056] This application provides a CSI-based adaptive iterative visible light positioning method and system. The method receives positioning light signals from multiple LED light sources, processes each signal to obtain a channel impulse response vector (CTR), estimates the line-of-sight path distance between each LED light source and the receiver based on the CTR, calculates the first horizontal distance between each LED light source and the receiver based on the CTR, constructs an initial position set using cyclic least squares based on the first horizontal distance, and obtains the final estimated position of the receiver based on the initial position set and a preset position weight threshold. Compared with existing technologies, this CSI-based adaptive iterative visible light positioning method utilizes the CSI-estimated line-of-sight path distance and the cyclic least squares method to construct an initial position set. Combined with a preset position weight threshold and an improved WKNN algorithm, it adaptively iteratively estimates the receiver position. This method, while maintaining low complexity, fully utilizes positioning information, effectively reduces the impact of nonlinear errors in position estimation, improves positioning accuracy and stability, supports complex indoor positioning scenarios, and has high application value. Attached Figure Description
[0057] Figure 1 This is a schematic diagram of the basic architecture of CSI-based adaptive iterative visible light positioning in an embodiment of the present invention;
[0058] Figure 2 This is a flowchart illustrating the CSI-based adaptive iterative visible light positioning method in an embodiment of the present invention.
[0059] Figure 3 This is a detailed flowchart of the CSI-based adaptive iterative visible light positioning method in an embodiment of the present invention;
[0060] Figure 4 a and Figure 4 b are top views of the receiver PD in the visible light positioning environment in the embodiments of the present invention, corresponding to the locations of the room corner and the middle of the room.
[0061] Figure 5 This is another detailed flowchart of the CSI-based adaptive iterative visible light positioning method in this embodiment of the invention;
[0062] Figure 6 This is a planar schematic diagram of the iterative position set in an embodiment of the present invention;
[0063] Figure 7 This is a schematic diagram showing the simulation comparison and verification results of the CSI-based adaptive iterative visible light positioning method of this invention and the existing CSI-based LS positioning method.
[0064] Figure 8This is a schematic diagram of the structure of the CSI-based adaptive iterative visible light positioning system in an embodiment of the present invention;
[0065] Figure 9 This is an internal structural diagram of the computer device in an embodiment of the present invention. Detailed Implementation
[0066] To make the objectives, technical solutions, and beneficial effects of this application clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Obviously, the embodiments described below are only part of the embodiments of the present invention and are used to illustrate the present invention, but are not intended to limit the scope of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0067] Existing CSI-based positioning frameworks are applied to visible light positioning processes in indoor multipath scenarios, such as... Figure 1 The diagram shows the following: At the transmitting end, a DC-biased optical OFDM (DCO-OFDM) system is used to modulate the positioning information, pilot signals, and training symbols transmitted by the LED light source. Based on the Hemnitian symmetry requirements of the optical OFDM system, the frequency domain pilot sequence is modulated onto the subcarrier to obtain the corresponding sequence X. After IFFT (Inverse Fast Fourier Transform) and adding a cyclic prefix (CP), the time domain signal x(n) is obtained. To ensure that the LED light source operates within the linear range, the time domain signal x(n) needs to be clipped to obtain the clipped signal x. clip After digital-to-analog conversion (D / A) and superimposed DC bias, a driving signal x is generated to modulate the LED light intensity. DCO The optical signal is transmitted to the PD receiver via the visible light channel. At the receiving end, the PD receiver converts the optical signal into an electrical signal, which is then converted into a baseband signal r(n) by analog-to-digital conversion (A / D). After removing the CP and FFT (Fast Fourier Transform), the frequency domain pilot symbol is obtained. The channel frequency response was estimated using the LS channel estimation algorithm. Then, the Channel Impulse Response (CIR) is obtained through IFFT. And based on the obtained Line-of-sight path estimation and LOS-based path estimation results are performed. The receiver PD position is estimated using the least squares method to achieve CSI-based positioning.
[0068] The adaptive iterative visible light localization method based on CSI provided in this invention mainly focuses on...Figure 1 The effective improvement of the CSI-based positioning part in the receiving end processing in the illustrated CSI positioning framework can fully utilize the positioning information under the premise of ensuring low complexity, effectively reduce the nonlinear error influence in the position estimation using the LS algorithm, and improve the positioning accuracy and stability. The following embodiments will describe the CSI-based adaptive iterative visible light positioning method in detail.
[0069] In one embodiment, as Figure 2 illustrated, a CSI-based adaptive iterative visible light positioning method is provided, including the following steps:
[0070] S11, receiving a plurality of positioning light signals sent by LED light sources, and processing each positioning light signal to obtain a channel impulse response vector; wherein the positioning light signal includes light intensity information and position information, etc., and the corresponding channel impulse response vector acquisition process can be understood as Figure 1 Specifically, as
[0071]
[0072] wherein h represents the mean channel impulse response vector after estimation; represents the channel impulse response vector estimated for the a-th time; N1 represents the total number of channel impulse response vectors estimated;
[0073] It should be noted that considering that the estimated channel impulse response vector is susceptible to noise, resulting in some path gains being negative, which does not conform to the actual situation, in this case, the negative values in the channel impulse response vector are assigned to 0, and the corrected channel impulse response vector is represented as The channel impulse response vector used in the following steps is preferably the corrected channel impulse response vector
[0074] S12, estimating the line-of-sight path distance between each LED light source and the receiver according to the channel impulse response vector, and obtaining the first horizontal distance between each LED light source and the receiver according to each line-of-sight path distance; wherein the detailed acquisition process of the line-of-sight path distance is as follows:
[0075] Assuming that the number of channel paths is known as L, the gain of the first L paths of the channel impulse response vector is normalized to estimate the ratio of the power of each path to the total power; correspondingly, the normalized amplitude of the path can be expressed as
[0076]
[0077] where h norm (c) represents the normalized amplitude of the cth channel path; represents the cth element of the channel impulse response vector; it should be noted that the above h norm (c) formula is applied to the calculation of different paths, which can be obtained by replacing the corresponding parameter value;
[0078] Since the normalized amplitude of the first path can be understood as the percentage of the corresponding LOS path in the total received power, the received power of the LOS path can be calculated as
[0079]
[0080] wherein, and represent the normalized amplitude and the corresponding received power of the lth LOS path, respectively; represents the total received light power of the lth LED light source; h norm,l (0) represents the normalized amplitude of the first path of the lth LED light source; it should be noted that, The calculation method of can refer to the related technical implementation of existing visible light positioning, which will not be described here;
[0081] The received power of the LOS path calculated by formula (1) is substituted into formula (2) to calculate the line-of-sight path distance from the lth LED light source to the receiver PD, which is represented as
[0082]
[0083] wherein, represents the line-of-sight path distance from the lth LED light source to the receiver PD; and represent the normalized amplitude and the corresponding received power of the lth LOS path, respectively; A PD represents the detection area of the receiver PD; ψ represents the incident angle of the receiver PD; g(ψ) and T s (ψ) represent the condenser gain and the optical filter gain, respectively; P t represents the light power of the positioning light signal emitted by the LED light source; H represents the vertical distance between the LED light source and the receiver PD; m represents the Lambert order;
[0084] Based on the line-of-sight path distance obtained from formula (2), the first horizontal distance between each LED light source and the receiver can be obtained, denoted as:
[0085]
[0086] wherein, and respectively represent the first horizontal distance and the line-of-sight path distance from the lth LED light source to the receiver PD; H represents the vertical distance between the LED light source and the receiver PD;
[0087] In principle, based on the first horizontal distance between each LED light source and the receiver obtained from formula (3), the estimation of the position coordinates of the receiver PS can be realized by using the existing LS algorithm, but considering that in the traditional LS positioning algorithm, only one equation in the equation set is subtracted from other equations, resulting in insufficient utilization of positioning information and being easily affected by nonlinear errors, leading to insufficient positioning accuracy and stability in applications, preferably, based on the first horizontal distance obtained from formula (3), the initial position set is constructed by using the cyclic least squares method, and the position coordinates of the receiver are adaptively and iteratively estimated by combining the preset position weight threshold and the improved WKNN algorithm, so as to improve the visible light positioning performance in complex indoor environments.
[0088] S13, according to the first horizontal distance between each LED light source and the receiver, the initial position set is constructed by using the cyclic least squares method, and the final estimated position of the receiver is obtained according to the initial position set and the preset position weight threshold; wherein the use method of the cyclic least squares method can be understood as subtracting each equation in the equation set for solving the position coordinates of the receiver from other equations, to obtain multiple groups of equation sets which can be solved by using the least squares method to solve the position coordinates of the receiver; specifically, the step of constructing the initial position set by using the cyclic least squares method according to the first horizontal distance between each LED light source and the receiver includes:
[0089] According to the first horizontal distance between each LED light source and the receiver, the receiver position coordinate equation set is obtained; wherein the receiver position coordinate equation set is denoted as:
[0090]
[0091] wherein, (x, y) represents the position coordinates of the receiver; (x i ,y i ) represents the position coordinates of the ith LED light source; represents the first horizontal distance between the ith LED light source and the receiver, which is obtained from formula (3); N represents the total number of LED light sources whose signals can be detected by the receiver PD;
[0092] The receiver position coordinate sub-equations are selected in sequence, and the selected receiver position coordinate sub-equation is subtracted from the remaining receiver position coordinate sub-equations, to obtain a plurality of updated receiver position coordinate equation groups. Specifically, the kth equation in formula (4) is subtracted from the other equations to obtain the updated receiver position coordinate equation group shown in formula (5). The other updated receiver position coordinate equation groups can also be obtained in a similar manner, which will not be described in detail here.
[0093]
[0094] wherein (x, y) represents the receiver position coordinates; (x k ,y k ) represents the position coordinates of the kth LED light source; r k represents the first horizontal distance between the kth LED light source and the receiver.
[0095] The equation group shown in formula (5) is expressed in matrix form, and the following is obtained:
[0096]
[0097] wherein,
[0098]
[0099]
[0100]
[0101] wherein, represents the kth updated receiver position coordinate equation group corresponding receiver position coordinate estimate value.
[0102] Each updated receiver position coordinate equation group is solved by using the least square method, to obtain the initial position set. The initial position set can be understood as a collection of each receiver position coordinate estimate value obtained by solving formula (6) by using the least square method, wherein each position coordinate estimate value can be represented as:
[0103]
[0104] The initial position set P I consisting of N position coordinates can be obtained through the above method steps. N N }, wherein N represents the number of LED light sources. It should be noted that according to the first horizontal distance between each LED light source and the receiver, the initial position is constructed by using the cyclic least square method for the position positioning method, which can fully use all known positioning information, and further provides reliable data support for accurate positioning;
[0105] In addition, in principle, each position estimation coordinate in the initial position set obtained above can be directly used as the final estimated position based on the position coordinate weighted by the WKNN algorithm. However, in order to avoid the one-sidedness of directly using the WKNN algorithm to calculate the final estimated position of the receiver, the embodiment preferably adopts a cyclic iteration based on the initial position set and a preset position weight threshold to further improve the accuracy of the final estimated position. Specifically, as shown in Figure 3 the step of obtaining the final estimated position of the receiver according to the initial position set and the preset position weight threshold comprises:
[0106] calculating a position weight vector corresponding to the initial position set, and obtaining an initial position according to the position weight vector; wherein the step of calculating the position weight vector corresponding to the initial position set and obtaining the initial position according to the position weight vector comprises:
[0107] obtaining a corresponding position weight vector according to the first horizontal distance between each LED light source and the receiver; each position weight in the position weight vector W = [W N ] represents:
[0108]
[0109] In the formula,
[0110]
[0111] wherein, and W k represent the line-of-sight path distance, the first horizontal distance and the corresponding position weight between the kth LED light source and the receiver, respectively; H represents the vertical distance between the LED light source and the receiver; N represents the total number of LED light sources;
[0112] obtaining the initial position based on the WKNN algorithm according to the initial position set and the position weight vector; wherein the initial position (x' p , y' p ) is represented as:
[0113]
[0114] wherein (x' k , y' k ) and W krespectively represent the kth position coordinate in the initial position set and the corresponding position weight;
[0115] In this embodiment, the corresponding position weight vector is obtained according to the first horizontal distance between each LED light source and the receiver, and the initial position scheme is calculated by using the WKNN algorithm in combination with the initial position set. The scheme design is an optimal design considering the actual application scenarios of different layouts of the receiver. When the receiver PD is located in the corner of the room (the difference between the horizontal distance values of the receiver PD to different LED light sources is large), the signal-to-noise ratio of the positioning light signal received by the receiver from different LED light sources is low, which will cause a large estimation error of different horizontal distance values. Iterative search can improve the positioning accuracy. When the receiver PD is located in the middle of the room (the difference between the horizontal distance values of the receiver PD to different LED light sources is small), the signal-to-noise ratio of the positioning light signal received by the receiver from different LED light sources is high, which will cause a small estimation error of different horizontal distance values. Among them, the estimation error of the shortest horizontal distance value is smaller than that of other larger horizontal distance values, and the accuracy of the position estimated by subtracting the remaining equations will also be higher, so a larger weight value is assigned to the corresponding position, and WKNN is used to reduce the positioning error. At the same time, by setting the weight value given by equation (8), when the difference between the horizontal distance values is large, the difference is reduced, and a smaller weight value is assigned to the position with a smaller difference, and when the difference between the horizontal distance values is small, the difference is amplified, and a larger weight value is assigned to the position with a larger difference. In this way, the difference between different distance values is better distinguished, and the positioning error caused by the estimation deviation of the distance is effectively reduced. For example, as shown in Figure 4 (a), when the receiver PD is located in the corner of the room, the horizontal distance to LED-1 is the smallest, and the horizontal distance to the other three LEDs is larger, at this time the difference between different weight values is small, then iterative optimization is used for position estimation, which is more effective; as shown in Figure 4 (b), when the receiver PD is located in the middle of the room, the horizontal distance to the four LEDs is not much different, among which the horizontal distance to LED-1 is the smallest, then a larger weight value is assigned to the first position in the position set P I , and a small weight value is assigned to the other three positions, and the weighted KNN is used for position estimation, so that the initial position obtained is more accurate and reliable.
[0116] It should be noted that the above position weight vector and the initial position obtaining method can be understood as being obtained based on the application idea of the WKNN algorithm with a fixed K value, and in principle, based on the above analysis, it can be known that compared with the existing CSI-based positioning method, it can effectively improve the positioning accuracy under the premise of low complexity; however, considering that the selection of the K value in the WKNN algorithm will affect the application effect, if a fixed K value is used without considering the application scenario, the application effect of certain positioning scenarios will inevitably be reduced. Based on this, the embodiment preferably, before calculating the position weight vector corresponding to the initial position set, the optimal K value is adaptively selected by using an iterative calculation method based on the existing positioning data, and then the position weight vector is calculated based on the optimal K value, and the initial position is calculated based on this, which further improves the stability and accuracy of the position positioning; specifically, as shown in Figure 5 The step of calculating the position weight vector corresponding to the initial position set and obtaining the initial position according to the position weight vector comprises:
[0117] calculating the second horizontal distance between each position in the initial position set and each LED light source, and constructing a first distance matrix according to the second horizontal distance; the first distance matrix represents:
[0118]
[0119] wherein,
[0120]
[0121] wherein, R and R(i) represent the first distance matrix and the corresponding i-th column vector, respectively; N represents the number of LED light sources; represents the second horizontal distance between the j-th position coordinate (x′ j ,y′ j ) in the initial position set and the i-th LED light source (x i ,y i );
[0122] calculate the difference between each second horizontal distance and the corresponding first horizontal distance, and arrange each difference in ascending order to obtain a distance difference sequence and a corresponding index vector; wherein, the distance difference sequence can be understood as follows: first, calculate the difference F j between the second horizontal distance calculated based on formula (11) and the first horizontal distance calculated based on formula (3); then, sort the values in the obtained sequence F=[F1 F2 … F N ] in ascending order to generate a new sequence F′ as the distance difference sequence, and obtain the index vector I=[I1 I2 … I N ] corresponding to the distance difference sequence F′; wherein, F jis expressed as:
[0123]
[0124] wherein F j represents the difference between the second horizontal distance and the first horizontal distance corresponding to the jth position coordinate in the initial position set; N represents the number of LED light sources;
[0125] According to the distance difference sequence and the corresponding index vector, the optimal K value of the WKNN algorithm is iteratively calculated; wherein the process of obtaining the optimal K value can be understood as sequentially setting the K value in the WKNN algorithm to each value (candidate value) in the preset K value range (1≤K≤K max =N), and according to this, selecting the corresponding distance vector from the first distance matrix, and calculating the difference between the corresponding first horizontal distance, and then taking the candidate value corresponding to the minimum difference as the optimal K value of the WKNN algorithm; specifically, the step of iteratively calculating the optimal K value of the WKNN algorithm according to the distance difference sequence and the corresponding index vector comprises:
[0126] sequentially selecting a value in the preset K value range as a candidate value, and calculating a candidate weight vector according to the candidate value and the distance difference sequence; wherein the candidate weight vector w=[w1 … w K ] T Each position weight in the candidate weight vector is expressed as:
[0127]
[0128] wherein w k represents the kth position weight in the candidate weight vector; F′ k and F′ p respectively represent the kth and pth distance difference in the distance difference sequence; K represents the candidate value;
[0129] From the index vector, an index sub-vector corresponding to the number of candidate values is selected in ascending order, and a distance vector corresponding to the index sub-vector is selected from the first distance matrix to generate a second distance matrix; wherein the process of obtaining the second distance matrix can be understood as taking the distance vector corresponding to the first K values [I1 I2 …I K ] of the index vector I from the first distance matrix R shown in formula (10) to generate a new distance matrix D=[D(1) … D(K)] shown in formula (14) as the second distance matrix, which is expressed as:
[0130]
[0131] According to the second distance matrix and the position weight vector, a third distance matrix is obtained; wherein the obtaining process of the third distance matrix can be understood as the process of calculating a new weighted average distance value matrix Y=[Y(1) Y(1) L Y(N)], wherein the calculation of the Kth vector Y(K) is shown in formula (15):
[0132]
[0133] According to the difference between each distance element in the third distance matrix and the corresponding first horizontal distance, a distance difference value vector is obtained; wherein each element in the distance difference value vector E=[E(1) E(2) … E(K max )] is expressed as:
[0134]
[0135] In the formula, Y i K is the ith distance element of the Kth column in the third distance matrix; represents the corresponding first horizontal distance obtained based on formula (3);
[0136] The minimum element in the distance difference value vector is obtained, and the candidate value corresponding to the minimum element is taken as the optimal K value; specifically, the optimal K value can be expressed as K'={E(K')=min(E)}.
[0137] According to the optimal K value and the distance difference value sequence, the position weight vector is obtained; wherein each position weight in the position weight vector is expressed as:
[0138]
[0139] Wherein, K' represents the optimal K value; w' k represents the kth position weight in the position weight vector; F k ' and F p ' represent the kth and pth distance difference values in the distance difference value sequence, respectively.
[0140] According to the initial position set and the position weight vector, based on the WKNN algorithm, the initial position is obtained; wherein the initial position (x' p , y' p ) is expressed as:
[0141]
[0142] In the formula, (x(I k ), y(I k )) and w' k represent the kth value Ik corresponding initial position set position coordinates, and a corresponding position weight.
[0143] After the position weight vector and the initial position are determined by the above two different ways, the initial position set and the preset position weight threshold are combined, and the accurate and reliable position positioning is performed by the following method steps.
[0144] According to the position weight vector, the initial position, the initial position set, and the preset position weight threshold, the final estimated position is iteratively calculated; specifically, the step of iteratively calculating the final estimated position according to the position weight vector, the initial position, the initial position set, and the preset position weight threshold comprises:
[0145] The maximum weight value in the position weight vector is obtained, and it is judged whether the maximum weight value is greater than the preset position weight threshold; wherein the preset position weight threshold can be selected according to actual application requirements, which is not limited here; it should be noted that the use of the preset position weight threshold in this embodiment can effectively avoid the unnecessary waste of computing resources and time cost caused by continuing to use the iterative search algorithm for position estimation when the initial position obtained by the foregoing method meets the positioning accuracy requirement, thereby improving the positioning accuracy while ensuring the positioning efficiency;
[0146] If not, the initial position is taken as the first center position, and an iterative position set is constructed according to the first center position, and the iterative position set is iteratively updated according to the third horizontal distance between each position in the iterative position set and each LED light source until a preset termination condition is reached to obtain the final estimated position; wherein the third horizontal distance calculation formula is the same as the second horizontal distance calculation formula (11), which will not be repeated here; the preset termination condition can be set according to actual application requirements in principle, and in this embodiment, two termination conditions are preferably selected: 1) the new center position obtained in each iteration is the same as the center position in the last iteration; 2) the preset iteration number is reached; that is, in the iterative calculation, if any of the above iteration termination conditions is met, the iterative calculation is stopped directly, and the final estimated position of the receiver is obtained according to the result of the current round calculation;
[0147] If yes, the initial position is taken as the final estimated position.
[0148] Specifically, the step of iteratively updating the iterative position set according to the third horizontal distance between each position in the iterative position set and each LED light source until a preset termination condition is reached to obtain the final estimated position comprises:
[0149] Calculate the difference between each third horizontal distance and the corresponding first horizontal distance respectively, and take the position corresponding to the minimum difference in the iterative position set as the second center position; wherein the calculation formula of the difference between the third horizontal distance and the corresponding first horizontal distance is the same as formula (12), which will not be repeated here;
[0150] Determine whether the second center position is the same as the first center position;
[0151] If yes, exit the iteration and take the second center position as the final estimated position;
[0152] If no, update the iterative position set according to the second center position and continue iteration until the preset iteration number is reached to obtain the final estimated position.
[0153] It should be noted that the process of constructing the iterative position set according to the first center position and updating the iterative position set according to the second center position is the same, which can be understood as selecting a preset number (the specific value can be selected according to actual needs) of points around the first center position or the second center position to form a new position set; the distance between each selected point is equal (such as 1cm) and the first center position or the second center position is the center to form Figure 6 the square shown in the figure.
[0154] The embodiments of the present application construct an initial position set by using the line-of-sight path distance estimated by CSI and the cyclic least squares method, combine the way of generating a position weight vector and an initial position based on the improved WKNN algorithm, and use a preset position weight threshold to avoid invalid iterative calculation and estimation, to perform accurate and reliable adaptive iterative estimation on the receiver position, effectively solve the application defects that the existing CSI-based positioning method cannot fully utilize positioning information and is easily affected by nonlinear errors, causing insufficient positioning accuracy and stability, fully utilize positioning information under the premise of low complexity, effectively reduce the influence of nonlinear errors in position estimation, improve positioning accuracy and stability, support complex indoor positioning scenarios, and have high application value.
[0155] In addition, in order to verify the application effect of the CSI-based adaptive iterative visible light positioning method of the present application, a Matlab simulation comparison experiment is also performed with the existing CSI-based LS positioning method. The experimental parameters are set as follows: 1) the simulation scene size is 4m x 4m x 3m, and the coordinates of the four LEDs are (1m, 1m, 3m), (1m, 3m, 3m), (3m, 1m, 3m), and (3m, 3m, 3m), and the receiver PD is placed on the ground with a height of 0m; 2) the preset position weight threshold T is set to 0.4; 3) the number of position sets M is set to 9; and 4) the iteration number is set to 5. Through the comparison experiment, it is obtained that Figure 7Cumulative Distribution Function (CDF) curves of average positioning errors of different methods are compared, wherein, "LS" is an existing CSI-based LS positioning method, "Adal-1" is a method for positioning estimation based on the WKNN algorithm with a fixed K value in the application, and "Adal-2" is a method for positioning estimation based on the WKNN algorithm with an optimal K value selected through iterative calculation in the application; from Figure 7 It can be observed that, in the entire room area, the positioning error of the LS method is 9.00 cm, and the positioning errors of the AdaI-1 method and the AdaI-1 method are 5.77 cm and 4.96 cm respectively at CDF = 99%, and it can be seen that the positioning accuracy of the AdaI-1 and AdaI-2 methods is obviously better than that of the existing comparative method; meanwhile, the positioning performance of the corresponding different methods is shown in Table 1:
[0156] Table 1 Comparison results of positioning performance of different methods
[0157]
[0158] As shown in Table 1, in the simulation scene, the average positioning errors of the AdaI-1, AdaI-2 and LS methods are 1.97 cm, 1.84 cm and 2.56 cm respectively; compared with the LS method, the average positioning errors of the AdaI-1 and AdaI-2 positioning algorithms are reduced by 0.59 cm and 0.72 cm respectively, the positioning accuracy is improved by 23% and 28% respectively, the root mean square errors (RMSE) of the AdaI-1, AdaI-2 and LS methods are 2.30 cm, 2.12 cm and 3.24 cm respectively, and the RMSE of the AdaI-1 and AdaI-2 positioning algorithms is reduced by 29% and 35% respectively compared with the LS method.
[0159] In summary, the comparative experiments show that the positioning methods "Adal-1" and "Adal-2" of the application have great improvement in the Cumulative Distribution Function (CDF) curve and positioning accuracy, that is, the CSI-based adaptive iterative positioning method proposed in the application has great improvement in performance compared with the CSI-based LS positioning method, and can effectively cope with complex indoor positioning scenes and provide more accurate and efficient positioning estimation.
[0160] It should be noted that although each step in the above flowchart is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless explicitly stated in this article, the execution of these steps has no strict order limitation, and these steps can be executed in other order.
[0161] In one embodiment, as Figure 8As shown, an adaptive iterative visible light positioning system based on CSI is provided, and the system comprises:
[0162] a preprocessing module 1 configured to receive positioning light signals sent by a plurality of LED light sources, and process each positioning light signal to obtain a channel impulse response vector;
[0163] a distance estimation module 2 configured to estimate a line-of-sight path distance between each LED light source and the receiver according to the channel impulse response vector, and obtain a first horizontal distance between each LED light source and the receiver according to each line-of-sight path distance;
[0164] a position estimation module 3 configured to construct an initial position set by using a circular least square method according to the first horizontal distance between each LED light source and the receiver, and obtain a final estimated position of the receiver according to the initial position set and a preset position weight threshold.
[0165] The specific limitations of the adaptive iterative visible light positioning system based on CSI can refer to the limitations of the adaptive iterative visible light positioning method based on CSI in the foregoing, and the corresponding technical effects can also be obtained equally, which will not be described here. Each module in the adaptive iterative visible light positioning system based on CSI can be realized by software, hardware, and combinations thereof, in whole or in part. Each module described above can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.
[0166] Figure 9 An internal structure diagram of a computer device in an embodiment is shown, which can be a terminal or a server. As shown, Figure 9 The computer device includes a processor, a memory, a network interface, a display, and an input device connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement the adaptive iterative visible light positioning method based on CSI. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball, or touchpad provided on the shell of the computer device. It can also be an external keyboard, touchpad, or mouse, etc.
[0167] Those skilled in the art can understand that,Figure 9 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have the same components arranged differently.
[0168] In an embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
[0169] In an embodiment, a computer readable storage medium is provided, having a computer program stored thereon, the computer program implementing the steps of the above method when executed by a processor.
[0170] In summary, the embodiment of the present application provides a CSI-based adaptive iterative visible light positioning method and system, a computer device and a storage medium, the CSI-based adaptive iterative visible light positioning method thereof realizes receiving positioning light signals sent by multiple LED light sources, processing each positioning light signal to obtain a channel impulse response vector, estimating a line-of-sight path distance between each LED light source and the receiver according to the channel impulse response vector, obtaining a first horizontal distance between each LED light source and the receiver according to each line-of-sight path distance, and constructing an initial position set using a recursive least squares method according to the first horizontal distance between each LED light source and the receiver, and obtaining a final estimated position of the receiver according to the initial position set and a preset position weight threshold. The method realizes the estimation of the line-of-sight path distance using CSI and the construction of the initial position set using the recursive least squares method, and combines the preset position weight threshold and the improved WKNN algorithm to accurately and reliably adaptively and iteratively estimate the position of the receiver, effectively solving the application defects that the existing CSI-based positioning method cannot fully utilize positioning information and is easily affected by nonlinear errors, resulting in insufficient positioning accuracy and stability. Under the premise of ensuring low complexity, the method fully utilizes positioning information, effectively reduces the influence of nonlinear errors in position estimation, improves positioning accuracy and stability, supports complex indoor positioning scenarios, and has high application value.
[0171] The various embodiments in this specification are described in a progressive manner. For directly identical or similar parts of the embodiments, refer to each other. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. It should be noted that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0172] The embodiments described above are merely preferred embodiments of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various improvements and substitutions without departing from the technical principles of this invention, and these improvements and substitutions should also be considered within the scope of protection of this application. Therefore, the scope of protection of this patent application should be determined by the scope of the claims.
Claims
1. A CSI-based adaptive iterative visible light positioning method, characterized in that, The method comprises the following steps: receiving positioning light signals sent by a plurality of LED light sources, and processing each positioning light signal to obtain a channel impulse response vector; estimating a line-of-sight path distance between each LED light source and the receiver according to the channel impulse response vector, and obtaining a first horizontal distance between each LED light source and the receiver according to each line-of-sight path distance; constructing an initial position set by using a recursive least square method according to the first horizontal distance between each LED light source and the receiver, and obtaining a final estimated position of the receiver according to the initial position set and a preset position weight threshold; wherein the step of obtaining the final estimated position of the receiver according to the initial position set and the preset position weight threshold comprises: calculating a position weight vector corresponding to the initial position set, and obtaining an initial position according to the position weight vector, comprising: obtaining a corresponding position weight vector according to the first horizontal distance between each LED light source and the receiver; each position weight in the position weight vector is expressed as: wherein, wherein, and W k respectively represent the line-of-sight path distance, the first horizontal distance and the corresponding position weight between the kth LED light source and the receiver; H represents the vertical distance between the LED light source and the receiver; N represents the total number of LED light sources; obtaining the initial position based on a WKNN algorithm according to the initial position set and the position weight vector; iteratively calculating the final estimated position according to the position weight vector, the initial position, the initial position set and the preset position weight threshold; the preset position weight threshold is used to judge whether the initial position has met the positioning accuracy requirement.
2. The CSI-based adaptive iterative visible light positioning method of claim 1, wherein, The step of constructing the initial position set by using the recursive least square method according to the first horizontal distance between each LED light source and the receiver comprises: obtaining a receiver position coordinate equation set according to the first horizontal distance between each LED light source and the receiver; sequentially selecting a receiver position coordinate sub-equation in the receiver position coordinate equation set, and obtaining a plurality of updated receiver position coordinate equation sets by respectively subtracting the selected receiver position coordinate sub-equation from the remaining receiver position coordinate sub-equations; solving each updated receiver position coordinate equation set by using a least square method to obtain the initial position set.
3. The CSI-based adaptive iterative visible light positioning method of claim 1, wherein, The step of calculating the position weight vector corresponding to the initial position set and obtaining the initial position according to the position weight vector comprises: calculating a second horizontal distance between each position in the initial position set and each LED light source, and constructing a first distance matrix according to the second horizontal distance; respectively calculating a difference value of each second horizontal distance and a corresponding first horizontal distance, and arranging each difference value in ascending order to obtain a distance difference value sequence and a corresponding index vector; iteratively calculating an optimal K value of the WKNN algorithm according to the distance difference value sequence and the corresponding index vector; obtaining the position weight vector according to the optimal K value and the distance difference value sequence; obtaining the initial position based on the WKNN algorithm according to the initial position set and the position weight vector.
4. The CSI-based adaptive iterative visible light positioning method of claim 3, wherein, The step of iteratively calculating the optimal K value of the WKNN algorithm according to the distance difference value sequence and the corresponding index vector comprises: Select values in a preset K value range as candidate values in sequence, and calculate a candidate weight vector according to the candidate values and the distance difference value sequence; each position weight in the candidate weight vector is represented as: wherein w k represents the kth position weight in the candidate weight vector; F k and F p represent the kth and pth distance difference values in the distance difference sequence, respectively; K represents the candidate value; Select an index sub-vector corresponding to the number of candidate values from the index vector in a normal order, and select a distance vector corresponding to the index sub-vector from the first distance matrix to generate a second distance matrix; Obtain a third distance matrix according to the second distance matrix and the position weight vector; Obtain a distance difference value vector by subtracting each distance element in the third distance matrix from a corresponding first horizontal distance; Obtain a minimum element in the distance difference value vector, and take a candidate value corresponding to the minimum element as the optimal K value.
5. The CSI-based adaptive iterative visible light positioning method of claim 3, wherein, Each position weight in the position weight vector is represented as: wherein K' represents the optimal K value; w k k' represents the kth position weight in the position weight vector; F k k' and F p p' represent the kth and pth distance difference value in the distance difference value sequence, respectively.
6. The CSI-based adaptive iterative visible light positioning method of claim 1, wherein, The step of iteratively calculating the final estimated position according to the position weight vector, the initial position, the initial position set and the preset position weight threshold comprises: Obtain a maximum weight value in the position weight vector, and determine whether the maximum weight value is greater than a preset position weight threshold; If not, take the initial position as a first center position, construct an iterative position set according to the first center position, and iteratively update the iterative position set according to the third horizontal distances between each position in the iterative position set calculated and each LED light source until a preset termination condition is reached to obtain the final estimated position; If yes, take the initial position as the final estimated position.
7. The CSI-based adaptive iterative visible light positioning method of claim 6, wherein, The step of iteratively updating the iterative position set according to the third horizontal distances between each position in the iterative position set calculated and each LED light source until a preset termination condition is reached to obtain the final estimated position comprises: Calculate the difference between each third horizontal distance and a corresponding first horizontal distance, and take a position corresponding to a minimum difference in the iterative position set as a second center position; Determine whether the second center position is the same as the first center position; If yes, exit the iteration and take the second center position as the final estimated position; If not, update the iterative position set according to the second center position and continue the iteration until a preset iteration number is reached to obtain the final estimated position.
8. A CSI-based adaptive iterative visible light positioning system, characterized by, The CSI-based adaptive iterative visible light positioning method according to claim 1, the system comprises: A preprocessing module configured to receive positioning light signals sent by a plurality of LED light sources, and process each positioning light signal to obtain a channel impulse response vector; A distance estimation module configured to estimate a line-of-sight path distance between each LED light source and the receiver according to the channel impulse response vector, and obtain a first horizontal distance between each LED light source and the receiver according to each line-of-sight path distance; A position estimation module configured to construct an initial position set by using a circular least square method according to the first horizontal distances between each LED light source and the receiver, and obtain a final estimated position of the receiver according to the initial position set and a preset position weight threshold.