Frequency offset compensation device, method, electronic device and readable storage medium

The frequency point accumulator and vector calculation unit are used to convert the division in frequency deviation compensation into multiplication operations, and the CORDIC algorithm is used to implement frequency deviation compensation, which solves the hardware resource and power consumption problems caused by long division and improves efficiency.

CN116708105BActive Publication Date: 2025-09-26GUANGZHOU TRANSA SEMI INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310591237.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2025-09-26
Estimated Expiration
2043-05-23

AI Technical Summary

Technical Problem

In the prior art, frequency deviation compensation requires the use of long division calculations, which results in increased hardware resource consumption and power consumption.

Method used

The frequency point accumulator and vector calculation unit are used to convert the division calculation in frequency offset compensation into multiplication calculation, and the CORDIC algorithm is used to implement frequency offset compensation through shifting and adding, eliminating the division operation.

Benefits of technology

This saves hardware area resources and terminal power consumption, and improves the efficiency of frequency deviation compensation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116708105B_ABST
    Figure CN116708105B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention disclose a frequency offset compensation device, method, electronic device, and readable storage medium. When calculating frequency offset compensation, after a frequency accumulator acquires an input signal, it accumulates the frequency points of the input signal to determine an accumulated angle value. This accumulated angle value is used to determine the rotation direction and serves as input to a vector calculation unit. The vector calculation unit uses the division calculation in the frequency offset compensation as a target rotation angle and converts the calculation of the target rotation angle into the product of the sampling frequency corresponding to the input signal and an inverse tangent function. By presetting the value of the inverse tangent function, the division calculation in the frequency offset compensation is converted into a multiplication operation that can be implemented using shifting and addition. After determining the target rotation angle value, the target rotation angle value is multiplied by the input signal to obtain an output signal after the input signal has been frequency offset compensated. This eliminates the division operation and saves hardware area resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a frequency offset compensation device, method, electronic device and readable storage medium. Background Art

[0002] Oscillator mismatches or Doppler shift during transmission can cause frequency deviations in the sampling clocks between the transmitter and receiver. Therefore, frequency deviations must be compensated for at the receiving end of the communication device.

[0003] Compensation of frequency deviation involves calculating the division operation between the frequency point and the frequency, but Verilog cannot directly use / division. Instead, it uses long division and accumulation and multiple iterations to complete it.

[0004] On the one hand, the use of long division consumes hardware area resources, and on the other hand, the long division iteration process takes time and consumes power consumption of the terminal. Summary of the Invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a frequency offset compensation device, method, electronic device, and readable storage medium that overcome the above problems or at least partially solve the above problems.

[0006] In a first aspect, an embodiment of the present application discloses a frequency offset compensation device, the device comprising:

[0007] Frequency point accumulator, vector calculation unit and complex number calculation unit;

[0008] The frequency accumulator is used to accumulate the frequencies of the complex input signal input to the frequency accumulator to determine an angle accumulation value, and the angle accumulation value is used to determine the rotation direction;

[0009] The vector calculation unit is configured to: use a division calculation portion in a frequency offset compensation expression corresponding to the input signal as a target rotation angle value, convert the division calculation portion into a multiplication calculation portion, and calculate the target rotation angle value in the frequency offset compensation expression based on the multiplication calculation portion and an accumulated angle value; the multiplication calculation portion is configured to represent a product of a sampling frequency corresponding to the input signal and an inverse tangent function;

[0010] The complex number calculation unit is used to perform a complex number multiplication calculation on the target rotation angle value and the input signal to determine an output signal of the input signal after frequency offset compensation.

[0011] In a second aspect, an embodiment of the present application discloses a frequency offset compensation method, which is applied to the frequency offset compensation device described in the first aspect. The method includes:

[0012] Acquire an input signal, and perform cumulative calculation on the frequency points of the input signal to determine an angle cumulative value, wherein the angle cumulative value is used to determine the rotation direction;

