Electronics-Related.com
Forums

DDS wisdom

Started by Phil Hobbs December 4, 2014
John Larkin <jlarkin@highlandtechnology.com> wrote:

> On Sat, 06 Dec 2014 20:27:53 GMT, Tom Swift <spam@me.com> wrote: > >>John Larkin <jlarkin@highlandtechnology.com> wrote: >> >>> On Fri, 05 Dec 2014 06:26:40 GMT, Tom Swift <spam@me.com> wrote: >> >>>>Joe is right. Most DDS are 32 bits. As I understand it, when you >>>>program in a frequency, there are some bits left over. When the >>>>counter rolls over, these do not align with the starting phase. >>>>Depending on the clock and output frequencies, there will be a phase >>>>bump every several seconds or so. >> >>> A binary-radix DDS, the only kind you can buy, forces the frequency >>> output to be quantized to Fclk/2^n, which means you can't generally >>> exactly hit nice decimal-expressed frequencies. But nothing special >>> happens when the phase accumulator rolls over; there are no periodic >>> phase bumps, other than the inherent jitter associated with >>> quantizing the output waveform to the clock frequency and the phase >>> accumulator math. >> >>As you say, you are not an RF guy and you don't do sine waves. These >>issues are many orders of magnitude below your level of interest or >>ability to measure. > > Not so. > >> >>But obviously, they are real, measurable, and severely limit the use >>of DDS in precision applications. >> >>But that's not your field. > > Our waveform generators are mostly used to test aircraft > instrumentation and controls. Different requirements from RF. Our > stuff is usually wideband: not, for example, 10 GHz but rather DC to > 10 GHz. Just last week we were generating some 40 ps wide light pulses > from a laser specified as a CW pump. > > We do have a good 3 GHz spectrum analyzer, and we do look at the spurs > and harmonic distortion of all of our waveform generators, both sine > generators and arbs. And we do a little tweaking to improve things. We > have had more trouble with filters and opamps than we have had with > the DDS math and the DACs. ARBS have more potential distortion > products than sine generators.
Thanks for the review of your test equipment. You may be interested down to -60dBc or less. My interest is DC to 50GHz, and phase noise (jitter) down to -220dBc. Completely different level. Like I mentioned above, your field is not in precision applications. Your credentials in broadband, time and frequency were also firmly established in the threads on the NIF project.
> We care a lot about harmonic distortion; RF folks often don't. They > work narrowband, and generally have bandpass stages downstream.
RF covers broadband as well as narrowband. We have to be good at both.
Joe Gwinn <joegwinn@comcast.net> wrote:
 
> In article <XnsA3FBA89E133D1idtokenpost@69.16.179.23>, Tom Swift > <spam@me.com> wrote:
>> Don't give up so soon. I think you may be referring to Section 4, >> "The Effect of Truncating the Phase Accumulator on Spurious >> Performance," starting on Page 19 of
>> <http://www.analog.com/static/imported-files/tutorials/450968421DDS_Tu >> torial_rev12-2-99.pdf>
> Ahh. Perhaps so.
>> Fred Harris may have ways to help reduce it, discussed in "Ultra Low >> Phase Noise DSP Oscillator", at
>> <https://www.researchgate.net/profile/Fred_Harris2/publication/3321879 >> _Ultra_Low_Phase_Noise_DSP_Oscillator_DSP_Tips__Tricks/links/542425050 >> cf238c6ea6e953a> > > I may remember this. I'll look into my trove at work.
>> > I discovered the effect when analyzing why a prototype DMTD (Dual >> > Mixer Time Difference) instrument was suffering periodic phase >> > bumps. When one is measuring the performance of Rubidium clocks >> > (10^-11 fractional frequency error), it doesn't take much. >> >> What did you use to solve the problem?
> I didn't. The prototype belonged to one of our vendors (who shall > remain nameless), and they had developed it first for use in their own > lab, with distant theories about maybe selling it as well. But no > such product has appeared in their catalog. I bet they bought a > Symmetricom 5115a, which would cost a lot less than the effort to > develop a good enough unit. The vendor was trying to use their > prototype DMTD unit for testing of a product being developed for my > employer, and were getting unexpected results. My contribution was to > figure out why.
Thanks for the info. The 5115a was from Timing Solutions. Johm Miles developed a less expensive version called the TimePod 5330A and sold for US $4995.00: https://www.febo.com/pipermail/time-nuts/2012-June/068069.html This was later acquired by Symmetricom, which now Microsemi. Theoretically, you can build one from information in the user manual: http://www.miles.io/TimePod_5330A_user_manual.pdf It runs on John's Timelab software available at http://www.ke5fx.com/timelab/readme.htm Ulrich used the SR620 to find the phase bump in his post at https://www.febo.com/pipermail/time-nuts/2011-January/053863.html Here's the user manual: http://www.thinksrs.com/downloads/PDFs/Manuals/SR620m.pdf With all these heavyweights and specialized equipment in the frequency and time field, I am extremely impressed that you managed to find the problem with no outside support. Congratulations!
> The way Symmetricom (actually Timing Solutions, acquired by > Symmetricom) solved the whole DDS spur and bump problem is by > computing the sine wave amplitudes directly (no DDS chip) and loading > it into a clock-indexed RAM unit. These numbers are fed directly to a > digital multiplier (replacing an analog mixer). The actual frequency > is tweaked such that there is no glitch when the memory rolls over. I > got this from a Timing Solutions patent. That too is in the trove.
Interesting. I'd like to find that patent. It may help solve a problem I'm having with generating small frequency offsets. I have been searching for Timing Solutions patents with not very good luck so far. I hope you have some time soon to open your treasure chest and sprinkle some of the delights around. Also, if you happen to come across anything from Holzworth Instrumentation in Boulder, please let me know. They have a propretary synthesizer technique that doesn't use plls and apparently no DDS. They can switch frequencies anywhere from anywhere to in 50us, and nearby frequencies in 5us. It is driving me mad to figure out how they do it. There is apparently nothing in the literature or anything on the web that talks about anything that can do that.
> Joe Gwinn
On Sun, 07 Dec 2014 01:59:00 GMT, Tom Swift <spam@me.com> wrote:

