digital I/Q

I want to measure the phase angle between two 100 MHz waveforms. One way to do that is to phase shift one of them 90 degrees and mix those two with the other, and lowpass the I and Q products. The filtered I and Q voltages plot a circle as a function of the phase difference, and the angle is the arctan of those two voltages.

If I do all that inside an FPGA (except the analog filters) I'd use a digital phase shifter, and XOR gates as the mixers, and the mediocre internal XADC to digitize the voltages. Simple!

formatting link

The voltage plot of filtered I and Q vs angle becomes a diamond instead of a circle. We need a new function to convert to angle, and I modestly suggested "larktan." One of my FPGA guys can figure out how to do that.

formatting link

I just thought that looked cool.

--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin
Loading thread data ...

What's wrong with this:

formatting link
Price?

Reply to
bloggs.fredbloggs.fred

It's fine for some use, but I can do everything but the cheap lowpass filters in a minute fraction of an FPGA that's there already.

--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin

What about synchronous detection alias lock in

That gives you the phase in LF analog

And you can do it digital also

Cheers

Klaus

Reply to
Klaus Kragelund

Yep. Another is an oscilloscope with delayed sweep. It's quick, dirty, analog; the trifecta!

Why use a delay for the phase shift, it's not a generally accurate solution, and only works for the single frequency of interest?

Reply to
whit3rd

XORing the square waves and lowpass filtering is synchronous detection, morally equivalent to lockin. At any instant, observing the two voltages at the lowpass outputs tells us the phase angle. Just apply the larktan function, the "linearized arctan."

My measurement speed is limited by the lowpass filters. The XOR gate outputs have frequency components that are all above 100 MHz, so I can really use faster filters before the ripple matters. The Xilinx XADC can sample at 1 MHz max, so there's no point to making the filters too fast.

Maybe there is a way to do the phase measurement all inside the FPGA, but this looks pretty good. It just needs a few cheap passives for the filters.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

What's wrong in using a 'scope in x-y mode?

--
Mike Perkins 
Video Solutions Ltd 
 Click to see the full signature
Reply to
Mike Perkins

What's the tpd of those FPGA gates? 100MHz is 10ns per 360 degrees, which seems to maybe make the digital approach risky.

Reply to
bloggs.fredbloggs.fred

Tpd is dominated by i/o pins. I've been told that the gates inside an FPGA have local delays in the 10s of picoseconds.

My angular resolution is in theory limited by the ADC resolution. If one linear slope is equivalent to 5 ns and I have a 12 bit ADC, one LSB is about a picosecond.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

This will be on a small PC board inside a laser controller, deep embedded stuff.

The delay line is just handy for Spicing. We'd actually make quadrature square waves digitally inside the FPGA.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

That gives you the same result you get with AD8302, but probably worse:

No idea why they're now quoting $25, because I bought 5 a couple of months ago for a buck each.

Cute plots though.

Clifford Heath

Reply to
Clifford Heath

Digikey says ~$25, Analog says $12 @1000

and on Ebay you can get 10 for $10 or one on a board for $5

formatting link
formatting link

hm..

Reply to
Lasse Langwadt Christensen

How is that possible for that EBay low price? (By the way seen it many times before)

Counterfeit IC?

Or somehow they buy it cheaper than we can?

Normally when calculating high volume pricing, I just divide Digikey pricing by 2, but here its more like 10

Cheers

Klaus

Reply to
Klaus Kragelund

remnants from some production run,

--
  When I tried casting out nines I made a hash of it.
Reply to
Jasen Betts

It would be a square if you had the same axis scale on x & y.

You can turn it into phase by a piecewise linear approximation since your triangle wave function is linear in time apart from near 0 and 1.

S>0.5 -> t = 0.98-C S t = 1.96+C

If you don't mind an inflexion otherwise you will need to splice a bit of the S in where the C is turning around. PI=1.96 in this universe...

--
Regards, 
Martin Brown
Reply to
Martin Brown

That AD part uses a limiting amp and a multiplier to detect phase, which is equivalent to my in-phase XOR gate. The phase signal is ambiguous, +1 volt at both +80 and -80 degrees, and the error near 0 degrees is huge. It would be fine for a PLL that locks at 90 degrees difference.

I want to measure actual phase accurately over the full 360 degree range.

--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin

Yes; LT Spice axis scaling made it look asymmetric. It is a diamond in voltage.

Right, the larktan function is simple; my FPGA guys can do that in minutes. A little blending can prevent a discontinuity around the decision points or from unequal gain paths. They would enjoy coding something clever.

--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin

Nothing wrong, but observing a waveform overlap for symmetry while adjusting a knob is easier than looking at a lumpy loop and measuring its right/left lean.

The ten-turn pot of a delay gives a two or three digit result directly (and a calibration with a chunk of premeasured delay in the form of a coax cable is easy).

Reply to
whit3rd

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.