8
$\begingroup$

I created a simple sketch in GNU Radio that multiples two signals. One is a sine and the other is cosine. I paste a screenshot of it and its results below.

enter image description here

I have heard that in DSP, we can do almost perfect signal processing. Hence, I assume phenomena such as LO leakage and doubly balanced mixers are not applicable when already digitized signals are multiplied such as in the presented case.

However, after multiplying the following two consine signals in GNU Radio, I expect to see the sum & difference frequencies; nothing else.

To my surprise, I am seeing a big peak at the sum frequency followed by a series of multiple peaks on the FFT. I'm curious to know what I am missing here.

$\endgroup$
1
  • 2
    $\begingroup$ I've answered as if you set one of your signal sources to "sine", but in reality, it's set to cosine in your screenshot. That's not a problem – the math is the same, but for small phase shift. $\endgroup$ Commented Jun 10, 2018 at 11:53

1 Answer 1

14
$\begingroup$

I expect to see the sum & difference frequencies.

You're multiplying two complex sinusoids, not a $\sin$ and a $\cos$, but

$$e^{j2\pi f_1t}\cdot e^{j\left(2\pi f_2t-\frac\pi2\right)}= e^{j2\pi(f_1+f_2)-j\frac\pi2}$$

So, only the sum frequency, as it should.

I am seeing a big peak at sum frequency followed by a series of multiple peaks on the FFT. I'm curious to know what I am missing here.

First of all, don't forget that unless your signal's period perfectly fits in the FFT length, you'll see leakage, i.e. the effect of convolution with a sinc. Your signal has a period of $\frac4{15}$. You'll find that you can't divide 1024 by that and get an integer. So, from a pure mathematical point of view, you must see leakage here.

Then, look at the scale of things: your theoretic peak is more than 120 dB above all your other side peaks. That's OK. That's a factor of $10^{12}$, and around the numerical accuracy of the floating point numbers used in this software. I can't think of a case where that becomes a problem

$\endgroup$
4
  • $\begingroup$ Thanks for your quick answer! I now understand that a complex generator produces TWO waveforms. One I waveform and another Q waveform. Excellent mathematical simpliciation! I also learnt that by using "hamming" the peaks disappeared. Still need to work on that. $\endgroup$
    – Denis
    Commented Jun 10, 2018 at 12:01
  • 3
    $\begingroup$ I take "GNU Radio is smart" as a compliment to my favourite framework, but really, this is not GNU Radio-specific. This is the very basics of complex signal theory :) (Oh, and Hamming windowing, or appropriate windowing in general, is the standard way to deal with spectral leakage. It reduces sidelobes in frequency domain at the expense of precision. No free lunch.) $\endgroup$ Commented Jun 10, 2018 at 12:03
  • 1
    $\begingroup$ I think greatscottgadgets.com/sdr will be a good resource for you to go through, because it explains a lot of these concepts very easily. $\endgroup$ Commented Jun 10, 2018 at 12:04
  • $\begingroup$ Agreed, the mathematics is always great. But the people who created GNU Radio has taken the trouble to 1. well understand the principles 2. Integrate such principles into the framework. So I felt that GNU Radio is smart and experimenting with it will "lead" me to much more. Okay, time for me to get back to GreatScott Gadgets. $\endgroup$
    – Denis
    Commented Jun 10, 2018 at 12:11

You must log in to answer this question.

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