Академический Документы
Профессиональный Документы
Культура Документы
CORDIC
Coordinate Rotation Digital Computer
Invented in late 1950s
Based on the observation that:
if you rotate a unit-length vector (1,0)
by an angle z
its new end-point will be at (cos z, sin z)
1959
1971
1977
True Rotations
Pseudo-Rotations
After m Pseudo-Rotations
Rotate by angles
1 , 2 , L , m
Expansion Factor K
By product of pseudo-rotations
Depends on the rotation angles.
However, if we always uses the same
rotation angles (with positive and negative
signs), then
K is a constant
Can be precomputed and stored
Its reciprocal can also be computed and stored
26.6 0.500
2 14.0 0.250
3
7.1 0.125
CORDIC Pseudo-Rotations
( i ) = tan 1 2 i
tan (i ) = 2 i
Table can
be done in
degrees or
radians.
Example
Example
(First 3 Rotations)
z0
x cos(z)
y sin (z)
y/x tan (z)
10
Precision in CORDIC
For k bits of precision in trig functions,
k iterations are needed.
For large i, tan(2i) 2i
For i > k , change in z < ulp
Convergence is guaranteed for angles in
range 99.7 z 99.7
(99.7 is sum of all angles in the table)
Forces y(m) to 0
11
CORDIC Hardware
12
Bit-Serial CORDIC
For low cost, low speed application (hand
held calculators) bit-serial implementations
are possible.
Generalized CORDIC
13
Circular
Circular Rotation Mode
Linear
Linear Rotation Mode
14
Hyperbolic
Hyperbolic Rotation Mode
Linear
Hyperbolic
15
Convergence
Circular and Linear CORDIC converge for
suitably restricted values of x, y, and z.
Hyperbolic will not converge for all cases.
A simple solution to this problem is to
repeat steps:
i = 4, 13, 40, 121, . , j, 3j+1, .
With these precautions, hyperbolic will
converge for suitable restricted values of x,
y, and z
Using CORDIC
Directly computes :
sin
tan 1 ( y x)
y + xz
cos
tan 1
sinh
cosh
tanh 1
x2 + y2
x2 y2
e z = sinh z + cosh z
16
Using CORDIC
Indirectly Computes :
sin z
tan z =
cos z
sinh z
tanh z =
cosh z
w 1
w +1
log b w = K ln w
ln w = 2 tanh 1
w =e
t
t ln w
cos w = tan
sin 1 w = tan 1
(
= ln (w +
1 w2
w
w
1 w2
)
1+ w )
cosh 1 = ln w + 1 w 2
sinh 1
w = ( w + 1 4) 2 ( w 1 4) 2
Summary
Table of
CORDIC
Algorithms
17
K doesnt change.
18