[hpsdr] FFT latency

Warren C. Pratt warren at wpratt.com
Sun Apr 5 10:08:54 PDT 2015


Excellent comments.  There are examples of various types of filtering in 
the wdsp library we use.

When a FIR filter exceeds somewhere around 50 to 100 taps, it is more 
computationally efficient to implement it using FFTs.  The reason being, 
if N is the number of taps, that using FFTs the computation grows as N 
log2 N where implementing in the time domain the computation grows as 
N^2.  Our main bandpass filter is implemented as a linear-phase FIR, 
implemented with an FFT/iFFT in an overlap-save configuration.  No 
"windowing" of the data is required in this case and we use an overlap 
factor of 2.

The new noise reduction algorithm, NR2, is a frequency domain algorithm, 
also implemented with FFTs.  In this case, we perform an FFT, multiply 
each frequency bin by a calculated gain value, and perform an inverse 
FFT.  Since the gains are time varying, we window the data both before 
the FFT and after the iFFT.  For various reasons, an overlap of four is 
being used.

In contrast, for the APF (audio peaking filter), and in a few other 
places, IIR filters are used.

73,
Warren  NR0V


On 4/5/2015 9:43 AM, Jim Barber wrote:
> ***** High Performance Software Defined Radio Discussion List *****
>
> Oops... Make that "256-tap linear-phase FIR filter" in the below.
>
> Jim N7CXI
>
> On 4/5/2015 9:35 AM, Jim Barber wrote:
>> The actual latency introduced by an FFT will depend on the overlap 
>> used between frames.
>> For very long FFT's with substantial overlaps it can be burdensome, yes.
>>
>> The reasons the FFT is used are for the most part performance, 
>> convenience and sometimes
>> because that's the "way that the other guys did it". There are also 
>> algorithms that are inconvenient
>> or difficult to execute in the "time domain" - spectral subtraction 
>> noise reduction being one.
>>
>> You can, of course perform filtering, demodulation and processing 
>> routines strictly in the time
>> domain. If you use linear-phase FIR filters, the additional latency 
>> or delay for
>> each filter added to the chain is very close to N/2 samples. So for 
>> example, a 256-tap linear-phase
>> FFT filter in the audio section of the DSP @ Fs=48 kHz will add 
>> ((256/2) / 48000) = 2.7ms delay.
>> The equivalent delay using an FFT to execute the filter will be 
>> longer. Specifying it exactly will
>> start arguments, but it will indeed be substantially longer.
>>
>> So... The first question that comes up is can you afford the 
>> additional processing overhead?
>> That calculation isn't simple, and is subject to implementation tweaks.
>>
>> Another thing you can do is use IIR filters where appropriate - audio 
>> EQ's for speaker output
>> channels and the like. They are computationally efficient and add 
>> almost no delay - at the
>> expense of non-linear phase response, which you may or may not care 
>> about at a given
>> stage.
>>
>> My .02,
>>
>> Jim N7CXI
>>
>>
>> On 4/5/2015 3:54 AM, G3XJP wrote:
>>> ***** High Performance Software Defined Radio Discussion List *****
>>>
>>> I need your collective wisdom!  Is it not an inescapable fact that 
>>> any serious FFT in the real-time path between your antenna and your 
>>> ears must introduce an inherent and inevitable delay that will 
>>> preclude a conversational VOX/QSK QSO?  I can see that it would not 
>>> preclude listening to a monologue - or to watching spectral pictures 
>>> on a display. But anything more than about 1/5 sec is doomed to feel 
>>> like Skype on a bad day - where you often end up having to say 
>>> "over".  As a generality, am I missing something fundamental here?  
>>> Peter G3XJP
>>> _______________________________________________
>>> HPSDR Discussion List
>>> To post msg: hpsdr at openhpsdr.org
>>> Subscription help: 
>>> http://lists.openhpsdr.org/listinfo.cgi/hpsdr-openhpsdr.org
>>> HPSDR web page: http://openhpsdr.org
>>> Archives: http://lists.openhpsdr.org/pipermail/hpsdr-openhpsdr.org/
>>
>
> _______________________________________________
> HPSDR Discussion List
> To post msg: hpsdr at openhpsdr.org
> Subscription help: 
> http://lists.openhpsdr.org/listinfo.cgi/hpsdr-openhpsdr.org
> HPSDR web page: http://openhpsdr.org
> Archives: http://lists.openhpsdr.org/pipermail/hpsdr-openhpsdr.org/


 1428253734.0


More information about the Hpsdr mailing list