9
$\begingroup$

For some reason I've long believed that given I and Q, one corresponds to amplitude, and one to phase, so I thought that I could hold one steady and create AM, or hold the other steady and create FM.

Now that I'm delving more into it, though, it appears I'm completely wrong. Or not. I'm not really sure, and the articles I'm reading aren't helping the situation.

Can AM and FM be demodulated from quadrature signals relatively easily? I feel that if I understand this, I might be able to wrap my head around it.

$\endgroup$
1

3 Answers 3

8
$\begingroup$

Your understanding is almost correct. I/Q data represents phase and amplitude, but in Cartesian coordinates. Conversion between the two is elementary trigonometry:

$$ r = \sqrt{I^2+Q^2} \\ \theta = \text{atan2}(Q, I) $$

To demodulate AM, you just need $r$, and to demodulate FM, you just need $\theta$.

Usually, an I/Q pair is represented as a complex number, with $I$ being the real part, and $Q$ being the imaginary part. This makes possible some interesting mathematical manipulations like multiplying a signal by a complex exponential to make a mixer. However, unlike a usual ("non-complex") mixer, this mixer does not make two new signals (sum and difference), but rather just one. This ability to shift a spectrum of frequencies without creating an additional sideband (which must then be filtered out, typically) is a big win in DSP.

$\endgroup$
3
  • $\begingroup$ So to obtain the spectrum, I could just run an FFT on a sequence of r? $\endgroup$
    – Adam Davis
    Commented Dec 14, 2013 at 1:03
  • 1
    $\begingroup$ @AdamDavisKD8OAS that would give you the spectrum of the AM demodulation. To get the spectrum of the RF signal, you can just take the DFT of the IQ samples directly. Remember that the DFT is inherently a complex function. $\endgroup$ Commented Dec 14, 2013 at 8:17
  • 1
    $\begingroup$ @AdamDavisKD8OAS remember also that when using the DFT on real numbers (ie, not I/Q data), then Q is arbitrarily set to 0, which results in half the DFT (all the negative frequencies) being a mirror of the positive frequencies, so it's discarded. Also, the result of the DFT is in Cartesian form, and is usually then converted to polar form as above, and the phase information discarded (at least for purposes of displaying a waterfall). $\endgroup$ Commented Dec 14, 2013 at 8:59
4
$\begingroup$

Quadrature samples are essentially complex numbers. Complex numbers can be represented as two real numbers in two equivalent ways:

  1. Cartesian form: real (here called I or in-phase) and imaginary (here called Q or quadrature).
  2. Polar form: magnitude (or absolute value) and phase (or angle, or argument).

When you have I and Q signals or samples, those are in Cartesian form. However, when you want to demodulate, or even describe mathematically, a complex signal, the magnitude/phase form is more relevant; this is because the received phase is arbitrary (unless the transmitter and receiver have perfectly synchronized clocks and mixers and the path length never changes), which means that the signal has an arbitrary phase shift and therefore has no specific relationship with your I and Q "axes".


To help understand this, visualize an unmodulated complex (analytic) signal as a helix in 3D space: the axes are I, Q, and time. Unlike a real-valued signal, there are no zero crossings; the sample values follow a circle about the origin over time, and never meet it except when the amplitude is 0.

Furthermore, if the signal is baseband (after a receiver's mixer or before a transmitter's), then the rotation rate is 0 by definition: your samples have a constant value, except for the effects of the modulation. And this is the condition under which modulation and demodulation are typically done!


You ask for analog demodulation examples:

  • Demodulating AM from complex samples consists of taking the magnitude of the samples (and then subtracting the carrier amplitude from that, or equivalently using a high-pass filter), because that is exactly the amplitude of the original signal.

  • Demodulating FM from complex samples consists of taking the difference between the phase of successive samples, because that difference is the instantaneous frequency; if the signal is at baseband, then the instantaneous frequency is exactly the modulating signal!

$\endgroup$
1
  • 1
    $\begingroup$ This document has some nice illustrations of the helix, among other things. $\endgroup$
    – AndrejaKo
    Commented Dec 12, 2013 at 10:17
1
$\begingroup$

I and Q are somewhat confusing to me, too. I came up with a mental picture, which may help...
Consider a piston, in a motor. If you took a flash photo, and the piston was all the way up (or down) it's fairly easy to figure out the position of the crank.

But- what if the piston is Half-way up? Is the piston moving down (intake or power stroke), or moving up (compression or exhaust stroke)?

If you had a second piston, attached to the same crank position, you could figure out which phase the motor is at.

How does this compare to electronics?
Well, when you sample a waveform at a given rate, you get those magnitudes. They will vary, depending on the relative ratio between the signal frequency, and the sample frequency. BUT - is the radio signal faster, or slower?
The Second sample is like that second piston: it helps you determine if the original signal was faster (upper sideband) or slower (lower sideband). If this changes with time then the frequency is changing, i.e.. you have an FM signal.

As to whether they can be demodulated "easily"...There are those who have done it. If you just take their code / designs, it's remarkably easy. Understanding why it works depends on your definition of "easy".

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .