[Top][All Lists]

## Re: explaining i/q

 From: Anon Lister Subject: Re: explaining i/q Date: Wed, 4 Nov 2020 08:47:28 -0500

```
> On Nov 4, 2020, at 07:13, Fons Adriaensen <fons@linuxaudio.org> wrote:
>
> Whenever I have to explain some DSP principles, I start with
> the complex valued version, and then showing the real-valued
> one as a special case.

This is absolutely correct here. If they are learning gnuradio, they obviously
want to do digital signal processing. Much of DSP is far easier when you have a
center frequency of 0hz and your visible bandwidth is = to your sample rate.
(Not 2x as required by real sampling)

How about a view of how you convert one representation to the other:
Take the real values(sampled to meet nyquist, at 2x the desired bandwidth, or
max frequency), and insert a 0 every other sample. Treat every pair real, 0 as
a one complex sample.

There is fundamentally no change here yet except to double the data storage
requirement. These however are now complex values.

Now, since you can “use” the negative frequency space, since it no longer is
required to be mirror image of the positive, you can(circularly!) shift all
frequencies by -1/4 the sampling rate.

This will give still not alter the actual information present, merely shift all
frequencies present halfway into the now usable negative frequency axis. They
are NO LONGER MIRRORS.

Now decimate by two since you have two empty halves of visible bandwidth at the
edges. You now represent a range (complex)[-bandwidth/2, bandwidth/2] as
opposed to (real)[0, bandwidth*2]

This process is entirely reversible, just do the steps backwards, (interpolate
by 2, shift by Fs/4, drop the complex part (now 0)).

Both require the same storage, and can view the same bandwidth. Real needs 2x
samples per bandwidth, in complex visible bandwidth = sample rate, but you
store two values per sample.

From a storage perspective, they are entirely equivalent. It’s not that you are
taking extra samples or whatever you said. To use ham numbers: instead of
storing a 48khz real file representing 24khz of visible bandwidth from 0 to
48000hz, you store a 24k file representing -12k to 12k. In both cases you have
24k of usable bandwidth, and use the same number of bytes to store it.

The advantage of using complex is that the maths behind many DSP operations are
vastly simplified by having the center frequency at 0 and bandwidth = to sample
rate(and due to other properties of complex numbers). For example, most
filtering now is simply a low pass filter, symmetric around 0 as opposed to
band pass(composed of a low and a high).
Am detect is just squaring the complex samples.
Fm detect is just calling atan2 on the quardrature components (and optionally
rescaling)
Etc...

(Weather you think one representation or the other is more fundamental is
largely due to your background. I’m of the opinion that complex is the more
fundamental representation of an electromagnetic wave, the quantum mechanical
representation is complex too, real is just an inconvenient projection in the
middle introduced by the fact that we measure via electrical voltage on a wire,
necessitating doubling our sample rate to recover the underlying wave(still
with a phase ambiguity), but that’s opinion)

-
Anon

```