You are on page 1of 115

6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

DSP and Digital Filters (2016-7833)

6: Window Filter Design

Windows: 6 1 / 12

Inverse DTFT
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

For any BIBO stable filter, H(ej ) is the DTFT of h[n]

DSP and Digital Filters (2016-7833)

Windows: 6 2 / 12

Inverse DTFT
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

For any BIBO stable filter, H(ej ) is the DTFT of h[n]

H(ej ) =

DSP and Digital Filters (2016-7833)

h[n]ejn

Windows: 6 2 / 12

Inverse DTFT
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

For any BIBO stable filter, H(ej ) is the DTFT of h[n]


j

H(e ) =

DSP and Digital Filters (2016-7833)

jn

h[n]e

h[n] =

1
2

H(ej )ejn d

Windows: 6 2 / 12

Inverse DTFT
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

For any BIBO stable filter, H(ej ) is the DTFT of h[n]


j

H(e ) =

jn

h[n]e

h[n] =

1
2

H(ej )ejn d

If we know H(ej ) exactly, the IDTFT gives the ideal h[n]

DSP and Digital Filters (2016-7833)

Windows: 6 2 / 12

Inverse DTFT
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

For any BIBO stable filter, H(ej ) is the DTFT of h[n]


j

H(e ) =

jn

h[n]e

h[n] =

1
2

H(ej )ejn d

If we know H(ej ) exactly, the IDTFT gives the ideal h[n]


Example: Ideal Lowpass filter

H(ej ) =

1 || 0
0 || > 0
1

20

0.5

DSP and Digital Filters (2016-7833)

-2

Windows: 6 2 / 12

Inverse DTFT
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

For any BIBO stable filter, H(ej ) is the DTFT of h[n]


j

H(e ) =

jn

h[n]e

h[n] =

1
2

H(ej )ejn d

If we know H(ej ) exactly, the IDTFT gives the ideal h[n]


Example: Ideal Lowpass filter

H(ej ) =

1 || 0
0 || > 0

h[n] =

2/0

20

0.5

DSP and Digital Filters (2016-7833)

sin 0 n
n

-2

Windows: 6 2 / 12

Inverse DTFT
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

For any BIBO stable filter, H(ej ) is the DTFT of h[n]


j

H(e ) =

jn

h[n]e

h[n] =

1
2

H(ej )ejn d

If we know H(ej ) exactly, the IDTFT gives the ideal h[n]


Example: Ideal Lowpass filter

H(ej ) =

1 || 0
0 || > 0

h[n] =

2/0

20

0.5

sin 0 n
n

-2

2
Note: Width in is 20 , width in n is
0

DSP and Digital Filters (2016-7833)

Windows: 6 2 / 12

Inverse DTFT
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

For any BIBO stable filter, H(ej ) is the DTFT of h[n]


j

H(e ) =

jn

h[n]e

h[n] =

1
2

H(ej )ejn d

If we know H(ej ) exactly, the IDTFT gives the ideal h[n]


Example: Ideal Lowpass filter

H(ej ) =

1 || 0
0 || > 0

h[n] =

2/0

20

0.5

sin 0 n
n

-2

2
: product is 4 always
Note: Width in is 20 , width in n is
0

DSP and Digital Filters (2016-7833)

Windows: 6 2 / 12

Inverse DTFT
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

For any BIBO stable filter, H(ej ) is the DTFT of h[n]


j

H(e ) =

jn

h[n]e

h[n] =

1
2

H(ej )ejn d

If we know H(ej ) exactly, the IDTFT gives the ideal h[n]


Example: Ideal Lowpass filter

H(ej ) =

1 || 0
0 || > 0

h[n] =

2/0

20

0.5

sin 0 n
n

-2

2
: product is 4 always
Note: Width in is 20 , width in n is
0
Sadly h[n] is infinite and non-causal.

DSP and Digital Filters (2016-7833)

Windows: 6 2 / 12

Inverse DTFT
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

For any BIBO stable filter, H(ej ) is the DTFT of h[n]


j

H(e ) =

jn

h[n]e

h[n] =

1
2

H(ej )ejn d

If we know H(ej ) exactly, the IDTFT gives the ideal h[n]


Example: Ideal Lowpass filter

H(ej ) =

1 || 0
0 || > 0

h[n] =

2/0

20

0.5

sin 0 n
n

-2

2
: product is 4 always
Note: Width in is 20 , width in n is
0
Sadly h[n] is infinite and non-causal. Solution: multiply h[n] by a window

DSP and Digital Filters (2016-7833)

Windows: 6 2 / 12

Rectangular window
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncate to M
2 to make finite

2/0

DSP and Digital Filters (2016-7833)

Windows: 6 3 / 12

Rectangular window
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncate to M
2 to make finite; h1 [n] is now of length M + 1

h1[n]
M=14

DSP and Digital Filters (2016-7833)

Windows: 6 3 / 12

Rectangular window
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncate to M
2 to make finite; h1 [n] is now of length M + 1
MSE Optimality:
Define mean square error (MSE) in frequency domain

E=

1
2


R
H(ej ) H1 (ej ) 2 d

h1[n]

M=14

M=14
0.5

DSP and Digital Filters (2016-7833)

0
0

Windows: 6 3 / 12

Rectangular window
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncate to M
2 to make finite; h1 [n] is now of length M + 1
MSE Optimality:
Define mean square error (MSE) in frequency domain

E=
=

1
2
1
2


R
H(ej ) H1 (ej ) 2 d

2
M
R
P
jn
j
2
h
[n]e
H(e
)

M 1
2

h1[n]

M=14

M=14
0.5

DSP and Digital Filters (2016-7833)

0
0

Windows: 6 3 / 12

Rectangular window
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncate to M
2 to make finite; h1 [n] is now of length M + 1
MSE Optimality:
Define mean square error (MSE) in frequency domain

E=
=

1
2
1
2


R
H(ej ) H1 (ej ) 2 d

2
M
R
P
jn
j
2
h
[n]e
H(e
)

M 1
2

Minimum E is when h1 [n] = h[n].

h1[n]

M=14

M=14
0.5

DSP and Digital Filters (2016-7833)

0
0

Windows: 6 3 / 12

Rectangular window
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncate to M
2 to make finite; h1 [n] is now of length M + 1
MSE Optimality:
Define mean square error (MSE) in frequency domain

E=
=

1
2
1
2


R
H(ej ) H1 (ej ) 2 d

2
M
R
P
jn
j
2
h
[n]e
H(e
)

M 1
2

Minimum E is when h1 [n] = h[n].


Proof: From Parseval: E =

h1[n]

P M2

M
2

|h[n] h1 [n]| +

|n|> M
2

|h[n]|

M=14

M=14
0.5

DSP and Digital Filters (2016-7833)

0
0

Windows: 6 3 / 12

Rectangular window
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncate to M
2 to make finite; h1 [n] is now of length M + 1
MSE Optimality:
Define mean square error (MSE) in frequency domain

E=
=

1
2
1
2


R
H(ej ) H1 (ej ) 2 d

2
M
R
P
jn
j
2
h
[n]e
H(e
)

M 1
2

Minimum E is when h1 [n] = h[n].


Proof: From Parseval: E =

P M2

M
2

|h[n] h1 [n]| +

|n|> M
2

|h[n]|

However: 9% overshoot at a discontinuity even for large n.


h1[n]

M=14

M=14
0.5

DSP and Digital Filters (2016-7833)

0
0

Windows: 6 3 / 12

Rectangular window
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncate to M
2 to make finite; h1 [n] is now of length M + 1
MSE Optimality:
Define mean square error (MSE) in frequency domain

E=
=

1
2
1
2


R
H(ej ) H1 (ej ) 2 d

2
M
R
P
jn
j
2
h
[n]e
H(e
)

M 1
2

Minimum E is when h1 [n] = h[n].


Proof: From Parseval: E =

P M2

M
2

|h[n] h1 [n]| +

|n|> M
2

|h[n]|

However: 9% overshoot at a discontinuity even for large n.


h1[n]

M=14

M=28
M=14

0.5

DSP and Digital Filters (2016-7833)

0
0

Windows: 6 3 / 12

Rectangular window
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncate to M
2 to make finite; h1 [n] is now of length M + 1
MSE Optimality:
Define mean square error (MSE) in frequency domain

E=
=

1
2
1
2


R
H(ej ) H1 (ej ) 2 d

2
M
R
P
jn
j
2
h
[n]e
H(e
)

M 1
2

Minimum E is when h1 [n] = h[n].


Proof: From Parseval: E =

P M2

M
2

|h[n] h1 [n]| +

|n|> M
2

|h[n]|

However: 9% overshoot at a discontinuity even for large n.


h2[n]

M=14

M=28
M=14

0.5

0
0

Normal to delay by
DSP and Digital Filters (2016-7833)

M
2

to make causal. Multiplies H(e

j M
2

) by e

Windows: 6 3 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2

DSP and Digital Filters (2016-7833)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )

DSP and Digital Filters (2016-7833)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

DSP and Digital Filters (2016-7833)

P M2

M
2

ejn

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

DSP and Digital Filters (2016-7833)

P M2

M
2

(i)

ejn = 1 + 2

P0.5M
1

cos (n)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

M
2
j(n)

Proof: (i) e

DSP and Digital Filters (2016-7833)

P M2

(i)

ejn = 1 + 2

P0.5M
1

cos (n)

+ ej(+n) = 2 cos (n)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

M
2
j(n)

Proof: (i) e

DSP and Digital Filters (2016-7833)

P M2

(i)

ejn = 1 + 2

P0.5M
1

(ii) sin 0.5(M +1)

cos (n)=

sin 0.5

+ ej(+n) = 2 cos (n)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

M
2
j(n)

Proof: (i) e

DSP and Digital Filters (2016-7833)

P M2

(i)

ejn = 1 + 2

P0.5M
1

(ii) sin 0.5(M +1)

cos (n)=

sin 0.5

+ ej(+n) = 2 cos (n) (ii) Sum geom. progression

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

P M2

M
2
j(n)

Proof: (i) e

(i)

ejn = 1 + 2

P0.5M
1

(ii) sin 0.5(M +1)

cos (n)=

sin 0.5

+ ej(+n) = 2 cos (n) (ii) Sum geom. progression

Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)

DSP and Digital Filters (2016-7833)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

P M2

(i)

M
2
j(n)

Proof: (i) e

ejn = 1 + 2

P0.5M
1

(ii) sin 0.5(M +1)

cos (n)=

sin 0.5

+ ej(+n) = 2 cos (n) (ii) Sum geom. progression

Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
1

0.5

0
-2

M=14

0.5

0
-2

DSP and Digital Filters (2016-7833)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

P M2

(i)

M
2
j(n)

Proof: (i) e

ejn = 1 + 2

P0.5M
1

(ii) sin 0.5(M +1)

cos (n)=

sin 0.5

+ ej(+n) = 2 cos (n) (ii) Sum geom. progression

Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
1

0.5

0.5

0
-2

4/(M+1)

-2

M=14

0.5

0
-2

DSP and Digital Filters (2016-7833)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

P M2

(i)

M
2
j(n)

Proof: (i) e

ejn = 1 + 2

P0.5M
1

(ii) sin 0.5(M +1)

cos (n)=

sin 0.5

+ ej(+n) = 2 cos (n) (ii) Sum geom. progression

Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
1

0.5

0.5

0
-2

1
4/(M+1)

0.5

0
-2

-2

M=14

0.5

0
-2

DSP and Digital Filters (2016-7833)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

P M2

(i)

M
2
j(n)

Proof: (i) e

ejn = 1 + 2

P0.5M
1

(ii) sin 0.5(M +1)

cos (n)=

sin 0.5

+ ej(+n) = 2 cos (n) (ii) Sum geom. progression

Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
1

0.5

0.5

0
-2

1
4/(M+1)

0.5

0
-2

-2

2
Provided that M4
<
2

M
+
1
>
0
+1
0 :

M=14

0.5

0
-2

DSP and Digital Filters (2016-7833)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

P M2

(i)

M
2
j(n)

Proof: (i) e

ejn = 1 + 2

P0.5M
1

(ii) sin 0.5(M +1)

cos (n)=

sin 0.5

+ ej(+n) = 2 cos (n) (ii) Sum geom. progression

Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
1

0.5

0.5

0
-2

1
4/(M+1)

0.5

0
-2

-2

2
Provided that M4
<
2

