A method for interpolation compensation of digital sampling signals
By calculating the relative deviation after frequency deviation compensation and generating a temporary array, inputting it to the sinc core module for processing, it solves the problem that it is difficult to reproduce the real sampled signal in simple linear interpolation, and achieves high-precision interpolation compensation and reception performance improvement.
Patent Information
- Application Number
- CN202210834175.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-14
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-07-14
AI Technical Summary
In digital signal processing systems, simple linear interpolation is difficult to reproduce the real sampled signal, resulting in a degradation of reception performance.
A digital sampling signal interpolation compensation method is adopted to calculate the relative deviation before and after frequency deviation compensation, generate a temporary array and input it to the sinc core module for processing, thereby achieving high-precision interpolation compensation.
This method can ensure high precision and high reliability reduction interpolation, reproduce real sampled signals, and improve reception performance.
Smart Images

Figure CN115270072B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of digital signal processing systems, and in particular relates to an interpolation compensation method for digital sampling signals. Background Art
[0002] In digital signal systems, analog signals are usually converted to digital, sampled and analyzed at a specific frequency. In principle, the sampling frequencies of the transmitter and receiver must be consistent. If the crystal oscillator systems of both parties are biased, the sampling frequencies are inconsistent, and there is a certain deviation, the signal at the receiver will have a phase drift, serious distortion, and a serious decline in the reception performance of the demodulated signal. The crystal oscillator frequencies of many communication systems have errors of tens or even hundreds of ppm, and the minimum requirement to ensure the deviation tolerance of the system reception is within 0.1ppm. Such high requirements must ensure high accuracy of sampling deviation estimation. For example, although a digital signal with a wide bandwidth meets the requirements of the Nyquist sampling theorem, it is difficult to reproduce the real sampled signal if it is processed with simple linear interpolation or low-order polynomials, so the reception performance will be greatly reduced, and even normal reception cannot be performed when the signal-to-noise ratio is very high. Summary of the invention
[0003] The object of the present invention is to provide an interpolation compensation method for digital sampling signals, so as to solve the problem that simple linear interpolation is difficult to reproduce the real sampling signal.
[0004] In order to solve the above technical problems, the present invention provides an interpolation compensation method for a digital sampling signal, comprising the following steps:
[0005] 1) Obtain the digital sampling signal s0(n), calculate the relative deviation ε of the sampling rate before and after frequency offset compensation, and amplify the relative deviation ε with a magnification of 2 a , a is a positive integer;
[0006] 2) According to the sampling index n and amplification 2 a The relative deviation ε′ after multiplication is used to obtain the first relative sampling offset variable ε n , for the first relative sampling offset variable ε n The following calculation is performed to obtain the second relative sampling offset variable m: Where floor(·) is the floor rounding function, ceil(·) is the ceiling rounding function, and a temporary array x(k)=s0(j) is generated, where k=0,1,2,…,K-1, j=n+mK h ,…,n+m+K h , n from [K h , L] traverse the value, K h=floor(K / 2), K is the number of interpolation points, which is an odd number, and L represents the length of the data to be output;
[0007] 3) Set the first relative sampling offset variable ε n Zoom out 2 a times, and combined with the second relative sampling offset variable m and the quantization accuracy N of the sinc function, N = 2 b , and b is a positive integer, find the temporary integer variable ε nm ;
[0008] 4) Set the temporary array x(k), the number of interpolation points K, and the temporary integer variable ε nm The input is sent to the sinc core module for the following processing to obtain the sampling compensation output s(n):
[0009] ① According to the temporary integer variable ε nm , generate index value
[0010] ②Perform accumulation operation: The code table SincTable contains N*K elements, and the value of each element is obtained by the sinc function according to the quantization precision N;
[0011] ③According to the cumulative operation result, the sampling compensation output s(n) is obtained.
[0012] The beneficial effects are as follows: the present invention no longer uses simple linear interpolation, but uses a sinc core module to calculate several specific sinc values in advance and put them into a code table, and adopts table lookup and multiplication and accumulation to realize interpolation compensation, and does not need to calculate complex sinc functions in real time. When used, K values are read in sequence according to the addressing position to participate in weighting, which can ensure high-precision and high-reliability restoration interpolation and reproduce the real sampling signal; and the present invention determines the weighted input sampling data by simply calculating the relative offset variable according to the data of the acquired digital sampling signal, which is simple and fast to implement.
[0013] Further, in step 2), the first relative sampling offset variable ε n is: n =ε′*n.
[0014] The beneficial effect is: by calculating the first relative sampling offset variable ε n , to determine the weighted input sampling data, which is simple and fast to implement, thereby ensuring high-precision and high-reliability restoration interpolation and reproducing the real sampling signal.
[0015] Furthermore, when n<K h The input signal s0(n) is directly output without interpolation.
[0016] Furthermore, in step 3), the temporary integer variable ε nm is: nm =round((ε n / 2 a -m)*N), where round(·) is a function that rounds a value to a specified number of digits.
[0017] The beneficial effect is that by calculating the temporary integer variable ε nm , to determine the weighted input sampling data, which is simple and fast to implement, thereby ensuring high-precision and high-reliability restoration interpolation and reproducing the real sampling signal.
[0018] Furthermore, in step ② of step 4), the elements in the code table SincTable are: Among them, round(·) is a function that rounds the value to the specified number of digits, i=0,1,2,···,N-1, k=-K h ,…,K h , u is a positive integer; in step 4), the accumulated result is reduced by 2 u The sampling compensation output s(n) is obtained by multiplying the sampling compensation output s(n).
[0019] The beneficial effect is: using the sinc core module, first calculate a number of specific sinc values and put them into the code table, and then read K values in sequence according to the address position to participate in the weighting, without the need to calculate the complex sinc function in real time, and then reduce the accumulated result by 2 u The sampling compensation output s(n) is obtained by multiple times, which can ensure high-precision and high-reliability restoration interpolation and reproduce the real sampling signal.
[0020] Furthermore, the value range of a is 32≤a≤64.
[0021] The beneficial effects are as follows: the value range of a is 32≤a≤64, and the quantization accuracy in actual calculation can be guaranteed through a reasonable magnification factor, thereby ensuring high-precision and high-reliability restoration interpolation and reproducing the real sampling signal.
[0022] Furthermore, the value range of b is 5≤b≤7.
[0023] The beneficial effect is that the value range of b is 5≤b≤7, and the quantization accuracy in actual calculation can be guaranteed through a reasonable magnification factor, thereby ensuring high-precision and high-reliability restoration interpolation and reproducing the real sampling signal.
[0024] Furthermore, the value range of u is 12≤u≤20.
[0025] The beneficial effect is that the value range of u is 12≤u≤20, and the quantization accuracy in actual calculation can be guaranteed through a reasonable magnification factor, thereby ensuring high-precision and high-reliability restoration interpolation and reproducing the real sampling signal.
[0026] Furthermore, in step 1), the relative deviation ε of the sampling rate before and after frequency offset compensation is: Where Δf is the sampling deviation, F s is the sampling rate after frequency offset compensation.
[0027] Furthermore, the value range of K is 5≤K≤19.
[0028] The beneficial effect is that the value range of K is 5≤K≤19, which can ensure the accuracy of the sinc function in actual calculation, and thus ensure high-precision and high-reliability restoration interpolation to reproduce the real sampling signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flow chart of the interpolation compensation method of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0031] Embodiment of the interpolation compensation method of digital sampling signal:
[0032] The mathematical theoretical basis used in the method of the present invention is first introduced below.
[0033] Assume that the bandwidth of the sampled signal is B, the sampling deviation is Δf Hz, and the sampling rate before frequency offset compensation is F′ s , the restored sampling rate is F s , this is a known constant, and Δf<<F s (Here “<<” means much less than), then the relative deviation is
[0034]
[0035] Calculate constants in advance and After that, the engineering implementation needs to be fixed-point quantized, because F s Usually very large, the reciprocal must require the division module to have higher requirements in terms of accuracy and complexity, which greatly increases the design requirements of the division. Formula (1) can avoid the division operation, which is still very useful for specific engineering implementation. Assuming that the sampled signal is s0(n), n = 0, 1, 2, ..., the compensation scheme is as follows:
[0036] 1. Let n = K h , start the following steps to calculate. n<K h The input signal s0(n) is directly output without interpolation. h =K>>1, and round down, (the “>>” here is the right shift operation on the binary in computer language, and the following “>>” all have this meaning, here the K value is reduced by 2 1 The interpolation point number K ranges from 5≤K≤19 and is an odd number. The default value is 13.
[0037] 2. First, calculate the relative sampling offset variable as follows:
[0038] ε n =ε′*n (2)
[0039] Where ε′ is ε magnified by 2 a (the value range of a is 32≤a≤64 and a is a positive integer) times the relative sampling offset variable, ε n is the first relative sampling offset variable.
[0040]
[0041] Wherein, m is the second relative sampling offset variable, floor(·) is the floor rounding function, and ceil(·) is the ceiling rounding function.
[0042] Generate a temporary array:
[0043] x(k)=s0(j) (4)
[0044] Where k = 0, ..., K-1, j = n + mK h ,…,n+m+K h .
[0045] 3. Generate a temporary integer variable:
[0046] ε nm =round((ε n / 2 a -m)*N) (5)
[0047] Among them, round(·) is a function that rounds the value to a specified number of digits. Here, N is the approximate calculation quantization accuracy of the sinc function, that is, the accuracy of subdividing the interval [-0.5, 0.5) equally, N = 2 b , the value range of b is 5≤b≤7 and b is a positive integer, and the default value is N=32.
[0048] 4. Set the temporary array x(k), the number of interpolation points K and the temporary integer variable ε nmInput to the sinc core module to get the sampling compensation output s(n).
[0049] 5. Let n=n+1, and repeat steps 2, 3, and 4 until all the data that need to be interpolated are output.
[0050] The sinc core module is implemented by table lookup and multiplication and accumulation. The implementation steps are as follows:
[0051] ① The code table SincTable[N*K] is obtained in advance by the sinc function according to the quantization accuracy of N*K elements, with a 16-bit width and a sign. The specific calculation is based on the following formula:
[0052]
[0053] Where i = 0, 1, 2, ···, N-1, k = -K h ,…,K h , u has a value range of 12≤u≤20 and is an integer, and u is 15 as an example. The order of arrangement is i=0 to get K values, then i=1 to get K values, and so on N times to get N*K values, which are stored in the code table SincTable in sequence.
[0054] ②Use formula (5) to obtain the integer ε nm , generating the following index values,
[0055]
[0056] ③Let i=0, sum=0.
[0057] ④ Perform the following cumulative operation, namely
[0058] sum=sum+x(i)*SincTable[Index*K+i] (8)
[0059] ⑤Let i=i+1 and repeat step 4 until i=K-1.
[0060] ⑥Perform right shift operation on sum, that is
[0061] s=sum>>u (9)
[0062] ⑦s is the signal output after interpolation of the original sampling signal s0.
[0063] Based on the above theoretical foundation, the interpolation compensation method of the digital sampling signal of the present invention can be implemented. The method is described in detail below.
[0064] In the receiving device of the digital communication system, it is assumed that the sampling frequency F of the ADC analog-to-digital conversion s=25MHz, the sampling deviation is Δf Hz, the required output data length is L, and the sampling rate before frequency deviation compensation is F′ s =F s +Δf. In order to ensure the quantization accuracy as much as possible in engineering implementation, the following processing is uniformly magnified by 2 to the 48th power. Figure 1 As shown, the specific implementation steps are as follows:
[0065] 1. Quantify and amplify the extremely small number ε, that is, make an approximate calculation according to formula (1) and amplify it by 2 to the 48th power:
[0066] ε′=Δf*11258999-(((Δf*Δf)*120892582)>>28) (10)
[0067] 2. Let n = K h , start the following steps to calculate. n<K h The input signal s0(n) is directly output without interpolation processing.
[0068] 3. According to formula (2), we can get ε n , and then perform equivalent quantization amplification calculation according to formula (3), such as when ε>0:
[0069] m=(ε n +140737488355328)>>48 (11)
[0070] 4. According to the formula x(k)=s0(j), k=0,…,K-1, j=n+mK h ,…,n+m+K h , generate a temporary array x(k), k=0,…,K-1, the default value of K is 13.
[0071] 5. Due to ε n The temporary variable ε is generated according to formula (5) nm The following conversion is required:
[0072] ε nm =(ε n >>41)-(m<<7) (12)
[0073] The default value of N is 32. To improve accuracy, N=128. The "<<" here is a binary left shift operation in computer language, which means that the value of m is enlarged by 2. 7 times.
[0074] Let x(k), K and ε nm Input to the sinc core module to get the sampling compensation output s(n).
[0075] 6. Let n=n+1, and repeat steps 3, 4, and 5 until L interpolated data are output.
[0076] In summary, the present invention has the following characteristics:
[0077] The present invention no longer uses simple linear interpolation, but uses a sinc core module to calculate several specific sinc values in advance and put them into a code table, and adopts table lookup and multiplication and accumulation to realize interpolation compensation. It is not necessary to calculate complex sinc functions in real time. When used, K values are read in sequence according to the addressing position to participate in weighting, which can ensure high-precision and high-reliability restoration interpolation and reproduce the real sampling signal. Moreover, the present invention determines the weighted input sampling data by simply calculating the relative offset variable according to the data of the acquired digital sampling signal, and is simple and fast to realize.
Claims
1. A method for interpolation compensation of a digital sampling signal, characterized in that: The following steps are involved: 1) Obtain the digital sampling signal s0(n), calculate the relative deviation ε of the sampling rate before and after frequency offset compensation, and amplify the relative deviation ε with a magnification of 2 a , a is a positive integer; 2) According to the sampling index n and amplification 2 a The relative deviation ε′ after multiplication is used to obtain the first relative sampling offset variable ε n , for the first relative sampling offset variable ε n The following calculation is performed to obtain the second relative sampling offset variable m: Where floor(·) is the floor rounding function, ceil(·) is the ceiling rounding function, and a temporary array x(k)=s0(j) is generated, where k=0,1,2,…,K-1, j=n+mK h ,…,n+m+K h , n from [K h , L] traverse the value, K h =floor(K / 2), K is the number of interpolation points, which is an odd number, and L represents the length of the data to be output; 3) Set the first relative sampling offset variable ε n Zoom out 2 a times, and combined with the second relative sampling offset variable m and the quantization accuracy N of the sinc function, N = 2 b , and b is a positive integer, find the temporary integer variable ε nm ; 4) Set the temporary array x(k), the number of interpolation points K, and the temporary integer variable ε nm The input is sent to the sinc core module for the following processing to obtain the sampling compensation output s(n): ① According to the temporary integer variable ε nm , generate index value ②Perform accumulation operation: The code table SincTable contains N*K elements, and the value of each element is obtained by the sinc function according to the quantization precision N; ③According to the cumulative operation result, the sampling compensation output s(n) is obtained.
2. The interpolation compensation method for digital sampling signals according to claim 1, characterized in that: In step 2), the first relative sampling offset variable ε n is: n =ε′*n.
3. The interpolation compensation method for digital sampling signals according to claim 1, characterized in that: When n<K h The input signal s0(n) is directly output without interpolation.
4. The interpolation compensation method for digital sampling signals according to claim 1, characterized in that: In step 3), the temporary integer variable ε nm is: nm =round((ε n / 2 a -m)*N), where round(·) is a function that rounds a value to a specified number of digits.
5. The interpolation compensation method for digital sampling signals according to claim 1, characterized in that: In step ② of step 4), the elements in the code table SincTable are: Among them, round(·) is a function that rounds the value to the specified number of digits, i=0,1,2,···,N-1, k=-K h ,…,K h , u is a positive integer; in step 4), the accumulated result is reduced by 2 u The sampling compensation output s(n) is obtained by multiplying the sampling compensation output s(n).
6. The interpolation compensation method for digital sampling signals according to claim 1, characterized in that: The value range of a is 32≤a≤64.
7. The interpolation compensation method for digital sampling signals according to claim 1, characterized in that: The value range of b is 5≤b≤7.
8. The interpolation compensation method for digital sampling signals according to claim 5, characterized in that: The value range of u is 12≤u≤20.
9. The interpolation compensation method for digital sampling signals according to claim 1, characterized in that: In step 1), the relative deviation ε of the sampling rate before and after frequency offset compensation is: Where Δf is the sampling deviation, F s is the sampling rate after frequency offset compensation.
10. The interpolation compensation method for digital sampling signals according to claim 1, characterized in that: The value range of K is 5≤K≤19.
Citation Information
Patent Citations
Fast sinc interpolation method and system
CN107180014A
High-precision and low-hardware-complexity sinc interpolation realization method and system
CN107193784A