The CORDIC (COordinate Rotation DIgital Computer) was developed by Jack Volder in 1959 as an iterative algorithm to convert between polar and cartesian coordinates using shift, add and subtract operations only:
- Implemented with a Shift-Add/Subtract type algorithm
- Can be used to compute trigonometric, hyperbolic, linear and logarithmic functions
- Examples: sine, cosine, polar to rectangular coordinates, etc
- CORDIC algorithm generally produce one additional bit of accuracy for each iteration
- Applications
- Math co-processor, calculators, radar signal processors, robotics
In the circular rotation mode a CORDIC function could compute the cartisian coordinates of the target vector
We start from the idea that we have a vector
then
so that
It is important to remember that to obtain the rotation matrix you have to locate the final position to which the unit vectors of the reference plane move, in this particular case the unit vector
if we factor
If the rotation angles are restricted so that
|
||||
---|---|---|---|---|
The desired angle of rotation is obtained by performing a series of successively smaller and smaller elementary rotations. Where:
and we define an auxiliary variable to define the direction of rotation as:
Lets say our desired rotation is
We start at iteration
- If the angle
$Z_{i} > 0$ then we subtract the$\tan \phi$ angle, in other words$d_{i} = 1$ , - otherwise we add the
$\tan \phi$ angle, in other words$d_{i} = -1$ , and also make our appropriate$\mathbf{x_{n}}$ y$\mathbf{y_{n}}$ .
Iteration | ( |
|||
---|---|---|---|---|
If we add all the angles with the corresponding sign we get:
So if we add the initial angle and all the angles of the iterations with the corresponding sign we get zero.
So summarizing the above we can generate an iterative equation if we define the following:
written another way:
With
Using the cosine property:
this means that cosine is independent of the direction of rotation, then we can rewrite our equation
where:
note that
then
Removing the scale constant from the iterative equations yields a shift-add algorithm for vector rotation. The product of the
The gain
It also needs to be noted that the previous equations are valid for rotations angles between:
In order to increase the convergence range for all rotation angles
It is worth noting that there is no growth or gain due to this initial rotation.
Finally, we obtain:
Where
What happens to
Therefore after
If we want the rotation to be performed correctly, both magnitude and phase, it is necessary to multiply at the end by
If
and if
- [1] CORDIC design in Verilog to produce sine and cosine functions, (Nov. 12, 2013). Accessed: Jul. 07, 2024. [Online Video]. Available: https://www.youtube.com/watch?v=pTgmySlijAs