Disclosure of Invention
Aiming at the defects in the prior art, the positioning method based on the 5G base station solves the problem of low positioning precision in the prior art.
In order to achieve the aim of the invention, the invention adopts the following technical scheme: a positioning method based on a 5G base station comprises the following steps:
S1, constructing a signal characteristic sequence according to the signal characteristics of each 5G base station;
s2, sequencing each signal characteristic sequence according to the signal arrival time of each 5G base station, and constructing a signal gap coefficient matrix and a signal characteristic matrix;
s3, processing the signal characteristic matrix and the signal gap coefficient matrix by adopting a multi-fusion positioning network to obtain an initial position;
S4, correcting the initial position according to the terminal positions at a plurality of historical moments to obtain the terminal position at the current moment.
The beneficial effects of the invention are as follows: according to the invention, a signal characteristic sequence is constructed according to the signal characteristics of each 5G base station, the signal characteristic sequences are ordered based on the arrival time of signals, a signal difference coefficient matrix is constructed, the signal characteristic matrix reflects the signal characteristics of each 5G base station, the signal difference coefficient matrix reflects the difference condition of each signal characteristic sequence which is sequentially achieved, the difference of the signal characteristics at adjacent moments is enhanced, the characteristic distinction degree between the positions of different 5G base stations is enhanced, the signal characteristic matrix and the signal difference coefficient matrix are processed by adopting a multi-fusion positioning network to obtain an initial position, the multi-fusion positioning network is enabled to accurately estimate the position of a terminal by combining static characteristics and dynamic change information, the influence of instantaneous noise and abnormal values is reduced, the stability of a positioning result is improved, the initial position is corrected by adopting the terminal position at a plurality of moments of histories, and the positioning precision is further improved.
Further, the elements in the signal feature sequence in S1 include: received signal power, signal time of arrival, angle of arrival, and channel state information.
Further, the step S2 includes the following sub-steps:
S21, sequencing each signal characteristic sequence according to the signal arrival time of each 5G base station;
S22, taking the ordered signal characteristic sequence as a row vector to form a signal characteristic matrix;
S23, subtracting two signal feature sequences at adjacent moments to obtain a signal feature gap sequence, wherein D=Xt- Xt-1, D is the signal feature gap sequence, Xt is the signal feature sequence of the t arrival time, Xt-1 is the signal feature sequence of the t-1 arrival time, and t is the number of the arrival time;
s24, carrying out normalization processing on elements in each signal characteristic gap sequence to obtain a signal gap coefficient sequence;
s25, taking each signal gap coefficient sequence as a row vector to form a signal gap coefficient matrix.
Further, the multi-converged positioning network in S3 includes: the system comprises a first scale feature extraction unit, a second scale feature extraction unit, a third scale feature extraction unit, a fourth scale feature extraction unit, a first feature fusion unit, a second feature fusion unit, a first full-connection layer, a second full-connection layer, an adder A1 and an output layer;
the input end of the first scale feature extraction unit is used for inputting a signal feature matrix;
The input end of the second scale feature extraction unit is used for inputting a signal feature matrix;
The input end of the third scale feature extraction unit is used for inputting a signal difference coefficient matrix;
the input end of the fourth scale feature extraction unit is used for inputting a signal difference coefficient matrix;
The input end of the first feature fusion unit is respectively connected with the output end of the first scale feature extraction unit and the output end of the third scale feature extraction unit, and the output end of the first feature fusion unit is connected with the input end of the first full-connection layer;
The input end of the second feature fusion unit is respectively connected with the output end of the second scale feature extraction unit and the output end of the fourth scale feature extraction unit, and the output end of the second feature fusion unit is connected with the input end of the second full-connection layer;
The first input end of the adder A1 is connected with the output end of the first full-connection layer, the second input end of the adder A1 is connected with the output end of the second full-connection layer, and the output end of the adder A1 is connected with the input end of the output layer;
and the output end of the output layer is used as the output end of the multi-fusion positioning network.
The beneficial effects of the above further scheme are: the invention processes the same signal feature matrix through the first scale feature extraction unit and the second scale feature extraction unit respectively, extracts the features of different scales, processes the same signal gap coefficient matrix through the third scale feature extraction unit and the fourth scale feature extraction unit, extracts the features of different scales, fuses the output features of the first scale feature extraction unit and the third scale feature extraction unit at the first feature fusion unit, fuses the output features of the second scale feature extraction unit and the fourth scale feature extraction unit at the second feature fusion unit, realizes that the features of the same scale are fused in one feature fusion unit, processes the fused features through the full-connection layer, each neuron in the full-connection layer is connected with all neurons of the previous layer, and can automatically determine the importance of the different features by learning the weights of the connection, optimize the combination mode of the features and output the comprehensive adder A1 of the output layer to obtain the initial position.
Further, the first scale feature extraction unit, the second scale feature extraction unit, the third scale feature extraction unit, and the fourth scale feature extraction unit each include: a first convolution block, an SPP layer, a second convolution block, a Sigmoid layer, a multiplier M1 and an adder A2;
The input end of the first convolution block is used as the input end of a first scale feature extraction unit, a second scale feature extraction unit, a third scale feature extraction unit or a fourth scale feature extraction unit; the input end of the SPP layer is connected with the output end of the first convolution block, and the output end of the SPP layer is respectively connected with the input end of the second convolution block and the first input end of the adder A2; the output end of the second convolution block is respectively connected with the input end of the Sigmoid layer and the first input end of the multiplier M1; the second input end of the multiplier M1 is connected with the output end of the Sigmoid layer, and the output end of the multiplier M1 is connected with the second input end of the adder A2; the output end of the adder A2 is used as the output end of the first scale feature extraction unit, the second scale feature extraction unit, the third scale feature extraction unit or the fourth scale feature extraction unit;
The size of the convolution kernel in the first convolution block in the first scale feature extraction unit and the third scale feature extraction unit is;
The size of the convolution kernel in the first convolution block in the second scale feature extraction unit and the fourth scale feature extraction unit is。
The beneficial effects of the above further scheme are: according to the invention, the first scale feature extraction unit and the third scale feature extraction unit are adopted to extract features of the same scale, the second scale feature extraction unit and the fourth scale feature extraction unit are adopted to extract features of the same scale, the SPP layer is adopted to enhance the adaptability of the network to different scale inputs, the robustness of feature extraction is improved, the network can adaptively pay attention to important features through the Sigmoid layer and the multiplier M1, irrelevant information is ignored, the efficiency and the precision of feature extraction are improved, the adder A2 realizes residual connection, the output of the SPP layer is added with the features after attention processing, the gradient vanishing problem of the deep network is relieved, and the training of the deeper network is promoted.
Further, the expression of the first feature fusion unit is: Wherein H1 is the output of the first feature fusion unit, Y1 is the output of the first scale feature extraction unit, Y3 is the output of the third scale feature extraction unit,Is Hadamard product;
the expression of the second feature fusion unit is as follows: Wherein H2 is the output of the second feature fusion unit, Y2 is the output of the second scale feature extraction unit, and Y4 is the output of the fourth scale feature extraction unit.
The beneficial effects of the above further scheme are: the invention multiplies the characteristics extracted from the signal characteristic matrix and the characteristics extracted from the signal gap coefficient matrix by elements, and can more accurately describe the change characteristics of the signal in space time by combining static and dynamic characteristics.
Further, the expression of the output layer is:, where long0 is the longitude of the initial position, lat0 is the latitude of the initial position, xi is the ith eigenvalue output by adder A1, ω1,i is the longitude weight of the ith eigenvalue, b1,i is the longitude bias of the ith eigenvalue, ω2,i is the latitude weight of the ith eigenvalue, b2,i is the latitude bias of the ith eigenvalue, N is the number of eigenvalues output by adder A1, and i is a positive integer.
Further, the step S4 includes the steps of:
s41, fitting a plurality of longitudes by using a quadratic polynomial according to terminal positions at a plurality of moments of history to obtain a terminal movement longitude track, and fitting a plurality of dimensions by using a quadratic polynomial to obtain a terminal movement latitude track;
s42, predicting longitude of the next moment by using the terminal moving longitude track, and predicting latitude of the next moment by using the terminal moving latitude track to obtain a predicted position;
S43, calculating a deviation coefficient of the initial position and the predicted position;
s44, weighting the initial position and the predicted position according to the deviation coefficient of the initial position and the predicted position to obtain the terminal position at the current moment.
Further, the formula for calculating the bias coefficient between the initial position and the predicted position in S43 is as follows: Where γ is a deviation coefficient, arctan is an arctangent function, long0 is the longitude of the initial position, lat0 is the latitude of the initial position,In order to predict the longitude of the location,Is the latitude of the predicted location.
Further, the weighting formula in S44 is:, where x is the longitude of the terminal position at the current time and y is the latitude of the terminal position at the current time.
The beneficial effects of the above further scheme are: according to the method, the historical position data are fitted by using the quadratic polynomial, and the movement track models of the longitude and the latitude are respectively established. The position at the next moment is then predicted based on these trajectory models, which provides a powerful a priori information for the position estimation. By calculating the deviation coefficient of the initial position and the predicted position, the influence of the historical track information and the current measurement data can be dynamically balanced. And finally, fusing the initial position and the predicted position by adopting a weighting processing method, thereby not only considering the historical movement trend, but also keeping the accuracy of the current measurement. The method not only can smooth the positioning result and reduce the influence of instantaneous errors, but also can improve the continuity and stability of positioning. Particularly, under the condition of unstable signals or noise in measurement, the method can remarkably improve the positioning accuracy.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and all the inventions which make use of the inventive concept are protected by the spirit and scope of the present invention as defined and defined in the appended claims to those skilled in the art.
As shown in fig. 1, a positioning method based on a 5G base station includes the following steps:
S1, constructing a signal characteristic sequence according to the signal characteristics of each 5G base station;
s2, sequencing each signal characteristic sequence according to the signal arrival time of each 5G base station, and constructing a signal gap coefficient matrix and a signal characteristic matrix;
s3, processing the signal characteristic matrix and the signal gap coefficient matrix by adopting a multi-fusion positioning network to obtain an initial position;
S4, correcting the initial position according to the terminal positions at a plurality of historical moments to obtain the terminal position at the current moment.
The elements in the signal characteristic sequence in the S1 comprise: received signal power, signal time of arrival, angle of arrival, and channel state information.
The invention comprehensively utilizes multidimensional features such as received signal power, signal arrival time, arrival angle, channel state information and the like to construct a comprehensive signal feature sequence, and fully captures the rich characteristics of 5G signals.
The step S2 comprises the following sub-steps:
S21, sequencing each signal characteristic sequence according to the signal arrival time of each 5G base station;
S22, taking the ordered signal characteristic sequence as a row vector to form a signal characteristic matrix;
In this embodiment, during sorting, the first row of the signal feature matrix is arranged in ascending order according to the arrival time, so that the arrival time of the first row is the earliest and the arrival time of the last row is the latest;
S23, subtracting two signal feature sequences at adjacent moments to obtain a signal feature gap sequence, wherein D=Xt- Xt-1, D is the signal feature gap sequence, Xt is the signal feature sequence of the t arrival time, Xt-1 is the signal feature sequence of the t-1 arrival time, and t is the number of the arrival time;
s24, carrying out normalization processing on elements in each signal characteristic gap sequence to obtain a signal gap coefficient sequence;
s25, taking each signal gap coefficient sequence as a row vector to form a signal gap coefficient matrix.
As shown in fig. 2, the multi-converged positioning network in S3 includes: the system comprises a first scale feature extraction unit, a second scale feature extraction unit, a third scale feature extraction unit, a fourth scale feature extraction unit, a first feature fusion unit, a second feature fusion unit, a first full-connection layer, a second full-connection layer, an adder A1 and an output layer;
the input end of the first scale feature extraction unit is used for inputting a signal feature matrix;
The input end of the second scale feature extraction unit is used for inputting a signal feature matrix;
The input end of the third scale feature extraction unit is used for inputting a signal difference coefficient matrix;
the input end of the fourth scale feature extraction unit is used for inputting a signal difference coefficient matrix;
The input end of the first feature fusion unit is respectively connected with the output end of the first scale feature extraction unit and the output end of the third scale feature extraction unit, and the output end of the first feature fusion unit is connected with the input end of the first full-connection layer;
The input end of the second feature fusion unit is respectively connected with the output end of the second scale feature extraction unit and the output end of the fourth scale feature extraction unit, and the output end of the second feature fusion unit is connected with the input end of the second full-connection layer;
The first input end of the adder A1 is connected with the output end of the first full-connection layer, the second input end of the adder A1 is connected with the output end of the second full-connection layer, and the output end of the adder A1 is connected with the input end of the output layer;
and the output end of the output layer is used as the output end of the multi-fusion positioning network.
The invention processes the same signal feature matrix through the first scale feature extraction unit and the second scale feature extraction unit respectively, extracts the features of different scales, processes the same signal gap coefficient matrix through the third scale feature extraction unit and the fourth scale feature extraction unit, extracts the features of different scales, fuses the output features of the first scale feature extraction unit and the third scale feature extraction unit at the first feature fusion unit, fuses the output features of the second scale feature extraction unit and the fourth scale feature extraction unit at the second feature fusion unit, realizes that the features of the same scale are fused in one feature fusion unit, processes the fused features through the full-connection layer, each neuron in the full-connection layer is connected with all neurons of the previous layer, and can automatically determine the importance of the different features by learning the weights of the connection, optimize the combination mode of the features and output the comprehensive adder A1 of the output layer to obtain the initial position.
As shown in fig. 3, the first scale feature extraction unit, the second scale feature extraction unit, the third scale feature extraction unit, and the fourth scale feature extraction unit each include: a first convolution block, an SPP layer, a second convolution block, a Sigmoid layer, a multiplier M1 and an adder A2;
The input end of the first convolution block is used as the input end of a first scale feature extraction unit, a second scale feature extraction unit, a third scale feature extraction unit or a fourth scale feature extraction unit; the input end of the SPP layer is connected with the output end of the first convolution block, and the output end of the SPP layer is respectively connected with the input end of the second convolution block and the first input end of the adder A2; the output end of the second convolution block is respectively connected with the input end of the Sigmoid layer and the first input end of the multiplier M1; the second input end of the multiplier M1 is connected with the output end of the Sigmoid layer, and the output end of the multiplier M1 is connected with the second input end of the adder A2; the output end of the adder A2 is used as the output end of the first scale feature extraction unit, the second scale feature extraction unit, the third scale feature extraction unit or the fourth scale feature extraction unit;
The size of the convolution kernel in the first convolution block in the first scale feature extraction unit and the third scale feature extraction unit is;
The size of the convolution kernel in the first convolution block in the second scale feature extraction unit and the fourth scale feature extraction unit is。
The SPP layer is SPATIAL PYRAMID Pooling layers, and the convolution block comprises: convolution layer, reLU layer and BN layer.
In this embodiment, the multi-fusion positioning network is trained by gradient descent.
According to the invention, the first scale feature extraction unit and the third scale feature extraction unit are adopted to extract features of the same scale, the second scale feature extraction unit and the fourth scale feature extraction unit are adopted to extract features of the same scale, the SPP layer is adopted to enhance the adaptability of the network to different scale inputs, the robustness of feature extraction is improved, the network can adaptively pay attention to important features through the Sigmoid layer and the multiplier M1, irrelevant information is ignored, the efficiency and the precision of feature extraction are improved, the adder A2 realizes residual connection, the output of the SPP layer is added with the features after attention processing, the gradient vanishing problem of the deep network is relieved, and the training of the deeper network is promoted.
The expression of the first feature fusion unit is as follows: Wherein H1 is the output of the first feature fusion unit, Y1 is the output of the first scale feature extraction unit, Y3 is the output of the third scale feature extraction unit,Is Hadamard product;
the expression of the second feature fusion unit is as follows: Wherein H2 is the output of the second feature fusion unit, Y2 is the output of the second scale feature extraction unit, and Y4 is the output of the fourth scale feature extraction unit.
The invention multiplies the characteristics extracted from the signal characteristic matrix and the characteristics extracted from the signal gap coefficient matrix by elements, and can more accurately describe the change characteristics of the signal in space time by combining static and dynamic characteristics.
The expression of the output layer is:, where long0 is the longitude of the initial position, lat0 is the latitude of the initial position, xi is the ith eigenvalue output by adder A1, ω1,i is the longitude weight of the ith eigenvalue, b1,i is the longitude bias of the ith eigenvalue, ω2,i is the latitude weight of the ith eigenvalue, b2,i is the latitude bias of the ith eigenvalue, N is the number of eigenvalues output by adder A1, and i is a positive integer.
In the invention, the output layer comprises two types of weights and biases, and the longitude and the latitude are respectively predicted.
The step S4 comprises the following steps:
s41, fitting a plurality of longitudes by using a quadratic polynomial according to terminal positions at a plurality of moments of history to obtain a terminal movement longitude track, and fitting a plurality of dimensions by using a quadratic polynomial to obtain a terminal movement latitude track;
In this embodiment, the quadratic polynomial is :f1 = a1t2+b1t+ c1,f2 = a2t2+b2t+ c2,f1 a terminal movement longitude trace curve, f2 a terminal movement latitude trace, t is time, a1、b1、a2、b2 is four multipliers, and c1、c2 is two increments;
s42, predicting longitude of the next moment by using the terminal moving longitude track, and predicting latitude of the next moment by using the terminal moving latitude track to obtain a predicted position;
S43, calculating a deviation coefficient of the initial position and the predicted position;
s44, weighting the initial position and the predicted position according to the deviation coefficient of the initial position and the predicted position to obtain the terminal position at the current moment.
The formula for calculating the bias coefficient of the initial position and the predicted position in S43 is as follows: Where γ is a deviation coefficient, arctan is an arctangent function, long0 is the longitude of the initial position, lat0 is the latitude of the initial position,In order to predict the longitude of the location,Is the latitude of the predicted location.
The weighting formula in S44 is:, where x is the longitude of the terminal position at the current time and y is the latitude of the terminal position at the current time.
According to the method, the historical position data are fitted by using the quadratic polynomial, and the movement track models of the longitude and the latitude are respectively established. The position at the next moment is then predicted based on these trajectory models, which provides a powerful a priori information for the position estimation. By calculating the deviation coefficient of the initial position and the predicted position, the influence of the historical track information and the current measurement data can be dynamically balanced. And finally, fusing the initial position and the predicted position by adopting a weighting processing method, thereby not only considering the historical movement trend, but also keeping the accuracy of the current measurement. The method not only can smooth the positioning result and reduce the influence of instantaneous errors, but also can improve the continuity and stability of positioning. Particularly, under the condition of unstable signals or noise in measurement, the method can remarkably improve the positioning accuracy.
According to the invention, a signal characteristic sequence is constructed according to the signal characteristics of each 5G base station, the signal characteristic sequences are ordered based on the arrival time of signals, a signal difference coefficient matrix is constructed, the signal characteristic matrix reflects the signal characteristics of each 5G base station, the signal difference coefficient matrix reflects the difference condition of each signal characteristic sequence which is sequentially achieved, the difference of the signal characteristics at adjacent moments is enhanced, the characteristic distinction degree between the positions of different 5G base stations is enhanced, the signal characteristic matrix and the signal difference coefficient matrix are processed by adopting a multi-fusion positioning network to obtain an initial position, the multi-fusion positioning network is enabled to accurately estimate the position of a terminal by combining static characteristics and dynamic change information, the influence of instantaneous noise and abnormal values is reduced, the stability of a positioning result is improved, the initial position is corrected by adopting the terminal position at a plurality of moments of histories, and the positioning precision is further improved.
In reality, due to the existence of more barriers, the signals are reflected and scattered, multipath effect and non-line-of-sight propagation are caused, and positioning accuracy is affected, the invention constructs a signal characteristic matrix according to the signal characteristics of a plurality of 5G base stations, and according to the signal arrival time, and constructing a signal gap coefficient matrix, representing signal difference conditions of different 5G base stations, processing the signal difference conditions and the signal characteristics by adopting a multi-fusion positioning network, predicting initial positioning, effectively reducing accumulation of single-point measurement errors, and providing a more stable and accurate positioning result.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.