设计
将设计方法应用于过滤规范对象
Syntax
描述
uses the filter specification object,菲尔特
= design(Designspecs
,“ SystemObject”,true)Designspecs
,为了生成过滤系统对象™,菲尔特
。当您不提供设计方法作为输入参数时,设计
uses the default design method. UseDesignMethods(DesignSpecs,'default')
to see the default design method for your filter design specification object. For more information on filter design specifications, see在FDesign中设计过滤器 - 过程概述。
uses the design method specified by菲尔特
= design(Designspecs
,方法
,“ SystemObject”,true)方法
。方法
必须是返回的选项之一设计方法s
。
指定设计方法选项。利用菲尔特
= design(Designspecs
,方法
,PARAM,VALUE,...,'Systemobject',true)DesignOptions(DesignSpecs,方法)
要查看可供选择的可用设计方法选项的列表。有关这些选项的详细帮助,请键入帮助(DesignSpecs,方法)
在matlab中®命令提示符。
使用结构指定设计方法选项菲尔特
= design(Designspecs
,方法
,opts
,“ SystemObject”,true)opts
。opts
通常是从设计opts
function and then specified as an input to the设计
功能。利用帮助(DesignSpecs,方法)
有关可选输入的更多信息。
例子
设计Fir Equiripple低通滤波器
Design an FIR equiripple lowpass filter. Specify a passband edge frequency of 0.2π rad/sample and a stopband edge frequency of 0.25π rad/sample. Set the passband ripple to 0.5 dB and the stopband attenuation to 40 dB..
designspecs = fdesign.lowpass('fp,fst,ap,ast',0.2,0.25,0.5,40)
designspecs =属性属性:响应:'lowpass'规范:'fp,fst,ap,ast'描述:{4x1 cell}归一化频率:1 fpass:0.2000 fstop:0.2500 apass:0.5000 astop:0.5000 astop:40
使用默认的equiripple方法设计过滤器。
菲尔特= design(designSpecs,“系统对象”,true)
菲尔特= dsp.FIRFilter with properties: Structure: 'Direct form' NumeratorSource: 'Property' Numerator: [-0.0057 -0.0010 0.0010 0.0040 0.0065 0.0073 ... ] InitialConditions: 0 Show all properties
Determine the available design methods by running the设计方法s
在过滤器设计规范对象上的功能,Designspecs
。
DesignMethods(DesignSpecs,“系统对象”,true)
支持系统对象的设计方法fdesign.l万博1manbetxowpass(FP,FST,AP,AST):Butter Cheby1 Cheby2 Ellip Equiripple ifir ifir ifir kaiserwin多阶段
您还可以指定设计过滤器中使用的设计选项。要查看可用选项的列表,请运行DesignOptions
运行Designspecs
。
DesignOptions(DesignSpecs,'equiripple')
ans =带有字段的结构:FilterStructure: {'dffir' 'dffirt' 'dfsymfir' 'fftfir'} DensityFactor: 'double' MinPhase: 'bool' MaxPhase: 'bool' MinOrder: {'any' 'even' 'odd'} StopbandShape: {'flat''linear' '1/f'} StopbandDecay: 'double' UniformGrid: 'bool' SystemObject: 'bool' DefaultFilterStructure: 'dffir' DefaultDensityFactor: 16 DefaultMaxPhase: 0 DefaultMinOrder: 'any' DefaultMinPhase: 0 DefaultStopbandDecay: 0 DefaultStopbandShape: 'flat'DefaultSystemObject:0 DefaultuniformGrid:1
通过设置设计最小相相的FIR Equiripple滤波器“ min相”
to真的
。
filtmin = Design(DesignSpecs,'equiripple',“ min相”,true,“系统对象”,true)
filtmin = dsp.Firfilter具有属性:结构:'直接形式'NumeratorSource:'属性'分子:[0.0163 0.0381 0.0724 0.1144 0.1144 0.1562 0.1875 0.1981 ...]
显示默认和最小相设计的极点零图。
fvt = fvtool(filt,filtmin,'分析',“极点”);传奇(fvt,“默认设计”,“最小相设计”)
Redesign the filter using the elliptic method. Determine the available design options for the elliptic method.
DesignOptions(DesignSpecs,“椭圆”)
ans =带有字段的结构:FilterStructure: {1x6 cell} SOSScaleNorm: 'ustring' SOSScaleOpts: 'fdopts.sosscaling' MatchExactly: {'passband' 'stopband' 'both'} SystemObject: 'bool' DefaultFilterStructure: 'df2sos' DefaultMatchExactly: 'both' DefaultSOSScaleNorm: '' DefaultSOSScaleOpts: [1x1 fdopts.sosscaling] DefaultSystemObject: 0
通过设置完全匹配通带“匹配”
to'passband'
。
菲尔特= design(designSpecs,“椭圆”,“匹配”,'passband',“系统对象”,true)
菲尔特= dsp.BiquadFilter with properties: Structure: 'Direct form II' SOSMatrixSource: 'Property' SOSMatrix: [3x6 double] ScaleValues: [4x1 double] InitialConditions: 0 OptimizeUnityScaleValues: true Show all properties
您可以在二阶部分上指定PTH规范缩放。在时域中使用L-内范围标准。
filtl = Design(Designspecs,“椭圆”,“匹配”,'passband','sosscalenorm','linf',。。。“系统对象”,true)
菲尔特L = dsp.BiquadFilter with properties: Structure: 'Direct form II' SOSMatrixSource: 'Property' SOSMatrix: [3x6 double] ScaleValues: [4x1 double] InitialConditions: 0 OptimizeUnityScaleValues: true Show all properties
Display the frequency responses of the filters.
fvt = fvtool(filt,filtl);传奇(fvt,“默认缩放”,“ l-Infinity Norm缩放”)
输入参数
Designspecs
—Filter design specification object
fdesign。回复
object
回复
fdesign
returns a filter design specification object. Every filter design specification object has these properties.
Property Name |
Default Value |
描述 |
---|---|---|
|
取决于所选类型 |
定义要设计的过滤器类型,例如插装器或带通滤波器。这是一个只读的价值。 |
|
取决于所选类型 |
定义用于定义所需过滤性能的过滤特性,例如截止频率 |
|
Depends on the filter type you choose |
Contains descriptions of the filter specifications used to define the object, and the filter specifications you use when you create a filter from the object. This is a read-only value. |
|
Logical |
Determines whether the filter calculation uses a normalized frequency from 0 to 1, or the frequency band from 0 toFs/2,采样频率。接受 |
In addition to these properties, filter design specification objects may have other properties as well, depending on whether they design single-rate filters or multirate filters.
Added Properties for Multirate Filters |
描述 |
---|---|
|
指定decrease the sampling rate. Always a positive integer. |
|
指定增加采样率的金额。总是一个积极的整数。 |
|
多相度长度是组成插图器或插值器或速率变化因子过滤器的每个多相子滤光器的长度。总过滤长度是 |
方法
—设计方法
角色向量
设计方法,指定为字符向量。您提供的设计方法作为输入参数必须是返回的方法之一:
DesignMethods(DesignSpecs,“系统对象”,true)
该表列出了所有设计方法。根据过滤器设计规范对象,这些子集可用Designspecs
。
设计方法s |
描述 |
---|---|
|
Butterworth过滤器 |
|
Chebyshev I型过滤器 |
|
Chebyshev II型过滤器 |
|
椭圆滤波器 |
|
Equiripple FIR滤波器 |
|
最小二乘线性相位FIR滤波器 |
|
频率采样的FIR过滤器 |
|
Interpolated FIR filter |
|
准线性相IIR过滤器 |
|
Least P-norm optimal IIR filter |
|
最小二乘IIR过滤器 |
|
FIR constrained least squares filter |
|
Kaiser窗口过滤器 |
|
maxflat Fir滤波器 |
|
Multistage filter |
|
使用窗口脉冲响应的FIR过滤器 |
To help you design filters more quickly, the input argument方法
accepts a variety of special keywords that force设计
to behave in different ways. This table presents the keywords you can use for方法
and how设计
responds to the keyword:
设计方法关键字 |
描述of the Design Response |
---|---|
|
军队 |
|
军队 |
|
从每种适用的FIR设计方法中生成过滤器,用于 |
|
从每种适用的IIR设计方法中生成过滤器 |
|
Designs filters using all applicable design methods for the specifications object |
关键字不敏感。
什么时候设计
返回输出对象中的多个过滤器,使用索引查看单个过滤器。例如,查看第三个过滤器菲尔特
, 进入:
菲尔特(3)
例子:filt = design(designspecs,'butter','systemObject',true)
例子:菲尔特= design(designSpecs,'ALLFIR','SystemObject',true)
opts
—Specify design options
结构体
通过通过opts
结构作为输入设计
功能。这opts
结构是通过运行获得的设计opts(designSpecs,method)
。
designspecs = fdesign.notch opts = DesignOpts(DesignSpecs,'牛油') opts.FilterStructure ='df1sos'菲尔特= design(designSpecs,'牛油',opts,“系统对象”,true)
Version History
matlab命令
您单击了与此MATLAB命令相对应的链接:
通过在MATLAB命令窗口中输入该命令。Web浏览器不支持MATLAB命令。万博1manbetx
选择一个网站
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:。
您还可以从以下列表中选择一个网站:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
美洲
- AméricaLatina(Español)
- 加拿大(英语)
- 美国(英语)