M
+
1
>
0
+1
0 :
Passband ripple: M4
+1

M=14

0.5

0
-2

DSP and Digital Filters (2016-7833)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

P M2

(i)

M
2
j(n)

Proof: (i) e

ejn = 1 + 2

P0.5M
1

(ii) sin 0.5(M +1)

cos (n)=

sin 0.5

+ ej(+n) = 2 cos (n) (ii) Sum geom. progression

Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
1

0.5

0.5

0
-2

1
4/(M+1)

0.5

0
-2

-2

2
Provided that M4
<
2

M
+
1
>
0
+1
0 :
2
Passband ripple: M4
+1 , stopband M +1

M=14

0.5

0
-2

DSP and Digital Filters (2016-7833)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

P M2

(i)

M
2
j(n)

Proof: (i) e

ejn = 1 + 2

P0.5M
1

(ii) sin 0.5(M +1)

cos (n)=

sin 0.5

+ ej(+n) = 2 cos (n) (ii) Sum geom. progression

Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
1

0.5

0.5

0
-2

4/(M+1)

0.5

0
-2

-2

2
Provided that M4
<
2

M
+
1
>
0
+1
0 :
2
Passband ripple: M4
+1 , stopband M +1

M=14

0.5

Transition pk-to-pk: M4
+1

0
-2

DSP and Digital Filters (2016-7833)

Windows: 6 4 / 12

Dirichlet Kernel
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Truncation Multiply h[n] by a rectangular window, w[n] = M n M


2
2
1
j
j
j
Circular Convolution HM +1 (e ) = 2 H(e ) W (e )
j

W (e ) =

P M2

(i)

M
2
j(n)

Proof: (i) e

ejn = 1 + 2

P0.5M
1

(ii) sin 0.5(M +1)

cos (n)=

sin 0.5

+ ej(+n) = 2 cos (n) (ii) Sum geom. progression

Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
1

0.5

0.5

0
-2

0.5

DSP and Digital Filters (2016-7833)

4/(M+1)

0.5

0
-2

-2

2
Provided that M4
<
2

M
+
1
>
0
+1
0 :
2
Passband ripple: M4
+1 , stopband M +1

M=14

-2

Transition pk-to-pk: M4
+1
Transition Gradient:

d|H|
d

=0

M +1
2

Windows: 6 4 / 12

Window relationships
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

When you multiply an impulse response by a window M + 1 long

DSP and Digital Filters (2016-7833)

HM +1 (ej ) =

1
j
2 H(e )

W (ej )

Windows: 6 5 / 12

Window relationships
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

When you multiply an impulse response by a window M + 1 long

HM +1 (ej ) =

1
j
2 H(e )

W (ej )

0.5

DSP and Digital Filters (2016-7833)

-2

Windows: 6 5 / 12

Window relationships
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

When you multiply an impulse response by a window M + 1 long

HM +1 (ej ) =
1

1
j
2 H(e )

W (ej )

20 M=20

10

0.5

0
0

DSP and Digital Filters (2016-7833)

-2

-2

Windows: 6 5 / 12

Window relationships

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

When you multiply an impulse response by a window M + 1 long

HM +1 (ej ) =
1

1
j
2 H(e )

W (ej )

20 M=20

10

0.5

6: Window Filter Design

0.5

0
0

DSP and Digital Filters (2016-7833)

0
-2

-2

-2

Windows: 6 5 / 12

Window relationships

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

When you multiply an impulse response by a window M + 1 long

HM +1 (ej ) =
1

1
j
2 H(e )

W (ej )

20 M=20

10

0.5

6: Window Filter Design

0.5

0
0

0
-2

-2

(a) passband gain w[0]; peak

DSP and Digital Filters (2016-7833)

w[0]
2

-2

0.5
2

j
W
(e
)d
mainlobe

Windows: 6 5 / 12

Window relationships

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

When you multiply an impulse response by a window M + 1 long

HM +1 (ej ) =
1

1
j
2 H(e )

W (ej )

20 M=20

10

0.5

6: Window Filter Design

0.5

0
0

0
-2

-2

w[0]
2

-2

0.5
2

j
+
W
(e
)d
(a) passband gain w[0]; peak
mainlobe
rectangular window: passband gain = 1; peak gain = 1.09

DSP and Digital Filters (2016-7833)

Windows: 6 5 / 12

Window relationships

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

When you multiply an impulse response by a window M + 1 long

HM +1 (ej ) =
1

1
j
2 H(e )

W (ej )

20 M=20

10

0.5

6: Window Filter Design

0.5

0
0

0
-2

-2

w[0]
2

-2

0.5
2

j
+
W
(e
)d
(a) passband gain w[0]; peak
mainlobe
rectangular window: passband gain = 1; peak gain = 1.09

(b) transition bandwidth, = width of the main lobe


transition amplitude, H = integral of main lobe2

DSP and Digital Filters (2016-7833)

Windows: 6 5 / 12

Window relationships

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

When you multiply an impulse response by a window M + 1 long

HM +1 (ej ) =
1

1
j
2 H(e )

W (ej )

20 M=20

10

0.5

6: Window Filter Design

0.5

0
0

0
-2

-2

w[0]
2

-2

0.5
2

j
+
W
(e
)d
(a) passband gain w[0]; peak
mainlobe
rectangular window: passband gain = 1; peak gain = 1.09

(b) transition bandwidth, = width of the main lobe


transition amplitude, H = integral of main lobe2
rectangular window: = M4
+1 , H 1.18

DSP and Digital Filters (2016-7833)

Windows: 6 5 / 12

Window relationships

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

When you multiply an impulse response by a window M + 1 long

HM +1 (ej ) =
1

1
j
2 H(e )

W (ej )

20 M=20

10

0.5

6: Window Filter Design

0.5

0
0

0
-2

-2

w[0]
2

-2

0.5
2

j
+
W
(e
)d
(a) passband gain w[0]; peak
mainlobe
rectangular window: passband gain = 1; peak gain = 1.09

(b) transition bandwidth, = width of the main lobe


transition amplitude, H = integral of main lobe2
rectangular window: = M4
+1 , H 1.18
(c) stopband gain is an integral over oscillating sidelobes of W (ej )

DSP and Digital Filters (2016-7833)

Windows: 6 5 / 12

Window relationships

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

When you multiply an impulse response by a window M + 1 long

HM +1 (ej ) =
1

1
j
2 H(e )

W (ej )

20 M=20

10

0.5

6: Window Filter Design

0.5

0
0

0
-2

-2

w[0]
2

-2

0.5
2

j
+
W
(e
)d
(a) passband gain w[0]; peak
mainlobe
rectangular window: passband gain = 1; peak gain = 1.09

(b) transition bandwidth, = width of the main lobe


transition amplitude, H = integral of main lobe2
rectangular window: = M4
+1 , H 1.18
(c) stopband gain is an integral over
oscillating sidelobes of W
(ej )


+1
rect window: min H(ej ) = 0.09 min W (ej ) = M
1.5
DSP and Digital Filters (2016-7833)

Windows: 6 5 / 12

Window relationships

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

When you multiply an impulse response by a window M + 1 long

HM +1 (ej ) =
1

1
j
2 H(e )

W (ej )

20 M=20

10

0.5

6: Window Filter Design

0.5

0
0

0
-2

-2

w[0]
2

-2

0.5
2

j
+
W
(e
)d
(a) passband gain w[0]; peak
mainlobe
rectangular window: passband gain = 1; peak gain = 1.09

(b) transition bandwidth, = width of the main lobe


transition amplitude, H = integral of main lobe2
rectangular window: = M4
+1 , H 1.18
(c) stopband gain is an integral over
oscillating sidelobes of W
(ej )


+1
rect window: min H(ej ) = 0.09 min W (ej ) = M
1.5
(d) features narrower than the main lobe will be broadened and
attenuated
DSP and Digital Filters (2016-7833)

Windows: 6 5 / 12

Common Windows
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Rectangular: w[n] 1

DSP and Digital Filters (2016-7833)

-13 dB

6.27/(M+1)

-50
0

Windows: 6 6 / 12

Common Windows
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Rectangular: w[n] 1
dont use

DSP and Digital Filters (2016-7833)

-13 dB

6.27/(M+1)

-50
0

Windows: 6 6 / 12

Common Windows
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Rectangular: w[n] 1
dont use

-50
0

Hanning: 0.5 + 0.5c1

ck = cos

DSP and Digital Filters (2016-7833)

2kn
M +1

-13 dB

6.27/(M+1)

12.56/(M+1)
-31 dB

-50
0

Windows: 6 6 / 12

Common Windows
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Rectangular: w[n] 1
dont use

-50
0

Hanning: 0.5 + 0.5c1

ck = cos

2kn
M +1

rapid sidelobe decay

DSP and Digital Filters (2016-7833)

-13 dB

6.27/(M+1)

12.56/(M+1)
-31 dB

-50
0

Windows: 6 6 / 12

Common Windows
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Rectangular: w[n] 1
dont use

-50
0

Hanning: 0.5 + 0.5c1

ck = cos

2kn
M +1

rapid sidelobe decay


Hamming: 0.54 + 0.46c1

12.56/(M+1)
-31 dB

-50
0
0

12.56/(M+1)
-40 dB

-50
0

DSP and Digital Filters (2016-7833)

-13 dB

6.27/(M+1)

Windows: 6 6 / 12

Common Windows
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Rectangular: w[n] 1
dont use

-50
0

Hanning: 0.5 + 0.5c1

ck = cos

2kn
M +1

rapid sidelobe decay


Hamming: 0.54 + 0.46c1
best peak sidelobe

12.56/(M+1)
-31 dB

-50
0
0

12.56/(M+1)
-40 dB

-50
0

DSP and Digital Filters (2016-7833)

-13 dB

6.27/(M+1)

Windows: 6 6 / 12

Common Windows
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Rectangular: w[n] 1
dont use

-50
0

Hanning: 0.5 + 0.5c1

ck = cos

2kn
M +1

rapid sidelobe decay


Hamming: 0.54 + 0.46c1
best peak sidelobe

0.42 + 0.5c1 + 0.08c2

12.56/(M+1)

-50
0
0

12.56/(M+1)
-40 dB

-50
1

18.87/(M+1)

-50
0

DSP and Digital Filters (2016-7833)

-31 dB

Blackman-Harris 3-term:

-13 dB

6.27/(M+1)

-70 dB
1

Windows: 6 6 / 12

Common Windows
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Rectangular: w[n] 1
dont use

-50
0

Hanning: 0.5 + 0.5c1

ck = cos

2kn
M +1

rapid sidelobe decay


Hamming: 0.54 + 0.46c1
best peak sidelobe

0.42 + 0.5c1 + 0.08c2


best peak sidelobe

DSP and Digital Filters (2016-7833)

12.56/(M+1)
-31 dB

-50
0
0

12.56/(M+1)
-40 dB

-50
0

Blackman-Harris 3-term:

-13 dB

6.27/(M+1)

18.87/(M+1)

-50
0

-70 dB
1

Windows: 6 6 / 12

Common Windows
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Rectangular: w[n] 1
dont use

-50
0

Hanning: 0.5 + 0.5c1

ck = cos

2kn
M +1

rapid sidelobe decay


Hamming: 0.54 + 0.46c1
best peak sidelobe

0.42 + 0.5c1 + 0.08c2


best peak sidelobe
Kaiser:

 q

2
I0 1( 2n
M )
I0 ()

controls width v sidelobes

-31 dB
-50
0
0

12.56/(M+1)
-40 dB

-50
1

-70 dB

0
0

-50

18.87/(M+1)

-50
1

13.25/(M+1)
-40 dB

= 5.3

-50

21.27/(M+1)
= 9.5

DSP and Digital Filters (2016-7833)

12.56/(M+1)

Blackman-Harris 3-term:

-13 dB

6.27/(M+1)

-70 dB
1

Windows: 6 6 / 12

Common Windows
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Rectangular: w[n] 1
dont use

-50
0

Hanning: 0.5 + 0.5c1

ck = cos

2kn
M +1

rapid sidelobe decay


Hamming: 0.54 + 0.46c1
best peak sidelobe

0.42 + 0.5c1 + 0.08c2


best peak sidelobe
Kaiser:

 q

2
I0 1( 2n
M )
I0 ()

controls width v sidelobes


Good compromise:
Width v sidelobe v decay

DSP and Digital Filters (2016-7833)

12.56/(M+1)
-31 dB

-50
0
0

12.56/(M+1)
-40 dB

-50
0

Blackman-Harris 3-term:

-13 dB

6.27/(M+1)

18.87/(M+1)

-50

-70 dB

0
0

-50

13.25/(M+1)
-40 dB

= 5.3

-50

21.27/(M+1)
= 9.5

-70 dB
1

Windows: 6 6 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

DSP and Digital Filters (2016-7833)

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

 12

1
2

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

DSP and Digital Filters (2016-7833)

 12

1
2

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

DSP and Digital Filters (2016-7833)

 12

1
2

It is like if |x(t)| was a zero-mean probability distribution.

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

 12

1
2

It is like if |x(t)| was a zero-mean probability distribution.


The second term is similarly the width of X(j) in frequency.

DSP and Digital Filters (2016-7833)

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

 12

1
2

It is like if |x(t)| was a zero-mean probability distribution.


The second term is similarly the width of X(j) in frequency.
A signal cannot be concentrated in both time and frequency.

DSP and Digital Filters (2016-7833)

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

 12

1
2

It is like if |x(t)| was a zero-mean probability distribution.


The second term is similarly the width of X(j) in frequency.
A signal cannot be concentrated in both time and frequency.
So a short window cannot have a narrow main lobe.

DSP and Digital Filters (2016-7833)

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

 12

1
2

It is like if |x(t)| was a zero-mean probability distribution.


The second term is similarly the width of X(j) in frequency.
A signal cannot be concentrated in both time and frequency.
So a short window cannot have a narrow main lobe.
Proof:
R
R
2
2
Assume |x(t)| dt = 1 |X(j)| d = 2

DSP and Digital Filters (2016-7833)

[Parseval]

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

 12

1
2

It is like if |x(t)| was a zero-mean probability distribution.


The second term is similarly the width of X(j) in frequency.
A signal cannot be concentrated in both time and frequency.
So a short window cannot have a narrow main lobe.
Proof:
R
R
2
2
Assume |x(t)| dt = 1 |X(j)| d = 2
Set v(t) = dx
dt V (j) = jX(j) [by parts]

DSP and Digital Filters (2016-7833)

[Parseval]

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

 12

1
2

It is like if |x(t)| was a zero-mean probability distribution.


The second term is similarly the width of X(j) in frequency.
A signal cannot be concentrated in both time and frequency.
So a short window cannot have a narrow main lobe.
Proof:
R
R
2
2
Assume |x(t)| dt = 1 |X(j)| d = 2
Set v(t) = dx
dt V (j) = jX(j) [by parts]
Now

DSP and Digital Filters (2016-7833)


dx
1
2
tx dt dt= 2 tx t=

1 2
2 x dt

[Parseval]

= 12 [by parts]

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

 12

1
2

It is like if |x(t)| was a zero-mean probability distribution.


The second term is similarly the width of X(j) in frequency.
A signal cannot be concentrated in both time and frequency.
So a short window cannot have a narrow main lobe.
Proof:
R
R
2
2
Assume |x(t)| dt = 1 |X(j)| d = 2
Set v(t) = dx
dt V (j) = jX(j) [by parts]
1 2
1
1
2
Now tx dx

dt=
tx
x
dt
=

dt
2
2
2
t=




R
R

R
2 2
dx 2 dt
2
dt
t
x
dt
So 41 = tx dx
dt
dt

DSP and Digital Filters (2016-7833)

[Parseval]
[by parts]
[Schwartz]

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

 12

1
2

It is like if |x(t)| was a zero-mean probability distribution.


The second term is similarly the width of X(j) in frequency.
A signal cannot be concentrated in both time and frequency.
So a short window cannot have a narrow main lobe.
Proof:
R
R
2
2
Assume |x(t)| dt = 1 |X(j)| d = 2
Set v(t) = dx
dt V (j) = jX(j) [by parts]
1 2
1
1
2
Now tx dx

dt=
tx
x
dt
=

dt
2
2
2
t=




R
R

R
2 2
dx 2 dt
2
dt
t
x
dt
So 41 = tx dx
dt
dt

DSP and Digital Filters (2016-7833)

2 2

t x dt

 R

|v(t)| dt

[Parseval]
[by parts]
[Schwartz]

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

 12

1
2

It is like if |x(t)| was a zero-mean probability distribution.


The second term is similarly the width of X(j) in frequency.
A signal cannot be concentrated in both time and frequency.
So a short window cannot have a narrow main lobe.
Proof:
R
R
2
2
Assume |x(t)| dt = 1 |X(j)| d = 2
Set v(t) = dx
dt V (j) = jX(j) [by parts]
1 2
1
1
2
Now tx dx

dt=
tx
x
dt
=

dt
2
2
2
t=




R
R

R
2 2
dx 2 dt
2
dt
t
x
dt
So 41 = tx dx
dt
dt

DSP and Digital Filters (2016-7833)

2 2

t x dt

 R

[Parseval]
[by parts]
[Schwartz]



R 2 2  1 R
2
|v(t)| dt =
t x dt 2 |V (j)| d
2

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

 12

1
2

It is like if |x(t)| was a zero-mean probability distribution.


The second term is similarly the width of X(j) in frequency.
A signal cannot be concentrated in both time and frequency.
So a short window cannot have a narrow main lobe.
Proof:
R
R
2
2
Assume |x(t)| dt = 1 |X(j)| d = 2
Set v(t) = dx
dt V (j) = jX(j) [by parts]
1 2
1
1
2
Now tx dx

dt=
tx
x
dt
=

dt
2
2
2
t=




R
R

R
2 2
dx 2 dt
2
dt
t
x
dt
So 41 = tx dx
dt
dt

[Parseval]
[by parts]
[Schwartz]



R 2 2  1 R
2
=
t x dt
|v(t)| dt =
t x dt 2 |V (j)| d

R 2 2  1 R 2
2
=
t x dt 2 |X(j)| d
R

DSP and Digital Filters (2016-7833)

2 2

 R

Windows: 6 7 / 12

Uncertainty principle
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

CTFT uncertainty principle:

R

t2 |x(t)|2 dt
R
|x(t)|2 dt

 21  R

2 |X(j)|2 d
R
|X(j)|2 d

The first term measures the width of x(t) around t = 0.

 12

1
2

It is like if |x(t)| was a zero-mean probability distribution.


