DDS issues...was sine generator ic solution

M

mike

Guest
DDS issues???

The concept of DDS frequency synthesizers comes up frequently.
I can't figure out what they're good for.
I took apart the prototype hardware, so you'll have to be
content with an Excel simulation.
Here's a plot of a DDS simulation.

http://nm7u.tripod.com/homepage/sine.jpg

If you looked at it on a real-time scope, you'd likely
be impressed. All the points lie exactly on the sine wave,
(within D/A resolution)
so statistically it's a real sinewave. Averaged over time
the AVERAGE frequency can be very precise.

But if you look at it on a storage scope, you can see that
each cycle is different. And the difference can change dramatically for
small changes in frequency. The graph shows how for some frequencies, the
output is amplitude modulated at a much lower frequency. You can't
take that out with a low-pass filter.

The graph is deceptive cause it
linearly interpolates the points. In actuality, there's a big
ole step at each point. This becomes painfully clear if you try to use
a comparator to generate a square wave. Or if you try to DDS anything
other than a sine wave.

Yes, if you filter it enough, you can make anything into
a sinewave. And if your hardware is a few orders of magnitude
faster than your ouput requirement, the filter is easier.

What am I missing that makes DDS useful in any time-domain application
or wideband frequency-domain application?
mike
--
Return address is VALID.
Wanted, PCMCIA SCSI Card for HP m820 CDRW.
FS 500MHz Tek DSOscilloscope TDS540 Make Offer
http://nm7u.tripod.com/homepage/te.html
Wanted, 12.1" LCD for Gateway Solo 5300. Samsung LT121SU-121
Bunch of stuff For Sale and Wanted at the link below.
http://www.geocities.com/SiliconValley/Monitor/4710/
 
On Sun, 30 Jan 2005 14:47:13 -0800, mike <spamme0@netscape.net> wrote:

DDS issues???

The concept of DDS frequency synthesizers comes up frequently.
I can't figure out what they're good for.
I took apart the prototype hardware, so you'll have to be
content with an Excel simulation.
Here's a plot of a DDS simulation.

http://nm7u.tripod.com/homepage/sine.jpg

If you looked at it on a real-time scope, you'd likely
be impressed. All the points lie exactly on the sine wave,
(within D/A resolution)
so statistically it's a real sinewave. Averaged over time
the AVERAGE frequency can be very precise.

But if you look at it on a storage scope, you can see that
each cycle is different. And the difference can change dramatically for
small changes in frequency. The graph shows how for some frequencies, the
output is amplitude modulated at a much lower frequency. You can't
take that out with a low-pass filter.

The graph is deceptive cause it
linearly interpolates the points. In actuality, there's a big
ole step at each point. This becomes painfully clear if you try to use
a comparator to generate a square wave. Or if you try to DDS anything
other than a sine wave.

Yes, if you filter it enough, you can make anything into
a sinewave. And if your hardware is a few orders of magnitude
faster than your ouput requirement, the filter is easier.

What am I missing that makes DDS useful in any time-domain application
or wideband frequency-domain application?
mike

I can't see the pic, but a raw DDS output does indeed look nasty, and
gets worse as you approach Fclk/2, the Nyquist frequency. But if you
run it through a lowpass filter, you get a nice sine wave with
respectably low jitter. The Sampling Theorem says so, and it works.

We build an arbitrary waveform generator that includes four DDS clock
sources. The crystal oscillator freq is 40 MHz, and we synthesize
wavegen clocks up to 15 MHz. The DDS chip output feeds a 4-pole LC
filter and a schmitt trigger gate and makes a pretty nice clock. In
retrospect, we might have used a better filter, elliptical maybe, and
got a bit less jitter, but it's not bad. The filters were tweaked to
peak at 15 MHz to compensate for losses and sinc distortion. I posted
a graph of DDS jitter vs frequency to a.b.s.e. a while back.

If the output frequency is, say 5:1 or 10:1 below the clock frequency,
the filter is easy and jitter will be very low. The rub is that at
very low frequencies the filter essentially disappears and you're left
with the dds dac steps re-emerging, so jitter trends toward some fixed
fraction of the output period, 1/10,000 maybe, depending on the number
of dac bits. In that case, one can switch filters, or keep the dds
output up where the filter's still effective, and divide the schmitt
output digitally to get a low-jitter lf clock.

I haven't seen the lf modulation you refer to. Very close to Nyquist,
you'll get your desired signal and its image flipped about Fclk/2,
which would take a brickwall filter to separate.

Really, these things are great! But without a filter, they're junk.