[0013] Using a division calculation portion in a frequency offset compensation expression corresponding to the input signal as a target rotation angle value, converting the division calculation portion into a multiplication calculation portion, and calculating the target rotation angle value in the frequency offset compensation expression based on the multiplication calculation portion and the angle accumulation value; the multiplication calculation portion is used to represent the product of the sampling frequency corresponding to the input signal and the inverse tangent function;

[0014] An output signal of the input signal after frequency offset compensation is determined by performing a complex multiplication calculation on the target rotation angle value and the input signal.

[0015] In a third aspect, an embodiment of the present application further discloses an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0016] In a fourth aspect, an embodiment of the present application further discloses a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0017] Then, when calculating frequency offset compensation, the embodiment of the present invention performs cumulative calculation on the frequency points of the input signal after the frequency point accumulator obtains the input signal to determine the angle cumulative value. The angle cumulative value is used to determine the rotation direction. The angle cumulative value can be used as the input of the vector calculation unit. The vector calculation unit uses the division calculation part in the frequency offset compensation as the target rotation angle, and converts the calculation of the target rotation angle into the form of the product of the sampling frequency corresponding to the input signal and the inverse tangent function. By presetting the value of the inverse tangent function, the division calculation part in the frequency offset compensation is converted into a multiplication operation that can be implemented based on shifting and addition. After determining the target rotation angle value, the target rotation angle value is multiplied by the input signal to obtain the output signal after the input signal has been frequency offset compensated. This application saves hardware area resources and terminal power consumption by eliminating the division operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a structural block diagram of a frequency offset compensation device provided by an embodiment of the present invention;

[0019] Figure 2 is a circuit diagram of a frequency offset compensation device provided by an embodiment of the present invention;

[0020] Figure 3 This is a circuit diagram of a vector calculation unit provided by an embodiment of the present invention;

[0021] Figure 4 This is a frequency accumulator circuit diagram provided by an embodiment of the present invention;

[0022] Figure 5 This is a circuit diagram of a complex number calculation unit provided by an embodiment of the present invention;

[0023] Figure 6 This is a flowchart of a frequency offset compensation method provided by an embodiment of the present invention;

[0024] Figure 7 This is a logic block diagram of an electronic device provided by an embodiment of the present invention;

[0025] Figure 8 This is a logic block diagram of another electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0027] The following is an explanation of the concepts and terms involved in this application:

[0028] Frequency offset compensation: Oscillator mismatch or Doppler shift during transmission can cause a frequency offset in the sampling clocks between the transmitter and receiver. Signals can be represented as complex numbers, and the real and imaginary parts of the complex numbers can be used to determine the amplitude and instantaneous phase of the input signal.

[0029] Cordic (Coordinate rotation digital compute, vector calculation method) replaces multiplication operations with basic addition and shift operations, so that the calculation of vector rotation and orientation no longer requires trigonometric functions, multiplication, square root, inverse trigonometric, exponential functions, etc.

[0030] Verilog (a hardware description language) is a language that describes the structure and behavior of digital system hardware in textual form. It can be used to represent logic circuit diagrams, logic expressions, and the logical functions performed by digital logic systems. Some statements in Verilog are not synthesizable, such as division operations. Although there are division operation instructions in the Verilog language, the divisor in the division operator must be a power of 2. Therefore, division with an arbitrary integer divisor cannot be implemented, which greatly limits its application areas.

[0031] When calculating the frequency offset compensation of the input signal through Verilog, it is necessary to calculate the ratio of the frequency point to the sampling rate. In order to calculate the frequency offset compensation through Verilog, this application uses cordic to convert the division calculation into shift and addition operations, and solves the problem that the Verilog division instruction cannot be synthesized by eliminating the division operation.

[0032] Then, when calculating frequency offset compensation, the embodiment of the present invention performs cumulative calculation on the frequency points of the input signal after the frequency point accumulator obtains the input signal to determine the angle cumulative value. The angle cumulative value is used to determine the rotation direction. The angle cumulative value can be used as the input of the vector calculation unit. The vector calculation unit uses the division calculation part in the frequency offset compensation as the target rotation angle, and converts the calculation of the target rotation angle into the form of the product of the sampling frequency corresponding to the input signal and the inverse tangent function. By presetting the value of the inverse tangent function, the division calculation part in the frequency offset compensation is converted into a multiplication operation that can be implemented based on shifting and addition. After determining the target rotation angle value, the target rotation angle value is multiplied by the input signal to obtain the output signal after the input signal has been frequency offset compensated. This application saves hardware area resources and terminal power consumption by eliminating the division operation.