>John Larkin <jlarkin@highlandtechnology.com> wrote: > >> On Sat, 06 Dec 2014 20:27:53 GMT, Tom Swift <spam@me.com> wrote: >> >>>John Larkin <jlarkin@highlandtechnology.com> wrote: >>> >>>> On Fri, 05 Dec 2014 06:26:40 GMT, Tom Swift <spam@me.com> wrote: >>> >>>>>Joe is right. Most DDS are 32 bits. As I understand it, when you >>>>>program in a frequency, there are some bits left over. When the >>>>>counter rolls over, these do not align with the starting phase. >>>>>Depending on the clock and output frequencies, there will be a phase >>>>>bump every several seconds or so. >>> >>>> A binary-radix DDS, the only kind you can buy, forces the frequency >>>> output to be quantized to Fclk/2^n, which means you can't generally >>>> exactly hit nice decimal-expressed frequencies. But nothing special >>>> happens when the phase accumulator rolls over; there are no periodic >>>> phase bumps, other than the inherent jitter associated with >>>> quantizing the output waveform to the clock frequency and the phase >>>> accumulator math. >>> >>>As you say, you are not an RF guy and you don't do sine waves. These >>>issues are many orders of magnitude below your level of interest or >>>ability to measure. >> >> Not so. >> >>> >>>But obviously, they are real, measurable, and severely limit the use >>>of DDS in precision applications. >>> >>>But that's not your field. >> >> Our waveform generators are mostly used to test aircraft >> instrumentation and controls. Different requirements from RF. Our >> stuff is usually wideband: not, for example, 10 GHz but rather DC to >> 10 GHz. Just last week we were generating some 40 ps wide light pulses >> from a laser specified as a CW pump. >> >> We do have a good 3 GHz spectrum analyzer, and we do look at the spurs >> and harmonic distortion of all of our waveform generators, both sine >> generators and arbs. And we do a little tweaking to improve things. We >> have had more trouble with filters and opamps than we have had with >> the DDS math and the DACs. ARBS have more potential distortion >> products than sine generators. > >Thanks for the review of your test equipment. You may be interested down >to -60dBc or less. My interest is DC to 50GHz, and phase noise (jitter) >down to -220dBc. Completely different level. > >Like I mentioned above, your field is not in precision applications.
Hey, "Precision" is our middle name! http://www.highlandtechnology.com/ -- John Larkin Highland Technology, Inc picosecond timing laser drivers and controllers jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On Sunday, 7 December 2014 13:56:26 UTC+11, John Larkin  wrote:
> On Sun, 07 Dec 2014 01:59:00 GMT, Tom Swift <spam@me.com> wrote: > > >John Larkin <jlarkin@highlandtechnology.com> wrote: > > > >> On Sat, 06 Dec 2014 20:27:53 GMT, Tom Swift <spam@me.com> wrote: > >> > >>>John Larkin <jlarkin@highlandtechnology.com> wrote: > >>> > >>>> On Fri, 05 Dec 2014 06:26:40 GMT, Tom Swift <spam@me.com> wrote: > >>> > >>>>>Joe is right. Most DDS are 32 bits. As I understand it, when you > >>>>>program in a frequency, there are some bits left over. When the > >>>>>counter rolls over, these do not align with the starting phase. > >>>>>Depending on the clock and output frequencies, there will be a phase > >>>>>bump every several seconds or so. > >>> > >>>> A binary-radix DDS, the only kind you can buy, forces the frequency > >>>> output to be quantized to Fclk/2^n, which means you can't generally > >>>> exactly hit nice decimal-expressed frequencies. But nothing special > >>>> happens when the phase accumulator rolls over; there are no periodic > >>>> phase bumps, other than the inherent jitter associated with > >>>> quantizing the output waveform to the clock frequency and the phase > >>>> accumulator math. > >>> > >>>As you say, you are not an RF guy and you don't do sine waves. These > >>>issues are many orders of magnitude below your level of interest or > >>>ability to measure. > >> > >> Not so. > >> > >>> > >>>But obviously, they are real, measurable, and severely limit the use > >>>of DDS in precision applications. > >>> > >>>But that's not your field. > >> > >> Our waveform generators are mostly used to test aircraft > >> instrumentation and controls. Different requirements from RF. Our > >> stuff is usually wideband: not, for example, 10 GHz but rather DC to > >> 10 GHz. Just last week we were generating some 40 ps wide light pulses > >> from a laser specified as a CW pump. > >> > >> We do have a good 3 GHz spectrum analyzer, and we do look at the spurs > >> and harmonic distortion of all of our waveform generators, both sine > >> generators and arbs. And we do a little tweaking to improve things. We > >> have had more trouble with filters and opamps than we have had with > >> the DDS math and the DACs. ARBS have more potential distortion > >> products than sine generators. > > > >Thanks for the review of your test equipment. You may be interested down > >to -60dBc or less. My interest is DC to 50GHz, and phase noise (jitter) > >down to -220dBc. Completely different level. > > > >Like I mentioned above, your field is not in precision applications. > > Hey, "Precision" is our middle name! > > http://www.highlandtechnology.com/
Dream on. -- Bill Sloman, Sydney
On 12/6/2014 4:01 PM, Phil Hobbs wrote:
> On 12/5/2014 11:24 PM, rickman wrote: >> On 12/5/2014 10:19 PM, John Larkin wrote: >>> On Fri, 05 Dec 2014 21:29:46 -0500, Phil Hobbs >>> <hobbs@electrooptical.net> wrote: >>> >>>> On 12/5/2014 7:44 PM, Joe Gwinn wrote: >>>>> In article <5481273A.6010107@electrooptical.net>, Phil Hobbs >>>>> <hobbs@electrooptical.net> wrote: >>>>> >>>>>> On 12/4/2014 7:44 PM, Joe Gwinn wrote: >>>>>>> In article <cYydnTNwFPGvIx3JnZ2dnUU7-W-dnZ2d@supernews.com>, Phil >>>>>>> Hobbs >>>>>>> <pcdhSpamMeSenseless@electrooptical.net> wrote: >>>>>>> >>>>>>>> Hi, all, >>>>>>>> >>>>>>>> I have a gig coming in that will have me revisiting my thesis >>>>>>>> research >>>>>>>> from nearly 30 years ago, on interferometric laser microscopes. >>>>>>>> (Fun.) >>>>>>>> >>>>>>>> Back in the day, I made a nulling-type phase digitizer at 60 MHz by >>>>>>>> driving a phase shifter with a 12-bit DAC (AD-DAC80), and >>>>>>>> wrapping a >>>>>>>> 13-bit successive approximation loop round it (AM2904 with an extra >>>>>>>> flipflop). With quite a lot of calibration, that got me a >>>>>>>> 13-bit, 2-pi, >>>>>>>> 50 ks/s phase measurement that I was pretty happy with. (The >>>>>>>> extra bit >>>>>>>> came from deciding which null to head for, which is why I needed >>>>>>>> the >>>>>>>> extra FF.) It was all interfaced to an HP 9816 computer via a GPIO >>>>>>>> card, and (eventually) worked great. I published one of my only >>>>>>>> two >>>>>>>> instruments papers on it (this was before I realized the total >>>>>>>> futility >>>>>>>> of almost all instruments papers). >>>>>>>> >>>>>>>> The advantage of nulling detection is that you only need 1-D >>>>>>>> calibration >>>>>>>> tables for phase shift and amplitude, whereas getting that sort of >>>>>>>> accuracy with I/Q techniques requires a 2-D calibration table, >>>>>>>> which is >>>>>>>> a gigantic pain. >>>>>>>> >>>>>>>> I need to do this again, 2015 style. The speed requirements are >>>>>>>> set by >>>>>>>> the acoustic delay in the AO scanner, so 50-100 ks/s is about all >>>>>>>> I can >>>>>>>> use. Rather than all that squishy analogue stuff, I'm planning >>>>>>>> to do >>>>>>>> the SAR in software and use a pair of AD9951 DDS chips, one to >>>>>>>> generate >>>>>>>> the desired signal and one to be the phase shifted comparison >>>>>>>> signal. >>>>>>>> >>>>>>>> So far so straightforward. >>>>>>>> >>>>>>>> What I'm less sure about is being able to keep the two channels >>>>>>>> sufficiently isolated to be able to maintain 12 or ideally 14 >>>>>>>> bits of >>>>>>>> phase accuracy. Even with a full-scale input, I'll need 85 dB of >>>>>>>> isolation to get 14 bits, and it gets harder with weaker signals. >>>>>>>> (There'll be a DLVA/limiter ahead of the phase detector, which >>>>>>>> will help.) >>>>>>>> >>>>>>>> I've never used DDSes before, and I'd appreciate some wisdom from >>>>>>>> folks >>>>>>>> who have. How hard is that likely to be, and what should I >>>>>>>> particularly >>>>>>>> watch out for? >>>>>>> >>>>>>> DDSs have a forest of rational-multiple (but not necessarily >>>>>>> harmonic) >>>>>>> spurs, and it can be difficult to get them below -60 dBc unless >>>>>>> you can >>>>>>> place some restrictions on the frequency resolution. >>>>>> >>>>>> I can pick my IF to be anything I like, which I expect will help. >>>>>>> >>>>>>> Also beware phase jumps when the DDS phase wheel rolls over. >>>>>> >>>>>> Could you elaborate a bit? I thought the whole idea was to keep >>>>>> phase >>>>>> continuity. >>>>> >>>>> Lots of people have elaborated on the point, so I won't recite it. >>>>> >>>>> It's true that choosing tuning words with the lower k (one chooses a >>>>> suitable value such that nothing is truncated in lookup tables) bits >>>>> zero will greatly reduce the number of spurs, and get rid of the phase >>>>> bump when the phase wheel rolls over, but there will still be lots of >>>>> spurs from the limited width of the lookup tables and DACs. >>>> >>>> If the 'hidden' bits in the phase register are always zero, then the >>>> output of the DAC should be strictly periodic at f_out. That means >>>> that >>>> all, and I mean *all*, of the artifacts will be harmonics of f_out. >>>> Isn't that so? >>> >>> Sure. Absolutely everything repeats at Fout. >> >> No, that's not correct. All of the phase words will repeat every cycle >> of Fout only if the modulus is a multiple of the phase step which in the >> case of a 2^N modulus means the step size is power of 2 as well. Or in >> other words, the clock rate is a power of 2 harmonic of Fout or octaves. > > How is that different from saying that the hidden bits of the phase > accumulator remain constant? It seems like we're in violent agreement, > except that you haven't noticed yet. ;) > > If the hidden bits are always zero, then in each cycle, all the DAC > codes repeat, so the waveform is ideally perfectly periodic. No?
I am trying to explain to you that zeros in the lower bits of the phase step is not the same as a zero value in the truncated bits of the step size. Lets say there are no truncated bits in the phase step or accumulator just to make it easier to talk about. You are saying that anything you then program into the phase step word will give you a waveform that is exactly the same on each cycle of that waveform. This is not correct. Easy example, 4 bit accumulator with a phase step of 3. Modulus of 16 gives cycles of 0,3,6,9,12,15 - 2,5,8,11,14 - 1,4,7,10,13. Notice not only are the cycles not the same, they aren't even the same number of samples. To have each cycle of the output be identical the modulus has to be an integer multiple of the step size. If you have a remainder when dividing the modulus by the step size, this remainder will be an offset at the start of the next cycle which means it won't be the same as the first cycle. With a modulus of 2^n that requires the step size to be 2^m. That is not the same requirement than having zero value in the truncated bits of the step size. In fact, having zero in the truncated portion of the step size is not even a requirement as long as the ratio of the modulus to the step size is an integer. Again, with a modulus of 2^N, if the msb of the truncated portion of the step size is 1 and the rest of the word is zeros the Fout cycle will repeat exactly each cycle of Fout. As I said before, you will get larger spurs, but they will all be clock related spurs exactly the same as having no truncated bits with a clock rate half the actual rate. Easy example - Modulus of 16, 3 bits output, 1 truncated bit, step value of 1 - 0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7 and repeat. So we are *not* in violent agreement... and it is you who hasn't noticed... yet. I hope this covers it. -- Rick
John Larkin <jlarkin@highlandtechnology.com> wrote:

