Iinear Phase RIF & Synthesis
Iinear Phase RIF & Synthesis
1
Linear phase filters
In many applications such as digital communication, it is necessary to ensure that the
digital filter desired does not distort the phase of the input signal. One way to avoid any
phase distortion is ensure that the causal transfer function has a unity magnitude and a
linear phase in the frequency band of interest. To illustrate this case, we consider the
example bellow.
Let be the input signal to a digital filter with impulse response and let be the output
signal. The frequency response may be expressed as
2
Linear phase filters
We can see that the two frequencies are delayed in the same manner.
A FIR filter is said to have linear phase if the frequency response has the form
3
Linear phase FIR filters may be classified into 4 types depending upon whether h(k)
symmetric or antisymmetric and whether N is even or odd.
4
Linear phase filters
h(k)
Type I: Symmetric (β=0) , N even
N/2 is an integer
H ( z ) z h(0) z h(1) z 1
h( N2 ) h( N 1) z 1
h( N ) z 2
N N N N N
2 2 2 2
H ( z ) z h(0) z z
N
2
N
2
N
2
N N
h(1) z 2 1 z 2 1 h( N2 1) z 1 z1 h( N2 )
[ { } { } ]
𝑁 𝑁 𝑁 𝑁
{ }
𝑁 − −1 − +1
−
2 𝑧 2 +𝑧 2
𝑧2 +𝑧 2
𝑁 𝑧 − 1+ 𝑧 1 𝑁
𝐻 ( 𝑧 )=𝑧 2 h( 0) +2 h (1) +⋯ 2 h ( −1) + h( )
2 2 2 2 2
H (e j ) H ( z ) z e e
j
j N2
2 2
2
2h(0) cos N 2h(1) cos ( N 1) 2h( N 1) cos h( N )
2
j N2
N /2 a(0) h( N2 )
H (e j ) e a(k )cos(k ) a(k ) 2h( N2 k ) k 1,, N2
k 0
5
type I FIR filter can be : Low pass, High pass, Pass band or a
notch filter .
Examples: N=4
h(k)={0 2 7 2 0} h(k)={0 -2 5 -2 0}
10
12
8
10
6
8
4
6
2
4
0
2 0 0.2 0.4 0.6 0.8 1
0 0.2 0.4 0.6 0.8 1
0.95
0.98
0.9
0.85 0.96
0.8
0.94
0.75
0.7
0 0.5 1 0.92
0 0.2 0.4 0.6 0.8 1
6
Linear phase filters
Type II: Symmetric (β=0) , N odd
N/2 is not an integer
h(k)
0 1 N-1 N
1 2 N1
N 1
N
H ( z ) h(0) h(1) z h(2) z h( N2 1) z 2
h( N21) z 2
h( N ) z
(N-1)/2 (N+1)/2
h(0) z h(1) z 1
h( N21 ) z 1
N N N 1 1 N N
H ( z ) z 2 2 2
h( N2 1 ) z 2 2
h( N 1) z 2
h( N ) z 2
H ( z ) z h ( 0) z z
N
2
N
2
N
2
h(1) z 2 1 z
N N
2
1
h( N2 1 ) z 2 z 2
1 1
N z 2 z 2
N N
z 2 1 z 2 1
N N
z 2 z 2
1 1
H ( z ) z 2
2 h ( 0) 2h(1)
N 1
2h( 2 )
2 2 2
H (e j ) H ( z ) z e e j
j N2
2 2
2h(0) cos N 2h(1) cos ( N 1) 2h( N 1 ) cos 1
2 2
( N 1)/2
j N2
H (e j ) e b(k )cos(k 12 ) ) b(k ) 2h( N21 k ) k 1,, N21
k 1
7
Linear phase filters
type I FIR filter can be : Low pass, High pass , Pass band or a
stop-band
Exp : N=5
h(k)={ 0 0,08 0,34 0,34 08 0} h(k)={0.10 -0,3 0.23 0.23 -0,3 0,1}
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
8
Zeros location
𝑁 𝑁
𝐻 ( 𝑧 ) =∑ h ( 𝑘) 𝑧
In the symmetric cases (Types 1 and 2):
−𝑘
= ∑ h ( 𝑁 − 𝑘 ) 𝑧−
𝑘=0 𝑘=0
𝑁 𝑁
Using yealds : 𝐻 ( 𝑧 ) =∑ h ( 𝑛 ) 𝑧 𝑛− 𝑁
=𝑧 −𝑁
∑ h (𝑛 ) 𝑧 𝑛= 𝑧 − 𝑁 𝐻 ( 𝑧 − 1
𝑛=0 𝑛 =0
Then if is a zero for , then is also a zero for
In addition since is real, if is a zero for , then is also a zero for which implies that is also
a zero of
If there is a zero on the unit circle, then . It means that zeros on the unit circle comes in
pairs as:
9
Zeros location
Exemple I: FIR Symmetric filter, N even
1
Imaginary Part
z2= 0.3090 - 0.9511i
zplane(h) 4
z3=-0.8090 + 0.5878i 0
[H
w]=freqz(h,1,1024);
z4=-0.8090 - 0.5878i -0.5
figure
plot(w/pi,abs(H)) -1
figure 5 -1 -0.5 0
Real Part
0.5 1
plot(w/pi,angle(H)) 0.6
roots(h) 4
0.4
0.2
3
0
2
-0.2
1 -0.4
-0.6
0
0 0.2 0.4 0.6 0.8 1
-0.8
0 0.2 0.4 0.6 0.8 1
(,) π 10
Linear phase filters
Exemple II: FIR Symmetric filter, N odd
1
N=5
0.5000 + 0.8660i = 1. exp(i0.3333π) 0.5
h=[1 1 1 1 1 1];
Imaginary Part
zplane(h) 0.5000 - 0.8660i= 1. exp(-i0.3333 π) 5
0
[H w]=freqz(h,1,1024); -1.0000 + 0.0000i=1.exp(i π)
figure -0.5000 + 0.8660i=1.exp(i0.6667 π) -0.5
plot(w/pi,abs(H)) -0.5000 - 0.8660i=1.exp(-i0.6667 π)
figure -1
plot(w/pi,angle(H)) -1 -0.5 0 0.5 1
roots(h) 6
Real Part
0.4
5 0.2
4 0
-0.2
3
-0.4
2
-0.6
1
-0.8
0
0 0.2 0.4 0.6 0.8 1 -1
0 0.2 0.4 0.6 0.8 1
11
Linear phase filters
Type III: Antisymmetric () , N even
h(k ) h( N k ) h( N / 2) 0 h(k)
2
h(0) z N2 z N2 h(1) z N2 1 z N2 1 h( N 1) z 1 z1
z 2 z 2
N N
z 2 1 z 2 1
N N
1 1
N 1) z z
N
H ( z ) z 2
2 jh(0) 2 j h (1) 2 jh ( 2
2 j 2 j 2 j
j N2
e j 2 2h(0) sin N2 2h(1) sin ( N2 1) 2h( N2 1) sin
H (e j ) H ( z ) z e e j
N /2
H (e ) e j j ( N2 2 )
a(k )sin(k ) a(k ) 2h( N2 k ) k 1,, N2
k 0
12
Linear phase filters
Exemple: Phase Response
4 2
1
N=4 3.5
1.5
zplane(h)
Imaginary Part
0.5
2.5
Phase (radians)
4 0
[H w]=freqz(h,1,1024); 0
2
-0.5
figure -0.5
1.5
-1
plot(w/pi,abs(H)) 1
-1.5
figure -1 0.5
-2
-1 -0.5 0 0.5 1
plot(w/pi,angle(H)) Real Part
0
0 0.2 0.4 0.6 0.8 1 -2.5
roots(h) -3
0 0.2 0.4 0.6 0.8 1
Normalized Frequency ( rad/sample)
4
N=4 3
0
0 0.2 0.4 0.6 0.8 1
13
Linear phase filters
Type II: Antisymmetric () , N odd
h(k ) h( N k )
h(k)
H ( z ) h(0) h(1) z 1 h(2) z 2 h( N2 1) z h( N21) z
N1 N 1
2 2
h( N ) z N 0 1 N-1 N
(N-1)/2 (N+1)/2
H ( z ) z h(0) z h(1) z 1
h( N2 1 ) z h( N21 ) z h( N 1) z 1
h( N ) z 2
N N N 1 1 N N
2 2 2 2 2 2
H ( z ) z h ( 0 ) z z
N
2
N
2
N
2
h(1) z 2 1 z
N N
2
1
h( N2 1 ) z 2 z 2
1 1
N z 2 z 2
N N
z 2 1 z
N N
2
1
z 2 z 2
1 1
H ( z ) z 2
2 jh(0) 2 jh(1)
N 1
2 jh( 2 )
2 j 2j 2 j
H (e j ) H ( z ) z e e j
j ( N2 2 )
2 2
2h(0) sin N 2h(1) sin ( N 1) 2h( N 1 ) sin 1
2 2
( N 1)/2
H (e j ) e j ( N2 2 )
b(k )sin(k 12 ) ) b(k ) 2h( N21 k ) k 1,, N21
k 1
14
Linear phase filters
Example:
N=5
h=[1 1 1 -1 -1 -1]; 5 2
Phase Response
zplane(h) 1 2
[H w]=freqz(h,1,1024); 4 0
Phase (radians)
0.5
Imaginary Part
figure 3 -2
5
plot(w/pi,abs(H)) 0
-4
figure -0.5
2
plot(w/pi,angle(H)) 2 1 -6
roots(h) -1
-8
-1 -0.5 0 0.5 1 0 0 0.5 1
0 0.2 0.4 0.6 0.8 1
Real Part Normalized Frequency ( rad/sample)
0.8
N=3 0.6
0.2
0
0 0.2 0.4 0.6 0.8 1
15
Synthesis (design) of FIR
Filter template specifications filters
the pass band here id between 0 and ωp
the transition band is betwwen ωp and ωs
the stop band is between ωs et π
Pass band ripples are noted by 1
stop band rippels noted 2
ripple rate within the
Rp
bandwidth is
1 1 1+1
R p dB 20 log10 1-1
1 1
Inverse DTFT:
17
time shift + window view
DTFT
18
The transition bandwidth Δω is equal to half of We main lobe
The attenuation is the amplitude of the first side lobe.
19
Usual windows
20
Cliquez sur l'icône pour ajouter une image
21
22
Kaiser window
In the previous windows, the transition band Δω is linked to the order of the filter;
if M increases, Δω becomes small. However, the attenuation is independent of the
filter length. It depends only on the type of window. The Kaiser window is the
most elaborate window for FIR filters. The shape of this form is linked to the
desired ripple. It is given by:
( √ ( ))
2
𝑘 𝑘
𝐼0 2 𝛽 −
𝑁 𝑁 −1
𝑤 ( 𝑘 )= 𝑘=0 , 1, … , 𝑁
𝐼0 ( 𝛽)
( ( ) )
𝑥 𝑘 2
∞
2
𝐼 0 ( 𝑥 ) =1 + ∑
is the Bessel function
𝑘=1 𝑘!
{
¿ 0 .1102 ( 𝐴 −8 . 7 ) 𝐴 >50 𝑑𝐵
𝛽= ¿ 0 .5842 ( 𝐴 − 21 )0 . 4 + 0 .07886 ( 𝐴 −21 ) 21< 𝐴 <50
¿ 0 𝐴 <21
take the smallest value between and . The order of the filter is
23
Synthesis (design) of FIR
filters
2. Frequency sampling method
The principle of the frequency sampling method is based on selecting N+1 samples
of the desired frequency response for specific frequencies
Then determining the coefficients of the impulse response by applying the
1
0.8
0.6
𝑁 𝑗 2 𝜋 𝑛𝑘
1
0.4 h ( 𝑛 ) = ∑ 𝐻 (𝑘)𝑒 𝑁
𝑁 𝑛=0
0.2
0
0 0.5 1 1.5 2
24