Article SDR Is Qs
Article SDR Is Qs
Article SDR Is Qs
1/12/06
15:19
Page 54
VK6VZ/ VK6APH
FIGURE 3A
RADCOM
FIGURE 3B
I
Q
RADCOM
FIGURE 4
I
AM =
(I2 + Q2)
Q
RADCOM
54
but Figure 3b shows a snap shot at a moment in time, so they appear stationary. The vector representation of the I/Q signals is very useful. The two audio signals are said to be in quadrature, or phase quadrature, and are labelled I (for in-phase) and Q (for quadrature). Convention has it that the signal that reaches its positive peak value first is designated the I signal. This I and Q signal pair is also referred to as a complex signal. But why go to all the trouble of generating two signals 90 degrees out of phase with each other? Someone once said give me I/Q and I can demodulate anything [1]. And that,
RadCom January 2007
54_55_56_radcom_jan07
1/12/06
15:19
Page 55
FIGURE 5A
FIGURE 5B
FIGURE 5C
RADCOM
RADCOM
RADCOM
quite literally, is the reason we go to all this trouble. If you have I and Q signals then you can demodulate any signal be it AM, FM, SSB, CW, PSK31 etc or any new modulation system that anyone may dream up in future. Similarly, in the case of transmitting a signal, if we generate the appropriate I and Q signals we can transmit any form of modulation. AM DEMODULATION. Let us now look at some modulation systems and see how they can be demodulated if I and Q signals are available. To demodulate an AM signal, we simply use Pythagoras famous theorem about triangles (the square on the hypotenuse the longest side of a triangle is equal to the sum of the square of the other two sides) and take the square root of the sum of I squared plus Q squared, as per Figure 4. AM =(I + Q ) Each of the I and Q vectors varies in amplitude with the amplitude modulation on the incoming signal. Hence, the hypotenuse we have formed from the I and Q vectors will also vary with the modulation. This maths is simple. Here is the actual line of code from the open source PowerSDR [2]: am->lock.curr = Cmag (CXBdata (am->ibuf, i)); You might be wondering if both I and Q
FIGURE 6A
2 2
are amplitude modulated in their own right, then why not just take one of these signals and measure its magnitude directly, since this would return the original modulation. However, there is a good reason for not doing it that way but using both the I and Q signals instead. Lets say we have mixed the incoming signal down to a frequency within the input range of a PC sound card (10 to 20kHz). We will assume our signal has been mixed down to 10kHz and is being amplitude modulated with a 1kHz sine wave. As a result, at the sound card input, we have a signal that looks like Figure 5a. Inside the sound card we convert the signal to a series of samples represented by the dots in Figure 5b. We then calculate the magnitude of each sample, which results in the signal appearing in Figure 5c. If we were to feed this signal directly to the D/A converter in our sound card, we would end up with a strong component at 10kHz. We could pass the signal through a low pass filter before passing it to the sound card, but lets see what happens if we use the I and Q signals as proposed above. Figure 6a shows the I and Q signals being fed into the sound card note the 10kHz carriers are 90 degrees out of phase with each other. As before, we then sample each signal inside the sound card, which results in the values shown with black dots in Figure 6b. We now apply Pythagoras theorem and the resulting signal is shown in Figure 6c.
FIGURE 6B
Notice that the 10kHz carrier component is no longer present in the output signal. By using the I and Q signals, we have eliminated the need to filter the demodulated signal. What is even more useful is what would happen if we had mixed the AM signal down to an even lower IF, say 1kHz. Since this is within the audio range of a typical AM signal, it would have been impossible to filter out of our demodulated signal. However, when using the above I and Q technique, the IF frequency does not appear in the demodulated output. Note that the technique works even if we use zero Hz as the IF. CW AND SSB DEMODULATION. Now lets look at how we demodulate a CW or SSB signal. We could simply tune the local oscillator in Figure 1 to either give us the desired beat note for CW reception or the frequency of the suppressed carrier in the case of an SSB signal. Whilst this would work, again there are benefits from using both the I and Q signals. Let us analyze this further. If we assume that the wanted CW signal is at 14.101MHz and we would like to listen to a 1kHz beat note, we could tune the local oscillator to 14.100MHz since: 14.101MHz 14.100MHz = 1kHz However, if we have an additional, unwanted, CW signal at 14.099MHz, then this also produces a 1kHz beat note since: 14.100MHz 14.099MHz = 1kHz If we look at the I and Q waveforms that result from applying a 14.101MHz signal
FIGURE 6C
55
54_55_56_radcom_jan07
1/12/06
15:19
Page 56
FIGURE 7A
FIGURE 8
Mixer
RADCOM
Bandpass filter
FIGURE 7B
Mixer
RADCOM
RADCOM
to the SDR receiver in Figure 2, we see two 1kHz sine waves with 90 degrees phase difference (Figure 7a). Note that the I signal leads the Q signal in time.
FIGURE 9A
If we now feed a 14.099MHz signal into the SDR receiver, we again see two 1kHz sine wave with 90 degrees phase difference (Figure 7b). Note that the I signal now lags the Q signal in time, i.e. the phase of the I signal has been shifted by 180 degrees. This phase shift enables us to remove the unwanted signal, as follows. In Figure 8, the I and Q signals have been passed to two low pass filters. Each has the same frequency response but the
FIGURE 9C
phase of all signals passing through the Q filter are shifted by 90 degrees. Figure 9a shows the resulting I and Q signals for the wanted 14.101MHz signal, while Figure 9b shows the resulting I and Q signals for the unwanted 14.099MHz signal. If the I and Q signals are now added together, the result is a signal of double the amplitude of I or Q in the case of the wanted signal (Figure 9c), and zero amplitude in the case of the unwanted signal (Figure 9d). We have produced a receiver that responds to signals above the local oscillator frequency (i.e. Upper Sideband or USB) and rejects those below (i.e. Lower Sideband or LSB). If instead of adding the I and Q signals together we subtract them, then the reverse applies. PHASE AND FREQUENCY MODULATION. Given I and Q signals we can demodulate a Phase Modulated signal using
RADCOM RADCOM
FIGURE 9B
FIGURE 9D
where n = current sample and n-1 = previous sample As you can see, the processing of I and Q signals is fundamental to the operation of an SDR.
56
RADCOM RADCOM
REFERENCES [1] Generally attributed to Gerald Youngblood, K5SDR, the original developer of the Flex-Radio SDR1000 (although used by others over many years). [2] see www.flex-radio.com and download from the Downloads link.