[0033] Figure 1 , is a structural block diagram of a frequency offset compensation device provided by an embodiment of the present invention, such as Figure 1 As shown, the device includes: a frequency point accumulator, a vector calculation unit and a complex number calculation unit; the frequency point accumulator is used to: accumulate and calculate the frequency points of the complex input signal input to the frequency point accumulator to determine the angle accumulation value, and the angle accumulation value is used to determine the rotation direction; the vector calculation unit is used to: use the division calculation part in the frequency offset compensation expression corresponding to the input signal as the target rotation angle value, convert the division calculation part into a multiplication calculation part, and calculate the target rotation angle value in the frequency offset compensation expression based on the multiplication calculation part and the angle accumulation value; the multiplication calculation part is used to represent the product of the sampling frequency corresponding to the input signal and the inverse tangent function; the complex number calculation unit is used to: perform complex multiplication calculation based on the target rotation angle value and the input signal to determine the output signal of the input signal after frequency offset compensation.

[0034] In an embodiment of the present invention, the frequency points of the input signal are first accumulated and calculated. After the input signal is acquired, the signal sampling frequency and initial phase parameters of the input signal are accumulated and calculated to determine an accumulated angle value, which is used to determine the rotation direction. The vector calculation module can be a cordic module. The rotation direction in this application can be the rotation direction of the initial angle corresponding to the input signal when calculating using the cordic rotation mode. The rotation direction can include clockwise rotation or counterclockwise rotation.

[0035] Furthermore, the CORDIC algorithm provides an approximation method for mathematical calculations. Since it can ultimately be decomposed into a series of addition, subtraction, and shift operations, it is very suitable for hardware implementation. The expression for frequency offset compensation can be: j2πkf / fs , where 2πkf / f s It can be used as the division calculation part of the frequency offset compensation expression, where f represents the frequency of the input signal, f s Represents the sampling frequency of the input signal, k is the sampling point number, therefore, for 2πkf / f s The division operation part in the frequency offset compensation expression can be converted into a multiplication operation form, and then the addition, subtraction and shift operations of the CORDIC algorithm are used for multiplication operation, thereby realizing the conversion of the division operation part in the frequency offset compensation expression.

[0036] Specifically, the division calculation part in the frequency offset compensation expression corresponding to the input signal is used as the target rotation angle value, when 2πkf / f s When the whole is taken as an angle value, the calculation of frequency offset compensation can be realized by using the algorithm of cordic rotation mode, and 2πkf / f is converted by trigonometric function. s , eliminate the division calculation part, and instead calculate the product of the sampling frequency corresponding to the input signal and the inverse tangent function. s After the calculation results, e j2πkf / fs Convert it into a complex number expression and calculate e through the complex number calculation unit j2πkf / fs The complex expression converted into the complex expression form is multiplied with the complex expression form of the input signal to finally obtain an output signal obtained after the input signal is frequency offset compensated.

[0037] In summary, when calculating frequency offset compensation, the embodiment of the present invention accumulates and calculates the frequency points of the input signal after the frequency point accumulator obtains the input signal to determine the angle accumulation value. The angle accumulation value is used to determine the rotation direction. The angle accumulation value can be used as the input of the vector calculation unit. The vector calculation unit uses the division calculation part in the frequency offset compensation as the target rotation angle, and converts the calculation of the target rotation angle into the form of the product of the sampling frequency corresponding to the input signal and the inverse tangent function. By presetting the value of the inverse tangent function, the division calculation part in the frequency offset compensation is converted into a multiplication operation that can be implemented based on shifting and addition. After determining the target rotation angle value, the target rotation angle value is multiplied by the input signal to obtain the output signal after the input signal has been frequency offset compensated. This application saves hardware area resources and terminal power consumption by eliminating the division operation.

