3
$\begingroup$

How can I extract a signal to baseband?

Rather that just listen to one signal at a time, I want to take advantage of my RTL-SDR's 2mhz bandwidth and listen to multiple FM signals at the same time. I think that what need to do for each signal is filter out everything but the signal, then shift the signal to baseband and reduce the bandwidth. Once it's a baseband, I can take it from there.

  • Which filter or pair of filters would be a decent way of to filter out all but the signal I want?
  • Should I be using IIR vs FIR?
  • What would be a decent way to shift to baseband and reduce bandwidth?
  • Can shifting to baseband and reducing bandwidth be done at the same time? Should these be done at the same time?

Everything I'm working with is a complex signal. I'm planning on implementing these myself for the greater education value. (IE, I'm not using GNUradio, or existing libraries. Mostly I need to know what to Google.)

$\endgroup$
7
  • $\begingroup$ Basicly what you need is a down MIXER setup, which will shift your input band of interest into your output band of interest. However what you intent to do is unclear to me. What do you mean by "listening" to multiple stations simultaneously? Do you mean you want to demodulate, at the same time, multiple FM channels and transfer their audio to different users ? If you have only one FM decoder, it would demodulate one channel at a time. Unless you have some special purpose hardware to do otherwise. I dont know the device RTL-SDR's technical specifications and computational capabilities. $\endgroup$
    – Fat32
    Feb 28, 2016 at 14:40
  • $\begingroup$ An RTL-SDR only has one downmixer. Everything else after the downmixer and sampler is done in PC software. So you can only write code on your PC to decode FM channels within the SDR's 2 MHz quadrature sampler and USB port bandwidth. (Can you really stream 4Msps through USB?) $\endgroup$
    – hotpaw2
    Feb 28, 2016 at 17:50
  • $\begingroup$ Yes, I'm wanting to write the software to do all this digitally on the PC after capturing from the RTL-SDR (a software defined radio). I think I've taught myself enough to code the FM demodulator(s), I just need to get the signal shifted over and the other signals out of the way. And yes, streaming the four megabytes per second through the USB works just fine. It's amazing how much you can do with this $20 radio. $\endgroup$
    – A Learner
    Feb 28, 2016 at 18:04
  • $\begingroup$ @ALearner without a more in depth understanding of the software defined radio architecture it is hard to offer a more concrete answer. $\endgroup$
    – Fat32
    Feb 28, 2016 at 21:22
  • $\begingroup$ The SDR side doesn't really matter, I think. We can pretend it's just a file on disk. I'm starting with 8 bit IQ sample pairs. I want to filter out all but one signal, then shift that signal to baseband. I'm looking to do this entirely on the PC side - no signal processing hardware at at all. Basicly, I need the names of things I should be googling how to impliment. $\endgroup$
    – A Learner
    Feb 28, 2016 at 22:11

1 Answer 1

3
$\begingroup$

I would do it like this:

  1. Start with a 2 MHz signal containing up to 10 FM stations. In practice it will contain maybe three or so.

  2. Identify the carrier frequencies of each station; call them f0 to f9. These are the frequencies in your downconverted 2 MHz signal, not the original carriers.

  3. Design 10 200kHz-wide bandpass filters centered around each f0:f9. Filter the 2-MHz signal with each of these filters to separate each individual FM carrier.

  4. Downconvert each FM carrier back to baseband. To do this, multiply each carrier by the signal exp(-j*2*pi*fi*t), where fi is the carrier frequency and t is time. This will bring each FM signal to baseband.

  5. Demodulate each signal using a regular FM demodulator.

  6. Send each resulting audio signal to its destination.

An alternative procedure would swap steps 3 and 4:

  1. Frequency-shift the entire 2 MHz signal so that the desired carrier ends up at 0 Hz.

  2. Apply a low-pass filter to remove all undesired frequencies.

The advantage of this method is that you need to design only one low-pass filter instead of 10 band-pass filters. However, you need to be careful that you don't introduce aliases that can affect the frequencies you want to recover. The reason is that a 2-MHz signal sampled at 4-MHz doesn't have any "headroom" at the ends; any time shifting will introduce aliases. Just make sure these don't end up in the passband of your low-pass filter.

So, you need to: design bandpass filters (or one low-pass filter), generate complex exponentials, and demodulate the FM signals. You can do this Matlab, Liquid DSP, GnuRadio, or any number of other numerical/radio programs and languages. I think your largest constraint will be computer power, unless you only have a couple of FM stations.

$\endgroup$
7
  • $\begingroup$ What is the "j" and "t" in section 4? What are the pros and cons of filtering before shifting, vs shifting before filtering? $\endgroup$
    – A Learner
    Feb 29, 2016 at 12:28
  • $\begingroup$ you can replace that complex exponential $e^{-j2\pi f_i t}$ with $\cos(2\pi f_i t) + j \sin(2\pi f_i t)$. Where "j" stand for the imaginary unit of a complex number (used as "i" in math notation, but "j" in electrical engineering notation, since "i" is reserved for current). "t" is continuous time, but you should replace that with a sampling index such as $t_n=nT_s$ where $T_s$ is your sampling period and $n$ is the integer sample index. $\endgroup$
    – Fat32
    Feb 29, 2016 at 13:28
  • $\begingroup$ @ALearner I've updated the answer to address your questions, please see if it's clearer now. $\endgroup$
    – MBaz
    Feb 29, 2016 at 14:22
  • $\begingroup$ @Fat32 I don't see any benefit to using a cos()+jsin() signal like you propose. The reason is that the RTL-SDR produces a complex signal (the complex envelope of the high-frequency signal); the most natural way to frequency-shift such a signal is using a complex exponential directly. Of course, in the end they are equivalent. $\endgroup$
    – MBaz
    Feb 29, 2016 at 14:24
  • $\begingroup$ @MBaz, the benefit, I think, is for the OP's understanding who seems not to know what a complex exponential is. Isn't he asking for "j" and "t"? So I though he needed a more concrete expression of the "same" thing. Besides how do you physically represent a complex exponential in memory? As two channels of real and imaginary parts? and arent they exactly what I have written, provided you want a bare bones implementation :) $\endgroup$
    – Fat32
    Feb 29, 2016 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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