Classic IIR Filter Design - MATLAB & Simulink - MathWorks 中国 (2024)

Open Live Script

This example shows how to design classic IIR filters. The example initially focuses on the scenario where critical design parameter is the cutoff frequency at which the power of the filter decays to half (–3 dB) the nominal passband value.

The example then shows you how to replace a Butterworth design with a Chebyshev filter or an elliptic filter of the same order and obtain a steeper rolloff at the expense of some ripple in the passband and stopband of the filter. Finally, the example explores minimum-order filter designs.

Lowpass Filters

Design an 8th order filter with a normalized cutoff frequency of 0.4𝜋. To begin, design a Butterworth filter which is maximally flat (no ripple in the passband or in the stopband).

N = 8; F3dB = .4;d = fdesign.lowpass("N,F3dB",N,F3dB);Hbutter = design(d,"butter",SystemObject=true)
Hbutter = dsp.SOSFilter with properties: Structure: 'Direct form II' CoefficientSource: 'Property' Numerator: [4×3 double] Denominator: [4×3 double] HasScaleValues: true ScaleValues: [0.2914 0.2261 0.1929 0.1788 1] Show all properties

A Chebyshev Type I filter has ripples in the passband and no ripples in the stopband. A Chebyshev Type I design allows you to control the passband ripples. Larger passband ripples result with a steeper rolloff.

Design a Chebyshev Type I filter with peak-to-peak ripples of 0.5 dB:

Ap = .5;setspecs(d,"N,F3dB,Ap",N,F3dB,Ap);Hcheby1 = design(d,"cheby1",SystemObject=true);hfvt = fvtool(Hbutter,Hcheby1);legend(hfvt,"Butterworth","Chebyshev Type I");

Classic IIR Filter Design- MATLAB & Simulink- MathWorks 中国 (1)

A Chebyshev Type II filter has ripples in the stopband, and no ripples in the passband. A Chebyshev Type II design allows you to control the stopband attenuation. A smaller stopband attenuation results with a steeper rolloff.

Design a Chebyshev Type II filter with a stopband attenuation of 80 dB:

Ast = 80;setspecs(d,"N,F3dB,Ast",N,F3dB,Ast);Hcheby2 = design(d,"cheby2",SystemObject=true);hfvt = fvtool(Hbutter,Hcheby2);legend(hfvt,"Butterworth","Chebyshev Type II");

Classic IIR Filter Design- MATLAB & Simulink- MathWorks 中国 (2)

Finally, an elliptic filter can provide a steeper rolloff compared to the previous designs by allowing ripples both in the stopband and the passband. To illustrate that, design an elliptic filter using the same passband and stopband characteristic as the previous steps.

setspecs(d,"N,F3dB,Ap,Ast",N,F3dB,Ap,Ast);Hellip = design(d,"ellip",SystemObject=true);hfvt = fvtool(Hbutter,Hcheby1,Hcheby2,Hellip);legend(hfvt, ... "Butterworth","Chebyshev Type I","Chebyshev Type II","Elliptic");

Zoom in on the passband to verify that all filters have the same –3dB frequency point and that only the Butterworth and the Chebyshev Type II designs have a perfectly flat passband.

Phase Consideration

If phase response is a design concern, it is useful to remember that Butterworth and Chebyshev Type II introduce less distortion (their group delay is flatter). Verify that by comparing the group delay responses of the four filters designed in the previous steps.

hfvt.Analysis = "grpdelay";

Classic IIR Filter Design- MATLAB & Simulink- MathWorks 中国 (4)

Minimum-Order Designs

Minimum order designs apply when the passband, stopband, and the magnitude of tolerable ripples are fully specified. In these cases, the cutoff frequency of 3dB is not of primary interest. The smallest filter order required to meet the design specification is automatically derived by the design algorithm.

Design a minimum-order IIR filter.

Fp = .1; Fst = .3; Ap = 1;Ast = 60;setspecs(d,"Fp,Fst,Ap,Ast",Fp,Fst,Ap,Ast);Hbutter = design(d,"butter",SystemObject=true);Hcheby1 = design(d,"cheby1",SystemObject=true);Hcheby2 = design(d,"cheby2",SystemObject=true);Hellip = design(d,"ellip",SystemObject=true);hfvt = fvtool(Hbutter,Hcheby1,Hcheby2,Hellip,DesignMask="on");legend(hfvt,"Butterworth","Chebyshev Type I","Chebyshev Type II","Elliptic");

Classic IIR Filter Design- MATLAB & Simulink- MathWorks 中国 (5)

A 7th order filter is necessary to meet the specification in the Butterworth design, whereas a 5th order filter is sufficient with the two Chebyshev techniques. Elliptic design reduces the required filter order even further to 4.

order(Hbutter)
ans = 7
order(Hcheby1)
ans = 5
order(Hcheby2)
order(Hellip)
ans = 4

Exact Matching of the Passband or Stopband Specifications

A minimum-order design often exceeds all the desired filter specifications, and has better ripples and a better transition width compared to what the user actually specified. Use the MatchExactly option to constrain the design specification to match exactly in at least one of the two bands. By default, Chebyshev Type I designs match the passband and exceed in the stopband. Butterworth and Chebyshev Type II designs match the stopband and exceed in the passband. Elliptic designs match the target attenuations in both bands, and exceed the stopband edge frequency.

