Forums

Implementation of Linear phase IIR filter

Started by sham ganth September 26, 2003
Sir,
Iam trying to implement Linear phase IIR filter. My problem is that i
want to reset the state variable of the Elliptic lowpass filter i
want your suggestions in doing that task. If anyone came across
ftpsite of Linear phase iir filter source code please send me.
Thanks in advance,
shamganth.k



Please help me to understand this. I thought linear phase IIR filter is
impossible. A linear phase filter must be symmetric about some point in
time domain. If it is infinitely long (as in an IIR), it must have infinite
delay as well (i.e., the symmetry center is infinitely away from time 0).
Do I miss something?

Feng -----Original Message-----
From: sham ganth [mailto:]
Sent: Friday, September 26, 2003 3:35 AM
To:
Subject: [matlab] Implementation of Linear phase IIR filter

Sir,
Iam trying to implement Linear phase IIR filter. My problem is that i
want to reset the state variable of the Elliptic lowpass filter i
want your suggestions in doing that task. If anyone came across
ftpsite of Linear phase iir filter source code please send me.
Thanks in advance,
shamganth.k
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you
want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/matlab

More DSP-Related Groups: http://www.dsprelated.com/groups.php3

">http://docs.yahoo.com/info/terms/> .




--- Feng Ouyang <> wrote:
> Please help me to understand this. I thought linear
> phase IIR filter is
> impossible. A linear phase filter must be symmetric
> about some point in
> time domain. If it is infinitely long (as in an
> IIR), it must have infinite
> delay as well (i.e., the symmetry center is
> infinitely away from time 0).
> Do I miss something?
>
> Feng

Hi ,
No you are not missing. I guess people use time
reversal impulse response technique to generate zero
phase IIR filters. Some people design an appoximate
linear phase IIR filters and it really depends on what
accuracy level(phase linearity) the original poster
wants. It is worth to look into the following paper
http://kondor.etf.bg.ac.yu/~lutovac/pdf/tels99lm.pdf

Santosh nath
> -----Original Message-----
> From: sham ganth [mailto:]
> Sent: Friday, September 26, 2003 3:35 AM
> To:
> Subject: [matlab] Implementation of Linear phase IIR
> filter
>
> Sir,
> Iam trying to implement Linear phase IIR filter. My
> problem is that i
> want to reset the state variable of the Elliptic
> lowpass filter i
> want your suggestions in doing that task. If anyone
> came across
> ftpsite of Linear phase iir filter source code
> please send me.
> Thanks in advance,
> shamganth.k >
> _____________________________________
> Note: If you do a simple "reply" with your email
> client, only the author of
> this message will receive your answer. You need to
> do a "reply all" if you
> want your answer to be distributed to the entire
> group.
>
> _____________________________________
> About this discussion group:
>
> To Join:
>
> To Post:
>
> To Leave:
>
> Archives: http://www.yahoogroups.com/group/matlab
>
> More DSP-Related Groups:
> http://www.dsprelated.com/groups.php3
>
> ">http://docs.yahoo.com/info/terms/> . >


__________________________________


Feng,

You are confusing phase response with impulse response. You *can* have an
infinite impulse response but still have a linear phase response. Try
plotting the phase and magnitude response of the following IIR function:
h(z) = (1 + 2*z^-1 + 2*z^-2 + z^-3)/(1 + 4*z^-2).

Or better yet, look at the response of a Butterworth IIR filter.

Thanks,

Chatonda

--- Feng Ouyang <> wrote:
> Please help me to understand this. I thought linear phase IIR filter is
> impossible. A linear phase filter must be symmetric about some point in
> time domain. If it is infinitely long (as in an IIR), it must have infinite
> delay as well (i.e., the symmetry center is infinitely away from time 0).
> Do I miss something?
>
> Feng > -----Original Message-----
> From: sham ganth [mailto:]
> Sent: Friday, September 26, 2003 3:35 AM
> To:
> Subject: [matlab] Implementation of Linear phase IIR filter
>
> Sir,
> Iam trying to implement Linear phase IIR filter. My problem is that i
> want to reset the state variable of the Elliptic lowpass filter i
> want your suggestions in doing that task. If anyone came across
> ftpsite of Linear phase iir filter source code please send me.
> Thanks in advance,
> shamganth.k >
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the author of
> this message will receive your answer. You need to do a "reply all" if you
> want your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join:
>
> To Post:
>
> To Leave:
>
> Archives: http://www.yahoogroups.com/group/matlab
>
> More DSP-Related Groups: http://www.dsprelated.com/groups.php3
>
> ">http://docs.yahoo.com/info/terms/> . >


===== __________________________________



Hello Friends,

The topic of designing linear phase IIR filters is very interesting. I am
attaching some relevant material from "Multirate Systems and Filter Banks"
by Vaidyanathan (1993), page 37. It says that causal stable IIR linear phase
filters are impossible to design ! (Of course, we are asked to prove it !)

Regards,
Nalin

-----Original Message-----
From: Chatonda Mtika [mailto:]
Sent: Sunday, September 28, 2003 12:12 AM
To: ; sham ganth;
Subject: RE: [matlab] Implementation of Linear phase IIR filter Feng,

You are confusing phase response with impulse response. You *can* have an
infinite impulse response but still have a linear phase response. Try
plotting the phase and magnitude response of the following IIR function:
h(z) = (1 + 2*z^-1 + 2*z^-2 + z^-3)/(1 + 4*z^-2).

Or better yet, look at the response of a Butterworth IIR filter.

Thanks,

Chatonda

--- Feng Ouyang <> wrote:
> Please help me to understand this. I thought linear phase IIR filter is
> impossible. A linear phase filter must be symmetric about some point in
> time domain. If it is infinitely long (as in an IIR), it must have
infinite
> delay as well (i.e., the symmetry center is infinitely away from time 0).
> Do I miss something?
>
> Feng > -----Original Message-----
> From: sham ganth [mailto:]
> Sent: Friday, September 26, 2003 3:35 AM
> To:
> Subject: [matlab] Implementation of Linear phase IIR filter
>
> Sir,
> Iam trying to implement Linear phase IIR filter. My problem is that i
> want to reset the state variable of the Elliptic lowpass filter i
> want your suggestions in doing that task. If anyone came across
> ftpsite of Linear phase iir filter source code please send me.
> Thanks in advance,
> shamganth.k >
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the author
of
> this message will receive your answer. You need to do a "reply all" if
you
> want your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join:
>
> To Post:
>
> To Leave:
>
> Archives: http://www.yahoogroups.com/group/matlab
>
> More DSP-Related Groups: http://www.dsprelated.com/groups.php3
>
> ">http://docs.yahoo.com/info/terms/> . >


===== __________________________________
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you
want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/matlab

More DSP-Related Groups: http://www.dsprelated.com/groups.php3

">http://docs.yahoo.com/info/terms/


Attachment (not stored)
Linear Phase IIR.doc
Type: application/msword


Dear ALL,
 
This is the first time am writing something to this group........
 
Coming straight to the point of linear phase IIR Filter design.
 
Yes, it is possible to design linear phase IIR Filter.
 
To prove above point......lets start with the very basic thing which is
pretty clear to all.....The Linear Phase FIR Filter.
 
Here let say A0, A1, A2, A3, A4,.....Ap (0 <= p < N) are the coefficients.
Then.........
 
            N-1
              _
Yn =       \       (Ap * Xn-p)
              /_
             p=0
 
Taking Z Transform on both sides we have.........
 
 
               N-1
                 _                              -p
Y(z)  =       \       [     Ap * X(z) * z      ]
                 /_
                p=0
 
                            N-1
                             _                     -p
H(z)  =  Y(z)  =       \       [     Ap * z      ]
             X(z)          /_
                            p=0
 
                           -jkw/N
H(w)  =     M(w) * e      .....................Here M(w) is Magnitude response
                                                      and other is Linear Phase response
                                                      also k = 0......N-1
 
Now lets invert the above equation.....
 
                                                    -jkw/N
