Article View: comp.dsp
Article #1678Re: Sine-wave generator algorithms
From: Norbert Hanke
Date: Mon, 15 Apr 1991 08:15
Date: Mon, 15 Apr 1991 08:15
24 lines
1520 bytes
1520 bytes
In article <1750@tekig7.MAP.TEK.COM> gaulandm@tekig7.MAP.TEK.COM (Mike Gauland) writes: >I'm trying to implement a sine-wave generator using a DSP. Anyone have >an especially quick algorithm they'd like to share? > >Thanks, >Mike I implemented a sine-wave generator using a DSP56001 using the following algorithm: x(t) = x(t - Ts) * exp (j * w * Ts) where x(t) is a complex value, Ts ist the sampling interval, w ist the desired frequency in radians/s. The algorithm has some constraints regarding the amplitude accuracy: using 24 bit arithmetic, the amplitude changes in a way that it is just visible on an analogue level meter. Doing the calculation with double precision (48 bit) should obtain a stable amplitude for a very long time. using 32 bit on another DSP should be adequate to guarantee an implitude accuracy of fractions of a percent over several minutes. Norbert Hanke Swiss Federal Institute of Technology ETH Zurich, Switzerland
Technical Details
Message-ID:
<1991Apr15.081550.26195@bernina.ethz.ch>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!cernvax!chx400!chx400!bernina!hankeReferences:
<1750@tekig7.MAP.TEK.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!cernvax!chx400!chx400!bernina!hanke From: hanke@nessie.cs.id.ethz.ch (Norbert Hanke) Newsgroups: comp.dsp Subject: Re: Sine-wave generator algorithms Message-ID: <1991Apr15.081550.26195@bernina.ethz.ch> Date: 15 Apr 91 08:15:50 GMT References: <1750@tekig7.MAP.TEK.COM> Sender: news@bernina.ethz.ch (USENET News System) Organization: ETH Zuerich Lines: 24 Nntp-Posting-Host: nessie