CN113127802B - Complex logarithm implementation method, device and equipment based on CORDIC algorithm and computer storage medium - Google Patents

Complex logarithm implementation method, device and equipment based on CORDIC algorithm and computer storage medium Download PDF

Info

Publication number
CN113127802B
CN113127802B CN202110459595.7A CN202110459595A CN113127802B CN 113127802 B CN113127802 B CN 113127802B CN 202110459595 A CN202110459595 A CN 202110459595A CN 113127802 B CN113127802 B CN 113127802B
Authority
CN
China
Prior art keywords
yin
value
vector
real part
cordic
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
CN202110459595.7A
Other languages
Chinese (zh)
Other versions
CN113127802A (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.)
Nanjing University
Original Assignee
Nanjing University
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 Nanjing University filed Critical Nanjing University
Priority to CN202110459595.7A priority Critical patent/CN113127802B/en
Publication of CN113127802A publication Critical patent/CN113127802A/en
Application granted granted Critical
Publication of CN113127802B publication Critical patent/CN113127802B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/544Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation
    • G06F7/5446Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation using crossaddition algorithms, e.g. CORDIC
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Complex Calculations (AREA)

Abstract

The invention provides a complex logarithm implementation method, a device, equipment and a computer storage medium based on a CORDIC algorithm for the first time, which mainly utilize a circumferential vector module (VC-CORDIC) and a hyperbolic vector module (VH-CORDIC) to perform cascade operation. Firstly, inputting a real part and an imaginary part of a required calculation object into a circumferential vector module (VC-CORDIC) for iterative calculation, wherein the VC-CORDIC module obtains an imaginary part and a real part intermediate value of a calculated result; then, the adjacent value of the real part intermediate value is used as the input of the VH-CORDIC module to carry out iterative computation, the obtained result is subjected to subtraction and shift operation to obtain the real part of the obtained result, the computation complexity is further reduced, and compared with the traditional lookup table and linear approximation method, the method has the characteristics of high precision, small area and low power consumption.

Description

Complex logarithm implementation method, device and equipment based on CORDIC algorithm and computer storage medium
Technical Field
The invention relates to the field of complex logarithmic calculation realization, in particular to a complex logarithmic realization method, device and equipment based on a CORDIC algorithm and a computer storage medium.
Technical Field
Complex algorithms have great applications in cryptography, radar, digital signal processing, where not only hardware is required to have high computational speed, but also circuits have smaller area and power consumption, but in reality, real number logarithmic application to complex fields cannot be achieved if there is a lack of hardware and processing methods between them.
At present, a lookup table and a linear approximation method are adopted, firstly, multiplication is adopted in the methods, the throughput of a circuit is reduced, large area loss is brought, if a large input range and high precision are needed, a plurality of fixed values can be accessed in the lookup table, so that the problems of area and complexity are brought, and the searching time is slow; the linear approximation method accesses fewer values than the look-up table method, but the accuracy is not very high.
Therefore, the existing methods have some defects in area, precision, power consumption and complexity, and a brand new hardware architecture and processing method for realizing complex logarithm are needed.
Disclosure of Invention
The invention aims to: the hardware implementation method based on the complex logarithm of the CORDIC algorithm is provided to solve the problems in the prior art, and the cascade operation of a circumference vector module (VC-CORDIC) and a hyperbolic vector module (VH-CORDIC) is used to realize the calculation of the complex logarithm, so that the method has the characteristics of high precision and low complexity, further reduces the calculation area of the algorithm, and reduces the power consumption.
The technical scheme is as follows: in a first aspect, a method for implementing complex logarithms based on a CORDIC algorithm is provided, and the method is characterized in that the method includes:
step 1, taking a real part and an imaginary part of complex logarithms as numerical values of a circumferential vector mode, calculating the circumferential vector mode according to preset iteration times to obtain results of a real part intermediate value and an imaginary part in the circumferential vector mode, outputting the results, and then entering the step 2;
step 2, taking two values adjacent to the real part intermediate value as input values of a hyperbolic vector mode, calculating the hyperbolic vector mode according to preset iteration times to obtain a result of the real part intermediate value in the hyperbolic vector mode, and then entering step 3;
and step 3, subtracting and shifting the result of the real part intermediate value in the hyperbolic vector mode to obtain a real part result.
In some implementations of the first aspect, the circular vector pattern iteration formula is as follows:
xin j+1 =xin j -alpha*2 -j *yin j
yin j+1 =yin j +alpha*2 -j *xin j
zin j+1 =zin j -alpha*tan -1 (2 -j )。
where j is the number of iterations; xin (xin) j+1 The value is the x value of the corresponding coordinate of the vector point in the circumferential system at the j+1th iteration; yin (yoin) j+1 The y value of the corresponding coordinate of the vector point in the circumferential system at the j+1th iteration; zin (Zin) j+1 Is the cumulative sum of the angles of rotation; yin (yoin) j Greater than 0, alpha is 1, representing a clockwise rotation; yin (yoin) j Less than or equal to 0, alpha is-1, representing a counter-clockwise rotation.
In some implementations of the first aspect, the hyperbolic vector mode iterative formula is as follows:
the reverse iteration formula is:
the forward iterative formula is:
xin j+1 =xin j +alpha*2 -j *yin j
yin j+1 =yin j +alpha*2 -j *xin j
zin j+1 =zin j -alpha*arctanh(2 -j )。
in the forward and reverse iteration formulas, j is the iteration number; xin (xin) j+1 Is at the j+1th iterationThe x value, yin of the corresponding coordinate of the vector point in the hyperbolic system j+1 Is the y value of the corresponding coordinate of the vector point under the hyperbolic system in the j+1th iteration; zin (Zin) j+1 Is the cumulative sum of the angles of rotation; yin (yoin) j Greater than 0, alpha is 1, representing a clockwise rotation; yin (yoin) j Less than or equal to 0, alpha is-1, representing a counter-clockwise rotation.
In some implementations of the first aspect, the real intermediate value and the imaginary result of the circular vector pattern calculation are:
wherein K is c The module length compensation factor is rotated for the circumferential vector,a is the real part of the complex logarithm ln (a+i×b), and b is the imaginary part.
In some implementations of the first aspect, the intermediate value result of the hyperbolic vector pattern calculation is:
wherein a is the real part of the complex logarithm ln (a+i b), b is the imaginary part, K c A module length compensation factor for rotation under a circumferential vector, wherein
In some implementations of the first aspect, the bit width of the intermediate variable is defined internally using a parameter-defined method when the circular vector pattern and the hyperbolic vector pattern are iterated in opposite directions.
In a second aspect, an apparatus based on a CORDIC algorithm is presented, the apparatus comprising:
the circumference vector module is used for calculating the middle value of the imaginary part and the real part of the input numerical value;
and the hyperbolic vector module is used for calculating the real part of the input numerical value.
In a third aspect, an apparatus based on CORDIC algorithm is presented, the apparatus comprising:
a processor and a memory storing computer program instructions;
the processor, when reading and executing the computer program instructions, implements the first aspect or a complex logarithm implementation of some of the realizations of the first aspect.
In a fourth aspect, a computer readable storage medium is presented, having stored thereon computer program instructions which, when executed by a processor, implement the complex logarithm implementation method of the first aspect or of some of the realizations of the first aspect.
The beneficial effects are that: the invention provides a complex logarithm implementation method, a device, equipment and a computer storage medium based on a CORDIC algorithm for the first time, which mainly utilize a circumferential vector module (VC-CORDIC) and a hyperbolic vector module (VH-CORDIC) to perform cascade operation. Firstly, inputting a real part and an imaginary part of a required calculation object into a circumferential vector module (VC-CORDIC) for iterative calculation, wherein the VC-CORDIC module obtains an imaginary part and a real part intermediate value of a calculated result; and then, the adjacent value of the real part intermediate value is used as the input of the VH-CORDIC module to carry out iterative computation, and the obtained result is subjected to subtraction and shift operation to obtain the real part of the obtained result, so that the computational complexity is further reduced, and compared with the traditional lookup table and linear approximation method, the method has the characteristics of high precision, small area, low power consumption and the like.
Drawings
FIG. 1 is a schematic diagram of a hardware implementation flow of the complex logarithm of the present invention;
FIG. 2 is a graph showing the relationship between the average error and the number of forward iterations in the complex logarithmic implementation of the present invention;
FIG. 3 is a schematic diagram of a hardware architecture for implementing complex logarithms of the present invention;
FIG. 4 is a schematic diagram of the arctangent and arctangent hyperbolic function values required to be stored in the lookup table of the present invention;
FIG. 5 is a diagram showing a lookup mode of the internal arctangent function value of the VC-CORDIC of the present invention;
FIG. 6 is a schematic diagram of a lookup mode of internal arctangent hyperbolic function values of a VH-CORDIC of the present invention;
FIG. 7 is a diagram showing the comparison of errors in the hardware and software results.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the invention may be practiced without one or more of these details. In other instances, well-known features have not been described in detail in order to avoid obscuring the invention.
The applicant believes that: the current lookup table and linear approximation method uses multiplication, the multiplication can reduce the throughput of a circuit and bring large area loss, if a large input range and high precision are needed, a plurality of fixed values can be accessed in the lookup table, thus not only bringing the problems of area and complexity, but also slowing down the lookup time; the linear approximation method accesses fewer values than the look-up table method, but the accuracy is not very high.
Therefore, the scheme aims to design a complex logarithm implementation method, device, equipment and computer storage medium based on a CORDIC algorithm, and the circular vector module (VC-CORDIC) is utilized to carry out cascade operation by the hyperbolic vector module (VH-CORDIC). Firstly, inputting a real part and an imaginary part of a required calculation object into a circumferential vector module (VC-CORDIC) for iterative calculation, wherein the VC-CORDIC module obtains an imaginary part and a real part intermediate value of a calculated result; and then, the adjacent value of the real part intermediate value is used as the input of the VH-CORDIC module to carry out iterative computation, and the obtained result is subjected to subtraction and shift operation to obtain the real part of the obtained result, so that the computational complexity is further reduced, and compared with the traditional lookup table and linear approximation method, the method has the characteristics of high precision, small area, low power consumption and the like.
Embodiment one:
first, the complex logarithm result calculation may be converted into two parts, as follows:
wherein a and b are the real and imaginary parts of a complex logarithmic function, respectively, Φ is the angle, and k is any integer.
If there are a plurality of k results corresponding to a complex number z=a+bi, the implementation can be performed by adding a constant in hardware, and for simplicity, the implementation of this embodiment sets k in the above formula to 0, and the modulus and angle of the complex number are:
wherein |Z| is a complex modulus; θz is a complex number of angles.
The implementation process mainly comprises the following steps:
range extension
When the CORDIC algorithm is iterated, the error can be reduced by increasing the iteration times within a certain range, and when the iteration times are smaller than 10 times, the error is larger than 10 -4 The invention selects the iteration times of 10-19 to perform software simulation, 10000 random numbers are selected randomly under each iteration to obtain respective average errors, the software simulation result is shown in figure 2, and when the forward iteration times are 15, the errors are 10 -6 The magnitude has high precision and stability, and gives consideration to both errors and resource consumption of hardware implementation, and the hardwareIn the implementation, the forward iteration number is set to 15; in the iterative process of VC-CORDIC and VH-CORDIC, the final output result is required to be converged due to the limitation of the nature of the CORDIC, so that the input of complex logarithms has certain requirement limitation, and the convergence range of VC-CORDIC and VH-CORDIC has certain requirement:
wherein the requirements of VC-CORDIC are:
wherein x is 0 ,y 0 The initial x, y values of VC-CORDIC, respectively.
Wherein the requirements of the VH-CORDIC are:
wherein x is 0 ,y 0 The initial x, y values for VH-CORDIC, respectively.
In this case, the range of the plural angles is:
-99.88°≤θz≤99.88°
because the angle of θz needs to be at least minus 180 degrees, the complex numbers on all complex axes can be represented by the angle that the number of the first quadrant rotates 180 degrees or less, when the range expansion is needed, the VC-CORDIC and the VH-CORDIC are expanded by adopting a reverse iteration method, the more the number of reverse iterations is, the larger the rotation angle supported by the VC-CORDIC is, the more the reverse iteration expansion method is adopted, when the number of iterations is j= -2, -1,0 … …, the rotation angle supported by the VC-CORDIC is expanded from 99.88 degrees to 239.3 degrees, and at the moment, the complex numbers on all complex axes can be converted into the angle that the first quadrant rotates within 180 degrees. Similarly, after two backward iterations of the VH-CORDIC, the requirements for obtaining the anti-hyperbolic tangent function of the VH-CORDIC are:
since the value of Kc coming out via VC-CORDIC is about 3.2932, after substitution to the above formula, |z| will be extended to [2.9257 ×10 ] -7 ,3.1510×10 5 ]In addition, as the number of reverse iterations increases, the supported range is larger, so the number of reverse iterations can be set according to the range requirement, and the embodiment realizes that j= -2, -1,0 … is selected for operation.
VC-CORDIC iteration formula
The reverse iteration formula and the forward iteration formula of the VC-CORDIC are the same, and in the iteration process, x, y and z are updated according to the following formula:
xin j+1 =xin j -alpha*2 -j *yin j
yin j+1 =yin j +alpha*2 -j *xin j
zin j+1 =zin j -alpha*tan -1 (2 -j )
wherein xin j+1 The value is the x value of the corresponding coordinate of the vector point in the circumferential system at the j+1th iteration; yin (yoin) j+1 Is the y value, zin of the corresponding coordinate of the vector point in the circumferential system at the j+1th iteration j+1 Is the cumulative sum of the angles of rotation; alpha is composed of yin j Value determination of yin j Greater than 0, alpha is 1, representing a clockwise rotation, otherwise alpha is-1, representing a counterclockwise rotation.
VH-CORDIC iteration formula
When the range is expanded by the reverse iteration of the VH-CORDIC, the method is needed to use according to the requirement of the reverse iteration expansion methodReplace 2 -j When iteration is performed, i.e., j= -2, -1,0, x, y, z are updated according to the following formula:
and when the iteration number counter is larger than 0, forward iteration is carried out, and in the forward iteration process, x, y and z are updated according to the following formula:
xin j+1 =xin j +alpha*2 -j *yin j
yin j+1 =yin j +alpha*2 -j *xin j
zin j+1 =zin j -alpha*arctanh(2 -j )。
wherein xin in forward and reverse iterations j+1 ,yin j+1 Is the x value and the y value of the corresponding coordinates of the vector point under the hyperbolic system at the j+1th iteration, zin j+1 Is the sum of the angles of rotation, alpha is defined by yin j Value determination of yin j Greater than 0, alpha is 1, representing a clockwise rotation, otherwise alpha is-1, representing a counterclockwise rotation.
Arctangent value and arctangent hyperbolic value processing
In the process of iteration, the arctangent value and the arctangent hyperbola value are needed, in the process of iteration, the arctangent value and the arctangent hyperbola value needed to be stored are shown in fig. 4, and when the number of forward iterations reaches a certain value, the arctangent value and the arctangent hyperbola value can be obtained by right shift, so that the arctangent value and the arctangent hyperbola value in a stored lookup table can be reduced to reduce the area. Therefore, according to fig. 4, in VC-CORDIC, only the values of the first 7 iterations of the forward iteration are stored, and the values of the 8 th to 15 th iterations are obtained by right shifting the value of the 7 th iteration, and the operation process is shown in fig. 5; VH-CORDIC stores the first 6 hyperbolic tangents of the forward iteration, obtained by the 6 th shift in the calculation of the 7 th to 15 th arc tangent hyperbolic tangents, and the procedure is shown in fig. 6.
Pseudo-rotation coefficient processing
After calculation by the VC-CORDIC module, the resulting real part intermediate value isAt this time, the value of the pseudo rotation coefficient Kc is not calculated, division operation is avoided, the real part intermediate value is integrally substituted, the real part intermediate value is sent into a VH-CORDIC module for calculation, and after the calculation of the VH-CORDIC module, the real part intermediate value is obtained as follows:
wherein, the liquid crystal display device comprises a liquid crystal display device,is a constant value, and the real part is obtained by subtracting and shifting again.
In software simulations, the magnitude of the average error was 10 -6 To meet this precision, the hardware sets a decimal 19bit (1/2 -19 1.907 x 10 -6 ) The integer part is adjusted according to the requirement, and the invention is implemented by [ -31,31]For example, 5 integer data bits and 1 sign bit are set; in the lookup table, the arctangent function value and the arctangent hyperbolic function value are set to 22 bits according to the range of the value, wherein the sign bit is 1bit, the integer bit is 2 bits, and the decimal is 19 bits. Hardware architecture as shown in fig. 3, only shift and add operations are required in addition to the two CORDIC operations, so the hardware has less complexity. The sizes of a and b in the hardware are [ -31,31]Through simulation, the whole area is 2096.86um under TSMC28nm 2 Is 1.2031MW at 1.5 GHz. As shown in fig. 7, the hardware implementation results are consistent with the software, as can be seen from the figure, by selecting 16 error results as an example.
Embodiment two:
the hardware architecture diagram based on the complex logarithm of the CORDIC algorithm is shown in fig. 3, and the implementation flow is as follows:
initializing parameters
Initializing parameters, namely initializing iteration number iter=15, and initializing an iteration number counter j= -2 and j_hv= -2.
VC-CORDIC iteration
And (3) respectively iterating a and b as initial values of x and y of the VC-CORDIC, wherein at the moment, the initial value of z is set to 0, firstly, performing reverse iteration to expand the range, then performing forward iteration, and updating the x, y and z in the iteration process according to the following formula:
xin j+1 =xin j -alpha*2 -j *yin j
yin j+1 =yin j +alpha*2 -j *xin j
zin j+1 =zin j -alpha*tan -1 (2 -j )
wherein xin j+1 The value is the x value of the corresponding coordinate of the vector point in the circumferential system at the j+1th iteration; yin (yoin) j+1 Is the y value, zin of the corresponding coordinate of the vector point in the circumferential system at the j+1th iteration j+1 Is the cumulative sum of the angles of rotation; alpha is composed of yin j Value determination of yin j Greater than 0, alpha is 1, representing a clockwise rotation, otherwise alpha is-1, representing a counterclockwise rotation.
In hardware, the formulas in the above can be obtained by addition, subtraction and shift operation, wherein the function value of the arctangent is obtained by adding shift to the lookup table, and the specific way is shown in fig. 5. When the iteration times reach, the forward iteration of the VC-CORDIC is completed, and the obtained x and z are the real part intermediate value x of the complex logarithm n And imaginary part theta, i.e
Iteration by VH-CORDIC
Will x n +1,x n -1 iterates as initial values of x and y of VH-CORDIC, respectively, with initial value of zin set to 0, wherein arctangent hyperbolaThe function value of (2) is obtained by adding shift to the lookup table, and the specific method is as shown in fig. 6, and the reverse iteration is performed first, wherein x, y and z in the reverse iteration are updated according to the following formula:
and when the iteration number counter is larger than 0, forward iteration is carried out, wherein x, y and z in the iteration process are updated according to the following formula:
xin j+1 =xin j +alpha*2 -j *yin j
yin j+1 =yin j +alpha*2 -j *xin j
zin j+1 =zin j -alpha*arctanh(2 -j )
wherein xin in forward and reverse iterations j+1 ,yin j+1 Is the x value and the y value of the corresponding coordinates of the vector point under the hyperbolic system at the j+1th iteration, zin j+1 Is the sum of the angles of rotation, alpha is defined by yin j Value determination of yin j Greater than 0, alpha is 1, representing a clockwise rotation, otherwise alpha is-1, representing a counterclockwise rotation.
Finally, the real part intermediate value z is obtained n
Calculated to obtain the real part
After calculating the real part intermediate value of the result, the subtraction operation is performed first:
then the zn after subtraction is shifted one bit to the left, and the value of zn is doubled, so that the real part of the obtained result is finally obtained. And the calculation of the real part and the imaginary part of the whole complex logarithm is completed.
In summary, the invention provides a high-precision and low-complexity complex logarithm hardware implementation method based on a CORDIC algorithm, which is based on a complex logarithm hardware computing architecture of the CORDIC algorithm, realizes complex logarithm computation by using VC-CORDIC and VH-CORDIC, and can complete computation by performing addition, subtraction and displacement operations, and meanwhile, the method for storing less arctangent values and arctangent hyperbolic values is adopted, so that the method has the characteristics of high precision and low complexity, further reduces the computing area of the algorithm, reduces power consumption and saves resources.
As described above, although the present embodiment has been shown and described with reference to certain preferred embodiments, it is not to be construed as limiting the present embodiment itself. Various changes in form and details may be made therein without departing from the spirit and scope of the present embodiments as defined by the appended claims.

Claims (5)

1. A method for implementing complex logarithms based on a CORDIC algorithm, the method comprising:
step 1, taking a real part and an imaginary part of complex logarithms as numerical values of a circumferential vector mode, calculating the circumferential vector mode according to preset iteration times to obtain results of a real part intermediate value and an imaginary part in the circumferential vector mode, outputting the results, and then entering the step 2;
the iterative formula of the circumferential vector mode described in the step 1 is as follows:
xin j+1 =xin j -alpha*2 -j *yin j
yin j+1 =yin j +alpha*2 -j *xin j
zin j+1 =zin j -alpha*tan -1 (2 -j );
where j is the number of iterations; xin (xin) j+1 The value is the x value of the corresponding coordinate of the vector point in the circumferential system at the j+1th iteration; yin (yoin) j+1 The y value of the corresponding coordinate of the vector point in the circumferential system at the j+1th iteration; zin (Zin) j+1 Is the cumulative sum of the angles of rotation; yin (yoin) j Greater than 0, alpha is 1, representing a clockwise rotation; yin (yoin) j Less than or equal to 0, alpha is-1, representing counterclockwise rotation;
the real intermediate and imaginary results of the circular vector pattern calculation are:
wherein K is c The module length compensation factor is rotated for the circumferential vector,a is the real part of the complex logarithm ln (a+i b), b is the imaginary part;
step 2, taking two values adjacent to the real part intermediate value as input values of a hyperbolic vector mode, calculating the hyperbolic vector mode according to preset iteration times to obtain a result of the real part intermediate value in the hyperbolic vector mode, and then entering step 3;
the hyperbolic vector mode iterative formula described in the step 2 is as follows:
3.1 reverse iteration formula is:
3.2 forward iterative formula:
xin j+1 =xin j +alpha*2 -j *yin j
yin j+1 =yin j +alpha*2 -j *xin j
zin j+1 =zin j -alpha*arctanh(2 -j );
in the forward and reverse iteration formulas, j is the iteration number; xin (xin) j+1 Is the x value, yin of the corresponding coordinate of the vector point in the hyperbolic system at the j+1th iteration j+1 Is the y value of the corresponding coordinate of the vector point under the hyperbolic system in the j+1th iteration; zin (Zin) j+1 Is the cumulative sum of the angles of rotation; yin (yoin) j Greater than 0, alpha is 1, representing a clockwise rotation; yin (yoin) j 0 or less, aplha being-1, representing a counter-clockwise rotation;
the intermediate value result of the hyperbolic vector mode calculation is:
wherein a is the real part of the complex logarithm ln (a+i b), b is the imaginary part, K c A module length compensation factor for rotation under a circumferential vector, wherein
And step 3, subtracting and shifting the result of the real part intermediate value in the hyperbolic vector mode to obtain a real part result.
2. The method according to claim 1, wherein the bit width of the intermediate variable is defined by a parameter definition method when the circular vector mode and the hyperbolic vector mode are iterated reversely.
3. A complex logarithm realization device for performing the complex logarithm realization method according to claim 1 or 2, characterized in that the device comprises:
the circumference vector module is used for calculating the middle value of the imaginary part and the real part of the input numerical value;
and the hyperbolic vector module is used for calculating the real part of the input numerical value.
4. A device for implementing complex logarithms based on CORDIC algorithm, the device comprising:
a processor and a memory storing computer program instructions;
the processor reads and executes the computer program instructions to implement the complex logarithmic implementation method of claim 1 or 2.
5. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon computer program instructions, which when executed by a processor, implement the complex logarithm implementation method according to claim 1 or 2.
CN202110459595.7A 2021-04-27 2021-04-27 Complex logarithm implementation method, device and equipment based on CORDIC algorithm and computer storage medium Active CN113127802B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110459595.7A CN113127802B (en) 2021-04-27 2021-04-27 Complex logarithm implementation method, device and equipment based on CORDIC algorithm and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110459595.7A CN113127802B (en) 2021-04-27 2021-04-27 Complex logarithm implementation method, device and equipment based on CORDIC algorithm and computer storage medium

