CN112565129A - Frequency offset compensation method and system - Google Patents

Frequency offset compensation method and system Download PDF

Info

Publication number
CN112565129A
CN112565129A CN202011422195.0A CN202011422195A CN112565129A CN 112565129 A CN112565129 A CN 112565129A CN 202011422195 A CN202011422195 A CN 202011422195A CN 112565129 A CN112565129 A CN 112565129A
Authority
CN
China
Prior art keywords
frequency offset
phase
initial phase
offset compensation
value
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.)
Pending
Application number
CN202011422195.0A
Other languages
Chinese (zh)
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.)
Shanghai Qingkun Information Technology Co Ltd
Original Assignee
Shanghai Qingkun Information Technology Co Ltd
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 Shanghai Qingkun Information Technology Co Ltd filed Critical Shanghai Qingkun Information Technology Co Ltd
Priority to CN202011422195.0A priority Critical patent/CN112565129A/en
Publication of CN112565129A publication Critical patent/CN112565129A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L27/00Modulated-carrier systems
    • H04L27/0014Carrier regulation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L27/00Modulated-carrier systems
    • H04L27/0014Carrier regulation
    • H04L2027/0024Carrier regulation at the receiver end
    • H04L2027/0026Correction of carrier offset

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Complex Calculations (AREA)

Abstract

The invention provides a frequency offset compensation method and a system, wherein the method comprises the following steps: acquiring a signal sampling frequency and a frequency offset initial phase parameter; calculating the signal sampling rate and the frequency offset initial phase parameter to obtain an initial phase and frequency offset compensation value of the signal; performing phase accumulation calculation on the initial phase and the frequency offset compensation value to obtain a phase accumulation value; performing coordinate rotation digital calculation on the phase accumulated value and input data of corresponding signals to obtain compensated waveform data; and obtaining output data according to the compensated waveform data. The scheme has the advantages of less required storage resources, lower power consumption and capability of realizing higher frequency offset compensation precision.

Description