> On Sun, 07 Dec 2014 01:59:00 GMT, Tom Swift <spam@me.com> wrote:
>>Like I mentioned above, your field is not in precision applications.
> Hey, "Precision" is our middle name!
Some people define precision a different way.
On 12/6/2014 7:02 PM, Joe Gwinn wrote:
> [[ This message was both posted and mailed: see > the "To," "Cc," and "Newsgroups" headers for details. ]] > > In article <XnsA3FBA89E133D1idtokenpost@69.16.179.23>, Tom Swift > <spam@me.com> wrote: > >> Joe Gwinn <joegwinn@comcast.net> wrote: >> >>> In article <54826A1A.9080101@electrooptical.net>, Phil Hobbs >>> <hobbs@electrooptical.net> wrote: >>> >>>> On 12/5/2014 7:44 PM, Joe Gwinn wrote: >> >>>>> ADI has a very good tutorial on DDS theory, "MT-085: Fundamentals >>>>> of Direct Digital Synthesis (DDS)". I'd read it. >>>> >>>> Thanks. I did read it, but it didn't say what you said. >>> >>> Hmm. I must be misremembering where I saw that. I think they mention >>> the wheel, but they may not go into what happens at rollover. >> >> Don't give up so soon. I think you may be referring to Section 4, "The >> Effect of Truncating the Phase Accumulator on Spurious Performance," >> starting on Page 19 of >> >> <http://www.analog.com/static/imported-files/tutorials/450968421DDS_Tutorial_rev12-2-99.pdf> > > Ahh. Perhaps so. > > >> Fred Harris may have ways to help reduce it, discussed in "Ultra Low >> Phase Noise DSP Oscillator", at >> >> <https://www.researchgate.net/profile/Fred_Harris2/publication/3321879_Ultra_Low_Phase_Noise_DSP_Oscillator_DSP_Tips__Tricks/links/542425050cf238c6ea6e953a> > > I may remember this. I'll look into my trove at work. > > >>> I discovered the effect when analyzing why a prototype DMTD (Dual Mixer >>> Time Difference) instrument was suffering periodic phase bumps. When >>> one is measuring the performance of Rubidium clocks (10^-11 fractional >>> frequency error), it doesn't take much. >> >> What did you use to solve the problem? > > I didn't. The prototype belonged to one of our vendors (who shall > remain nameless), and they had developed it first for use in their own > lab, with distant theories about maybe selling it as well. But no such > product has appeared in their catalog. I bet they bought a Symmetricom > 5115a, which would cost a lot less than the effort to develop a good > enough unit. The vendor was trying to use their prototype DMTD unit > for testing of a product being developed for my employer, and were > getting unexpected results. My contribution was to figure out why. > > The way Symmetricom (actually Timing Solutions, acquired by > Symmetricom) solved the whole DDS spur and bump problem is by computing > the sine wave amplitudes directly (no DDS chip) and loading it into a > clock-indexed RAM unit. These numbers are fed directly to a digital > multiplier (replacing an analog mixer). The actual frequency is tweaked > such that there is no glitch when the memory rolls over. I got this > from a Timing Solutions patent. That too is in the trove.
I can't say I follow exactly what you are describing that is different from a DDS. But your description is not perfectly clear so I can't be sure. First let's kick out the multiplier since that is not part of what is being done by the DDS, ok? If you want to feed a multiplier by the output of a DDS that's fine (a DDS does not require an analog output, it can be digital words) but the multiplier is not part of generating the sine wave unless I am totally missing something. So you described a "RAM unit" filled with "sine wave amplitudes" indexed by "a clock" whatever that means. I interpret that as a RAM based sine wave look up table indexed by a counter which increments by some value on each clock. As long as that increment value is divisible into the table length (most likely the increment is a value of 1) the pattern will repeat exactly on each cycle of the output sine wave. What you have just described is a DDS! The index is the phase accumulator, the increment is the phase step, the table length is the modulus and the look up table is... well, the look up table, all exactly the same components as used in a DDS. The only difference is that there is no truncated portion of the phase register because it *has* no lower order bits. This would be identical to a DDS that is incremented by 1 in the lsb of the non-truncated portion of the phase accumulator and clocked at N times the output rate where N is the table length (the modulus of the counter in the DDS). It is a very limited function DDS however and can't generate any frequencies other than the input clock divided by M where M is the modulus of the look up table. If they want to increment the RAM index by some other value that is a divisor of M, then they can get output rates of Fclock*2^N/M. I expect they stayed with N = 1 and either had some way of generating a variable clock via a PLL or they just used one input and one output frequency. There is no magic to a DDS, either black or white. The issues of a DDS are inherent in the math of sine wave generation by digital means with finite resolution both in phase (frequency) and amplitude. It doesn't matter if you use a chip called a "DDS" or roll your own, the result is the same if you use the same math. -- Rick
On 06/12/14 20.47, John Larkin wrote:
...
> > Here's one: > > https://dl.dropboxusercontent.com/u/53724080/Circuits/Filters/T346_filter.jpg > > It looks really dumb, but it isn't. That's the beauty of the NuHertz > thing. > > Used here: > > http://www.highlandtechnology.com/DSS/T346DS.shtml
Hi John Where do you buy L16 and L19? 120 Henry :-) Glenn
On 12/6/2014 9:28 PM, Tom Swift wrote:
> > Interesting. I'd like to find that patent. It may help solve a problem > I'm having with generating small frequency offsets.
What is the problem? Are you using digital synthesis?
> Also, if you happen to come across anything from Holzworth > Instrumentation in Boulder, please let me know. They have a propretary > synthesizer technique that doesn't use plls and apparently no DDS. They > can switch frequencies anywhere from anywhere to in 50us, and nearby > frequencies in 5us. It is driving me mad to figure out how they do it. > There is apparently nothing in the literature or anything on the web that > talks about anything that can do that.
How do you know they are not using a PLL or DDS? -- Rick
On a sunny day (Sun, 07 Dec 2014 05:26:23 GMT) it happened Tom Swift
<spam@me.com> wrote in <XnsA3FCEA52FE5Eidtokenpost@69.16.179.23>:

>John Larkin <jlarkin@highlandtechnology.com> wrote: > >> On Sun, 07 Dec 2014 01:59:00 GMT, Tom Swift <spam@me.com> wrote: > >>>Like I mentioned above, your field is not in precision applications. > >> Hey, "Precision" is our middle name! > >Some people define precision a different way.
Yea, precision is better than 5 % :-)