It is interesting that the Analog Devices datasheets used to show
typical filters, and now they don't. And their eval boards used to
include filters, and now don't. It's almost as if they're pretending
that you don't need a filter.

John
 
John Larkin wrote:
Really, these things are great! But without a filter, they're junk.

It is interesting that the Analog Devices datasheets used to show
typical filters, and now they don't. And their eval boards used to
include filters, and now don't. It's almost as if they're pretending
that you don't need a filter.
Best case is that the device the DDS is driving has no response at
the spurs. For many real world applications of DDS's this happens to
be true.

Many of the DDS criticisms of today sound like the digital audio/CD
criticisms of the past. Heck, even the newer low-end DDS's have 14-bit
resolution, not too much different than a CD's audio format, and the
DDS is usually used at full amplitude, making its effective resolution
better than a CD player (unless you're just playing full-amplitude test
tones all day through your CD player.)

Luckily my ears lost all sensitivity above 22kHz long ago, heck I'd be
lucky
to get to 11kHz...

Tim.
 
On Sun, 30 Jan 2005 23:33:16 -0000, "john jardine"
<john@jjdesigns.fsnet.co.uk> wrote:

"mike" <spamme0@netscape.net> wrote in message
news:41FD63F1.9080401@netscape.net...
DDS issues???

The concept of DDS frequency synthesizers comes up frequently.
I can't figure out what they're good for.
I took apart the prototype hardware, so you'll have to be
content with an Excel simulation.
Here's a plot of a DDS simulation.

http://nm7u.tripod.com/homepage/sine.jpg

If you looked at it on a real-time scope, you'd likely
be impressed. All the points lie exactly on the sine wave,
(within D/A resolution)
so statistically it's a real sinewave. Averaged over time
the AVERAGE frequency can be very precise.

But if you look at it on a storage scope, you can see that
each cycle is different.
The sample points on the sine wave are different. Each cycle is
still a sine wave.

And the difference can change dramatically for
small changes in frequency. The graph shows how for some frequencies, the
output is amplitude modulated at a much lower frequency. You can't
take that out with a low-pass filter.
Looking at this in another way, if your sampling rate is 100kHz and
the time-sampled system is generating a frequency of 49,9999 Hz, you
may indeed have a problem filtering out the reflected signal of the
same amplitude and at 2 Hz higher frequency at 51,001 Hz.

I went to the doc and told him "It hurts when I do this
[contorting my arm around my neck]." He said "Don't do that."


The graph is deceptive cause it
linearly interpolates the points. In actuality, there's a big
ole step at each point. This becomes painfully clear if you try to use
a comparator to generate a square wave. Or if you try to DDS anything
other than a sine wave.

Yes, if you filter it enough, you can make anything into
a sinewave. And if your hardware is a few orders of magnitude
faster than your ouput requirement, the filter is easier.

What am I missing that makes DDS useful in any time-domain application
or wideband frequency-domain application?
A full understanding of sampled-time systems?

There's a free textbook online at http://www.dspguide.com - I'd
suggest reading starting in chapter 3 starting near the bottom of page
39, "The Sampling Theorem."
This sampling stuff assumes theoretically perfect brickwall analog
low-pass fiters at 1/2 the sampling rate at the input of the ADC and
the output of the DAC (for many purposes it's good to assume these
filters are part of the ADC and DAC).
If that bothers you, remember this "assume we have a theoretically
perfect X" is done in other areas of engineering - for example it's
often assumed that an inductor has no capacitance between the coil
windings. These are acceptable approximations in some situations, and
not in others. Part of engineering is knowing which is which.

mike
--
Return address is VALID.
Wanted, PCMCIA SCSI Card for HP m820 CDRW.
FS 500MHz Tek DSOscilloscope TDS540 Make Offer
http://nm7u.tripod.com/homepage/te.html
Wanted, 12.1" LCD for Gateway Solo 5300. Samsung LT121SU-121
Bunch of stuff For Sale and Wanted at the link below.
http://www.geocities.com/SiliconValley/Monitor/4710/

I'd say you're missing the modern digital mindset.
Y'know ... Oh shit!, that's analogue, it's going to be messy, it'll need
some of that awkward feedback stuff and amplitude control stuff. I've only
I se a magazine column title coming up: "What's all this analog(ue)
stuff, anyway?"

left myself 1mm^2 on the PCB, how can I be expected to get those capacitor
and resistor thingies in there?. Where can I buy an expensive, crap, pre
built chip solution?. Ah!, so a DDS requires a filter then?. Would that by
any unlikely chance, require an inductor thing? ..., and so on and so forth
... :)
regrds
john
-----
http://mindspring.com/~benbradley
 