Publications (2)

Publication Number Publication Date
CN113127802A CN113127802A (en) 2021-07-16
CN113127802B true CN113127802B (en) 2023-08-08

Family

ID=76780153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110459595.7A Active CN113127802B (en) 2021-04-27 2021-04-27 Complex logarithm implementation method, device and equipment based on CORDIC algorithm and computer storage medium

Country Status (1)

Country Link
CN (1) CN113127802B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984227A (en) * 2020-08-26 2020-11-24 南京大学 Approximate calculation device and method for complex square root
CN111984226A (en) * 2020-08-26 2020-11-24 南京大学 Cube root solving device and solving method based on hyperbolic CORDIC
CN112486455A (en) * 2020-11-27 2021-03-12 南京大学 Hardware computing system and computing method for solving complex N-time root opening numbers based on CORDIC method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5655334B2 (en) * 2010-03-19 2015-01-21 ソニー株式会社 Image processing apparatus and method, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984227A (en) * 2020-08-26 2020-11-24 南京大学 Approximate calculation device and method for complex square root
CN111984226A (en) * 2020-08-26 2020-11-24 南京大学 Cube root solving device and solving method based on hyperbolic CORDIC
CN112486455A (en) * 2020-11-27 2021-03-12 南京大学 Hardware computing system and computing method for solving complex N-time root opening numbers based on CORDIC method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Hyperbolic CORDIC-Based Architecture for Computing Logarithm and Its Implementation;Hui Chen等;《IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS—II: EXPRESS BRIEFS》;第67卷(第11期);第2652-2656页 *

