Re: Best processors for trig?



larwe wrote:
On Mar 30, 1:46 pm, Tim Wescott <t...@xxxxxxxxxxxxxxxx> wrote:

A floating point DSP, as noted.

What's the canonical method of doing this? Taylor series
approximations?

I'm not sure that there is one.

Bringing the argument into range and doing a Taylors series is almost good. Bringing it into range then using a near-Taylors polynomial that takes the truncation into account works better. This works especially well on a VLW instruction set architecture like the 21xx from ADI, because you can perform the x^n in one clock, then the y += ax^n in another -- with sines and cosines you'll out-precise 16-bit data by the time you get to x^6, so you can do the computation in a ridiculously few number of clocks.

If all you want is fast then you can do a humongous table look up.

If you have the room it works _really_ well to do a part lookup, part polynomial expansion algorithm. You have a lot of freedom here to trade off speed for table size.

I have had applications where I did a table look up followed by linear interpolation, and accepted that my trig functions were good to significantly less than 16 bits. If you don't _need_ full precision but you do need speed, this can be very good.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google? See http://cfaj.freeshell.org/google/

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
.



Relevant Pages

  • Re: MSK VLF spectrum
    ... Modern versions and extensions run faster. ... Both the 68HC12 will run 'HC11 code nearly intact, has many new instructions with which to optimize the code, and uses a faster clock. ... Wescott Design Services ... "Applied Control Theory for Embedded Systems" came out in April. ...
    (comp.dsp)
  • Re: Digitally programmable 1MHz squarewave
    ... I have a requirement for a digitally programmable squarewave which is ... Without a 1GHz clock source can anyone think of any scheme that might ... Wescott Design Services ... "Applied Control Theory for Embedded Systems" was written for you. ...
    (sci.electronics.design)
  • PIC 18 Reset Problem
    ... We're setting it up to work in external clock mode with a 40MHz clock. ... The only lead that I have on it right now is that with a sharp-rising power supply the oscillator takes several milliseconds to start up. ... Wescott Design Services ... "Applied Control Theory for Embedded Systems" gives you just what it says. ...
    (comp.arch.embedded)
  • Re: 3 input adder
    ... skyworld wrote: ... The addition has to be finished in one 153.6MHz clock. ... Wescott Design Services ... "Applied Control Theory for Embedded Systems" gives you just what it says. ...
    (comp.dsp)
  • Re: Sample data log code for DSP?
    ... One often needs multiple tries to get the right answer -- one of the things one learns from newsgroups is how ambiguous any written language really is. ... Most manufacturers put all that sort of data up on their sites, so if Richard's suggestion hasn't lead you to it a good swing through the mfgr. ... Wescott Design Services ... "Applied Control Theory for Embedded Systems" was written for you. ...
    (comp.dsp)