-
Notifications
You must be signed in to change notification settings - Fork 53
Signal flow in Software
I & Q data input from the QSD hardware into the LINE input of the Teensy audio board -->
queue 16 blocks of 128 samples of I & Q -->
set clip state flags for codec gain adjustment in codec_gain()
convert int16_t to float32_t -->
Software I & Q amplitude and phase correction (automatic algorithm by Moseley & Slump 2006 or adjusted by the user) -->
Twinpeak identification algorithm
Calculate Spectrum display values (if in ZoomFFT == 1 mode)
Frequency translation by + sampling rate / 4 without multiplication (see Rick Lyons´ book which explains how that works) -->
Calculate Spectrum display values (if in ZoomFFT > 1 mode)
Display Spectrum display
Calculate dBm/S-Meter
Display dBm/S-Meter
lowpass filter and downsample-by-4 --> for highest filter bandwidth (9kHz) this is done at 176ksps sample rate and FIR filter with 28 filter taps
lowpass filter and downsample-by-2 --> for highest filter bandwidth (9kHz) this is done at 176ksps sample rate and FIR filter with 45 filter taps
fill audio samples into FFT buffers for digital convolution (I use the overlap and discard/save algorithm) -->
512-point-complex-FFT --> [from now on we are in the frequency domain]
Autotune-algorithm, if user wants to autotune to a carrier
complex multiply the FFT buffer with the FFT results of a 257 tap complex FIR filter that has to be calculated once depending on the bandwidth characteristic chosen by the user (freely adjustable as bandpass) -->
delete specific bins, if manual notch filter is activated
512-point-inverse-FFT & take only the 2nd half of the iFFT output (overlap and discard/save) --> [we are back again in time domain]
Automatic gain control [controls both I & Q separately, thus quite time consuming] -->
demodulation algorithm according to the chosen Demodulation mode:
- LSB / USB --> no demodulation necessary, just take the real part of the iFFT output
- AM: nine different algorithms implemented, take a look at the corresponding page in the wiki
- SAM: synchronous AM demodulation, see Whiteley 2011 (wiki) for an explanation
- sideband selection in SAM is done by the complex FIR filter bandpass coefficients -->
automatic notch filter with variable leak LMS algorithm from the wdsp library by Warren Pratt
spectral noise reduction (Ephraim-Malah-algorithm, well: kind of ;-))
excellent noise blanker designed by Michael Wild
upsample-by-2 and lowpass filter --> for highest filter bandwidth (9kHz) this is done at 176ksps sample rate and FIR filter with 48 filter taps (no. of taps has to be a multiple of interpolation factor L)
upsample-by-4 and lowpass filter --> for highest filter bandwidth (9kHz) this is done at 176ksps sample rate and FIR filter with 32 filter taps (no. of taps has to be a multiple of interpolation factor L)
scaling has to be done after this interpolation by decimation/interpolation factor 8 -->
take the 16 blocks of audio, convert them from float32_t to int16_t -->
push the 16 blocks x 128 samples into the output queue and listen to the radio ! ;-)
set codec gain
check encoders
check buttons
display real time clock
END OF LOOP
Not listed in the flow are the menus and settings, e.g. sample rate change etc.