Radio frequency communication time delay compensation method based on data processing
By recombining the phase difference of the RF baseband sampling point sequence into a two-dimensional tensor and performing sparse attention calculation, the problem of high computational complexity of delay compensation methods in resource-constrained devices in RF communication systems is solved, and efficient delay compensation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 西安莱尔特电子科技有限公司
- Filing Date
- 2026-05-25
- Publication Date
- 2026-06-19
AI Technical Summary
In existing radio frequency communication systems, delay compensation methods based on data processing have high computational complexity in resource-constrained terminal devices, making them ineffective.
The phase difference sequence of adjacent sampling points in the RF baseband sampling point sequence is recombined into a two-dimensional phase difference tensor, and then processed by a sparse attention computation layer to generate a sparse attention weight matrix. This matrix is then combined with a time delay template vector for local matching to generate a time delay compensation parameter vector.
This reduces the computational load and memory consumption of matrix operations, enabling latency compensation operations to be executed stably on resource-constrained terminal devices, thereby improving the efficiency and accuracy of latency compensation.
Smart Images

Figure CN122247580A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electronic digital data processing, specifically the technical field of delay compensation data processing in radio frequency communication. This invention discloses a radio frequency communication delay compensation method based on data processing. Background Technology
[0002] In radio frequency (RF) communication systems, signal propagation between the transmitter and receiver is affected by multipath effects and hardware processing, resulting in time delay. The receiver needs to perform time delay compensation to maintain communication synchronization. A conventional data processing-based approach involves the receiver acquiring the RF baseband sampling point sequence and then directly applying a self-attention mechanism to the one-dimensional long sequence to calculate global dependencies. Specifically, the one-dimensional sequence is input as a whole vector into the self-attention computation layer. The correlation weights between each sampling point within the sequence and all other sampling points are calculated, generating a dense attention weight matrix with the same dimension as the sequence length. This matrix is then used to weight the one-dimensional sequence to predict the time delay compensation parameter, and finally, interpolation compensation is performed on the sequence based on this parameter.
[0003] In the aforementioned conventional methods, the computational complexity of the self-attention mechanism increases quadratically with the length of the one-dimensional sampling point sequence. Radio frequency (RF) communication signals are continuous data streams with enormous sequence lengths; directly performing global self-attention calculations on long sequences would generate extremely high-dimensional, dense weight matrices. This necessitates massive matrix multiplication operations during data processing, consuming extremely high memory and computational resources, making it impossible to deploy and run latency compensation methods on computationally limited RF communication terminal devices. Summary of the Invention
[0004] The purpose of this invention is to provide a radio frequency communication delay compensation method based on data processing, which can solve the problems in the background art mentioned above.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A data processing-based radio frequency (RF) communication delay compensation method includes: acquiring an RF baseband sampling point sequence; calculating a phase difference sequence between adjacent sampling points in the RF baseband sampling point sequence; truncating and arranging the phase difference sequence according to a set row width and overlap to generate a two-dimensional phase difference tensor; inputting the two-dimensional phase difference tensor into a sparse attention computation layer; generating a sparse attention weight matrix by calculating the dot product between each row vector in the two-dimensional phase difference tensor and several preset typical delay template vectors, wherein the typical delay template vectors are pre-constructed based on the guard interval length in the RF communication protocol; performing a weighted summation on the two-dimensional phase difference tensor using the sparse attention weight matrix to output a delay compensation parameter vector; and performing a resampling interpolation operation on the RF baseband sampling point sequence according to the delay compensation parameter vector.
[0006] Preferably, calculating the phase difference sequence between adjacent sampling points in the RF baseband sampling point sequence includes: performing a fast Fourier transform on the RF baseband sampling point sequence to extract a frequency domain complex sequence; performing complex conjugate multiplication on each frequency point in the frequency domain complex sequence to extract the instantaneous phase value of each frequency point; arranging the instantaneous phase values in frequency index order to generate an initial phase sequence; and performing difference processing on adjacent frequency points in the initial phase sequence to remove the fixed phase slope introduced by the DC carrier frequency offset, thereby obtaining the phase difference sequence.
[0007] Preferably, the step of truncating and arranging the phase difference sequence according to a set row width and overlap to generate a two-dimensional phase difference tensor includes: obtaining the symbol rate corresponding to the RF baseband sampling point sequence, multiplying the symbol rate by a preset oversampling factor to obtain the row width; obtaining the cyclic prefix length of the orthogonal frequency division multiplexing symbol defined in the RF communication protocol, dividing the cyclic prefix length by the oversampling factor and rounding down to obtain the overlap; performing a sliding window truncation on the phase difference sequence according to the row width and the overlap, taking each truncated subsequence as a row of the two-dimensional phase difference tensor, until the entire phase difference sequence is traversed.
[0008] Preferably, the typical delay template vector is pre-constructed based on the guard interval length in the radio frequency communication protocol, including: generating multiple discrete delay offsets within the sampling point range corresponding to the guard interval length according to a preset delay resolution; generating an initial vector consisting of all-one elements with a length equal to the column width of the two-dimensional phase difference tensor for each discrete delay offset; cyclically shifting the elements in the initial vector, the number of cyclic shift steps being equal to the number of sampling points corresponding to the discrete delay offset, and using the cyclically shifted initial vector as the typical delay template vector.
[0009] Preferably, the step of generating a sparse attention weight matrix by calculating the dot product between each row vector in the two-dimensional phase difference tensor and a preset number of typical time delay template vectors includes: for the current row vector in the two-dimensional phase difference tensor, calculating the inner product between the current row vector and all the typical time delay template vectors to obtain an initial attention score set; applying an exponential operation to each initial attention score in the initial attention score set to obtain an exponential score set; selecting the top preset number of exponential scores with the largest values from the exponential score set, setting the unselected exponential scores to 0, and reorganizing the selected and zeroed set into the corresponding rows of the sparse attention weight matrix according to the arrangement order of the typical time delay template vectors.
[0010] Preferably, the step of performing resampling interpolation on the RF baseband sampling point sequence based on the delay compensation parameter vector includes: performing mean pooling on all elements of the delay compensation parameter vector to obtain a global delay compensation scalar; subtracting the global delay compensation scalar from the timestamp of each sampling point in the RF baseband sampling point sequence to obtain a target interpolation time point; using the impulse response of a baseband shaping filter with a preset cutoff frequency as the interpolation kernel, extracting multiple sampling points on both sides of the target interpolation time point in the RF baseband sampling point sequence, and performing convolution operation between the interpolation kernel and the multiple sampling points to output the resampled RF baseband sampling point sequence.
[0011] Preferably, before removing the fixed phase slope introduced by the DC carrier frequency offset, the method further includes: extracting the difference between two adjacent instantaneous phase values in the initial phase sequence; determining whether the absolute value of the difference is greater than a preset phase jump threshold; if the absolute value of the difference is greater than the phase jump threshold, adding or subtracting twice pi to the instantaneous phase value located later, until the absolute value of the processed difference is less than or equal to the phase jump threshold; and recombining the instantaneous phase values after adding or subtracting twice pi to obtain the initial phase sequence after de-winding.
[0012] Preferably, after taking each extracted subsequence as a row of the two-dimensional phase difference tensor, the method further includes: detecting whether the number of elements in the last row of the currently generated two-dimensional phase difference tensor is equal to the row width; if the number of elements in the last row is less than the row width, calculating the difference between the number of elements and the row width; extracting tail data with a length equal to the difference from the end of the phase difference sequence, flipping the tail data, and concatenating it to the end of the last row, so that the number of elements in all rows of the two-dimensional phase difference tensor is equal to the row width.
[0013] Preferably, before setting the unselected exponential scores to 0, the method further includes: constructing an initial mask matrix with the same dimension as the initial attention score set and all elements being 0 or 1; obtaining the historical delay compensation value of the previous sliding window truncation position corresponding to the current row vector in the two-dimensional phase difference tensor; calculating the absolute value of the difference between the historical delay compensation value and each discrete delay offset; setting the positions in the initial mask matrix corresponding to the absolute value of the difference being less than a preset neighborhood radius to 1, and keeping the positions in the initial mask matrix corresponding to the absolute value of the difference being greater than or equal to the neighborhood radius to 0, thereby generating a target mask matrix; and performing element-wise multiplication between the initial attention score set and the target mask matrix.
[0014] Preferably, after generating the target mask matrix, the method further includes: extracting the number of elements with 1 in the target mask matrix; calculating the ratio of the number of elements to the total number of elements in the target mask matrix; determining whether the ratio is less than a preset lower threshold; if the ratio is less than the lower threshold, expanding the neighborhood radius and returning to the step of calculating the absolute value of the difference between the historical delay compensation value and each discrete delay offset, until the updated ratio is greater than or equal to the lower threshold, and using the finally obtained target mask matrix as the basis for performing the element-by-element multiplication step.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention reorganizes a one-dimensional phase difference sequence into a two-dimensional phase difference tensor based on the row width and overlap determined by the symbol rate, oversampling factor, and cyclic prefix length. A typical delay template vector is pre-constructed according to the guard interval length. In the sparse attention computation layer, this invention only calculates the dot product between each row vector of the tensor and the typical delay template vector, selecting and retaining a portion of the scores and setting the rest to zero to generate the sparse attention weight matrix. By changing the data organization structure, the global dependencies of the one-dimensional sequence are transformed into local template matching within the two-dimensional tensor space. This eliminates the correlation calculations of irrelevant sampling points, reduces the density of the weight matrix, and decreases the number of matrix multiplication operations and memory usage during data processing, enabling delay compensation operations to be performed on resource-constrained terminal devices.
[0016] 2. When calculating the phase difference sequence, a fixed phase slope is removed by subtracting adjacent frequency points of the complex sequence in the frequency domain, and a dewinding process involving adding or subtracting twice pi is performed using a phase jump threshold. This eliminates the disruption of the difference sequence caused by carrier frequency offset interference and phase jumps. To address the issue of insufficient length at the end of the two-dimensional tensor, the line width is supplemented by flipping and splicing the tail data, maintaining the regularity of the tensor dimension. A target mask matrix is constructed using historical delay compensation values. Initial attention scores exceeding the neighborhood radius are set to zero, and the neighborhood radius is adjusted according to the proportion of the set elements. This suppresses the interference of invalid delay offsets on the attention score and ensures the stability of the output delay compensation parameter vector. Attached Figure Description
[0017] Figure 1 Here is the main flowchart of the radio frequency communication delay compensation method based on data processing; Figure 2 Flowchart for phase difference sequence calculation and unwinding process; Figure 3 Flowchart for generating and padding the last line of a two-dimensional phase difference tensor; Figure 4 Flowchart for constructing a typical time delay template vector; Figure 5 Flowchart for sparse attention weight matrix generation and masking process; Figure 6 The flowchart shows the execution process for resampling interpolation. Detailed Implementation
[0018] Please refer to the attached document. Figure 1 This embodiment provides a radio frequency (RF) communication delay compensation method based on data processing. It acquires an RF baseband sampling point sequence and calculates the phase difference sequence between adjacent sampling points in the RF baseband sampling point sequence. Specifically, the RF baseband sampling point sequence is a time-domain complex sampling sequence output by analog-to-digital conversion after down-conversion processing by the receiver's RF front-end. Each element in the sequence is a complex number containing in-phase and quadrature components. The sampling rate of the sequence matches the symbol rate and oversampling factor agreed upon in the RF communication protocol, and the length of the sequence is determined by the receiver's preset receiving window length. For the RF baseband sampling point sequence, the complex phase angle corresponding to each sampling point is extracted sequentially. The phase angles of two adjacent sampling points are subtracted to obtain the phase difference sequence. The length of the phase difference sequence is 1 less than the length of the RF baseband sampling point sequence.
[0019] The phase difference sequence is truncated and arranged according to a set row width and overlap to generate a two-dimensional phase difference tensor. Specifically, the values of row width and overlap are determined based on the physical layer parameters of the RF communication protocol. The row width is positively correlated with the symbol rate and oversampling factor of the RF baseband sampling point sequence, and the overlap is positively correlated with the cyclic prefix length of the orthogonal frequency division multiplexing (OFDM) symbols in the RF communication protocol. A sliding window truncation operation is performed on the phase difference sequence according to the determined row width and overlap. The length of each truncated subsequence is equal to the row width, the number of overlapping elements between two adjacent truncated windows is equal to the overlap, and the sliding step size between two adjacent truncated windows is equal to the difference between the row width and the overlap. The subsequences obtained from each truncation are arranged sequentially as row vectors of a two-dimensional matrix. All row vectors are combined to form a two-dimensional phase difference tensor. The number of rows in the two-dimensional phase difference tensor is equal to the total number of sliding window truncations, and the number of columns in the two-dimensional phase difference tensor is equal to the set row width.
[0020] The two-dimensional phase difference tensor is input into the sparse attention computation layer. A sparse attention weight matrix is generated by calculating the dot product between each row vector in the two-dimensional phase difference tensor and several preset typical delay template vectors. These typical delay template vectors are pre-constructed based on the guard interval length in the radio frequency communication protocol. Specifically, the input to the sparse attention computation layer is the two-dimensional phase difference tensor, and the output is the sparse attention weight matrix. The number of rows in the sparse attention weight matrix is equal to the number of rows in the two-dimensional phase difference tensor, and the number of columns in the sparse attention weight matrix is equal to the number of preset typical delay template vectors. The number of typical delay template vectors is determined by the guard interval length and the preset delay resolution. Each typical delay template vector corresponds to a discrete delay offset, and the length of all typical delay template vectors is equal to the column width of the two-dimensional phase difference tensor. For each row vector in the two-dimensional phase difference tensor, the dot product of the row vector with all typical time delay template vectors is calculated sequentially to obtain the attention score set corresponding to the row vector. The attention score set is then sparsified by setting the scores below a preset threshold to zero and retaining the scores above the preset threshold. The processed score set is then reorganized into the corresponding rows of the sparse attention weight matrix according to the arrangement order of the typical time delay template vectors. After traversing all row vectors of the two-dimensional phase difference tensor, a complete sparse attention weight matrix is generated.
[0021] The sparse attention weight matrix is used to perform a weighted summation on the two-dimensional phase difference tensor to output a time delay compensation parameter vector. Specifically, a matrix multiplication operation is performed between the sparse attention weight matrix and the two-dimensional phase difference tensor to obtain a weighted two-dimensional tensor. The weighted two-dimensional tensor is then summed along its column dimension to obtain a one-dimensional vector with the same number of rows as the two-dimensional phase difference tensor. This one-dimensional vector is the time delay compensation parameter vector, and each element in the time delay compensation parameter vector corresponds to the time delay matching result of one row vector in the two-dimensional phase difference tensor.
[0022] A resampling interpolation operation is performed on the RF baseband sampling point sequence based on the time delay compensation parameter vector. Specifically, a global time delay compensation value is generated based on the time delay compensation parameter vector. Using the global time delay compensation value as a reference, the sampling time axis of the RF baseband sampling point sequence is offset and adjusted. The sampling point values corresponding to the adjusted time axis are calculated using an interpolation algorithm to generate the resampled RF baseband sampling point sequence, thus completing the time delay compensation process.
[0023] Table 1. Correspondence between core parameters and value constraints in this embodiment.
[0024] The table above clarifies the physical meaning, value constraints, and example values of each core parameter in this embodiment. Those skilled in the art can determine the parameter configuration under the corresponding communication protocol based on the table and reproduce the technical solution of this embodiment.
[0025] In this embodiment, by reorganizing the one-dimensional phase difference sequence into a two-dimensional phase difference tensor, the global delay matching operation is transformed into a local matching operation between the two-dimensional tensor row vector and the typical delay template vector. By generating a sparse attention weight matrix through sparsification, the computational load and memory usage of matrix operations are reduced, enabling the delay compensation operation to be stably executed on resource-constrained terminal devices.
[0026] refer to Figure 2 In a preferred embodiment, when calculating the phase difference sequence between adjacent sampling points in the RF baseband sampling point sequence, a Fast Fourier Transform (FFT) is performed on the RF baseband sampling point sequence to extract the frequency domain complex sequence. Specifically, the RF baseband sampling point sequence is windowed. The type and length of the window function are determined according to the length of the orthogonal frequency division multiplexing (OFDM) symbol in the RF communication protocol. The window function can be a Hamming window, a Hanning window, or a rectangular window, and the length of the window function is equal to the sampling point length of a single OFDM symbol. A FFT operation is then performed on the windowed time-domain sampling sequence. The number of transformation points is equal to the length of the windowed sequence. In the frequency domain complex sequence output after the transformation, each element corresponds to a complex transmission coefficient of a subcarrier frequency point, and the length of the frequency domain complex sequence is equal to the number of points of the FFT.
[0027] The instantaneous phase value of each frequency point is extracted by multiplying its complex conjugate with the complex number at each frequency point in the frequency domain complex number sequence. Specifically, for the complex number X(k) corresponding to the k-th frequency point in the frequency domain complex number sequence, the product of this complex number and its own conjugate complex number is calculated to obtain the power value of this frequency point. Simultaneously, the argument value of this complex number is extracted; this argument value is the instantaneous phase value of this frequency point, and the range of the instantaneous phase value is... The mathematical expression for this process is:
[0028] in, Let k be the instantaneous phase value at the k-th frequency point. For complex argument extraction operators, Let k be the complex element corresponding to the k-th frequency point in the frequency domain complex sequence, where k is the frequency point index and its value ranges from 1 to 2. , This represents the number of points in the Fast Fourier Transform.
[0029] The instantaneous phase values are arranged in frequency index order to generate an initial phase sequence. Specifically, the instantaneous phase values corresponding to all frequency points are arranged sequentially in ascending order of frequency index to form a one-dimensional initial phase sequence. The length of the initial phase sequence is equal to the number of points in the fast Fourier transform, and the order of the elements in the initial phase sequence is consistent with the ascending frequency order of the subcarriers.
[0030] The phase difference sequence is obtained by subtracting adjacent frequency points in the initial phase sequence to remove the fixed phase slope introduced by the DC carrier frequency offset. Specifically, the carrier frequency offset causes the instantaneous phase sequence in the frequency domain to exhibit a linear change, and the slope of the linear change is positively correlated with the magnitude of the carrier frequency offset. By performing subtraction on the instantaneous phase values of adjacent frequency points, the influence of the linear phase slope can be eliminated, resulting in a phase difference sequence that is only related to the transmission delay. The mathematical expression of this process is as follows:
[0031] in, The k-th element in the phase difference sequence This represents the instantaneous phase value at the (k+1)th frequency point in the initial phase sequence. Let k be the instantaneous phase value at the k-th frequency point in the initial phase sequence, where k takes values ranging from 1 to 2. .
[0032] Before removing the fixed phase slope introduced by the DC carrier frequency offset, a phase dewinding process is also included. Specifically, the difference between two adjacent instantaneous phase values in the initial phase sequence is extracted, and it is determined whether the absolute value of the difference is greater than a preset phase jump threshold. If the absolute value of the difference is greater than the phase jump threshold, then twice pi is added to or subtracted from the subsequent instantaneous phase value until the absolute value of the processed difference is less than or equal to the phase jump threshold. The instantaneous phase values after the addition / subtraction of twice pi are then recombine to obtain the initial phase sequence after dewinding. The mathematical expression of this process is:
[0033] in, This represents the instantaneous phase value at the (k+1)th frequency point after unwinding. For the rounding operator, the phase transition threshold is set to a value of 1. .
[0034] Table 2. Phase Unwinding Processing Parameters and Judgment Rules
[0035] The table above clarifies the complete process, parameter configuration, and judgment rules for phase dewinding in this embodiment. Those skilled in the art can reproduce the phase dewinding process based on the table and eliminate the interference of phase winding on the phase difference sequence.
[0036] In this embodiment, the instantaneous phase sequence is extracted by frequency domain transformation, and the phase values of adjacent frequency points are subtracted to eliminate the fixed phase slope introduced by carrier frequency offset. Combined with the phase jump threshold, phase dewinding processing is performed, which effectively eliminates the destruction of the phase difference sequence by carrier frequency offset interference and phase jump, improves the accuracy of the phase difference sequence, and provides reliable input data for subsequent time delay matching operations.
[0037] refer to Figure 3 In a preferred embodiment, when the phase difference sequence is truncated and arranged according to a set line width and overlap to generate a two-dimensional phase difference tensor, the symbol rate corresponding to the RF baseband sampling point sequence is obtained, and the symbol rate is multiplied by a preset oversampling factor to obtain the line width. Specifically, the symbol rate is the physical layer symbol transmission rate agreed upon by the RF communication protocol, the oversampling factor is the ratio of the sampling rate of the analog-to-digital converter at the receiving end to the symbol rate, and the line width is equal to the product of the symbol rate and the oversampling factor, ensuring that the line width matches the number of sampling points of a single orthogonal frequency division multiplexing symbol, so that the subsequence truncated by each sliding window can cover the complete symbol phase difference information. The mathematical expression of this process is:
[0038] in, The line width of the two-dimensional phase difference tensor. The symbol rate corresponding to the RF baseband sampling point sequence. This is the preset oversampling factor.
[0039] The cyclic prefix length of the orthogonal frequency division multiplexing (OFDM) symbol defined in the radio frequency communication protocol is obtained. This cyclic prefix length is then divided by the oversampling factor and rounded down to obtain the overlap degree. Specifically, the cyclic prefix length is the number of guard interval sampling points for the OFDM symbol as defined in the radio frequency communication protocol. The overlap degree is positively correlated with the cyclic prefix length, ensuring that the overlapping area between adjacent sliding windows covers the sampling point range corresponding to the cyclic prefix, avoiding the loss of effective delay information, and simultaneously ensuring that the sliding window step size matches the symbol transmission rhythm. The mathematical expression of this process is:
[0040] in, The overlap of the sliding windows. This refers to the cyclic prefix length of the orthogonal frequency division multiplexing symbol as defined in the radio frequency communication protocol. This is the floor operator.
[0041] The phase difference sequence is truncated using a sliding window based on the row width and the overlap. Each truncated subsequence is treated as a row of the two-dimensional phase difference tensor until the entire phase difference sequence is traversed. Specifically, the length of the sliding window is equal to the row width, and the sliding step of two adjacent sliding windows is equal to the difference between the row width and the overlap. Starting from the beginning of the phase difference sequence, the sliding window truncating operation is performed sequentially, arranging the truncated subsequences into rows of the two-dimensional phase difference tensor in the truncating order, until the end of the sliding window exceeds the end of the phase difference sequence. The mathematical expression for the starting position of the i-th sliding window truncation is:
[0042] in, Let be the starting index of the i-th sliding window cut, where i is the index of the number of cuts in the sliding window, and its value ranges from 1 to 2. , This represents the total number of rows in the two-dimensional phase difference tensor.
[0043] After each extracted subsequence is used as a row of the two-dimensional phase difference tensor, tensor dimension normalization is also included. Specifically, it checks whether the number of elements in the last row of the currently generated two-dimensional phase difference tensor is equal to the row width. If the number of elements in the last row is less than the row width, the difference between the number of elements and the row width is calculated. Tail data with a length equal to the difference is extracted from the end of the phase difference sequence, the tail data is flipped, and then appended to the end of the last row, so that the number of elements in all rows of the two-dimensional phase difference tensor is equal to the row width. The mathematical expression of this process is:
[0044] in, Let j be the j-th element of the last row of the two-dimensional phase difference tensor. The starting index for the last slide window capture. This represents the number of elements in the last subsequence extracted. Let j be the total length of the phase difference sequence, and j be the column index, with a value range of 1. .
[0045] Table 3. Correspondence between generation parameters and dimensions of the two-dimensional phase difference tensor
[0046] The table above clarifies the calculation method, value examples, and impact on the tensor dimension of each parameter during the generation of the two-dimensional phase difference tensor in this embodiment. Those skilled in the art can accurately calculate the tensor dimension parameters based on the table and complete the conversion from the phase difference sequence to the two-dimensional phase difference tensor.
[0047] In this embodiment, the row width and overlap of the sliding window are accurately calculated based on the symbol rate, oversampling factor, and cyclic prefix length. The conversion from a one-dimensional phase difference sequence to a two-dimensional phase difference tensor is achieved by truncation through the sliding window. In the case of insufficient length of the last row of the tensor, the row width is supplemented by flipping and splicing the tail data, which maintains the regularity of the tensor dimension and provides input data with uniform dimension for subsequent sparse attention calculation.
[0048] refer to Figure 4 In a preferred embodiment, the typical delay template vector is pre-constructed based on the guard interval length in the radio frequency communication protocol. Specifically, within the sampling point range corresponding to the guard interval length, multiple discrete delay offsets are generated according to a preset delay resolution. The guard interval length is the cyclic prefix length of the orthogonal frequency division multiplexing symbol as defined in the radio frequency communication protocol. The value range of the discrete delay offset is from 0 to the number of sampling points corresponding to the guard interval length. The delay resolution is the difference between two adjacent discrete delay offsets. The number of discrete delay offsets is equal to the result of dividing the number of sampling points corresponding to the guard interval length by the delay resolution and rounding down, plus one. The mathematical expression of the discrete delay offset is:
[0049] in, Let m be the m-th discrete time delay offset, where m is the index of the typical time delay template vector, and its value ranges from 1 to 2. M represents the total number of typical time-delay template vectors. This is the preset time delay resolution, expressed in the number of sampling points.
[0050] For each discrete time delay offset, an initial vector consisting of all one elements with a length equal to the column width of the two-dimensional phase difference tensor is generated. The elements of this initial vector are then cyclically shifted, with the number of shift steps equal to the number of sampling points corresponding to the discrete time delay offset. This cyclically shifted initial vector is then used as the typical time delay template vector. The mathematical expression for this process is:
[0051] in, Let j be the j-th element of the m-th typical time delay template vector. It is a cyclic shift operator. Let j be a uniform vector of length equal to the column width W of the two-dimensional phase difference tensor, where j is the column index and its value ranges from 1 to 2. .
[0052] refer to Figure 5 A sparse attention weight matrix is generated by calculating the dot product between each row vector in the two-dimensional phase difference tensor and several preset typical time delay template vectors. Specifically, for the current row vector in the two-dimensional phase difference tensor, the inner product between the current row vector and all the typical time delay template vectors is calculated to obtain the initial attention score set. The mathematical expression for the inner product calculation is:
[0053] in, The initial attention score is the inner product of the i-th row vector of the two-dimensional phase difference tensor and the m-th typical time delay template vector. Let i be the i-th row vector of the two-dimensional phase difference tensor. Let m be the typical time delay template vector. Let be the element in the i-th row and j-th column of the two-dimensional phase difference tensor. It is the j-th element of the m-th typical time delay template vector.
[0054] An exponential operation is applied to each initial attention score in the initial attention score set to obtain an exponentialized score set. The mathematical expression of this process is as follows:
[0055] in, For indexed scores, It is the natural exponent operator.
[0056] From the set of exponential scores, the top preset number of exponential scores with the largest values are selected. Unselected exponential scores are set to zero. The selected and zeroed sets are then reorganized according to the order of the typical time delay template vectors to form the corresponding rows of the sparse attention weight matrix. The mathematical expression of this process is:
[0057] in, Let be the element in the i-th row and m-th column of the sparse attention weight matrix. This is an operator for selecting the top K elements with the largest values in a set, where K is the preset number of scores to retain.
[0058] Before setting the unselected exponential scores to 0, mask constraint processing is also included. Specifically, an initial mask matrix with the same dimension as the initial attention score set and all elements being 0 or 1 is constructed. The historical delay compensation value of the previous sliding window truncation position corresponding to the current row vector in the two-dimensional phase difference tensor is obtained. The absolute value of the difference between the historical delay compensation value and each discrete delay offset is calculated. Positions in the initial mask matrix whose absolute difference is less than a preset neighborhood radius are set to 1, while positions in the initial mask matrix whose absolute difference is greater than or equal to the neighborhood radius are kept at 0. A target mask matrix is generated, and the initial attention score set is multiplied element-wise by the target mask matrix. The mathematical expression of the target mask matrix is:
[0059] in, The m-th element of the target mask matrix R is the historical delay compensation value corresponding to the previous sliding window capture position, where R is the preset neighborhood radius, and the unit is the number of sampling points.
[0060] After generating the target mask matrix, an adaptive neighborhood radius adjustment process is also included. Specifically, the number of elements with 1 in the target mask matrix is extracted, and the ratio of this number to the total number of elements in the target mask matrix is calculated. It is then determined whether this ratio is less than a preset lower threshold. If the ratio is less than the lower threshold, the neighborhood radius is expanded, and the process returns to the step of calculating the absolute value of the difference between the historical delay compensation value and each discrete delay offset, until the updated ratio is greater than or equal to the lower threshold. The final target mask matrix is then used as the basis for performing the element-by-element multiplication step. The mathematical expression for the mask ratio is:
[0061] in, The value of M is the ratio of the number of elements with one in the target mask matrix to the total number of elements. M is the total number of elements in the target mask matrix, which is the total number of typical time delay template vectors.
[0062] refer to Figure 6 The sparse attention weight matrix is used to perform a weighted summation on the two-dimensional phase difference tensor to output a time delay compensation parameter vector. Specifically, the weight of each row in the sparse attention weight matrix is weighted and summed with the corresponding discrete time delay offset to obtain the time delay compensation value for each row. The time delay compensation values of all rows are combined to form the time delay compensation parameter vector. The mathematical expression of this process is as follows:
[0063] in, This represents the i-th element of the delay compensation parameter vector, i.e., the delay compensation value corresponding to the i-th row vector. Let be the element in the i-th row and m-th column of the sparse attention weight matrix. This is the offset of the m-th discrete time delay.
[0064] Resampling interpolation is performed on the RF baseband sampling point sequence based on the delay compensation parameter vector. Specifically, mean pooling is performed on all elements of the delay compensation parameter vector to obtain a global delay compensation scalar. Using the timestamp of each sampling point in the RF baseband sampling point sequence as a reference, the global delay compensation scalar is subtracted from the timestamp to obtain the target interpolation time point. The impulse response of a baseband shaping filter with a preset cutoff frequency is used as the interpolation kernel. Multiple sampling points on both sides of the target interpolation time point are extracted from the RF baseband sampling point sequence. Convolution is performed between the interpolation kernel and the multiple sampling points to output the resampled RF baseband sampling point sequence. Specifically, the baseband shaping filter can be a root-raised cosine filter, and the roll-off factor of the filter is consistent with the roll-off factor agreed upon in the RF communication protocol. The length of the interpolation kernel can be set to 4 or 8 times the symbol sampling interval to ensure the accuracy of the interpolation operation.
[0065] Table 4. Adaptive Adjustment Parameters and Rules for Neighborhood Radius of Mask Matrix
[0066] The table above clarifies the complete process, parameter constraints, and judgment rules for adaptive adjustment of the neighborhood radius in this embodiment. Those skilled in the art can reproduce the construction and adjustment process of the mask matrix based on the table, and suppress the interference of invalid delay offsets on the attention score.
[0067] In this embodiment, a typical time delay template vector is pre-constructed based on the guard interval length. The initial attention score is calculated by the dot product of the row vector and the template vector. A sparse attention weight matrix is generated by Top-K screening. The initial attention score is constrained by a target mask matrix constructed using historical time delay compensation values. The neighborhood radius is adaptively adjusted based on the mask ratio. Finally, the time delay compensation parameter vector is obtained by weighted summation. Resampling interpolation is performed in conjunction with the impulse response of the baseband shaping filter, which suppresses the interference of invalid time delay offsets on the attention score and ensures the stability of the output time delay compensation parameter vector, thus realizing time delay compensation for the RF baseband sampling point sequence.
Claims
1. A radio frequency communication delay compensation method based on data processing, characterized in that, The method includes: acquiring a sequence of radio frequency baseband sampling points; calculating a sequence of phase difference values between adjacent sampling points in the sequence; truncating and arranging the phase difference value sequence according to a set row width and overlap to generate a two-dimensional phase difference tensor; inputting the two-dimensional phase difference tensor into a sparse attention computation layer; generating a sparse attention weight matrix by calculating the dot product between each row vector in the two-dimensional phase difference tensor and several preset typical delay template vectors, wherein the typical delay template vectors are pre-constructed based on the guard interval length in the radio frequency communication protocol; using the sparse attention weight matrix to perform a weighted summation on the two-dimensional phase difference tensor to output a delay compensation parameter vector; and performing a resampling interpolation operation on the radio frequency baseband sampling point sequence according to the delay compensation parameter vector.
2. The radio frequency communication delay compensation method based on data processing according to claim 1, characterized in that, The step of calculating the phase difference sequence between adjacent sampling points in the RF baseband sampling point sequence includes: performing a fast Fourier transform on the RF baseband sampling point sequence to extract a frequency domain complex sequence; performing complex conjugate multiplication on each frequency point in the frequency domain complex sequence to extract the instantaneous phase value of each frequency point; arranging the instantaneous phase values in frequency index order to generate an initial phase sequence; and performing difference processing on adjacent frequency points in the initial phase sequence to remove the fixed phase slope introduced by the DC carrier frequency offset, thereby obtaining the phase difference sequence.
3. The radio frequency communication delay compensation method based on data processing according to claim 2, characterized in that, The step of truncating and arranging the phase difference sequence according to a set row width and overlap to generate a two-dimensional phase difference tensor includes: obtaining the symbol rate corresponding to the RF baseband sampling point sequence, multiplying the symbol rate by a preset oversampling factor to obtain the row width; obtaining the cyclic prefix length of the orthogonal frequency division multiplexing symbol defined in the RF communication protocol, dividing the cyclic prefix length by the oversampling factor and rounding down to obtain the overlap; and performing a sliding window truncation on the phase difference sequence according to the row width and the overlap, taking each truncated subsequence as a row of the two-dimensional phase difference tensor until the entire phase difference sequence has been traversed.
4. The radio frequency communication delay compensation method based on data processing according to claim 3, characterized in that, The typical delay template vector is pre-constructed based on the guard interval length in the radio frequency communication protocol, including: generating multiple discrete delay offsets within the sampling point range corresponding to the guard interval length according to a preset delay resolution; generating an initial vector consisting of all-one elements with a length equal to the column width of the two-dimensional phase difference tensor for each discrete delay offset; cyclically shifting the elements in the initial vector, the number of cyclic shift steps being equal to the number of sampling points corresponding to the discrete delay offset, and using the cyclically shifted initial vector as the typical delay template vector.
5. The radio frequency communication delay compensation method based on data processing according to claim 4, characterized in that, The step of generating a sparse attention weight matrix by calculating the dot product between each row vector in the two-dimensional phase difference tensor and a number of preset typical time delay template vectors includes: for the current row vector in the two-dimensional phase difference tensor, calculating the inner product between the current row vector and all the typical time delay template vectors to obtain an initial attention score set; applying an exponential operation to each initial attention score in the initial attention score set to obtain an exponential score set; selecting the top preset number of exponential scores with the largest values from the exponential score set, setting the unselected exponential scores to 0, and reorganizing the selected and zeroed set into the corresponding rows of the sparse attention weight matrix according to the arrangement order of the typical time delay template vectors.
6. The radio frequency communication delay compensation method based on data processing according to claim 5, characterized in that, The step of performing resampling interpolation on the RF baseband sampling point sequence based on the delay compensation parameter vector includes: performing mean pooling on all elements of the delay compensation parameter vector to obtain a global delay compensation scalar; subtracting the global delay compensation scalar from the timestamp of each sampling point in the RF baseband sampling point sequence to obtain a target interpolation time point; using the impulse response of a baseband shaping filter with a preset cutoff frequency as the interpolation kernel, extracting multiple sampling points on both sides of the target interpolation time point in the RF baseband sampling point sequence, and performing convolution operation between the interpolation kernel and the multiple sampling points to output the resampled RF baseband sampling point sequence.
7. The radio frequency communication delay compensation method based on data processing according to claim 2, characterized in that, Before removing the fixed phase slope introduced by the DC carrier frequency offset, the method further includes: extracting the difference between two adjacent instantaneous phase values in the initial phase sequence; determining whether the absolute value of the difference is greater than a preset phase jump threshold; if the absolute value of the difference is greater than the phase jump threshold, adding or subtracting twice pi to the instantaneous phase value located in the later position until the absolute value of the processed difference is less than or equal to the phase jump threshold; and recombining the instantaneous phase values after adding or subtracting twice pi to obtain the initial phase sequence after de-winding.
8. The radio frequency communication delay compensation method based on data processing according to claim 3, characterized in that, After taking each extracted subsequence as a row of the two-dimensional phase difference tensor, the method further includes: detecting whether the number of elements in the last row of the currently generated two-dimensional phase difference tensor is equal to the row width; if the number of elements in the last row is less than the row width, calculating the difference between the number of elements and the row width; extracting tail data with a length equal to the difference from the end of the phase difference sequence, flipping the tail data, and concatenating it to the end of the last row, so that the number of elements in all rows of the two-dimensional phase difference tensor is equal to the row width.
9. The radio frequency communication delay compensation method based on data processing according to claim 5, characterized in that, Before setting the unselected exponential scores to 0, the method further includes: constructing an initial mask matrix with the same dimension as the initial attention score set and all elements being 0 or 1; obtaining the historical delay compensation value of the previous sliding window truncation position corresponding to the current row vector in the two-dimensional phase difference tensor; calculating the absolute value of the difference between the historical delay compensation value and each discrete delay offset; setting the positions in the initial mask matrix corresponding to the absolute value of the difference being less than a preset neighborhood radius to 1, and keeping the positions in the initial mask matrix corresponding to the absolute value of the difference being greater than or equal to the neighborhood radius to 0, thereby generating a target mask matrix; and performing element-wise multiplication between the initial attention score set and the target mask matrix.
10. The radio frequency communication delay compensation method based on data processing according to claim 9, characterized in that, After generating the target mask matrix, the method further includes: extracting the number of elements with 1 in the target mask matrix; calculating the ratio of the number of elements to the total number of elements in the target mask matrix; determining whether the ratio is less than a preset lower threshold; if the ratio is less than the lower threshold, expanding the neighborhood radius and returning to the step of calculating the absolute value of the difference between the historical delay compensation value and each discrete delay offset, until the updated ratio is greater than or equal to the lower threshold, and using the finally obtained target mask matrix as the basis for performing the element-by-element multiplication step.