Doc on DSP FIlter vs. Buffer vs. filter type...

K9RX
Posts: 414
Joined: Fri Apr 14, 2017 3:47 pm

Doc on DSP FIlter vs. Buffer vs. filter type...

Postby K9RX » Wed Aug 23, 2017 3:35 pm

I am looking for a document. I think it was written by Warren but i'm not sure. Possibly it was Scott WU2O ... anyway I read it 2 or so weeks ago. I am printing everything I can get my hands on - and putting it in to a folder ... this one I didn't do and I'd like to get it again as it was well done. It talked about DSP filtering, about the decision to separate 'buffer' and 'filter'. And it had a real nice spectrum display showing the effects on a filter using 1024, 2048, 4096 settings on the filter. And it talked about the buffer settings. Its the latter that i mostly need to revisit as I can see the effects of the filter settings on a receive filter using the spectrum display. I also believe it showed that a filter less than 100Hz wide is a bit ... well you have a loss of signal due to the crossover between the curves of the lo and hi. Finally it mentioned linear phase vs. low latency filter types.

Anyone know where I can find this - I HAVE looked - literally for what seems like a good couple of hours over a few days... I thought it was one of the upgrade note docs but I've been there and haven't found it. I've looked at many sites and done multiple (many) Google searches to no avail.

thanks

Gary
K9RX
User avatar
w-u-2-o
Posts: 5572
Joined: Fri Mar 10, 2017 1:47 pm

Re: Doc on DSP FIlter vs. Buffer vs. filter type...

Postby w-u-2-o » Wed Aug 23, 2017 4:02 pm

Gary,

I'm not totally sure which document that is, or where to find it, although I remember seeing it. Nevertheless, here is the data you are probably looking for, excerpted from this web page.

This data is the same for all ANAN series radios, from the 10 to the 8000, as these filters are implemented in PowerSDR mRX and not in the radio hardware or firmware. These are, after all, software defined radios ;)

With the bandpass set to 1000Hz, here are the filter response curves for filter lengths (filter "size" in Setup > DSP > Options) of 1024, 2048, 4096, 8192 and 16384.

First the BH-4 Window curves. The BH-4 windowing function gives sharper skirts at the expense of ultimate rejection level.

Image

Next the BH-7 Window curves. The BH-7 windowing function provides deeper rejection levels at the expense of more gradual skirts.

Image

When using the Linear Phase filter type, which is a straightforward linear phase FIR filter implementation, latency in milliseconds can be calculated by dividing filter length by the PowerSDR internal audio sample rate of 48KHz. For example, a Linear Phase filter of length 4096 has a latency (delay) of 4096/48 = 85.3mS. Yes, that's a loooong time. So there is some penalty for using longer filters with steeper skirts. However, since the skirts on a 1024 long filter are already steeper than almost anything you'll find in an analog or IF DSP type radio, there is little incentive to use the longer filters. Indeed, they are so steep that many CW aficionados often complain about ringing with filter lengths of 2048 or longer.

However, when using the Low Latency filter type, which is implemented as a minimum phase FIR filter, latency is essentially the same across all filter lengths, and is quite short, around 10mS give or take. Because I like low latency, and because there is no penalty for using any length Low Latency filter, I have settled on using a BH-7 window with a filter length of 4096 on both transmit and receive, which gets me approximately the same skirts as a BH-4 at 2048 but with much deeper rejection levels. I find no difference in signal quality, CW, phone or digital, even though the group delay through the Low Latency filters is not flat, as propagation through the ionosphere has already screwed group delay all to hell anyway. Some people say they can hear the difference, though.

73!

Scott
K9RX
Posts: 414
Joined: Fri Apr 14, 2017 3:47 pm

Re: Doc on DSP FIlter vs. Buffer vs. filter type...

Postby K9RX » Wed Aug 23, 2017 11:24 pm

thanks Scott ... I will watch the "new posts" (as I do most days) for any update in case you do find this doc ... still not sure on the "buffer" settings - knew pretty well what to do re filter and filter type.

Gary
User avatar
w-u-2-o
Posts: 5572
Joined: Fri Mar 10, 2017 1:47 pm

Re: Doc on DSP FIlter vs. Buffer vs. filter type...

Postby w-u-2-o » Thu Aug 24, 2017 12:16 pm

There are no hard and fast guidelines on the buffer sizes. I always start with the smallest size for lowest latency, then work up from there if there are under/overruns in the audio (pops, clicks and glitches) on transmit or receive.

In general, the DSP buffer sizes can almost always be left at the minimum setting on any reasonably powerful computer. The most important buffer setting is in Setup > Audio > Primary. This is the buffer that moderates the IF data moving back and forth to/from the radio over the Ethernet cable (improperly identified and located in the audio setup area as a legacy from the old, old days when IF data literally travelled over an analog audio connection to/from the SDR hardware).

Note that, currently, is is nearly impossible to get rid of all glitches. There are some recently discovered issues with Windows Ethernet drivers and protocol stacks whereby packets can arrive out of order and which can prevent perfect delivery of data on certain systems. This issue is being worked by Warren at this time.

73,

Scott
User avatar
WA0VY
Posts: 83
Joined: Sun Apr 09, 2017 3:41 pm

Re: Doc on DSP FIlter vs. Buffer vs. filter type...

Postby WA0VY » Fri Aug 25, 2017 12:09 am

Note that, currently, is is nearly impossible to get rid of all glitches. There are some recently discovered issues with Windows Ethernet drivers and protocol stacks whereby packets can arrive out of order and which can prevent perfect delivery of data on certain systems. This issue is being worked by Warren at this time.


Way to go, Scott, you buried the lede! This is big news! Obviously, there can be more than one issue responsible for glitches - and the issue can be unique to various computer builds - but I had no idea that a potentially common source of the problem had been identified. I am continuing to use WPA to chase things down on my end but I have not seen a glitch since my last post on this subject. WPA easily allows me to see where there is some latency which I can sometimes associate with a glitch, but what Warren is running down might not show up as latency. I'm not sure I could find it with WPA. If there is a methodology to do it, please let me know.
73 Brent WA0VY
User avatar
w-u-2-o
Posts: 5572
Joined: Fri Mar 10, 2017 1:47 pm

Re: Doc on DSP FIlter vs. Buffer vs. filter type...

Postby w-u-2-o » Fri Aug 25, 2017 1:14 am

To detect this problem you have to use Wireshark and manually look at the packet stream.

Return to “PowerSDR mRX”