Also Published As

Publication number Publication date
CN113127802A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
US9813224B2 (en) Digital processor having instruction set with complex angle function
Kumar FPGA implementation of the trigonometric functions using the CORDIC algorithm
CN107305484B (en) Nonlinear function operation device and method
Ngo et al. A pipelined architecture for real-time correction of barrel distortion in wide-angle camera images
EP3803718A1 (en) Evaluating quantum computing circuits in view of the resource costs of a quantum algorithm
Chinnathambi et al. FPGA implementation of fast and area efficient CORDIC algorithm
CN112051980A (en) Non-linear activation function computing device based on Newton iteration method
Hussain et al. An efficient and fast softmax hardware architecture (EFSHA) for deep neural networks
CN110187866B (en) Hyperbolic CORDIC-based logarithmic multiplication computing system and method
CN110097613B (en) B spline curve generation method and system based on probability calculation
Rekha et al. FPGA implementation of exponential function using cordic IP core for extended input range
CN113127802B (en) Complex logarithm implementation method, device and equipment based on CORDIC algorithm and computer storage medium
Wei et al. Revisit to floating-point division algorithm based on Taylor-series expansion
Yan et al. Revisiting the adjoint matrix for FPGA calculating the triangular matrix inversion
Nair et al. FPGA implementation of area and speed efficient CORDIC algorithm
CN113778378A (en) Device and method for solving complex number N-degree square root
Naresh et al. An area efficient multiplexer based CORDIC
Wadkar et al. Low latency scaling-free pipeline CORDIC architecture using augmented Taylor series
Kawamura et al. Efficient algorithms for sign detection in RNS using approximate reciprocals
Saha et al. High speed multiplier using high accuracy floating point logarithmic number system
CN115469829B (en) Arithmetic device and exponent arithmetic method based on arithmetic circuit
Hao et al. A VLSI implementation of double precision floating-point logarithmic function
Li et al. A novel area-efficient fast CORDIC for energy-efficient adaptive exponential integrate and fire neuron design
Tian et al. A low-latency power series approximate computing and architecture for co-calculation of division and square root
CN113595681B (en) QR decomposition method, system, circuit, equipment and medium based on Givens rotation

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
GR01 Patent grant
GR01 Patent grant