Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Article SDR Is Qs

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

54_55_56_radcom_jan07

1/12/06

15:19

Page 54

SOFTWARE DEFINED RADIO

STEVE IRELAND E-MAIL VK6VZ@ARACH.NET.AU PHIL HARMAN VK6APH

VK6VZ/ VK6APH

Watch your Is and Qs


Processing two signals rather than one has many advantages in software defined radio, as Steve Ireland and Phil Harman explain.
signal. The output of the mixer is filtered to preserve the difference between the wanted signal and the local oscillator signal. Since this difference is within the audio range, the resulting audio frequency signal is passed to our PC soundcard for processing. The SDRs we have considered so far have what seem to be two identical receiver chains. As you can see from Figure 2, they have a second mixer which takes the same filtered antenna signal as the first, as well as having an identical local oscillator frequency feeding into it and an identical filter on its output. The output from this second receiver chain apparently provides the same audio signal output as the first. But these two output signals are not actually the same. If you look closely at Figure 2, you will see that the local oscillator connection to the second mixer is passed through a block marked 90 degree phase shift. This means that while FIGURE 1 the frequency of the local oscillator fed to the Antenna second mixer is exactly Mixer the same as the first, the phase has been shifted Audio output by 90 degrees. This 90 degree phase shift or Lowpass filter Bandpass filter difference will also be present on any signal that passes through the second mixer, hence the Local Oscillator RADCOM audio output signal from the second mixer will be FIGURE 1: DIRECT CONVERSION RECEIVER. at 90 degrees to that produced by the first FIGURE 2 Mixer mixer. I output A dual channel oscilloscope connected to Lowpass filter the output of the two mixers would show a Antenna trace similar Figure 3a. Local The two signals can also Oscillator be represented as vectors with equal amplitudes 90 degree and an angle of 90 Bandpass filter phase degrees between them shift (Figure 3b). The vectors are both Q output rotating at the difference in frequency between the input (signal) frequency Mixer Lowpass filter RADCOM to the mixers and the FIGURE 2: SDR FRONT-END. local oscillator frequency, All the software defined radios we have looked at so far, from the Flex-Radio SDR1000 to the various Soft Rock receivers to the G3PLX Zero IF method, have had one thing in common they all process two signals, consisting of an I (for in-phase) and a Q (for quadrature) signal. Why do we need these two signals when perhaps at first consideration we only need one? In this article, we will use a series of diagrams to show you why two signals are needed. Figure 1 shows a block diagram of a direct conversion receiver front-end. The signals picked up by its antenna are first filtered to ensure that only those within the frequency band of interest are passed. Then these signals are applied to a mixer. The other signal input to the mixer is a local oscillator which, in the case of a CW signal, is set to be a few 100Hz away from the wanted signal, to give us the audible beat note that our ears need to decipher the

FIGURE 3A

RADCOM

FIGURE 3A: I AND Q SIGNALS AT THE OUTPUT OF THE MIXERS.

FIGURE 3B
I

Q
RADCOM

FIGURE 3B: I AND Q AS VECTORS.

FIGURE 4
I

AM =

(I2 + Q2)

Q
RADCOM

FIGURE 4: AM MODULATION USING I AND Q.

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

FIGURE 5A: AM SIGNAL AT THE INPUT TO THE SOUND CARD.

FIGURE 5B: SAMPLED AM SIGNAL.

FIGURE 5C: MAGNITUDE OF AM SIGNAL.

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

RADCOM RADCOM RADCOM

55

FIGURE 6A: AM I AND Q SIGNALS AT THE INPUT TO THE SOUND CARD.

FIGURE 6B: SAMPLED I AND Q AM SIGNALS.

FIGURE 6C: AM DEMODULATION USING I AND Q.

January 2007 RadCom

54_55_56_radcom_jan07

1/12/06

15:19

Page 56

FIGURE 7A

FIGURE 8

Mixer

Lowpass filter Antenna Local Oscillator

RADCOM

Bandpass filter

FIGURE 7A: WANTED SIGNAL I AND Q PHASE RELATIONSHIP .

90 degree phase shift Q output

FIGURE 7B
Mixer
RADCOM

90 degree phase shift Lowpass filter

FIGURE 8: SDR FRONT-END WITH Q PHASE SHIFT.

RADCOM

FIGURE 7B: UNWANTED SIGNAL I AND Q PHASE RELATIONSHIP .

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

PM = tan-1(Q/I) And for Frequency Modulation FM = (Qn.In-1 - In.Qn-1)/(In.In-1 + Qn.Qn-1)

FIGURE 9A: I AND Q PHASE RELATIONSHIP FOR WANTED SIGNAL

FIGURE 9C: RESULT OF ADDING I AND Q FOR WANTED SIGNAL

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

FIGURE 9B: I AND Q PHASE RELATIONSHIP FOR UNWANTED SIGNAL

FIGURE 9D: RESULT OF ADDING I AND Q FOR UNWANTED SIGNAL

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.

RadCom January 2007

You might also like