On Sun, 30 Jan 2005 14:47:13 -0800, mike wrote:

DDS issues???

The concept of DDS frequency synthesizers comes up frequently.
I can't figure out what they're good for.
I took apart the prototype hardware, so you'll have to be
content with an Excel simulation.
Here's a plot of a DDS simulation.
They are very good for high frequency resolution sine wave generation.
They are very good for generating extremely linear frequency ramps
(chirps). They are very good for exercising fine control over the phase of
a sinusoid.

When filtered appropriately, they produce good sine waves with reasonably
low phase noise, and relatively low (and predictable) spurs.

http://nm7u.tripod.com/homepage/sine.jpg

If you looked at it on a real-time scope, you'd likely
be impressed. All the points lie exactly on the sine wave,
(within D/A resolution)
so statistically it's a real sinewave. Averaged over time
the AVERAGE frequency can be very precise.
Not just precise, but dead on (as long as your input clock is dead on).

But if you look at it on a storage scope, you can see that
each cycle is different. And the difference can change dramatically for
small changes in frequency. The graph shows how for some frequencies, the
output is amplitude modulated at a much lower frequency. You can't
take that out with a low-pass filter.
It's not really modulation. It is just a sampling issue. Again, if you
stay away from Nyquist, these chips do a good job. Within the Nyquist
region, there are spurs, but this is often tolerable. Especially if the
spurs are down by 45 dB.

The graph is deceptive cause it
linearly interpolates the points. In actuality, there's a big
ole step at each point. This becomes painfully clear if you try to use
a comparator to generate a square wave. Or if you try to DDS anything
other than a sine wave.

Yes, if you filter it enough, you can make anything into
a sinewave. And if your hardware is a few orders of magnitude
faster than your ouput requirement, the filter is easier.
If you stay far away from Nyquist, the DDS's are great. If you get near
Nyquist, and don't mind a serious filter, DDS's are great.

What am I missing that makes DDS useful in any time-domain application
or wideband frequency-domain application?
mike

--Mac
 
As others have already pointed out, the artefacts on your image are
caused by the missing low pass filter. A lowpass filter (for obvious
reasons also called a "reconstruction filter") will reconstruct the
analogue values in between of the individual samples. The result is a
beautiful sine.

A digital storage scope will generate an image pretty much like the one
that you have simulated with a spreadsheet program. The image will be
the same, no matter whether the signal was generated by a DDS with
suitable filter or an analogue oscillator. The artefacts are identical
to those in your picture, but they are actually generated by the
sampling of the signal, not by generating it. The culprit in that case
is the sampling scope, not the DDS! You can think of a digital scope as
an analogue one without the front-end anti aliasing filter.

Michael
 
On Mon, 31 Jan 2005 13:41:04 -0800, mike <spamme0@netscape.net> wrote:

mike102de@yahoo.com wrote:
As others have already pointed out, the artefacts on your image are
caused by the missing low pass filter. A lowpass filter (for obvious
reasons also called a "reconstruction filter") will reconstruct the
analogue values in between of the individual samples. The result is a
beautiful sine.

It's just counterintuitive. From the pix I published earlier, it looks
like the samples never reach the peak value for several cycles in a row.
I can't get my mind around the fact that I can fix that with a
realizable/practical low pass filter. Yes, I buy that there's enough
information in there to uniquely define a perfect sine wave, given
enough math. Just not intuitive that it can be done with simple low
pass filter with a bandwidth that's 3X the sine frequency and 11X the
frequency of the offending artifact. It's not the first time something
has been counterintuitive to me ;-)

Someone once said (it was me, actually) that for a sufficiently
intelligent life form, everything would be intuitively obvious. And
since we're not, they're not.

Actually, it's sort of cool. It is intuitive that low frequencies have
high point density and make nice sine waves if you just step back and
squint a little. As the frequency approaches Nyquist, the plotted
points look like hell, and some cycles don't seem to reach peak
amplitude. But to filter the artifacts, you need a sharp cutoff
lowpass filter. And if you put a step into a sharp-cutoff lpf, it
rings and overshoots like hell. It's the filter ringing that
automagically repairs the cycles that look too short.

This is trivial and amazing at the same time: the imperfections in the
filter that you are forced to use, repair the imperfections in the
sample set, so you get a perfect sine. Actually, Shannon's Sampling
Theorem explains it all: there is sufficient information in the DDS
lookup table entries to reconstruct perfect sine waves up to fclk/2
(except for the DAC quantization and hold effects, of course.)

John
 

Welcome to EDABoard.com

Sponsor

Back
Top