[hpsdr] WELCH_WINDOW in Kiss Konsole

Roger Rehr W3SZ w3sz73 at gmail.com
Fri Dec 23 18:05:48 PST 2016


Hi All,

I am sending this to the list as I wasn't sure whom among the many folks
starting with Phil Harman who did such a great job giving us Kiss
Konsole was the person to contact regarding the WELCH_WINDOW filter type
in Kiss Konsole.  I figured that whether it is Phil or someone else who
knows that section of the code, that person would be monitoring this list.

I have used Kiss Konsole as the basis for some homebrew software that
I've been using / playing with over the past couple of years.

Over the past day I was comparing the filters included in this software
and I discovered that the WELCH_WINDOW type of filter doesn't work.  I
believe this is because of a typo.

The code in Kiss Konsole's FilterDesigner.cs for this filter (around
line 146) reads:

                case WindowType_e.WELCH_WINDOW:
                    for (i = 0, j = size - 1; i <= midn; i++, j--)
                        window[j] = (window[i] = 1.0F -
(float)Math.Sqrt((float) (i - midm1) / (float) midp1));

I believe that it should read:


                case WindowType_e.WELCH_WINDOW:
                    for (i = 0, j = size - 1; i <= midn; i++, j--)
                        window[j] = (window[i] = 1.0F -
(float)Math.Pow((float) (i - midm1) / (float) midp1),2));

After I made this change, the Welch window appears to work OK.
I am certainly not a DSP expert, so I could be wrong.  The reference for
my suggested change is:
https://en.wikipedia.org/wiki/Window_function#Welch_window

Comments appreciated.

73,

Roger Rehr
W3SZ



More information about the Hpsdr mailing list