Mixer math¶
Up-conversion¶
At the I and Q ports of the up-conversion mixer we have signals \(I(t)\) and \(Q(t)\) at frequency \(\omega_S\):
where the following identities hold:
At the R port of the mixer, assuming a carrier frequency \(\omega_N\) and zero phase, we get:
where the minus sign is a convention. Expanding and rearranging, we get:
where \(R_L\) and \(R_U\) are the lower and upper sidebands, respectively.
Zero intermediate frequency¶
When \(\omega_S = 0\), at the I and Q ports of the mixer we get:
At the R port:
Special case: same amplitude, same phase¶
Choosing \(A_I = A_Q = A\) and \(\phi_I = \phi_Q = \phi\) we get:
and a total amplitude \(|R| = \sqrt{2}A|\cos{\phi}|\). Note that the total phase is \(\pi/4\), independent of \(\phi\) (for \(\phi \in [-\frac{\pi}{2},+\frac{\pi}{2}]\), otherwise there’s a sign change).
Some notable cases:
\(\phi\) |
\(|R| \; / \; \sqrt{2}A\) |
---|---|
\(0\) |
\(1\) |
\(\pi/6\) |
\(\sqrt{3} / 2\) |
\(\pi/4\) |
\(1 / \sqrt{2}\) |
\(\pi/3\) |
\(1 / 2\) |
\(\pi/2\) |
\(0\) |
Special case: same amplitude, \(\pi/2\) phase difference¶
Choosing \(A_I = A_Q = A\), \(\phi_I = \phi\) and \(\phi_Q = \phi \mp \pi/2\) we get:
and a total phase \(\pm\phi\), and amplitude \(|R| = A\) independent of \(\phi\). Note the inversion from \(\mp\) to \(\pm\).
Single-sideband modulation (SSB)¶
Quick reference
To perform single-sideband modulation, set \(\phi_I\) to whatever you want and:
\(\phi_Q = \phi_I + \pi/2\) for lower sideband (LSB);
\(\phi_Q = \phi_I - \pi/2\) for upper sideband (USB).
Lower sideband (LSB)¶
To get \(R_U=0\) in Eq. (2), we want
Then \(I(t)\) and \(Q(t)\) should have the same amplitude
let’s call the amplitude \(A\). We can rewrite Eq. (3) as
which is solved by \(\phi_Q = \phi_I + \pi/2\).
Substituting into \(R_L(t)\) from Eq. (2) we get:
Upper sideband (USB)¶
Analogous to the previous section. To get \(R_L=0\) in Eq. (2), we want
Then \(I(t)\) and \(Q(t)\) should have the same amplitude
let’s call the amplitude \(A\). We can rewrite Eq. (4) as
which is solved by \(\phi_Q = \phi_I - \pi/2\).
Substituting into \(R_U(t)\) from Eq. (2) we get:
Down-conversion¶
General case¶
At the R port of the mixer, we have an incoming signal \(R(t)\) at frequency \(\omega_R\):
where the identities of Eq. (1) hold.
At the I and Q ports of the down-conversion mixer we get the signals \(I(t)\) and \(Q(t)\), assuming a carrier frequency \(\omega_N\) and zero phase:
where the minus sign is a convention. Expanding and rearranging, we get:
where we have omitted high-frequency components at frequency \(\omega_R+\omega_N\). See the section Spurs in down-conversion below for a complete analysis of those spurious components.
Zero intermediate frequency¶
In the special case when the incoming RF signal and down-conversion carrier have the same frequency \(\omega_R = \omega_N\), the I and Q ports of the mixer output the two quadratures of the original baseband signal:
Single-sideband modulation (SSB)¶
The incoming RF signal \(R(t)\) could contain a lower \(R_L\) and an upper \(R_U\) sideband:
where the sidebands are offset by \(\omega_S\) from the central carrier at frequency \(\omega_N\). Typically we have that \(\omega_S \ll \omega_N\).
After demodulation in the IQ mixer with a carrier at frequency \(\omega_N\), we get at the I and Q ports:
where we have neglected high-frequency terms at \(2\omega_N \pm \omega_S\).
Eq. (5) can be summarized in terms of the X and Y quadratures of the measured signals at the I and Q ports:
Finally, we can invert Eq. (6) to obtain the X and Y quadratures of the incoming RF signal:
The utility function utils.untwist_downconversion()
uses the relations in Eq.
(7) to calculate the original upper and lower sidebands from the measured I and
Q signals.
Spurs in down-conversion¶
We described in the previous section Down-conversion how the down-conversion process generates low-frequency components at frequency \(\omega_R - \omega_N\), where \(\omega_R\) is the frequency of the incoming RF signal and \(\omega_N\) is the frequency of the down-converting carrier generator. These components are output from the I and Q ports, and we’ll call them \(I_{diff}(t)\) and \(Q_{diff}(t)\).
However, the down-conversion process generates also high-frequency components at frequency \(\omega_R + \omega_N\), which we’ll call \(I_{sum}(t)\) and \(Q_{sum}(t)\) and can be viewed as spurious signals. Overall, we have that \(I(t) = I_{diff} + I_{sum}\) and \(Q(t) = Q_{diff} + Q_{sum}\). In the previous section we neglected the high-frequency components, so we had assumed \(I(t) \approx I_{diff}\) and \(Q(t) \approx Q_{diff}\).
Typically, we select a carrier frequency very close to the signal frequency, i.e. \(\omega_R-\omega_N \ll \omega_R+\omega_N\), so \(I_{diff}\) and \(I_{sum}\) are very far apart in frequency space. In external, analog frequency down-conversion with IQ mixers and local oscillators the terms \(I_{sum}\) and \(Q_{sum}\) at frequency \(\omega_R+\omega_N\) fall outside the analog bandwidth of the I and Q ports of the mixer and are heavily attenuated, so are usually negligible. In Presto, however, the frequency down-conversion happens in the digital domain and therefore the terms at \(\omega_R+\omega_N\) are not attenuated: \(I_{sum}\) and \(Q_{sum}\) are still present in the data, and are possibly aliased down to a lower frequency.
In this section, we will rewrite the Down-conversion equations without neglecting the high-frequency spurious terms.
General case¶
At the R port of the mixer, we have an incoming signal \(R(t)\) at frequency \(\omega_R\):
At the I and Q ports of the down-conversion mixer we get the signals \(I(t)\) and \(Q(t)\), assuming a carrier frequency \(\omega_N\) and zero phase:
where the minus sign is a convention. Expanding and rearranging, we get:
Similarly, for \(Q(t)\) we get:
Zero intermediate frequency¶
When \(\omega_R = \omega_N\), at the I and Q ports of the mixer we get:
Single-sideband modulation (SSB)¶
The incoming RF signal \(R(t)\) could contain a lower \(R_L\) and an upper \(R_U\) sideband:
After demodulation in the IQ mixer with a carrier at frequency \(\omega_N\), we get at the I and Q ports: