1 / 22

Practical Signal Processing Concepts and Algorithms using MATLAB

Practical Signal Processing Concepts and Algorithms using MATLAB. IIR Filter Design. Section Outline. Filter specifications Analog prototyping Filter design functions Introduction to the Filter Design and Analysis Tool (FDATool). Filter Design. IIR design methods

kolya
Download Presentation

Practical Signal Processing Concepts and Algorithms using MATLAB

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Practical Signal Processing Concepts and Algorithms using MATLAB IIR Filter Design

  2. Section Outline • Filter specifications • Analog prototyping • Filter design functions • Introduction to the Filter Design and Analysis Tool (FDATool)

  3. Filter Design • IIR design methods • Butterworth filter • Butterworth, Chebyshev • Types I and II, elliptic filters • Order selection functions • Direct IIR methods Design specifications • Remove noise above • a cutoff frequency • Set passband ripple, • stopband attenuation, • or transition width • Minimize filter order • Arbitrary response Less specific More specific

  4. Filter Configurations Lowpass filter Highpass filter Bandpass filter Bandstop filter Normalization convention:0 ≤ f ≤ 1 = Nyquist frequency

  5. Filter Specifications 0 0 Rp Magnitude (dB) Rs Transition band Passband Stopband 0 Wp Ws 1 Normalized frequency

  6. IIR Filter Design Advantage: lower order than FIR designs Disdvantage: nonlinear phase …but see filtfilt • Classic IIR filters types • Butterworth • Chebyshev Types I and II • Elliptic • Bessel Supported in both the analog and digital domains (except Bessel – analog only), and in lowpass, highpass, bandpass, and bandstop configurations.

  7. IIR Filter Types Butterworth Chebyshev Type I Chebyshev Type II Elliptic Bessel

  8. Analog Prototyping 1. Find an analog lowpass filter with cutoff frequency of 1 and translate this “prototype” filter to the desired band configuration 2. Transform the filter to the digital domain 3. Discretize the filter • Alternatively: • The butter, cheby1, cheby2, ellip, and besself functions perform • all steps of the filter design • The buttord, cheb1ord, cheb2ord, and ellipord functions perform • minimum order computations for IIR filters.

  9. Example: Bandpass Filter Order n ≤ 10, sampling frequency fs = 10,000 Hz Rp 0.5 dB Rs 20 dB Ws(1) Wp(1) Wp(2) Ws(2) Middle C 0.02 0.03 0.0525 0.07 0.08

  10. Butterworth Method: Analog Prototype >> protobutter

  11. Butterworth Method: Discretization Impulse invariance -20 dB Bilinear transformation -20 dB

  12. Chebyshev Type I Method >> chebyband Order 10

  13. Elliptic Method >> ellipband Order 8

  14. Direct IIR Design >> [b,a] = yulewalk(n,f,m) • Specifications in the discrete domain • Fit arbitrary frequency response data • Not constrained to standard lowpass, highpass, • bandpass, or bandstop configurations • Multiband frequency response is possible • Does not accept phase information • No statements are made about the optimality • of the resulting filter

  15. Example: Arbitrary Response IIR Filter Design a 12th-order bandstop filter fitting the following data: >> f = [0 0.3 0.3 0.4 0.4 0.5 0.5 0.6 0.6 1]; >> m = [1 1 0.5 0.5 0 0 0.5 0.5 1 1];

  16. Filter Type Design Function Bessel (analog only) [b,a] = besself(n,Wn,options)[z,p,k] = besself(n,Wn,options)[A,B,C,D] = besself(n,Wn,options) Butterworth [b,a] = butter(n,Wn,options)[z,p,k] = butter(n,Wn,options)[A,B,C,D] = butter(n,Wn,options) Chebyshev Type I [b,a] = cheby1(n,Rp,Wn,options)[z,p,k] = cheby1(n,Rp,Wn,options)[A,B,C,D] = cheby1(n,Rp,Wn,options) Chebyshev Type II [b,a] = cheby2(n,Rs,Wn,options)[z,p,k] = cheby2(n,Rs,Wn,options)[A,B,C,D] = cheby2(n,Rs,Wn,options) Elliptic [b,a] = ellip(n,Rp,Rs,Wn,options)[z,p,k] = ellip(n,Rp,Rs,Wn,options)[A,B,C,D] = ellip(n,Rp,Rs,Wn,options) Complete Classical IIR Filter Design

  17. Example 1: • For data sampled at 1000 Hz, design a 9th-order highpass Butterworth IIR filter with cutoff frequency of 300 Hz, Solution: • [b,a] = butter(9,300/500,'high'); • freqz(b,a,128,1000) Example 2:For data sampled at 1000Hz, design a 9th-order lowpass Chebyshev Type I filter with 0.5dB of ripple in the passband and a cutoff frequency of 300Hz, which corresponds to a normalized value of 0.6: Solution [b,a] = cheby1(9,0.5,300/500); freqz(b,a,512,1000)%The frequency response of the filter

  18. Filter Design with SPTool >> sptool

  19. Filter Design with FDATool >> fdatool

  20. Filter Analysis with FDATool

  21. Importing Existing Filters Select Import Mode

  22. Exporting from FDATool • Filters designed in the FDATool can be exported to • The MATLAB workspace • (filter coefficients can be vectors or objects) • The SPTool • (for capabilities not available in FDATool, such as spectral analysis) • MAT-files • Text files • C header files

More Related