[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [linrad] DSP Question

Mark Erbaugh wrote:

In my case, the IF that I am sampling is at12 kHz. Since this is a real
signal the frequencies range from 0 on up.

if the signal is real, it has both the positive and the negative spectrum components.
For an explanation look here :
or here, starting at mid page :

So now, I have these samples that represent 0 to 24 kHz, and a mirror image
at -24 kHz to 0.  I digitally mix this with a complex 12 kHz signal.  This
shifts everything  up by 12 kHz so, if I understand it the signal that was
at -12 kHz is now at 0 Hz, the signal that was at 12 kHz is now at 24 kHz.
My question is what happened to the signal that was at 18 kHz. Adding 12 kHz
to it puts it at 30 kHz out of the range of my samples.  Also since there
was no input signal at - 30 kHz what is now at -18 kHz?  I realize that the
original 18 kHz signal had a mirror image at -18 kHz that is now shifted up
to -6 kHz.

Don't forget that when sampling you have the spectrum cyclically repeated at all the positive and negative
multiples (zero included) of the sampling frequency. I think that, instead of giving a lengthy explanation
in words, it is much more useful if you look at these two pages that I have scanned from the Frerking book
that I mentioned in a previous message. They should clarify the issue.

However, generating a 12 kHz complex signal for a 48 kHz sample rate was
very simple and precise. Since 12 kHz is exactly 1/4 of the sample rate, all
the sin and cos terms became -1, 0 or +1. This wasn't the case with the
10.75 or 13.25 kHz rates.

I'm wondering if (or how) I can simply mix with the 12 kHz signal, do a
complex FFT on the resulting I and Q signals and then somehow "rotate" the
FFT bins to bring the desired signal to 0 Hz? Then could I apply your
technique below of taking the complex conjugate of the signals near zero and
mirroring them to the opposite end (24 kHz)?

To generate a complex NCO signal with millihertz resolution, you can use the routine that you can find
in the SDRadio source I sent you.
The technique of shifting the FFT spectrum is much more simple, but has the drawback that the minimum
step is the FFT bin size. which not always is fine enough. Doing a complex mixing requires certainly more
computational resources, but allows arbitrary shift amounts. That NCO routine can easily generate the sin
and cos components of the 10.75 or 13.25 kHz signals that you give as examples.

73 Alberto I2PHD