[0038] Optionally, the vector calculation unit includes: a shift calculator, an adder and an iteration calculator; the vector calculation unit is used to: when the target rotation angle is divided into multiple small angles, search the preset table according to the number of iterations of each small angle to determine the inverse tangent value corresponding to each small angle; the preset table includes the correspondence between the number of iterations and the inverse tangent value; calculate the product of the inverse tangent value and the sampling frequency through the shift calculator and the adder to determine the angle value corresponding to the small angle after each iterative calculation; after the iterative calculator iterates the angle value corresponding to the small angle for a preset number of times, output the target rotation angle value.

[0039] In the examples of this application, refer to Figure 2 , Figure 2 A circuit diagram of a frequency offset compensation device is shown; wherein, a frequency point accumulator outputs an angle accumulation value (the positive or negative value of z can indicate the rotation direction) after frequency point accumulation calculation. The angle accumulation value is used to represent the rotation direction of the angle. A vector calculation unit outputs the coordinates (x, y) of the target rotation angle value after frequency offset compensation based on the angle accumulation value. The coordinate values ​​output by the vector calculation unit are converted to the quadrant actually corresponding to the input signal after quadrant conversion. Finally, the product of the target rotation angle value after quadrant conversion and the complex expression of the input signal is calculated to output the output signals after frequency offset compensation: dout i and dout q.

[0040] Furthermore, the vector calculation unit calculates the frequency offset compensation corresponding to the angle based on the rotation direction of the angle. The frequency offset compensation expression can be expressed as e j2πkf / fs , where 2πkf / f s It can be used as the division calculation part of the frequency offset compensation expression, where f represents the frequency of the input signal, f s Indicates the sampling frequency of the input signal, k is the sampling point number, that is to say, to determine the frequency offset compensation of the input signal, it is necessary to calculate the ratio of the frequency point to the sampling frequency. Figure 3 , Figure 3 A circuit diagram of a vector calculation unit is shown. The vector calculation unit may be a cordic unit, which is used to calculate a frequency offset compensation expression. Figure 3 It works as follows:

[0041] If the input signal is represented by a k +jb k , it is necessary to perform j2πkf / fs Frequency offset compensation is achieved

[0042] x k +jy k =(a k +jb k )×e j2πkf / fs

[0043] x k +jy k The frequency offset compensation required is as follows: taking k = 1 as an example, let Z0 = 2πk / f s , x0=a1, y0=b1, after (x0, y0) rotates by angle Z0, we get (x1, y1), that is:

[0044] x1=x0 cos(z0)-y0 sin(z0)

[0045] y1=y0 cos(z0)+x0 sin(z0)

[0046] After dividing by cos(z0), we get:

[0047] x1 / cos(z0)=x0-y0 tan(z0)

[0048] y1 / cos(z0)=y0+x0 tan(z0)

[0049] It can be seen that cos(z0) only changes the modulus of the target vector (x1, y1). If cos(z0) is removed, this rotation can be called a pseudo-rotation. At this time:

[0050] x1=x0-y0 tan(z0)

[0051] y1=y0+x0 tan(z0)

[0052] At this time, the output of the pseudo-rotation can be compensated to obtain the result of the real rotation. For pseudo-rotation, z0 can be decomposed into a series of small angles. Decompose a rotation into a series of micro-rotations, and the small angle of each step can be θn (unit: pi). After rotating for several steps, it approaches the target rotation angle z0. In order to facilitate hardware calculation, the special θn=arctan(2 -n ). At the same time, since z0=2πk÷f s , then f=z0×(f s ÷2π), z0 is n iterations (addition or subtraction) of θn;

[0053] z0×(f s ÷2π) is θn×(f s ÷2π) n iterations (addition or subtraction);

[0054] θn*(f s ÷2π)=arctan(2 -n )×f s ÷2π

[0055] From the above expression, we can see that: by sMultiply by arctan(2 -n ) table, the operation of avoiding division by fs can be achieved.

