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:

All filters can be converted to the following structures:

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

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

FIR Structures

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')
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: 8

See Also

mfilt

dfilt in Signal Processing Toolbox documentation

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS