Contents

sysobj

Create filter System object from discrete-time filter or multirate filter

Syntax


hs = sysobj(hfilt)

Description

hs = sysobj(hfilt) creates a new filter System object™ hs from the dfilt or mfilt object, hfilt.

The function supports a subset of dfilt and mfilt objects. The following table lists supported filter structures for hfilt and the filter System object that the function creates.

Single-rate or multirate filterFilter System object
Lattice AR(dfilt.latticear)dsp.AllpoleFilter
Coupled-allpass, power-complementary lattice filter (dfilt.calatticepc)dsp.CoupledAllpassFilter
Coupled-allpass, lattice filter (dfilt.calattice)dsp.CoupledAllpassFilter
Cascade of discrete time filters (dfilt.cascade)dsp.CoupledAllpassFilter
Direct Form I (dfilt.df1)dsp.IIRFilter
Direct Form I transposed (dfilt.df1t)dsp.IIRFilter
Direct Form II (dfilt.df2)dsp.IIRFilter
Direct Form II transposed (dfilt.df2t)dsp.IIRFilter
Direct-form FIR (dfilt.dffir)dsp.FIRFilter
Direct-form FIR transposed (dfilt.dffirt)dsp.FIRFilter
Direct-form symmetric FIR (dfilt.dfsymfir)dsp.FIRFilter
Direct-form antisymmetric FIR (dfilt.dfasymfir)dsp.FIRFilter
Discrete-time, lattice, moving-average (dfilt.latticemamin)dsp.FIRFilter
Discrete-time, second-order section, direct-form I (dfilt.df1sos)dsp.BiquadFilter
Discrete-time, second-order section, direct-form I transposed (dfilt.df1tsos)dsp.BiquadFilter
Discrete-time, second-order section, direct-form II (dfilt.df2sos)dsp.BiquadFilter
Discrete-time, second-order section, direct-form II transposed (dfilt.df2tsos)dsp.BiquadFilter
Direct-form FIR polyphase decimator (mfilt.firdecim)dsp.FIRDecimator
Direct-form transposed FIR polyphase decimator (mfilt.firtdecim)dsp.FIRDecimator
Fixed-point CIC decimator (mfilt.cicdecim)dsp.CICDecimator
FIR polyphase interpolator (mfilt.firinterp)dsp.FIRInterpolator
FIR linear interpolator (mfilt.linearinterp)dsp.FIRInterpolator
Fixed-point CIC interpolator (mfilt.cicinterp)dsp.CICInterpolator
Direct-form FIR polyphase sample rate converter (mfilt.firsrc)dsp.FIRRateConverter

Input Arguments

hfilt

Discrete-time filter (dfilt) or multirate filter (mfilt) object. The preceding table lists supported filter structures.

The function interprets the PersistentMemory property differently for discrete-time and multirate filters:

  • If hfilt is a discrete-time filter with the PersistentMemory property set to true, then the filter states are copied into the initial conditions properties of hs. Otherwise, initial conditions are ignored.

  • Multirate-filter System objects do not have initial conditions. If hfilt is a multirate filter with the PersistentMemory property set to true, the initial conditions are not copied into hs, and the function issues a warning.

The function does not support some properties for SOS filter structures:

  • If the CastBeforeSum property is set to false, the function issues a warning. dsp.BiquadFilter System objects always have a cast before a sum.

  • If the Signed property is false, the function issues an error. dsp.BiquadFilter System objects do not support unsigned arithmetic.

Output Arguments

hs

Filter System object. The function maps almost all properties of hfilt into the filter System object. However, some properties are not mapped exactly:

  • Filter System objects do not have a CoeffAutoScale property. The function specifies a word length and a fraction length regardless of whether the CoeffAutoScale property of hfilt is true or false.

  • dsp.BiquadFilter System objects do not have a FullPrecisionOverride property. Full-precision values in hfilt are mapped to word and fraction lengths in hs. These settings correspond to the full-precision setting of the input data type.

Examples

Convert a discrete-time filter object to a System object:

hfilt = dfilt.df1sos; %Direct-form I SOS
hs = sysobj(hfilt);   %Biquadratic IIR filter

See Also

Was this topic helpful?