Electronics-Related.com
Forums

DDS wisdom

Started by Phil Hobbs December 4, 2014
On 12/4/2014 7:10 PM, rickman wrote:
> On 12/4/2014 3:04 PM, Phil Hobbs 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? > > I've read all the posts so far and it seems you are generating a VHF > sine wave to compare to a VHF signal you wish to measure the phase and > amplitude of. I think I get that. But it seems the modulation of the > VHF signal is pretty low rate so that 50 kSPS is good enough. > > Then you ask about how to maintain enough isolation to preserve 14 bits > of phase measurement. I think the isolation you are worried about it in > the VHF range, no? That is the domain of RF design and not at all > trivial. I think you will need to provide more info on design specifics. > > I'm not clear on how you plan to do the phase detector. Is this just > subtracting the reference signal from the signal being measured? You > then scan the phase of the reference to find the null, scan the > amplitude of the reference to optimize the null and then possibly > repeat? Otherwise I'm not sure how you get both phase and amplitude out > of this. >
The phase detector will probably be a diode bridge type, e.g. a Mini Circuits MPD-1. It's approximately a multiplier. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
On 12/4/2014 7:41 PM, Neon John wrote:
> On Thu, 04 Dec 2014 15:04:01 -0500, Phil Hobbs > <pcdhSpamMeSenseless@electrooptical.net> wrote: > > >> 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? > > Hi Phil, > > I'm using an AD9835 DDS chip in one of our upcoming induction heaters. > That one does from millihertz to 25Mhz. Anything past about 5 Mhz > needs some pretty good low pass filtering, as the output only > approximates a sine wave. I'm using it in the 75 to 500kHz range and > there it is beautiful. > > Programming it is a snap. It talks via SPI. The Atmel processor I > use has hardware SPI support so it's just a matter of setting a few > registers and passing the desired frequency to the SPI transmitter. > > This chip can store two frequencies and has a line to toggle between > them for modulation purposes. I don't recall what the chip > initialization requires but it's just a few lines of code. I can dig > it up for you if it would be helpful.
Hi, John, Sure, all contributions welcomed. It's just me doing all the optics, optomechanics, electronics, and software on this one, so there's not a lot of slack if I get stuck on anything. Thanks Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
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. Thanks Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
On 12/4/2014 5:54 PM, Tim Wescott wrote:
> On Thu, 04 Dec 2014 17:50:10 -0500, Phil Hobbs wrote: > >> On 12/04/2014 04:01 PM, Tim Wescott wrote: >>> On Thu, 04 Dec 2014 15:04:01 -0500, Phil Hobbs 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? >>>> >>>> Thanks >>>> >>>> Phil Hobbs >>> >>> So the short story is that you're going to generate a sine wave, send >>> it through some system, and you want to accurately measure the phase >>> shift of what comes out of the system? >>> >>> And you propose to do this using a pair of DDS chips for source and >>> reference, with an analog phase detector? At 100ksps? >>> >>> Do you drive around in a car that has a brand new engine coupled to a >>> 1939 Lincoln gearbox? >>> >>> Why not use one DDS to generate your sine wave, then capture the return >>> with an ADC and do the phase detection digitally? 100ksps should be >>> well within the capabilities of a Cortex M3 part, and if it isn't there >>> are Cortex M4 parts and DSP chips to take up the slack. >> >> As the wise man said, there's nothing more dangerous than an idea, when >> it's the only one you have. ;) >> >> >>> For that matter, it may be easier to maintain synchronization by >>> generating the sine wave in the processor and stuffing it out a plain >>> old DAC. Then your DAC and ADC can have a common convert command. >>> >>> >> Because the signal coming back is at VHF, and using nulling eliminates >> the need for 2D calibration, as I said. A DDS is less complicated to >> use than a 200 MHz ADC, for sure, and it saves me a boatload of Mini >> Circuits stuff getting the signal down to baseband, and several >> expensive and phase-distorting filters getting rid of all the attendant >> spurs. >> >> It's $20 vs at least $200 for poorer performance and a lot more agita. >> No contest. Nulling is Good Medicine for this sort of job. >> >> I'm mainly interested in advice about pitfalls using multiple DDSes for >> high spectral purity applications. > > Ah. Much be comes clear -- I read your samples per second requirement to > be a bandwidth spec. Instead, it appears that you're working with a > (relatively) small bandwidth around a carrier. > > To quote Rosanne Rosannadanna: never mind.
Sorry to be so telegraphic about it--I've been justly criticized for my strong tendency to identify the category [stuff-I-learned-long-ago] with the very weakly related category [stuff-too-easy-to-require-explaining]. Most of it wasn't easy at the time! Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
Phil Hobbs <hobbs@electrooptical.net> wrote:

> On 12/4/2014 7:44 PM, Joe Gwinn wrote:
>> 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.
> Thanks
> Phil Hobbs
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. Time-Nuts has a number of threads discussing this issue. I could not find the particular thread I was looking for, but you might be interested in this one that has some very useful information buried in various posts. The thread is "DDS in GPSDO design?", at https://www.febo.com/pipermail/time-nuts/2012-May/067573.html There are several more threads on the same issue. You can search the archives using https://www.febo.com/pipermail/time-nuts/ "Your Search String"
On 12/4/2014 10:27 PM, Phil Hobbs wrote:
> On 12/4/2014 7:10 PM, rickman wrote: >> On 12/4/2014 3:04 PM, Phil Hobbs 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? >> >> I've read all the posts so far and it seems you are generating a VHF >> sine wave to compare to a VHF signal you wish to measure the phase and >> amplitude of. I think I get that. But it seems the modulation of the >> VHF signal is pretty low rate so that 50 kSPS is good enough. >> >> Then you ask about how to maintain enough isolation to preserve 14 bits >> of phase measurement. I think the isolation you are worried about it in >> the VHF range, no? That is the domain of RF design and not at all >> trivial. I think you will need to provide more info on design specifics. >> >> I'm not clear on how you plan to do the phase detector. Is this just >> subtracting the reference signal from the signal being measured? You >> then scan the phase of the reference to find the null, scan the >> amplitude of the reference to optimize the null and then possibly >> repeat? Otherwise I'm not sure how you get both phase and amplitude out >> of this. >> > The phase detector will probably be a diode bridge type, e.g. a Mini > Circuits MPD-1. It's approximately a multiplier.
I'm not familiar with that type of detector. Will that give you an output related to phase and also proportional to amplitude? -- Rick
On 12/5/2014 1:26 AM, Tom Swift wrote:
> Phil Hobbs <hobbs@electrooptical.net> wrote: > >> On 12/4/2014 7:44 PM, Joe Gwinn wrote: > >>> 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. > >> Thanks > >> Phil Hobbs > > 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.
What counter is supposed to be rolling over? The phase accumulator is constantly rolling over and produces no anomaly when it does. I'm not sure what other counter there is?
> Time-Nuts has a number of threads discussing this issue. I could not find > the particular thread I was looking for, but you might be interested in > this one that has some very useful information buried in various posts. > > The thread is "DDS in GPSDO design?", at > > https://www.febo.com/pipermail/time-nuts/2012-May/067573.html
Ah, this is something totally different. "Phase truncation spurs" is the result of having limited resolution in the sine wave lookup table. You can make the phase accumulator as many bits as you find reasonable and get very fine frequency control. But when that large phase word needs to be turned into a point on the sine wave the resolution is usually much smaller. I worked on a design like this once and found that a combination approach can do great things to minimize this limitation. But ultimately there is a limit to the resolution of the DAC. This produces quantization errors which show up as spurs. As long at the target frequency can be represented as the ratio of the step size to the counter modulus times the clock frequency, the output frequency will be exact. -- Rick
Tom Swift <spam@me.com> wrote:

> Phil Hobbs <hobbs@electrooptical.net> wrote: > >> On 12/4/2014 7:44 PM, Joe Gwinn wrote: > >>> 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. > >> Thanks > >> Phil Hobbs
> Time-Nuts has a number of threads discussing this issue. I could not > find the particular thread I was looking for,
I found it. An (unknown?) nasty feature of the DDS principle for time nuts applications https://www.febo.com/pipermail/time-nuts/2011-January/053863.html
On Friday, 5 December 2014 14:27:37 UTC+11, Phil Hobbs  wrote:
> On 12/4/2014 7:10 PM, rickman wrote: > > On 12/4/2014 3:04 PM, Phil Hobbs 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-p=
i,
> >> 50 ks/s phase measurement that I was pretty happy with. (The extra bi=
t
> >> 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 futilit=
y
> >> of almost all instruments papers). > >> > >> The advantage of nulling detection is that you only need 1-D calibrati=
on
> >> tables for phase shift and amplitude, whereas getting that sort of > >> accuracy with I/Q techniques requires a 2-D calibration table, which i=
s
> >> a gigantic pain. > >> > >> I need to do this again, 2015 style. The speed requirements are set b=
y
> >> the acoustic delay in the AO scanner, so 50-100 ks/s is about all I ca=
n
> >> 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 generat=
e
> >> 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 folk=
s
> >> who have. How hard is that likely to be, and what should I particular=
ly
> >> watch out for? > > > > I've read all the posts so far and it seems you are generating a VHF > > sine wave to compare to a VHF signal you wish to measure the phase and > > amplitude of. I think I get that. But it seems the modulation of the > > VHF signal is pretty low rate so that 50 kSPS is good enough. > > > > Then you ask about how to maintain enough isolation to preserve 14 bits > > of phase measurement. I think the isolation you are worried about it i=
n
> > the VHF range, no? That is the domain of RF design and not at all > > trivial. I think you will need to provide more info on design specific=
s.
> > > > I'm not clear on how you plan to do the phase detector. Is this just > > subtracting the reference signal from the signal being measured? You > > then scan the phase of the reference to find the null, scan the > > amplitude of the reference to optimize the null and then possibly > > repeat? Otherwise I'm not sure how you get both phase and amplitude ou=
t
> > of this. > > > The phase detector will probably be a diode bridge type, e.g. a Mini=20 > Circuits MPD-1. It's approximately a multiplier.
Why not use a real multiplier? Analog Devices have a couple of pretty good = analog multiplier chips. AD734 and AD834 come to mind. And if you are working at a fixed frequency, running the DDS staircase appr= oximation to a sine wave through an integrator (with the right gain) turns = it into a straight-line interpolation approximation to a sine wave, which i= s a lot nicer, (and slightly easier to filter). --=20 Bill Sloman, Sydney
On 12/5/2014 7:15 AM, Tom Swift wrote:
> Tom Swift <spam@me.com> wrote: > >> Phil Hobbs <hobbs@electrooptical.net> wrote: >> >>> On 12/4/2014 7:44 PM, Joe Gwinn wrote: >> >>>> 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. >> >>> Thanks >> >>> Phil Hobbs > >> Time-Nuts has a number of threads discussing this issue. I could not >> find the particular thread I was looking for, > > I found it. > > An (unknown?) nasty feature of the DDS principle for time nuts applications > > https://www.febo.com/pipermail/time-nuts/2011-January/053863.html
I can't say I fully understand everything he is describing. I'm not at all clear on what data he is collecting and graphing. But there are two issues involved. One is the mismatch in frequency because of the binary modulus used, the other is the truncation error introduced in generating the sine wave from the phase accumulator. I would say his graphs are looking at the jitter introduced by the truncation error. Do you follow what data he is graphing? -- Rick