Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- FPGAs and Programmable Solutions
- Intel® Quartus® Prime Software
- precision for a cos(x)/sin(x) lookup table

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
##

I am thinking to make a table for the calculation of cos(x)/sin(x). I know this could be a very large table if I want the precision to be high. Generally speaking, what is the phase step (x = x+step; x0=0) for making such a table to satisfy the average precision requirement? Thanks.

Altera_Forum

Valued Contributor III

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-21-2013
05:59 PM

908 Views

precision for a cos(x)/sin(x) lookup table

4 Replies

Highlighted
##

--- Quote Start --- I am thinking to make a table for the calculation of cos(x)/sin(x). I know this could be a very large table if I want the precision to be high. Generally speaking, what is the phase step (x = x+step; x0=0) for making such a table to satisfy the average precision requirement? Thanks. --- Quote End --- To avoid division I will get cos lut and 1/sin lut then multiply cos by 1/sin. Precision can be that of amplitude or phase. I think you mean phase precision. Phase precision can be designed irrespective of lut size e.g. 2^20 modulo adder. The accumulator result will point to both luts using msbs.

Altera_Forum

Valued Contributor III

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-21-2013
06:12 PM

3 Views

Re: precision for a cos(x)/sin(x) lookup table

Highlighted
##

*generally speaking*, the answer depends completely on application requirements, any precision between e.g. 8 and 24 bit might be appropriate. It's usually a propagation of uncertainty problem, so an exact calculation would derive the cos(x)/sin(x) precision from the impact on final signal processing result. For medium precision requirements, e.g. 10 or 12 bit table address, ROM resources aren't a problem. Above it, you probably start to think about hybrid methods to save table size. A straightforward method with small footprint is linear table interpolation.

Altera_Forum

Valued Contributor III

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-21-2013
07:16 PM

3 Views

Re: precision for a cos(x)/sin(x) lookup table

--- Quote Start --- Generally speaking, what is the phase step (x = x+step; x0=0) for making such a table to satisfy the average precision requirement? --- Quote End ---

Highlighted
##

--- Quote Start --- I am thinking to make a table for the calculation of cos(x)/sin(x). I know this could be a very large table if I want the precision to be high. Generally speaking, what is the phase step (x = x+step; x0=0) for making such a table to satisfy the average precision requirement? Thanks. --- Quote End --- I assumed you meant cos/sin rather than cos & sin. I should say now that cos/sin = cotan and so you can just get cotan directly instead of cos/sin. if you mean cos & sin then you can use at extreme 1/4 cos lut only then get other 3/4 and sin through logic.

Altera_Forum

Valued Contributor III

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-21-2013
07:32 PM

3 Views

Re: precision for a cos(x)/sin(x) lookup table

Highlighted
##

--- Quote Start --- I am thinking to make a table for the calculation of cos(x)/sin(x). I know this could be a very large table if I want the precision to be high. Generally speaking, what is the phase step (x = x+step; x0=0) for making such a table to satisfy the average precision requirement? --- Quote End --- There's no hard-and-fast rule that I've found. It's pretty simple to create a MATLAB script that sweeps a tone across a large number of frequencies with your given NCO parameters. The power spectrum of the sinusoid will then show the harmonic level in your sinusoid. The SFDR will either meet your requirements, or it will not, if it does not, you tweak your parameters and re-test. Here's an m-file I wrote a while back ... it still works, I just ran it in MATLAB. Cheers, Dave

Altera_Forum

Valued Contributor III

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-22-2013
04:55 AM

3 Views

Re: precision for a cos(x)/sin(x) lookup table

For more complete information about compiler optimizations, see our Optimization Notice.