Hi(w)  =  Y(w)   =   1  /   [ M(w)   *   e         ]
              X(z)
 
                               
                                            N-1
                                             _              -p
Hi(z)  =  Y(z)  =   1  /  {           \   [  Ap * z    ]           }
              X(z)                         /_
                                           p=0
 
N-1
 _                              -p
 \       [     Ap * Y(z) * z      ]  =  X(z)
 /_
p=0
 
 
N-1
 _
 \       (Ap * Yn-p)        =   Xn
 /_
 p=0
 
 
                   N-1
                      _
A0*Yn    +     \       (Ap * Yn-p)        =       Xn
                    /_
                    p=1
 
                                N-1
                                 _
Yn   =     B0*Xn    -     \       (Bp * Yn-p)    ..........Here Bp = Ap/A0
                                 /_                                    where   0 <= p < N
                                p=1
 
Above equation is a linear Phase IIR.
 
Hence,
a LPF in FIR can be represented as a HPF in IIR
a BPF in FIR can be represented as a BSF in IIR
 
and vice versa........(As frequency domain response is reversed)
 
Hope this explanation suffice your requirement.
 
Well thats it!.......this is tirthankar signin off.......till then take care.....BYE
 
 


Want to chat instantly with your online friends?Get the FREE Yahoo! Messenger

Ooops, the example I gave the other day was incorrect. This
is what it should have been:

Let N(z) = (1 + z^-1)^p = b(z^2) + c(z^2)/z (for p >= 2)

Then H(z) = N(z)/b(z^2) is linear phase IIR.

example: take p=3

N(z) = 1 + 3*z^-1 + 3*z^-2 + z^-3 = (1 + 3*z^-2) + (3 + z^-2)/z
b(z^2) = 1 + 3*z^-2

Butterworth wavelets (Martin Viterli, et al) fall into this group.

-chatonda
--- Tirthankar De <> wrote:
> Dear ALL,
>
> This is the first time am writing something to this group........
>
> Coming straight to the point of linear phase IIR Filter design.
>
> Yes, it is possible to design linear phase IIR Filter.
>
> To prove above point......lets start with the very basic thing which is
> pretty clear to all.....The Linear Phase FIR Filter.
>
> Here let say A0, A1, A2, A3, A4,.....Ap (0 <= p < N) are the coefficients.
> Then.........
>
> N-1
> _
> Yn = \ (Ap * Xn-p)
> /_
> p=0
>
> Taking Z Transform on both sides we have......... > N-1
> _ -p
> Y(z) = \ [ Ap * X(z) * z ]
> /_
> p=0 > N-1
> _ -p
> H(z) = Y(z) = \ [ Ap * z ]
> X(z) /_
> p=0
>
> -jkw/N
> H(w) = M(w) * e .....................Here M(w) is Magnitude response
> and other is Linear
Phase
> response
> also k = 0......N-1
>
> Now lets invert the above equation.....
>
> -jkw/N
> Hi(w) = Y(w) = 1 / [ M(w) * e ]
> X(z) >
> N-1
> _ -p
> Hi(z) = Y(z) = 1 / { \ [ Ap * z ] }
> X(z) /_
> p=0
>
> N-1
> _ -p
> \ [ Ap * Y(z) * z ] = X(z)
> /_
> p=0 > N-1
> _
> \ (Ap * Yn-p) = Xn
> /_
> p=0 >
> N-1
> _
> A0*Yn + \ (Ap * Yn-p) = Xn
> /_
> p=1 > N-1
> _
> Yn = B0*Xn - \ (Bp * Yn-p) ..........Here Bp = Ap/A0
> /_ where
0 <= p <
> N
> p=1
>
> Above equation is a linear Phase IIR.
>
> Hence,
> a LPF in FIR can be represented as a HPF in IIR
> a BPF in FIR can be represented as a BSF in IIR
>
> and vice versa........(As frequency domain response is reversed)
>
> Hope this explanation suffice your requirement.
>
> Well thats it!.......this is tirthankar signin off.......till then take
care.....BYE
>
> ---------------------------------
> Want to chat instantly with your online friends?Get the FREE Yahoo!Messenger


===== __________________________________