# Can somebody explain what IQ (quadrature) means in terms of SDR?

This is a bit of a basic question, but I am having trouble understanding why a signal needs to be broken up into I and Q components to be useful for software-defined radio (SDR).

I understand that the I and Q components are the same signal, just 90 degrees out of phase, but I don't understand why this is important. Why can't you just digitise one signal? Why do you need an apparently identical signal that's out of phase by 90 degrees? And if you do need this second signal, why can't you create it yourself (e.g. in software) by just delaying the first signal?

All I can make out is that it's needed for some reason to do FM-style demodulation in software, but I can't find anything anywhere to explain what the need is, and why this demodulation is not possible without both I and Q components.

Is anyone able to shed some light on this? Wikipedia isn't particularly helpful, with each page having a link in lieu of an explanation, and each link pointing to the next in an endless loop.

The I and Q components are not the same signal; they are samples of the same signal that are taken 90 degrees out of phase, and they contain different information. It's a subtle, but important distinction.

Separating I and Q in this way allows you to measure the relative phase of the components of the signal. This is important not only for FM (and PM) demodulation, but also for any other situation in which you need to distinguish the contents of the upper and lower sidebands of the carrier (e.g., SSB).

Whenever a frequency conversion (heterodyning) occurs in an SDR (particularly in the analog front end), the I and Q components are handled differently. Two copies of the local oscillator are generated, one 90 degrees delayed with respect to the other, and these are separately mixed with I and Q. This preserves the phase relationships through the conversion.

EDIT:

All this really means is that you're sampling the signal at a high enough rate to capture all of the sideband information on both sides of the carrier. I and Q are really just a notational convention that makes the math work out a little more cleanly. It becomes most relevant if you end up heterodyning the signal directly down to baseband (synchronous detection). If you don't preserve both I and Q, the two sidebands get folded on top of each other (a form of aliasing) and you can no longer decode FM, PM or QAM signals.

• Thanks for the explanation, but I'm still a little unclear. How do you "sample a signal 90 degrees out of phase"? Do you mean a second sample is taken, delayed by some amount of time? How does having I and Q allow you to measure the relative phase, as opposed to looking at a few previous samples to see which way the waveform is going? What do you mean by "preserving the phase relationship through the conversion"? What happens if the phase relationship is not preserved? And does heterodyning a single signal cause this? – Malvineous Sep 8 '12 at 14:39
• See my edit. Hopefully, it answers some of your additional questions. – Dave Tweed Sep 8 '12 at 15:03
• Thanks! Unfortunately there's still a little bit of hand-waving going on :-) So do you mean if you 'heterodyne' on the software side, to put your target signal at baseband, that's where you need both I and Q? Why do the sidebands get folded? Is it because one sideband ends up being shifted to a negative frequency, which then appears as a positive frequency with a phase shift, cancelling out the other sideband? Maybe this explains why I've read things about the I and Q signals sometimes having imaginary components. – Malvineous Sep 9 '12 at 0:03
• Yes, that's pretty much it in a nutshell. – Dave Tweed Sep 9 '12 at 1:24
• "Two copies of the local oscillator are generated, one 90 degrees delayed with respect to the other, and these are separately mixed with I and Q. This preserves the phase relationships through the conversion." The two copies are not mixed with I and Q, but with the input signal. The resulting two signals after the mixing are In-phase and Quadrature (mixed with 90 degree shifted reference signal). Using them the amplitude and phase can then be found: $$A=I^{2}+Q^{2} \\ \phi=arctan\left ( \frac{Q}{I} \right )$$ – Ignas St. Apr 18 '15 at 9:14

It has to do with the sampling rate, and how the sampling clock (the local oscillator or LO) relates to the signal frequency of interest.

The Nyquist frequency rate is twice the highest frequency (or bandwidth) in the sampled spectra (to prevent aliasing). But in practice, given finite length signals, and thus non-mathematically perfectly bandlimited signals (as well as the potential need for physically implementable non-brick-wall filters), the sampling frequency for DSP has to be higher than twice the highest signal frequency. Thus doubling the number of samples by doubling the sample rate (2X LO) would still be too low. Quadrupling the sample rate (4X LO) would put you nicely above Nyquist rate, but using that much higher frequency would be more expensive in terms of circuit components, DSP data rates, megaflops required, and etc.

So typical IQ sampling is done with a local oscillator at (or relatively near) the same frequency as the signal or frequency band of interest, which is obviously way too low a sampling frequency according to Nyquist. One sample per cycle of sine wave could be at the zero crossings, or at the tops, or at any point in between. You will learn almost nothing about a sinusoidal signal so sampled. But lets call this, by itself almost useless, set of samples the I of an IQ sample set.

But how about increasing the number of samples, not by simply doubling the sample rate, but by taking an additional sample bit a little after the first one each cycle. Two samples per cycle a little bit apart would allow one to estimate the slope or derivative. If one sample was at a zero crossing the other one wouldn't be. So you would be far better off in figuring out the signal being sampled. Two points, plus knowledge that the signal is roughly periodic at the sample rate is usually enough to accurately estimate the unknowns of a canonical sinewave equation (amplitude and phase).

