Deutsch   English   Français   Italiano  
<vveugg$peg4$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Bill Sloman <bill.sloman@ieee.org>
Newsgroups: sci.electronics.design,comp.dsp
Subject: Re: DDS question: why sine lookup?
Date: Wed, 7 May 2025 16:27:22 +1000
Organization: A noiseless patient Spider
Lines: 60
Message-ID: <vveugg$peg4$1@dont-email.me>
References: <o3ak1k9ifikv6c1tmfnd89k6vfj4vigj37@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 07 May 2025 08:27:30 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="bc8050660e7eef80f959528af1c69d84";
	logging-data="834052"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18QyrhS9wmSA6XR60UNCIYWi9BbbHmQoHs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:urnAx+Q05WlIN4CYkM2MgP1OU3I=
X-Antivirus-Status: Clean
Content-Language: en-US
In-Reply-To: <o3ak1k9ifikv6c1tmfnd89k6vfj4vigj37@4ax.com>
X-Antivirus: Norton (VPS 250507-0, 7/5/2025), Outbound message
Bytes: 3592

On 7/05/2025 1:48 am, john larkin wrote:
> A DDS clock generator uses an NCO (a phase accumulator) and takes some
> number of MSBs, maps through a sine lookup table, drives a DAC and a
> lowpass filter and finally a comparator. The DAC output gets pretty
> ratty near Nyquist, and the filter smooths out and interpolates the
> steps and reduces jitter.
> 
> But why do the sine lookup? Why not use the phase accumulator MSBs
> directly and get a sawtooth, and filter that?

Because the sawtooth has much the same harmonic content as a triangular 
wave, all the odd harmonics (up to the speed of the switches involved) 
at amplitudes that decrease as the square of the harmonic number

> The lowpass filter looks backwards in time for a bunch of ugly samples
> to average into a straight line. The older sine samples are the wrong
> polarity! 

But they are delayed as they go through the low pass filter, and that 
gets the polarity right, if you use a linear phase low pass filter, 
which doesn't have a sharp cut-off.


Read Williams and Taylor's "Electronic Filer Design Handbook". I've got 
the second edition - ISBN 0-07-070434-1 - and the third - 0-07-070430-9 
- on my Kindle.

>If the filter impulse response is basically zero over the
> period of the sawtooth, and we compare near the peak, we'll average a
> lot of steps and forget the big sawtooth reset.

You can simulate that in LTSpice, whic is safer than hand-waving 
speculation.

> I want to make four programmable clocks and don't want to buy DDS
> chips. So use a cheap FPGA and a few resistors as the DAC.

Trading off development time against parts cost. The Analog Devices 
development engineers have had longer to get their design right than you 
will have, so their end result may be more nearly perfect.

> Synthesize
> one octave and divide down for lower frequencies. Gotta sim that.

Good idea.

> LT Spice really sucks with digital stuff. Building a phase accumulator
> would be a horror. I'm working on a PowerBasic program that can dump
> waveforms to a PWL file that LT Spice can import and filter. Qspice
> would be better but I'd have to learn that and hack the phase
> accumulator in c.

Since you don't need to simulate the digital stuff, LTSpice will work 
fine. Getting the PWL file to simulate the phase accumulator output may 
be a chore, but google might find one for you.

-- 
Bill Sloman, Sydney