Hello, I am trying to implement cordic algorithm for atan in ADSP 2191. I have understood cordic algorithm. I wanted suggestion from you about its implementations. what the speed achievable? Any source code???ASM codong or c coding Thank you, with regards praveen
Cordic algorithm for atan in DSP processor
Started by ●December 8, 2003
Reply by ●December 8, 20032003-12-08
"praveen" <praveenkumar1979@rediffmail.com> wrote in message news:ff8a3afb.0312080201.1b0888f7@posting.google.com...> Hello, > I am trying to implement cordic algorithm for atan in ADSP 2191. > I have understood cordic algorithm. I wanted suggestion from you about > its implementations. what the speed achievable? Any source code???ASM > codong or c codingWhat is the reason you want to use the cordic algorithm? From what I understand, the cordic provides advantages in hardware implementations (asic/fpga). In a programmable DSP environment, it's still certainly possible to implement, but you won't gain anything from it. You are probably better off choosing some other method (look up tables, approximations, etc) to compute atan. Cheers Bhaskar> > Thank you, > with regards > praveen
Reply by ●December 9, 20032003-12-09
Hello, what is the accuracy of estimation of atan using cordic algorithm?. If i use look up table it will be huge since my step size of LUT is 5 microradian (half octant ie pi/(8*5microradians) is huge). Using approximate method what is accuracy obtainable??? I need your suggestion waiting for reply with regards praveen
Reply by ●December 9, 20032003-12-09
praveenkumar1979@rediffmail.com (praveen) wrote in message news:<ff8a3afb.0312082113.1eb22222@posting.google.com>...> Hello, > > what is the accuracy of estimation of atan using cordic algorithm?. > If i use look up table it will be huge since my step size of LUT is 5 > microradian (half octant ie pi/(8*5microradians) is huge). > Using approximate method what is accuracy obtainable??? > > > I need your suggestion > waiting for reply > with regards > praveenHi Praveen The approximation error would depend on the order of the polynomial chosen. This is an inherent error though. Horner's algorithm is a good trick to use for this. I have used this before for computing atan using Q-15 fixed point format and achieved average error of the order of 10^-2. Of course actual error depends on the number of recursions and the represenatbility of the coefficients in the fixed point format with min. possible error. To evaluate the error Horner's algorithm may be treated as a first order IIR filter. You may do away with the round off error if unsigned multiplication is used and the coefficients being scaled by the sampling interval. Hope this helps -Nithin
Reply by ●December 10, 20032003-12-10
>>>>> "praveen" == praveen <praveenkumar1979@rediffmail.com> writes:praveen> Hello, praveen> what is the accuracy of estimation of atan using cordic algorithm?. praveen> If i use look up table it will be huge since my step size of LUT is 5 praveen> microradian (half octant ie pi/(8*5microradians) is huge). praveen> Using approximate method what is accuracy obtainable??? At step n of the cordic algorithm the angle is about +/- atan(1/2^n), so a few iterations gets you to a pretty small angle. You can stop there or, if necessary, use the atan series to finish it off: atan(x) = x - x^3/3 + x^5/5 + ... Ray
Reply by ●December 31, 20032003-12-31
In a DSP with a multiplier, a CORDIC is probably not the right solution. It is a hardware solution to avoid doing multiplications. praveen wrote:> Hello, > I am trying to implement cordic algorithm for atan in ADSP 2191. > I have understood cordic algorithm. I wanted suggestion from you about > its implementations. what the speed achievable? Any source code???ASM > codong or c coding > > Thank you, > with regards > praveen-- --Ray Andraka, P.E. President, the Andraka Consulting Group, Inc. 401/884-7930 Fax 401/884-7950 email ray@andraka.com http://www.andraka.com "They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, 1759
Reply by ●January 2, 20042004-01-02
praveenkumar1979@rediffmail.com (praveen) wrote in message news:<ff8a3afb.0312082113.1eb22222@posting.google.com>...> Hello, > > what is the accuracy of estimation of atan using cordic algorithm?. > If i use look up table it will be huge since my step size of LUT is 5 > microradian (half octant ie pi/(8*5microradians) is huge). > Using approximate method what is accuracy obtainable??? > > > I need your suggestion > waiting for reply > with regards > praveenI'd suggest using Taylor's series. Look for the formula in book about Engineering's Mathematics. JaaC
Reply by ●January 2, 20042004-01-02
praveenkumar1979@rediffmail.com (praveen) wrote in message news:<ff8a3afb.0312082113.1eb22222@posting.google.com>...> Hello, > > what is the accuracy of estimation of atan using cordic algorithm?. > If i use look up table it will be huge since my step size of LUT is 5 > microradian (half octant ie pi/(8*5microradians) is huge). > Using approximate method what is accuracy obtainable??? > > > I need your suggestion > waiting for reply > with regards > praveenAlso interesting could be to have a look at TI's DSP app notes and ADI's E-E notes. JaaC
Reply by ●January 3, 20042004-01-03
You could use a lookup table of modest size, and interpolate between table entries to get more resolution. Unfortunately you will have to ask others how to calculate the required table size for a given accuracy, though.
Reply by ●January 5, 20042004-01-05