I have a signal containing two sine tones 30 kHz and 60 KHz. I used a second order IIR notch filter to filter out the 60 KHz component from the signal, so now the signal has only 30 KHz component.

When comparing the filtered out signal with a pure 30 KHz tone generated, the earlier samples are very much different but later samples are matching to some good extent.

Plot with earlier samples: enter image description here

Plot with later samples: enter image description here

What are the reasons why there is a delay before response being proper? How can i mathematically quantify this?

Like after how many samples the filtered output will be reasonably matching with that of pure tone?

  • $\begingroup$ Which notch filter did you use? $\endgroup$ Oct 26, 2017 at 14:57
  • $\begingroup$ Also, if you have discrete-time signals, why are you using Hz as unit of frequency? The unit should be radians. $\endgroup$ Oct 26, 2017 at 14:58
  • $\begingroup$ @Rodrigo notch filter is second order iir notch filter (used matlab's iirnotch function to generate coefficients) $\endgroup$
    – srk_cb
    Oct 26, 2017 at 15:01
  • $\begingroup$ And what are the coefficients? What is the transfer function? $\endgroup$ Oct 26, 2017 at 15:07
  • $\begingroup$ @RodrigodeAzevedo coefficients are b = 0.9946 -1.8496 0.9946 a = 1.0000 -1.8496 0.9893 $\endgroup$
    – srk_cb
    Oct 27, 2017 at 4:57

1 Answer 1


It's the transient and the group delay which are associated with the initial conditions and the LTI filter phase response $\phi(w)$ respectively.

The group delay (in samples) associated with the LTI filter is: $$\tau = - \frac{d \phi(w) }{dw} $$

The output will be shifted by $\tau$ samples wrt to the input. You shall compansate this shift for synchronization.

This delay is constant for linear phase filters which are of symmetric FIR type filters. For IIR type filters, since their phase response is not linear therefore getting a fixed group delay is not possible.


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.