[0056] Furthermore, the process of implementing angle iterative calculation by cordic is as follows:

[0057] The result after the i+1th rotation is

[0058] x n+1 =x n –y n tan(z0)

[0059] y n+1 =y n +x n tan(z0)

[0060] Since θn=arctan(2 -n ), therefore, the rotation mode iteration process of the CORDIC algorithm can be expressed as:

[0061] x n+1 =x n –S n y n 2 -n

[0062] y n+1 =y n +S n x n+1 2 -n

[0063] z n+1 =z n +S n (arctan(2 -n )×f s ÷2π)

[0064] in,

[0065] For example, the number of iterations can be 24. After 24 iterations, one angle calculation is completed and the values ​​of x and y are output. The values ​​of x and y are cos(z) and sin(z). After iterative calculation, the complex expression of the offset frequency compensation is output.

[0066] refer to Figure 3 , Figure 3 The circuit is used to implement the above iterative calculation, Figure 3It can be a cordic circuit, wherein the vector calculation unit includes: a shift calculator, an adder and an iteration calculator; the vector calculation unit is used to look up a preset table to determine the arc tangent value corresponding to each small angle according to the number of iterations during the iteration process; the preset table can be pre-stored in a memory, and saves the corresponding relationship between the number of iterations and the arc tangent value corresponding to each iteration angle. If the number of iterations is 24, then the preset table stores the arctan (2 -1 ) value, the second iteration corresponds to arctan(2 -2 ) until the inverse tangent value corresponding to the 24th iteration. The Cordic circuit includes a shift calculator. The shift calculator and adder can implement the multiplication calculation in the Cordic, calculate the product of the inverse tangent value and the sampling frequency, and determine the angle value corresponding to the small angle after each iterative calculation. The angle value can be expressed in the form of coordinates. After the iterative calculator iterates the angle value corresponding to the small angle a preset number of times, it outputs the target rotation angle value. For example, in the first iterative calculation, the input signals x0 and y0 are used to calculate 0_xreg and 0_yreg after the first iteration. The value of z is calculated using the inverse tangent function and output as 0_zreg. Finally, after 24 iterations, xreg23, yreg23, and zreg23 are output.

[0067] Optionally, the frequency accumulator includes: a phase accumulator, a range limiting unit and a quadrant transformation unit; the frequency accumulator is used to: determine the frequency accumulator value of the input signal through the phase accumulator unit; determine whether the frequency accumulator value of the input signal exceeds a first threshold through the range limiting unit, and if it exceeds the first threshold, limit the frequency accumulator value within a preset range through a preset algorithm to obtain a corrected frequency accumulator value; limit the corrected frequency accumulator value to the first quadrant position through the quadrant transformation unit, and use it as the angle accumulator value.

[0068] In the examples of this application, refer to Figure 4 , Figure 4 The circuit diagram of a frequency accumulator is shown. The frequency accumulator can be used to implement the calculation of 2fini+∑2f, where f is used to represent the frequency point and fini is used to represent the sampling frequency. For example, 2fs is the first threshold. If the frequency point accumulation value exceeds twice the sampling frequency, 2fs is subtracted to keep its value in [0,2fs]. [0,2fs] can be a preset range.

[0069] Furthermore, the actual quadrant position can be calculated based on whether the input frequency point f is a positive or negative number and the corrected accumulated frequency value. Since the cordic calculation has a delay, it can be delayed 24 beats before being used for the cordic output. At the same time, the accumulated frequency value is converted to the first quadrant through the quadrant conversion formula of the trigonometric function and used as the zreg input of the cordic's z channel. The positive or negative value of z can determine the rotation direction of the cordic during the iterative calculation.

[0070] Optionally, the frequency point accumulator is used to: determine the actual quadrant position corresponding to the input signal according to the positive and negative conditions of the frequency point of the input signal and the corrected frequency point accumulated value through the quadrant transformation unit; the complex number calculation unit includes: a phase conversion unit and a product calculation unit; the complex number calculation unit is used to: restore the target rotation angle value to the actual quadrant position through the phase conversion unit; calculate the product of the input signal and the target rotation angle value restored to the actual quadrant position through the product calculation unit, and determine the output signal of the input signal after frequency offset compensation.

