CN109345463B - Optimization method and system for coordinate rotation digital calculation method - Google Patents

Optimization method and system for coordinate rotation digital calculation method Download PDF

Info

Publication number
CN109345463B
CN109345463B CN201811487612.2A CN201811487612A CN109345463B CN 109345463 B CN109345463 B CN 109345463B CN 201811487612 A CN201811487612 A CN 201811487612A CN 109345463 B CN109345463 B CN 109345463B
Authority
CN
China
Prior art keywords
value
complex number
iteration
initial
input complex
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.)
Active
Application number
CN201811487612.2A
Other languages
Chinese (zh)
Other versions
CN109345463A (en
Inventor
张书迁
钱永学
王志华
叶晓斌
黄鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Angrui Microelectronics Technology Co ltd
Original Assignee
Shenzhen Angrui Microelectronics 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 Shenzhen Angrui Microelectronics Technology Co ltd filed Critical Shenzhen Angrui Microelectronics Technology Co ltd
Priority to CN201811487612.2A priority Critical patent/CN109345463B/en
Publication of CN109345463A publication Critical patent/CN109345463A/en
Application granted granted Critical
Publication of CN109345463B publication Critical patent/CN109345463B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • G06T3/604Rotation of whole images or parts thereof using coordinate rotation digital computer [CORDIC] devices

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Complex Calculations (AREA)

Abstract

The invention discloses an optimization method of a coordinate rotation digital computing method, which comprises the following steps: determining an initial input complex number and an initial iteration value corresponding to the original input complex number; judging whether the initial iteration value reaches a preset iteration threshold value or not; if not, carrying out iterative computation by adopting a coordinate rotation digital computation method according to the initial input complex number and the initial iteration value; and when the iteration value reaches the preset iteration threshold value, obtaining a target argument. According to the optimization method, the corresponding initial input complex number and initial iteration value are determined by adjusting the initial input data in the initial calculation stage, and when the initial iteration value is smaller than the preset iteration threshold value, the coordinate rotation digital calculation method is adopted to carry out iterative calculation according to the initial input complex number and the initial iteration value, so that the accuracy of an iteration result can be improved and/or the iteration times can be reduced.

Description

Optimization method and system for coordinate rotation digital calculation method
Technical Field
The invention relates to the technical field of digital signal processing, in particular to an optimization method and system of a coordinate rotation digital computing method.
Background
The coordinate rotation digital computing method CORDIC (Coordinate Rotation Digital Computer) algorithm has wide application in the fields of digital computing, digital signal and image processing, modern communication and the like. The CORDIC algorithm provides a unified and optimized implementation mode for calculating various complex functions, meets the requirements of modern high-speed real-time signal processing, and provides a calculation basis for technical implementation from theory to application for various new technologies. The CORDIC algorithm is invented in the 50 s of the last century, and can convert a plurality of complex operations into simpler shift operation and addition operation through iterative operation, and finally, a result of positive correlation of precision and iteration times is obtained.
The inventor researches the existing CORDIC algorithm, and found that the original input data is not adjusted in the iteration process, and when the bit width of the original input data is short or the initial iteration value is improperly selected, the accuracy of the iteration result and the iteration times are affected.
Disclosure of Invention
In view of this, the invention provides an optimization method and system for a coordinate rotation digital computing method, which are used for solving the problem that in the prior art, the original input data is not adjusted in the iteration process, and the accuracy and the iteration times of the iteration result are affected when the bit width of the original input data is shorter or the initial iteration value is selected improperly. The specific scheme is as follows:
an optimization method of a coordinate rotation digital computing method includes
Determining an initial input complex number and an initial iteration value corresponding to the original input complex number;
judging whether the initial iteration value reaches a preset iteration threshold value or not;
if not, carrying out iterative computation by adopting a coordinate rotation digital computation method according to the initial input complex number and the initial iteration value;
and when the iteration value reaches the preset iteration threshold value, obtaining a target argument.
The method, optionally, further comprises:
mapping the original input complex number to a first quadrant of rectangular coordinates;
and mapping the target argument back to the interval of 0-2 pi according to the quadrant of the original input complex number in the rectangular coordinates.
The method, optionally, determines an initial input complex number and an initial iteration value corresponding to the initial input complex number, including:
taking the original input complex number as the initial input complex number;
searching each phase value smaller than a target phase value in a preset phase table, wherein the target phase value is the ratio of the absolute value of the imaginary part of the initial input complex number to the absolute value of the real part of the initial input complex number;
and taking the iteration value corresponding to the largest phase value in the phase values as the initial iteration value.
The method, optionally, determines an initial input complex number and an initial iteration value corresponding to the initial input complex number, including:
carrying out the same shift operation on the real part of the original input complex number and the imaginary part of the original input complex number to obtain a first real part and a first imaginary part, wherein the maximum value of the absolute value of the first real part or the first imaginary part is positioned in a preset interval range;
taking a complex number consisting of an absolute value of the first real part and an absolute value of the first imaginary part as an initial input complex number;
and taking a default initial iteration value in the preset phase table as the initial iteration value.
The method, optionally, determines an initial input complex number and an initial iteration value corresponding to the initial input complex number, including:
carrying out the same shift operation on the real part of the original input complex number and the imaginary part of the original input complex number to obtain a first real part and a first imaginary part, wherein the maximum value of the absolute value of the first real part or the first imaginary part is positioned in a preset interval range;
taking a complex number consisting of an absolute value of the first real part and an absolute value of the first imaginary part as an initial input complex number;
searching each phase value smaller than a target phase value in a preset phase table, wherein the target phase value is the ratio of the absolute value of the imaginary part of the initial input complex number to the absolute value of the real part of the initial input complex number;
and taking the iteration value corresponding to the largest phase value in the phase values as the initial iteration value.
The method, optionally, performs iterative computation by using a coordinate rotation digital computing method according to the initial input complex number and the initial iteration value, including:
when any iteration is completed, taking the output complex number of the current iteration as the input complex number of the next iteration;
determining an iteration value of the next iteration;
and when the iteration value does not reach a preset iteration threshold, calculating by adopting a coordinate rotation digital calculation method according to the input complex number and the iteration value.
An optimization system for a coordinate rotation digital computing method, comprising:
the determining module is used for determining an initial input complex number and an initial iteration value corresponding to the original input complex number;
the judging module is used for judging whether the initial iteration value reaches a preset iteration threshold value or not;
the calculation module is used for carrying out iterative calculation by adopting a coordinate rotation digital calculation method according to the initial input complex number and the initial iterative value if not;
and the completion module is used for obtaining a target argument when the iteration value reaches the preset iteration threshold value.
The above system, optionally, the determining module includes:
a first determining unit configured to take the original input complex number as the initial input complex number;
a first searching unit, configured to search, in a preset phase table, for each phase value smaller than a target phase value, where the target phase value is a ratio of an absolute value of an imaginary part of the initial input complex number to an absolute value of a real part of the initial input complex number;
and the second determining unit is used for taking an iteration value corresponding to the largest phase value in the phase values as the initial iteration value.
The above system, optionally, the determining module includes:
the first shifting unit is used for carrying out the same shifting operation on the real part of the original input complex number and the imaginary part of the original input complex number to obtain a first real part and a first imaginary part, wherein the maximum value of the absolute value of the first real part or the first imaginary part is positioned in a preset interval range;
a third determining unit for taking a complex number composed of an absolute value of the first real part and an absolute value of the first imaginary part as an initial input complex number;
and the fourth determining unit is used for taking a default initial iteration value in the preset phase table as the initial iteration value.
The above system, optionally, the determining module includes:
the second shifting unit is used for carrying out the same shifting operation on the real part of the original input complex number and the imaginary part of the original input complex number to obtain a first real part and a first imaginary part, wherein the maximum value of the absolute value of the first real part or the first imaginary part is positioned in a preset interval range;
a fifth determining unit for taking a complex number composed of an absolute value of the first real part and an absolute value of the first imaginary part as an initial input complex number;
the second searching unit is used for searching each phase value smaller than a target phase value in a preset phase table, wherein the target phase value is the ratio of the absolute value of the imaginary part of the initial input complex number to the absolute value of the real part of the initial input complex number;
and a sixth determining unit, configured to use an iteration value corresponding to a largest phase value among the phase values as the initial iteration value.
Compared with the prior art, the invention has the following advantages:
the invention discloses an optimization method of a coordinate rotation digital computing method, which comprises the following steps: in the initial calculation stage, corresponding initial input complex numbers and initial iteration values are determined by adjusting initial input data, whether the initial iteration values reach a preset iteration threshold is judged, when the initial iteration values are smaller than the preset iteration threshold, the target argument is obtained by carrying out iterative calculation according to the initial input complex numbers and the initial iteration values by adopting a coordinate rotation digital calculation method, the initial input complex numbers are adjusted in advance by the optimization method, the corresponding initial input complex numbers and initial iteration values are determined, the target argument is calculated according to the initial input complex numbers and the initial iteration values, and the accuracy of iteration results can be improved and/or the iteration times can be reduced.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a diagram showing a complex argument calculated by a coordinate rotation digital calculation method according to an embodiment of the present invention;
FIG. 2 is a flowchart of an optimization method of a coordinate rotation digital computing method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for optimizing a coordinate rotation digital computing method according to an embodiment of the present invention;
FIG. 4 is a diagram showing the comparative relationship between the complex argument value and the real part of the complex imaginary part according to the embodiment of the present invention;
FIG. 5 is a flowchart of another method for optimizing a coordinate rotation digital computing method according to an embodiment of the present invention;
FIG. 6 is a flowchart of another method for optimizing a coordinate rotation digital computing method according to an embodiment of the present invention;
FIG. 7 is a block diagram of an optimized hardware architecture of a coordinate rotation digital computing method according to an embodiment of the present invention;
FIG. 8 is a schematic diagram showing the comparison of the number of iterations of the optimization algorithm disclosed in the embodiment of the present invention with the conventional algorithm;
FIG. 9 is a block diagram of an optimization system of a coordinate rotation digital computing method according to an embodiment of the present invention;
fig. 10 is a block diagram of another configuration of an optimization system for a coordinate rotation digital computing method according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention discloses an optimization method of a coordinate rotation digital computing method, which is applied to the process of optimizing by adopting a CORDIC algorithm, wherein the CORDIC algorithm can be used for computing a plurality of functions including sine, cosine, arctangent, square root, index and logarithm, can also be used for converting among various coordinate systems, and can also be used for computing operations such as fast Fourier transform FFT (Fast Fourier Transformation), discrete cosine transform DCT (Discrete Cosine Transform), discrete sine transform DST (Discrete Sine Transform), discrete Fourier transform DFT (Discrete Fourier Transform), discrete Hilbert transform DHT (Distributed Hash Table) and the like in a digital signal processing system, so that the functions are powerful. In the field of communication technology, especially in the field of modem, the CORDIC algorithm plays an important role in the circuits that involve a digitally controlled oscillator NCO (numerically controlled oscillator) and calculate the argument and amplitude value of the quadrature signal. For example, in the Frequency modulation system FM (Frequency Modulation), the differential phase shift keying DPSK (Differential Phase Shift Keying), and the Frequency shift keying FSK (Frequency-shift keying) communication system, the CORDIC algorithm circuit is more a key circuit in the corresponding demodulator. It can be said that the CORDIC algorithm provides a unified and optimized implementation manner for calculating various complex functions, meets the requirements of modern high-speed real-time signal processing, provides a calculation basis for technical implementation from theory to application for various new technologies, and is an important application of CORDIC, namely solving the argument of a complex function, which is often used in various I, Q quadrature modem communication systems. Fig. 1 is an iteration schematic diagram of the CORDIC algorithm in the application, wherein the complex vector is iterated three times in a rectangular coordinate system, the complex vector argument is obtained by iteratively rotating the complex vector until the complex vector coincides with an x coordinate axis, at this time, the sum of all angles rotated by the complex vector is a final argument value, wherein the vector rotation angle takes positive and negative values according to the rotation direction, the precision of an output result is positively correlated with the iteration times, and the angle of each rotation can be found out through a preset phase table LUT (look-up table). The flowchart of the optimization method based on the CORDIC algorithm is shown in fig. 2, and the optimization method comprises the following steps:
s101, determining an initial input complex number and an initial iteration value corresponding to an original input complex number;
in the embodiment of the present invention, the initial input complex number corresponding to the original input complex number may be the original input complex number or an initial input complex number obtained by shifting the real part and the imaginary part in the original input complex number, the initial iteration value corresponding to the original input complex number may be a default initial iteration value in the preset phase table or an iteration value corresponding to the largest phase value among the phase values smaller than the target phase value in the preset phase table, where the target phase value is an absolute value of a ratio of the imaginary part of the initial input complex number to the real part of the initial input complex number, and specifically, which combination is taken by the initial input complex number and the initial iteration value is determined according to an actual situation.
S102, judging whether the initial iteration value reaches a preset iteration threshold value or not;
in the embodiment of the invention, the preset iteration threshold is set according to an empirical value or an actual condition, and the initial iteration value is compared with the preset iteration threshold to judge whether the initial iteration value reaches the preset iteration threshold.
S103, if not, carrying out iterative computation by adopting a coordinate rotation digital computation method according to the initial input complex number and the initial iteration value;
in the embodiment of the present invention, if the initial iteration value does not reach the preset iteration threshold, performing iterative computation by using a coordinate rotation digital computation method according to the initial input complex number and the initial iteration value, where the initial input complex number has been converted into a first quadrant of a rectangular coordinate system, and a specific computation process is as follows:
taking the imaginary part of the initial input complex number, if the imaginary part is negative, then the control signal σ=1, otherwise the control signal σ= -1 is noted.
(1) Calculating output complex data (i.e., I and Q) of the calculation unit at an iteration value j according to formulas 1 and 2, wherein j is an initial iteration value when the CORDIC algorithm performs the iterative calculation for the first time:
I j =I j-1 -σ×2 -j ×Q j-1 (1)
Q j =Q j-1 +σ×2 -j ×I j-1 (2)
wherein I is j And Q j Representing the real and imaginary parts of the current updated initial input complex number and being the real and imaginary parts of the initial input complex number in the next iteration process, I j-1 And Q j-1 The real and imaginary parts of the input complex number in the last iterative calculation process adjacent to the current input complex number.
(2) Simultaneously calculating the accumulated argument value:
Z j =Z j-1 -σ×LUT(j) (3)
wherein, when j does not reach the preset iteration threshold value, Z j Indicating the cumulative argument value, Z when j reaches the preset iteration threshold value j Representing the target argument.
(3) Ending the iteration and obtaining the ratio R of the absolute value of the imaginary part and the absolute value of the real part of the complex output of the iteration div According to the ratio R div Searching a corresponding iteration value in a preset phase table, judging whether the iteration value reaches a preset iteration threshold, and if not, continuing to calculate (1) - (3) according to the iteration value. Wherein, the phase value stored in the preset phase table LUT table is equal to: arctg (2) m ) M=0, -1, -2, -3. The number of stored phases in the lookup table is equal to the number of iterations of the CORDIC algorithm.
And S104, when the iteration value reaches the preset iteration threshold value, obtaining a target argument.
In the embodiment of the invention, when the iteration value reaches the preset iteration threshold, the target argument is obtained. The selection of the preset iteration threshold may be set according to an empirical value or an actual situation.
In the embodiment of the present invention, when the initial iteration value reaches the preset iteration threshold, the iteration is ended to calculate the target argument according to formula (4):
Z j =Z j-1 -σ×R div (4)
wherein R is div The imaginary absolute value of the complex number is output divided by the real absolute value for each iteration. When the iteration value reaches the preset iteration threshold, the residual angle of vector rotation can be approximately R div It is shown that the more this threshold is set, the more accurate the output result of the optimized CORDIC algorithm.
In the embodiment of the invention, the target argument is mapped back into the 0-2 pi interval according to the quadrant to which the coordinates consisting of the real part and the imaginary part in the original input complex number belong.
The invention discloses an optimization method of a coordinate rotation digital computing method, which comprises the following steps: in the initial calculation stage, corresponding initial input complex numbers and initial iteration values are determined by adjusting initial input data, whether the initial iteration values reach a preset iteration threshold is judged, when the initial iteration values are smaller than the preset iteration threshold, the target argument is obtained by carrying out iterative calculation according to the initial input complex numbers and the initial iteration values by adopting a coordinate rotation digital calculation method, the initial input complex numbers are adjusted in advance by the optimization method, the corresponding initial input complex numbers and initial iteration values are determined, the target argument is calculated according to the initial input complex numbers and the initial iteration values, and the accuracy of iteration results can be improved and/or the iteration times can be reduced.
In the embodiment of the present invention, a method for determining an initial input complex number and an initial iteration value corresponding to an initial input complex number is shown in fig. 3, and includes:
s201, taking the original input complex number as the initial input complex number;
s202, searching each phase value smaller than a target phase value in a preset phase table, wherein the target phase value is the ratio of the absolute value of the imaginary part of the initial input complex number to the absolute value of the real part of the initial input complex number;
in the embodiment of the present invention, if all phases in the preset phase table LUT are greater than the target phase, the iteration is ended, and the target argument is calculated according to formula (4).
S203, taking an iteration value corresponding to the largest phase value in the phase values as the initial iteration value.
In the embodiment of the invention, in the conventional algorithm, the arctangent value corresponding to the power of each iteration 2 is sequentially related to the power and the iteration times, gradually decreases from 0, and decreases by 1 each time, so that the current iteration phase is as close as possible to the real phase, the current iteration phase selection and the current iteration calculation input complex number have the imaginary part and the real part ratio related, and thus the iteration times of the CORDIC algorithm can be greatly reduced, and the argument of the original data is enabled to approach the real value as soon as possible. When the argument of a complex number (complex number in the first quadrant) is smaller, the corresponding value is closer to the ratio of the imaginary part and the real part of the complex value. This can be understood from fig. 4: complex number (x) 0 ,y 0 ) The radial angle beta (radian value) of (a) can be expressed by the formulaWherein, the numerator l represents the arc length corresponding to the angle beta, and the denominator r represents the radius corresponding to the radian. When the angle is smaller, the ratio of radian to radius can be approximated as the ratio R of the absolute value of the imaginary part to the absolute value of the real part of the complex div
In the embodiment of the present invention, a method flow for determining an initial input complex number and an initial iteration value corresponding to an original input complex number is shown in fig. 5, and includes:
s301, performing the same shift operation on the real part of the original input complex number and the imaginary part of the original input complex number to obtain a first real part and a first imaginary part, wherein the maximum value of the absolute value of the first real part or the first imaginary part is located in a preset interval range;
in the embodiment of the invention, the purpose of performing the shift operation is to maximize the effective bit width of the input data, which is particularly important for applications based on fixed point implementation, especially in the case of shorter data bit width, otherwise, quantization errors greatly affect the final complex argument precision, and in the shift process, since the real part and the imaginary part of the input complex are simultaneously enlarged or reduced by the same multiple, the argument value is unchanged. Wherein the range of the preset interval is 0.5-1.0 or-1.0 to-0.5.
S302, taking a complex number consisting of the absolute value of the first real part and the absolute value of the first imaginary part as an initial input complex number;
s303, taking a default initial iteration value in the preset phase table as the initial iteration value.
In the embodiment of the present invention, if the phase value stored in the preset phase table LUT is equal to: arctg (2) m ) M=0, -1, -2, -3, …. The number of stored phases in the lookup table is equal to the number of iterations of the conventional CORDIC algorithm, and the default initial iteration value is 1, so the initial iteration value is 1.
In the embodiment of the present invention, a method for determining an initial input complex number and an initial iteration value corresponding to an initial input complex number in the embodiment of the present invention is shown in fig. 6, and includes
S401, performing the same shift operation on the real part of the original input complex number and the imaginary part of the original input complex number to obtain a first real part and a first imaginary part, wherein the maximum value of the absolute value of the first real part or the first imaginary part is located in a preset interval range;
s402, taking a complex number consisting of the absolute value of the first real part and the absolute value of the first imaginary part as an initial input complex number;
s403, searching each phase value smaller than a target phase value in a preset phase table, wherein the target phase value is the ratio of the absolute value of the imaginary part of the initial input complex number to the absolute value of the real part of the initial input complex number;
s404, taking an iteration value corresponding to the largest phase value in the phase values as the initial iteration value.
In the embodiment of the present invention, the processing procedures of S401 and S402 are the same as those of S301 and S302, and the processing procedures of S403 and S404 are the same as those of S202 and S203, which are not described herein.
In the embodiment of the present invention, taking the process of determining the initial input complex number and the initial iteration value corresponding to the initial input complex number as the method described in S401-S404 as an example, the hardware structure diagram of the method is as shown in fig. 7, the scaling unit implements shift processing in the optimization algorithm, and then data is input to the CORDIC iteration calculation unit and R div And a calculation unit. The structure of the CORDIC iterative computation unit is consistent with that of a traditional CORDIC iterative computation unit. R is R div The calculation unit is responsible for calculating R only div And sends the result to the output unit. The output unit calculates the final complex argument by using the formula (4) and outputs the calculated argument. The control unit controls the operation of the whole CORDIC algorithm and is responsible for the scheduling and control of the other individual units.
The purpose of the CORDIC optimization algorithm is to greatly reduce the iteration times of the CORDIC algorithm while maintaining the operation precision. Although the proposed optimization algorithm adds a division operation, it provides another practical method for optimizing the traditional CORDIC operation and improving the accuracy of the output result. Especially in the CORDIC optimization algorithm realized by pure software, as most of the embedded MCU instruction sets are integrated with the optimized division algorithm, the required resource consumption is not large; in addition, in some hardware circuits with division operation, the existing division calculation unit can be fully utilized, so that better optimization is made for low power consumption and low cost of the whole system.
The comparison of the optimized CORDIC algorithm with the conventional CORDIC algorithm (floating point operation) in terms of the number of iterations can be seen from table 1. The result is based on 4096 random complex numbers.
Table 1CORDIC optimization algorithm and conventional algorithm technique comparison
As can be seen from the comparison of the iteration numbers of the CORDIC optimization algorithm and the conventional algorithm, as shown in fig. 8, compared with the conventional CORDIC algorithm, the optimized CORDIC algorithm has the same calculation accuracy, the required iteration number is greatly reduced, the average iteration number only needs about 15% of the conventional algorithm, and the resource consumption of the CORDIC algorithm is greatly reduced.
In an embodiment of the present invention, based on the above-mentioned optimization method of the coordinate rotation digital computing method, an optimization system of the coordinate rotation digital computing method is further provided, where a structural block diagram of the optimization system is shown in fig. 9, and the optimization system includes:
a determining module 501, a judging module 502, a calculating module 503 and a completing module 504.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
the determining module 501 is configured to determine an initial input complex number and an initial iteration value corresponding to the initial input complex number;
the judging module 502 is configured to judge whether the initial iteration value reaches a preset iteration threshold;
the calculating module 503 is configured to perform iterative calculation according to the initial input complex number and the initial iterative value by using a coordinate rotation digital calculating method if not;
the completion module 504 is configured to obtain a target argument when the iteration value reaches the preset iteration threshold.
The invention discloses an optimization system of a coordinate rotation digital computing method, which comprises the following steps: in the initial calculation stage, corresponding initial input complex numbers and initial iteration values are determined by adjusting initial input data, whether the initial iteration values reach a preset iteration threshold is judged, when the initial iteration values are smaller than the preset iteration threshold, iterative calculation is carried out by adopting a coordinate rotation digital calculation method according to the initial input complex numbers and the initial iteration values to obtain target argument, the optimization system adjusts the initial input complex numbers in advance, corresponding initial input complex numbers and initial iteration values are determined, the target argument is calculated according to the initial input complex numbers and the initial iteration values, and the accuracy of iteration results can be improved and/or the iteration times can be reduced.
In the embodiment of the present invention, the block diagram of the determining module 501 is shown in fig. 10, and includes:
a first determination unit 505, a first search unit 506, and a second determination unit 507.
The first determining unit 505 is configured to take the original input complex number as the initial input complex number;
the first searching unit 506 is configured to search a preset phase table for each phase value smaller than a target phase value, where the target phase value is a ratio of an absolute value of an imaginary part of the initial input complex number to an absolute value of a real part of the initial input complex number;
the second determining unit 507 is configured to take an iteration value corresponding to a largest phase value among the phase values as the initial iteration value.
In the embodiment of the present invention, the block diagram of the determining module 501 is shown in fig. 10, and includes:
a first shifting unit 508, a third determining unit 509, and a fourth determining unit 510.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
the first shifting unit 508 is configured to perform the same shifting operation on the real part of the original input complex number and the imaginary part of the original input complex number, so as to obtain a first real part and a first imaginary part, where a maximum value of the absolute value of the first real part or the first imaginary part is located in a preset interval range;
the third determining unit 509 is configured to take a complex number composed of an absolute value of the first real part and an absolute value of the first imaginary part as an initial input complex number;
the fourth determining unit 510 is configured to take a default initial iteration value in the preset phase table as the initial iteration value.
In the embodiment of the present invention, the block diagram of the determining module 501 is shown in fig. 10, and includes:
a second shift unit 511, a fifth determination unit 512, a second search unit 513, and a sixth determination unit 514.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
the second shift unit 511 is configured to perform the same shift operation on the real part of the original input complex number and the imaginary part of the original input complex number, so as to obtain a first real part and a first imaginary part, where a maximum value of the absolute value of the first real part or the first imaginary part is located in a preset interval range;
the fifth determining unit 512 is configured to take a complex number composed of an absolute value of the first real part and an absolute value of the first imaginary part as an initial input complex number;
the second searching unit 513 is configured to search a preset phase table for each phase value smaller than a target phase value, where the target phase value is a ratio of an absolute value of an imaginary part of the initial input complex number to an absolute value of a real part of the initial input complex number;
the sixth determining unit 514 is configured to take an iteration value corresponding to a largest phase value among the phase values as the initial iteration value.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above describes in detail the method and system for optimizing the coordinate rotation digital computing method provided by the present invention, and specific examples are applied to illustrate the principle and implementation of the present invention, and the above description of the examples is only used to help understand the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (6)

