CN117062002A - 5G NR indoor positioning method and system based on lightweight TRANSFORMER - Google Patents

5G NR indoor positioning method and system based on lightweight TRANSFORMER Download PDF

Info

Publication number
CN117062002A
CN117062002A CN202310957628.XA CN202310957628A CN117062002A CN 117062002 A CN117062002 A CN 117062002A CN 202310957628 A CN202310957628 A CN 202310957628A CN 117062002 A CN117062002 A CN 117062002A
Authority
CN
China
Prior art keywords
matrix
output
attention mechanism
relu
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310957628.XA
Other languages
Chinese (zh)
Other versions
CN117062002B (en
Inventor
李伟
孟祥旭
郑文祺
刘芷含
赵铮
蔡易楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Harbin Engineering University
Original Assignee
Harbin Engineering University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Harbin Engineering University filed Critical Harbin Engineering University
Priority to CN202310957628.XA priority Critical patent/CN117062002B/en
Publication of CN117062002A publication Critical patent/CN117062002A/en
Application granted granted Critical
Publication of CN117062002B publication Critical patent/CN117062002B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/025Services making use of location information using location based information parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/33Services specially adapted for particular environments, situations or purposes for indoor environments, e.g. buildings
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)

Abstract

A5G NR indoor positioning method and system based on lightweight TRANSFORMER relates to the technical field of computers, in particular to the technical field of machine learning in computers. The method solves the problems of low positioning precision, low efficiency and difficult deployment caused by the limited subcarrier sensing range of the existing indoor fingerprint positioning method. The method comprises the following steps: processing the CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix; converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism by adopting a Reshape () function; inputting the two-dimensional matrix compatible with the attention mechanism into a multichannel attention mechanism module based on ReLU to obtain final output data; and carrying out position location on the final output data by adopting a position mapping module to obtain a mapping position. The invention is suitable for a 5G NR indoor positioning method based on lightweight TRANSFORMER in a computer.

Description

5G NR indoor positioning method and system based on lightweight TRANSFORMER
Technical Field
The present invention relates to the field of computer technology, and in particular, to the field of machine learning technology in computers.
Background
Indoor fingerprint positioning based on channel state information (Channel State Information, CSI) is widely used in the fields of indoor navigation, personnel tracking and the like. In addition, the rapid development of 5G technology has led to wider channel bandwidths, richer space-time channel descriptions, and larger amounts of data. Thus, 5G CSI may provide more channel information, which brings new features and challenges to CSI-based fingerprinting.
At present, the indoor fingerprint positioning methods applied in engineering practice can be mainly divided into the following two types:
(1) Machine learning-based methods such as patent literature published in 2020, 03, 27: CN110933604a discloses a KNN indoor positioning method based on position fingerprint time sequence characteristics, which obtains first K similar position fingerprints by calculating the similarity between the position at the current moment and the historical position fingerprints, then calculates the distance between each position fingerprint in the first K similar position fingerprints and the positioning result at the previous moment to obtain a predicted distance, then calculates the offset and weight of the first K similar position fingerprints respectively, and performs weighted summation on the position coordinates of the first K similar position fingerprints to obtain the position coordinates at the current moment to finish positioning. But this method cannot effectively utilize the higher information richness and feature resolution provided by the 5G CSI, resulting in lower accuracy and efficiency of indoor positioning.
(2) Deep learning-based methods such as patent literature published at 2022, 03, 15: CN114189809a discloses an indoor positioning method based on convolutional neural network and high-dimensional 5G observation characteristics, which comprises the steps of constructing an off-line image fingerprint library, and obtaining a convolutional neural network position classification model by utilizing fingerprint library training. And then, processing the 5G observation value acquired by the target equipment at the test point, inputting the processed 5G observation value into a convolutional neural network position classification model, and obtaining the positioning coordinates of the test point by a probability weighted centroid method to finish positioning. The method can better process large-scale and high-dimensional data, and can automatically learn more abstract and higher-level characteristic representations, thereby improving the performance and accuracy of the model, but has the problems of difficult deployment on equipment, gradient elimination of a cyclic neural network and explosion.
Disclosure of Invention
The invention solves the problems of low positioning precision, low efficiency and difficult deployment caused by the limited subcarrier sensing range of the existing indoor fingerprint positioning method.
In order to achieve the above object, the present invention provides the following solutions:
the invention provides a 5G NR indoor positioning method based on lightweight TRANSFORMER, which comprises the following steps:
s1, processing CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix;
s2, converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism by adopting a Reshape () function;
s3, inputting the two-dimensional matrix compatible with the attention mechanism into a multichannel attention mechanism module based on the ReLU to obtain final output data;
s4, adopting a position mapping module to position and locate the final output data to obtain a mapping position.
Further, in a preferred embodiment, the processing flow of the channel-independent rectangular image block operation module in the step S1 is as follows:
s11, dividing the CSI input data according to different channels to obtain H i Data;
s12, adopting the image block based on convolution to carry out the H i And performing image block operation on the data to obtain an output matrix.
Further, in a preferred embodiment, the formula of the convolution-based image block in the step S12 is expressed as:
H p =Concat(P(H 0,: ),P(H 1,: ),...,P(H C,: ));
wherein,to obtain the output, H i For the data of the ith channel, C is the number of input channels, C' is the number of output channels, W is the input width, L is the input length, K w To be the width of the convolution kernel for block-based convolution, K l Length of convolution kernel for block-based convolution, +.>For the output width obtained by dividing the input width by the kernel width, +.>Is the output length obtained by inputting the input through the input core length.
Further, in a preferred embodiment, the step of setting the image block based on convolution in the step S12 is:
the filler element is set to 0, K w Set as 8,K l Set to 13;
the stride in the width direction is set equal to the width of the convolution kernel, and the stride in the length direction is set equal to the length of the convolution kernel.
Further, in a preferred embodiment, the processing flow of the multi-channel attention mechanism module based on ReLU in step S3 is as follows:
s31, performing format conversion on the two-dimensional matrix compatible with the attention mechanism to obtain a converted two-dimensional matrix;
s32, performing dimension transformation on the converted two-dimensional matrix to obtain a transformed two-dimensional matrix;
s33, inquiring the transformed two-dimensional matrix by adopting a formula based on a ReLU attention mechanism to obtain a parameter matrix W q Key generation parameter matrix W k Sum value generation parameter matrix W v
S34, adopting the note based on ReLUScoring formula of the semantic force mechanism for the parameter matrix W q Key generation parameter matrix W k Sum value generation parameter matrix W v Calculating to obtain score data;
s35, normalizing the score data to obtain final score data;
s36, processing the final score data by adopting a ReLU activation function, and multiplying the processed result point by a value to generate a parameter matrix W v Accumulating to obtain a final result X matrix;
s37, inputting the final result X matrix into an attention mechanism module, and sequentially processing through a normalization layer, an attention layer and a normalization layer to obtain output data X output
S38, outputting the output data X output Input into a multi-layer sensor layer to obtain final output data X output
Further, in a preferred embodiment, the formula based on the ReLU attention mechanism in the step S33 is expressed as:
X output =Att(LN(Non-Trans(X)))+X;
where Non-Trans is unchanged dimension, LN is layer norm regularization, and Att is a ReLU-based attention mechanism.
Further, in a preferred embodiment, the score formula of the attention mechanism of the ReLU in step S34 is expressed as:
score=ReLU(W q X)(ReLU(W k X) · ReLU(W v X))。
the invention provides a 5GNR indoor positioning method based on lightweight TRANSFORMER, which can be realized by adopting computer software, so that the invention also provides a 5GNR indoor positioning system based on lightweight TRANSFORMER, wherein the system is as follows:
the storage device is used for processing the CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix;
a storage means for converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism;
the storage device is used for inputting the two-dimensional matrix compatible with the attention mechanism into a multichannel attention mechanism module based on ReLU by adopting a Reshape () function to obtain final output data;
and the storage device is used for carrying out position positioning on the final output data by adopting a position mapping module to obtain a mapping position.
The invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to execute the 5GNR indoor positioning method based on the lightweight TRANSFORMER.
The invention also provides a computer device, which comprises a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the 5G NR indoor positioning method based on the lightweight TRANSFORMER.
The beneficial effects of the invention are as follows:
1. the invention provides a 5G NR indoor positioning method based on lightweight TRANSFORMER, which is characterized in that CSI data is converted into a piece of data which can adapt to the input of an attention mechanism by using a convolution-based image block operation on the CSI data in a rectangular image block operation module with independent channels, so that the subsequent attention calculation process is facilitated; the modeling dimension is concentrated on the channel dimension of the vector in the multichannel attention mechanism module based on the ReLU, so that interaction among subcarriers from a plurality of base stations can be modeled, and meanwhile, an attention mechanism of functional interaction is provided, so that faster and better performance is realized. The existing indoor fingerprint positioning method has the problems of low positioning precision and low efficiency due to limited subcarrier sensing range.
2. The invention provides a 5G NR indoor positioning method based on lightweight TRANSFORMER, which replaces a hardware-unfriendly Softmax attention mechanism by using the attention mechanism based on Relu, so that the method can be deployed more easily even on equipment with limited resources, thereby solving the problem that the existing indoor fingerprint positioning method is difficult to deploy.
The invention is suitable for a 5G NR indoor positioning method based on lightweight TRANSFORMER in a computer.
Drawings
FIG. 1 is a flow chart of a lightweight TRANSFORMER-based 5G NR indoor positioning method according to an embodiment;
FIG. 2 is a flow chart of a process of a channel independent rectangular tile operation module according to the second embodiment;
FIG. 3 is a flow chart of a process of a ReLU-based multichannel attention mechanism module according to an embodiment five;
fig. 4 (a) is a graph comparing the results of different methods under the SNR10 dataset according to embodiment eleven;
fig. 4 (b) is a graph comparing the results of different methods under SNR20 data set according to embodiment eleven;
fig. 4 (c) is a graph comparing the results of different methods under the SNR50 data set according to the eleventh embodiment;
fig. 5 is a diagram showing the comparison of the error between the lightweight TRANSFORMER-based 5G NR indoor positioning method and the conventional positioning method according to the first embodiment.
Where SNR is the signal-to-noise ratio.
Detailed Description
The following describes in further detail the embodiments of the present invention with reference to the drawings and examples. The following examples will assist those skilled in the art in further understanding the present invention, but are not intended to limit the invention in any way. It should be noted that variations and modifications can be made by those skilled in the art without departing from the spirit of the invention, which falls within the scope of the invention.
Referring to fig. 1, the present embodiment provides a 5G NR indoor positioning method based on a lightweight trans former, where the method is as follows:
s1, processing CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix;
s2, converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism by adopting a Reshape () function;
s3, inputting the two-dimensional matrix compatible with the attention mechanism into a multichannel attention mechanism module based on the ReLU to obtain final output data;
s4, adopting a position mapping module to position and locate the final output data to obtain a mapping position.
In practical application, the embodiment comprises a rectangular image block operation module with independent channels, a multichannel attention mechanism module based on ReLU and a position mapping module. First, after frequency division multiplexing demodulation and time offset correction of a received signal, a user equipment can obtain a reception resource grid. The received resource grid is defined as rxGrid and the known pilots are defined as refGrid, so each antenna can be represented as H with a k-dimensional vector raw =(rxGrid) k×1 /(refGrid) k×1 Where k represents the number of subcarriers, H raw Representing the channel impulse response.
The subcarriers of a single antenna may be denoted as h i ∈R 1×k Whereas the overall subcarriers of a 5G base station with multiple inputs and multiple outputs may be denoted as H' er n×k Where n represents the number of antennas. In a typical indoor positioning task, multiple base stations are involved, so the overall CSI data can be expressed as H e R b×n×k Where b represents the number of base stations.
The fingerprint-based indoor positioning overall framework consists of two stages, offline and online, i.e. training and testing, respectively. The goal of the framework is to use the training dataset C train ={(csi 1 ,loc 1 ),(csi 2 ,loc 2 ),...,(csi n ,loc n ) The test data C is enabled to be query ={(csi n+1 ,loc n+1 ),(csi n+2 ,loc n+2 ),...,(csi m ,loc m ) Optimal positioning performance is achieved on the map, so that a mapping method with good generalization performance is learned. Which is a kind ofThe training data and the test data are composed of a pair of data, and the csi is a set of data i Representing CSI data, loc i Representing the position data.
In the offline phase, a deep learning based mapping method is utilized to minimize the loss function, wherein the predicted locations are represented by the output of the mapping method and the actual locations are represented as ground truth. The mapping method based on deep learning has a small number of parameters and exhibits high positioning accuracy on test data.
When the method is applied, the input data are divided into different data to be operated: for given CSI input data H, dividing H according to different channels of H to obtain H i Wherein H is i The subscript i of (2) denotes the ith lane of H.
Performing channel independent rectangular image block operation on data to be operated: and performing channel independent rectangular image block operation on the preprocessed data to be operated and the given convolution-based image block operation P, wherein a specific formula is shown as follows.
H p =Concat(P(H 0,: ),P(H 1,: ),...,P(H C,: ));
Wherein the method comprises the steps ofRepresenting the obtained output, H i The subscript i of (1) denotes the ith channel of H, C and C' denote the number of input and output channels, respectively, W and L denote the input width and length, respectively, K w And K l Respectively representing the width and length of the convolution kernel for block-based convolution, +.>And->The output width and length obtained by dividing the input width and length by the kernel width and length are respectively represented.
Setting related parameters: setting the filler element to 0, and K w Is arranged as8, K is l Set to 13, the stride in the width direction is set to be equal to the width of the convolution kernel, and the stride in the length direction is set to be equal to the length of the convolution kernel.
And (3) performing a remolding operation on the output matrix: for the obtained output H p Using a Reshape operation such that H p Converting from a three-dimensional matrix to a two-dimensional matrix compatible with the attention mechanism.
ReLU-based multichannel attention mechanism operation: dimension transform is performed on input X:
let x=w iThe dimension transformation is performed on X, and a specific description formula is shown as follows.
For example, define X as a matrix:
the dimension transformation of X according to the transformation formula can be obtained:
by this operation, the input X is enabled to adapt to the attention mechanism.
Calculation of self-attention layer: first, calculate the query generation parameter matrix W of X q Key generation parameter matrix W k Value generation parameter matrix W v The score is then calculated from the three generated parameter matrices for X, the specific calculation formula is shown below.
score=ReLU(W q X)(ReLU(W k X) · ReLU(W v X));
For gradient stabilization, regularization is performed on the calculated score to obtain the final score, and a specific regularization formula is shown below.
Where α is a regularization constant, which is set to 1×10 -15
The use of the ReLU activation function for score makes score positive or 0 faster than the normal use of the softmax activation function.
Then multiplying the obtained result point by W v And obtaining the value, namely obtaining the score V of each weighted input vector, and obtaining a final output result matrix X after adding.
Feature fusion based on multi-layer self-attention layers:
the above process is repeated for a plurality of times by building a plurality of self-attention layers, normalization operation is performed through a normalization layer, and output and input after attention calculation are overlapped each time, and a specific flow description formula is shown as follows.
X output =Att(LN(Non-Trans(X)))+X;
And (3) position mapping, namely inputting the output obtained from the attention mechanism module into a position mapping module formed by the full connection layer for position location. The position mapping module consists of a layer of full-connection layer, and the specific description formula is shown as follows:
(X,Y,Z)=Linear(LN(X output ));
where LN represents the layer norm and Linear represents a simple Linear layer.
The embodiment provides a 5GNR indoor positioning method based on lightweight TRANSFORMER, which transforms CSI data into a signal capable of adapting to the input of an attention mechanism by using a convolution-based image block operation on the CSI data in a rectangular image block operation module with independent channels, so that the subsequent attention calculation process is facilitated; the modeling dimension is concentrated on the channel dimension of the vector in the multichannel attention mechanism module based on the ReLU, so that interaction among subcarriers from a plurality of base stations can be modeled, and meanwhile, an attention mechanism of functional interaction is provided, so that faster and better performance is realized. The existing indoor fingerprint positioning method has the problems of low positioning precision, low efficiency and difficult deployment caused by limited subcarrier sensing range.
Referring to fig. 2, the second embodiment is an illustration of a processing flow of a channel independent rectangular image block operation module of step S1 in the 5G NR indoor positioning method based on lightweight trans former according to the first embodiment, where the processing flow is as follows:
s11, dividing the CSI input data according to different channels to obtain H i Data;
s12, adopting the image block based on convolution to carry out the H i And performing image block operation on the data to obtain an output matrix.
In practical application, as shown in fig. 2, the present embodiment is applied to the data H of the ith channel of different given inputs H i Using formula H p =Concat(P(H 0,: ),P(H 1,: ),...,P(H C,: ) A block operation is performed.
Wherein the method comprises the steps ofRepresenting the obtained output, H i The subscript i of (1) denotes the ith channel of H, C and C' denote the number of input and output channels, respectively, W and L denote the input width and length, respectively, K w And K l Respectively representing the width and length of the convolution kernel for block-based convolution, +.>And->The output width and length obtained by dividing the input width and length by the kernel width and length are respectively represented.
The padding element is set to 0, and furthermore the step in the width direction is set to be equal toThe width of the convolution kernel and the stride in the length direction is set equal to the length of the convolution kernel. Will K w Set to 8, K l Set to 13. Because the specific aspect ratio of CSI requires such a design to extract features efficiently. A smaller value of 8 corresponds to a smaller antenna size and a larger value of 13 corresponds to a larger subcarrier size.
For the obtained output matrix H p Using the formulaPerforming dimension conversion of the matrix to obtain a two-dimensional matrix output H compatible with an attention mechanism p
The obtained outputThe interactions between subcarriers from multiple base stations are modeled by a multichannel attention mechanism module based on ReLU.
In the third embodiment, the formula of the convolution-based image block in step S12 in the 5GNR indoor positioning method based on lightweight trans former according to the second embodiment is illustrated, where the formula of the convolution-based image block is expressed as:
H p =Concat(P(H 0,: ),P(H 1,: ),...,P(H C,: ));
wherein,to obtain the output, H i For the data of the ith channel, C is the number of input channels, C' is the number of output channels, W is the input width, L is the input length, K w To be the width of the convolution kernel for block-based convolution, K l Length of convolution kernel for block-based convolution, +.>For the output width obtained by dividing the input width by the kernel width, +.>Is the output length obtained by inputting the input through the input core length.
In the fourth embodiment, the step of setting the image block based on convolution in step S12 in the 5G NR indoor positioning method based on lightweight trans former according to the second embodiment is illustrated, where the step of setting is:
the filler element is set to 0, K w Set as 8,K l Set to 13;
the stride in the width direction is set equal to the width of the convolution kernel, and the stride in the length direction is set equal to the length of the convolution kernel.
In the present embodiment, in practical application, the padding element is set to 0, and furthermore, the step in the width direction is set to be equal to the width of the convolution kernel, and the step in the length direction is set to be equal to the length of the convolution kernel. Will K w Set to 8, K l Set to 13. Because the specific aspect ratio of CSI requires such a design to extract features efficiently. A smaller value of 8 corresponds to a smaller antenna size and a larger value of 13 corresponds to a larger subcarrier size.
Referring to fig. 3, the fifth embodiment is an illustration of a processing flow of a multi-channel attention mechanism module based on ReLU in step S3 in the 5G NR indoor positioning method based on lightweight trans former according to the first embodiment, where the processing flow is as follows:
s31, performing format conversion on the two-dimensional matrix compatible with the attention mechanism to obtain a converted two-dimensional matrix;
s32, performing dimension transformation on the converted two-dimensional matrix to obtain a transformed two-dimensional matrix;
s33, inquiring the transformed two-dimensional matrix by adopting a formula based on a ReLU attention mechanism to obtain a parameter matrix W q Key generation parameter matrix W k Sum value generation parameter matrix W v
S34, adopting a method based on RThe scoring formula of the attention mechanism of eLU is applied to the parameter matrix W q Key generation parameter matrix W k Sum value generation parameter matrix W v Calculating to obtain score data;
s35, normalizing the score data to obtain final score data;
s36, processing the final score data by adopting a ReLU activation function, and multiplying the processed result point by a value to generate a parameter matrix W v Accumulating to obtain a final result X matrix;
s37, inputting the final result X matrix into an attention mechanism module, and sequentially processing through a normalization layer, an attention layer and a normalization layer to obtain output data X output
S38, outputting the output data X output Input into a multi-layer sensor layer to obtain final output data X output
In practical application, as shown in fig. 3, the embodiment obtains feature information for the rectangular image block operation module with independent channelsA ReLU-based attention mechanism is employed to capture global interactions between subcarriers while maintaining equal or even better time efficiency. Output X obtained after performing attention calculation output Input into the multi-layer perceptron to increase feature richness. And then delivering the obtained output to a position mapping module for three-dimensional coordinate positioning, and completing the positioning task.
Wherein the whole formula based on the ReLU attention mechanism is:
X output =Att(LN(Non-Trans(X)))+X;
where Non-Trans represents unchanged dimension, LN represents layer norm regularization, and Att represents a ReLU-based attention mechanism.
Wherein the scoring formula for the ReLU-based attention mechanism is described as follows:
score=ReLU(W q X)(ReLU(W k X) · ReLU(W v X));
wherein W is q ,W k And W is v The generated parameter matrices representing the query, key and value, respectively. By regularizationObtaining a final score, where α is a regularization constant, which is set to 1×10 -15 . Since the matrix multiplication of attention based on ReLU first calculates keys and values, the attention calculation is not centered on C'.
The feature matrix is at input W i The previous form was the output from a channel independent rectangular tile operationThe dimension transformation is needed to be carried out on X, and a specific description formula of a matrix of the dimension transformation is shown as follows:
wherein x is i Representing different subcarrier characteristics from the same channel, X, y and z represent different channels from X. For ease of explanation, the weight subscript may be omitted and denoted as w, which in a broad sense represents the weight parameter. In the result of the left matrix multiplication, each value is in the form of (wx 1 +wx 2 +wx 3 ). In contrast, in the result of the right matrix multiplication, each value is in the form of (wx 1 +wy 1 +wz 1 ) This means that there is an interaction between the sub-carriers from the different channels and this feature will be enhanced in the calculation of the following attention mechanisms. The left matrix multiplication is performedIs calculated on the format of (a).
In the sixth embodiment, the formula based on the ReLU attention mechanism in step S33 in the 5G NR indoor positioning method based on lightweight trans former according to the fifth embodiment is illustrated, where the formula based on the ReLU attention mechanism is expressed as follows:
X output =Att(LN(Non-Trans(X)))+X;
where Non-Trans is unchanged dimension, LN is layer norm regularization, and Att is a ReLU-based attention mechanism.
In the fifth embodiment, a scoring formula of the attention mechanism of the ReLU in step S34 in the 5G NR indoor positioning method based on lightweight trans former is illustrated, where the scoring formula of the attention mechanism of the ReLU is expressed as follows:
score=ReLU(W q X)(ReLU(W k X) · ReLU(W v X))。
the eighth embodiment provides a 5G NR indoor positioning system based on a lightweight trans former, where the system is:
the storage device is used for processing the CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix;
a storage means for converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism;
the storage device is used for inputting the two-dimensional matrix compatible with the attention mechanism into a multichannel attention mechanism module based on ReLU by adopting a Reshape () function to obtain final output data;
and the storage device is used for carrying out position positioning on the final output data by adopting a position mapping module to obtain a mapping position.
An embodiment ninth provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, performs a 5G NR indoor positioning method according to any one of the first to seventh embodiments.
In a tenth embodiment, the present embodiment provides a computer device, in which a computer program is stored in a memory, and when the processor runs the computer program stored in the memory, the processor executes a 5G NR indoor positioning method based on a lightweight trans former as described in any one of the first to seventh embodiments.
An eleventh embodiment is described with reference to fig. 4 and 5, in which a verification description is made of a 5G NR indoor positioning method based on a lightweight trans former according to any one of the first to seventh embodiments:
three real 5G scene data sets collected in the indoor space of a new experiment building of the Beijing China academy of sciences are adopted as experimental data, and the whole indoor space is 20 m x 60 m x 4 m, so that the system is a large room suitable for factories, museums and other applications. To obtain CSI, five 5G base stations were deployed at 3.5 ghz using integrated sensing and communication, with a bandwidth of 100 mhz and a power of 40 watts. These base stations are mounted on plastic supports at a height of 2.4 meters above the ground and introduce a random float height of 0.1 meters during simulation to prevent coplanarity. The user device acts as a receiver and is placed on a marked lift car at a height of 1.2 meters from the ground, simulating a person holding a mobile phone at a height of 1.8 meters. The obtained data sets comprise 4816 positioning samples, wherein three data sets correspond to different representations of CSI at SNR (signal to noise ratio) 10, SNR20 and SNR 50. To divide the dataset into training, validation and test sets, approximate 6 was used according to different signal-to-noise ratios: 2:2, 2888, 964 and 964 samples were obtained, respectively. The size of the single CSI matrix is 5×16×193, meaning that there are 5 base stations, each with 16 antennas, each with 193 subcarriers.
For channel independent rectangular tiles, will be K w Set to 8, K l Set to 13. The dimension of the hidden layer C' is 385. The dimensions of the hidden layers in both the multi-layer perceptron module and the normalization module are 31. The final positioner uses a linear layer with an input size 385 and an output size 3.
Initial learning rate of 1×10 -4 After 100 training cycles, the learning rate was halved every 25 cycles, training round epoch was 300, batch size batch_size is 16.
The two evaluation criteria used during the experiment were root mean square error (Root Mean Square Error, RMSE),
mean absolute error (Mean Absolute Error, MAE):
wherein y is i The predicted value is represented by a value of the prediction,representing the true value.
The comparison method of the present embodiment includes: clnet method Complex input lightweight neural network designed for massive MIMO CSI feedback (complex input lightweight neural network designed for massive MIMO CSI feedback), KNN method: deep learning for massive MIMO CSI feedback (deep learning of massive MIMO CSI feedback), MIMOnet method: maMIMO CSI-Based Positioning using CNNs: peeking inside the Black Box (CNN-based MaMIMO CSI positioning: peeping inside the black box), hiloc method: hybrid Indoor Localization via Enhanced 5G NR CSI (hybrid indoor positioning based on enhanced 5G NR CSI), SVM method: toward 5G NR High-Precision Indoor Positioning via Channel Frequency Response: A New Paradigm and Dataset Generation Method (5G NR High precision indoor positioning based on channel frequency response: a new paradigm and data set generation method) and MPRI method: toward 5G NR High-Precision Indoor Positioning via Channel Frequency Response: A New Paradigm and Dataset Generation Method (5G NR High precision indoor positioning based on channel frequency response: a new paradigm and data set generation method).
Comparing the error of the method with the error of the 5G NR indoor positioning method based on the lightweight trans-former according to the present embodiment, the comparison result is shown in fig. 5, and it can be seen from the graph that, compared with the CLnet, KNN, CSInet, MIMOnet, hiloc, SVM, MPRI method, the error of the 5G NR indoor positioning method based on the lightweight trans-former according to the present embodiment is greatly reduced, and the prediction accuracy is effectively improved.
Meanwhile, by comparing the above method with the cumulative distribution function distribution of the 5G NR indoor positioning method based on the lightweight transfer format according to the present embodiment, as shown in fig. 4 (a), fig. 4 (b) and fig. 4 (c), it can be seen that the positioning accuracy of the 5G NR indoor positioning method based on the lightweight transfer format according to the present embodiment is greatly improved compared with that of the CLnet, KNN, CSInet, MIMOnet, hiloc, SVM, MPRI method.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The above description is only an example of the present invention and is not limited to the present invention, but various modifications and changes will be apparent to 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 scope of the claims of the present invention.

Claims (10)

1. A5G NR indoor positioning method based on lightweight TRANSFORMER is characterized by comprising the following steps:
s1, processing CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix;
s2, converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism by adopting a Reshape () function;
s3, inputting the two-dimensional matrix compatible with the attention mechanism into a multichannel attention mechanism module based on the ReLU to obtain final output data;
s4, adopting a position mapping module to position and locate the final output data to obtain a mapping position.
2. The 5G NR indoor positioning method based on the lightweight trans former according to claim 1, wherein the processing flow of the channel independent rectangular image block operation module in step S1 is as follows:
s11, dividing the CSI input data according to different channels to obtain H i Data;
s12, adopting the image block based on convolution to carry out the H i And performing image block operation on the data to obtain an output matrix.
3. The 5G NR indoor positioning method based on the lightweight trans former according to claim 2, wherein the formula of the convolution-based image block in the step S12 is expressed as:
H p =Concat(P(H 0,: ),P(H 1,: ),...,P(H C,: ));
wherein,to obtain the output, H i For the data of the ith channel, C is the number of input channels, C' is the number of output channels, W is the input width, L is the input length,K w To be the width of the convolution kernel for block-based convolution, K l Length of convolution kernel for block-based convolution, +.>For the output width obtained by dividing the input width by the kernel width, +.>Is the output length obtained by inputting the input through the input core length.
4. The 5G NR indoor positioning method based on the lightweight trans former according to claim 2, wherein the step of setting the image block based on convolution in the step S12 is:
the filler element is set to 0, K w Set as 8,K l Set to 13;
the stride in the width direction is set equal to the width of the convolution kernel, and the stride in the length direction is set equal to the length of the convolution kernel.
5. The 5G NR indoor positioning method based on the lightweight trans former according to claim 1, wherein the processing flow of the multi-channel attention mechanism module based on ReLU in step S3 is as follows:
s31, performing format conversion on the two-dimensional matrix compatible with the attention mechanism to obtain a converted two-dimensional matrix;
s32, performing dimension transformation on the converted two-dimensional matrix to obtain a transformed two-dimensional matrix;
s33, inquiring the transformed two-dimensional matrix by adopting a formula based on a ReLU attention mechanism to obtain a parameter matrix W q Key generation parameter matrix W k Sum value generation parameter matrix W v
S34, adopting a scoring formula of a attention mechanism based on ReLU to the parameter matrix W q Key generation parameter matrix W k Sum value generation parameter matrix W v Calculating to obtain score data;
s35, normalizing the score data to obtain final score data;
s36, processing the final score data by adopting a ReLU activation function, and multiplying the processed result point by a value to generate a parameter matrix W v Accumulating to obtain a final result X matrix;
s37, inputting the final result X matrix into an attention mechanism module, and sequentially processing through a normalization layer, an attention layer and a normalization layer to obtain output data X output
S38, outputting the output data X output Input into a multi-layer sensor layer to obtain final output data X output
6. The lightweight transport-based 5G NR indoor positioning method according to claim 5, wherein the ReLU-based attention mechanism formula in step S33 is expressed as:
X output =Att(LN(Non-Trans(X)))+X;
where Non-Trans is unchanged dimension, LN is layer norm regularization, and Att is a ReLU-based attention mechanism.
7. The lightweight transport-based 5G NR indoor positioning method according to claim 5, wherein the score formula of the attention mechanism of the ReLU in step S34 is expressed as:
score=ReLU(W q X)(ReLU(W k X) · ReLU(W v X))。
8. 5G NR indoor positioning system based on lightweight TRANSFORMER, characterized in that the system is:
the storage device is used for processing the CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix;
a storage means for converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism;
the storage device is used for inputting the two-dimensional matrix compatible with the attention mechanism into a multichannel attention mechanism module based on ReLU by adopting a Reshape () function to obtain final output data;
and the storage device is used for carrying out position positioning on the final output data by adopting a position mapping module to obtain a mapping position.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs a 5G NR indoor positioning method based on a lightweight trans former as claimed in any one of claims 1-7.
10. A computer device, characterized by: the device comprising a memory and a processor, said memory having stored therein a computer program, said processor performing a lightweight TRANSFORMER-based 5G NR indoor positioning method as claimed in any one of claims 1-7 when said processor runs said computer program stored in said memory.
CN202310957628.XA 2023-08-01 2023-08-01 5G NR indoor positioning method and system based on lightweight TRANSFORMER Active CN117062002B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310957628.XA CN117062002B (en) 2023-08-01 2023-08-01 5G NR indoor positioning method and system based on lightweight TRANSFORMER

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310957628.XA CN117062002B (en) 2023-08-01 2023-08-01 5G NR indoor positioning method and system based on lightweight TRANSFORMER

Publications (2)

Publication Number Publication Date
CN117062002A true CN117062002A (en) 2023-11-14
CN117062002B CN117062002B (en) 2024-04-30

Family

ID=88660007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310957628.XA Active CN117062002B (en) 2023-08-01 2023-08-01 5G NR indoor positioning method and system based on lightweight TRANSFORMER

Country Status (1)

Country Link
CN (1) CN117062002B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111479231A (en) * 2020-04-17 2020-07-31 西安交通大学 Indoor fingerprint positioning method for millimeter wave large-scale MIMO system
WO2022041206A1 (en) * 2020-08-31 2022-03-03 深圳市大疆创新科技有限公司 Image encoding method and apparatus, image decoding method and apparatus, and storage medium
CN115087038A (en) * 2022-06-09 2022-09-20 华东师范大学 Channel state information compression and decompression method for 5G positioning
CN115131214A (en) * 2022-08-31 2022-09-30 南京邮电大学 Indoor aged person image super-resolution reconstruction method and system based on self-attention
CN115567871A (en) * 2022-09-26 2023-01-03 南京大学 WiFi fingerprint indoor floor identification and position estimation method
CN115908547A (en) * 2022-10-27 2023-04-04 东南大学 Wireless positioning method based on deep learning
CN116321414A (en) * 2023-01-19 2023-06-23 北京邮电大学 Wireless positioning method and electronic equipment
CN116401794A (en) * 2023-06-09 2023-07-07 四川大学 Blade three-dimensional accurate reconstruction method based on attention-guided depth point cloud registration

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111479231A (en) * 2020-04-17 2020-07-31 西安交通大学 Indoor fingerprint positioning method for millimeter wave large-scale MIMO system
WO2022041206A1 (en) * 2020-08-31 2022-03-03 深圳市大疆创新科技有限公司 Image encoding method and apparatus, image decoding method and apparatus, and storage medium
CN115087038A (en) * 2022-06-09 2022-09-20 华东师范大学 Channel state information compression and decompression method for 5G positioning
CN115131214A (en) * 2022-08-31 2022-09-30 南京邮电大学 Indoor aged person image super-resolution reconstruction method and system based on self-attention
CN115567871A (en) * 2022-09-26 2023-01-03 南京大学 WiFi fingerprint indoor floor identification and position estimation method
CN115908547A (en) * 2022-10-27 2023-04-04 东南大学 Wireless positioning method based on deep learning
CN116321414A (en) * 2023-01-19 2023-06-23 北京邮电大学 Wireless positioning method and electronic equipment
CN116401794A (en) * 2023-06-09 2023-07-07 四川大学 Blade three-dimensional accurate reconstruction method based on attention-guided depth point cloud registration

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘广磊: "基于CSI幅度分解的动作识别和位置估计算法研究", 《优秀硕士学位论文》, 15 February 2023 (2023-02-15), pages 15 - 51 *

Also Published As

Publication number Publication date
CN117062002B (en) 2024-04-30

Similar Documents

Publication Publication Date Title
Njima et al. Indoor localization using data augmentation via selective generative adversarial networks
Prokhorov A convolutional learning system for object classification in 3-D lidar data
Wang et al. Storm: Structure-based overlap matching for partial point cloud registration
CN108428220B (en) Automatic geometric correction method for ocean island reef area of remote sensing image of geostationary orbit satellite sequence
CN110933633B (en) Onboard environment indoor positioning method based on CSI fingerprint feature migration
US20220392201A1 (en) Image feature matching method and related apparatus, device and storage medium
CN103440510A (en) Method for positioning characteristic points in facial image
CN107743296A (en) A kind of RSSI area segmentation formula localization methods based on compressed sensing
CN114449452A (en) Indoor positioning algorithm for heterogeneous equipment
CN109117851A (en) A kind of video image matching process based on lattice statistical constraint
Chen et al. A wifi indoor localization method based on dilated cnn and support vector regression
CN116704363A (en) Deep learning model, land coverage classification method and device
CN111313943A (en) Three-dimensional positioning method and device under deep learning assisted large-scale antenna array
Wang et al. Fast Construction of the Radio Map Based on the Improved Low‐Rank Matrix Completion and Recovery Method for an Indoor Positioning System
CN112329830B (en) Passive positioning track data identification method and system based on convolutional neural network and transfer learning
CN117062002B (en) 5G NR indoor positioning method and system based on lightweight TRANSFORMER
Yang et al. Research on high precision indoor positioning method based on low power Bluetooth technology
CN117098067A (en) Multi-mode deep learning indoor positioning method based on gradient fusion
CN116844040A (en) Small sample remote sensing image scene classification method based on double-flow structure
CN117062001B (en) 5G NR indoor positioning method and system based on interpretable deep learning
CN113194401B (en) Millimeter wave indoor positioning method and system based on generative countermeasure network
Sun et al. Deep convolutional neural networks enabled fingerprint localization for massive MIMO-OFDM system
CN114399628A (en) Insulator high-efficiency detection system under complex space environment
Meng et al. Hierarchical Contrastive Learning for CSI-Based Fingerprint Localization
Liu et al. Hierarchical fingerprinting and feature extraction for indoor localization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant