[TangerineSDR] Question on bandwidth versus sample rate: can they be independently set?

Engelke, Bill bill.engelke at ua.edu
Wed Apr 15 15:42:37 EDT 2020

Scotty - thanks for the further explanation. With that in mind, I'd like to discuss exactly how to design the "CH" command (configure channel) so that we could put the DE into that mode.

As a first pass at this, I have designed a buffer layout like so:

struct channelBlock
    int channelNo;
    int antennaPort;
    double channelFreq;
    double channelBandwidth;
typedef struct channelBuf
    char chCommand[2];
    struct channelBlock channelDef[16];

Let’s say we want to collect data at 2.5 MHZ and 5.0 MHz, observing 5 Hz on either side of carrier on both channels (as you say in your example).

An example channel setup request might look like so (illustration below does not show actual layout of the bytes. Values with E are double precision floating point) -

CH   0   0    2.5E00     1.0E-02     1  0   5.0E00    1.0E-02

This represents:

Channel 0 is on Antenna Port 0, and has a center frequency of 2.5  (MHz) and a bandwidth of 0.01 (kHz)(i.e., 10 Hz)

Channel 1 is on Antenna Port 0, and has a center frequency of 5.0 (MHz) and a bandwidth of 0.01 (kHz)

I am not sure this contains everything you need for the configuration because it doesn’t give a hint on how to decimate the data or set the samples per second. How would we specify that?

-73- Bill Engelke

P.S. - (BTW, we would actually need 1,024 samples to approach this, as the number of bins must be a power of 2).

P.P.S. – We still need to get the science guys to weigh in on whether a snapshot of the bands every ~100 seconds is fast enough in snapshotter mode.  As far as the number of channels, we need to shoot for being able to collect data on WWV at 2.5, 5.0, 10.0, 15.0 and 20.0 MHz as well as CHU at 3.33, 7.335, and 14.670 MHz (that’s 8 carrier frequencies), at the same time as collecting FT8 on 6 to 8 bands; and possibly also WSPR on another 6 – 8 bands. This may be aspirational, I know….

-----Original Message-----
From: Scotty Cowling <scotty at tonks.com>
Sent: Tuesday, April 14, 2020 5:16 PM
To: Engelke, Bill <bill.engelke at ua.edu>; Tom McDermott <tom.n5eg at gmail.com>
Cc: TAPR TangerineSDR Modular Software Defined Radio <tangerinesdr at lists.tapr.org>; Dr. Nathaniel A. Frissell Ph.D. <nathaniel.frissell at scranton.edu>
Subject: Re: [TangerineSDR] Question on bandwidth versus sample rate: can they be independently set?

Hi Bill,

To answer your first questions first...

The reason that we have to run multiple channels at the same sample rate is due to the fact that we are interleaving multiple virtual receivers'

data in the same packet. Although theoretically we *could* interleave them at different rates, Digital RF would probably not like it.

However, we have the capability to create multiple single-receiver data streams (maybe not in phase 1), and these would not have to be related in any way (sample rate or bandwidth).

The frequency precision or resolution bandwidth is related to the number of bins and the time interval. If you want 10 milli-hertz resolution, you must sample for 100 seconds (1/0.010Hz=100sec). The sample rate will determine the length your FFT needs to be. If you are over-sampling at 122.88Msps and want 10 milli-Hertz resolution bandwidth, you must still sample for 100 seconds. Thus you would need an FFT of length 100*122.88*10^6, which is kind of long. :-) Of course, you would get

12,288,000,000 bins, each 10milli-Hz wide. You would then use the 10 or

20 bins centered on 2.5MHz to determine WWV's doppler shift, throwing away the other 12,287,999,980 frequency bins

It makes more sense to filter and decimate to something more reasonable, like 10sps (+/- 5Hz) and do an FFT of length 1000 to get 1000 bins of 10 milli-Hz each. Especially since filtering to a 5Hz bandwidth without decimating is exceptionally hard. Reducing the bandwidth with combined filtering and decimation is a common technique for DSP, which may be why you often see sample rates and filter bandwidths track.

Think of it this way. If I give you 48ksps sample rate, do you really want more than 48kHz of bandwidth? Anything above 48kHz of bandwidth will alias back into your baseband. I could give you less (say 24kHz), but then why not reduce the sample rate to 24kHz and reduce the load on your DSP code running on the PC/SBC?

So to answer your first question, yes, we can arrange it so the you can independently set the sample rate and bandwidth, but I don't see much reason to do it, and in extreme cases it makes the filtering difficult inside the FPGA.

To answer your second question, yes, the way Tom describes it is exactly how the FPGA will process the raw data before sending it to you.  All we have to do is to make sure that we support the sampling rates that you require. If you need +/- 5Hz, then we will do it. In many ways, lower sampling rates are easier to implement. They certainly take up less bandwidth on the wire than sending over full bandwidth data. :-)

