0
$\begingroup$

I'm newbie to the dsp topic and my understanding of math symbols is limited. So at the moment I'm little bit lost to find the right resources.

I receive an IQ stream from a SDR. Sample rate: 250k/s The signal I'm interested in is at -10kHz. I need the amplitude of only the -10kHz frequency.

I've found out how to shift the IQ data frequency up/down. But I thought -10kHz is a nice place to be away from DC, and for buffer sizes and sample rate.

What is the most simple solution? Are there other possibilities next to one of the Fourier transformations? Looks like overkill for my simple signal.

But I've found lot of theory stuff handling IQ signals with only one frequency, but nothing enlightening to understand the demodulation of one frequency out of a mix of many from IQ.

I know about the phase change. But something I miss to understand how to collect and calc the right data for my frequency from the IQ.

What would be a nice book (German/English) which explains the stuff without getting lost in math vocab and theory after a few pages? Anything from a software developers perspective?

Thx.

$\endgroup$
0
$\begingroup$

The easiest approach is to compute the one DFT bin of interest directly, which is a correlation to the frequency of interest by complex conjugate product and sum. Given you stated -10KHz frequency and with IQ samples then this frequency can be described using the exponential:

$$f_{in} = e^{-j\omega_n t} = I-jQ$$

Where

$I = \cos(\omega_n t)$

$Q = \sin(\omega_n t)$

$\omega_n = 2\pi10 \text{ KHz}$

Expressing this in samples with $f_s = 250 \text{ KHz}$:

$I_n = \cos(\omega_n/f_s n) = \cos(2\pi n/25) $

$Q_n = \sin(\omega_n/f_s n) = \sin(2\pi n/25) $

The normalized correlation would give you the magnitude and phase:

$$X[\omega_n] = \frac{1}{N}\sum_{n=0}^{N-1}x[n]e^{-j\omega_n} = \frac{1}{N}\sum_{n=0}^{N-1}x[n]\cos(2\pi n/25) + j\frac{1}{N}\sum_{n=0}^{N-1}x[n]\sin(2\pi n/25) $$

or equivalently in terms of the complex samples $I+jQ$:

$$X[\omega_n = -2\pi n/25] = \frac{1}{N}\sum_{n=0}^{N-1}x[n]e^{j2\pi n/25}$$

Using an integer multiple of samples will result in an exact result as it would be the equivalent of a bin center for the DFT:

$$ N = m\frac{250 \text{ KHz} }{10 \text{ KHz} } = 25m$$

for any integer $m>0$

The FFT performs this for all bins with $N\log_2(N)$ operations while here $N$ operations are given, thus when only one bin is needed computing that bin using the DFT directly results in a savings of $log_2(N)$. When multiple but still relatively small number of bins are needed, the Goertzel algorithm is a good choice.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks a lot. But the signal is now at 5KHz? So f/2. Is there missing a 2 anywhere? Or has it to do with Nyquist-Shannon? My 250KHz is the base band sampling rate I set in my SDR. So would it be correct to use 500KHz in the algorithm? $\endgroup$ – Markus Apr 13 at 0:27
  • $\begingroup$ Your sampling rate is 250 KHz and the signal is at 10 KHz - not sure why you think there is a factor of two; this is a complex signal right? $\endgroup$ – Dan Boschen Apr 13 at 0:29
  • $\begingroup$ Do an FFT of 25 samples of your signal; every bin is spaced by 10 KHz—- the approach above is computing the 24th bin directly (which is -10 KHz). $\endgroup$ – Dan Boschen Apr 13 at 1:30
  • $\begingroup$ Ok. I did understand this. It has been a problem in my code. I've missed there a call to handle IQ bytes and so it got doubled. $\endgroup$ – Markus Apr 13 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.