## Understanding hetrodyning complex values in gnuradio

Main forum to discuss RTL-SDR related topics.
KevinJones
Posts: 21
Joined: Mon May 04, 2020 4:38 pm

### Understanding hetrodyning complex values in gnuradio

I have been working at educating myself on how sdr and gnuradio works.

In order to demonstrate hetrodyning, I set up a flow-graph consisting of 2 signal generators, a Multiply block, and QT GUI Frequency Sink. The generators are connected to the Multiply block inputs, and the Multiply block output is connect to the Freq Sink, in order to hetrodyne the two generator signals.

The frequency of the generators are linked to a slider. One generator is slider_value, the other is slider_value + 2000. The generators are both outputting a cosine waveform.

When setting all the inputs to float, as I move the slider I get the results I would expect:

I see one peak always at 2000 Hz: slider_value - slider_value + 2000 = 2000. Ie, the difference signal.

I see another peak at the sum of the generator outputs: slider_value + slider_value + 2000 = (2 * slider_value) + 2000.

However, if I switch all the inputs to complex, I only see one peak which is at the sum of the values. I do not see a peak at the difference, ie, nothing at 2000 (except when slider_value = 0).

Can someone explain to me why I don't see the difference signal when multiplying complex signals?

hotpaw2
Posts: 165
Joined: Sat Jan 14, 2017 11:07 pm
Contact:

### Re: Understanding hetrodyning complex values in gnuradio

Any non-zero strictly real signal is really two signals in the complex frequency domain, a positive spectrum signal, and a complex conjugate negative spectrum signal. They have to be complex conjugate pairs for the imaginary part to cancel out, and result in anything strictly real. If not, you get left with the problem of what to do with an imaginary component in the real world.

That's why when you do real-valued multiplication you end up with two mirrored items in the spectrum.

With complex multiplication, you don't need the complex conjugate, since a non-real or IQ result is allowed, so you can choose to produce a single item in the resulting spectrum, depending on how well balanced your complex multiplication is done.

KevinJones
Posts: 21
Joined: Mon May 04, 2020 4:38 pm

### Re: Understanding hetrodyning complex values in gnuradio

hotpaw2 wrote:
Wed Dec 02, 2020 6:22 pm
Any non-zero strictly real signal is really two signals in the complex frequency domain, a positive spectrum signal, and a complex conjugate negative spectrum signal. They have to be complex conjugate pairs for the imaginary part to cancel out, and result in anything strictly real. If not, you get left with the problem of what to do with an imaginary component in the real world.

That's why when you do real-valued multiplication you end up with two mirrored items in the spectrum.

With complex multiplication, you don't need the complex conjugate, since a non-real or IQ result is allowed, so you can choose to produce a single item in the resulting spectrum, depending on how well balanced your complex multiplication is done.
That is an interesting way to describe it. I'll have to chew on that a bit.

ps, I'm sorry I didn't acknowledge your reply sooner, I was expecting an email notification, but never received one (not in spam folder either) even though my site preferences are set to receive them. I guess I'll just have to keep checking the thread.