[0071] In the examples of this application, refer to Figure 4 The frequency accumulator is used to determine the positive or negative frequency of the input signal through the quadrant judgment part in the quadrant transformation unit, as well as the corrected frequency accumulation value, to determine the actual quadrant position corresponding to the input signal. Since cordic is calculated in the first quadrant, when the frequency offset compensation is finally performed on the input signal, the frequency offset compensation needs to be converted back to the actual quadrant position. The product calculation unit calculates the product of the input signal and the target rotation angle value for restoring the actual quadrant position to determine the output signal after the input signal is frequency offset compensated.

[0072] refer to Figure 5 , Figure 5 The circuit diagram of a complex number calculation unit is shown. After 24 iterations, Cordic obtains the real part xreg23 and the imaginary part yreg23. According to the actual quadrant position recorded previously, the quadrant conversion formula of the trigonometric function is used to restore it to the corresponding quadrant to obtain change_quadrt_i and change_quadrt_q. Then, these are multiplied by the complex numbers of the signals i_data_i and i_data_q that need frequency compensation to achieve frequency offset correction. The input signal is a k +jb k , perform e on the input signal j2 πkf / fs Frequency offset compensation, that is, achieving:

[0073] x k +jy k =(i_data_i k +ji_data_qk )×e j2πkf / fs

[0074] Finally, the calculation result is rounded and saturated to the corresponding bit width for output.

[0075] Optionally, the arc tangent expression of each small angle is: arctan(2 -n ), where n is used to represent the small angle calculated in the nth iteration.

[0076] In the embodiment of the present application, since arctan is a multiplier and the hardware can easily implement multiplication and division of 2 by shifting, it is best to take a value that is a power of 2. Therefore, θn=arctan(2 -n ).

[0077] Optionally, the vector calculation unit is further configured to: during two adjacent iterative calculation processes, calculate, by the iterative calculator, an angle value of a small angle corresponding to a subsequent iterative calculation based on an angle value of a small angle corresponding to a previous iterative calculation.

[0078] In the embodiment of the present application, according to the iterative calculation process of cordic, each iterative calculation must refer to the result of the previous iterative calculation. Therefore, the iterative calculator must also calculate the angle value of the small angle corresponding to the next iterative calculation based on the angle value of the small angle corresponding to the previous iterative calculation. Finally, after the number of iterations is completed, the result of the last iterative calculation is obtained.

[0079] Optionally, if the angle accumulation value is a positive value, the rotation direction is counterclockwise; if the angle accumulation value is a negative value, the rotation direction is clockwise.

[0080] In an embodiment of the present application, if the angle accumulation value is a positive value, it indicates that the frequency deviation compensation angle is larger than the initial angle of the input signal. At this time, the rotation direction is counterclockwise, so that the initial angle is close to the angle requiring frequency deviation compensation. If the angle accumulation value is a negative value, it indicates that the frequency deviation compensation angle is smaller than the initial angle of the input signal. At this time, the rotation direction is clockwise, so that the initial angle is close to the angle requiring frequency deviation compensation.

[0081] In summary, when calculating frequency offset compensation, the embodiment of the present invention accumulates and calculates the frequency points of the input signal after the frequency point accumulator obtains the input signal to determine the angle accumulation value. The angle accumulation value is used to determine the rotation direction. The angle accumulation value can be used as the input of the vector calculation unit. The vector calculation unit uses the division calculation part in the frequency offset compensation as the target rotation angle, and converts the calculation of the target rotation angle into the form of the product of the sampling frequency corresponding to the input signal and the inverse tangent function. By presetting the value of the inverse tangent function, the division calculation part in the frequency offset compensation is converted into a multiplication operation that can be implemented based on shifting and addition. After determining the target rotation angle value, the target rotation angle value is multiplied by the input signal to obtain the output signal after the input signal has been frequency offset compensated. This application saves hardware area resources and terminal power consumption by eliminating the division operation.

