# Measuring the phase difference between two signals

I'm looking for an analog method of measuring the phase difference between two signals operating at frequencies in the range from (0 - 20 MHz). I'm wondering if there's an IC that does that or a specific circuit that converts the phase difference into a voltage signal.

Thank you very much

• Didn't you want to measure the phase of analog signals? – stevenvh Jul 10 '12 at 13:23
• Yes, which is achieved by the selected answer. Unless I misunderstood something – alqubaisi Jul 10 '12 at 17:15
• I've never used the 4046, but if I look at the signal input I only see digital functions: an XOR port and a Set-Reset flip-flop. Also the comparator input is derived from a binary divider. IMO it's a digital device. – stevenvh Jul 10 '12 at 17:18
• Do you know of any analog solution ? Something that would produce a DC output as a function of phase difference ? Thanks – alqubaisi Jul 10 '12 at 17:32
• I assume that your signals are sines, otherwise the word phase is meaningless. In my answer I subtract two sines, and the difference between two sines is always a third sine, whose amplitude is proportional to the phase difference. – stevenvh Jul 10 '12 at 17:50

## 3 Answers

With more specifics on input and output Voltage range, a better answer can be provided.

To measure phase, as Steven says assuming they are equal amplitude and linearity you can subtract but this is a time-variant signal not DC phase output, so one might use a Peak Detector to rectify that signal to mix the result to generate a DC voltage for Phase difference.

The amplitude needs to be normalized (the same) so linear slicers or limiters are used as well as XOR gates ( which is a logic gate that also works here as a mixer/phase detector for logic level signals.

THere are many other ways too such as edge detect, S&H sawtooth clock and Time Interval counters.

.. A better way that I suggest is the 4046 PLL chip.

Do you want 0~180 deg = 0 to Vdd? then use TYPE I "XOR gate" chip or 0~360 deg then use the Type II edge detect phase detector.

CMOS 4046 PLL chip is very easy to use, and has been around since mid 70's, when I first used it. Solution for analog signals:

if you simply subtract both signals you get a signal whose amplitude will increase with increasing phase difference: As the purple signal's phase shifts the difference signal's amplitude increases. The error signal is zero when both signals are in phase (at t = 5). Here both signals start out at the same phase, and the difference signal is only caused by the difference in amplitude. So you'll have an offset if both signals don't have the same amplitude. If $P$ = $A$ - $B$ then applying an envelope detector (peak detector) to all three signals gives you $Phase$ = $A_p$ - $B_p$- $P_p$.

Another chip is the AD8302, which gives you an analog signal proportional to phase difference, and another proportional to log(amplitude ratio). It's kind of expensive, but it works up to a couple GHz; see http://www.analog.com/en/rfif-components/detectors/ad8302/products/product.html

(Disclaimer: haven't actually used it myself)