1. A method for optimizing a coordinate rotation digital computing method, comprising:
determining an initial input complex number and an initial iteration value corresponding to the original input complex number;
judging whether the initial iteration value reaches a preset iteration threshold value or not;
if not, carrying out iterative computation by adopting a coordinate rotation digital computation method according to the initial input complex number and the initial iteration value;
when the iteration value reaches the preset iteration threshold value, obtaining a target argument;
the determining an initial input complex number and an initial iteration value corresponding to the original input complex number includes:
carrying out the same shift operation on the real part of the original input complex number and the imaginary part of the original input complex number to obtain a first real part and a first imaginary part, wherein the maximum value of the absolute value of the first real part or the first imaginary part is positioned in a preset interval range;
taking a complex number consisting of an absolute value of the first real part and an absolute value of the first imaginary part as an initial input complex number;
searching each phase value smaller than a target phase value in a preset phase table, wherein the target phase value is the ratio of the absolute value of the imaginary part of the initial input complex number to the absolute value of the real part of the initial input complex number;
and taking the iteration value corresponding to the largest phase value in the phase values as the initial iteration value.
2. The method as recited in claim 1, further comprising:
mapping the original input complex number to a rectangular coordinate first quadrant;
and mapping the target argument back to the interval of 0-2 pi according to the quadrant of the original input complex number in the rectangular coordinates.
3. The method of claim 1, wherein determining initial input complex numbers and initial iteration values corresponding to the original input complex numbers, replacing comprises:
carrying out the same shift operation on the real part of the original input complex number and the imaginary part of the original input complex number to obtain a first real part and a first imaginary part, wherein the maximum value of the absolute value of the first real part or the first imaginary part is positioned in a preset interval range;
taking a complex number consisting of an absolute value of the first real part and an absolute value of the first imaginary part as an initial input complex number;
and taking a default initial iteration value in the preset phase table as the initial iteration value.
4. The method of claim 1, wherein iteratively calculating using a coordinate rotation digital calculation method based on the initial input complex number and the initial iteration value comprises:
when any iteration is completed, taking the output complex number of the current iteration as the input complex number of the next iteration;
determining an iteration value of the next iteration;
and when the iteration value does not reach a preset iteration threshold, calculating by adopting a coordinate rotation digital calculation method according to the input complex number and the iteration value.
5. An optimization system for a coordinate rotation digital computing method, comprising:
the determining module is used for determining an initial input complex number and an initial iteration value corresponding to the original input complex number;
the judging module is used for judging whether the initial iteration value reaches a preset iteration threshold value or not;
the calculation module is used for carrying out iterative calculation by adopting a coordinate rotation digital calculation method according to the initial input complex number and the initial iterative value if not;
the completion module is used for obtaining a target argument when the iteration value reaches the preset iteration threshold value;
the determining module includes:
the second shifting unit is used for carrying out the same shifting operation on the real part of the original input complex number and the imaginary part of the original input complex number to obtain a first real part and a first imaginary part, wherein the maximum value of the absolute value of the first real part or the first imaginary part is positioned in a preset interval range;
a fifth determining unit for taking a complex number composed of an absolute value of the first real part and an absolute value of the first imaginary part as an initial input complex number;
the second searching unit is used for searching each phase value smaller than a target phase value in a preset phase table, wherein the target phase value is the ratio of the absolute value of the imaginary part of the initial input complex number to the absolute value of the real part of the initial input complex number;
and a sixth determining unit, configured to use an iteration value corresponding to a largest phase value among the phase values as the initial iteration value.
6. The system of claim 5, wherein the determination module is replaced with a system comprising:
the first shifting unit is used for carrying out the same shifting operation on the real part of the original input complex number and the imaginary part of the original input complex number to obtain a first real part and a first imaginary part, wherein the maximum value of the absolute value of the first real part or the first imaginary part is positioned in a preset interval range;
a third determining unit for taking a complex number composed of an absolute value of the first real part and an absolute value of the first imaginary part as an initial input complex number;
and the fourth determining unit is used for taking a default initial iteration value in the preset phase table as the initial iteration value.
CN201811487612.2A 2018-12-06 2018-12-06 Optimization method and system for coordinate rotation digital calculation method Active CN109345463B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811487612.2A CN109345463B (en) 2018-12-06 2018-12-06 Optimization method and system for coordinate rotation digital calculation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811487612.2A CN109345463B (en) 2018-12-06 2018-12-06 Optimization method and system for coordinate rotation digital calculation method