But if you go too far apart with the second sample, to halfway between the first set of samples, you end up with the same problem as 2X sampling (one sample could be at a positive zero crossing, the other at a negative, telling you nothing). It's the same problem as 2X being too low a sample rate.

But somewhere between two samples of the first set (the "I" set) there's a sweet spot. Not redundant, as with sampling at the same time, and not evenly spaced (which is equivalent to doubling the sample rate), there's an offset which gives you maximum information about the signal, with the cost being an accurate delay for the second sample instead of a much higher sample rate. Turns out that that delay is 90 degrees. That gives you a very useful "Q" set of samples, which together with the "I" set, tells you far more about a signal than either alone. Perhaps enough to demodulate AM, FM, SSB, QAM, etc., etc.

An exact 90 degree offset for the second set of samples also corresponds nicely to half of the component basis vectors in an DFT. A full set is required to fully represent non-symmetric data. The more efficient FFT algorithm is very commonly used to do a lot of signal processing. Other non-IQ sampling formats might require either pre-processing of the data (e.g. adjusting for any IQ imbalance in phase or gain), or use of longer FFTs, thus potentially being less efficient for some of the filtering or demodulation commonly done in typical SDR processing of IF data.

Also note that the waterfall bandwidth of an SDR IQ signal, which might seem wide-band, is typically slightly narrower than the IQ or complex sample rate, even though the pre-complex-heterodyne center frequency might be much higher than the IQ sample rate. So the component rate (2 components per single complex or IQ sample), which is twice the IQ rate, ends up being higher than twice the bandwidth of interest, thus complying with Nyquist sampling.

• This is mistaken. Both single-component sampling at 2x rate and IQ sampling involve taking the same amount of samples, and are able to represent the same bandwidth without ambiguity. Different implementation technologies may however make one approach or the other more attractive. – Chris Stratton Feb 12 '14 at 22:10
• First statement, disagree (for all practical purposes). Theoretically for mathematically perfectly bandlimited signals, perhaps. Practically, no. 2X rate sampling is way more sensitive to quantization (and other) noise and jitter. Thus the later statement I agree with. – hotpaw2 Feb 12 '14 at 22:18
• Your mistake is in thinking that where 2x sampling is not enough, 1x IQ sampling would be. There's no free lunch. – Chris Stratton Feb 12 '14 at 22:41
• This answer is awesome, actually, way better than the selected answer. I read the preferred answer the OP picked and had no better clue as to WHY there was a need for 2 samples taken 90 degrees apart. However, after reading this answer, it was clear to me how the 2nd sample 90 degrees delayed is useful and allows you to get more information. This answer didn't deserve the downvote, so I give an upvote here. – Brian Onn Feb 15 '14 at 2:19
• @ChrisStratton : You may be correct that IQ sampling does not provide information gain over 2X sampling for wide-band signals. But IQ sampling is typically used for sampling relatively narrowband signals near the frequency of the local IQ oscillator. The a-priori assumption of bandwidth narrowness, if valid, provides the "free lunch". The Q channel then allows acquiring phase reconstruction information with a better signal-to-noise-ratio of than does 2X sampling (assuming any sampling noise). – hotpaw2 Jun 21 '15 at 23:06

This is really such a simple topic that almost nobody explains well. For anyone struggling to understand this, watch W2AEW's video, http://youtu.be/h_7d-m1ehoY?t=3m. In just 16 minutes he goes from soup to nuts, even giving demos with his oscilloscope and a circuit he made.

• Wow that really is a very informative video. Unfortunately he mostly focuses on modulation, while my question was mainly about demodulation. He touches on this at the end, and it seems it has something to do with local oscillators that are 90 degrees out of phase. Perhaps one day someone will figure out how to explain how that bit works! I still have no idea how a digital device can take a sample at a set interval and yet that is somehow 90 degrees out of phase for both a 1MHz signal and a 2MHz signal! – Malvineous Jan 23 '15 at 4:56

I and Q are simply a different way to represent a signal. You mentally think of a signal as being a sine wave, either modulated along its amplitude, the frequency, or the phase.

Sine waves can be represented as a vector. If you remember vectors in physics class, you tend to work with the x and y components of that vector (adding the x's together and the y's). That's what the I and Q are essentially the X (being inphase - I) and the Y (the Quadrature - Q).

When you represent the sine wave like a vector and make available the I and Q, it can be much easier to have software to perform the math to demodulate the signal. Your computer has specialized chips - the graphics card and the sound card are VECTOR processors - with extra registers to hold the x and y components for rapid calculation.

This is why SDR wants I and Q. I and Q allow for the vector processors on your computer to do the demodulation rapidly and efficiently.

• @DanielGrillo - it's really not necessary to retroactively highlight simple terms throughout someone else's post. – Chris Stratton Apr 17 '14 at 19:16
• @ChrisStratton This answer was in my list of Late Answers Review. I've just done this because it was there. I was just trying to help. – Daniel Grillo Apr 17 '14 at 19:32
• Thanks for the answer. This helps explain how I and Q are used, but not really what they are, which is the crux of the question. Saying they are components of a vector just pushes the question back to why represent a signal with vectors and what would one of these vectors point to? – Malvineous Apr 25 '14 at 1:09

## protected by Community♦Apr 18 '15 at 11:25

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).