5

I am trying to increase my knowledge on software defined radio and according to what I have read its hardware consists of three parts:

  1. Amplifier
  2. Tuner
  3. ADC

I just wanted to make sure that my assumption that the filtering and demodulation is done by the computer mathematically is correct.

Kevin Reid AG6YO
  • 24,506
  • 7
  • 51
  • 103
Jack
  • 399
  • 1
  • 3
  • 13

2 Answers2

2

No, not all filtering is done in software. The ADC must be preceded by an analog low-pass anti-aliasing filter. This can be considered as being part of the ADC subsystem or part of the tuner subsystem, but it exists in either case.

That analog filter is separate from (typically) the much narrower digital filter which passes the signal to be demodulated. There may be more than one such filter depending on the modulation. (Most filtering is done in software because digital filters can have very good characteristics and be adjusted as needed, but the hardware antialiasing filter is a physical necessity.)

The demodulation is indeed done entirely in software.

It is also possible to eliminate the hardware tuner component. This requires an ADC with a sampling rate greater than the desired RF frequency, so this is a strategy typically used only by HF SDRs that operate only up to 30-50 MHz. It has the advantage of a simpler, cleaner signal path, and being able to receive at multiple widely-separated frequencies simultaneously, but requires higher performance from the ADC and DSP.

