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-8872) 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-8872) 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-8872) P∞ −∞ h[n]e−jωn 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-8872) P∞ −∞ −jωn h[n]e ⇔ h[n] = 1 2π Rπ −π H(ejω )ejωn 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 ) = P∞ −∞ −jωn h[n]e ⇔ h[n] = 1 2π Rπ −π H(ejω )ejωn dω If we know H(ejω ) exactly, the IDTFT gives the ideal h[n] DSP and Digital Filters (2016-8872) 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 ) = P∞ −∞ −jωn h[n]e ⇔ h[n] = 1 2π Rπ −π H(ejω )ejωn 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 2ω0 0.5 0 DSP and Digital Filters (2016-8872) -2 0 ω 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 ) = P∞ −∞ −jωn h[n]e ⇔ h[n] = 1 2π Rπ −π H(ejω )ejωn 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 1 2ω0 0.5 0 DSP and Digital Filters (2016-8872) sin ω0 n πn -2 0 ω 2 0 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 ) = P∞ −∞ −jωn h[n]e ⇔ h[n] = 1 2π Rπ −π H(ejω )ejωn 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 1 2ω0 0.5 0 sin ω0 n πn -2 0 ω 0 2 2π Note: Width in ω is 2ω0 , width in n is ω 0 DSP and Digital Filters (2016-8872) 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 ) = P∞ −∞ −jωn h[n]e ⇔ h[n] = 1 2π Rπ −π H(ejω )ejωn 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 1 2ω0 0.5 0 sin ω0 n πn -2 0 ω 0 2 2π : product is 4π always Note: Width in ω is 2ω0 , width in n is ω 0 DSP and Digital Filters (2016-8872) 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 ) = P∞ −∞ −jωn h[n]e ⇔ h[n] = 1 2π Rπ −π H(ejω )ejωn 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 1 2ω0 0.5 0 sin ω0 n πn -2 0 ω 2 0 2π : product is 4π always Note: Width in ω is 2ω0 , width in n is ω 0 Sadly h[n] is infinite and non-causal. DSP and Digital Filters (2016-8872) 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 ) = P∞ −∞ −jωn h[n]e ⇔ h[n] = 1 2π Rπ −π H(ejω )ejωn 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 1 2ω0 0.5 0 sin ω0 n πn -2 0 ω 2 0 2π : product is 4π always Note: Width in ω is 2ω0 , 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-8872) 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 0 DSP and Digital Filters (2016-8872) 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 0 DSP and Digital Filters (2016-8872) 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] 1 M=14 M=14 0.5 0 DSP and Digital Filters (2016-8872) 0 0 1 ω 2 3 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 −jωn jω 2 h [n]e H(e ) − dω −π −M 1 2 h1[n] 1 M=14 M=14 0.5 0 DSP and Digital Filters (2016-8872) 0 0 1 ω 2 3 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 −jωn jω 2 h [n]e H(e ) − dω −π −M 1 2 Minimum E is when h1 [n] = h[n]. h1[n] 1 M=14 M=14 0.5 0 DSP and Digital Filters (2016-8872) 0 0 1 ω 2 3 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 −jωn jω 2 h [n]e H(e ) − dω −π −M 1 2 Minimum E is when h1 [n] = h[n]. Proof: From Parseval: E = h1[n] P M2 −M 2 2 |h[n] − h1 [n]| + P |n|> M 2 |h[n]| 2 1 M=14 M=14 0.5 0 DSP and Digital Filters (2016-8872) 0 0 1 ω 2 3 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 −jωn jω 2 h [n]e H(e ) − dω −π −M 1 2 Minimum E is when h1 [n] = h[n]. Proof: From Parseval: E = P M2 −M 2 2 |h[n] − h1 [n]| + P |n|> M 2 |h[n]| 2 However: 9% overshoot at a discontinuity even for large n. h1[n] 1 M=14 M=14 0.5 0 DSP and Digital Filters (2016-8872) 0 0 1 ω 2 3 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 −jωn jω 2 h [n]e H(e ) − dω −π −M 1 2 Minimum E is when h1 [n] = h[n]. Proof: From Parseval: E = P M2 −M 2 2 |h[n] − h1 [n]| + P |n|> M 2 |h[n]| 2 However: 9% overshoot at a discontinuity even for large n. h1[n] 1 M=14 M=28 M=14 0.5 0 DSP and Digital Filters (2016-8872) 0 0 1 ω 2 3 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 −jωn jω 2 h [n]e H(e ) − dω −π −M 1 2 Minimum E is when h1 [n] = h[n]. Proof: From Parseval: E = P M2 −M 2 2 |h[n] − h1 [n]| + P |n|> M 2 |h[n]| 2 However: 9% overshoot at a discontinuity even for large n. h2[n] 1 M=14 M=28 M=14 0.5 0 0 0 Normal to delay by DSP and Digital Filters (2016-8872) M 2 1 ω jω to make causal. Multiplies H(e 2 3 −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-8872) 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-8872) 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-8872) P M2 −M 2 e−jω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 ) = DSP and Digital Filters (2016-8872) P M2 −M 2 (i) e−jωn = 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-8872) P M2 (i) e−jωn = 1 + 2 P0.5M 1 cos (nω) + e−jω(+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-8872) P M2 (i) e−jωn = 1 + 2 P0.5M 1 (ii) sin 0.5(M +1)ω cos (nω)= sin 0.5ω + e−jω(+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-8872) P M2 (i) e−jωn = 1 + 2 P0.5M 1 (ii) sin 0.5(M +1)ω cos (nω)= sin 0.5ω + e−jω(+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) e−jωn = 1 + 2 P0.5M 1 (ii) sin 0.5(M +1)ω cos (nω)= sin 0.5ω + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc) DSP and Digital Filters (2016-8872) 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 e−jωn = 1 + 2 P0.5M 1 (ii) sin 0.5(M +1)ω cos (nω)= sin 0.5ω + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc) 1 0.5 0 -2 1 0 ω 2 0 ω 2 M=14 0.5 0 -2 DSP and Digital Filters (2016-8872) 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 e−jωn = 1 + 2 P0.5M 1 (ii) sin 0.5(M +1)ω cos (nω)= sin 0.5ω + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc) 1 1 0.5 0.5 0 0 -2 1 0 ω 2 0 ω 2 4π/(M+1) -2 0 ω 2 M=14 0.5 0 -2 DSP and Digital Filters (2016-8872) 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 e−jωn = 1 + 2 P0.5M 1 (ii) sin 0.5(M +1)ω cos (nω)= sin 0.5ω + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc) 1 1 0.5 0.5 0 0 -2 1 0 ω 2 0 ω 2 1 4π/(M+1) 0.5 0 -2 0 ω 2 -2 0 ω 2 M=14 0.5 0 -2 DSP and Digital Filters (2016-8872) 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 e−jωn = 1 + 2 P0.5M 1 (ii) sin 0.5(M +1)ω cos (nω)= sin 0.5ω + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc) 1 1 0.5 0.5 0 0 -2 1 0 ω 2 1 4π/(M+1) 0.5 0 -2 0 ω 2 -2 0 ω 2 2π Provided that M4π ≪ 2ω ⇔ M + 1 ≫ 0 +1 ω0 : M=14 0.5 0 -2 DSP and Digital Filters (2016-8872) 0 ω 2 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 e−jωn = 1 + 2 P0.5M 1 (ii) sin 0.5(M +1)ω cos (nω)= sin 0.5ω + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc) 1 1 0.5 0.5 0 0 -2 1 0 ω 2 1 4π/(M+1) 0.5 0 -2 0 ω 2 -2 0 ω 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-8872) 0 ω 2 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 e−jωn = 1 + 2 P0.5M 1 (ii) sin 0.5(M +1)ω cos (nω)= sin 0.5ω + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc) 1 1 0.5 0.5 0 0 -2 1 0 ω 2 1 4π/(M+1) 0.5 0 -2 0 ω 2 -2 0 ω 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-8872) 0 ω 2 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 e−jωn = 1 + 2 P0.5M 1 (ii) sin 0.5(M +1)ω cos (nω)= sin 0.5ω + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc) 1 1 0.5 0.5 0 0 -2 1 0 ω 2 4π/(M+1) 0.5 0 -2 0 ω 2 -2 0 ω 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-8872) 1 0 ω 2 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 e−jωn = 1 + 2 P0.5M 1 (ii) sin 0.5(M +1)ω cos (nω)= sin 0.5ω + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc) 1 1 0.5 0.5 0 0 -2 1 0 ω 2 0.5 0 DSP and Digital Filters (2016-8872) 4π/(M+1) 0.5 0 -2 0 ω 2 -2 0 ω 2 2π Provided that M4π ≪ 2ω ⇔ M + 1 ≫ 0 +1 ω0 : 2π Passband ripple: ∆ω ≈ M4π +1 , stopband M +1 M=14 -2 1 0 ω 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-8872) 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ω ) 1 0.5 0 DSP and Digital Filters (2016-8872) -2 0 ω 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-8872) -2 0 ω 2 -2 0 ω 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 1 10 0.5 1 6: Window Filter Design 0.5 0 0 DSP and Digital Filters (2016-8872) 0 -2 0 ω 2 -2 0 ω 2 -2 0 ω 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 1 10 0.5 1 6: Window Filter Design 0.5 0 0 0 -2 0 ω 2 -2 (a) passband gain ≈ w[0]; peak≈ DSP and Digital Filters (2016-8872) 0 ω w[0] 2 2 + -2 0.5 2π R 0 ω 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 1 10 0.5 1 6: Window Filter Design 0.5 0 0 0 -2 0 ω 2 -2 0 ω w[0] 2 2 -2 0.5 2π 0 ω 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-8872) R 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 1 10 0.5 1 6: Window Filter Design 0.5 0 0 0 -2 0 ω 2 -2 0 ω w[0] 2 2 -2 0.5 2π 0 ω 2 jω + W (e )dω (a) passband gain ≈ w[0]; peak≈ mainlobe rectangular window: passband gain = 1; peak gain = 1.09 R (b) transition bandwidth, ∆ω = width of the main lobe transition amplitude, ∆H = integral of main lobe÷2π DSP and Digital Filters (2016-8872) 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 1 10 0.5 1 6: Window Filter Design 0.5 0 0 0 -2 0 ω 2 -2 0 ω w[0] 2 2 -2 0.5 2π 0 ω 2 jω + W (e )dω (a) passband gain ≈ w[0]; peak≈ mainlobe rectangular window: passband gain = 1; peak gain = 1.09 R (b) transition bandwidth, ∆ω = width of the main lobe transition amplitude, ∆H = integral of main lobe÷2π rectangular window: ∆ω = M4π +1 , ∆H ≈ 1.18 DSP and Digital Filters (2016-8872) 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 1 10 0.5 1 6: Window Filter Design 0.5 0 0 0 -2 0 ω 2 -2 0 ω w[0] 2 2 -2 0.5 2π 0 ω 2 jω + W (e )dω (a) passband gain ≈ w[0]; peak≈ mainlobe rectangular window: passband gain = 1; peak gain = 1.09 R (b) transition bandwidth, ∆ω = width of the main lobe transition amplitude, ∆H = integral of main lobe÷2π rectangular window: ∆ω = M4π +1 , ∆H ≈ 1.18 (c) stopband gain is an integral over oscillating sidelobes of W (ejω ) DSP and Digital Filters (2016-8872) 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 1 10 0.5 1 6: Window Filter Design 0.5 0 0 0 -2 0 ω 2 -2 0 ω w[0] 2 2 -2 0.5 2π 0 ω 2 jω + W (e )dω (a) passband gain ≈ w[0]; peak≈ mainlobe rectangular window: passband gain = 1; peak gain = 1.09 R (b) transition bandwidth, ∆ω = width of the main lobe transition amplitude, ∆H = integral of main lobe÷2π rectangular window: ∆ω = M4π +1 , ∆H ≈ 1.18 (c) stopband gain is an integral over oscillatingsidelobes of W (ejω ) +1 rect window: min H(ejω ) = 0.09 ≪ min W (ejω ) = M 1.5π DSP and Digital Filters (2016-8872) 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 1 10 0.5 1 6: Window Filter Design 0.5 0 0 0 -2 0 ω 2 -2 0 ω w[0] 2 2 -2 0.5 2π 0 ω 2 jω + W (e )dω (a) passband gain ≈ w[0]; peak≈ mainlobe rectangular window: passband gain = 1; peak gain = 1.09 R (b) transition bandwidth, ∆ω = width of the main lobe transition amplitude, ∆H = integral of main lobe÷2π rectangular window: ∆ω = M4π +1 , ∆H ≈ 1.18 (c) stopband gain is an integral over oscillatingsidelobes 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-8872) 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-8872) 0 -13 dB 6.27/(M+1) -50 0 1 ω 2 3 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 don’t use DSP and Digital Filters (2016-8872) 0 -13 dB 6.27/(M+1) -50 0 1 ω 2 3 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 don’t use 0 -50 0 Hanning: 0.5 + 0.5c1 ck = cos DSP and Digital Filters (2016-8872) 2πkn M +1 -13 dB 6.27/(M+1) 0 1 ω 2 3 12.56/(M+1) -31 dB -50 0 1 ω 2 3 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 don’t use 0 -50 0 Hanning: 0.5 + 0.5c1 ck = cos 2πkn M +1 rapid sidelobe decay DSP and Digital Filters (2016-8872) -13 dB 6.27/(M+1) 0 1 ω 2 3 12.56/(M+1) -31 dB -50 0 1 ω 2 3 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 don’t use 0 -50 0 Hanning: 0.5 + 0.5c1 ck = cos 2πkn M +1 rapid sidelobe decay Hamming: 0.54 + 0.46c1 0 1 ω 2 3 12.56/(M+1) -31 dB -50 0 0 1 ω 2 3 12.56/(M+1) -40 dB -50 0 DSP and Digital Filters (2016-8872) -13 dB 6.27/(M+1) 1 ω 2 3 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 don’t use 0 -50 0 Hanning: 0.5 + 0.5c1 ck = cos 2πkn M +1 rapid sidelobe decay Hamming: 0.54 + 0.46c1 best peak sidelobe 0 1 ω 2 3 12.56/(M+1) -31 dB -50 0 0 1 ω 2 3 12.56/(M+1) -40 dB -50 0 DSP and Digital Filters (2016-8872) -13 dB 6.27/(M+1) 1 ω 2 3 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 don’t use 0 -50 0 Hanning: 0.5 + 0.5c1 ck = cos 2πkn M +1 rapid sidelobe decay Hamming: 0.54 + 0.46c1 best peak sidelobe 0 0.42 + 0.5c1 + 0.08c2 ω 2 3 12.56/(M+1) -50 0 0 1 ω 2 3 12.56/(M+1) -40 dB -50 1 0 ω 2 3 18.87/(M+1) -50 0 DSP and Digital Filters (2016-8872) 1 -31 dB 0 Blackman-Harris 3-term: -13 dB 6.27/(M+1) -70 dB 1 ω 2 3 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 don’t use 0 -50 0 Hanning: 0.5 + 0.5c1 ck = cos 2πkn M +1 rapid sidelobe decay Hamming: 0.54 + 0.46c1 best peak sidelobe 0 0.42 + 0.5c1 + 0.08c2 best peak sidelobe DSP and Digital Filters (2016-8872) 1 ω 2 3 12.56/(M+1) -31 dB -50 0 0 1 ω 2 3 12.56/(M+1) -40 dB -50 0 Blackman-Harris 3-term: -13 dB 6.27/(M+1) 1 0 ω 2 18.87/(M+1) -50 0 3 -70 dB 1 ω 2 3 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 don’t use 0 -50 0 Hanning: 0.5 + 0.5c1 ck = cos 2πkn M +1 rapid sidelobe decay Hamming: 0.54 + 0.46c1 best peak sidelobe 0 0.42 + 0.5c1 + 0.08c2 best peak sidelobe Kaiser: q 2 I0 β 1−( 2n M ) I0 (β) β controls width v sidelobes ω 2 3 -31 dB -50 0 0 1 ω 2 3 12.56/(M+1) -40 dB -50 1 0 ω 2 -70 dB 0 0 -50 3 18.87/(M+1) -50 1 ω 2 3 13.25/(M+1) -40 dB β = 5.3 0 1 0 -50 ω 2 3 21.27/(M+1) β = 9.5 0 DSP and Digital Filters (2016-8872) 1 12.56/(M+1) 0 Blackman-Harris 3-term: -13 dB 6.27/(M+1) -70 dB 1 ω 2 3 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 don’t use 0 -50 0 Hanning: 0.5 + 0.5c1 ck = cos 2πkn M +1 rapid sidelobe decay Hamming: 0.54 + 0.46c1 best peak sidelobe 0 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-8872) 1 ω 2 3 12.56/(M+1) -31 dB -50 0 0 1 ω 2 3 12.56/(M+1) -40 dB -50 0 Blackman-Harris 3-term: -13 dB 6.27/(M+1) 1 0 ω 2 18.87/(M+1) -50 -70 dB 0 0 -50 1 ω 2 3 13.25/(M+1) -40 dB β = 5.3 0 1 0 -50 3 ω 2 3 21.27/(M+1) β = 9.5 0 -70 dB 1 ω 2 3 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-8872) 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-8872) 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-8872) 12 ≥ 1 2 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 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-8872) 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 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-8872) 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 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-8872) 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 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 Outline: R R 2 2 Assume |x(t)| dt = 1⇒ |X(jω)| dω = 2π DSP and Digital Filters (2016-8872) [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 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 Outline: R R 2 2 Assume |x(t)| dt = 1⇒ |X(jω)| dω = 2π Set v(t) = dx dt ⇒ V (jω) = jωX(jω) [by parts] DSP and Digital Filters (2016-8872) [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 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 Outline: R R 2 2 Assume |x(t)| dt = 1⇒ |X(jω)| dω = 2π Set v(t) = dx dt ⇒ V (jω) = jωX(jω) [by parts] Now DSP and Digital Filters (2016-8872) R ∞ dx 1 2 tx dt dt= 2 tx (t)t=−∞ − R 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 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 Outline: R R 2 2 Assume |x(t)| dt = 1⇒ |X(jω)| dω = 2π Set v(t) = dx dt ⇒ V (jω) = jωX(jω) [by parts] ∞ R 1 2 dx 1 2 Now tx dt dt= 2 tx (t) t=−∞ − 2 x dt = − 12 R 2 R R 2 2 2 dx dt ≤ dt t x dt So 41 = tx dx dt dt R DSP and Digital Filters (2016-8872) [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 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 Outline: R R 2 2 Assume |x(t)| dt = 1⇒ |X(jω)| dω = 2π Set v(t) = dx dt ⇒ V (jω) = jωX(jω) [by parts] ∞ R 1 2 dx 1 2 Now tx dt dt= 2 tx (t) t=−∞ − 2 x dt = − 12 R 2 R R 2 2 2 dx dt ≤ dt t x dt So 41 = tx dx dt dt R = DSP and Digital Filters (2016-8872) R 2 2 t x dt R 2 |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 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 Outline: R R 2 2 Assume |x(t)| dt = 1⇒ |X(jω)| dω = 2π Set v(t) = dx dt ⇒ V (jω) = jωX(jω) [by parts] ∞ R 1 2 dx 1 2 Now tx dt dt= 2 tx (t) t=−∞ − 2 x dt = − 12 R 2 R R 2 2 2 dx dt ≤ dt t x dt So 41 = tx dx dt dt R = DSP and Digital Filters (2016-8872) R 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 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 Outline: R R 2 2 Assume |x(t)| dt = 1⇒ |X(jω)| dω = 2π Set v(t) = dx dt ⇒ V (jω) = jωX(jω) [by parts] ∞ R 1 2 dx 1 2 Now tx dt dt= 2 tx (t) t=−∞ − 2 x dt = − 12 R 2 R R 2 2 2 dx dt ≤ dt t x dt So 41 = tx dx dt dt R [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-8872) 2 2 R 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 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 Outline: R R 2 2 Assume |x(t)| dt = 1⇒ |X(jω)| dω = 2π Set v(t) = dx dt ⇒ V (jω) = jωX(jω) [by parts] ∞ R 1 2 dx 1 2 Now tx dt dt= 2 tx (t) t=−∞ − 2 x dt = − 12 R 2 R R 2 2 2 dx dt ≤ dt t x dt So 41 = tx dx dt dt R [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 2 No exact equivalent for DTFT/DFT but a similar effect is true DSP and Digital Filters (2016-8872) 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-8872) 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-8872) 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 M≈ DSP and Digital Filters (2016-8872) −5.6−4.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 M≈ DSP and Digital Filters (2016-8872) −5.6−4.3 log10 (δǫ) ω2 −ω1 ≈ −8−20 log10 ǫ 2.2∆ω 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 M≈ −5.6−4.3 log10 (δǫ) ω2 −ω1 ≈ −8−20 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-8872) 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 M≈ −5.6−4.3 log10 (δǫ) ω2 −ω1 ≈ −8−20 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-8872) 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 M≈ −5.6−4.3 log10 (δǫ) ω2 −ω1 ≈ −8−20 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,. 2πf2 1 ω1 = 2πf = 0.943 , ω = = 1.047 2 f f s DSP and Digital Filters (2016-8872) s 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 M≈ −5.6−4.3 log10 (δǫ) ω2 −ω1 ≈ −8−20 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,. 2πf2 1 ω1 = 2πf = 0.943 , ω = = 1.047 2 f f s s Ripple: 20 log10 (1 + δ) = 0.1 dB, 20 log10 ǫ = −35 dB DSP and Digital Filters (2016-8872) 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 M≈ −5.6−4.3 log10 (δǫ) ω2 −ω1 ≈ −8−20 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,. 2πf2 1 ω1 = 2πf = 0.943 , ω = = 1.047 2 f f s s Ripple: 20 log10 (1 + δ) = 0.1 dB, 20 log10 ǫ = −35 dB 0.1 δ = 10 20 − 1 = 0.0116, ǫ = 10 DSP and Digital Filters (2016-8872) −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 M≈ −5.6−4.3 log10 (δǫ) ω2 −ω1 ≈ −8−20 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,. 2πf2 1 ω1 = 2πf = 0.943 , ω = = 1.047 2 f f s s Ripple: 20 log10 (1 + δ) = 0.1 dB, 20 log10 ǫ = −35 dB 0.1 δ = 10 20 − 1 = 0.0116, ǫ = 10 M≈ DSP and Digital Filters (2016-8872) −5.6−4.3 log10 (2×10−4 ) 1.047−0.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 M≈ −5.6−4.3 log10 (δǫ) ω2 −ω1 ≈ −8−20 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,. 2πf2 1 ω1 = 2πf = 0.943 , ω = = 1.047 2 f f s s Ripple: 20 log10 (1 + δ) = 0.1 dB, 20 log10 ǫ = −35 dB 0.1 δ = 10 20 − 1 = 0.0116, ǫ = 10 M≈ DSP and Digital Filters (2016-8872) −5.6−4.3 log10 (2×10−4 ) 1.047−0.943 = 10.25 0.105 −35 20 = 98 = 0.0178 35−8 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 M≈ −5.6−4.3 log10 (δǫ) ω2 −ω1 ≈ −8−20 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,. 2πf2 1 ω1 = 2πf = 0.943 , ω = = 1.047 2 f f s s Ripple: 20 log10 (1 + δ) = 0.1 dB, 20 log10 ǫ = −35 dB 0.1 δ = 10 20 − 1 = 0.0116, ǫ = 10 M≈ DSP and Digital Filters (2016-8872) −5.6−4.3 log10 (2×10−4 ) 1.047−0.943 = 10.25 0.105 −35 20 = 98 = 0.0178 35−8 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-8872) 1 0.5 0 0 1 ω 2 3 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-8872) 1 0.5 0 0 1 ω 2 3 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-8872) 1 0.5 0 0 1 ω 2 3 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-8872) 1 0.5 0 0 1 ω 2 3 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-8872) 1 0.5 0 0 1 ω 2 3 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 1 0.5 0 0 1 ω 2 3 Order: M≈ DSP and Digital Filters (2016-8872) −5.6−4.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 1 0.5 0 0 1 ω 2 3 Order: M≈ −5.6−4.3 log10 (δǫ) ω2 −ω1 = 92 Ideal Impulse Response: Difference of two lowpass filters DSP and Digital Filters (2016-8872) 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 1 0.5 0 0 1 ω 2 3 Order: M≈ −5.6−4.3 log10 (δǫ) ω2 −ω1 = 92 Ideal Impulse Response: Difference of two lowpass filters h[n] = DSP and Digital Filters (2016-8872) 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 1 0.5 0 0 1 ω 2 3 Order: M≈ −5.6−4.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-8872) 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 1 0.5 0 0 1 ω 2 3 Order: M≈ −5.6−4.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-8872) 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 1 0.5 0 0 1 ω 2 1 Order: M≈ −5.6−4.3 log10 (δǫ) ω2 −ω1 = 92 Ideal Impulse Response: Difference of two lowpass filters h[n] = sin ω2 n πn sin ω1 n πn − 3 M=92 β = 2.5 0.5 0 0 1 ω 2 3 Kaiser Window: β = 2.5 M=92 0 DSP and Digital Filters (2016-8872) 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 1 0.5 0 0 1 ω 2 1 Order: M≈ −5.6−4.3 log10 (δǫ) ω2 −ω1 = 92 Ideal Impulse Response: Difference of two lowpass filters h[n] = sin ω2 n πn sin ω1 n πn − 3 M=92 β = 2.5 0.5 0 0 1 ω 2 0 3 M=92 β = 2.5 Kaiser Window: β = 2.5 -20 M=92 -40 0 -60 0 DSP and Digital Filters (2016-8872) 1 ω 2 3 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-8872) 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ω ) 1 M+1=93 0.5 0 DSP and Digital Filters (2016-8872) -2 0 ω 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] 1 M+1=93 0.5 0 DSP and Digital Filters (2016-8872) -2 0 ω 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] 1 M+1=93 1 0.5 0 DSP and Digital Filters (2016-8872) M+1=93 0.5 -2 0 ω 2 0 0 1 ω 2 3 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 1 M+1=93 1 0.5 0 DSP and Digital Filters (2016-8872) M+1=93 0.5 -2 0 ω 2 0 0 1 ω 2 3 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 1 M+1=93 1 0.5 0 DSP and Digital Filters (2016-8872) M+1=93 0.5 -2 0 ω 2 0 0 1 ω 2 3 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 1 M+1=93 1 0.5 0 DSP and Digital Filters (2016-8872) M+1=93 0.5 -2 0 ω 2 0 0 1 ω 2 3 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 (can’t use IDFT) 1 M+1=93 1 0.5 0 DSP and Digital Filters (2016-8872) M+1=93 0.5 -2 0 ω 2 0 0 1 ω 2 3 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 (can’t use IDFT) (3) use non-uniform points with more near transition (can’t use IDFT) 1 M+1=93 1 0.5 0 DSP and Digital Filters (2016-8872) M+1=93 0.5 -2 0 ω 2 0 0 1 ω 2 3 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-8872) 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] = sinπn DSP and Digital Filters (2016-8872) 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] = sinπn ◦ Add/subtract lowpass filters to make any piecewise constant DSP and Digital Filters (2016-8872) 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] = sinπn ◦ 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-8872) 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] = sinπn ◦ 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-8872) 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] = sinπn ◦ 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-8872) 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] = sinπn ◦ 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-8872) 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] = sinπn ◦ 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-8872) 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] = sinπn ◦ 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-8872) 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] = sinπn ◦ 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-8872) 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-8872) 0.5nx Dirichlet kernel: sin sin 0.5x Window functions (Note ’periodic’ option) Estimate required filter order and β Windows: 6 – 12 / 12
© Copyright 2026 Paperzz