Professional Documents
Culture Documents
Fir and Iir Transfer Functions: Yn HKXNK Yz HZXZ
Fir and Iir Transfer Functions: Yn HKXNK Yz HZXZ
∞
the input – output relation of
an LTI system is:
y[n] = ∑ h[k ]x[n − k ]
k =−∞
∞
Where H ( z) = ∑
n =−∞
h[n]z − n
Y ( z)
so we can write the transfer function in the familiar form: H ( z ) =
X ( z)
recall the LTI FIR input – output relation: y[n] = ∑ h[k ]x[n − k ]
k = N1
for a causal FIR filter, 0 ≤ N1 ≤ N2 . Note that all poles are at the origin
of the z – plane and that the ROC is the entire z – plane except the origin.
FIR and IIR Transfer Functions
N M
recall the LTI IIR difference equation: ∑a
k =0
k y[n − k ] = ∑ bk x[n − k ]
k =0
∑ k
k =0
a z −k
Y ( z ) = ∑ k X ( z)
b z −k
k =0
Y ( z) ∑k
b z −k
Imaginary Part
pole at z = 1 0
7
u[ n ] = v[ − n ], y[ n ] = w[ − n ]
V (ω ) = H (ω ) X (ω ), W (ω ) = H (ω )U (ω )
U (ω ) = V * (ω ), Y (ω ) = W *(ω ) = H *(ω )U *(ω )
2
Y (ω ) = H *(ω ) V (ω ) = H *(ω ) H (ω ) X (ω ) = H (ω ) X (ω )
Digital Signal Processing, © 2007 Robi Polikar, Rowan University
In Matlab
 The function filtfilt() implements the zero-phase filtering scheme
filtfilt()
Zero-phase digital filtering
The resulting sequence has precisely zero-phase distortion and double the
filter order. filtfilt minimizes start-up and ending transients by matching initial
conditions, and works for both real and complex inputs.
ª Note that this phase characteristic is linear for all ω in [0 2π]. θ(ωo )
ª Recall that the phase delay at any given frequency ω0 was τ p ( ωo ) = − ωo
ª If we have linear phase, that is, θ(ω)=-αω, then the total delay at
any frequency ω0 is τ0 = -θ(ω0)/ ω0 = -αω0/ω0 = α
ª Note that this is identical to the group delay dθ(ω)/dω dθ (ω )
τ g (ω0 ) = −
evaluated at ω0 d ω ω =ω0
∟HLP(ω)
 Note that above a certain frequency, say ωc, the magnitude is very close to zero, that
is most of the signal above this frequency is suppressed. So, if the phase response
deviates from linearity above these frequencies, then signal is not distorted much,
since those frequencies are blocked anyway.
ª This transfer function has linear phase, if its impulse response h[n] is either
symmetric
h[n] = h[ M − n], 0 ≤ n ≤ M
or anti-symmetric
h[n] = − h[ M − n], 0 ≤ n ≤ M
so β must be 0 or π !
N
then we can write: H (ω ) = ± e H (e ) = ± ∑ h[n] ⋅ e
− jcω jω − jω ( c + n )
n =0
LINEAR PHASE FILTERS
N
the anti-symmetric case then is: H (−ω ) = ± ∑ h[l ] ⋅ e − jω ( c +l )
l =0
From this function we can generate at least three types of other functions:
E( z) = z − N /2
− H ( z) with amplitude E (ω ) = H (π − ω )
responses:
F ( z ) = (−1) N /2 H (− z ) F (ω ) = 1 − H (ω )
G ( z ) = z − N /2 − (−1) N /2 H (− z ) G (ω ) = 1 − H (π − ω )
ω ⎛ (M −1) 2
M
−j
2 ⎜ ⎛M ⎞ ⎞⎟
⎜ ∑
H (ω ) = 2e h[i ] cos⎜ − i ⎟ω
α ⎝ i =0 ⎝ 2 ⎠ ⎟⎠
ª Note that this of the form H(ω)=e-jαωG(ω), where α=M/2, and G(ω) is the real quantity (the
summation term)Î Output is delayed by M/2 samples!
 FIR I (M is even, sequence is symmetric and of odd length)
M
−j ω⎛ M M 2
⎛ M ⎞ ⎞⎟
2 ⎜ h[ ] + 2
H (ω ) = e
⎜ 2 ∑
h[i ] cos⎜ − i ⎟ω
⎝ i =1 ⎝ 2 ⎠ ⎟⎠
ª Again, this system has linear phase (the quantity inside the parenthesis is a real quantity) and
the phase delay is M/2 samples.
⎡ M π⎤
j ⎢ − ω + ⎥ ⎛ (M −1) 2
2 ⎦⎜ ⎛M ⎞ ⎞⎟
⎜ ∑
H (ω ) = 2e ⎣ 2 h[i ] sin ⎜ − i ⎟ω
⎝ i =0 ⎝ 2 ⎠ ⎟⎠
ª In both cases, the phase response is of the form θ(ω)=-(M/2) ω + π/2, hence generalized
linear phase. Again, in all of theses cases, the filter output is delayed by M/2 samples. Also,
for all cases, if G(ω)<0, an additional π term is added to the phase, which causes the samples
to be flipped.
Digital Signal Processing, © 2007 Robi Polikar, Rowan University
An Example – Matlab Demo
lin_phase_demo2.m
Digital Signal Processing, © 2007 Robi Polikar, Rowan University
Zeros & Poles of an FIR Filter
Example
Zero at ω=π/2
Zero at ω=π
Zero at ω=7π/10
not on unit circle!