1 / 24

COordinate Rotations DIgital Computer Real Rotation

CORDIC. COordinate Rotations DIgital Computer Real Rotation x (i+1) = R (i) cos( + (i) ) = x (i) cos  (i) – y (i) sin  (i) y (i+1) = R (i) sin( + (i) ) = y (i) cos  (i) + x (i) sin  (i). Real rotation. Real Rotation x (i+1) = x (i) cos  (i) – y (i) sin  (i)

ronny
Download Presentation

COordinate Rotations DIgital Computer Real Rotation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CORDIC • COordinate Rotations DIgital Computer • Real Rotation • x(i+1)= R(i)cos(+(i)) = x(i)cos(i) – y(i) sin (i) • y(i+1)= R(i)sin(+(i)) = y(i)cos(i) + x(i) sin(i)

  2. Real rotation • Real Rotation • x(i+1)= x(i)cos(i) – y(i) sin(i) • y(i+1)= y(i)cos(i) + x(i) sin(i) • z(i+1)= z(i) – (i) • z(0)=wanted rotation • z(i+1)0 • R(i+1)= R(i) in real rotation • Let x(0)= x, y(0)= y, z(0)= z

  3. Real rotation(2) • After m iterations: • x(m)=xcos((i)) – ysin ((i)) • y(m)= ycos((i)) + xsin((i)) • z(m)= z– ((i))

  4. Pseudo-rotation • Pseudo-Rotation • R(i+1)= R(i) (1+tan2(i))1/2 • x(i+1)= R(i+1) cos(+(i)) = x(i)– y(i) tan(i) • y(i+1)= R(i+1)sin(+(i)) = y(i) + x(i) tan(i) • z(i+1)= z(i) – (i) • Let x(0)= x, y(0)= y, z(0)= z

  5. Pseudo-rotation(2) • After m iterations: • x(m)=(xcos((i))–ysin ((i))) (1+tan2(i))1/2 =K(xcos((i))–ysin ((i))) • y(m)=(ycos((i))+xsin((i))) (1+tan2(i))1/2 ) =K(ycos((i))+xsin((i))) • z(i+1)= z(i) – ((i))

  6. Rotation mode Operation • CORDIC • Select (i)= di2–i • x(i+1)= x(i)–di y(i)2–i • y(i+1)= y(i)+ di x(i)2–i • z(i+1)= z(i) –di tan–12–i • Store tan–12–i at a table (right)

  7. Rotation mode (2) • Example z(m)0 • z(0)= 30.0 • After 7 iterations: • Rotation: • x(m)=K(xcos z –ysin z) • y(m)=K(ycos z +xsin z) • z(0)=0 • Rule: di=1 s.t. z(m)0

  8. Rotation mode (3) • K=1.646760258121... • z(k)0 (k-bit k iteration) • Compute cos z • Let x=1/K & y=0 • obtain x(m)=cos z • Computer sin z • Let y=1/K & x=0 • obtain y(m)=cos z • Rotation: • x(m)=K(xcos z –ysin z) • y(m)=K(ycos z +xsin z) • z(0)=0 • Rule: di=1 s.t. z(m)0

  9. Rotation mode(4) • Convergence • if i large, then tan–12–i=2–i • z (m)0 possible for z(i)  z(i+1) • 99.7° z  – 99.7converge

  10. Vectoring mode • y(m)  0 by selecting di= –sign (x(i)y(i)) • After m iterations: • tan((i))= – x/y • x(m)= K[xcos ( (i) ) –ysin ((i))] =K(x–ytan((i)))/ (1+tan2 ((i)))1/2 =K(x2+y2)1/2 • y(m) =0; z(m) =z+tan–1(y/x) • Rule: di=1 s.t. y(m)0

  11. Vectoring mode(2) • Obtain tan–1y by selecting x=1 & z=0 • x(m)= K(1+y2)1/2 • y(m) =0 • z(m) = tan–1y • Obtain tan–1(1/y)= /2 – tan–1y

  12. CORDIC Hardware

  13. Generalized CORDIC • General CORDIC iteration • x(i+1)= x(i)–di y(i)2–i • y(i+1)= y(i)+ di x(i)2–i • z(i+1) = z(i) –di e(i) •  =1: e(i) =tan–12–i Circular (basic) rotation • =0: e(i) =2–i Linear rotation • = –1: e(i) =tanh–12–i Hyperbolic rotation

  14. Circular, Linear, Hyperbolic

  15. Circular (basic) rotation (=1) • Pseudo-rotation by • *(1+tan2(i))1/2=1/(cos(i)) • angle = 2Area/r2 • x(m)=K(xcos z –ysin z) • y(m)=K(ycos z +xsin z) • z(m)=0 • Rule: di=1 s.t. z(m)0 • K=1.646760258121...

  16. Circular vectoring mode (=1) • x(m)= K(x2+y2)1/2 • y(m)=0 • z(m)= z+tan–1(y/x) • Rule: select di=1 s.t. y(m)0

  17. Linear Rotation mode (=0) • x(m)= x • y(m)=y+xz • z(m)= 0 • Rule: select di=1 s.t. z(m)0

  18. Linear vectoring mode (=0) • x(m)= x • y(m)=0 • z(m)= z+y/x • Rule: select di=1 s.t. y(m)0

  19. Linear mode (=0) • Perform MUL: rotation with y=0 • MUL&ADD: rotation • DIV: vectoring with z=0 • DIV& ADD: vectoring

  20. Hyperbolic rotation (=–1) • R(i)=(x2–y2)1/2 • *(1 –tanh2(i))1/2 = 1/cosh(i) • angle = 2Area/r2 • x(m)=K’(xcosh z +ysinh z) • y(m)=K’(ycosh z +xsinh z) • z(m)=0 • Rule: di=1 s.t. z(m)0 • K’=0.828159360960...

  21. Hyperbolic vectoring (=–1) • x(m)=K(x2–y2)1/2 • y(m)=0 • z(m)=z+tanh–1(y/x) • Rule: di=1 s.t. y(m)0

  22. Hyperbolic mode(=–1) • Rotation: Hyperbolic sin, cosine • x=1/K’, y=0 • Vectoring: tanh–1 • x=1, z=0 • To ensure convergence • repeat steps 4, 13, 40,…, j, 3j+1, … • in practice stop less than 121 iterations

  23. General CORDIC iteration • x(i+1)= x(i)–di y(i)2–i • y(i+1)= y(i)+ di x(i)2–i • z(i+1) = z(i) –di e(i) •  =1: e(i) =tan–12–i Circular (basic) rotation • =0: e(i) =2–i Linear rotation • = –1: e(i) =tanh–12–i Hyperbolic rotation

More Related