2
$\begingroup$

I have a stream of audio blocks at input, each having 64 samples.

Sending a previous block of samples to output, i.e. delaying one block, means applying a unity gain FIR filter?

out[n] = 0 * in[n -  0] + 
         0 * in[n -  1] + 
         0 * in[n -  2] + 
         ...
         1 * in[n - 64]. 

What's the frequency response of this filter?
Is there a use case for such design, or does this make no sense?

$\endgroup$
  • $\begingroup$ The absolute value of the frequency response is one. The phase response is not zero. The Z-transform would be $z^{-64}$. $\endgroup$ – Hooman May 16 '17 at 8:30
5
$\begingroup$

Yes this would properly delay the input by 64 samples but note that you can simply do:

$out[n]=in[n-64]$

Which was probably clear to you and you just wanted to show how it related to a 65 tap FIR with all taps = 0 except the last one.

The coefficients of the FIR filter represent the impulse response (strictly in discrete terms we call this the "unit sample response") of the filter. In this case the impulse response is a delayed impulse. The Fourier transform of a delayed (time shifted) impulse has a magnitude response in frequency that is all ones, and a linear phase response where the delay is equal to the phase slope according to:

$\text{delay} = d\phi /d\omega$ where $\phi$ is the phase in radians and $\omega$ is the radian frequency in radians/second.

We see this specifically from the Time Shift property of the Discrete-Time-Fourier-Transform:

$$y[n] = x[n-N]$$ $$Y(\omega)=e^{-j\omega N}X(\omega)$$

You can quickly plot the frequency response using Octave or Matlab as follows:

freqz([zeros(1,64) 1])

With the following result:

Frequency Response

With a linear phase filter such as this, the signal is not distorted by the filter, only delayed. For more on that see this post: why is linear phase important

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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