Frequency offset compensation method and system
Technical Field
The present invention relates to the field of wireless communication technologies, and in particular, to a frequency offset compensation method and system.
Background
In a wireless communication system, it is often necessary to compensate the received signal for frequency offset, e.g. at a signal sampling rate fsFrequency offset to be compensated is f0The received signal is x (k) (0, 1.. n), and the frequency offset-compensated signal is y (k) (x, y are complex numbers), then y (k) × (cos (f0/fs × 2 × pi (k-1)) +1i × sin (f0/fs 2 × pi (k-1))), wherein k ═ 1,2, 3 … n; equivalent to seeThe method comprises the following steps: y (k) ═ x (cos (delta) +1i × sin (delta)), where k ═ 1, … n, and delta is between 0 and 2 × pi. Common frequency offset compensation methods include a table lookup method, a coordinate rotation digital calculation method, a secondary table lookup method and the like, and a signal after frequency offset compensation can be obtained by searching a stored cos table and a sin table.
However, in order to implement high-precision frequency offset compensation, the table lookup method needs to store a relatively large table, and occupies a lot of resources; the coordinate rotation digital calculation method can increase time delay, and in order to realize higher precision, the iteration times are required to be larger, and the power consumption is also increased; the compromise scheme in the secondary table look-up method can better balance the storage space and the power consumption, but after the secondary table look-up, complex multiplication needs to be performed for one more time, certain resources can be consumed, the performance is also influenced by the size of the secondary table look-up, and the high precision is difficult to achieve. Therefore, a frequency offset compensation method with less memory resources, lower power consumption and higher compensation precision is needed.
Disclosure of Invention
The invention aims to provide a frequency offset compensation method and a frequency offset compensation system, which have the advantages of less required storage resources, lower power consumption and capability of realizing higher frequency offset compensation precision.
The technical scheme provided by the invention is as follows:
the invention provides a frequency offset compensation method, which comprises the following steps:
acquiring a signal sampling frequency and a frequency offset initial phase parameter;
calculating the signal sampling rate and the frequency offset initial phase parameter to obtain an initial phase and frequency offset compensation value of the signal;
performing phase accumulation calculation on the initial phase and the frequency offset compensation value to obtain a phase accumulation value;
performing coordinate rotation digital calculation on the phase accumulated value and input data of corresponding signals to obtain compensated waveform data;
and obtaining output data according to the compensated waveform data.
Specifically, when performing frequency offset compensation, for example, the signal sampling rate is fsFrequency offset to be compensated is f0ReceivingThe signal is x (k) (0, 1.. n), and the signal after frequency offset compensation is y (k) (x, y are complex numbers), then y (k) × x (cos (f0/fs 2 × pi (k-1)) +1i × sin (f0/fs 2 × pi (k-1))), wherein k ═ 1,2, 3 … n; the equivalence is regarded as: y (k) ═ x (cos (delta) +1i × sin (delta)), where k ═ 1, … n, and delta is between 0 and 2 × pi.
The data can be directly rotated by a CORDIC through a delta angle, and the rotation angle of the CORDIC after finite iteration is 1, the residual angle is delta2, and delta is 1+ delta 2; let x2 be x (cos (delta1+1i sin (delta 1)), then y be x2(cos (delta2) +1i sin (delta 2)) that we need to require, because delta2 is small, then approximate values can be obtained, cos (delta2) 1, sin (delta2) delta2, and further,
real(y)=real(x2)-delta2*imag(x2);
imag(y)=imag(x2)+delta2*real(x2);
for any angle a, 0 ≦ a <2 × pi, which may be written as a ≦ b + m × pi/2, where 0 ≦ b < pi/2, and m is a number from 0 to 3. Then cos (a) cos (b + m pi/2); for m ═ 0, cos (a) cos (b); m ═ 1, cos (a) ═ -sin (b); by analogy, cos (a) can always be expressed as the result of the positive cosine value of b and the negative sign of the positive cosine value. Similarly, sin (a) may also be expressed such that we can translate the calculation of angular sine-cosine values in the range of 0-2 x pi into a result that only calculates the range of 0-pi/2. Therefore, the rotation of 0-2 pi at any angle can be converted into the rotation within 0-pi/2, and then the rotation is obtained through a conversion formula.
Based on the transformation process, the initial phase and frequency offset compensation values of the signals can be obtained through calculation of the signal sampling frequency and the frequency offset initial phase parameters, phase accumulation calculation is carried out on the initial phase and frequency offset compensation values, a phase accumulated value can be obtained, one phase accumulated value is output every time the phase accumulated value is accumulated, coordinate rotation digital calculation is carried out on the phase accumulated value and input data of the signals, compensated waveform data can be obtained, and output data can be obtained according to the compensated waveform data. The initial value after compensation can be obtained by directly carrying out coordinate rotation digital calculation on the input data of the phase accumulated value and the signal, and the process has no multiplier and only addition and displacement, so that resources are saved, meanwhile, the rotation of any angle of 0-2 x pi is converted into the rotation within 0-pi/2, and then the rotation is obtained by a transformation formula, so that the operation amount is not required to be increased, the convergence of the coordinate rotation digital calculation is ensured, and higher frequency offset compensation precision can be realized.
Further, the calculating the signal sampling rate and the frequency offset initial phase parameter to obtain the initial phase and frequency offset compensation value of the signal specifically includes:
judging whether to calculate by utilizing the frequency offset initial phase parameter or not by pre-inputting a FreshFlag parameter;
if not, the calculation is terminated;
if the frequency offset initial phase parameter is judged to be the 32-bit unsigned initial phase, calculating the frequency offset initial phase parameter to obtain a normalized 32-bit unsigned initial phase and a normalized 32-bit unsigned frequency offset compensation value.
The pre-input FreshFlag parameter refers to a judgment parameter given by software according to whether the current input frequency offset compensation value is consistent with the last input frequency offset compensation value, when the current input frequency offset compensation value is consistent with the last input frequency offset compensation value, FreshFlag is 0, which indicates that the frequency offset compensation value is not changed, and the FreshFlag parameter can be continuously calculated by using the previous initial phase and frequency offset compensation value; when the currently input frequency offset compensation value is inconsistent with the last input frequency offset compensation value, the FreshFlag is 1, which indicates that the frequency offset compensation value changes, and a new initial phase and frequency offset compensation value are needed to be used for calculation.
Further, the performing phase accumulation calculation on the initial phase and the frequency offset compensation value to obtain a phase accumulation value specifically includes:
judging whether to refresh the initial phase and the frequency offset compensation value or not by pre-inputting FreshFlag parameters;
if not, not refreshing the initial phase and the frequency offset compensation value, continuing to perform phase accumulation calculation according to the historical initial phase and the frequency offset compensation value, and outputting one phase accumulation value every time the phase accumulation value is accumulated;
if the frequency offset compensation value is judged to be the initial phase, phase accumulation calculation is carried out according to the updated initial phase and the updated frequency offset compensation value, and one phase accumulation value is output every time the phase accumulation value is accumulated.
Further, the performing coordinate rotation digital calculation on the phase accumulated value and the input data of the corresponding signal to obtain compensated waveform data specifically includes:
iteratively calculating the phase accumulation value and the input data by coordinate rotation digital calculation;
and after the iteration is finished, updating the input data to obtain the compensated waveform data.
Further, the obtaining output data according to the compensated waveform data specifically includes:
calibrating the compensated waveform data;
and calculating to obtain the output data after frequency offset compensation according to the calibrated waveform data.
In addition, the present invention also provides a frequency offset compensation system, comprising:
the register is used for configuring signal sampling frequency and initial phase offset parameters;
the initial phase frequency offset calculator is connected with the register and used for receiving the signal sampling rate and the frequency offset initial phase parameters input by the register and calculating the signal sampling rate and the frequency offset initial phase parameters to obtain an initial phase of a signal and a frequency offset compensation value;
the phase accumulator is connected with the initial phase frequency offset calculator and used for receiving the initial phase and the frequency offset compensation value input by the initial phase frequency offset calculator and receiving input data of signals, and performing phase accumulation calculation on the initial phase and the frequency offset compensation value to obtain a phase accumulation value corresponding to the input data;
the CORDIC arithmetic unit is connected with the phase accumulator and used for receiving the input data input by the phase accumulator and the corresponding phase accumulated value, and performing coordinate rotation digital calculation on the phase accumulated value and the input data of the signals to obtain compensated waveform data;
and the approximate calibrator is connected with the CORDIC arithmetic unit and used for obtaining output data according to the compensated waveform data.
According to the scheme, the initial phase frequency offset calculator is used for calculating the signal sampling frequency and the initial phase frequency offset parameter, the initial phase and frequency offset compensation value of the signal can be obtained, the initial phase and frequency offset compensation value is subjected to phase accumulation calculation through the phase accumulator, a phase accumulated value can be obtained, one phase accumulated value is output once accumulated, coordinate rotation digital calculation is carried out on the phase accumulated value and input data of the signal through the CORDIC arithmetic unit, compensated waveform data can be obtained, and output data can be obtained through the approximate calibrator according to the compensated waveform data. The initial value after compensation can be obtained by directly carrying out coordinate rotation digital calculation on the input data of the phase accumulated value and the signal, and the process has no multiplier and only addition and displacement, so that resources are saved, meanwhile, the rotation of any angle of 0-2 x pi is converted into the rotation within 0-pi/2, and then the rotation is obtained by a transformation formula, so that the operation amount is not required to be increased, the convergence of the coordinate rotation digital calculation is ensured, and higher frequency offset compensation precision can be realized.
Further, the initial phase frequency offset calculator judges whether to use the initial phase frequency offset parameter for calculation or not by pre-inputting a FreshFlag parameter;
if not, the calculation is terminated;
if the frequency offset initial phase parameter is judged to be the 32-bit unsigned initial phase, calculating the frequency offset initial phase parameter to obtain a normalized 32-bit unsigned initial phase and a normalized 32-bit unsigned frequency offset compensation value.
Further, the phase accumulator judges whether to refresh the initial phase and the frequency offset compensation value or not by pre-inputting a FreshFlag parameter;
if not, not refreshing the initial phase and the frequency offset compensation value, continuing to perform phase accumulation calculation according to the historical initial phase and the frequency offset compensation value, and outputting one phase accumulation value every time the phase accumulation value is accumulated;
if the frequency offset compensation value is judged to be the initial phase, phase accumulation calculation is carried out according to the updated initial phase and the updated frequency offset compensation value, and one phase accumulation value corresponding to the input data is output every time the phase accumulation value is accumulated.
Further, the CORDIC operator performs iterative computation on the phase accumulated value and the input data through coordinate rotation digital computation, and updates the input data after the iteration is completed to obtain the compensated waveform data.
Further, the approximate calibrator calibrates the compensated waveform data, and calculates and obtains the output data after frequency offset compensation according to the calibrated waveform data.
According to the frequency offset compensation method and system provided by the invention, the initial phase and frequency offset compensation values of the signals can be obtained through calculation of the signal sampling frequency and the initial phase and frequency offset parameters, then the initial phase and frequency offset compensation values are subjected to phase accumulation calculation, a phase accumulated value can be obtained, one phase accumulated value is output every time the phase accumulated value is accumulated, the phase accumulated value and input data of the signals are subjected to coordinate rotation digital calculation, compensated waveform data can be obtained, and output data can be obtained according to the compensated waveform data. The initial value after compensation can be obtained by directly carrying out coordinate rotation digital calculation on the input data of the phase accumulated value and the signal, and the process has no multiplier and only addition and displacement, so that resources are saved, meanwhile, the rotation of any angle of 0-2 x pi is converted into the rotation within 0-pi/2, and then the rotation is obtained by a transformation formula, so that the operation amount is not required to be increased, the convergence of the coordinate rotation digital calculation is ensured, and higher frequency offset compensation precision can be realized.
Drawings
The foregoing features, technical features, advantages and embodiments of the present invention will be further explained in the following detailed description of the preferred embodiments, which is to be read in connection with the accompanying drawings.
FIG. 1 is a schematic overall flow diagram of an embodiment of the present invention;
FIG. 2 is a block diagram of a CORDIC operator according to an embodiment of the present invention;
FIG. 3 is a block diagram of an approximate calibrator according to an embodiment of the present invention;
fig. 4 is a schematic system structure according to an embodiment of the present invention.
Reference numbers in the figures: 1-a register; 2-initial phase frequency offset calculator; 3-phase accumulator 3; 4-CORDIC operator; 5-approximate calibrator.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product. In addition, in order to make the drawings concise and understandable, components having the same structure or function in some of the drawings are only schematically illustrated or only labeled. In this document, "one" means not only "only one" but also a case of "more than one".
Example 1
One embodiment of the present invention, as shown in fig. 1, provides a frequency offset compensation method, including the steps of:
and S1, acquiring a signal sampling frequency and a frequency offset initial phase parameter.
Specifically, when performing frequency offset compensation, for example, the signal sampling rate is fsFrequency offset to be compensated is f0The received signal is x (k) (0, 1.. n), and the frequency offset-compensated signal is y (k) (x, y are complex numbers), then y (k) × (cos (f0/fs × 2 × pi (k-1)) +1i × sin (f0/fs 2 × pi (k-1))), wherein k ═ 1,2, 3 … n; the equivalence is regarded as: y (k) ═ x (cos (delta) +1i × sin (delta)), where k ═ 1, … n, and delta is between 0 and 2 × pi.
The data can be directly rotated by delta angle through CORDIC (coordinate rotation digital computation), and the rotation angle of CORDIC after finite iteration is 1, the residual angle is delta2, and delta is 1+ delta 2; let x2 be x (cos (delta1+1i sin (delta 1)), then y be x2(cos (delta2) +1i sin (delta 2)) that we need to require, because delta2 is small, then approximate values can be obtained, cos (delta2) 1, sin (delta2) delta2, and further,
real(y)=real(x2)-delta2*imag(x2);
imag(y)=imag(x2)+delta2*real(x2);
for any angle a, 0 ≦ a <2 × pi, which may be written as a ≦ b + m × pi/2, where 0 ≦ b < pi/2, and m is a number from 0 to 3. Then cos (a) cos (b + m pi/2); for m ═ 0, cos (a) cos (b); m ═ 1, cos (a) ═ -sin (b); by analogy, cos (a) can always be expressed as the result of the positive cosine value of b and the negative sign of the positive cosine value. Similarly, sin (a) may also be expressed such that we can translate the calculation of angular sine-cosine values in the range of 0-2 x pi into a result that only calculates the range of 0-pi/2. Therefore, the rotation of 0-2 pi at any angle can be converted into the rotation within 0-pi/2, and then the rotation is obtained through a conversion formula.
And S2, calculating the signal sampling frequency and the initial phase offset parameter to obtain the initial phase and the frequency offset compensation value of the signal.
Preferably, the calculating the signal sampling frequency and the initial phase offset parameter to obtain the initial phase and the initial phase offset compensation value of the signal specifically includes:
judging whether to calculate by using a frequency offset initial phase parameter or not by pre-inputting a FreshFlag parameter; if not, the calculation is terminated; if the frequency offset compensation value is judged to be yes, calculating the frequency offset initial phase parameter to obtain a 32-bit unsigned initial phase and a normalized 32-bit unsigned frequency offset compensation value. The normalization mode is as follows: and a frequency offset compensation value (f0_ delta ═ round (f0/fs ^ 2^ 32)).
The pre-input FreshFlag parameter refers to a judgment parameter given by software according to whether the current input frequency offset compensation value is consistent with the last input frequency offset compensation value, when the current input frequency offset compensation value is consistent with the last input frequency offset compensation value, FreshFlag is 0, which indicates that the frequency offset compensation value is not changed, and the FreshFlag parameter can be continuously calculated by using the previous initial phase and frequency offset compensation value; when the currently input frequency offset compensation value is inconsistent with the last input frequency offset compensation value, the FreshFlag is 1, which indicates that the frequency offset compensation value changes, and a new initial phase and frequency offset compensation value are needed to be used for calculation.
And S3, performing phase accumulation calculation on the initial phase and frequency offset compensation values to obtain a phase accumulated value.
Preferably, the phase accumulation calculation is performed on the initial phase and frequency offset compensation values to obtain a phase accumulation value, and the method specifically includes:
judging whether to refresh an initial phase and a frequency offset compensation value or not by pre-inputting a FreshFlag parameter; if not, not refreshing the initial phase and frequency offset compensation values, continuously performing phase accumulation calculation according to the historical initial phase and frequency offset compensation values, and outputting one phase accumulation value every time the phase accumulation is performed; if the frequency offset compensation value is judged to be the initial phase, phase accumulation calculation is carried out according to the updated initial phase and the updated frequency offset compensation value, and a phase accumulation value is output every time the phase accumulation is carried out.
And S4, performing coordinate rotation digital calculation on the phase accumulated value and the input data of the corresponding signals to obtain compensated waveform data.
And S5, obtaining output data according to the compensated waveform data.
Based on the transformation process, the initial phase and frequency offset compensation values of the signals can be obtained through calculation of the signal sampling frequency and the frequency offset initial phase parameters, phase accumulation calculation is carried out on the initial phase and frequency offset compensation values, a phase accumulated value can be obtained, one phase accumulated value is output every time the phase accumulated value is accumulated, coordinate rotation digital calculation is carried out on the phase accumulated value and input data of the signals, compensated waveform data can be obtained, and output data can be obtained according to the compensated waveform data. The initial value after compensation can be obtained by directly carrying out coordinate rotation digital calculation on the input data of the phase accumulated value and the signal, and the process has no multiplier and only addition and displacement, so that resources are saved, meanwhile, the rotation of any angle of 0-2 x pi is converted into the rotation within 0-pi/2, and then the rotation is obtained by a transformation formula, so that the operation amount is not required to be increased, the convergence of the coordinate rotation digital calculation is ensured, and higher frequency offset compensation precision can be realized.
Example 2
In an embodiment of the present invention, on the basis of embodiment 1, coordinate rotation digital calculation is performed on the phase accumulated value and input data of a corresponding signal to obtain compensated waveform data, and the method specifically includes: iterative computation is carried out on the phase accumulated value and the input data through coordinate rotation digital computation; after the iteration is completed, the input data is updated to obtain compensated waveform data.
Specifically, as shown in fig. 2, in this embodiment, coordinate rotation number calculation is performed by the CORDIC arithmetic unit, the index Findex is the highest 2 bits of delta (i.e., the 30 th to 32 th bits of delta), z (i) is the lower 30 bits of delta (i.e., the 1 st to 29 th bits of delta), x1(i) is real (x), x2(i) is imag (x), antext is a stored atan table, the number of iterations is 8, and CORDIC calculation is performed.
If z (i) ═ 0, then x1(i +1) ═ x1(i), x2(i +1) ═ x2(i), jumps out of the iteration. Otherwise d sign (z (i)), x1(i +1) ═ x1(i) -d (x2(i) > > i-1); x2(i +1) ═ x2(i) + d (x1(i) > > i-1); z (i +1) ═ z (i) -d atantext (i); when the iteration is performed i times, after the iteration is completed, the compensated x is x1(i +1) +1i x2(i +1), and index2 is z (i + 1).
Preferably, obtaining the output data according to the compensated waveform data specifically includes: calibrating the compensated waveform data; and calculating to obtain output data after frequency offset compensation according to the calibrated waveform data.
Specifically, as shown in fig. 3, in this embodiment, the approximate calibrator is used to perform calibration, and the compensated x and z are input to the approximate calibrator:
x1_re=real(x)-imag(x)*index2;
x1_im=imag(x)+real(x)*index2;
then, the calibrated x-x 1_ re +1i x1_ im can be calculated to obtain the output data after frequency offset compensation according to the calibrated waveform data and the index Findex.
Example 3
In an embodiment of the present invention, as shown in fig. 4, the present invention further provides a frequency offset compensation system, which includes a register 1, an initial phase offset calculator 2, a phase accumulator 3, a CORDIC operator 4, and an approximate calibrator 5.
The register 1 is used for configuring the signal sampling frequency and the initial phase offset parameter.
Specifically, when performing frequency offset compensation, for example, the signal sampling rate is fsFrequency offset to be compensated is f0The received signal is x (k) (0, 1.. n), and the frequency offset-compensated signal is y (k) (x, y are complex numbers), then y (k) × (cos (f0/fs × 2 × pi (k-1)) +1i × sin (f0/fs 2 × pi (k-1))), wherein k ═ 1,2, 3 … n; the equivalence is regarded as: y (k) ═ x (cos (delta) +1i × sin (delta)), where k ═ 1, … n, and delta is between 0 and 2 × pi.
The data can be directly rotated by delta angle through CORDIC (coordinate rotation digital computation), and the rotation angle of CORDIC after finite iteration is 1, the residual angle is delta2, and delta is 1+ delta 2; let x2 be x (cos (delta1+1i sin (delta 1)), then y be x2(cos (delta2) +1i sin (delta 2)) that we need to require, because delta2 is small, then approximate values can be obtained, cos (delta2) 1, sin (delta2) delta2, and further,
real(y)=real(x2)-delta2*imag(x2);
imag(y)=imag(x2)+delta2*real(x2);
for any angle a, 0 ≦ a <2 × pi, which may be written as a ≦ b + m × pi/2, where 0 ≦ b < pi/2, and m is a number from 0 to 3. Then cos (a) cos (b + m pi/2); for m ═ 0, cos (a) cos (b); m ═ 1, cos (a) ═ -sin (b); by analogy, cos (a) can always be expressed as the result of the positive cosine value of b and the negative sign of the positive cosine value. Similarly, sin (a) may also be expressed such that we can translate the calculation of angular sine-cosine values in the range of 0-2 x pi into a result that only calculates the range of 0-pi/2. Therefore, the rotation of 0-2 pi at any angle can be converted into the rotation within 0-pi/2, and then the rotation is obtained through a conversion formula.
The initial phase frequency offset calculator 2 is connected with the register 1, and is configured to receive the signal sampling frequency and the initial phase offset parameter input by the register 1, and calculate the signal sampling frequency and the initial phase offset parameter to obtain an initial phase of the signal and a frequency offset compensation value.
Preferably, the initial phase frequency offset calculator 2 judges whether to calculate by using the frequency offset initial phase parameter by pre-inputting the FreshFlag parameter; if not, the calculation is terminated; if the frequency offset compensation value is judged to be yes, calculating the frequency offset initial phase parameter to obtain a 32-bit unsigned initial phase and a normalized 32-bit unsigned frequency offset compensation value. The normalization mode is as follows: and a frequency offset compensation value (f0_ delta ═ round (f0/fs ^ 2^ 32)).
The pre-input FreshFlag parameter refers to a judgment parameter given by software according to whether the current input frequency offset compensation value is consistent with the last input frequency offset compensation value, when the current input frequency offset compensation value is consistent with the last input frequency offset compensation value, FreshFlag is 0, which indicates that the frequency offset compensation value is not changed, and the FreshFlag parameter can be continuously calculated by using the previous initial phase and frequency offset compensation value; when the currently input frequency offset compensation value is inconsistent with the last input frequency offset compensation value, the FreshFlag is 1, which indicates that the frequency offset compensation value changes, and a new initial phase and frequency offset compensation value are needed to be used for calculation.
The phase accumulator 3 is connected to the initial phase frequency offset calculator 2, and is configured to receive the initial phase and frequency offset compensation value input by the initial phase frequency offset calculator 2 and input data of the received signal, and perform phase accumulation calculation on the initial phase and frequency offset compensation value to obtain a phase accumulation value corresponding to the input data.
Preferably, the phase accumulator 3 judges whether to refresh the initial phase and frequency offset compensation value by pre-inputting the FreshFlag parameter; if not, not refreshing the initial phase and frequency offset compensation values, continuously performing phase accumulation calculation according to the historical initial phase and frequency offset compensation values, and outputting one phase accumulation value every time the phase accumulation is performed; if the frequency offset compensation value is judged to be the initial phase, phase accumulation calculation is carried out according to the updated initial phase and the updated frequency offset compensation value, and a phase accumulation value corresponding to input data is output every time the phase accumulation value is accumulated.
The CORDIC arithmetic unit 4 is connected to the phase accumulator 3, and is configured to receive input data input by the phase accumulator and a corresponding phase accumulated value, and perform coordinate rotation digital calculation on the phase accumulated value and the input data of the signal to obtain compensated waveform data.
Preferably, the CORDIC operator performs iterative computation on the phase accumulated value and the input data through coordinate rotation digital computation, and updates the input data after the iteration is completed to obtain compensated waveform data.
Specifically, as shown in fig. 2, in this embodiment, coordinate rotation number calculation is performed by the CORDIC arithmetic unit, the index Findex is the highest 2 bits of delta (i.e., the 30 th to 32 th bits of delta), z (i) is the lower 30 bits of delta (i.e., the 1 st to 29 th bits of delta), x1(i) is real (x), x2(i) is imag (x), antext is a stored atan table, the number of iterations is 8, and CORDIC calculation is performed.
If z (i) ═ 0, then x1(i +1) ═ x1(i), x2(i +1) ═ x2(i), jumps out of the iteration. Otherwise d sign (z (i)), x1(i +1) ═ x1(i) -d (x2(i) > > i-1); x2(i +1) ═ x2(i) + d (x1(i) > > i-1); z (i +1) ═ z (i) -d atantext (i); when the iteration is performed i times, after the iteration is completed, the compensated x is x1(i +1) +1i x2(i +1), and index2 is z (i + 1).
The approximate calibrator 5 is connected to the CORDIC operator 4 for obtaining output data from the compensated waveform data.
Preferably, the approximate calibrator 5 calibrates the compensated waveform data, and calculates and obtains output data after frequency offset compensation according to the calibrated waveform data.
Specifically, as shown in fig. 3, in this embodiment, the approximate calibrator is used to perform calibration, and the compensated x and z are input to the approximate calibrator:
x1_re=real(x)-imag(x)*index2;
x1_im=imag(x)+real(x)*index2;
then, the calibrated x-x 1_ re +1i x1_ im can be calculated to obtain the output data after frequency offset compensation according to the calibrated waveform data and the index Findex.
According to the scheme, the initial phase frequency offset calculator is used for calculating the signal sampling frequency and the initial phase frequency offset parameter, the initial phase and frequency offset compensation value of the signal can be obtained, the initial phase and frequency offset compensation value is subjected to phase accumulation calculation through the phase accumulator, a phase accumulated value can be obtained, one phase accumulated value is output once accumulated, coordinate rotation digital calculation is carried out on the phase accumulated value and input data of the signal through the CORDIC arithmetic unit, compensated waveform data can be obtained, and output data can be obtained through the approximate calibrator according to the compensated waveform data. The initial value after compensation can be obtained by directly carrying out coordinate rotation digital calculation on the input data of the phase accumulated value and the signal, and the process has no multiplier and only addition and displacement, so that resources are saved, meanwhile, the rotation of any angle of 0-2 x pi is converted into the rotation within 0-pi/2, and then the rotation is obtained by a transformation formula, so that the operation amount is not required to be increased, the convergence of the coordinate rotation digital calculation is ensured, and higher frequency offset compensation precision can be realized.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method of frequency offset compensation, comprising the steps of:
acquiring a signal sampling frequency and a frequency offset initial phase parameter;
calculating the signal sampling rate and the frequency offset initial phase parameter to obtain an initial phase and frequency offset compensation value of the signal;
performing phase accumulation calculation on the initial phase and the frequency offset compensation value to obtain a phase accumulation value;
performing coordinate rotation digital calculation on the phase accumulated value and input data of corresponding signals to obtain compensated waveform data;
and obtaining output data according to the compensated waveform data.
2. The method of claim 1, wherein the calculating the signal sampling rate and the frequency offset initial phase parameter to obtain an initial phase and a frequency offset compensation value of the signal specifically includes:
judging whether to calculate by utilizing the frequency offset initial phase parameter or not by pre-inputting a FreshFlag parameter;
if not, the calculation is terminated;
if the frequency offset initial phase parameter is judged to be the 32-bit unsigned initial phase, calculating the frequency offset initial phase parameter to obtain a normalized 32-bit unsigned initial phase and a normalized 32-bit unsigned frequency offset compensation value.
3. The method of claim 1, wherein the performing phase accumulation calculation on the initial phase and the frequency offset compensation value to obtain a phase accumulation value specifically comprises:
judging whether to refresh the initial phase and the frequency offset compensation value or not by pre-inputting FreshFlag parameters;
if not, not refreshing the initial phase and the frequency offset compensation value, continuing to perform phase accumulation calculation according to the historical initial phase and the frequency offset compensation value, and outputting one phase accumulation value every time the phase accumulation value is accumulated;
if the frequency offset compensation value is judged to be the initial phase, phase accumulation calculation is carried out according to the updated initial phase and the updated frequency offset compensation value, and one phase accumulation value is output every time the phase accumulation value is accumulated.
4. The frequency offset compensation method of claim 1, wherein the performing coordinate rotation digital computation on the phase accumulation value and the input data of the corresponding signal to obtain compensated waveform data specifically comprises:
iteratively calculating the phase accumulation value and the input data by coordinate rotation digital calculation;
and after the iteration is finished, updating the input data to obtain the compensated waveform data.
5. The method of claim 1, wherein the obtaining output data according to the compensated waveform data specifically includes:
calibrating the compensated waveform data;
and calculating to obtain the output data after frequency offset compensation according to the calibrated waveform data.
6. A frequency offset compensation system, comprising:
the register is used for configuring signal sampling frequency and initial phase offset parameters;
the initial phase frequency offset calculator is connected with the register and used for receiving the signal sampling rate and the frequency offset initial phase parameters input by the register and calculating the signal sampling rate and the frequency offset initial phase parameters to obtain an initial phase of a signal and a frequency offset compensation value;
the phase accumulator is connected with the initial phase frequency offset calculator and used for receiving the initial phase and the frequency offset compensation value input by the initial phase frequency offset calculator and receiving input data of signals, and performing phase accumulation calculation on the initial phase and the frequency offset compensation value to obtain a phase accumulation value corresponding to the input data;
the CORDIC arithmetic unit is connected with the phase accumulator and used for receiving the input data input by the phase accumulator and the corresponding phase accumulated value, and performing coordinate rotation digital calculation on the phase accumulated value and the input data of the signals to obtain compensated waveform data;
and the approximate calibrator is connected with the CORDIC arithmetic unit and used for obtaining output data according to the compensated waveform data.
7. The frequency offset compensation system of claim 6, wherein: the initial phase frequency offset calculator judges whether to use the frequency offset initial phase parameter for calculation or not by pre-inputting a FreshFlag parameter;
if not, the calculation is terminated;
if the frequency offset initial phase parameter is judged to be the 32-bit unsigned initial phase, calculating the frequency offset initial phase parameter to obtain a normalized 32-bit unsigned initial phase and a normalized 32-bit unsigned frequency offset compensation value.
8. The frequency offset compensation system of claim 6, wherein: the phase accumulator judges whether to refresh the initial phase and the frequency offset compensation value or not through pre-inputting FreshFlag parameters;
if not, not refreshing the initial phase and the frequency offset compensation value, continuing to perform phase accumulation calculation according to the historical initial phase and the frequency offset compensation value, and outputting one phase accumulation value every time the phase accumulation value is accumulated;
if the frequency offset compensation value is judged to be the initial phase, phase accumulation calculation is carried out according to the updated initial phase and the updated frequency offset compensation value, and one phase accumulation value corresponding to the input data is output every time the phase accumulation value is accumulated.
9. The frequency offset compensation system of claim 6, wherein: and the CORDIC arithmetic unit carries out iterative computation on the phase accumulated value and the input data through coordinate rotation digital computation, updates the input data after the iteration is finished, and obtains the compensated waveform data.
10. The frequency offset compensation system of claim 6, wherein: and the approximate calibrator calibrates the compensated waveform data, and calculates and obtains the output data after frequency offset compensation according to the calibrated waveform data.
CN202011422195.0A 2020-12-08 2020-12-08 Frequency offset compensation method and system Pending CN112565129A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011422195.0A CN112565129A (en) 2020-12-08 2020-12-08 Frequency offset compensation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011422195.0A CN112565129A (en) 2020-12-08 2020-12-08 Frequency offset compensation method and system

Publications (1)

Publication Number Publication Date
CN112565129A true CN112565129A (en) 2021-03-26

Family

ID=75059657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011422195.0A Pending CN112565129A (en) 2020-12-08 2020-12-08 Frequency offset compensation method and system

Country Status (1)

Country Link
CN (1) CN112565129A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651725A (en) * 2011-02-25 2012-08-29 中兴通讯股份有限公司 Multi-user frequency offset compensation method and device
CN104092642A (en) * 2014-07-30 2014-10-08 东南大学 Carrier phase synchronization method and device for non-coherent demodulation circuit
CN105791179A (en) * 2014-12-18 2016-07-20 联芯科技有限公司 Sampling frequency offset compensation device and method
CN111865865A (en) * 2020-08-04 2020-10-30 北京空天智数科技有限公司 Frequency offset and phase offset estimation method suitable for high-sensitivity satellite-borne ADS-B receiver

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651725A (en) * 2011-02-25 2012-08-29 中兴通讯股份有限公司 Multi-user frequency offset compensation method and device
CN104092642A (en) * 2014-07-30 2014-10-08 东南大学 Carrier phase synchronization method and device for non-coherent demodulation circuit
CN105791179A (en) * 2014-12-18 2016-07-20 联芯科技有限公司 Sampling frequency offset compensation device and method
CN111865865A (en) * 2020-08-04 2020-10-30 北京空天智数科技有限公司 Frequency offset and phase offset estimation method suitable for high-sensitivity satellite-borne ADS-B receiver

Similar Documents

Publication Publication Date Title
US10088333B2 (en) Method and system for gyroscope real-time calibration
CN101807089A (en) Waveform signal generator with optionally adjustable output signal offset
CN101452307A (en) System and method of calibrating real time clock utilizing average calibration
CN104268123A (en) Discrete digital signal hopping sliding discrete Fourier transform method
CN104300987A (en) Digital tuning engine for highly programmable delta-sigma analog-to-digital converters
CN110034729B (en) Circuit device, vibration device, electronic apparatus, and moving object
CN116545292A (en) LC filtering inverter prediction control method and system
CN112565129A (en) Frequency offset compensation method and system
CN106970328B (en) SOC estimation method and device
WO2017096516A1 (en) Calibration of interpolating string digital-to-analog converters
CN113411088B (en) I/Q imbalance calibration method and device for zero intermediate frequency wireless transmitter
CN112565131A (en) Frequency offset compensation method and system
CN107943204B (en) Digital frequency synthesis method and device
CN112083226A (en) Frequency calibration method and device for electronic equipment, medium and electronic equipment
CN112565130B (en) Low-delay parallel digital down-conversion method and system
CN112600776B (en) Frequency offset compensation method and device suitable for OFDM system
CN107431495A (en) Digital pre-distortion bearing calibration and device
CN112542998B (en) Digital down-conversion method and system
US20200021477A1 (en) Interpolation Method for Polar Signals in Radio Frequency Transmitters
CN104635193A (en) SOC chip real-time clock high-precision compensation method for electric meters
CN110518858B (en) Rotor position estimation method, rotor position estimation device, computer equipment and storage medium
CN103901940B (en) Method for generating digital cosine signals
CN112600520A (en) Parallel digital frequency conversion method, system and storage medium
CN117595698B (en) Inverter operation parameter prediction method, device, equipment and storage medium
JP6576666B2 (en) Correction arithmetic circuit, signal processing device

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