[0082] Figure 6 A frequency offset compensation method provided by an embodiment of the present invention includes:

[0083] Step 101: Acquire an input signal, and perform cumulative calculation on the frequency points of the input signal to determine an angle cumulative value, wherein the angle cumulative value is used to determine the rotation direction;

[0084] Step 102: Using a division calculation portion in a frequency offset compensation expression corresponding to the input signal as a target rotation angle value, converting the division calculation portion into a multiplication calculation portion, and calculating the target rotation angle value in the frequency offset compensation expression based on the multiplication calculation portion and the angle accumulation value; the multiplication calculation portion is used to represent the product of the sampling frequency corresponding to the input signal and the inverse tangent function;

[0085] Step 103 : Performing a complex multiplication calculation on the target rotation angle value and the input signal to determine an output signal of the input signal after frequency offset compensation.

[0086] The specific details of steps 101 - 103 in the embodiment of the present invention may refer to the corresponding description of some embodiments of the frequency offset compensation device described above, and will not be repeated here.

[0087] In summary, when calculating frequency offset compensation, the embodiment of the present invention accumulates and calculates the frequency points of the input signal after the frequency point accumulator obtains the input signal to determine the angle accumulation value. The angle accumulation value is used to determine the rotation direction. The angle accumulation value can be used as the input of the vector calculation unit. The vector calculation unit uses the division calculation part in the frequency offset compensation as the target rotation angle, and converts the calculation of the target rotation angle into the form of the product of the sampling frequency corresponding to the input signal and the inverse tangent function. By presetting the value of the inverse tangent function, the division calculation part in the frequency offset compensation is converted into a multiplication operation that can be implemented based on shifting and addition. After determining the target rotation angle value, the target rotation angle value is multiplied by the input signal to obtain the output signal after the input signal has been frequency offset compensated. This application saves hardware area resources and terminal power consumption by eliminating the division operation.

[0088] Figure 7 1 is a block diagram of an electronic device 600 according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0089] Reference Figure 7 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .

[0090] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 602 may include one or more modules to facilitate interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.

[0091] The memory 604 is used to store various types of data to support operations on the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, multimedia, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0092] The power supply assembly 606 provides power to the various components of the electronic device 600. The power supply assembly 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.

[0093] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a multimedia mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0094] The audio component 610 is used to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), which is used to receive external audio signals when the electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

[0095] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.

[0096] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of components, such as the display and keypad of the electronic device 600. The sensor assembly 614 can also detect changes in the position of the electronic device 600 or a component of the electronic device 600, the presence or absence of user contact with the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and temperature changes of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0097] The communication component 616 is used to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0098] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to implement a frequency offset compensation method provided in an embodiment of the present application.

[0099] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by a processor 620 of an electronic device 600 to perform the above method. For example, the non-transitory storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0100] Figure 87 is a block diagram of an electronic device 700 according to an exemplary embodiment. For example, the electronic device 700 can be provided as a server. Figure 8 Electronic device 700 includes a processing component 722, which further includes one or more processors, and memory resources represented by memory 732 for storing instructions executable by processing component 722, such as applications. The applications stored in memory 732 may include one or more modules, each corresponding to a set of instructions. In addition, processing component 722 is configured to execute instructions to perform a frequency offset compensation method provided in an embodiment of the present application.

[0101] The electronic device 700 may further include a power supply component 726 configured to perform power management of the electronic device 700, a wired or wireless network interface 750 configured to connect the electronic device 700 to a network, and an input / output (I / O) interface 758. The electronic device 700 may operate based on an operating system stored in the memory 732, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.

[0102] An embodiment of the present application further provides a computer program product, including a computer program, which implements the frequency offset compensation method when executed by a processor.

