-
Notifications
You must be signed in to change notification settings - Fork 135
Tweaking sampling rate and FFT size
Sampling rate and FFT size are two important parameters affecting the device bandwidth and the channel bandwidth.
RTLSDR-Airband picks a suitable sampling rate automatically for each device. The default value for RTLSDR and MiriSDR devices is 2.56 Msps, while for SoapySDR devices the program picks the closest value to 2.56 Msps from the list of sampling rates supported by the hardware. In some cases it might be beneficial to set it manually though:
- If your device supports sample rates higher than 2.56 Msps, you may want to utilize them to get a higher bandwidth in multichannel mode to cover a wider spectrum span. On the other hand, if you do not need the full 2.5 MHz bandwidth, you may reduce the sampling rate and save some CPU power and USB bandwidth.
- Sometimes it might be beneficial to reduce sampling rate to get a cleaner spectrum without aliasing and spurs. See here for an example.
- In scan mode the program sets the center frequency close to the currently scanned frequency. Having a wide bandwidth in this mode is therefore not necessary. You may reduce the sampling rate for scanning devices and save some CPU power and USB bandwidth.
To set the sampling rate, add sample_rate
option to the relevant device
section:
devices:
({
type = "rtlsdr";
index = 0;
gain = 25.0;
sample_rate = 2.4;
channels: ( ... );
});
sample_rate
expresses a frequency, so it may be specified in multiple
formats. See here
for details.
As mentioned in the Overview, RTLSDR-Airband uses Fast Fourier Transform to split the wideband input signal into multiple narrowband channels of equal bandwidth. As the program picks a single FFT bin for each channel, FFT size equals the number of narrowband channels to produce. The bandwidth of a single channel is determined together by the sampling rate of the device, the FFT size and the audio output rate (which is 16 kHz or 8 kHz, depending on whether NFM support is compiled in or not).
The default value of FFT size is 512. In some cases it might be beneficial to set it manually though:
- If you are using high sampling rates (say, 6 Msps or more) you may notice that the channel bandwidth is a little too high and you are picking considerable background noise. Increasing FFT size might improve channel selectivity and lower the background noise - at the expense of increased CPU usage (or GPU usage, if running on a Raspberry Pi).
- If you are using low sampling rates (ie. below 1 Msps) the default channel bandwidth might be a little too narrow, which will cause clipping the channel spectrum and garbled audio. Decreasing FFT size might help in this case.
To set FFT size manually, use fft_size
global option. Accepted values are
powers of two in the range of 256-8192, inclusive.
fft_size = 1024;
devices: (
...
);
- Overview
- Installation
-
Configuration essentials
- Grammar basics
- General configuration file structure
- Configuring devices
- Configuring channels
- Configuring outputs
-
Configuring optional features
- Disabling configuration sections
- Changing PID file location
- Manual squelch setting
- CTCSS
- NFM deemphasis
- Audio filters in MP3 outputs
- Notch filter
- Limiting channel bandwidth
- Icecast metadata updates in scan mode
- Logging activity of scanned frequencies
- Channel usage statistics
- Tweaking sampling rate and FFT size
- Mixers
- Multithreaded operation
- Running
- Troubleshooting
- Configuring auxiliary software to work with RTLSDR-Airband