Main Content

butter

Butterworth IIR数字过滤器设计

Description

黄油= butter(designSpecs,“ SystemObject”,true)使用对象中的规格设计Butterworth IIR数字过滤器designSpecs

Depending on the filter specification objectdesignSpecs, 这butter设计方法可能无效。利用DesignMethods使用过滤器规范对象,可以确定Butterworth IIR数字过滤器设计是否可能。

DesignMethods(DesignSpecs,'Systemobject',真的)

黄油= butter(designSpecs,DesignOption,Value,...'SystemObject',true)返回带有一个或多个指定设计的选项和相应值的Butterworth IIR过滤器。

要查看可用设计选项的列表,请运行designoptions在规范对象上函数。该功能还列出了过滤器使用的默认设计选项。

designoptions(designSpecs,'butter'

例子

黄油=设计(designSpecs,“黄油”,“ SystemObject”,true)是设计Butterworth IIR数字过滤器的替代语法。

For complete help about using thebutter规范对象的设计方法,designSpecs,,,,enter the following at the MATLAB®command prompt.

帮助(DesignSpecs,'butter'

例子

全部收缩

设计具有低通和高通频率响应的Butterworth滤波器。过滤器设计过程是:

  1. Specify the filter design specifications using afdesign功能。

  2. Pick a design method provided by theDesignMethods功能。

  3. 要确定可供选择的可用设计选项,请使用designoptions功能。

  4. 使用design功能。

Lowpass Filter

使用使用默认的低通滤波器设计规范对象fdesign.lowpass

designspecs = fdesign.lowpass
designspecs = properties的低通:响应:'lowpass'规范:'fp,fst,ap,ast'描述:{4x1 cell}归一化频率:1 fpass:0.4500 fstop:0.5500 apass:0.5500 apass:1 astop:1 astop:60

使用DesignMethods功能。要设计Butterworth过滤器,请选择butter

DesignMethods(DesignSpecs,“系统对象”,真的)
Design Methods that support System objects for class fdesign.lowpass (Fp,Fst,Ap,Ast): butter cheby1 cheby2 ellip equiripple ifir kaiserwin multistage

在设计过滤器时,您可以指定其他设计选项。使用该选项查看列表designoptions功能。此功能还显示了过滤器使用的默认设计选项。

designoptions(designSpecs,'butter',,,,“系统对象”,真的)
ans =结构体字段:FilterStructure: {1x6 cell} SOSScaleNorm: 'ustring' SOSScaleOpts: 'fdopts.sosscaling' MatchExactly: {'passband' 'stopband'} DefaultFilterStructure: 'df2sos' DefaultMatchExactly: 'stopband' DefaultSOSScaleNorm: '' DefaultSOSScaleOpts: [1x1 fdopts.sosscaling]

使用designfunction to design the filter. Pass'butter'以及变量给出的规格designSpecs,,,,as input arguments. Specify the'matchexactly'设计选项“ passband'

lpfilter = Design(DesignSpecs,'butter',,,,'matchexactly',,,,“ passband',,,,“系统对象”,真的);

Visualize the frequency response of the designed filter.

fvtool(lpfilter)

Figure Magnitude Response (dB) contains an axes object. The axes object with title Magnitude Response (dB) contains 2 objects of type line.

高通滤波器

使用使用高通滤波器设计规范对象fdesign.highpass。指定为7和3 dB频率的顺序 0 6 π 弧度/样品。

designSpecs = fdesign.highpass('n,f3db',,,,7,.6);

确定可用的设计方法。要设计Butterworth过滤器,请选择butter

DesignMethods(DesignSpecs,“系统对象”,真的)
支持系统对象的设计方法。万博1manbetx

在设计过滤器时,您可以指定其他设计选项。使用该选项查看列表designoptions功能。此功能还显示了过滤器使用的默认设计选项。

designoptions(designSpecs,'butter',,,,“系统对象”,真的)
ans =结构体字段:过滤:{1x6 cell} sosscalenorm:'ustring'sosscaleopts:'fdopts.sosscaling'defaultFilterStrustrusture:'df2sos'DefaultSossCalenorm:'''defaultSossCaleopts:[1x1 fdopts.sosssosscalcalcalcaling

要设计Butterworth过滤器,请使用design功能并指定'butter'as an input. Set“过滤”'cascadeallpass'

hpfilter = Design(DesignSpecs,'butter',,,,“过滤”,,,,'cascadeallpass',,,,“系统对象”,真的);

Visualize the highpass frequency response.

fvtool(hpFilter)

Figure Magnitude Response (dB) contains an axes object. The axes object with title Magnitude Response (dB) contains 2 objects of type line.

输出参数

全部收缩

Butterworth IIR过滤器,作为过滤器系统对象返回。系统对象及其属性的值取决于输入designSpecs目的and the other design options specified to the function.

版本历史记录

Introduced in R2011a