Publications (2)

Publication Number Publication Date
CN109345463A CN109345463A (en) 2019-02-15
CN109345463B true CN109345463B (en) 2023-07-21

Family

ID=65297399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811487612.2A Active CN109345463B (en) 2018-12-06 2018-12-06 Optimization method and system for coordinate rotation digital calculation method

Country Status (1)

Country Link
CN (1) CN109345463B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111800638B (en) * 2020-08-04 2022-10-28 西安博瑞集信电子科技有限公司 Decoding method and decoding device
CN113761462B (en) * 2021-09-10 2022-05-31 山东大学 Initial incident angle iterative computation improvement method based on frustum method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799565A (en) * 2011-05-26 2012-11-28 联芯科技有限公司 Method and device for improving coordinate rotation digital computation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799565A (en) * 2011-05-26 2012-11-28 联芯科技有限公司 Method and device for improving coordinate rotation digital computation

Also Published As

Publication number Publication date
CN109345463A (en) 2019-02-15

Similar Documents

Publication Publication Date Title
CN109345463B (en) Optimization method and system for coordinate rotation digital calculation method
CN107479856B (en) Arc tangent function data structure, establishing method, function value obtaining method and device
CN110971560A (en) QAM signal modulation method and device and electronic equipment
CN101930351B (en) Signal processing method and apparatus based on CORDIC
CN104301264A (en) Frequency offset compensation method
TWI420807B (en) An arbitrary frequency shifter in communication systems
CN107402743B (en) Phase demodulation device and method based on CORDIC algorithm
US8549056B2 (en) Apparatus and program for arctangent calculation
CN114567396A (en) Wireless communication method, fitting method of nonlinear function, terminal and equipment
CN109614073A (en) Four-quadrant arctan function hardware circuit implementation
Pfaff et al. Fourier filters, grid filters, and the fourier-interpreted grid filter
CN111198673B (en) Word length adjusting method, device, equipment and storage medium
US9354844B2 (en) Method and apparatus for iteratively calculating a value
WO2018196673A1 (en) Clustering method and device, and storage medium
CN112200299A (en) Neural network computing device, data processing method and device
CN113765838B (en) DPSK signal demodulation method, device, equipment and storage medium
CN110765238A (en) Data encryption query method and device
CN110495148B (en) Interpolation method for polar coordinate signal in Radio Frequency (RF) transmitter
CN110618729A (en) Baud rate generator, communication equipment and generation method of Baud rate clock signal
JP2013246772A (en) Inverse tangent arithmetic circuit and inverse tangent arithmetic method
CN115174338B (en) Frequency deviation determination method, frequency deviation determination device, storage medium and electronic equipment
CN115659380B (en) Ciphertext data fitting calculation method and device and electronic equipment
TWI748679B (en) Neural network processing device, data processing method and device
JP4105079B2 (en) Phase difference calculation circuit
CN108111086B (en) Method for improving instantaneity of direct torque control in switch meter mode

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
CB02 Change of applicant information

Address after: 518000 407-408, West building, Skyworth semiconductor design building, No. 18, gaoxinnan 4th Road, high tech Zone, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Angrui Microelectronics Technology Co.,Ltd.

Address before: 518063 A block 303, SKYWORTH building, Nanshan District science and Technology Park, Shenzhen, Guangdong.

Applicant before: SHENZHEN ZHONGKEHAN TIANXIA ELECTRONICS Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant