DSP Compiled All
DSP Compiled All
pdf
Ch-1 (2) Impulse Invariant Method.pdf
Ch-1 (3) BLT Method.pdf
Ch-1 (4) Butterworth Filter Design.pdf
Ch-1 (5) Butterworth Filter Design by IIM.pdf
Ch-1 (6) Butterworth Filter Design by BLT.pdf
Ch-2 (1) FIR Filters-Concept of Linear Phase.pdf
Ch-2 (2) FIR Filters- POLEs ZEROs.pdf
Ch-2 (3) FIR Filter Design-Windowing Method.pdf
Ch-2 (4) FIR Filter Design-FSM 9.35.54 PM.pdf
Ch-3 (1) Multi Rate Signal Processing.pdf
Ch-4 (1) Adaptive-Filter.pdf
Introducton to Digital Filter
@
Sardar Patel Institute of
Technology, Andheri, Mumbai
Kiran Tulshiram Vasumati TALELE
* DT System *
x[n] y[n]
Ex. Digital Filter
(1) h[n]
x[n] (2) H[z] y[n]
(3) DE
(4) RD
(5) PZ
ZT IZT
(6) FR
X(z) Y(z)
H(z)
DE H(z)
ZT h[n]
Z=ejw
1. Write H(z) in –ve H(ejw) OR
Powers of Z RD H(w)
2. Let H(z) = Y(z)/X(z)
3. Cross multiply
4. Take Inverse ZT
5
(*) What is Magnitude Response ?
Ans :
Where,
Magnitude = (Re al ) + (Im aginary )
2 2
Where, −1 Im aginary
tan Re al When Re al 0
Angle =
−1 Im aginary
180 + tan When Re al 0
Re al
LPF HPF
PB SB SB PB
BPF BSF/BRF
SB PB SB PB SB PB
Kiran TALELE
9987030881
ktvtalele@spit.ac.in
www.facebook.com/Kiran-Talele-1711929555720263
INPUT OUTPUT
Analog Filter
x(t) y(t)
Sampling Reconstruction
x[n] y[n]
Digital Filter
1. Programmable
2. Stable
9
Kiran TALELE 9987030881 talelesir@gmail.com 9
X(s)=1 Analog Filter Y(s)=H(s)
LT LT
H(s) y(t)=h(t)
x(t)=(t)
10
Kiran TALELE 9987030881 talelesir@gmail.com 10
•Impulse Invariant Method ALGO
H(s) → h(t) → h[n] → H(z)
Eq-1
By Inverse Laplace Transform,
u(t)
-a
Put t = nT
By Z-Transform,
Digital POLE
Eq-2
Solution :
In I I M,
By equating we get,
Analog Filter
Frequency
(In radians/sec)
Digital Filter
Frequency
Frequency
(In radians)
(In Hz)
IIM
Analog LPF
PB SB
− − c c +
0
Digital LPF PB SB
− − c 0 c
Given,
Digital Filter design by IIM
Cutoff Frequency = 0.2π
Sampling Frequency Fs = 1000 Hz
c = 628 r/s
Given,
Digital Filter design by IIM
Cutoff Frequency = 100 Hz
Sampling Frequency Fs = 1000 Hz
Find Analog Cutoff Frequency ?
Sampling
Frequency
Digital (In Hz)
Where (1) Fs = 1000 Hz Frequency
(NO Units)
Now, c = wc Fs
c = 0.2π 1000
c = 200 π r/s
c = 628 r/s
Frequency
(In Hz)
Sampling
Frequency
Digital (In Hz)
Where (1) Fs = 1000 Hz Frequency
(NO Units)
Now, c = wc Fs
c = 0.2π 1000
c = 200 π r/s
c = 628 r/s
σ =0
σ<0 σ>0
------------S-Plane---------------- ------------Z-Plane-----------------
=0 Marginally
Stable
------------S-Plane---------------- ------------Z-Plane-----------------
r<1
<0
INSIDE
the Unit Circle
Stable
LEFTSIDE
Of S-Plane
>0
r>1
Un-Stable
T j T
Z1 = e e Z 2 = e T e j T e j 2
Put e j 2 = 1
T j T
Z2 = e e
Kiran
KiranTALELE 9987030881
TALELE 99 870talelesir@gmail.com
30 881 talelesir@gmail.com
2626
Summary :-
Here, Analog POLESs S 1 ≠ S2
But the corresponding Digital POLEs Z1 = Z2
That means both S1 and S2 are mapped at the
same location in z-plane.
S1
z1
S-plane Z-plane
S2
S1
z1
S-plane Z-plane
w
Digital W=T
Filter Linear
0
0
Analog
Filter
0
Digital Filter
Frequency
(In radians) Frequency
(In Hz)
Kiran TALELE
9987030881
ktvtalele@spit.ac.in
www.facebook.com/Kiran-Talele-1711929555720263
Kiran TALELE
99870 30 881
Derivation of BLT Equation
Consider Analog filter with transfer function
1
H (s) = Eq-1
s +1
• To find Differential Equation,
Y (s) 1 y’(t) + y(t) = x(t)
=
X (s) s +1 y’(t) = x(t) - y(t)
• Cross Multiply,
y’(nt) = x(nt) - y(nt)
S Y(s) + Y(s) = X(s)
• By Inverse LT, y’(n) = x(n) - y(n)
( n −1) T
y [nT ] = y [(n − 1) T ] +
T
2
y [nT ] +
'
y ' [(n − 1) T ]
y [n] = y [n − 1] +
T '
2
y [n] + y [n − 1]
'
Kiran TALELE 9987030881 talelesir@gmail.com 5
5
y [n] = y [n − 1] +
T
2
y [ n] +
'
y ' [n − 1]
y [n] = y [n − 1] +
T x[n] − y[n] x[n −1] − y[n −1]
+
2
−1
Y [ z] = z Y [ z ] +
T
X [ z] − Y [ z ] + z −1 X [ z] − z −1 Y [ z]
2
−1 T T T −1 T −1
Y [ z] = z Y [ z ] + X [ z] − Y [ z] + z X [ z] − z Y [ z]
2 2 2 2
−1 T −1 T T −1 T
Y ( z ) 1 − z + +z = X ( z) + z
2 2 2 2
1 1
H ( z) = =
(1 − z −1 ) 2 ( z − 1)
1 + 1 +
T
( 1 + z −1 ) T ( z + 1)
2
s-plane z-plane
Solution :
In BLT, The relation between Analog filter POLE
and Digital filter POLE is given by,
Put S = σ+j
Let σ = 0 r=1
S= j
T
w = 2 tan −1
2 B LT
Analog LPF
− − c c +
0
Digital LPF
− − c 0 c
Kiran TALELE 9987030881 talelesir@gmail.com 14
Q. A Digital filter is required to be designed with cutoff
frequency of 100Hz and sampling frequency of 1000
Hz using BLT Method.
What is Analog Domain Cutoff frequency ?.
Given,
Digital Filter BLT
Cutoff Frequency = 100 Hz
Sampling Frequency Fs = 1000 Hz
2 w
= tan
T 2
Where (1)
−1 T
w = 2 tan
2
−1 T
w = 2 tan
2
0
0
Analog
Filter
0
Digital W=T
Filter Linear
0
0
Analog
Filter
0
(2) The relation between Analog freq. (2) The relation between Analog
and Digital freq. is given by, freq. and Digital freq. is given by,
W= T
W = 2 tan −1
Fs 2
(3) Frequency relation doesn’t give one (3) Frequency relation gives one to
to one mapping between analog filter one mapping between analog
freq. and digital filter freq. W which filter freq. and digital filter freq.
reflects the effect of aliasing due to W
sampling.
(4). Due to aliasing, HPF or BPF with cut (4). BLT method is suitable for all
off frequency of analog filter c types of filter design.
greater than Tcan . not be designed using
impulse invariant method 25
Stay Connected……..
Kiran TALELE
9987030881
ktvtalele@spit.ac.in
www.facebook.com/Kiran-Talele-1711929555720263
1
H (j) = 1.0
2N 0.707
Ω
1+ PB SB
Ω
c
2+ 2 k
j Now,
Sk = e 2
1
H LP ( s) =
(s − s0 )
1
H (s) =
s +1
Kiran 9987030881
TALELE
Kiran TALELE talelesir@gmail.com
9987030881 66
talelesir@gmail.com
Example -2 : LPF c = 1 r/s N=2
ZEROS : Analog Butterworth LPF has NO ZEROS
POLES : N +1+ 2 k
j
Sk = c e 2N
To find H(s)
3+ 2 k
j
Sk = e 4
H LP ( s ) =
1
(s − s0 )(s − s1 )
3
j 1
K = 0, S0 = e 4 Hˆ ( s) =
S 2 + 1.414 S + 1
3
− j
K = 1, S1 = e 4
Kiran 9987030881
TALELE
Kiran TALELE talelesir@gmail.com
9987030881 77
talelesir@gmail.com
Example -3 : LPF c = 1 r/s N=3
ZEROS : Analog Butterworth LPF has NO ZEROS
POLES :
N +1+ 2 k
j
To find H(s)
Sk = c e 2N
4+ 2 k
j
Sk = e 6
2
j
k = 0, S 0 = e 3
k = 1, S1 = e − j = − 1
2
− j
k = 2, S 0 = e 3
To find H(s)
Where
a0 = 1
a1 = 2.613
a2 = 3.414
a3 = 1
where a0 = aN == 1
(k − 1)
cos
ak = 2N a
k k −1
sin
2N
Design Specifications :
Ap : Attenuation in PB
As : Attenuation in SB
p : Pass Band Freq.
s : Stop Band Freq.
pass transition stop
band band band
0 0
0.5p s
0.75
Ap = 20 log
1+
Ωp
Ωc
( ) 2N
Ω p 2N
Ap = 10 log 1 + Ω
c
Ap Ω p 2N
= log 1 + Ω
c
10
Ap 2N
10 10
= 1+
Ω p
Ωc
2N
Ω p
Ap
10 10
−1 = I
Ωc
Kiran TALELE 9987030881 talelesir@gmail.com 14
(2) To find As
At Ω = Ωs
1
H (js ) =
2N
Ωs
1+
Ω
c
As = 0 - 20 log
( )
1
2N
1+
Ωs
Ωc
As = 20 log
1+
Ωs
Ωc
( ) 2N
(
As ) Ωs
2N
10 10
= 1+ Ω
c
2N
As
−1 = Ω s
10 10
Ωc
II
Kiran TALELE 9987030881 talelesir@gmail.com 16
Dividing equation II by I we get,
( )
As
10 10
−1
Ap
= Ωs 2N
Ωp
10 10
−1
10 10 − 1
As
Ωs
log Ap = 2N log
10 10 − 1 Ωp
10 As 10 − 1
log Ap
10 10 − 1
for HPF N =
Ωp
2 log
Ωs
Ωc =
p s
1 = 1
Ap 2N
As
10 − 1
2N
10 10 10 − 1
1
H (j) =
2N
Ω
1+
Ω
c
Ap = 20 log
1+( )
Ωp
Ωc
2N
Ap Ωp
2N
= log
Ωc
1+
10
Ωc 1
=
Ωp 1
Ap 2N
10
10 − 1
Ωp
Ωc =
1
Ap 2N
10 − 1
10
As = 20 log
1+
Ωs
Ωc
( ) 2N
Ωs As10 2N
= 10 − 1
Ωc
Ωc 1
=
Ωp 1
As 2N
10 10 − 1
Ωs
Ωc =
1
As 2N
10 10 − 1
1.0 1.0
PB SB
PB SB
0 1 0 C
LPF
1.0 1.0
SB PB
PB SB
0
0 0.5
1
0.75
0 C
LPF
100
H(s) = 2
S + 10S + 100
1
H ( s) = 2
10 10
+ +1
S S
S2
H(s) = 2
S + 10S + 100
100 S2
HBPF(s) = 4
S +10 S3 + 20100S2 + 105 S + 108
1
HBSF(s) = 2
S + S +1 S=
10 S
=
10 S
S +10000
2
S2 + 102
(1) LT { (t) } == 1 1
S
1
(2) LT { u(t) } == S
(3) LT e u(t) ==
− at
1
S +a
Given ➔ Ap As p s
Given Ap As p and s
LPF HPF
38
Kiran TALELE 9987030881 talelesir@gmail.com 3838
(2) Calculate Normalized LPF Transfer Function
39
Kiran TALELE 9987030881 talelesir@gmail.com 3939
Method-2 to find Normalized H(s) for LPF:
where a0 = aN == 1
(k − 1)
cos
ak = 2N a
k k −1
sin
2N
p
c =
( 10 )
1
Ap / 10
−1 2N
41
Kiran TALELE 9987030881 talelesir@gmail.com 4141
HW-Q1: Magnitude response of Analog LPF is given
below, determine Order and Cutoff Frequency of Filter.
Where Ap = 0.92 dB As = 40 dB
Ωp = 10 rad/sec Ωs = 20 rad/sec
42
Kiran TALELE 9987030881 talelesir@gmail.com 4242
ANSWER:
N= 8
Ωc = 10.9528 rad/sec
43
Kiran TALELE 9987030881 talelesir@gmail.com 4343
HW-Q2 Given
Ap = 0.91 dB As = 13.97 dB
p = 2.00 rad/sec p = 4.828 rad/sec
Design Analog Butterworth Filter.
ANSWER:
8.2592
H ( s) =
s 2 + 4.0641 s + 8.2592
ANSWER :
Order N = 7
Transition band
Peak ripple
value
Passband
edge Stopband edge
frequency frequency
0 0.5 0.75
Design Specifications :
Ap : Attenuation in PB
As : Attenuation in SB
Wp : Pass Band Freq.
Ws : Stop Band Freq.
Fs : Sampling Freq.
Ap As wp ws Fs p
wp =
s
ws =
Fs Fs
Ap As p s
Step-1 : Design
Analog Butterworth
Filter Order N
Filter
Normalized LPF
De-normalized H(s)
h(t)
Step-2 : Design
h(n)
DIgital Butterworth
Filter using IIM
H(z)
• DIGITAL Butterworth Filter Design using BLT
Ap As wp ws Fs
2 wp
p = tan
Ap As p s T 2
Step-1 : Design
Analog Butterworth 2 w
Filter Order N
Filter s = tan s
T 2
Normalized LPF
De-normalized H(s)
Step-2 : Design
H ( z ) = H ( s ) s = 2 ( z −1)
DIgital Butterworth
Filter using BLT T ( z +1)
H(z)
Laplace Transform TABLE
(1) LT { (t) } == 1
1
(2) LT { u(t) } == S
(3) LT e u(t) ==
− at
1
S +a
z 2 − r z cos(w)
z 2 − 2 r z cos(w) + r 2
rz sin( w)
z 2 − 2 r z cos(w) + r 2
Kiran TALELE
9987030881
ktvtalele@spit.ac.in
www.facebook.com/Kiran-Talele-1711929555720263
Given ➔ Ap As wp ws Fs p s
wp = ws =
Fs Fs
Step-1 Ap As p s
Design
Analog Filter Order N
Butterworth
Filter H(s) Normalized LPF
De-normalized H(s)
Step-2 h(t)
Design
Digital h(n)
Butterworth
Filter H(z) H(z)
LPF HPF
5
Kiran TALELE 9987030881 talelesir@gmail.com 55
(3) Calculate Normalized LPF Transfer Function
6
Kiran TALELE 9987030881 talelesir@gmail.com 66
Method-2 to find Normalized H(s) for LPF:
where a0 = aN == 1
(k − 1)
cos
ak = 2N a
k k −1
sin
2N
p
c =
( 10 )
1
Ap / 10
−1 2N
8
Kiran TALELE 9987030881 talelesir@gmail.com 88
Step-2 : Design Digital Butterworth Filter
To Find H(z)
(1) Find h(t) by Inverse LT
(2) Find h[n] by Sampling
(3) Find H(z) by ZT
9
Kiran TALELE 9987030881 talelesir@gmail.com 99
HW - Q1 : An analog domain filter has a
transfer function as given below. Analog
filter is to be converted into digital filter so
that its impulse response characteristics are
retained.
The sampling frequency is 100 Hz.
Find the transfer function H(z).
b
H ( s) =
( s + a) 2 + b 2
Ap = 0.91 dB As = 13.97 dB
p = 2.00 rad/sec p = 4.828 rad/sec
(1) LT { (t) } == 1
1
(2) LT { u(t) } == S
(3) LT e u(t) ==
− at
1
S +a
z 2 − r z cos(w)
z 2 − 2 r z cos(w) + r 2
rz sin( w)
z 2 − 2 r z cos(w) + r 2
Kiran TALELE
9987030881
ktvtalele@spit.ac.in
www.facebook.com/Kiran-Talele-1711929555720263
Given ➔ Ap As wp ws Fs 2 wp
p = tan
Step-1 T 2
Design
Ap As p s 2 ws
s = 2 tan ws
Analog s = T tan 2
Butterworth Filter Order N T 2
Filter H(s)
Normalized LPF
De-normalized H(s)
Step-2
Design
Digital H ( z ) = H ( s ) s = 2 ( z −1)
Butterworth T ( z +1)
Filter H(z) H(z)
LPF HPF
5
Kiran TALELE 9987030881 talelesir@gmail.com 55
(3) Calculate Normalized LPF Transfer Function
6
Kiran TALELE 9987030881 talelesir@gmail.com 66
Method-2 to find Normalized H(s) for LPF:
1
H ( s) =
a0 + a1 S 1 + ........ + ..a N S N
where a0 = aN == 1
(k − 1)
cos
ak = 2N a
k k −1
sin
2N
p
c =
( 10 )
1
Ap / 10
−1 2N
8
Kiran TALELE 9987030881 talelesir@gmail.com 88
Step-2 : Design Digital Butterworth Filter
9
Kiran TALELE 9987030881 talelesir@gmail.com 99
Example-1 : Digital Butterworth is required
to meet the following specifications
•
11
Kiran TALELE 9987030881 talelesir@gmail.com 11
Solution :
• Ap = 1 dB As = 40 dB
w p = 2 ( 4 KHz
24 KHz ) ==
3 radian
ws = 2 ( 6 KHz
24 KHz ) ==
2 radian
12
Kiran TALELE 9987030881 talelesir@gmail.com 12
(i) To find Ωp : (ii) To find Ωs :
2 wp 2 ws
p = tan s = tan
T 2 T 2
tan 3
2
p =
1 2
24000
13
Kiran TALELE 9987030881 talelesir@gmail.com 13
(2) Calculate Filter Order N
N = 9.61
Let N = 10
14
Kiran TALELE 9987030881 talelesir@gmail.com 14
(3) Calculate Analog Cutoff Freq. c
p
c =
( 10 )
1
Ap / 10
−1 2N
Ωc = 29649.7 rad/sec
15
Kiran TALELE 9987030881 talelesir@gmail.com 15
(4) Calculate Digital Cutoff Freq. wc
2 C
C = tan
T 2
CT C
= tan 2
2
−1 CT
Wc = 2 tan
2
Put Ωc = 29649.7 rad/sec
T = 1 / 24000 sec
Wc = 1.106 rad
16
Kiran TALELE 9987030881 talelesir@gmail.com 16
Example-2 : Design a first order High Pass DT
Butterworth filter whose cutoff frequency is
1 kHz at the sampling rate of 104 sample/sec.
Solution :
Given Order N = 1
HPF Butterworth filter
Cutoff frequency = 1 KHz
Sampling rate = 104 Hz.
2+ 2 k
j
Sk = e 2
K = 0, S0 = -1
Now, 1 1
H LP ( s) = H (s) =
(s − s0 ) s +1
2 C 2 0.2
C = tan =
tan = 6498.39 rad / sec
Ts 2 Ts 2
1
H(s) =
6498.38
+1
S
s
H HP ( s) =
s + 6498.39
Kiran
KiranTALELE
TALELE9987030881 talelesir@gmail.com
9987030881 talelesir@gmail.com 19
19
STEP-2 Design Digital Butterworth HPF Filter
•By BLT transformation,
H ( z ) = H ( s) s = 2( z −1)
T ( z +1)
21
Kiran TALELE 9987030881 talelesir@gmail.com 21
s+a
Solution : Let H ( s ) =
( s + a) 2 + b 2
where b is analog resonant frequency.
By comparing we get,
Analog Resonant Frequency b = 4.
Let r = b = 4
22
Kiran TALELE 9987030881 talelesir@gmail.com 22
2 w
r = tan r
T 2
2 / 2
4= tan
T 2
By solving we get T = 0.5 sec
H ( z ) = H ( s)
2 ( z −1)
s=
T ( z +1)
Put T = 0.5 sec
23
Kiran TALELE 9987030881 talelesir@gmail.com 23
s + 0.1
Now, H ( s) =
( s + 0.1) 2 + 16
s + 0.1
H ( z) =
( s + 0.1) 2 + 16
4 ( z −1)
s=
( z +1)
3
|H (ejw) | 0.2 for w .
4
21-11-2011 TALELE 25
Kiran TALELE 9987030881 talelesir@gmail.com 25
0.9 | H(ejw) | 1 ; 0 w ≤ 0.5
| H(ejw) | 0.2 ; 0.75 w ≤
1.0
0
0.9 20log(0.9)
0.2
20log(0.2)
0 0
0.50.5 0.75
0.75
0 0.5 0.75
26
Kiran TALELE 9987030881 talelesir@gmail.com 26
(i) Ap = 0 – 20 log ( 0.9)
= 0.9151 dB
27
Kiran TALELE 9987030881 talelesir@gmail.com 27
STEP-1 Design Analog Butterworth LPF Filter
(1) Calculate Ω p , Ω s
2 w
In BLT, = tan
T 2
2 wp 2 w
(i ) p =tan (ii) s = tan s
T 2 T 2
Assume T = 1 Sec
0.5
p = 2 tan
2
p = 2 rad / sec
21-11-2011 TALELE 28
Kiran TALELE 9987030881 talelesir@gmail.com 28
(2) Calculate Filter Order
N = 1.966 2
29
Kiran TALELE 9987030881 talelesir@gmail.com 29
• (1) Calculate Normalized LPF
LPF c = 1 rad/sec N=2
ZEROS : NO ZEROs
POLES : N +1+ 2 k
j
Sk = c e 2N
3+ 2 k
j
Sk = e 4
3
j
k = 0, S 0 = e 4
3
− j
k = 1, S1 = e 4
30
Kiran TALELE 9987030881 talelesir@gmail.com 30
1
H LP ( s) =
(s − s0 )(s − s1 )
1
Hˆ ( s) =
S2 + 2S +1
ˆ ( s)
H ( s) = H
S
where, S=
c
p
c = == 2.8478
(10 )
1
Ap / 10
−1 2N
1
H (s) = 2
s s
2.8738 + 2 2.8738 + 1
8.2592
H ( s) =
s 2 + 4.0641 s + 8.2592
21-11-2011 TALELE 32
Kiran TALELE 9987030881 talelesir@gmail.com 32
STEP – 2 Design a Digital Butterworth LPF
H ( z ) = H ( s)
2 ( z −1)
s=
T ( z +1)
8.2592
H ( z) =
2
2( z − 1) 2( z − 1)
( z + 1) + 4.0641 ( z + 1) + 8.2592
8.2592( z + 1) 2
H ( z) =
2( z − 1) 2 + 8.182 ( z − 1) ( z + 1) + 8.2592 ( z + 1) 2
21-11-2011 TALELE 33
Kiran TALELE 9987030881 talelesir@gmail.com 33
Example-5 Design and realize a Low Pass Filter using
the Bilinear Transformation Method to satisfy the
following characteristics.
(i) Monotonic Stop Band and Pass Band.
(ii) –3dB cutoff frequency of 0.5
(iii) Stop Band Attenuation of 15 dB at 0.75
Solution :
Monotonic response means Butterworth filter.
Kiran TALELE
9987030881
ktvtalele@spit.ac.in
www.facebook.com/Kiran-Talele-1711929555720263
h [ n] = 1 2
3 4
H(z) = 1 + 2 z −1 + 3 z −2 + 4 z −3
1 + 2 z −1 + 3 z −2 + 4 z −3
H(z) =
1
z 3 (1 + 2 z −1 + 3 z −2 + 4 z −3 )
H(z) = 3
z ( 1 )
H(e jw ) = e− j 2 3e j 2 + 2e j + 1 + 2e− j + 3e− j 2
H(e jw ) = e− j 2 3(e j 2
+ e− j 2 ) + 2( e j + e− j ) + 1
H(e jw ) = e− j 2 6 cos(2) + 4 cos() + 1
Frequency
Response
Real Part of
H(w)
Frequency
Phase
Response
Response
Ф(w) Hr(w)
− 2 w if Re{H ( w)} 0
( w) =
− 2w + if Re{H ( w)} 0
Sr. Freq. Phase
NO W
0.8
1 0 0
0.6 2 0.1 – 0.2
0.4 3 0.2 – 0.4
0.2
w 4 0.3 – 0.6
0.2 0.4 0.6 0.8 5 0.4 0.2
0 6 0.5 0
–0.2
7 0.6 −0.2
8 0.7 −0.4
–0.4 9 0.8 −0.6
–0.6
10 0.9 0.2
Linear 11 0
–0.8
-
0 otherwise PB SB
0 0.5
| H(w) | = 1 for 0 w 0.5π
= −2 w
w (Hence, Linear Phase)
y[n] = x[n-2]
PB SB
|H(w)|= 1 for 0 w 0.5
0 0.5
2
= −3 w (Non - Linear Phase )
− ( w)
Phase Delay g = == 1
w
− d ( w)
Group Delay g = == 1
dw
• Group Delay : − d N −1
=
dw 2
Symmetric OR Antisymmetric
− jw
e | w | wc
H (e ) =
jw
0 wc w
By iDTFT,
y[n] = x[n – ] o/p of filter
h[n]= { 1, 2, 2, 1 } h[n]={3, 2, 1, 1, 2}
Kiran TALELE
9987030881
ktvtalele@spit.ac.in
www.facebook.com/Kiran-Talele-1711929555720263
1
(z + 1) Z − (z − 2)
H (z) = 2
3
Z
Solution :
• Linear Phase FIR filter Order = 4
Let No of POLES = 4
• Let No of ZEROS = 4
• N-1 = 4
• N= 5
-2 -0.5 0.5 2
4 POLES
0.5 2 2 e-j/4
4 POLES
4 POLES
4 POLES 4 POLES
4 POLES
4 POLES
| H(e jw ) | 1 0 w wc
H(e ) =
jw
0 Otherwise
H(e ) 0 for 0 w w c
jw
PB SB
0 wc H(e jw ) 0 at w = 0
PB SB Put z = ejw
0 wc At w = 0 z=1
H(z) z =1
= 0
Solution :
Linear Phase LPF
Order = 3
1
For ZERO at z1 = 0.5, There exists ZERO at == 2
z1
Solution :
N –1 = 3 So N = 4 ( Even )
1 1
For z0 = , == 2
2 z0
H ( z) = 2 2
3
z
7 −1 7 − 2 −3
H ( z) = 1 − z + z − z
2 2
Solution :
1 1
z0 = =2
2 z0
Minimum order is 3.
H ( 4) = 1
2
3
H =1
4
Put z = ejw ,
3 1
| H ( w) |= 2 h0 sin w − 2 h1 sin w
2 2
28
Kiran TALELE 9987030881 talelesir@gmail.com 28
Stay Connected……..
Kiran TALELE
9987030881
ktvtalele@spit.ac.in
www.facebook.com/Kiran-Talele-1711929555720263
Desired Impulse
Step-2 hd(n) Response
1 0 n N −1
w[n] =
0 otherwise
(2) Bartlet Window
2n /( N − 1) 0 n ( N − 1) / 2
w[n] = 2 − 2n /( N − 1) ( N − 1) / 2 N − 1
0 otherwise
(3) Hanning Window
2n
1 − cos /2 0 n N −1
w[n] = N − 1
0 otherwise
2n
− 0 n N −1
w[n] =
0.54 0.46 cos
N −1
0 otherwise
2n 4n
0.42 − 0.5 cos + 0.08 cos 0 n N −1
w[n ] = N −1 N −1
0 otherwise
NOTE :
In FIR Filter, Order M = N-1
In IIR Filter, Order N = No of POLEs
Solution :
Now,
Frequency
Response
Hd(w) = |Hd(w)| Ф(w)
Magnitude
Magnitude Response : Response
Where, wc =0.32
PB SB
- -wc 0 wc
N=5
1 wc
hd [n] = e − j w jnw
e dw
2 − wc
1 wc
hd [n] = e j ( n − ) w
dw
2 − wc
1 e j ( n − ) w
wc
hd [n] =
2 (n − ) j − w
Where wc =0.32 and =2
c
2n
0.54 − 0.46 cos
4
2n
0.54 − 0.46 cos
4
2n
0.54 − 0.46 cos
4
0 −
w 4
H (e ) = − j 2 w
jw 4
e otherwise
N=5
(I) Find Hd(w)
− wc
1 − j w jnw − j w jnw
2
hd [n] = e e dw + e e dw
− w c
j ( n − ) w − wc j ( n − ) w
1 e e
hd [n] = +
2 (n − ) j −
(n − ) j
wc
.......
.......
Kiran TALELE 9987030881 talelesir@gmail.com 17
sin[( n − ) ] wc sin ((n − ) wc )
hd [n] = −
[( n − ) ] [( n − ) wc ]
Solution: Given Ap = 1 dB As = 40 dB
Wp = 0.2 Ws = 0.8
window function ➔ Linear Phase FIR Filter
Desired Impulse
Step-2 hd(n) Response
W[n] N Wc Filter
Desired Frequency
Step-1 Hd(w) Response
Desired Impulse
Step-2 hd(n) Response
Given As = 40 dB
For,
f2 = 0.4 and f1 = 0.1
Hanning window = 44 dB
For Hanning window,
Hamming window = 53 dB C = 3.21
Blackman window = 74 dB
Select,
Hanning window = 44 dB
| H(e jw ) |
PB SB
0 0.2 0.8
wp ws
Filter is LPF
Frequency
Response
Hd(w) = |Hd(w)| Ф(w)
Magnitude Response :
| H(e jw ) |
1 - wc w wc
H(w) =
0 otherwise
PB SB
Where, wc = 0.5
- -wc 0 wc
1 e j ( n − ) w
wc
hd [n] =
2 (n − ) j − w
c
wc sin ((n − ) wc )
wc
h[n] =
1 −
hd [n] = e − j w jnw
e dw ( n ) wc )
2 − wc
Where wc =0.5 and =5
1 wc
hd [n] = e j ( n − ) w
dw
2 − wc
Solution: Given As = 40 dB
Wp = 0.76 Ws = 0.167 HPF
window function ➔ Linear Phase FIR Filter
Solution :
Order M = N-1 ==6
Therefore, N=7 and so, = 3
Frequency
Response
Hd(w) = |Hd(w)| Ф(w)
SB PB SB
• w1 = 0.25 and
• w2 = 0.6
- -w2 -w1 0 w1 w2 w
SB PB SB
- -w2 -w1 0 w1 w 2 w
.......
.......
Kiran TALELE 9987030881 talelesir@gmail.com 36
Kiran TALELE 9987030881 talelesir@gmail.com 37
Step-3 : Find h[n]
1 0 n N −1
w[n] =
0 otherwise
Kiran TALELE
9987030881
ktvtalele@spit.ac.in
www.facebook.com/Kiran-Talele-1711929555720263
N Wc Filter
Hd(w)
H[k]
h(n)
3
Q1 The frequency response of Low Pass Filter is
given by,
jw ⎧ e − j 3w 0 ≤ w ≤ 0.5π
H (e ) = ⎨
⎩ 0 0.5π ≤ w ≤ π
Design the filter using Frequency Sampling Method.
Solution :
Given, ⎧ e − j 3w 0 ≤ w ≤ 0.5π
H (e jw ) = ⎨
⎩ 0 0.5π ≤ w ≤ π
N=7
jw ⎧ e − j 3w 0 ≤ w ≤ 0.5π
H (e ) = ⎨
⎩ 0 0.5π ≤ w ≤ π
H [k ] = ⎡ 1 k =0 w=0 ⎤
6π
⎢ −j ⎥
⎢ e 7
k =1 w = 0.28π ⎥
⎢ 0 k =2 w = 0.56π ⎥
⎢ ⎥
⎢ 0 k =3 w = 0.84π ⎥
⎢ 0 k =4 ⎥
⎢ ⎥
⎢ 0 k =5 ⎥
6π
⎢ j ⎥
⎢⎣ e 7
k =6 ⎥⎦
Kiran TALELE 9987030881 talelesir@gmail.com 6
(II) Find h[n]
By Inverse DFT,
N −1
1
h[n] = ∑ H[k ] WN
−nk
N n=0
Solution :
Magnitude Response :
|Hd(w)|
⎧⎪ 0 0 ≤ w < 0.65π ⎫⎪
SB PB | H d (w) |= ⎨ ⎬
⎪⎩ 1 0.65π ≤ w ≤ π ⎪⎭
0 0.65π π
⎝ 2 ⎠
jφ − j 3w
φ (w) = e =e
By substituting in Hd(w) we get,
⎧⎪ 0 0 ≤ w < 0.65π ⎪⎫
H d (w) = ⎨ − j 3w ⎬
⎪⎩ e 0.65π ≤ w ≤ π ⎪⎭
(II) Find H[k]
By Frequency Sampling,
2π k 2π k
Put w = =
N 7
⎧
⎪ 0 ⎫
0 ≤ w < 0.65π ⎪
H[k]= ⎨ -j3 2πk ⎬
( 7 )
⎩ e
⎪ 0.65π ≤ w ≤ π ⎪
⎭
2π k
w =
7
= 0.285π k ( )
Kiran TALELE 9987030881 talelesir@gmail.com 11
⎧
⎪ 0 ⎫
0 ≤ w < 0.65π ⎪
H[k]= ⎨ -j3 2πk ⎬
( 7 )
⎩ e
⎪ 0.65π ≤ w ≤ π ⎪
⎭
H[k] = ⎡ ⎤
0 k=0 w=0
⎢ ⎥
⎢ 0 k =1 w = 0.285π ⎥
⎢ 0 k =2 w = 0.571π ⎥
⎢ ⎛ 18π ⎞ ⎥
− j⎜ ⎟
⎢ ⎝ 7 ⎠ ⎥
⎢ e k =3 w = 0.857π ⎥
⎛ 18π ⎞
⎢ j⎜ 7 ⎟ ⎥
⎢ e ⎝ ⎠
k =4 ⎥
⎢ 0 k =5 ⎥
⎢ ⎥
⎢⎣ 0 k =6 ⎥⎦
(III) Find h[n]
By Inverse DFT,
N −1
1
h[n] = ∑ H[k ] WN
−nk
N n=0
N=7
jw ⎧ e − j 3w 0 ≤ w ≤ 0.5π
H (e ) = ⎨
⎩ 0 0.5π ≤ w ≤ π
H [k ] = ⎡ 1 k =0 w=0 ⎤
6π
⎢ −j ⎥
⎢ e 7
k =1 w = 0.28π ⎥
⎢ 0 k =2 w = 0.56π ⎥
⎢ ⎥
⎢ 0 k =3 w = 0.84π ⎥
⎢ 0 k =4 ⎥
⎢ ⎥
⎢ 0 k =5 ⎥
6π
⎢ j ⎥
⎢⎣ e 7
k =6 ⎥⎦
Kiran TALELE 9987030881 talelesir@gmail.com 16
(II) Frequency Sampling Realization
• By Freq Sampling, H ( z) = N1 H 1 ( z) H 2 ( z)
Where (1) N = 7
(2) H1 (z) = 1 − z − N == 1 − z −7
N −1
H[k]
(3) H 2 (z) = ∑ j2 π k
k =0
1− e N
z −1
H [0] H [1] H [6]
H 2 ( z) = + +
1 − z −1 j
2π
j
12π
1− e 7 z −1 1− e 7 z −1
6π 6π
−j j
1 e 7
e 7
H 2 ( z) = −1
+ 2π
+ 2π
1− z j −j
1− e 7
z −1 1 − e 7
z −1
Kiran TALELE 9987030881 talelesir@gmail.com 17
6π 6π
−j j
1 e 7
e 7
H 2 ( z) = −1
+ 2π
+ 2π
1− z j −j
1− e 7
z −1 1 − e 7
z −1
z–1 z–1
z–1
z–1 -1.8019
z–1
z–1
z–1 1.246
z–1
z–1 1.8019
z–1
-1
-1
Kiran TALELE
9987030881
ktvtalele@spit.ac.in
www.facebook.com/Kiran-Talele-1711929555720263
Kiran Tulshiram Vasumati TALELE 21
21
Multi Rate
Signal
Processing
Kiran TALELE
talelesir@gmail.com
MSD By TALELE 1
Down-sampling using Decimator
Down sampling reduces sampling
frequency of input signal.
Example :
a[n] = { 1, 2, 3, 4, 5, 6, 7, 8 }
For D=2, y[n] = { 1, 3, 5, 7 }= a[nD]
For D=3, y[n] = { 1, 4, 7 }
Kiran TALELE 99870 30 881 talelesir@gmail.com
INPUT OUTPUT
W = 2π F/Fs W = 2π F/Fs
W = Wx W = Wy
Fs = Fsx Fs = Fsy = Fsx/D
Wx = 2π F/Fsx Wy = 2π (F/Fsx) D
Wy = Wx D
Frequency Domain Representation for D=2
| X(w) |
-π π
| H(w) |
-π π
Cos(0.8πn)
Given Fs = 2500
xa (t) x[n]
ADC
Fs =2500
|Xa(w)|
− w2 − w1 w1 w2
|X(w)|
Cos(0.8πn)
W[n]=x[n] Cos(0.8πn)
⎛ e j 0.8πn + e − j 0.8πn ⎞
w[n] = ⎜ ⎟ x[n]
⎜ 2 ⎟
⎝ ⎠
1⎛ j 0.8πn − j 0.8πn ⎞
w[ n] = ⎜ x[ n] e + x[ n] e ⎟
2⎝ ⎠
1
ByDTFT , W ( w) = ( X ( w + 0.8π ) + X ( w − 0.8π ) )
2
Cos(0.8πn)
|W(w)|
|H(w)|
−π 0.1π π
− 0.1π
|V(w)|
−π − 0.08π 0.08π π
xa [n] x[n] w[n] v[n] y[n]
ADC X H(w) 10
Cos(0.8πn)
|V(w)|
− 0.08π 0.08π π
-π
| Y(w) |
-π − 0.8π 0.8π π
Solution :
Ts = 4 msec
Fs = 250 Hz
|Xa(w)|
− w2 − w1 w1 w2
|Y(w)|
− 0.8π 0.8π
Kiran TALELE 99870 30 881 talelesir@gmail.com
Up-sampling using Interpolator
Example :
a[n] = { 1, 2, 3, 4 }
For L=2, y[n] = { 1, 0, 2, 0, 3, 0, 4, 0, }
For L=3, y[n] = { 1, 0,0, 2, 0, 0, 3, 0,0, 4, 0,0, }
W = 2π F/Fs W = 2π F/Fs
W = Wx W = Wy
Fs = Fsx Fs = Fsy = L Fsx
| X(w) |
-3π -π π 3π
| A(w) |
-π -π/2 π/2 π
| H(w) |
-π -π/2 π/2 π
| Y(w) | Y(w)=X(w) H(w)
-π -π/2 π/2 π
H1(z) H2(z)
Fs = Fx Fs = L1 Fx Fs = L1 L2 Fx
(2) Multi stage approach for Decimator
N
D = ∏ D i == D1D 2
i =1
Fs=(441/480) Fsx
Explain Subband Coding
Sub-band coding is a method
where the speech signal is
subdivided into several
frequency bands and each band
is digitally encoded separately.
0 π/4 π
BPF |H2(w)|
0 π/4 2π/4 π
BPF |H3(w)|
0 π/2 3π/4 π
HPF |H4(w)|
0 3π/4 π
Kiran TALELE 99870 30 881 talelesir@gmail.com
DECODER
A3 Decoding M=4
BPF
X(n) LPF 2
a(n)
0 π/2 π
HPF 2 b(n)
LPF : h0[n]
HPF : h1[n]=(-1)n h0[n] 0 π/2 π
a(n) 2
LPF X(n)
0 π/2 π
b(n) 2 HPF
LPF : g0[n]
HPF : g1[n]=(-1)n g0[n] 0 π/2 π
H(z) = [ h[0] + z −3
h[3] + z −6
h[6] ]
+ [ h(1) z -1 −4
+ z h[4] + z −7
h(7) ]
+ [ h(2) z -2
+z −5
h[5] + z −8
h(8) ]
Kiran TALELE 99870 30 881 talelesir@gmail.com
H(z) = [ h[0] + z −3
h[3] + z −6
h[6] ]
+z -1
[ h(1) + z −3
h[4] + z −6
h ( 7) ]
+z −2
[ h(2) + z −3
h[5] + z −6
h(8) ]
H(z) = [ E1( z ) ]
3
+z -1
[ E 2( z ) ]
3
+ z −2
[ E3( z ) ]
3
z-1
D=3 E2(z)
z-1
D=3 E3(z)
By
Kiran Kumar
TALELE
talelesir@gmail.com
Adaptive Filter as a Noise Canceller
dk=sk+nk
Digital yk ek
Xk +
Noise Filter - Noise
Adaptive
Algorithm
Adaptive Digital Filter
ek = sk + nk – yk
• Where, y[n] W T X
• By substituting we get,
J 2
2P T
W W T
R W
• The gradient is given by,
dJ
2 P 2 R W 0
dW
2 P 2 R W 0
2 R W 2 P
R W P
R W P
WR -1
P
Woptimum R P -1
Drawback of wiener filter
1). It requires autocorrelation matrix R and
Cross correlation matrix P
2) It involves Matrix inversion which is time
consuming.
3) If the signals are non stationary, then
both R and P will change with time,
so Wopt will have to be computed
repeatedly.
Wiener Filter as a Noise canceller.
+
Σ
y[k] = s[k] +n[k] - ek y[k ] n[k ] s[k ]
(signal + noise)
(output = signal estimate)
Wiener Filter
N 1
n[k ] w[i ]x[ k i]
x[k] (noise)
i 0
(noise estimate)