9 virtual receivers at 10sps won't take up very much bandwidth. Even a RPi might be able to do 9 FFTs of 1024 samples each in a reasonable amount of time. If not, then maybe you would have to develop the algorithm to do the calculations in the time domain.

Hope that this makes some sense, along with Tom's excellent explanation.


Scotty WA2DFI

On 4/14/2020 12:50 PM, Engelke, Bill wrote:

> Tom – thanks for the analysis on that.  (I must admit, I will have to

> study this a bit to really grasp it)… But now, let me pose a couple of

> questions for Scotty & Nathaniel –



>    *   Scotty – could we enable the DE to be able to do what Tom describes below?

>    *   Nathaniel – regarding the precision & sample rate – for science results, is this the right trade-off between precision and how often we get a sample?  Or is there another, better way to do it?


> -73- Bill, AB4EJ


> From: Tom McDermott <tom.n5eg at gmail.com<mailto:tom.n5eg at gmail.com>>

> Sent: Tuesday, April 14, 2020 1:27 PM

> To: TAPR TangerineSDR Modular Software Defined Radio

> <tangerinesdr at lists.tapr.org<mailto:tangerinesdr at lists.tapr.org>>

> Cc: Engelke, Bill <bill.engelke at ua.edu<mailto:bill.engelke at ua.edu>>

> Subject: Re: [TangerineSDR] Question on bandwidth versus sample rate: can they be independently set?


> Hi Bill - generally the bandwidth and sample rate are locked together.

> The Nyquist criteria is that the sample rate be at least twice the

> highest frequency component.  When using I+Q samples, we are able to distinguish negative from positive frequencies, so the range of usable frequencies goes from

>   -fsamp/2 to +fsamp/2.    Nyquist means that in theory no information is discarded at lower than half the sample

> rate ** - even very fractional Hertz stuff is in there and can be recovered, but it might take a long time.


> As an example:

> In order to receive a 10 Hertz wide spectrum slice (+/- 5 Hz) the

> receiver would need to first lowpass filter the signal to < 5 Hz. (i.e. from -5 to +5) then decimate and change the sample rate, then send those to you.

> You could then for example implement a Complex FFT of size=1024.  This would yield bin sizes of

> 10 / 1024,  or 9.8 milliHertz.   Beware however that at a 10 Hz sample rate, that FFT process needs 102.4 seconds worth

> of data per FFT.


> Does this clarify?


> -- Tom, N5EG


> ** Except that due to imperfect LPF filter roll-off, ADC quantization, etc.




> On Tue, Apr 14, 2020 at 10:17 AM Engelke, Bill via TangerineSDR <tangerinesdr at lists.tapr.org<mailto:tangerinesdr at lists.tapr.org<mailto:tangerinesdr at lists.tapr.org%3cmailto:tangerinesdr at lists.tapr.org>>> wrote:

> This question is sort of directed to Scotty, but I am posting it here because I’m sure others will have useful thoughts on this matter.


> As you may recall, in TangerineSDR when we collect IQ data for multiple channels, we have to run them all at the same sample rate (at least, for Phase 1). The main reason for this is that Digital RF is optimized for handling data that way, and we need to roll with that rather than struggle against it, so that we can have something ready and tested in the time frame. We can add more complexity later if we want.


> I am puzzling over something, however – probably because I still have a lot to learn about digital signal processing.  The frequency precision of an FFT is related to the number of bins (i.e., when I do the FFT with 2048 samples, I get more precision than if I do it with 1024 samples). In several conversations, the sample rate and the bandwidth have been almost interchangeable; however, is that mandatory?


> Specifically, let’s say that I want to closely watch the carrier frequency of WWV at 10 MHz.   We know that the most it moves due to doppler shift is a fraction of a Hz, so I only want to handle a few Hz of bandwidth – but I want to do it to a precision of 0.01 Hz.  This precision would seem to dictate a very high sample rate, but the bandwidth I want to process is only 2 to 3 Hz.


> The QUESTION then is this:  when configuring the channels for the DE to run, is it feasible for me to be able to independently set the sample rate and bandwidth?   If so, is there a major downside to doing this?


> -73- Bill AB4EJ

> --

> TangerineSDR mailing list

> TangerineSDR at lists.tapr.org<mailto:TangerineSDR at lists.tapr.org<mailto:TangerineSDR at lists.tapr.org%3cmailto:TangerineSDR at lists.tapr.org>>

> http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/tangerinesdr_lists.tapr.org/attachments/20200415/7eb1fa38/attachment-0001.html>

More information about the TangerineSDR mailing list