[0103] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0104] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A frequency offset compensation device, characterized in that: The device comprises: Frequency point accumulator, vector calculation unit and complex number calculation unit; The frequency accumulator is used to accumulate the frequencies of the complex input signal input to the frequency accumulator to determine an angle accumulation value, and the angle accumulation value is used to determine the rotation direction; The vector calculation unit is configured to: use a division calculation portion in a frequency offset compensation expression corresponding to the input signal as a target rotation angle value, convert the division calculation portion into a multiplication calculation portion, and calculate the target rotation angle value in the frequency offset compensation expression based on the multiplication calculation portion and an accumulated angle value; the multiplication calculation portion is configured to represent a product of a sampling frequency corresponding to the input signal and an inverse tangent function; The complex number calculation unit is used to perform a complex number multiplication calculation on the target rotation angle value and the input signal to determine an output signal of the input signal after frequency offset compensation.

2. The device according to claim 1, characterized in that The vector calculation unit includes: a shift calculator, an adder and an iteration calculator; The vector calculation unit is configured to: when the target rotation angle is divided into a plurality of small angles, search a preset table according to the number of iterations for each of the small angles to determine the arc tangent value corresponding to each small angle; the preset table includes a correspondence between the number of iterations and the arc tangent value; Calculating the product of the arc tangent value and the sampling frequency by the shift calculator and the adder, and determining the angle value corresponding to the small angle after each iterative calculation; After the iterative calculator iterates the angle value corresponding to the small angle for a preset number of times, the target rotation angle value is output.

3. The device according to claim 1, characterized in that The frequency point accumulator includes: a phase accumulation unit, a range limiting unit and a quadrant conversion unit; The frequency accumulator is used to: determine the frequency accumulation value of the input signal through the phase accumulation unit; determining, by the range limiting unit, whether the frequency point cumulative value of the input signal exceeds a first threshold value, and if the frequency point cumulative value exceeds the first threshold value, limiting the frequency point cumulative value within a preset range by a preset algorithm to obtain a corrected frequency point cumulative value; The corrected frequency point accumulated value is limited to the first quadrant position by the quadrant conversion unit and used as the angle accumulated value.

4. The device according to claim 3, characterized in that The frequency accumulator is used to determine the actual quadrant position corresponding to the input signal according to the positive or negative condition of the frequency of the input signal and the corrected frequency accumulated value through the quadrant conversion unit; The complex number calculation unit includes: a phase conversion unit and a product calculation unit; The complex number calculation unit is used to: restore the target rotation angle value to the actual quadrant position through the phase conversion unit; The product of the input signal and the target rotation angle value for restoring the actual quadrant position is calculated by the product calculation unit to determine an output signal of the input signal after frequency offset compensation.

5. The device according to claim 2, characterized in that The inverse tangent expression of each small angle is: arctan(2 -n ), where n is used to represent the small angle calculated in the nth iteration.

6. The device according to claim 2, characterized in that The vector calculation unit is further configured to: In two adjacent iterative calculation processes, the iterative calculator calculates the angle value of the small angle corresponding to the next iterative calculation according to the angle value of the small angle corresponding to the previous iterative calculation.

7. The device according to claim 1, characterized in that If the angle accumulation value is a positive value, the rotation direction is counterclockwise; If the angle accumulation value is a negative value, the rotation direction is clockwise.

8. A frequency offset compensation method, applied to the frequency offset compensation device according to any one of claims 1 to 7, characterized in that: The method comprises: Acquire an input signal, and perform cumulative calculation on the frequency points of the input signal to determine an angle cumulative value, wherein the angle cumulative value is used to determine the rotation direction; Using a division calculation portion in the frequency offset compensation expression corresponding to the input signal as a target rotation angle value, converting the division calculation portion into a multiplication calculation portion, and calculating the target rotation angle value in the frequency offset compensation expression based on the multiplication calculation portion and the angle accumulation value; the multiplication calculation portion is used to represent the product of the sampling frequency corresponding to the input signal and the inverse tangent function; An output signal of the input signal after frequency offset compensation is determined by performing a complex multiplication calculation on the target rotation angle value and the input signal.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to claim 8 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to claim 8 are implemented.

Citation Information

Patent Citations

  • Decision directed carrier recovery using the CORDIC algorithm

    US20040161055A1

  • Optical communication receiving device and frequency offset compensation method

    US20150098714A1