So I recently watched this lovely overview of DSP/SDR explaining how demodulation of AM and FM becomes trivial by turning a signal into a complex number. (AM being the magnitude of the number and FM being the phase angle difference between two samples).

But I'm still confused. It's simply transferring the problem to "How do you get the envelope of a signal" to "how do you represent the signal in 2d". Where does this imaginary component come from?

The guy says to get the envelope of an AM waveform you need only one sample. And while you already are in the complex plane, yes. Sure. Get the magnitude of that one complex number. But a sample, as far as I understood, is a real value. For example a power measurement from a sine wave generator. So you get "0.7V". What's the envelope? It could be anything. Could be a rising edge of the sine, falling edge, a peak, even a valley if you have DC offset. So I call BS you need only one sample.

The person in the video simply glosses over how you actually get the imaginary part? Do you just add a sine wave imaginary component? (sin(t)*i)? Do you phase shift your entire signal by 90° (f(t-tau/4) * i) and add that? Or something else entirely?

Heck I don't even know how to tag this question.

  • $\begingroup$ > "a sample, as far as I understood, is a real value" nope, it's two real values interpreted as complex number. $\endgroup$ Aug 2, 2020 at 10:09
  • 1
    $\begingroup$ and you found the right tag, quadrature! Research what a quadrature mixer does, and you'll see, it converts your RF signal to an equivalent complex-valued baseband signal. There's your answer! $\endgroup$ Aug 2, 2020 at 10:10
  • $\begingroup$ @MarcusMüller When I plop my signal generator into my oscilloscope I get a real value. Because voltage is a real physical size. When I take an audio file and open it in audacity, a sample is a real value. Because the speaker membranes can only move back or forth. If I pop an antenna into my oscilloscope, I get a voltage messurement. A voltage is a real value. If I take one such measurement i call it a sample. If I take a sine graph over time, and pick one value on the sine wave at any particular point, that's a real value and a sample. Of course samples are real values! $\endgroup$
    – FalcoGer
    Aug 2, 2020 at 11:55
  • $\begingroup$ All nice examples, but the samples coming out of your HackRF (or other SDR) are not real samples. Again, read up on quadrature mixing. $\endgroup$ Aug 2, 2020 at 11:59
  • $\begingroup$ @MarcusMüller Okay. My question was how to get from real values (voltage on the antenna) to quadrature samples. I will read up on that topic. The issue I had with the video was. "Well if you do magic trick1 this becomes easy." with no explanation of magic trick1 of what it even means, is or how it works. I am aware that the samples that those tricks work on are not real but complex and that you do indeed just need one of them to get the amplitude envelope for example. But you can prove that you need multiple real(-world) samples to produce that one complex sample. $\endgroup$
    – FalcoGer
    Aug 2, 2020 at 12:01


Browse other questions tagged or ask your own question.