The second term is similarly the width of X(j) in frequency.
A signal cannot be concentrated in both time and frequency.
So a short window cannot have a narrow main lobe.
Proof:
R
R
2
2
Assume |x(t)| dt = 1 |X(j)| d = 2
Set v(t) = dx
dt V (j) = jX(j) [by parts]
1 2
1
1
2
Now tx dx

dt=
tx
x
dt
=

dt
2
2
2
t=




R
R

R
2 2
dx 2 dt
2
dt
t
x
dt
So 41 = tx dx
dt
dt

[Parseval]
[by parts]
[Schwartz]



R 2 2  1 R
2
=
t x dt
|v(t)| dt =
t x dt 2 |V (j)| d

R 2 2  1 R 2
2
=
t x dt 2 |X(j)| d
R

2 2

 R

No exact equivalent for DTFT/DFT but a similar effect is true


DSP and Digital Filters (2016-7833)

Windows: 6 7 / 12

Order Estimation
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Several formulae estimate the required order of a filter, M .

DSP and Digital Filters (2016-7833)

Windows: 6 8 / 12

Order Estimation
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Several formulae estimate the required order of a filter, M .


E.g. for lowpass filter

DSP and Digital Filters (2016-7833)

Windows: 6 8 / 12

Order Estimation
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Several formulae estimate the required order of a filter, M .


E.g. for lowpass filter
Estimated order is

DSP and Digital Filters (2016-7833)

5.64.3 log10 ()
2 1

Windows: 6 8 / 12

Order Estimation
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Several formulae estimate the required order of a filter, M .


E.g. for lowpass filter
Estimated order is
5.64.3 log10 ()
2 1
820 log10
2.2

DSP and Digital Filters (2016-7833)

Windows: 6 8 / 12

Order Estimation
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Several formulae estimate the required order of a filter, M .


E.g. for lowpass filter
Estimated order is
5.64.3 log10 ()
2 1
820 log10
2.2

Required M increases as either the


transition width, 2 1 , or the gain
tolerances and get smaller.

DSP and Digital Filters (2016-7833)

Windows: 6 8 / 12

Order Estimation
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Several formulae estimate the required order of a filter, M .


E.g. for lowpass filter
Estimated order is
5.64.3 log10 ()
2 1
820 log10
2.2

Required M increases as either the


transition width, 2 1 , or the gain
tolerances and get smaller.

Example:
Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.

DSP and Digital Filters (2016-7833)

Windows: 6 8 / 12

Order Estimation
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Several formulae estimate the required order of a filter, M .


E.g. for lowpass filter
Estimated order is
5.64.3 log10 ()
2 1
820 log10
2.2

Required M increases as either the


transition width, 2 1 , or the gain
tolerances and get smaller.

Example:
Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
2f2
1
=
0.943
,

=
= 1.047
1 = 2f
2
f
f
s

DSP and Digital Filters (2016-7833)

Windows: 6 8 / 12

Order Estimation
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Several formulae estimate the required order of a filter, M .


E.g. for lowpass filter
Estimated order is
5.64.3 log10 ()
2 1
820 log10
2.2

Required M increases as either the


transition width, 2 1 , or the gain
tolerances and get smaller.

Example:
Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
2f2
1
=
0.943
,

=
= 1.047
1 = 2f
2
f
f
s

Ripple: 20 log10 (1 + ) = 0.1 dB, 20 log10 = 35 dB

DSP and Digital Filters (2016-7833)

Windows: 6 8 / 12

Order Estimation
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Several formulae estimate the required order of a filter, M .


E.g. for lowpass filter
Estimated order is
5.64.3 log10 ()
2 1
820 log10
2.2

Required M increases as either the


transition width, 2 1 , or the gain
tolerances and get smaller.

Example:
Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
2f2
1
=
0.943
,

=
= 1.047
1 = 2f
2
f
f
s

Ripple: 20 log10 (1 + ) = 0.1 dB, 20 log10 = 35 dB

= 10

DSP and Digital Filters (2016-7833)

0.1
20

1 = 0.0116, = 10

35
20

= 0.0178

Windows: 6 8 / 12

Order Estimation
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Several formulae estimate the required order of a filter, M .


E.g. for lowpass filter
Estimated order is
5.64.3 log10 ()
2 1
820 log10
2.2

Required M increases as either the


transition width, 2 1 , or the gain
tolerances and get smaller.

Example:
Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
2f2
1
=
0.943
,

=
= 1.047
1 = 2f
2
f
f
s

Ripple: 20 log10 (1 + ) = 0.1 dB, 20 log10 = 35 dB

= 10
M
DSP and Digital Filters (2016-7833)

0.1
20

1 = 0.0116, = 10

5.64.3 log10 (2104 )


1.0470.943

10.25
0.105

35
20

= 0.0178

= 98
Windows: 6 8 / 12

Order Estimation
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Several formulae estimate the required order of a filter, M .


E.g. for lowpass filter
Estimated order is
5.64.3 log10 ()
2 1
820 log10
2.2

Required M increases as either the


transition width, 2 1 , or the gain
tolerances and get smaller.

Example:
Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
2f2
1
=
0.943
,

=
= 1.047
1 = 2f
2
f
f
s

Ripple: 20 log10 (1 + ) = 0.1 dB, 20 log10 = 35 dB

= 10
M
DSP and Digital Filters (2016-7833)

0.1
20

1 = 0.0116, = 10

5.64.3 log10 (2104 )


1.0470.943

10.25
0.105

35
20

= 98

= 0.0178
358
or 2.2
= 117
Windows: 6 8 / 12

Order Estimation
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Several formulae estimate the required order of a filter, M .


E.g. for lowpass filter
Estimated order is
5.64.3 log10 ()
2 1
820 log10
2.2

Required M increases as either the


transition width, 2 1 , or the gain
tolerances and get smaller.
Only approximate.
Example:
Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
2f2
1
=
0.943
,

=
= 1.047
1 = 2f
2
f
f
s

Ripple: 20 log10 (1 + ) = 0.1 dB, 20 log10 = 35 dB

= 10
M
DSP and Digital Filters (2016-7833)

0.1
20

1 = 0.0116, = 10

5.64.3 log10 (2104 )


1.0470.943

10.25
0.105

35
20

= 98

= 0.0178
358
or 2.2
= 117
Windows: 6 8 / 12

