# Phase shift in higher order filters

I was doing some research on filters, So I designed butterworth filter based on pole locations. I applied to a simple sine signal to check for the outputs. I cannot find the reason for what I noticed.

Why does higher order filter have alot of phase shifts. Is it trying to adjust for more noise reduction? If, Yes how is it mathematically possible? I have only changed the order of the filter, I have kept cut off frequency same

• So, what does the order of the filter correspond to? By increasing the order, what is it that you are "adding" to the filter? – A_A Oct 25 '16 at 9:48
• This is exactly what i want to know! Theoretically. But mathematically I am just increasing the degree of difference equation. – Aashu10 Oct 25 '16 at 11:25
• exactly, you're increasing the degree of the difference equation. Now, what does that mean algebraically, when you write it down? – Marcus Müller Oct 25 '16 at 11:28
• @MarcusMüller Increases the number of computation? – Aashu10 Oct 25 '16 at 11:34
• @A_A, I understand what increasing of the order means. It controls how sharpply the filter sepearates passband from the stop band. I do not understand the phase shift. And i want to know what exactly i am 'adding' to the filter when i increase the order. – Aashu10 Oct 25 '16 at 11:41

Discrete filters are divided in two major classes: Finite Impulse Response (FIR) filters and Infinite Impulse Response Filters (IIR).

Both types of filters are structured around a fundamental unit. A fundamental operation that is responsible for the filtering. That is, the delay unit. Of course, besides the delay unit you also have the sumation points. But sumation, on its own, without delay doesn't produce filtering.

So, both filters, produce outputs that depend on the past of the inputs (and / or outputs).

The concept of "filter order" is defined for both types of filters but in a slightly different way (it's still the same thing really).

Let's look at an FIR filter:

$$y_n = \sum_{m=0}^{Nh-1} x_{n-m} \cdot h_m$$

Here, to produce one value for $y_n$ we sum $m$ products of the past of the signal and some impulse response $h$. $Nh$ is the total length of $h$.

The order of the filter here is $N_h$, directly proportional to the number of delay units in the filter.

So, by increasing the order, we do get a sharper filter but also a longer filter and the longer the filter is, the longer it takes for one of the $x_n$ to propagate through the series of delays.

And that is where the increased group delay is coming from! Furthermore, in an FIR filter all frequencies are delayed proportionally. So, bass frequencies are delayed less than treble frequencies in a predictable (and linear) way because the time it takes for the sinusoids to propagate through the delay line is fixed.

Now, let's look at an IIR filter:

$$y_n = \sum_{m=0}^{Nh-1} x_{n-m} \cdot h_m - \sum_{k=1}^{Ng-1}y_{n-k} \cdot g_k$$

Which, if you take a closer look, is like two FIR filters back-to-back. The left part, we have seen before and it is the FIR filter from the first equation. The right part is an FIR but this time it is on past values of the output. We therefore have introduced feedback...and all the "joys" that come with it.

The order of an IIR filter is now the length of the feedback delay line (i.e. the $Ng$ here) and because of this interaction between the input and output, the group delay of an IIR filter varies with frequency. So, treble frequencies might be going through much faster than bass frequencies in an IIR filter.

OK, so now let us look at your experiment. You design a filter and you pass through it a simple sinusoid at some fixed frequency. Then you increase the order and you observe a longer delay.

Which is perfectly reasonable, because, irrespectively of the type of filter (FIR / IIR), increasing the order, means adding more delay units.

Hope this helps.

• It's not true that it is only with IIR filters that the group delay is frequency dependent; the same can be the case for FIR filters. Only linear phase FIR filters have a constant group delay, but they are only a (very restricted) subset of all possible FIR filters. BTW, it is not the group delay by which a sinusoid is delayed when applied to a filter, but the phase delay. Only in the case of linear phase filters are those two delays identical. – Matt L. Oct 25 '16 at 16:01
• Absolutely. Thank you for pointing this out @Matt L. I was concentrating on those. – A_A Oct 25 '16 at 16:16
• very complete answer – msm Oct 25 '16 at 21:28
• I don't really think anyone can put it more perfectly – Aashu10 Oct 26 '16 at 6:00