🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.dsp
Article #2417

Re: Non-Linear Interpolation-Help!

#2417
From: Bart Massey
Date: Tue, 09 Jan 1990 09:43
32 lines
2210 bytes
My comments below are just MHO.  Further details are available on request,
in my abundant spare time :-).

> Hi, I need to generate 'nice' sine-wave signals with a 56001 chip.
> The built-in ROM table makes this rather simple, except I need
> to interpolate (depending on frequency) as many as 40 points between
> the sine wave table values. No, I don't have enough memory to store
> a full quarter-cycle of my waveform. If interpolating 40 points is
> undoable, I HAVE to be able to get at least 10 points.

Hmmm.  40 * 256 = 10K, so you need better than 1/10K accuracy, which is
about 14 bits.  If it were me, I'd be inclined to pitch the built-in table
at this point, and go with standard methods of calculating sin(x).  Many of
these run *really fast* on the 56K, because of the 1-cycle
multiply-and-add.  Note that a simple Taylor series will have only about 10
MACs if coded optimally, once you've reflected your angles into the range
-pi/4..pi/4 (using Taylor cos(x) for the rest of the range -pi/2..pi/2).  If
you want something faster, the Berkeley folks used Tschebychev approximation
via the Remez exchange method to get some really tight polynomials for
sin(x), although I don't pretend to be able to duplicate their work...

The thing to note, unfortunately, is that most methods of interpolating
between table entries that are better than linear interpolation involve
using more table entries.  Because calculating the appropriate table indices
is no faster than MAC on the 56K, it's real easy to spend more time getting
ready to finesse the calculation than you would have spent just brute forcing
it.

Good luck!
					Bart Massey
					..tektronix!videovax.tv.tek.com!bart
					..tektronix!reed.bitnet!bart
Technical Details
Message-ID: <5672@videovax.tv.tek.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!zephyr.ens.tek.com!tekfdi!videovax!bart
References: <1697@rodan.acs.syr.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!zephyr.ens.tek.com!tekfdi!videovax!bart
From: bart@videovax.tv.tek.com (Bart Massey)
Newsgroups: comp.dsp
Subject: Re: Non-Linear Interpolation-Help!
Message-ID: <5672@videovax.tv.tek.com>
Date: 9 Jan 90 09:43:46 GMT
References: <1697@rodan.acs.syr.edu>
Reply-To: bart@videovax.tv.tek.com (Bart Massey)
Organization: Tektronix TV Measurement Systems, Beaverton OR
Lines: 32