Documentation Center

  • Trial Software
  • Product Updates

Contents

convert

Convert filter structure of discrete-time or multirate filter

Syntax

hq = convert(hq,newstruct)
hm = convert(hm,newstruct)

Description

Discrete-Time Filters

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

  • 'df1sos': Direct-Form I, Second-Order Sections

  • 'df1tsos': Direct-Form I Transposed, Second-Order Sections

  • 'df2': Direct form II

  • 'df2t': Direct form II transposed. Default filter structure

  • 'df2sos': Direct-Form II, Second-Order Sections

  • 'df2tsos': Direct-Form II Transposed, Second-Order Sections

  • 'dffir': FIR

  • 'dffirt': Direct form FIR transposed

  • 'latcallpass': Lattice allpass

  • 'latticeca': Lattice coupled-allpass

  • 'latticecapc': Lattice coupled-allpass power-complementary

  • 'latticear': Lattice autoregressive (AR)

  • 'latticemamax': Lattice moving average (MA) maximum phase

  • 'latticemamin': Lattice moving average (MA) minimum 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': Direct form I

  • 'df1t': Direct form I transposed

  • 'df1sos': Direct-Form I, Second-Order Sections

  • 'df1tsos': Direct-Form I Transposed, Second-Order Sections

  • 'df2': Direct form II

  • 'df2t': Direct form II transposed. Default filter structure

  • 'df2sos': Direct-Form II, Second-Order Sections

  • 'df2tsos': Direct-Form II Transposed, Second-Order Sections

  • 'statespace': Single-input/single-output state-space

  • 'symmetricfir': Symmetric FIR. Even and odd forms

For the following filter classes, you can specify other conversions as well:

  • Minimum phase FIR filters can be converted to latticemamin

  • Maximum phase FIR filters can be converted to latticemamax

  • Allpass filters can be converted to latcallpass

convert generates an error when you specify a conversion that is not possible.

Multirate Filters

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.

Examples

[b,a]=ellip(5,3,40,.7); hq = dfilt.df2t(b,a);
hq2 = convert(hq,'df1');

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);

    Note:   The above example will generate a warning:

    Warning: Using reference filter for structure conversion. 
    Fixed-point attributes will not be converted. 

    Since CIC interpolators only use fixed-point arithmetic, the user may disregard this warning. The fixed-point structure will not be lost on conversion.

See Also

|

Was this topic helpful?