Hellipmin1 = design(d,"ellip",MatchExactly="passband",SystemObject=true);Hellipmin2 = design(d,"ellip",MatchExactly="stopband",SystemObject=true);hfvt = fvtool(Hellip, Hellipmin1, Hellipmin2,DesignMask="on");legend(hfvt,"Matched passband and stopband", ... "Matched passband", "Matched stopband", ... Location="Northeast")

Classic IIR Filter Design- MATLAB & Simulink- MathWorks 中国 (6)

Zoom in on the passband to compare the passband edges. The matched passband in both designs have an attenuation of exactly 1 dB at the passband edge frequency 0.1𝝅 rad/samples.

Verify that the resulting order of the filters did not change.

order(Hellip)
ans = 4
order(Hellipmin1)
ans = 4
order(Hellipmin2)
ans = 4

Highpass, Bandpass, and Bandstop Filters

You can generalize the results in the previous steps to highpass, bandpass, and bandstop response types. For example, design three minimum order bandpass filters.

d = fdesign.bandpass("Fst1,Fp1,Fp2,Fst2,Ast1,Ap,Ast2", ... .35,.45,.55,.65,60,1,60);
Hbutter = design(d,"butter",SystemObject=true);Hcheby1 = design(d,"cheby1",SystemObject=true);Hcheby2 = design(d,"cheby2",SystemObject=true);Hellip = design(d,"ellip",SystemObject=true);hfvt = fvtool(Hbutter,Hcheby1,Hcheby2,Hellip,DesignMask="on");legend(hfvt,... "Butterworth","Chebyshev Type I","Chebyshev Type II","Elliptic",... Location="Northwest")

Classic IIR Filter Design- MATLAB & Simulink- MathWorks 中国 (7)

See Also

dsp.SOSFilter

Related Topics

  • Least Pth-Norm Optimal IIR Filter Design
  • IIR Filter Design Given a Prescribed Group Delay
  • IIR Halfband Stages in Multistage Filter Design

MATLAB 命令

您点击的链接对应于以下 MATLAB 命令:

 

请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。

Classic IIR Filter Design- MATLAB & Simulink- MathWorks 中国 (8)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Americas

Europe

Asia Pacific

Contact your local office

Classic IIR Filter Design
- MATLAB & Simulink
- MathWorks 中国 (2024)

References

Top Articles
Devil May Cry 3: Dante's Awakening walkthrough/SM04
DMC 3000™ Persönliches elektronisches Dosimeter
Inducement Small Bribe
Dlnet Retiree Login
Couchtuner The Office
Voorraad - Foodtrailers
Unitedhealthcare Hwp
Koordinaten w43/b14 mit Umrechner in alle Koordinatensysteme
Google Jobs Denver
Poplar | Genus, Description, Major Species, & Facts
Www Movieswood Com
2021 Tesla Model 3 Standard Range Pl electric for sale - Portland, OR - craigslist
Best Cav Commanders Rok
Bc Hyundai Tupelo Ms
Evil Dead Rise Showtimes Near Regal Columbiana Grande
Jc Post News
Jenn Pellegrino Photos
2 Corinthians 6 Nlt
Between Friends Comic Strip Today
Gina Wilson All Things Algebra Unit 2 Homework 8
Best Nail Salons Open Near Me
If you have a Keurig, then try these hot cocoa options
South Bend Weather Underground
Best Boston Pizza Places
Visit the UK as a Standard Visitor
Puffin Asmr Leak
My Dog Ate A 5Mg Flexeril
Proto Ultima Exoplating
Sam's Club Near Wisconsin Dells
134 Paige St. Owego Ny
Kaiser Infozone
Pickle Juiced 1234
CARLY Thank You Notes
Arcadia Lesson Plan | Day 4: Crossword Puzzle | GradeSaver
When His Eyes Opened Chapter 2048
How are you feeling? Vocabulary & expressions to answer this common question!
Craigslist Putnam Valley Ny
Miracle Shoes Ff6
Cranston Sewer Tax
Gun Mayhem Watchdocumentaries
Fwpd Activity Log
Lovely Nails Prices (2024) – Salon Rates
LumiSpa iO Activating Cleanser kaufen | 19% Rabatt | NuSkin
Is Ameriprise A Pyramid Scheme
Craigslist/Nashville
Online College Scholarships | Strayer University
Naomi Soraya Zelda
Julies Freebies Instant Win
Diccionario De Los Sueños Misabueso
Edt National Board
Superecchll
Worlds Hardest Game Tyrone
Latest Posts
Article information

Author: Rubie Ullrich

Last Updated:

Views: 6168

Rating: 4.1 / 5 (72 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Rubie Ullrich

Birthday: 1998-02-02

Address: 743 Stoltenberg Center, Genovevaville, NJ 59925-3119

Phone: +2202978377583

Job: Administration Engineer

Hobby: Surfing, Sailing, Listening to music, Web surfing, Kitesurfing, Geocaching, Backpacking

Introduction: My name is Rubie Ullrich, I am a enthusiastic, perfect, tender, vivacious, talented, famous, delightful person who loves writing and wants to share my knowledge and understanding with you.