noneMost of the software-defined radios currently being developed and used by amateur radio enthusiasts rely on a quadrature sampling detector, or QSD, to convert a slice of the RF spectrum to a frequency range which can be sampled and digitized by a standard soundcard.  In Part I of this series, I showed how a sample and hold circuit could be used as a modulator to perform downconversion.  In this part, I’ll show how two sample and holds can be combined to form an I/Q modulator, and why it’s advantageous to do so.

image024In part I, I used a Simulink model of a sample and hold driven by a 1 kHz pulse train to make the sample rate 1000 samples per second.  The pulse train generator is, in effect, the local oscillator.  The LO frequency is the sample rate.  When the signal frequency was 990 Hz, 10 Hz below the LO frequency, the output wavform shown to the left was observed on the oscilloscope.  It’s a 10-Hz sine wave.  The output frequency was equal to the difference in frequency between the LO and the signal.

image030

When the signal frequency was increased to 1010, the output waveform shown here was observed.  The output frequency is still 10 Hz., because the difference between the LO and the signal is still 10 Hz.  Comparing the two waveforms reveals something interesting, though.  When the signal is above the LO, it is phase shifted by 180° when compared to output signal when the input is 10 Hz. below the LO.  We can see this phase shift because both simulations had a known starting point, but demodulator software can’t compare the phase of the sample and hold output unless it has a reference signal to compare it to.

That phase reference can’t be the LO, because the LO frequency is not equal to the signal frequency.  The phase relationship between the LO and the output signal is constantly changing.  The phase reference must be at the same frequency as the output signal.  This is where the secong sample and hold comes in.

Pic1

Here’s our Simulink model with a second sample and hold added.  We want the output frequency to be the same as that of the original sample and hold, so the LO frequency must be the same.  Unfortunately, if both inputs to the second sample and hold are the same, the two outputs must be the same, so the phase comparison is pointless.  The phase shift between the two outputs is alwas zero!

Pic3Something about the two sample and holds has to be different, so we’ll phase shift the LO of the second one to lag the first by 90º.  Here’s the Simulink model with a second dual-trace oscilloscope added to display the LO pulse trains, and show the phase relationship between them.

Pic2

And the two LO pulse trains look like this.

Pic4Here are the outputs of the two sample and holds.  Again, the input frequency is 990 Hz., 10 Hz. below the LO frequency.  Notice that the lower trace, which is the output of the lower sample and hold, lags the upper trace by 1/4 cycle, or 90

We’ll call the output of the lower sample and hold the Quadrature channel, because its LO lags 90 degrees behind the upper sample and hold.  The upper one is called the In-phase channel.  The in-phase and quadrature channels are usually referred to as the I channel and the Q channel.  So we can say that the Q channel output lags 90º behind the I channel output.

Pic5Next, we’ll increase the signal frequency to 1010 Hz, 10 Hz. above the LO.  The output frequency is still 10 Hz, the difference between the LO and signal frequencies, but now the phase relationship between the I and Q channels is reversed!  Instead of Q lagging I by 90º, now I lags Q by 90°.  If the signal is a single sine wave, we can tell whether it is above or below the LO frequency by comparing the phases of the I and Q channels, so the Q channel can be thought of as the phase reference.

The SDR software uses this phase relationship to determine whether a downconverted signal is above the LO frequency or below it.  I’ll show how that’s done in later in this series.

So far, I’ve shown how a sample and hold acts as a mixer, to downconvert (or upconvert) a signal to a different frequency, and how two sample and holds operated in quadrature (a QSD) enable the signal processing software to determine whether the RF input is above or below the LO frequency.  In the next part of the series, I’ll show several ways a practical QSD can be built.

Share on Facebook