Example Design
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Specifications:
Bandpass: 1 = 0.5, 2 = 1

DSP and Digital Filters (2016-7833)

0.5

0
0

Windows: 6 9 / 12

Example Design
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Specifications:
Bandpass: 1 = 0.5, 2 = 1
Transition bandwidth: = 0.1

DSP and Digital Filters (2016-7833)

0.5

0
0

Windows: 6 9 / 12

Example Design
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Specifications:
Bandpass: 1 = 0.5, 2 = 1
Transition bandwidth: = 0.1
Ripple: = = 0.02

DSP and Digital Filters (2016-7833)

0.5

0
0

Windows: 6 9 / 12

Example Design
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Specifications:
Bandpass: 1 = 0.5, 2 = 1
Transition bandwidth: = 0.1
Ripple: = = 0.02
20 log10 = 34 dB

DSP and Digital Filters (2016-7833)

0.5

0
0

Windows: 6 9 / 12

Example Design
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Specifications:
Bandpass: 1 = 0.5, 2 = 1
Transition bandwidth: = 0.1
Ripple: = = 0.02
20 log10 = 34 dB
20 log10 (1 + ) = 0.17 dB

DSP and Digital Filters (2016-7833)

0.5

0
0

Windows: 6 9 / 12

Example Design
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Specifications:
Bandpass: 1 = 0.5, 2 = 1
Transition bandwidth: = 0.1
Ripple: = = 0.02
20 log10 = 34 dB
20 log10 (1 + ) = 0.17 dB

0.5

0
0

Order:

DSP and Digital Filters (2016-7833)

5.64.3 log10 ()
2 1

= 92

Windows: 6 9 / 12

Example Design
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Specifications:
Bandpass: 1 = 0.5, 2 = 1
Transition bandwidth: = 0.1
Ripple: = = 0.02
20 log10 = 34 dB
20 log10 (1 + ) = 0.17 dB

0.5

0
0

Order:

5.64.3 log10 ()
2 1

= 92

Ideal Impulse Response:


Difference of two lowpass filters

DSP and Digital Filters (2016-7833)

Windows: 6 9 / 12

Example Design
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Specifications:
Bandpass: 1 = 0.5, 2 = 1
Transition bandwidth: = 0.1
Ripple: = = 0.02
20 log10 = 34 dB
20 log10 (1 + ) = 0.17 dB

0.5

0
0

Order:

5.64.3 log10 ()
2 1

= 92

Ideal Impulse Response:


Difference of two lowpass filters

h[n] =

DSP and Digital Filters (2016-7833)

sin 2 n
n

sin 1 n
n

Windows: 6 9 / 12

Example Design
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Specifications:
Bandpass: 1 = 0.5, 2 = 1
Transition bandwidth: = 0.1
Ripple: = = 0.02
20 log10 = 34 dB
20 log10 (1 + ) = 0.17 dB

0.5

0
0

Order:

5.64.3 log10 ()
2 1

= 92

Ideal Impulse Response:


Difference of two lowpass filters

h[n] =

sin 2 n
n

sin 1 n
n

Kaiser Window: = 2.5

DSP and Digital Filters (2016-7833)

Windows: 6 9 / 12

Example Design
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Specifications:
Bandpass: 1 = 0.5, 2 = 1
Transition bandwidth: = 0.1
Ripple: = = 0.02
20 log10 = 34 dB
20 log10 (1 + ) = 0.17 dB

0.5

0
0

Order:

5.64.3 log10 ()
2 1

= 92

Ideal Impulse Response:


Difference of two lowpass filters

h[n] =

sin 2 n
n

sin 1 n
n

Kaiser Window: = 2.5


M=92
0

DSP and Digital Filters (2016-7833)

Windows: 6 9 / 12

Example Design
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Specifications:
Bandpass: 1 = 0.5, 2 = 1
Transition bandwidth: = 0.1
Ripple: = = 0.02
20 log10 = 34 dB
20 log10 (1 + ) = 0.17 dB

0.5

0
0

Order:

5.64.3 log10 ()
2 1

= 92

Ideal Impulse Response:


Difference of two lowpass filters

h[n] =

sin 2 n
n

sin 1 n
n

M=92
= 2.5

0.5

0
0

Kaiser Window: = 2.5


M=92
0

DSP and Digital Filters (2016-7833)

Windows: 6 9 / 12

Example Design
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Specifications:
Bandpass: 1 = 0.5, 2 = 1
Transition bandwidth: = 0.1
Ripple: = = 0.02
20 log10 = 34 dB
20 log10 (1 + ) = 0.17 dB

0.5

0
0

Order:

5.64.3 log10 ()
2 1

= 92

Ideal Impulse Response:


Difference of two lowpass filters

h[n] =

sin 2 n
n

sin 1 n
n

M=92
= 2.5

0.5

0
0

M=92
= 2.5

Kaiser Window: = 2.5


-20
M=92

-40
0

-60
0

DSP and Digital Filters (2016-7833)

Windows: 6 9 / 12

Frequency sampling
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Take M + 1 uniform samples of H(ej )

DSP and Digital Filters (2016-7833)

Windows: 6 10 / 12

Frequency sampling
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Take M + 1 uniform samples of H(ej )

M+1=93

0.5

DSP and Digital Filters (2016-7833)

-2

Windows: 6 10 / 12

Frequency sampling
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Take M + 1 uniform samples of H(ej ); take IDFT to obtain h[n]

M+1=93

0.5

DSP and Digital Filters (2016-7833)

-2

Windows: 6 10 / 12

Frequency sampling
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Take M + 1 uniform samples of H(ej ); take IDFT to obtain h[n]

M+1=93

0.5

DSP and Digital Filters (2016-7833)

M+1=93

0.5

-2

0
0

Windows: 6 10 / 12

Frequency sampling
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Take M + 1 uniform samples of H(ej ); take IDFT to obtain h[n]


Advantage:
exact match at sample points

M+1=93

0.5

DSP and Digital Filters (2016-7833)

M+1=93

0.5

-2

0
0

Windows: 6 10 / 12

Frequency sampling
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Take M + 1 uniform samples of H(ej ); take IDFT to obtain h[n]


Advantage:
exact match at sample points
Disadvantage:
poor intermediate approximation if spectrum is varying rapidly

M+1=93

0.5

DSP and Digital Filters (2016-7833)

