Creating ARCTAN Lookup table for Verilog implementation

Guest
Hi all,
I want to create a lookup table for finding ARCTAN . The input to the
lookup table is I,Q components. I and Q are 8 bits wide having values
from -127 to +127. THe output angle is also 8 bit wide , leaving the
resolution of the table to be 360/2^8 = 1.40625degrees.

I wanted to create a lookup table for ARCTAN with fast/less Area and
good precision.

The method I used is ..
Used a lookup table for finding normalised 1/(I+Q).
Multiplied the result by Q.

then use 5 MSBs of Q/I+Q for arctan lookup table.(instead of using
Q/I directly for the lookuptable.

the Index(address) for lookup table 1/I+Q was generated using 5 bits
,after the first '1' from MSB , from I+Q result.

The result was not so good, I was getting as much as 30 degree
deviation from actual value.

IS there any other method to make a Lookup table for ARCTAN.

thanks
John
 
Perhaps the Cordic algorithm? I understand CORDIC is well suited to
FPGA implementation. (You say Verilog so I have assumed FPGA
implementation target). Never used it myself but I have read that it
can calculate some (most?) of the trig functions.

Some good tutorials covering "DSP on FPGA" at this site, and in
particular the CORDIC algorithm.

http://www.andraka.com/cordic.htm

Regards
Andrew


john.deepu@gmail.com wrote:
Hi all,
I want to create a lookup table for finding ARCTAN . The input to the
lookup table is I,Q components. I and Q are 8 bits wide having values
from -127 to +127. THe output angle is also 8 bit wide , leaving the
resolution of the table to be 360/2^8 = 1.40625degrees.

I wanted to create a lookup table for ARCTAN with fast/less Area and
good precision.

The method I used is ..
Used a lookup table for finding normalised 1/(I+Q).
Multiplied the result by Q.

then use 5 MSBs of Q/I+Q for arctan lookup table.(instead of using
Q/I directly for the lookuptable.

the Index(address) for lookup table 1/I+Q was generated using 5 bits
,after the first '1' from MSB , from I+Q result.

The result was not so good, I was getting as much as 30 degree
deviation from actual value.

IS there any other method to make a Lookup table for ARCTAN.

thanks
John
 
<john.deepu@gmail.com> wrote in message
news:1123686823.199207.228170@g44g2000cwa.googlegroups.com...
Hi all,
I want to create a lookup table for finding ARCTAN . The input to the
lookup table is I,Q components. I and Q are 8 bits wide having values
from -127 to +127. THe output angle is also 8 bit wide , leaving the
resolution of the table to be 360/2^8 = 1.40625degrees.

I wanted to create a lookup table for ARCTAN with fast/less Area and
good precision.

The method I used is ..
Used a lookup table for finding normalised 1/(I+Q).
Multiplied the result by Q.
Why are you using Q/(I+Q) ?
First, notice that the lookup table only needs to cover 1/8 of a circle. The
sign of I and sign of Q tell you which quarter of the circle you are in and
the test (I>Q) tells you which half of the quarter. The lookup index goes
from 0 to 1 (either I/Q or Q/I - whichever is smaller).

then use 5 MSBs of Q/I+Q for arctan lookup table.(instead of using
Q/I directly for the lookuptable.

the Index(address) for lookup table 1/I+Q was generated using 5 bits
,after the first '1' from MSB , from I+Q result.

The result was not so good, I was getting as much as 30 degree
deviation from actual value.

IS there any other method to make a Lookup table for ARCTAN.

thanks
John
HTH,
Bob
 

Welcome to EDABoard.com

Sponsor

Back
Top