0

I'm trying to do a simple modulation and demodulation of a digital/binary source. I'm multiplying it by a 1khz cosine to center it at 1khz instead of 0. Then, to demodulate, I multiply again with the same cosine to have the original signal back. Why instead of having a 0 frequency centered, I have a 2khz centered frequency signal? Here's the grc file. enter image description here

modulation output has this look: enter image description here

demodulation output has this look: enter image description here

allexj
  • 13
  • 3

1 Answers1

0

This looks totally correct. You first shift by 1 kHz, then you shift by 1 kHz again, leading to a total shift by 2 kHz.

You probably wanted to multiply with a complex sinusoid of -1 kHz in your demodulation step.

Marcus Müller
  • 30,525
  • 4
  • 34
  • 58
  • thanks, now it works. but how can I imagine a negative frequency? How does it exist in real world? – allexj Mar 12 '24 at 12:07
  • you're really asking about the very basics of Fourier analysis here. A complex frequency sinusoid is really just an $f(t) = e^{j f t}$ with negative $f$, nothing more. How can it exist: look at your flowgraph. It exists. Alternatively, look at the Fourier transform formula, and see that you can get the value of the Fourier transform for negative frequencies. So, from that very physical consideration alone, it must exist in the real world. You'll notice any real-valued time-domain signal has nonzero negative frequency content; another proof it exists, whether you find it intuitive or not. – Marcus Müller Mar 12 '24 at 12:31
  • 1
    @allexj Regarding negative frequencies: https://dsp.stackexchange.com/q/64888/11256 – MBaz Mar 12 '24 at 13:40
  • @MarcusMüller why do I need a negative frequency? to demodulate shouldn't I only need the same frequency cosine wave? for example here ... I don't get why this does not work in this case. I'm obviously missing something. – allexj Mar 12 '24 at 14:56
  • 1
    @allexj I would literally link to your question to show you why you would need negative frequencies :) the picture you link to is a pretty different example. That's a) analog and b) real-valued and you're 1) digital here and 2) complex-valued :) Again, this really feels like you need to spend a couple minutes with the question and the answers MBaz linked to above! And, also, with the Fourier transform. It's not "magic" where your three frequency components that you can see in your frequency plots come from. In fact, understanding that really is a basic for doing much useful stuff! – Marcus Müller Mar 12 '24 at 15:18