| Filter Design Toolbox™ | ![]() |
hq = convert(hq,newstruct)
hm = convert(hm,newstruct)
hq = convert(hq,newstruct) returns a quantized filter whose structure has been transformed to the filter structure specified by string newstruct. You can enter any one of the following quantized filter structures:
'antisymmetricfir': Antisymmetric finite impulse response (FIR).
'df1': Direct form I.
'df1t': Direct form I transposed.
'df2': Direct form II.
'df2t': Direct form II transposed. Default filter structure.
'dffir': FIR.
'dffirt': Direct form FIR transposed.
'latcallpass': Lattice allpass.
'latticeca': Lattice coupled-allpass.
'latticecapc': Lattice coupled-allpass power-complementary.
'latticear': Lattice autoregressive (AR).
'latticema': Lattice moving average (MA) minimum phase.
'latcmax': Lattice moving average (MA) maximum phase.
'latticearma': Lattice ARMA.
'statespace': Single-input/single-output state-space.
'symmetricfir': Symmetric FIR. Even and odd forms.
All filters can be converted to the following structures:
df1
df1t
df2
df2t
statespace
latticearma
For the following filter classes, you can specify other conversions as well:
Minimum phase FIR filters can be converted to latticema
Maximum phase FIR filters can be converted to latcmax
Allpass filters can be converted to latcallpass
convert generates an error when you specify a conversion that is not possible.
hm = convert(hm,newstruct) returns a multirate filter whose structure has been transformed to the filter structure specified by string newstruct. You can enter any one of the following multirate filter structures, defined by the strings shown, for newstruct:
Cascaded Integrator-Comb Structure
cicdecim — CIC-based decimator
cicinterp — CIC-based interpolator
FIR Structures
firdecim — FIR decimator
firtdecim — transposed FIR decimator
firfracdecim — FIR fractional decimator
firinterp — FIR interpolator
firfracinterp — FIR fractional interpolator
firsrc — FIR sample rate change filter
firholdinterp — FIR interpolator that uses hold interpolation between input samples
firlinearinterp — FIR interpolator that uses linear interpolation between input samples
fftfirinterp — FFT-based FIR interpolator
You cannot convert between the FIR and CIC structures.
[b,a]=ellip(5,3,40,.7);
hq = dfilt.df2t(b,a);
hq2 = convert(hq,'df1')
hq2 =
FilterStructure: 'Direct-Form I'
Arithmetic: 'double'
Numerator: [0.1980 0.7886 1.4236 1.4236 0.7886 0.1980]
Denominator: [1 1.4339 1.8021 0.6139 0.2047 -0.2342]
PersistentMemory: false
States: Numerator: [5x1 double]
Denominator:[5x1 double]For an example of changing the structure of a multirate filter, try the following conversion from a CIC interpolator to a CIC interpolator with zero latency.
hm = mfilt.cicinterp(2,2,3,8,8)
hm =
FilterStructure: 'Cascaded Integrator-Comb Interpolator'
Arithmetic: 'int'
DifferentialDelay: 2
NumberOfSections: 3
InterpolationFactor: 2
RoundMode: 'floor'
PersistentMemory: false
States: Integrator: [3x1 States]
Comb: [3x1 States]
InputWordLength: 8
SectionWordLengthMode: 'MinWordLengths'
OutputWordLength: 8
hm2=convert(hm,'cicinterp')
hm2 =
FilterStructure: 'Cascaded Integrator-Comb Interpolator'
Arithmetic: 'fixed'
DifferentialDelay: 2
NumberOfSections: 3
InterpolationFactor: 2
PersistentMemory: false
InputWordLength: 8
InputFracLength: 15
FilterInternals: 'MinWordLengths'
OutputWordLength: 8dfilt in Signal Processing Toolbox documentation
![]() | coewrite | cost | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |