MATLAB 帮助中心
将离散时间滤波器 System object 转换为传递函数
[num,den] = tf(sysobj)
[num,den] = tf(sysobj,Arithmetic=arithType)
[num,den] = tf(sysobj) 将离散时间滤波器 System object™ 转换为等效传递函数的分子系数和分母系数向量。
num
den
sysobj
示例
[num,den] = tf(sysobj,Arithmetic=arithType) 根据 arithType 中指定的算术分析滤波器 System object。
arithType
有关更多输入选项,请参阅 Signal Processing Toolbox™ 中的 tf。
tf
全部折叠
使用 tf 函数计算 SOS 滤波器的传递函数。
创建一个四阶低通 SOS 滤波器对象,归一化截止频率为 0.4。
[z,p,k] = ellip(4,1,60,0.4); % Set up the filter [sosMatrix,scaleValues] = zp2sos(z,p,k); [num,den] = sos2ctf(sosMatrix); sosFilt = dsp.SOSFilter(Structure='Direct form I',... Numerator=num,Denominator=den,... ScaleValues=scaleValues)
sosFilt = dsp.SOSFilter with properties: Structure: 'Direct form I' CoefficientSource: 'Property' Numerator: [2×3 double] Denominator: [2×3 double] HasScaleValues: true ScaleValues: [0.0351 1 1] Show all properties
计算设计的 SOS 滤波器的传递函数。tf 函数返回滤波器的分子系数和分母系数向量。
[numTF,denTF] = tf(sosFilt)
numTF = 1×5 0.0351 0.1038 0.1432 0.1038 0.0351
denTF = 1×5 1.0000 -1.5676 1.7412 -1.0104 0.3093
输入滤波器,指定为以下滤波器 System object 之一:
dsp.AllpassFilter
dsp.AllpoleFilter
dsp.CICCompensationDecimator
dsp.CICCompensationInterpolator
dsp.CICDecimator
dsp.CICInterpolator
dsp.CoupledAllpassFilter
dsp.DCBlocker (自 R2024b 起)
dsp.DCBlocker
dsp.Delay
dsp.Differentiator
dsp.FarrowRateConverter
dsp.FilterCascade
dsp.FIRDecimator
dsp.FIRFilter
dsp.FIRHalfbandDecimator
dsp.FIRHalfbandInterpolator
dsp.FIRInterpolator
dsp.FIRRateConverter
dsp.FourthOrderSectionFilter
dsp.HighpassFilter
dsp.IIRFilter
dsp.IIRHalfbandDecimator
dsp.IIRHalfbandInterpolator
dsp.LowpassFilter
dsp.ParallelFilter
dsp.SOSFilter
dsp.VariableBandwidthFIRFilter
dsp.VariableBandwidthIIRFilter
dsp.VariableFIRDecimator
dsp.VariableFIRInterpolator
'double'
'single'
'Fixed'
滤波器分析中使用的算术,指定为 'double'、'single' 或 'Fixed'。当未指定算术输入且滤波器 System object 未锁定时,分析工具假定为双精度滤波器。当未指定算术输入且 System object 锁定时,该函数基于锁定输入的数据类型执行分析。
'Fixed' 值仅适用于具有定点属性的滤波器 System object。
当 'Arithmetic' 输入参量指定为 'Fixed' 且滤波器对象的系数数据类型设置为 'Same word length as input' 时,算术分析取决于 System object 是未锁定还是锁定。
'Arithmetic'
'Same word length as input'
未锁定 - 分析对象函数无法确定系数数据类型。该函数假定系数数据类型为有符号,具有 16 位字长,并且是自动定标的。该函数基于此假设执行定点分析。
锁定 - 当输入数据类型为 'double' 或 'single' 时,分析对象函数无法确定系数数据类型。该函数假定系数的数据类型为有符号,具有 16 位字长,并且是自动定标的。该函数基于此假设执行定点分析。
要检查 System object 是锁定还是未锁定,请使用 isLocked 函数。
isLocked
当算术输入指定为 'Fixed' 且滤波器对象的系数数据类型设置为自定义数值类型时,对象函数基于自定义数值数据类型执行定点分析。
滤波器的分子系数,以行向量形式返回。
数据类型: double
double
滤波器的分母系数,以行向量形式返回。
全部展开
从 R2024b 开始,tf 分析函数支持 dsp.VariableFIRDecimator 和 dsp.VariableFIRInterpolator 对象。
dsp.BiquadFilter
dsp.BiquadFilter 对象在使用时会发出警告,并将在以后的版本中删除。请改用 dsp.SOSFilter 对象。有关如何替换现有代码的信息,请参阅 dsp.BiquadFilter 参考页中的兼容性注意事项部分。
从 R2024b 开始,此函数支持 dsp.DCBlocker 对象。
从 R2023b 开始,tf 分析函数支持 dsp.ParallelFilter 和 dsp.Delay 对象。
dsp.BiquadFilter 对象将在以后的版本中删除。请改用 dsp.SOSFilter 对象。
sos2ctf
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处