CORDIC Background (2A)

Σχετικά έγγραφα
CORDIC Background (4A)

Trigonometry (4A) Trigonometric Identities. Young Won Lim 1/2/15

Sampling Basics (1B) Young Won Lim 9/21/13

Digital Signal Octave Codes (0B)

Trigonometry Functions (5B) Young Won Lim 7/24/14

Spectrum Representation (5A) Young Won Lim 11/3/16

BandPass (4A) Young Won Lim 1/11/14

CT Correlation (2B) Young Won Lim 8/15/14

LTI Systems (1A) Young Won Lim 3/21/15

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

derivation of the Laplacian from rectangular to spherical coordinates

Anti-aliasing Prefilter (6B) Young Won Lim 6/8/12

If we restrict the domain of y = sin x to [ π, π ], the restrict function. y = sin x, π 2 x π 2

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1

If we restrict the domain of y = sin x to [ π 2, π 2

CRASH COURSE IN PRECALCULUS

Section 8.3 Trigonometric Equations

MathCity.org Merging man and maths

Areas and Lengths in Polar Coordinates

Review Test 3. MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Section 8.2 Graphs of Polar Equations

PARTIAL NOTES for 6.1 Trigonometric Identities

Εγχειρίδιο Ψαριού i. Εγχειρίδιο Ψαριού

Areas and Lengths in Polar Coordinates

11.4 Graphing in Polar Coordinates Polar Symmetries

Pg The perimeter is P = 3x The area of a triangle is. where b is the base, h is the height. In our case b = x, then the area is

Numerical Analysis FMN011

Section 7.6 Double and Half Angle Formulas

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

Spherical Coordinates

Trigonometric Formula Sheet

Section 9.2 Polar Equations and Graphs

Problem Set 9 Solutions. θ + 1. θ 2 + cotθ ( ) sinθ e iφ is an eigenfunction of the ˆ L 2 operator. / θ 2. φ 2. sin 2 θ φ 2. ( ) = e iφ. = e iφ cosθ.

Section 7.7 Product-to-Sum and Sum-to-Product Formulas

10/3/ revolution = 360 = 2 π radians = = x. 2π = x = 360 = : Measures of Angles and Rotations

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Inverse trigonometric functions & General Solution of Trigonometric Equations

Problem 3.1 Vector A starts at point (1, 1, 3) and ends at point (2, 1,0). Find a unit vector in the direction of A. Solution: A = 1+9 = 3.

Integrals in cylindrical, spherical coordinates (Sect. 15.7)

9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr

Reminders: linear functions

Written Examination. Antennas and Propagation (AA ) April 26, 2017.

TRIGONOMETRIC FUNCTIONS

is like multiplying by the conversion factor of. Dividing by 2π gives you the

Περισσότερα+για+τις+στροφές+

Appendix A. Curvilinear coordinates. A.1 Lamé coefficients. Consider set of equations. ξ i = ξ i (x 1,x 2,x 3 ), i = 1,2,3

F-TF Sum and Difference angle

Copyright is owned by the Author of the thesis. Permission is given for a copy to be downloaded by an individual for the purpose of research and

ΑΛΕΞΑΝΔΡΟΣ ΠΑΛΛΗΣ SCHOOLTIME E-BOOKS

Homework 8 Model Solution Section

AREAS AND LENGTHS IN POLAR COORDINATES. 25. Find the area inside the larger loop and outside the smaller loop

Problem 1.1 For y = a + bx, y = 4 when x = 0, hence a = 4. When x increases by 4, y increases by 4b, hence b = 5 and y = 4 + 5x.

Note: Please use the actual date you accessed this material in your citation.

Strain gauge and rosettes

2 Composition. Invertible Mappings

Derivations of Useful Trigonometric Identities

Contents. 1 Introduction. 2 Shape of the Earth. 3 NAD 27 vs NAD 83

Second Order RLC Filters

Partial Trace and Partial Transpose

2 2 2 The correct formula for the cosine of the sum of two angles is given by the following theorem.

ECE 468: Digital Image Processing. Lecture 8

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Second Order Partial Differential Equations

Non-Indicative Verbs of the LXX, New Testament, Josephus and Philo (in alphabetical order)

Matrices and vectors. Matrix and vector. a 11 a 12 a 1n a 21 a 22 a 2n A = b 1 b 2. b m. R m n, b = = ( a ij. a m1 a m2 a mn. def

Geometry of the 2-sphere

Three-Dimensional Rotations as Products of Simpler Rotations

Math221: HW# 1 solutions

Chapter 6 BLM Answers

Example Sheet 3 Solutions

The Nottingham eprints service makes this work by researchers of the University of Nottingham available open access under the following conditions.

MATH423 String Theory Solutions 4. = 0 τ = f(s). (1) dτ ds = dxµ dτ f (s) (2) dτ 2 [f (s)] 2 + dxµ. dτ f (s) (3)

Trigonometry 1.TRIGONOMETRIC RATIOS

(a,b) Let s review the general definitions of trig functions first. (See back cover of your book) sin θ = b/r cos θ = a/r tan θ = b/a, a 0

CHAPTER 101 FOURIER SERIES FOR PERIODIC FUNCTIONS OF PERIOD

Homework 3 Solutions

Κάθε γνήσιο αντίγραφο φέρει υπογραφή του συγγραφέα. / Each genuine copy is signed by the author.

physicsandmathstutor.com Paper Reference Core Mathematics C4 Advanced Level Tuesday 23 January 2007 Afternoon Time: 1 hour 30 minutes

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

Assalamu `alaikum wr. wb.

Παραμύθια τησ Χαλιμϊσ, τομ. A Σελύδα 1

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

Parametrized Surfaces

Lecture 6 Mohr s Circle for Plane Stress

1. If log x 2 y 2 = a, then dy / dx = x 2 + y 2 1] xy 2] y / x. 3] x / y 4] none of these

Navigation Mathematics: Kinematics (Coordinate Frame Transformation) EE 565: Position, Navigation and Timing

Προσωπική Aνάπτυξη. Ενότητα 4: Συνεργασία. Juan Carlos Martínez Director of Projects Development Department

Rectangular Polar Parametric

Mock Exam 7. 1 Hong Kong Educational Publishing Company. Section A 1. Reference: HKDSE Math M Q2 (a) (1 + kx) n 1M + 1A = (1) =

Notations. Primary definition. Specific values. General characteristics. Traditional name. Traditional notation. Mathematica StandardForm notation

Orbital angular momentum and the spherical harmonics

Paper Reference. Paper Reference(s) 6665/01 Edexcel GCE Core Mathematics C3 Advanced. Thursday 11 June 2009 Morning Time: 1 hour 30 minutes

Congruence Classes of Invertible Matrices of Order 3 over F 2

2 2 2 The correct formula for the cosine of the sum of two angles is given by the following theorem.

Partial Differential Equations in Biology The boundary element method. March 26, 2013

The Project Gutenberg EBook of Gerodimos Pamphletes, by Argyris Eftaliotis

Matrices and Determinants

DiracDelta. Notations. Primary definition. Specific values. General characteristics. Traditional name. Traditional notation

Transcript:

CORDIC Background 2A

Copyright c 20-202 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Please send corrections or suggestions to youngwlim@hotmail.com. This document was produced by using OpenOffice and Octave.

CORDIC Background J. P. Deschamps, G. A. Bioul, G.D. Sutter, Synthesis of Arithmetic Circuits 2A Background 3

Vector Rotation x, y x 0, y 0 y y 0 x, y x 0, y 0 R R x x 0 rotate by θ x 0, y 0 x, y x y = x 0 cos θ y 0 sin θ = x 0 sin θ + y 0 cosθ 2A Background 4

Vector Rotation 2 x, y x 0, y 0 y 0 y 0 x 0 x 0 In the rotated coordinate invariant length x 0, y 0 2A Background 5

Vector Rotation 3 x = x 0 cosθ y 0 sin θ y = x 0 sin θ + y 0 cosθ x, y x, y x 0, y 0 x 0 sin θ x 0 x 0, y 0 y 0 y y 0 x 0 y 0 cos θ x 0 sin θ y 0 sin θ x y 0 cos θ 2A Background 6

Successive Rotations Given Vector Given Angle Rotate Computing new coordinates Given Unit Vector Given Angle θ Rotate x = cosθ y = sin θ Given Vector x 0, y 0 Rotate x n = x 0 cos θ y 0 sin θ Given Angle θ = x 0 sin θ + y 0 cos θ y n θ 0 θ i θ i+ θ n 0 x 0 y 0 x i y i x i+ y i+ x n y n 2A Background 7

CORDIC Rotation θ 0 θ i θ i+ θ n 0 x 0 y 0 x i y i x i+ y i+ x n y n x i+ y i+ = x i cosθ i y i sin θ i = x i sin θ i + y i cos θ i Pseudo-rotation x i+ = cosθ i x i y i tanθ i y i+ = cos θ i x i + y i x ' i+ = x i y i y ' i+ = x i + y i x i+ = y i+ = x + tan 2 i y i θ i x + tan 2 i + y i θ i 2A Background 8

cos θ in term of tan θ θ r a cos θ = a r sin θ = b r b r = a 2 + b 2 cos θ = a r = a a 2 + b 2 = + b /a 2 = + tan 2 θ tan θ = b a 2A Background 9

Pseudo-rotation factor of /cos θ r cosθ, r sinθ r cosθ cosθ, r sin θ cosθ θ r r cos θ r sin θ θ r r sin θ r cos θ cosθ > θ s r t r : r cos θ = s : r r cos θ : r sin θ = r : t s = r cosθ s = r sin θ cosθ 2A Background 0

Pseudo-rotation x i+, y i+ x i+, y i+ x ' i+, y ' i+ x i, y i x i, y i R R x i+ = cosθ i x i y i tanθ i y i+ = cos θ i x i + y i x ' i+ = x i y i y ' i+ = x i + y i 2A Background

Pseudo-rotation 2 x i+, y i+ x ' i+, y ' i+ x i, y i x ' i+, y ' i+ x i, y i R R x ' i+ y ' i+ = x i+ / cos θ i = y i+ / cosθ i x ' i+ > x i+ y ' i+ > y i+ cosθ > 2A Background 2

CORDIC Iteration Equations α 0 α i α i+ α n 0 x 0 y 0 x i y i x i+ y i+ x n y n x i+ = x i cosθ i y i sin θ i = cosθ i x i y i y i+ = x i sin θ i + y i cos θ i = cosθ i x i + y i = / + tan 2 θ i x i y i = / + tan 2 θ i x i + y i Pseudo-rotation x 0 y 0 x ' i i x ' i+ y ' y ' i + x ' n y ' n x ' i+ y ' i+ + y ' i = x ' i cos θ i sin θ i + tan 2 θ i = x ' i sinθ i + y ' i cos θ i + tan 2 θ i x ' n = {x 0 cos θ i y 0 sin θ i } { + tan 2 θ i } y ' n = {x 0 sin θ i + y 0 cos θ i } { + tan 2 θ i } θ n = θ θ i 2A Background 3

CORDIC Iteration Equations 2 Pseudo-rotation x 0 y 0 x ' i i x ' i+ y ' y ' i + x ' n y ' n x ' i+ y ' i+ + y ' i = x ' i cos θ i sin θ i + tan 2 θ i = x ' i sinθ i + y ' i cos θ i + tan 2 θ i x ' n = {x 0 cos θ i y 0 sin θ i } { + tan 2 θ i } y ' n = {x 0 sin θ i + y 0 cos θ i } { + tan 2 θ i } θ n = θ θ i θ i Choose such that = j j 2 0 = 2 i {+, } x ' i+ 2 i y ' i+ 2 i + y ' i θ i+ = θ i tan 2 i +2 i 2 i j 2 j 2 2 j 2 3 j 2 4 2A Background 4

CORDIC Iteration Equations 3 θ i +2 i Choose such that = 2 i = 2 i {+, } x ' i+ 2 i y ' i+ 2 i + y ' i θ i+ = θ i tan 2 i, 2 0, 2 0, 2, 2, 2 2, 2 3, 2 4, 2 2, 2 3, 2 4 = ±2 i cos θ i = + + 2 2i sinθ i = ±2 i + 2 2i +cos θ i sin θ i i +sin θ i +cos θ = + 2 2i + 2 i ±2 i + 2A Background 5

CORDIC Iteration Equations 4 Allowed angles at the step i = 0 Allowed angles at the step i =, 2 0, 2 0, 2, 2, 2 2, 2 3, 2 4, 2 2, 2 3, 2 4 2A Background 6

CORDIC Iteration Equations 5 Allowed angle at the step i = 2 Allowed angle at the step i = 3, 2 0, 2 0, 2, 2, 2 2, 2 3, 2 4, 2 2, 2 3, 2 4 2A Background 7

CORDIC Iteration Equations 6 θ i Choose such that = 2 i = 2 i {+, } +2 i x ' i+ 2 i y ' i+ 2 i + y ' i θ i+ = θ i tan 2 i +cos θ sin θ +sin θ +cosθ = = + 2 n + 2 + 2 2 n ±2 n + + 2 2 ±2 + + 2 0 + 2 0 ±2 0 + + 2 2 n + 2 2 + 2 2 0 + 2 n + 2 ±2 n + ±2 + + 2 0 ±2 0 + K = / + tan 2 θ i = 0.607 +cos θ i sin θ i +sin θ i +cos θ i +cos θ i sin θ i +sin θ i +cos θ i = K +cosθ sin θ θ +sin θ +cos / K = + tan 2 θ i =.647 = A = CORDIC Gain 2A Background 8

CORDIC Iteration Equations 7 θ i Choose such that = 2 i = 2 i {+, } +2 i x ' i+ 2 i y ' i+ 2 i + y ' i θ i+ = θ i tan 2 i +cos θ sin θ +sin θ +cosθ = + 2 2 n + 2 2 + 2 2 0 Use pre-computed value + 2 n + 2 ±2 n + ±2 + n iterations each iteration involves only adding and shifting + 2 0 ±2 0 + Similar to shift-and-add multiplication x ' i+ 2 i y ' i+ 2 i + y ' i 2A Background 9

CORDIC Iteration Equations 8 Pseudo-rotation x 0 y 0 x ' i i x ' i+ y ' y ' i + x ' n y ' n x ' i+ y ' i+ + y ' i = x ' i cos θ i sin θ i + tan 2 θ i = x ' i sinθ i + y ' i cos θ i + tan 2 θ i x ' n = {x 0 cos θ i y 0 sin θ i } { + tan 2 θ i } y ' n = {x 0 sin θ i + y 0 cos θ i } { + tan 2 θ i } θ n = θ θ i θ i Choose such that tan α i = θ i 2 i {+, } x ' i+ 2 i y ' i+ 2 i + y ' i θ i+ = θ i tan 2 i x ' n = / K x 0 cos θ y 0 sin θ y ' n = / K x 0 sin θ + y 0 cosθ θ n = θ tan 2 i K = { / + tan 2 α i } 2A Background 20

CORDIC Iteration Equations 9 Pseudo-rotation x 0 y 0 x ' i i x ' i+ y ' y ' i + x ' n y ' n θ i Choose such that = 2 i {+, } x ' i+ 2 i y ' i+ 2 i + y ' i θ i+ = θ i tan 2 i x ' n = / K x 0 cos θ y 0 sin θ y ' n = / K x 0 sin θ + y 0 cosθ θ n = θ tan 2 i pre-compute K = { / + tan 2 θ i } = 0.607 set x 0 = K = 0.607 y 0 = 0 then x ' n = / K K cos θ 0 sin θ = cos θ y ' n = / K K sin θ + 0 cos θ = sin θ 2A Background 2

Example: cos75, sin75 - Step 0 i = 0 x 0 y 0 = 0.607 0 θ 0 = 75 θ i > 0 =+ =? : θ 0 = 75 > 0 σ 0 = + 2 i =2 0 = tan 2 i = tan = 45 x ' i+ 2 i y ' i+ 2 i + y ' i θ i+ = θ i tan 2 i x ' = 0.607 0 + = 0.607 y ' = 0.607 + + 0 = 0.607 θ = θ 0 45 = 30 2A Background 22

Example: cos75, sin75 - Step i = x ' y ' = 0.607 θ = 30 θ i > 0 =+ =? : θ = 30 > 0 σ = + 2 i =2 = 0.5 tan 2 i = tan 0.5 = 26.565 x ' i+ 2 i y ' i+ 2 i + y ' i θ i+ = θ i tan 2 i x ' 2 = 0.607 0.607 + 0.5 = 0.3035 y ' 2 = 0.607 + 0.5 + 0.607 = 0.905 θ 2 = θ 26.565 = 3.435 2A Background 23

Example: cos75, sin75 - Step 2 i = 2 x ' 2 2 y ' = 0.3035 0.905 θ 2 = 3.435 θ i > 0 =+ =? : θ 2 = 3.435 > 0 σ 2 = + 2 i =2 2 = 0.25 tan 2 2 = tan 0.25 = 4.036 x ' i+ 2 i y ' i+ 2 i + y ' i θ i+ = θ i tan 2 i x ' 3 = 0.3035 0.905 + 0.25 = 0.0759 y ' 3 = 0.3035 + 0.25 + 0.905 = 0.9864 θ 3 = θ 2 4.036 = 0.60 2A Background 24

Example: cos75, sin75 - Step 3 i = 3 x ' 3 3 y ' = 0.0759 0.9864 θ 3 = 0.60 θ i > 0 =+ =? : θ 3 = 0.60 < 0 σ 3 = 2 i =2 3 = 0.25 tan 2 3 = tan 0.25 = 7.25 x ' i+ 2 i y ' i+ 2 i + y ' i θ i+ = θ i tan 2 i x ' 4 = 0.0759 0.9864 0.25 = 0.992 y ' 4 = 0.0759 0.25 + 0.9864 = 0.9373 θ 4 = θ 3 + 7.25 = 3.476 2A Background 25

Example: cos75, sin75 - Step 4 i = 4 x ' 4 4 y ' = 0.992 0.9373 θ 4 = 3.476 θ i > 0 =+ =? : θ 4 = 3.476 < 0 σ 4 = 2 i =2 4 = 0.0625 tan 2 4 = tan 0.0625 = 3.576 x ' i+ 2 i y ' i+ 2 i + y ' i θ i+ = θ i tan 2 i x ' 5 = 0.992 0.9373 0.0625 = 0.2578 y ' 5 = 0.992 0.0625 + 0.9373 = 0.9249 θ 5 = θ 4 + 3.576 = 0. 2A Background 26

References [] http://en.wikipedia.org/ [2] CORDIC FAQ, www.dspguru.com [3] R. Andraka, A survey of CORDIC algorithms for FPGA based computers [4] J. S. Walther, A Unified Algorithm for Elementary Functions [5] J. P. Deschamps, G. A. Bioul, G.D. Sutter, Synthesis of Arithmetic Circuits