M+1=93

0.5

-2

0
0

Windows: 6 10 / 12

Frequency sampling
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Take M + 1 uniform samples of H(ej ); take IDFT to obtain h[n]


Advantage:
exact match at sample points
Disadvantage:
poor intermediate approximation if spectrum is varying rapidly
Solutions:
(1) make the filter transitions smooth over width

M+1=93

0.5

DSP and Digital Filters (2016-7833)

M+1=93

0.5

-2

0
0

Windows: 6 10 / 12

Frequency sampling
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Take M + 1 uniform samples of H(ej ); take IDFT to obtain h[n]


Advantage:
exact match at sample points
Disadvantage:
poor intermediate approximation if spectrum is varying rapidly
Solutions:
(1) make the filter transitions smooth over width
(2) oversample and do least squares fit (cant use IDFT)

M+1=93

0.5

DSP and Digital Filters (2016-7833)

M+1=93

0.5

-2

0
0

Windows: 6 10 / 12

Frequency sampling
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Take M + 1 uniform samples of H(ej ); take IDFT to obtain h[n]


Advantage:
exact match at sample points
Disadvantage:
poor intermediate approximation if spectrum is varying rapidly
Solutions:
(1) make the filter transitions smooth over width
(2) oversample and do least squares fit (cant use IDFT)
(3) use non-uniform points with more near transition (cant use IDFT)
1

M+1=93

0.5

DSP and Digital Filters (2016-7833)

M+1=93

0.5

-2

0
0

Windows: 6 10 / 12

Summary
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Make an FIR filter by windowing the IDTFT of the ideal response

DSP and Digital Filters (2016-7833)

Windows: 6 11 / 12

Summary
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Make an FIR filter by windowing the IDTFT of the ideal response


0 n
Ideal lowpass has h[n] = sinn

DSP and Digital Filters (2016-7833)

Windows: 6 11 / 12

Summary
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Make an FIR filter by windowing the IDTFT of the ideal response


0 n
Ideal lowpass has h[n] = sinn
Add/subtract lowpass filters to make any piecewise constant

DSP and Digital Filters (2016-7833)

response

Windows: 6 11 / 12

Summary
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Make an FIR filter by windowing the IDTFT of the ideal response


0 n
Ideal lowpass has h[n] = sinn
Add/subtract lowpass filters to make any piecewise constant
response

Ideal filter response is with the DTFT of the window

DSP and Digital Filters (2016-7833)

Windows: 6 11 / 12

Summary
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Make an FIR filter by windowing the IDTFT of the ideal response


0 n
Ideal lowpass has h[n] = sinn
Add/subtract lowpass filters to make any piecewise constant
response

Ideal filter response is with the DTFT of the window


Rectangular window (W (z) = Dirichlet kernel) has 13 dB

DSP and Digital Filters (2016-7833)

sidelobes and is always a bad idea

Windows: 6 11 / 12

Summary
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Make an FIR filter by windowing the IDTFT of the ideal response


0 n
Ideal lowpass has h[n] = sinn
Add/subtract lowpass filters to make any piecewise constant
response

Ideal filter response is with the DTFT of the window


Rectangular window (W (z) = Dirichlet kernel) has 13 dB
sidelobes and is always a bad idea
Hamming, Blackman-Harris are good

DSP and Digital Filters (2016-7833)

Windows: 6 11 / 12

Summary
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Make an FIR filter by windowing the IDTFT of the ideal response


0 n
Ideal lowpass has h[n] = sinn
Add/subtract lowpass filters to make any piecewise constant
response

Ideal filter response is with the DTFT of the window


Rectangular window (W (z) = Dirichlet kernel) has 13 dB
sidelobes and is always a bad idea
Hamming, Blackman-Harris are good
Kaiser good with trading off main lobe width v. sidelobes

DSP and Digital Filters (2016-7833)

Windows: 6 11 / 12

Summary
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Make an FIR filter by windowing the IDTFT of the ideal response


0 n
Ideal lowpass has h[n] = sinn
Add/subtract lowpass filters to make any piecewise constant
response

Ideal filter response is with the DTFT of the window


Rectangular window (W (z) = Dirichlet kernel) has 13 dB
sidelobes and is always a bad idea
Hamming, Blackman-Harris are good
Kaiser good with trading off main lobe width v. sidelobes

Uncertainty principle: cannot be concentrated in both time and


frequency

DSP and Digital Filters (2016-7833)

Windows: 6 11 / 12

Summary
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Make an FIR filter by windowing the IDTFT of the ideal response


0 n
Ideal lowpass has h[n] = sinn
Add/subtract lowpass filters to make any piecewise constant
response

Ideal filter response is with the DTFT of the window


Rectangular window (W (z) = Dirichlet kernel) has 13 dB
sidelobes and is always a bad idea
Hamming, Blackman-Harris are good
Kaiser good with trading off main lobe width v. sidelobes

Uncertainty principle: cannot be concentrated in both time and


frequency

Frequency sampling: IDFT of uniform frequency samples: not so great

DSP and Digital Filters (2016-7833)

Windows: 6 11 / 12

Summary
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

Make an FIR filter by windowing the IDTFT of the ideal response


0 n
Ideal lowpass has h[n] = sinn
Add/subtract lowpass filters to make any piecewise constant
response

Ideal filter response is with the DTFT of the window


Rectangular window (W (z) = Dirichlet kernel) has 13 dB
sidelobes and is always a bad idea
Hamming, Blackman-Harris are good
Kaiser good with trading off main lobe width v. sidelobes

Uncertainty principle: cannot be concentrated in both time and


frequency

Frequency sampling: IDFT of uniform frequency samples: not so great


For further details see Mitra: 7, 10.

DSP and Digital Filters (2016-7833)

Windows: 6 11 / 12

MATLAB routines
6: Window Filter Design

Inverse DTFT
Rectangular window
Dirichlet Kernel
Window relationships
Common Windows
Uncertainty principle
Order Estimation
Example Design
Frequency sampling
Summary
MATLAB routines

diric(x,n)
hanning
hamming
kaiser
kaiserord

DSP and Digital Filters (2016-7833)

0.5nx
Dirichlet kernel: sin
sin 0.5x
Window functions
(Note periodic option)

Estimate required filter order and

Windows: 6 12 / 12

You might also like