About filter design, mostly we want to control frequency amplitude response and the linearity of phase response. I wonder whether there are FIR filters specialized to delay signal?

For instance, let's say I want to process a multi-frequencies signal, delaying 1200Hz for offset = $\frac{\pi}{8}$ ($f_s$ = 44100) and leaving 500Hz unchanged.

Is such a FIR filter possible? How can I do it?

  • 1
    $\begingroup$ my answer to the question above details a way of designing FIR filters to have a desired phase delay / group delay characteristic. $\endgroup$ – Marcus Müller Dec 4 '18 at 10:40
  • $\begingroup$ What is your exact requriement regarding the amplitude response? Does it have to be totally flat or is some ripple allowed? $\endgroup$ – TheSlowGrowth Dec 4 '18 at 10:52
  • $\begingroup$ @TheSlowGrowth Hi, ripple is allowed in amplitude response, which should be approximatly flat. What I want to control is the phase shift. Thanks. $\endgroup$ – Wei Lin Dec 4 '18 at 13:32

It is easily possible to design FIR filters with a complex frequency response specification, i.e., with a desired frequency response


where both the desired magnitude $|D(\omega)|$ as well as the desired phase $\phi(\omega)$ can be prescribed. A least squares approximation of $(1)$ by an FIR filter just involves the solution of a system of linear equations. I've written a Matlab/Octave function solving that problem: lslevin.m.

Note that it is important to choose the specification $(1)$ in such a way that it can be realistically achieved by an FIR filter of a given length $N$. E.g., the average delay implied by the desired phase $\phi(\omega)$ should be close to $(N-1)/2$, which is the delay of a linear phase FIR filter of length $N$.


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