AN EFFICIENT ARCTANGENT APPROXIMATION

Fast and accurate methods for computing the arctangent of a complex number x = I + jQ have been the subject of extensive study because estimating the angle q of a complex value has so many applications in the field of signal processing. The angle of x is defined as q = tan–1(Q/I).

Practitioners interested in computing high speed (minimum computations) arctangents typically use look-up tables where the value Q/I specifies a memory address in programmable read-only memory (PROM) containing an approximation of angle q. Those folks interested in enhanced precision implement compute-intensive high-order algebraic polynomials, where Chebyshev polynomials seem to be more popular than Taylor series, to approximate angle q. (Unfortunately, because it is such a non-linear function, the arctangent is resistant to accurate reasonable-length polynomial approximations. So we end up choosing the least undesirable method for computing arctangents.)

Here's another contender in the arctangent approximation race that uses neither look-up tables nor high-order polynomials. We can estimate the angle q, in radians, of x = I + jQ using the following approximation

where –1 Q/I 1. That is, q is in the range –45° to +45° (–p/4 q +p/4 radians). Equation (13-107) has surprisingly good performance, particularly for a 90° (p/2 radians) angle range. Figure 13-59 shows the maximum error is 0.26° using Eq. (13-107) when the true angle q is within the angular range of –45° to +45°.

Figure 13-59. Estimated angle q' error in degrees.

A nice feature of this q' computation is that it can be written as:

Equation 13-108

eliminating Eq. (13-107)'s Q/I division operation, at the expense of two additional multiplies. Another attribute of Eq. (13-108) is that a single multiply can be eliminated with binary right shifts. The product 0.28125Q2 is equal to (1/4+1/32)Q2, so we can implement the product by adding Q2 shifted right by two bits to Q2 shifted right by five bits. This arctangent scheme may be useful in a digital receiver application where I2 and Q2 have been previously computed in conjunction with an AM (amplitude modulation) demodulation process or envelope detection associated with automatic gain control (AGC).

We can extend the angle range over which our approximation operates. If we break up a circle into eight 45° octants, with the first octant being 0° -to- 45°, we can compute the arctangent of a complex number residing in any octant. We do this by using the rotational symmetry properties of the arctangent:

Equation 13-109

Equation 13-109'

 

Table 13-6. Octant Location versus Arctangent Expressions

Octant

Arctan approximation

1st, or 8th

2nd, or 3rd

4th, or 5th

6th, or 7th

Those properties allow us to create Table 13-6.

So we have to check the signs of Q and I, and see if |Q| > |I|, to determine the octant location, and then use the appropriate approximation in Table 13-6. The maximum angle approximation error is 0.26° for all octants.

When q is in the 5th octant, the above algorithm will yield a q' that's more positive than +p radians. If we need to keep the q' estimate in the range of –p -to- +p, we can rotate any q residing in the 5th quadrant +p/4 radians (45°), by multiplying (I +jQ) by (1 +j), placing it in the 6th octant. That multiplication yields new real and imaginary parts defined as

Equation 13-110

Then the 5th octant q' is estimated using I' and Q' with

Equation 13-110'


URL http://proquest.safaribooksonline.com/0131089897/ch13lev1sec21

 
Amazon
 
 
Prev don't be afraid of buying books Next
 
 

Chapter One. Discrete Sequences and Systems

Chapter Two. Periodic Sampling

Chapter Three. The Discrete Fourier Transform

Chapter Four. The Fast Fourier Transform

Chapter Five. Finite Impulse Response Filters

Chapter Six. Infinite Impulse Response Filters

Chapter Seven. Specialized Lowpass FIR Filters

Chapter Eight. Quadrature Signals

Chapter Nine. The Discrete Hilbert Transform

Chapter Ten. Sample Rate Conversion

Chapter Eleven. Signal Averaging

Chapter Twelve. Digital Data Formats and Their Effects

Chapter Thirteen. Digital Signal Processing Tricks

Appendix A. The Arithmetic of Complex Numbers

Appendix B. Closed Form of a Geometric Series

Appendix C. Time Reversal and the DFT

Appendix D. Mean, Variance, and Standard Deviation

Appendix E. Decibels (dB and dBm)

Appendix F. Digital Filter Terminology

Appendix G. Frequency Sampling Filter Derivations

Appendix H. Frequency Sampling Filter Design Tables



Understanding Digital Signal Processing
Understanding Digital Signal Processing (2nd Edition)
ISBN: 0131089897
EAN: 2147483647
Year: 2004
Pages: 183

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net