
Non-Recursive Digital Filter Design Digital Controller Design Digital Controls & Digital Filters Lectures 23 & 24 M.R. Azimi, Professor Department of Electrical and Computer Engineering Colorado State University Spring 2017 M.R. Azimi Digital Control & Digital Filters Non-Recursive Digital Filter Design Digital Controller Design Approximation Methods: FIR Digital Filters FIR filter are described by convolution summation: N−1 y(n) = P h(k)x(n − k) x(n): Input signal y(n): Output signal k=0 h(n): Impulse response (filter coefficients) N: Filter order Advantages: 1 Inherently stable. 2 Linear phase characteristic especially useful in applications where frequency dispersion due to non-linear phase is harmful e.g. speech and audio processing. 3 Quantization effects can be made small. 4 Implementation using parallel/pipeline processors because of inherent concurrency. Disadvantages: 1 For a sharp cut-off performance a large order filter is required =) large computation time for implementation. 2 In some cases "fractional delay" may be needed which can not be realized by physical devices. M.R. Azimi Digital Control & Digital Filters Non-Recursive Digital Filter Design Digital Controller Design Frequency Response of FIR Filters The transfer function of a causal FIR filter is: N−1 H(z) = P h(n)z−n n=0 Let z = ejΩ (i.e. unit circle) N−1 H(ejΩ) = P h(n)e−jΩn = DT F T fh(n)g n=0 2πk Sampling the frequency scale Ω = N yields the N elements of the DFT of h(n) as: N−1 − 2πjkn H(k) = P h(n)e N = DF T fh(n)g; k 2 [0;N − 1] n=0 and N−1 jπjkn 1 P N h(n) = IDF T fH(k)g = N H(k)e ; n 2 [0;N − 1] n=0 Now, consider the following cases. M.R. Azimi Digital Control & Digital Filters Non-Recursive Digital Filter Design Digital Controller Design Frequency Response of FIR Filters-Cont. Case 1: Symmetric: h(n) = h(N − 1 − n) and N odd (N−1) 2 jΩ −jΩ (N−1) H(e ) = e 2 P α(n) cos Ωn n=0 where h (N−1) i N−1 α(n) , 2h 2 − n ; n 2 [1; 2 ] (n−1) α(0) , h 2 (N−1) φ(Ω) = −Ω 2 : linear dφ(Ω) N−1 Group delay τg = − dΩ = 2 : Integer Case 2: Symmetric: h(n) = h(N − 1 − n) and N Even N=2 jΩ −jΩ (N−1) H(e ) = e 2 P β(n) cos [Ω(n − 1=2)] n=1 where, N β(n) , 2h( 2 − n); n 2 [1; N=2] Note that at Ω = π; H(ejΩ) = 0 i.e HPF can not be approximated. M.R. Azimi Digital Control & Digital Filters Non-Recursive Digital Filter Design Digital Controller Design Frequency Response of FIR Filters-Cont. N−1 Case 3: Anti-Symmetric: h(n) = −h(N − 1 − n), h( 2 ) = 0, and N odd (N−1) 2 jΩ −jΩ (N−1) jπ=2 H(e ) = e 2 e P γ(n) sin Ωn n=1 where h (N−1) i N−1 γ(n) , 2h 2 − n ; n 2 [1; 2 ] Case 4: Anti-Symmetric: h(n) = −h(N − 1 − n) and N even N=2 jΩ −jΩ (N−1) jπ=2 H(e ) = e 2 e P δ(n) sin [Ω(n − 1=2)] n=1 where, N δ(n) , 2h( 2 − n); n 2 [1; N=2] In the anti-symmetric case at Ω = 0;H(ejΩ) = 0. i.e. suitable for approximating such filters as differentiators and Hilbert transforms M.R. Azimi Digital Control & Digital Filters Non-Recursive Digital Filter Design Digital Controller Design Frequency Sampling Method Design Methods 1 Windowing 2 Frequency sampling method 3 Computer aided design methods (CAD) Frequency Sampling Method jΩ Idea: Given the frequency response of the desired filter, HDes(e ), sample it to obtain H(k) and then take IDFT of fH(k)g to get fh(n)g. Let the transfer function of the FIR filter be : N−1 H(z) = P h(n)z−n n=0 we know that N−1 −j2πkn P N H(k) = H(z)jz= j2πk = h(n)e ; k 2 [0;N − 1] N n=0 N−1 j2πkn 1 P N Additionally: h(n) = IDF T fH(k)g = N H(k)e ; n 2 [0;N − 1] k=0 Then, N−1 N−1 N−1 N−1 j2πkn H(k) j2πk P P N −n P P N −1 n H(z) = H(k)e z = N (e z ) n=0 k=0 k=0 n=0 M.R. Azimi Digital Control & Digital Filters Non-Recursive Digital Filter Design Digital Controller Design Frequency Sampling Method-Cont. N−1 P n 1−aN Now using a = 1−a , we get , n=0 N−1 −N N−1 P H(k) (1−ej2πkz−N ) (1 − z ) X H(k) N j2πk = j2πk k=0 (1−e N z−1) N (1 − e N z−1) | {z } k=0 H1(z) | {z } H2(z) which can be realized by cascade of a simple FIR (Comb) filter with an IIR system. M.R. Azimi Digital Control & Digital Filters Non-Recursive Digital Filter Design Digital Controller Design Frequency Sampling Method The term (1 − z−N ) represents an FIR filter with frequency response N h N N i N jΩ −jΩN −jΩ 2 jΩ 2 −jΩ 2 −jΩ 2 ΩN H1(e ) = 1 − e = e e − e = e 2j sin 2 jΩ The plot of jH1(e )j as a function of Ω is shown below. The IIR part, H2(z), consists of parallel combination of N complex coefficient j2πk 1st order systems with poles at zk = e N on the unit circle. Of course these j2πk poles will be cancelled with the zeros of H1(z) which also occur at zk = e N −N 1=N j2πk since 1 − z = 0 =) z = (1) =) zk = e N ; k 2 [0;N − 1] M.R. Azimi Digital Control & Digital Filters Non-Recursive Digital Filter Design Digital Controller Design Frequency Sampling Method In order to have H(z) with real coefficients (physical realization) we require that H(k) = jH(k)jejθ(k) satisfy: jH(k)j = jH(N − k)j and θ(k) = −θ(N − k); k 2 [0;N − 1] N Now each pair of H(k) and H(N − k); k 2 [0; 2 ] gives a 2nd order system with real coefficients. i.e: −1 2πk H(k) H(N−k) 2jH(k)j[cos θ(k)−z cos (θ(k)− N )] Hk(z) = + = j2πk j2π(N−k) 1−2 cos 2πk z−1+z−2 1−e N z−1 1−e N z−1 N Note that for N odd there is no frequency sample for k = N=2 thus the corresponding term does not exist. M.R. Azimi Digital Control & Digital Filters Non-Recursive Digital Filter Design Digital Controller Design Frequency Sampling Method: Design Procedure j! Given desired frequency response HDes(e ) sample it to yield: jΩ H(k) = HDes(e )j 2πk ; k 2 [0;N − 1] Ω= N Impose the following conditions on the magnitude jH(k)j and phase θ(k): (N−1)kπ 1 For linear phase: θ(k) = − N ; k 2 [0;N − 1] 2 For real coefficients: jH(k)j = jH(N − k)j and θ(k) = −θ(N − k) N Note for N even set H( 2 ) = 0. Example: Design an N = 11 order low-pass FIR filter whose cut-off frequency fc = 2fs=11, where fs is the sampling frequency. Plot the magnitude response of the designed filter. jΩ We start with ideal filter for HDes(e ) and sample it with spacing between samples= Ωs fs 2πN = N . See below figure. M.R. Azimi Digital Control & Digital Filters Non-Recursive Digital Filter Design Digital Controller Design Frequency Sampling Method: Design Procedure We then impose the above conditions i.e. jH(k)j = jH(N − k)j and (N−1)kπ 10kπ θ(k) = − N = 11 ; k 2 [0; 10] These combined yield, −j 10kπ e 11 k = 0; 1; 2 and k = 9; 10 H(k) = 0 k 2 [3; 8] Then take size N = 11 IDFT of H(k) i.e. h(n) = IDF T fH(k)g11 which gives h(0) = 0:06942; h(1) = −0:05403; h(2) = −0:10945; h(3) = 0:04733; h(4) = 0:31938; h(5) = 0:45455; h(6) = 0:31938; h(7) = 0:04733; h(8) = −0:10945; h(9) = −0:05403; h(10) = 0:06942 Note that these are symmetric due to the linear phase condition imposed. Magnitude response of the designed filter is shown (thick line) which exhibits a rather large ripple in both passband and stopband. To reduce the ripple effect, one can add a sample in the transition (wider transition region) region, i.e. M.R. Azimi Digital Control & Digital Filters Non-Recursive Digital Filter Design Digital Controller Design Frequency Sampling Method: Design Procedure 8 −j 10kπ <> e 11 k = 0; 1; 2 and k = 9; 10 −j 10kπ H(k) = 0:5e 11 k = 3 and k = 8 :> 0 k 2 [4; 7] The resulting filter coefficients are: h(0) = 0:00987; h(1) = 0:02244; h(2) = −0:07168; h(3) = −0:03989; h(4) = 0:30643; h(5) = 0:54545; h(6) = 0:30643; h(7) = −0:03989; h(8) = −0:07168; h(9) = 0:02244; h(10) = 0:00987 The magnitude response is shown (thin line) which shows much less ripple effects at a cost of wider transition region (must increase the order).
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages19 Page
-
File Size-