filter design
play

Filter design FIR filters Chebychev design linear phase filter - PowerPoint PPT Presentation

Filter design FIR filters Chebychev design linear phase filter design equalizer design filter magnitude specifications 1 FIR filters finite impulse response (FIR) filter: n 1 y ( t ) = h u ( t ) , t Z


  1. Filter design • FIR filters • Chebychev design • linear phase filter design • equalizer design • filter magnitude specifications 1

  2. FIR filters finite impulse response (FIR) filter: n − 1 � y ( t ) = h τ u ( t − τ ) , t ∈ Z τ =0 • (sequence) u : Z → R is input signal • (sequence) y : Z → R is output signal • h i are called filter coefficients • n is filter order or length Filter design 2

  3. filter frequency response: H : R → C h 0 + h 1 e − iω + · · · + h n − 1 e − i ( n − 1) ω H ( ω ) = n − 1 n − 1 � � = h t cos tω + i h t sin tω t =0 t =0 • (EE tradition uses j = √− 1 instead of i ) • H is periodic and conjugate symmetric, so only need to know/specify for 0 ≤ ω ≤ π FIR filter design problem: choose h so it and H satisfy/optimize specs Filter design 3

  4. example: (lowpass) FIR filter, order n = 21 impulse response h : 0.2 0.1 h ( t ) 0 −0.1 −0.2 0 2 4 6 8 10 12 14 16 18 20 t Filter design 4

  5. frequency response magnitude ( i.e. , | H ( ω ) | ): 1 10 0 10 | H ( ω ) | −1 10 −2 10 −3 10 0 0.5 1 1.5 2 2.5 3 ω frequency response phase ( i.e. , � H ( ω ) ): 3 2 � H ( ω ) 1 0 −1 −2 −3 0 0.5 1 1.5 2 2.5 3 ω Filter design 5

  6. Chebychev design minimize max ω ∈ [0 ,π ] | H ( ω ) − H des ( ω ) | • h is optimization variable • H des : R → C is (given) desired transfer function • convex problem • can add constraints, e.g. , | h i | ≤ 1 sample (discretize) frequency: minimize k =1 ,...,m | H ( ω k ) − H des ( ω k ) | max • sample points 0 ≤ ω 1 < · · · < ω m ≤ π are fixed ( e.g. , ω k = kπ/m ) • m ≫ n (common rule-of-thumb: m = 15 n ) • yields approximation (relaxation) of problem above Filter design 6

  7. Chebychev design via SOCP: minimize t � � A ( k ) h − b ( k ) � � ≤ t, subject to k = 1 , . . . , m where � 1 � cos ω k · · · cos( n − 1) ω k A ( k ) = 0 − sin ω k · · · − sin( n − 1) ω k � � ℜ H des ( ω k ) b ( k ) = ℑ H des ( ω k )   h 0 . .   h = . h n − 1 Filter design 7

  8. Linear phase filters suppose • n = 2 N + 1 is odd • impulse response is symmetric about midpoint: h t = h n − 1 − t , t = 0 , . . . , n − 1 then H ( ω ) = h 0 + h 1 e − iω + · · · + h n 1 e − i ( n − 1) ω − e − iNω (2 h 0 cos Nω + 2 h 1 cos( N − 1) ω + · · · + h N ) = e − iNω � ∆ = H ( ω ) Filter design 8

  9. • term e − iNω represents N -sample delay • � H ( ω ) is real • | H ( ω ) | = | � H ( ω ) | • called linear phase filter ( � H ( ω ) is linear except for jumps of ± π ) Filter design 9

  10. Lowpass filter specifications δ 1 1 /δ 1 δ 2 ω p ω s π ω idea: • pass frequencies in passband [0 , ω p ] • block frequencies in stopband [ ω s , π ] Filter design 10

  11. specifications: • maximum passband ripple ( ± 20 log 10 δ 1 in dB): 1 /δ 1 ≤ | H ( ω ) | ≤ δ 1 , 0 ≤ ω ≤ ω p • minimum stopband attenuation ( − 20 log 10 δ 2 in dB): | H ( ω ) | ≤ δ 2 , ω s ≤ ω ≤ π Filter design 11

  12. Linear phase lowpass filter design • sample frequency • can assume wlog � H (0) > 0 , so ripple spec is 1 /δ 1 ≤ � H ( ω k ) ≤ δ 1 design for maximum stopband attenuation: minimize δ 2 1 /δ 1 ≤ � subject to H ( ω k ) ≤ δ 1 , 0 ≤ ω k ≤ ω p − δ 2 ≤ � H ( ω k ) ≤ δ 2 , ω s ≤ ω k ≤ π Filter design 12

  13. • passband ripple δ 1 is given • an LP in variables h , δ 2 • known (and used) since 1960’s • can add other constraints, e.g. , | h i | ≤ α variations and extensions: • fix δ 2 , minimize δ 1 (convex, but not LP) • fix δ 1 and δ 2 , minimize ω s (quasiconvex) • fix δ 1 and δ 2 , minimize order n (quasiconvex) Filter design 13

  14. example • linear phase filter, n = 21 • passband [0 , 0 . 12 π ] ; stopband [0 . 24 π, π ] • max ripple δ 1 = 1 . 012 ( ± 0 . 1 dB) • design for maximum stopband attenuation impulse response h : 0.2 0.1 h ( t ) 0 −0.1 −0.2 0 2 4 6 8 10 12 14 16 18 20 t Filter design 14

  15. frequency response magnitude ( i.e. , | H ( ω ) | ): 1 10 0 10 | H ( ω ) | −1 10 −2 10 −3 10 0 0.5 1 1.5 2 2.5 3 ω frequency response phase ( i.e. , � H ( ω ) ): 3 2 1 � H ( ω ) 0 −1 −2 −3 0 0.5 1 1.5 2 2.5 3 ω Filter design 15

  16. Equalizer design H ( ω ) G ( ω ) equalization: given • G (unequalized frequency response) • G des (desired frequency response) ∆ design (FIR equalizer) H so that � G = GH ≈ G des • common choice: G des ( ω ) = e − iDω (delay) i.e. , equalization is deconvolution (up to delay) • can add constraints on H , e.g. , limits on | h i | or max ω | H ( ω ) | Filter design 16

  17. Chebychev equalizer design: � � � � � � minimize max G ( ω ) − G des ( ω ) � ω ∈ [0 ,π ] convex; SOCP after sampling frequency Filter design 17

  18. time-domain equalization: optimize impulse response ˜ g of equalized system e.g. , with G des ( ω ) = e − iDω , � 1 t = D g des ( t ) = 0 t � = D sample design: minimize max t � = D | ˜ g ( t ) | subject to ˜ g ( D ) = 1 • an LP • can use � g ( t ) 2 or � t � = D ˜ t � = D | ˜ g ( t ) | Filter design 18

  19. extensions: • can impose (convex) constraints • can mix time- and frequency-domain specifications • can equalize multiple systems, i.e. , choose H so G ( k ) H ≈ G des , k = 1 , . . . , K • can equalize multi-input multi-output systems ( i.e. , G and H are matrices) • extends to multidimensional systems, e.g. , image processing Filter design 19

  20. Equalizer design example unequalized system G is 10 th order FIR: 1 0.8 0.6 g ( t ) 0.4 0.2 0 −0.2 −0.4 0 1 2 3 4 5 6 7 8 9 t Filter design 20

  21. 1 10 | G ( ω ) | 0 10 −1 10 0 0.5 1 1.5 2 2.5 3 ω 3 2 � G ( ω ) 1 0 −1 −2 −3 0 0.5 1 1.5 2 2.5 3 ω design 30 th order FIR equalizer with � G ( ω ) ≈ e − i 10 ω Filter design 21

  22. Chebychev equalizer design: � G ( ω ) − e − i 10 ω � � � � ˜ minimize max � ω equalized system impulse response ˜ g 1 0.8 g ( t ) 0.6 ˜ 0.4 0.2 0 −0.2 0 5 10 15 20 25 30 35 t Filter design 22

  23. � equalized frequency response magnitude | � G | 1 10 G ( ω ) | 0 10 | e −1 10 0 0.5 1 1.5 2 2.5 3 ω � equalized frequency response phase � G 3 2 G ( ω ) 1 0 e −1 −2 −3 0 0.5 1 1.5 2 2.5 3 ω Filter design 23

  24. time-domain equalizer design: minimize max t � =10 | ˜ g ( t ) | equalized system impulse response ˜ g 1 0.8 0.6 g ( t ) 0.4 ˜ 0.2 0 −0.2 0 5 10 15 20 25 30 35 t Filter design 24

  25. � equalized frequency response magnitude | � G | 1 10 0 10 G ( ω ) | | e −1 10 0 0.5 1 1.5 2 2.5 3 ω � equalized frequency response phase � G 3 2 1 0 G ( ω ) −1 e −2 −3 0 0.5 1 1.5 2 2.5 3 ω Filter design 25

  26. Filter magnitude specifications transfer function magnitude spec has form L ( ω ) ≤ | H ( ω ) | ≤ U ( ω ) , ω ∈ [0 , π ] where L, U : R → R + are given • lower bound is not convex in filter coefficients h • arises in many applications, e.g. , audio, spectrum shaping • can change variables to solve via convex optimization Filter design 26

  27. Autocorrelation coefficients autocorrelation coefficients associated with impulse response 1 ) ∈ R n are h = ( h 0 , . . . , h n − � r t = h τ h τ + t τ (we take h k = 0 for k < 0 or k ≥ n ) • r t = r − t ; r t = 0 for | t | ≥ n 1 ) ∈ R n • hence suffices to specify r = ( r 0 , . . . , r n − Filter design 27

  28. Fourier transform of autocorrelation coefficients is n − 1 � � e − iωτ r τ = r 0 + 2 r t cos ωt = | H ( ω ) | 2 R ( ω ) = τ t =1 • always have R ( ω ) ≥ 0 for all ω • can express magnitude specification as L ( ω ) 2 ≤ R ( ω ) ≤ U ( ω ) 2 , ω ∈ [0 , π ] . . . convex in r Filter design 28

  29. Spectral factorization question: when is r ∈ R n the autocorrelation coefficients of some h ∈ R n ? answer: ( spectral factorization theorem ) if and only if R ( ω ) ≥ 0 for all ω • spectral factorization condition is convex in r • many algorithms for spectral factorization, i.e. , finding an h s.t. R ( ω ) = | H ( ω ) | 2 magnitude design via autocorrelation coefficients: • use r as variable (instead of h ) • add spectral factorization condition R ( ω ) ≥ 0 for all ω • optimize over r • use spectral factorization to recover h Filter design 29

  30. log-Chebychev magnitude design choose h to minimize max | 20 log 10 | H ( ω ) | − 20 log 10 D ( ω ) | ω • D is desired transfer function magnitude ( D ( ω ) > 0 for all ω ) • find minimax logarithmic (dB) fit reformulate as minimize t D ( ω ) 2 /t ≤ R ( ω ) ≤ tD ( ω ) 2 , subject to 0 ≤ ω ≤ π • convex in variables r , t • constraint includes spectral factorization condition Filter design 30

  31. example: 1 /f (pink noise) filter ( i.e. , D ( ω ) = 1 / √ ω ), n = 50 , log-Chebychev design over 0 . 01 π ≤ ω ≤ π 1 10 0 10 | H ( ω ) | 2 −1 10 −2 10 −1 0 10 10 ω optimal fit: ± 0 . 5 dB Filter design 31

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend