(Disclaimer. I have started doing some DSP. The last time I worked with this was in the eigthies. And I wasn't much of a specialist then, either.)

Is the impulse response different for IIR and FIR filters (since I don't know if my heading is correct, so to say).

I know that the impulse response of an ideal low-pass is sinc (Low-pass filter: Ideal and real filters).

However, in an example from XMOS xCORE-200 DSP Elements Library, part app_design, the impulse response is like enter image description here.

I could probably paste the code here, if necessary.

The IIR filter is given samples with value 1.0 as the first. The other 7 are 0.0. They say that this is a dirac delta pulse (which seems to be associated with sinc), but might this be a kronecker delta pulse instead? I have looked at the Wikipedia articles about this.

Another thing. I have for years thought that it's the time sequence impulse response of a (generic) delta pulse that, will be reflected in the spectrum after an FFT, being the transfer function of the filter it's going through. But then, the sinc doesn't look much like a transfer function. But now I read that this goes for a rectangular pulse. Didn't Bach go to the churces he got musical orders from and clapped and listened to the echo to really learn about the room, and thus make music that wasn't smeared out? I would certainly like this straightened up!


1 Answer 1


In discrete time, a filter's impulse response can have a finite length (FIR) or an infinite length (IIR). The impulse response is just what it says it is: a system's response to an impulse at the input. In discrete time, an impulse is a single number $1$ (and zeros everywhere else). This is not a Dirac delta impulse, which is a mathematical construction useful for the analysis of continuous-time systems. It is - as you've figured out - a Kronecker delta.

If we're dealing with time signals, the impulse response is a time-domain sequence. Its frequency domain equivalent is the frequency response, which is the (discrete-time) Fourier transform of the impulse response.

The impulse response of an ideal lowpass filter (which can't be implemented) is a sinc sequence (sinc function in continuous time). So in this context, the sinc function is not a transfer function, it is a time domain impulse response. The corresponding frequency response is a rectangle, which is the definition of an ideal lowpass filter (constant response in the passband, zero in the stopband, with zero transition band width).

On the other hand, the sinc function can be a frequency response. That would be the case if we have rectangular time-domain function. A filter with a rectangular impulse response computes a finite-length average of its input, and its frequency response has a sinc shape.

And yes, Bach listened to (an approximation of) the impulse response. His clapping approximates an impulse with high energy concentrated in time, so the response of the room to his clapping is close to its impulse response.

  • 1
    $\begingroup$ I just smile here! Thank you, Matt! This was so clarifying! $\endgroup$ Commented Apr 21, 2022 at 17:49

Your Answer

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

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