just a short update on my progress:
- spent a considerable amount of time on finetuning the spectrum display for smoothness and nice look and feel
- spent some time on trying to understand why demodulation is so easy in the frequency domain.
I used this paper and found it very helpful:
http://www.3db-labs.com/01598092_MultibandFilterbank.pdf
Lessons learned:
- overlap of 25% is probably best in terms of efficiency, but for the steepest filters I use 50% overlap and an FFT of 4096 points with a 2049 tap filter, which is the maximum of taps you can use with a 4096 point FFT
- frequency shifting is very easy in frequency domain: you just "rotate" the output of the FFT in the buffer and feed the result to the iFFT. However, the resolution is limited by the number of bins in the FFT (4096 bins for 44.1kHz is 10.7Hz per bin) AND the overlap factor (which is 2 in my case and 4 in Walters case). I discovered that when trying different shifts (and having strange audio when using odd bin numbers as the shift!) and read about that problem afterwards in the paper ;-). So, it is very easy to use an IF for the SDR and do the frequency translation to baseband by rotating the bins in the buffer. So, no complicated quadrature oscillator necessary anymore for frequency translation!
- I was very astonished that demodulation of LSB/USB in frequency domain is not necessary! You just feed the real output of the iFFT to your output audio and that´s it. To choose between LSB/USB you fill the lower/upper bins with zeros!
- AM demodulation can be done in different ways: take everything that´s in all bins and calculate magnitude by sqrt(I*I+Q*Q) OR choose the sideband (by filling the other sideband with zeros) and calculating magnitude. Very nice to be flexible when receiving stations with interference in one sideband
- the FIR filter that is calculated on-the-fly with the desired properties by the Teensy itself can very easily be visualised by just plotting the FFT_filter_mask (which is the FFT of the filter coefficients) with the spectrum display function. So when you change your filter bandwidth/type, you can verify your filter by visually inspecting it --> quite sexy
- I built in the sample rate function by Frank B: that enables the user to choose the bandwidth of the spectrum display (up to 96kHz possible with 96k sample rate; yes, Nyquist is == sample rate, because we use I&Q as input, which effectively doubles the sample rate!). However, at 96k sample rate, the processor is at 45%, so that is probably the limit, but at 96k we can use the full 2049 tap brickwall filtering
Will post the code in a few days, have to clean up a lot ;-). I will open up a new SDR thread, so this thread can still focus on questions of convolution specifically.