Date post: | 02-Jun-2018 |
Category: |
Documents |
Upload: | krishnagdeshpande |
View: | 218 times |
Download: | 0 times |
of 39
8/11/2019 College 07
1/39
FIR and IIR Transfe
the input output relation of
an LTI system is:
[ ] [ ] [k
y n h k x n
=
=
the output in thez domain is:
Where
so we can write the transfer function in the familiar for
( ) [ ] n
n
H z h n z
=
=
( ) ( ). ( )Y z H z X z =
8/11/2019 College 07
2/39
so we can write the transfer function in the familiar for
8/11/2019 College 07
3/39
FIR and IIR Transfe
recall the LTI IIR difference equation:0
[ ]N
k k
a y n k =
applying thez transform to both sides of the differenc
and making use of the linearity and time shifting propez transform gives:
M
0 0
( )N M
k
k k
k k
a z Y z b z
= =
=
8/11/2019 College 07
4/39
8/11/2019 College 07
5/39
8/11/2019 College 07
6/39
8/11/2019 College 07
7/39
8/11/2019 College 07
8/39
n E
n Ex
Consider the M-point moving-average FIR filter with an impulse res
=][nh
otherwise,010,/1 n
( ) ( )
1
10
1 1 1( )
[ 1 ]1
M MMn
Mn
z zH z z
M M z zM z
=
= = =
Observe the following
The transfer function hasMzeros on
the unit circle at* ,
There are M-1 poles at z= 0 and a single
pole at z= 1
The pole at z= 1 exactly cancels thezero at z = 1
kjez /2= 10 k
-0.5
0
0.5
1
ImaginaryPart
8/11/2019 College 07
9/39
8/11/2019 College 07
10/39
8/11/2019 College 07
11/39
Ideal
deal
An ideal filter is a digital filter designed to pass signal co
certain frequencies without distortion, which therefore h
frequency response equal to 1 at these frequencies, and hfrequency response equal to 0 at all other frequencies
The range of frequencies where the frequency response t
value of one is called thepassband
The range of frequencies where the frequency response t
value of zero is called thestopband
The transition frequency from a passband to stopband reg
thecutoff frequency Note that an ideal filter cannot be realized Why?
8/11/2019 College 07
12/39
8/11/2019 College 07
13/39
8/11/2019 College 07
14/39
Ideal
deal
We note the following about the impulse response of an
hLP[n] is not absolutely summable
The corresponding transfer function is therefore not BIBO stable
hLP[n] is not causal, and is of doubly infinite length
The remaining three ideal filters are also characterized by doubly in
impulse responses and also are not absolutely summable
Thus, the ideal filters with the idealbrick wallfrequency
cannot be realized with finite dimensional LTI filter
8/11/2019 College 07
15/39
8/11/2019 College 07
16/39
8/11/2019 College 07
17/39
8/11/2019 College 07
18/39
8/11/2019 College 07
19/39
8/11/2019 College 07
20/39
Zero
ero
Phase F
hase F
Now, for non-real-timeprocessing of real-valued input signals of fin
phase filtering can be implemented by relaxing the causality require
A zero-phase filtering scheme can be obtained by the following proc
Process the input data (finite length) with a causal real-coefficient filter H
Time reverse the output of this filter and process by the same filter.
Time reverse once again the output of the second filter
x[n] v[n] u[n] w[H(z) H(z)
][][],[][ nwnynvnu ==
),()()( XHV =)()()(
UHW =
( )*)( VU = ( ) *( ) *(Y W H = =
8/11/2019 College 07
21/39
In M
n M
The function filtfilt() implements the zero-phase filtering sch
filtfilt()
Zero-phase digital filtering
y = filtfilt(b,a,x) performs zero-phase digital filtering by processi
data in both the forward and reverse directions. After filtering in
direction, it reverses the filtered sequence and runs it back throu
The resulting sequence has precisely zero-phase distortion and
filter order. filtfilt minimizes start-up and ending transients by m
conditions, and works for both real and complex inputs.
8/11/2019 College 07
22/39
Linear
inear
Note that a zero-phase filter cannot be implemented for rapplications. Why?
For a causal transfer function with a nonzero phase respophase distortion can be avoided by ensuring that the tranhas (preferably) a unity magnitude and alinear-phase chthe frequency band of interest
Note that this phase characteristic is linear for all in [0 2].
Recall that the phase delay at any given frequency 0was If we have linear phase, that is, ()=-, then the total delay at
Real time means causal operation. No time to revers
jeH =)( 1)( =H == )()(H
8/11/2019 College 07
23/39
What is the Big D
hat is the Big D
The deal is huge!
If the phase spectrum is linear, then the phase delay is in
the frequency, and it is the same constant for all freque In other words, all frequencies are delayed by seconds,
equivalently, the entire signal is delayed by seconds.
Since the entire signal is delayed by a constant amount, there is no
If the filter does not have linear phase, then different freq
components are delayed by different amounts, causing si
distortion.
8/11/2019 College 07
24/39
Take Home Me
ake Home Me
If it is desired to pass input signal components in a certai
range undistorted in both magnitude and phase, then the
function should exhibit a unity magnitude response and aresponse in the band of interest|HLP()|
HLP()
8/11/2019 College 07
25/39
Generalized Linear
eneralized Linear
Now consider the following system, where G() is real (i.e., n
From our previous discussion, the term e-j simply introdelay, that is, normally independent of frequency. Now,
If G() is positive, the phase term is ()=-, hence the system h
If G()
8/11/2019 College 07
26/39
Approximately Linear
pproximately Linear
Consider the following transfer functions
Note that above a certain frequency, say c, the magnitude is very cis most of the signal above this frequency is suppressed So if the ph
8/11/2019 College 07
27/39
Linear Phase F
inear Phase F
It is typically impossible to design a linear phase IIR filte
designing FIR filters with precise linear phase is very ea
Consider a causal FIR filter of length M+1 (order M)
This transfer function has linear phase, if its impulse response h[n]symmetric
or anti-symmetric
Nn
n zhzhhznhzH =
++++== ]2[]1[]0[][)(
210
MnnMhnh = 0],[][
8/11/2019 College 07
28/39
LINEARPHASE
A linear phase solution for the causal FIR filter function
( )j H e =
requires: where c and are con
is the amplitude response (zero-phase response), a real fu
( )( ) ( )j j cH e e H +=
for a real FIR the filter function has to be even:
which implies: or:( ) ( ( ) )( ) ( )j c j ce H e H + +=
8/11/2019 College 07
29/39
8/11/2019 College 07
30/39
LINEARPHASE
This linear phase filter description can be generalised in
for four type of FIR filters:
Type 1: symmetric sequence of odd length
Type 2: symmetric sequence of even length
Type 3: anti-symmetric sequence of odd length
Type 4: anti-symmetric sequence of even length
8/11/2019 College 07
31/39
LINEARPHASE
It is possible to generate other type of FIR transfer func
type transfer function. Take a given type I transfer func
From this function we can generate at least three types
/2
/2
/2 /2
( ) ( )
( ) ( 1) ( )
( ) ( 1) ( )
N
N
N N
E z z H z
F z H z
G z z H z
=
=
=
( )
( )
( )
E
F
G
with amplituderesponses:
8/11/2019 College 07
32/39
Linear Phase F
inear Phase F
There are four possible scenarios: filter length even or od
impulse response is either symmetric or antisymmetric
FIR II: even length, symmetric FIR I: odd le
FIR
antFIR IV: even length,
antisymmetricN
8/11/2019 College 07
33/39
FIR I and FIR I
IR I and FIR I
For symmetric coefficients, we can show that the frequency respons
following form:
FIR II (M is odd, the sequence is symmetric and of even length)
Note that this of the form H()=e-jG(), where =M/2, and G() is th
summation term) Output is delayed by M/2 samples!
FIR I (M is even, sequence is symmetric and of odd length)
( )
=
=
21
0
2
2cos][2)(
M
i
Mj
iM
iheH
G()
+=
2
1
2
2cos][2]
2[)(
MM
j iMihMheH
8/11/2019 College 07
34/39
FIR III and FIR IV
IR III and FIR IV
For antisymmetric sequences, we have h[n]=-h[M-n], which gives u
the summation expression:
FIR IV (M is odd, the sequence is antisymmetric and of even length
FIR III (M is even, the sequence is antisymmetric and of odd length
( )
=
=
+ 21
0
22
2sin][2)(
M
i
Mj
iM
iheH
=
=
+
12
1
22
2sin][2)(
M
i
Mj
iM
iheH
8/11/2019 College 07
35/39
8/11/2019 College 07
36/39
Zeros Poles of an FIR
eros Poles of an FIR
E
Zero at =/2
Zero at =
Zero at =7/10
not on unit circle!
8/11/2019 College 07
37/39
Zero Locat
ero Locat
Linear Phase inear Phase
For linear phase filters, the impulse response satisfies
We can make the following observations as facts
=
==M
n
nznMhzHnMhnh
0
)()(][][ )(= HzzH M
1. If z0 is a zero of H(z), so too is 1/z0=z0-1
2. Real zeros that are not on the unit circle, always occur in pairs
such as (1-z-1) and (1--1z-1), which is a direct consequence ofFact 1.
3. If the zero is complex, z0=ej, then its conjugate e-j is also
zero. But by the above statements, their symmetric
counterparts -1ej and -1e-j must also be zero. So, complex
zeros occur in quadruplets4. If M is odd (filter length is even), and symmetric (that is,
h[ ] h[M ]) th H( ) t h t 1
http://engineering.rowan.edu/8/11/2019 College 07
38/39
Digital Signal Processing, 2010 Robi Polikar, Rowan University
Linear Phase ilter
Zero Locations
1 1
Type 2Type 1
1 1
1 1
Type 4Type 3
1 1
Type 1 FIR filter: Either an even
number or no zeros at z = 1 and
z=-1
Type 2 FIR filter: Either an even
number or no zeros at z = 1, and
an odd number of zeros at z=-1Type 3 FIR filter: An odd number of
zeros at z = 1 and and z=-1
Type 4 FIR filter: An odd number of
zeros at z = 1, and either an even
number or no zeros at z=-1
The presence of zeros at z=1
leads to some limitations on the use of
these linear-phase transfer functions
for designing frequency-selective filters
http://users.rowan.edu/~polikar/RESEARCHhttp://engineering.rowan.edu/http://engineering.rowan.edu/8/11/2019 College 07
39/39
A Type 2 FIR filter cannot be used
to design a highpass filter since it
always has a zero at z=-1
A Type 3 FIR filter has zeros at
both z = 1 and z=-1, and hence
cannot be used to design either alowpass or a highpass or a
bandstop filter
A Type 4 FIR filter is not
appropriate to design a lowpass
filter due to the presence of a zero
at z = 1
Type 1 FIR filter has no such
restrictions and can be used to
design almost any type of filter
http://users.rowan.edu/~polikar/RESEARCHhttp://engineering.rowan.edu/