1
$\begingroup$

We learnt about the various windowing techniques recently and I can't seem to wrap my head around why one would use anything other than a rectangular window.

I created a signal with 10 evenly spaced harmonics and subjected it to both a rectangular window and a triangular window. I can't seem to wrap my head around why anyone would use a triangular window over a rectangular window. As you can see in the pictures below, rectangular window cuts off the frequency at exactly where you'd want it to. Whereas the triangular window doesn't even seem desirable to me. Even the harmonic at ~2500Hz is scaled down. Isn't that the opposite of what we want?

Rectangular Window

Triangular Window

$\endgroup$

1 Answer 1

1
$\begingroup$

There's some confusion here.

  • If you are learning about the window method to design FIR filters, the windowing is done in the time domain, not the frequency domain.
    Windowing is used in this case to mitigate the effects of Gibb's phenomenon and spectral leakage. I suggest you search this website for these terms.

  • If you're talking about filtering in the frequency domain, it's a bad idea to zero-out FFT bins

$\endgroup$
4
  • $\begingroup$ Apologies. I only recently started learning digital signal processing and my textbook seems to be heavily focused on building low pass filters. Can you point me towards some beginner resources regarding windowing? Preferably with demos. $\endgroup$
    – rjpj1998
    Aug 23 at 17:22
  • $\begingroup$ This guide is great to start! Chapter 16 focuses on the window method for FIR filter design, but I would start at Chapter 14. $\endgroup$
    – Jdip
    Aug 23 at 17:43
  • $\begingroup$ Thank you. I'm marking this as the answer for now. Do let me know if the question is too trivial or non-sensical for stackexchange. $\endgroup$
    – rjpj1998
    Aug 23 at 17:52
  • 1
    $\begingroup$ I think it’s ok! Beginners can make this mistake. We’ll see if the mods want to remove it ;) $\endgroup$
    – Jdip
    Aug 23 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.