Kevin Reid AG6YO
  • 24,506
  • 7
  • 51
  • 103
  • Another note for very-wideband digital receivers is needing enough dynamic range when in the presence of strong signals in the receiving band. – user2943160 Jul 31 '16 at 03:18
  • @user2943160 Indeed, but I think that's more detail than is really relevant to the question, so I've replaced that part with a less specific statement. – Kevin Reid AG6YO Jul 31 '16 at 03:55
  • 1
    @KevinReidAG6YO just another note: for direct sampling, you just need an ADC with a sampling rate high enough to cover the whole band of interest, as well as phantastic filters that get rid of the rest of the spectrum, so only that band aliases into baseband – practically, you'd mostly see direct samplers working on 0Hz – highest frequency of interest, not in undersampling modes. – Marcus Müller Jul 31 '16 at 05:32
  • Ah by the way, QOTD: https://twitter.com/derekkozel/status/759289563546255361 "SDR: Sample first, ask later" – Marcus Müller Jul 31 '16 at 06:46
  • @KevinReidAG6YO if the filter is analog how come in gnu radio we start of by sampling the signal and then send it to the filter to listen to FM radio; according to this (http://greatscottgadgets.com/sdr/images/lesson1-grc.png) – Jack Aug 01 '16 at 15:41
  • @MaryannEthan That filter is separate from the anti-aliasing filter. I've added some more to my answer about that. – Kevin Reid AG6YO Aug 01 '16 at 16:13
  • @KevinReidAG6YO so the cutoff frequency in this particular example it set to 75k for the digital filter. This part is done in software? and the hardware filter that you have mentioned has a constant cut off frequency depending on the hardware? – Jack Aug 01 '16 at 16:17
  • @MaryannEthan It may be constant or may be adjustable, particularly if the hardware supports different sampling rates (if the filter is too wide for the rate, there is aliasing, and if it's too narrow the additional bandwidth is not being taken advantage of). But it will not be as finely adjustable as a digital filter, and will typically have worse performance (slow rolloff). – Kevin Reid AG6YO Aug 01 '16 at 16:21
  • @KevinReidAG6YO there is a maximum sampling rate that is mentioned on SDR, is that set depending on the filter cutoff frequency to prevent aliasing? – Jack Aug 01 '16 at 16:40
  • 1
    @MaryannEthan No, the filter is designed to suit the sample rate, not vice versa. If you want to know more about filtering in SDRs you should post another question, not ask questions in comments. – Kevin Reid AG6YO Aug 01 '16 at 18:13
2

Adding to AG6YO's excellent answer:

Software defined radio depends on a signal that is well digitizable by the ADC, and that usually includes amplification in the analog domain. The typical signal chain hence would kind of look like:

Antenna ➔ RX Port ➔ LNA ➔ Mixer ➔ Low/Band pass Filter ➔ ADC ➔ DSP ➔ 
                            ⮤ Synthesizer  -----------------------⭠
  • Antenna: Receives EM wave
  • RX Port: well, connect the antenna
  • LNA (Low Noise Amplifier): The first amplifier in a receive chain dominates the noise figure, hence use a low noise one here, and sprinkle in adjustable amplifiers anywhere you see fit further down before the ADC
  • Mixer: Mixes down (and up, and twice up, and...) the receive signal with the local oscillator (LO) as generated by the synthesizer. If it mixes directly to baseband, you get an I/Q "complex" baseband signal (two lines). If it is designed to mix to an IF (intermediate frequency), you just get a single signal.
  • Synthesizer: In essence, a programmable oscillator. Typically uses something like fractional-N techniques to generate a lot of selectable frequencies from a single reference oscillator. Frequency error of these frequencies is defined by the reference's performance. Typically addressed by software running on the computer.
  • Low pass filter: As per Nyquist you mustn't have any signal more signal than the ADC can represent unambigously; which means that you need to restrict the bandwidth of the analog signal to half the sampling rate per real channel; usually, if done in baseband, you just use a low pass filter for that with half the sampling rate as stop band edge, though it's also common to see Intermediate Frequency (IF) systems that use a Nyquist-rate band around a non-zero frequency.
  • ADC (Analog to Digital Converter): Samples the signal at discrete times (dictated by the sampling rate $f_\text{sample}$), holds its value at that instant for as it takes to get a digital reading, sends that reading over to some DSP chain, usually even still on the device
  • DSP (Digital Signal Processing): First of all, there's no ADC with e.g. USB, so you need some silicon to buffer samples on one end and on the other hand put them in to computer bus packets. Then, it's often desirable to do some digital signal processing already on the device. For example:
    • your synthesizer can generate many frequencies, but not all; hence you still have a frequency offset that you can now get rid of by shifting the signal in frequency domaint (i.e. multiply with $e^{j2\pi f_\text{offset}}$)
    • your ADC runs continuously at 2x 100MS/s for I and Q – so the spectrum your observing is $(-\frac{100\text{ MHz}}2, \frac{100\text{ MHz}}2)$ around the center frequency. Problem is: your transport (e.g. Gigabit Ethernet) cannot possibly transmit that many samples ($100\cdot 10^6 \frac{\text S}{\text s}\cdot \frac{16\text{bit [I]}16+\text{bit [I]}}{\text S}=3.2\frac{\text{ Gb}}{\text s} > 1\frac{\text{ Gb}}{\text s} $)
      You hence have to filter and decimate in the DSP chain already
    • You know your mixer's imperfections (different gains on I and Q), and you want to compensate for those without tasking your computer

Then comes the interconnect to whatever runs your DSP software – for example, a PC, or a single board computer like the popular Raspberry Pi.

They then get a clean sample stream representing a bandwidth "as it was on the air", and then can demodulate it to their will. Modern PC hardware is quite capable, so for example, you can take a laptop, and with something that sends 25 MS/s over network or USB3, look at all the FM broadcast radio range (87–108 MHz) at once, easily, and just pick arbitrarily many stations at once to demodulate to audio and play/save for later etc. At the same time, you could decipher the bus sign information that are present in that spectrum as well.

If the mixer and synthesizer allows, you could tune the same device to 2.4 GHz and reconstruct operation of RC cars, or what your neighbour was typing (which is not really that much of a surprising fact, but makes the round in the media lately.

Or you could receive NOAA weather images, or listen to aircraft transponders, or ship transponders, or just tune in to your friendly ham discussions :)

The nice thing about having the ADC sample a relatively high bandwidth is indeed that good filters are expensive – only in the real world.

If your ADC is not running into any clipping problems, and there's no strong nearby signals that desensitize your analog amplifiers, and let's say you've got a noise floor at -100 dBm/Hz and a CW at -93 dBm, then you'd need a 10 Hz wide filter just to get an SNR of 3dB. Which is pretty complicated and highly specific in analog electronics – but in SDR, you'd just let (if it can do that) the DSP chain give you something very easily processable with a modern CPU, e.g. 0.5MS/s, and then either apply a cascade of decimating filters to further suppress the noise, or just go another route and just estimate the power of that single tone with an algorithm whose job is nothing but to find tones within noise (that could be a so-called parametric spectrum estimator, like ESPRIT).

Kevin Reid AG6YO
  • 24,506
  • 7
  • 51
  • 103
Marcus Müller
  • 15,910
  • 23
  • 45
  • +1 for mentioning band-pass filter, but -1 for spreading the misconception that "you mustn't have any signal above your sampling frequency", so total is zero. – AndrejaKo Aug 02 '16 at 19:05
  • @AndrejaKo I'm fully agreeing this wording is wrong; I probably just hoped they skim through the presentation I've linked; I'll reword! – Marcus Müller Aug 02 '16 at 20:26
  • @AndrejaKo better? – Marcus Müller Aug 02 '16 at 20:29
  • Now it's much better! – AndrejaKo Aug 03 '16 at 06:54
  • @MarcusMüller could you elaborate on "Mixer: Mixes down (and up, and twice up, and...) the receive signal with the local oscillator (LO) as generated by the synthesizer. If it mixes directly to baseband, you get an I/Q "complex" baseband signal (two lines). If it is designed to mix to an IF (intermediate frequency), you just get a single signal." ,,on gnu radio I always get to spectrums that I assume represent I and Q no matter how I do the mixing part. – Jack Aug 03 '16 at 14:35
  • @maryann that is just because you seem to be using only direct conversion receivers, which give you complex baseband. Please read up on the concept of complex baseband. – Marcus Müller Aug 03 '16 at 17:25
  • @MarcusMüller I am really sorry to bother you this much, but as you see in Kevin Reid answer to my question( which you referred to as excellent) he writes that the demodulation in indeed done entirely in software.and here http://dsp.stackexchange.com/questions/33711/quadrature-modulation-for-fm-and-am, in the comments you say "GNU Radio is software, and hence, isn't concerned with quadrature demodulation – that's a hardware thing"... – Jack Aug 17 '16 at 18:35
  • So is it a hardware or software thing? – Jack Aug 17 '16 at 18:40
  • @MaryannEthan there's different meanings of the word "demodulation". When we talk about quadrature modulation and demodulation, we mean the hardware mixers that give us analog IQ. When we talk about e.g. a PSK demodulator, that is done in software. These terms have the same name, but mean something completely different. – Marcus Müller Aug 17 '16 at 18:40
  • @MarcusMüller so what you mean by quadrature demodulation so far is what is happening at the mixer of usrp? Demodulation means getting the "message signal" out of the carrier signal and this is what I have been referring to. – Jack Aug 17 '16 at 18:44
  • After thinking really hard about it!, I think that gnuradio works with complex signals and regardless of how we mix our signal at the mixer the software always divides the signal into its I and Q and then gets the message signal out. Please tell me this is correct ! – Jack Aug 17 '16 at 19:07
  • @MarcusMüller I think your statement is wrong, the correct word for what you have been referring to is quadrature sampling not quadrature demodulation – Jack Aug 21 '16 at 21:03