CORDIC Background (4A)

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

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 β

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

derivation of the Laplacian from rectangular to spherical coordinates

CRASH COURSE IN PRECALCULUS

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

Areas and Lengths in Polar Coordinates

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

Section 8.3 Trigonometric Equations

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

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

MathCity.org Merging man and maths

Areas and Lengths in Polar Coordinates

Numerical Analysis FMN011

Section 8.2 Graphs of Polar Equations

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

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

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θ.

Spherical Coordinates

Inverse trigonometric functions & General Solution of Trigonometric Equations

PARTIAL NOTES for 6.1 Trigonometric Identities

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

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

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

Section 9.2 Polar Equations and Graphs

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

2 Composition. Invertible Mappings

Section 7.6 Double and Half Angle Formulas

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

Reminders: linear functions

Trigonometric Formula Sheet

Second Order RLC Filters

Partial Trace and Partial Transpose

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

ECE 468: Digital Image Processing. Lecture 8

Homework 8 Model Solution Section

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.

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

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

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

Strain gauge and rosettes

ES440/ES911: CFD. Chapter 5. Solution of Linear Equation Systems

Example Sheet 3 Solutions

Chapter 6 BLM Answers

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

Trigonometry 1.TRIGONOMETRIC RATIOS

11.4 Graphing in Polar Coordinates Polar Symmetries

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

Homework 3 Solutions

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

Διπλωματική Εργασία του φοιτητή του Τμήματος Ηλεκτρολόγων Μηχανικών και Τεχνολογίας Υπολογιστών της Πολυτεχνικής Σχολής του Πανεπιστημίου Πατρών

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

Παραμύθια τησ Χαλιμϊσ, τομ. 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.

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

Second Order Partial Differential Equations

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

Math221: HW# 1 solutions

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

Derivations of Useful Trigonometric Identities

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

TRIGONOMETRIC FUNCTIONS

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

encouraged to use the Version of Record that, when published, will replace this version. The most /BCJ BIOCHEMICAL JOURNAL

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)

Differential equations

(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

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Higher Derivative Gravity Theories

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

Approximation of distance between locations on earth given by latitude and longitude

Parametrized Surfaces

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

Assalamu `alaikum wr. wb.

Math 6 SL Probability Distributions Practice Test Mark Scheme

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

VBA ΣΤΟ WORD. 1. Συχνά, όταν ήθελα να δώσω ένα φυλλάδιο εργασίας με ασκήσεις στους μαθητές έκανα το εξής: Version ΗΜΙΤΕΛΗΣ!!!!

r t te 2t i t Find the derivative of the vector function. 19. r t e t cos t i e t sin t j ln t k Evaluate the integral.

Lecture 6 Mohr s Circle for Plane Stress

Integrals in cylindrical, spherical coordinates (Sect. 15.7)

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

Lecture 2. Soundness and completeness of propositional logic

Geometry of the 2-sphere

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

Scrum framework: Ρόλοι

Congruence Classes of Invertible Matrices of Order 3 over F 2

Laplace s Equation in Spherical Polar Coördinates

Transcript:

CORDIC Background (4A

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 4A Background 3

Vector Rotation ( y = x 0 sin α + y 0 cos α (x, y (x 0, y 0 y y 0 (x, y (x 0, y 0 R R x x 0 x = x 0 cos α y 0 sin α 4A Background 4

Vector Rotation (2 (x, y (x 0, y 0 y 0 y 0 x 0 x 0 4A Background 5

Vector Rotation (3 (x, y (x 0, y 0 x 0 sin α (x, y (x 0, y 0 y 0 cosα y 0 sin α x 0 cos α x = x 0 cos α y 0 sin α y = x 0 sin α + y 0 cos α 4A Background 6

Iterative Rotation 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 4A 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 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 4A Background 8

cos θ θ 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 4A Background 9

Pseudo-rotation factor of /cos θ θ (r cos θ, r sin θ r r sin θ r cos θ ( r cosθ cosθ, r sin θ cosθ θ r r cos θ θ r sin θ s r t r : r cos θ = s : r r cos θ : r sin θ = r : t s = r cosθ s = r sin θ cosθ 4A 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 y i+ = cos α i (x i + y i x ' i+ = ( x i y i y ' i+ = (x i + y i 4A 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+ 4A 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 4A 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 4A 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 +sin α i +cosα i = + 2 2i ( + 2 i ±2 i + 4A 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 4A 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 4A Background 7

CORDIC Iteration Equations (6 α 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 ( +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 = 0.607 ( +cos( α i sin ( α i +sin( α i +cos( α i ( +cos( α i sin ( α i +sin( α i +cos( α i ( +cosα sin α α = K +sin α +cos K = { + tan 2 α i } =.647 4A Background 8

CORDIC Iteration Equations (7 α 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 ( +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 4A 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 = 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 } 4A 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 } =.647 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 α 4A 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 4A 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 4A 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 4A 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 4A 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. 4A 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