What is the definitions of a “Hanning window”, a “rectangular window”, and a “triangular window”? — CV, Cape Town, South Africa
In the days before digital signal processing, the filters that were available for audio or video systems were very simple. These filters monitored the audio or video signal and produced an output signal that was related to the present input signal and to that signals value’s in the recent past. Such simple filters could enhance or diminish certain ranges of frequencies and were able to perform basic tasks such as adjusting the balance between treble, midrange, and bass in an audio system.
But with computers and digital signal processing now commonplace, filtering has become much more sophisticated. Filters can now study an audio or video input signal over a long period of time and can even use data about future values of the input signal when producing an output signal. The filters that you ask about are all digital filters that produce an output signal that is related to the past, present, and future values of the input signal. A rectangular window filter is one that determines the output signal from a certain range of past, present, and future input signal values, all weighted evenly. A triangular or “Parzen” window filter is one that determines the output signal from a certain range of past, present, and future input signal values, with the weighting of values decreasing linearly with increasing time in the past or future. A Hanning window filter is one that determines the output signal from the complete past and future input signal values, with the weighting of values decreasing as the cosine of the time in the past or future (see for example, “Numerical Recipes” by Press, Flannery, Teukolsky, and Vetterling). All three filtering windows and filters are used to keep filters that extract certain frequency ranges from the input signal from affecting other frequency ranges. For that purpose, the Hanning window is better than the Parzen window and both are better than the rectangular window. As an example of the applications of these filters, a digital audio filter that makes good use of the Hanning window can enhance the treble of an audio signal uniformly without coloring the midrange at all. Earlier filters that only used past information always colored the midrange and didn’t affect the treble uniformly.