## All About Mixers as Phase Detectors

Some of the most common questions we receive here are about using mixers as phase detectors. We previously discussed this topic in the post, “DC Offset and Mixers as Microwave Phase Detectors”. In this post we will go into much further depth about the physical mechanisms by which mixers act as phase detectors, and what is important for engineers trying to accomplish this in the lab. First a warning though: we’re just showing experimental results here. The real experts in phase detectors, phase noise, and all things related to phase are the people that do this every day at Holzworth Instrumentation.

Double Balanced Mixers as Phase Detectors

Much has been written about how double balanced mixers work as phase detectors (for example, see this article from Watkins Johnson about the subject). As with most circuit topics the descriptions in the literature are based in math rather than physical principles, so we’ll now consider the physical mechanisms in play when a double balanced mixer is used as a phase detector. Let’s look at what happens when we apply two in phase (frequency matched) voltage signals to an ideal double balanced ring mixer1:

The phases shown in the diagram in degrees correspond to the phase of each signal as it appears at the diodes. For current to flow, a positive voltage must be present across the diode that is greater than the turn on voltage. The red arrows indicate where this condition is met and current will flow. As you can see, when the signals are in-phase current will flow into the IF balun, creating a positive DC voltage at the IF port. Now out of phase signals:

The situation is similar for out of phase signals, except that current is always pulled out of the IF balun, thus creating a negative DC voltage at the IF port. As the phase angle between the two signals is increased from 0°, the current that flows into the IF balun (and thus the detected voltage) will decrease and a reverse current flowing out of the IF balun will appear, further decreasing the detected voltage. When the signals are in quadrature, there is equal current flowing both into and out of the IF balun (assuming the mixer is perfectly balanced). This means that no net DC current is created, and no net voltage is apparent. The IF port is essentially always a DC virtual ground. This is the physical basis for why a double balanced mixer will show no DC voltage for two signals in quadrature2.

With these principles understood, let’s go in the lab and see what happens when we actually apply these signals to double balanced mixers. First we create two signals and use an oscilloscope to verify that they are in quadrature:

At 10 GHz the period is 100 ps, so 25 ps out of phase is in quadrature.  Now we apply these voltages to the input of a ML1-0220LS mixer, and what do we find? Nonzero voltage! In fact, here is what the DC output voltage (taken with a terminated bias tee, this is very important) looks like a function of phase between the two input signals:

Now we would expect this to be a peak at 0°, and the minimum to be at 180°. What is going on? This is a phenomenon that is documented by Stephan Kurtz in the previously referenced WJ app note. In modern double balanced mixers the RF and LO baluns are not identical. In fact, they are not even close. One side is built as a magic tee, where the IF is removed, and the other side has a return to ground on it. Even though the LO and RF baluns traditionally cover identical frequency bands, there is no reason that they need to. They can be completely different! This means that they most likely have a different electrical transmission length and phase delay, which is why the peak of the voltage curve is not quite at 0°. Another effect highlighted in this app note is that there is a voltage offset that shifts the entire curve up (or down). As we detailed in our first post, the excellent balance and isolation of the ML1-0220 minimizes this DC offset and makes it not noticeable for this plot.

1 Note that the necessary DC current return to ground path is necessary but not illustrated for clarity.

2 It is easy to imagine how to extend these principles to the situation where the signals are not at their peak or zero values, and similarly to phases that are not either perfectly in phase or out of phase. While superposition does not strictly work in a nonlinear system such as this, the results one would expect from superposition are maintained qualitatively.

IQ Mixers as Phase Detectors

Now we can calculate the phase of the signal. Excellent. However, there are two ambiguities that we need to clear up. Since this is a sine wave instead of a sawtooth wave, there is some ambiguity about the phase. The same output voltage could be two different phases, except for the max and min. This is fine if you are doing phase noise testing, where you put the two signals in quadrature and just look at any voltage that comes out. For actually detecting the phase between two signals though, it isn’t enough information. The second ambiguity is that we need to know the max and min voltage levels, as well as the DC offset, to determine the phase. Since the DC offset in Microlithic mixers is small we can ignore this, but we still have a problem if the incoming signals change power at all.

How do we resolve this? One way is to use two mixers as phase detectors and deliberately introduce a phase shift between the two inputs (RF and LO). 180° is no good, because the phase ambiguity remains, so a balun is out. A length of line changes phase with frequency, so that is out too. The other broadband phase shifting options we have are a Schiffman phase shifter or a quadrature hybrid. The quad hybrid is much more common and easy to build3, so what would a structure with a quadrature hybrid introduced on one side look like?

That’s right: the structure is exactly an IQ mixer. Since I and Q are in quadrature, it is easy to calculate the phase between the two signals as

after making a small correction to scale the I and Q values by their peak output level and DC offset4. Let’s look at the same plot of voltage vs. phase for the IQ mixer, along with the calculated phase:

As expected, the calculated phase is almost linear with input phase after the correction factors. This is a significant improvement over the double balanced mixer, since we don’t need to know the input power levels and there is never any phase ambiguity. But how close is the IQ mixer to invariant with input power? When the two signals are at 0/90/180/270 degrees to each other, there is obviously very little variation in calculated phase with power since one of the voltages doesn’t change. If we pick a phase in the middle (135°)5, this is what it looks like:

As you can see the power levels the agreement to 135° is excellent. As we increase to higher power levels, one of the mixers compresses sooner than the other mixer due to the amplitude balance in the quadrature hybrid, and the phase is thrown off. Up to 0 dBm, however, the agreement with the real phase is excellent. This does not address what happens when one of the signals is significantly higher than the other one, nor with double balanced mixers when you are just trying to detect phase changes, where high powers are desirable to increase sensitivity.

Now that we have examined the physical mechanisms of how mixers work as phase detectors, we can do the reverse and see how they work as phase modulators. This is the subject we will tackle in our next post, “All About Mixers as Phase Modulators”.

3Quad hybrids are easier than Schiffman phase shifters, but still ridiculously difficult to build broadband. You don’t have to trust me, you can try yourself, and then buy ours when it takes you 6 months.

4You also have to convert to a -180 to +180 phase range, or 0 to 360, or whatever. Arctangent only gives you values from -90 to +90, so you have to use the sign of the signals to figure out where exactly you are.

5How do we know the phase is 45 degrees? Because we put the signals in quadrature (which is the same at any power levels), and then moved them 12.5 ps on the oscilloscope, equivalent to 45° at 10 GHz.

### 6 Responses to All About Mixers as Phase Detectors

1. Mark says:

The phase ambiguity stays in the IQ Mixer since atan function has period 180 degrees. Your atan function is unwrapping the phase by using some other information. What is this other information and how is it implemented?

• Mark says:

Allow me to reply to myself ( I was quick to ask!). You infact mention this problem and that you need to take care of the signs to unwrap. Alternatively one can check the implementation of the atan2() function in software.

2. Nick F says:

The center of the left side coil (going to the diodes) should be grounded, otherwise there is no current flowing at IF Out

• Doug Jorgesen says:

That is correct. You always need a return to ground for the IF current or the mixer will not work, and I neglected to show that on the circuit diagram. Good catch.

3. Some signal processing techniques such as those used in radar may require both the amplitude and the phase of a signal, to recover all the information encoded in that signal. One technique is to feed an amplitude-limited signal into one port of a product detector and a reference signal into the other port; the output of the detector will represent the phase difference between the signals.