I have never really done much RF design before, and am looking into getting an SDR and messing around with it. I have been doing some research into how they work, and havr found that IQ modulation and demodulation is very important. One thing that I do not quite understand is where the IQ data comes from. How does the digital logic in the SDR capture both the real and imaginary components of the signals being fed into it?
IQ modulation is used everywhere including SDR.
Understand some roots in phone data modems since above 1200 baud then up to 56kbps/64kbps then cable and DSK modems , Analog and digital phones , Analog TV since colour was broadcast and now digital TV and fast forward later to SDR's.
IQ modulation in phase and amplitude is simply a way of compressing signal bandwidth into a smaller spectrum at the expense of minimum SNR needed.
Since bandwidth is limited and expensive IQ modulation offered the original HDTV in the same bandwidth as Analog, 64K phone modems in the same bandwidth as 300 baud modems, colour TV and hundreds of other radio modulation schemes that use IQ modulation.
The purpose of IQ modulation is significant and pervasive to all communication channels where bandwidth compression is not only desirable, but essential. Although I eluded to the fact it is used in ANalog and Digital communication, I'll touch on the digital radio side for you.
The main figure of merit and purpose of IQ modulated data is bandwidth compression at a tradeoff for excess SNR.
It has a long history that includes telephone modems that use 1200 and 2400 Hz in a 4KHz bandwidth. The computer uses a UART's to send serial asynchronous data such as; 7 or 8 bits data + 1 start + 1 stop and 1 parity bit (opt.), to the Modem. THe Modulator then strips out the start/stop bits & encodes it into synchronous waveform in IQ modulation. The demodulator does the reverse. This is how one can get 64kbps in a 4KHz BW. For EMI concerns the FCC limited 64K modems to 56kbps.
I and Q of course represent In-phase 0deg and Quadrature 90deg signals.
Let's look at the QAM-16 IQ channel. The Modulator for QAM-16 creates 16 states of amplitude and phase in each symbol period which is a 4x4 matrix of 16 states. Each state is used according to 16 different 4-bit sequential bit patterns.
See below. http://en.wikipedia.org/wiki/Constellation_diagram The eye diagram shows the 4 sequential binary patterns assigned for each dot where X-Y patterns represent I-Q phase and amplitudes.
There are hundreds of modulation methods which use IQ modulation but they each follow the same basic method of I&Q channels but with many levels not just 2 (binary).
Above are some basic ones defined the Modulation & Coding Schemes up to 64 levels.
There are many more at 256 levels and above, and each method has a tradeoff for quality, spectral efficiency, cost in terms of higher Signal to Noise ratio required.
This is defined by the Shannon–Hartley theorem which defines the solution for the minimum channel bandwidth vs SNR vs Bit Error Rate (BER), which are significant communication tradeoffs.
The "imaginary" part needs to be captured on the analog side, with a separate mixer that uses a LO source that is exactly 90 degrees offset from the "real" LO.
In the physical world, only real-valued signals can be transmitted, so on your antenna input you have a real-valued time-continuous signal.
If you mix (i.e. multiply) this with your LO signal, the output of that will have zero at any place where either the input or the output signal has a zero-crossing. This means that if you feed a CW signal at the same frequency as your LO, the phase shift between these signals determines what you get on the output.
If you have octave:
x = [ -2*pi : 0.01*pi : 2*pi ]; unshifted = cos(x); shifted = sin(x);
This defines two signals,
shifted that are in phase and 90 degrees out of phase with a cosine LO.
plot(x, cos(x) .* unshifted);
plot(x, cos(x) .* shifted);
The integral of the second function is zero, so a FFT over this data would show no energy in the DC bin -- clearly wrong, since we are transmitting energy at precisely that frequency.
However, if we mix with both the original and a phase-shifted LO, then the RF energy is always visible regardless of phase shift:
plot(x, cos(x) .* unshifted, x, sin(x) .* unshifted);
plot(x, cos(x) .* shifted, x, sin(x) .* shifted);
At the same time, how much of the RF energy went into the "real" and "imaginary" parts after mixing can tell you the phase angle between the two signals, so you can encode information inside the phase angle as well.
Start with a 4*LO_carrier oscillator. Use a Johnson Counter/ShiftRegister to generate 4 separate signals, to achieve 0/90/180/270. By using 4*LO, you are guaranteed exactly 90 degrees, crucial to carrier suppression and sideband suppression. For a low phasenoise result ---- important for best exclusion of closein noise in receivers, and for generation of minimal closein noise in modulators/transmitters ---- you need to understand all aspects of the Law of Jitter: Tj = Vnoise/SlewRate.
I worked with a team on GSM phones, designing all the non-DSP silicon. The modulators used 10-bit DAC codes from external DSP lookup table, to precisely craft the waveshapes of both I_path and Q_path symbols; these symbol shapes entered an analog multiplier, modulating a 150MHz carrier; having 2 carriers, one for I and one for Q, each being a +current and -current signal, we then summed those 4 current signals across 2 resistors [probably POLY, for low distortion and isolation from substrate]. At that point (2 output signals), we examined the spectrum and the data-eye.
Initially the carrier suppression and undesired sideband suppress were only 20dB down. Turns out the Quadrature LOs (the 0/90/180/270) were far out of Quadrature, because a DutyCycleAdjustor was rather flawed. We cleaned up that, once we executed a full system design on those 11 transistors and redesigned that signal chain. Knowing the frailties of DCAs, I suggest you work with 4*X LO systems.
In summary, there are lookup tables and DACs and multiplying DACs and precision summing of differential currents, plus low-phasenoise quadrature LO generators. Expect to work with differential signals, to achieve useful rejection of substrate noise. Plan on providing quiet/private power to the DAC/modulator circuits.
I&Q data has been used for decades in communications, especially where you want the symbols to truly appear as random-noise.
And I'd expect Low Probability of Interceptions radar pulses, long pulses that get compressed back at the receiver to boost timing/distance resolution, to use I&Q modulation. Never designed those.