Main Content

designmethods

仕様オブジェクトからフィルターを設計するために使用できる手法

説明

methods = designmethods(designSpecs,'SystemObject',true) は、フィルター仕様オブジェクト designSpecs のフィルター System object を設計するために使用できる設計法を返します。

methods = designmethods(designSpecs,'default') は、フィルター仕様オブジェクト designSpecs の既定の設計法を返します。

methods = designmethods(designSpecs,TYPE,'SystemObject',true) は、フィルター仕様オブジェクト designSpecsTYPE 設計法を返します。TYPE'FIR' または 'IIR' のいずれかです。

methods = designmethods(designSpecs,'full','SystemObject',true) は、使用可能な各設計法の完全名を返します。たとえば、'full' 引数を指定した designmethods は、butter 法に対して Butterworth を返します。

すべて折りたたむ

ローパス フィルター設計仕様オブジェクトを作成し、有効な設計法を判定します。

designSpecs = fdesign.lowpass('Fp,Fst,Ap,Ast',500,600,0.5,60,1e4);
methods = designmethods(designSpecs,'SystemObject',true)
methods = 8x1 cell
    {'butter'    }
    {'cheby1'    }
    {'cheby2'    }
    {'ellip'     }
    {'equiripple'}
    {'ifir'      }
    {'kaiserwin' }
    {'multistage'}

チェビシェフ I 型設計法の詳細については、help を使用してください。

help(designSpecs,methods{2})
 DESIGN Design a Chebyshev type I iir filter.
    HD = DESIGN(D, 'cheby1') designs a Chebyshev type I filter specified by the
    FDESIGN object D, and returns the DFILT/MFILT object HD.
 
    HD = DESIGN(D, ..., 'SystemObject', true) implements the filter, HD,
    using a System object instead of a DFILT/MFILT object.
 
    HD = DESIGN(..., 'FilterStructure', STRUCTURE) returns a filter with the
    structure STRUCTURE.  STRUCTURE is 'df2sos' by default and can be any of
    the following:

    'df1sos'
    'df2sos'
    'df1tsos'
    'df2tsos'
    'cascadeallpass'
    'cascadewdfallpass'
 
    Some of the listed structures may not be supported by System object
    filters. Type validstructures(D, 'cheby1', 'SystemObject', true) to
    get a list of structures supported by System objects.
 
    HD = DESIGN(..., 'MatchExactly', MATCH) designs a Chebyshev type I
    filter and matches the frequency and magnitude specification for the
    band MATCH exactly.  The other band will exceed the specification.  MATCH
    can be 'stopband' or 'passband' and is 'passband' by default.
 
    HD = DESIGN(..., 'SOSScaleNorm', NORM) designs an SOS filter and scales
    the coefficients using the P-Norm NORM. NORM can be either a 
    discrete-time-domain norm or a frequency-domain norm. Valid time-domain 
    norms are 'l1','l2', and 'linf'. Valid frequency-domain norms are 
    'L1','L2', and 'Linf'. Note that L2-norm is equal to l2-norm 
    (Parseval's theorem) but the same is not true for other norms.
    
    The different norms can be ordered in terms of how stringent they are 
    as follows: 'l1' >= 'Linf' >= 'L2' = 'l2' >= 'L1' >= 'linf'.
    Using the most stringent scaling, 'l1', the filter is the least prone 
    to overflow, but also has the worst signal-to-noise ratio. Linf-scaling is 
    the most commonly used scaling in practice.
    
    Scaling is turned off by default, which is equivalent to setting
    SOSScaleNorm = ''.
 
    HD = DESIGN(..., 'SOSScaleOpts', OPTS) designs an SOS filter and scales
    the coefficients using an FDOPTS.SOSSCALING object OPTS.  Scaling options 
    are:
    Property                Default     Description/Valid values
    ---------               -------     ------------------------
    'sosReorder'            'auto'      Reorder section prior to scaling.
                                        {'auto','none','up','down','lowpass',
                                         'highpass','bandpass','bandstop'}
    'MaxNumerator'          2           Maximum value for numerator coefficients
    'NumeratorConstraint'   'none'      {'none', 'unit', 'normalize','po2'}
    'OverflowMode'          'wrap'      {'wrap','saturate'}
    'ScaleValueConstraint'  'unit'      {'unit','none','po2'}
    'MaxScaleValue'         'Not used'  Maximum value for scale values
    
    When sosReorder is set to 'auto', the sections will be automatically
    reordered depending on the response type of the design (lowpass,
    highpass, etc.).
    
    Note that 'MaxScaleValue' will only be used when 'ScaleValueConstraint'
    is set to something other than 'unit'. If 'MaxScaleValue' is set to a
    number, the 'ScaleValueConstraint' will be changed to 'none'. Further,
    if SOSScaleNorm is off (as it is by default), then all the SOSScaleOpts
    will be ignored.
 
    For more information about P-Norm and scaling options see help for DFILT\SCALE.
 
    % Example #1 - Compare passband and stopband MatchExactly.
       h     = fdesign.lowpass('Fp,Fst,Ap,Ast', .1, .3, 1, 60);
       Hd    = design(h, 'cheby1', 'MatchExactly', 'passband');
       Hd(2) = design(h, 'cheby1', 'MatchExactly', 'stopband');
       
       % Compare the passband edges in FVTool.
       fvtool(Hd);
       axis([.09 .11 -2 0]);
 

入力引数

すべて折りたたむ

フィルター仕様オブジェクト。関数 fdesign のいずれかとして指定します。

設計されたフィルターのインパルス応答。'FIR' または 'IIR' として指定します。指定しない場合、関数は 'FIR''IIR' の両方の応答タイプをサポートする設計法を出力します。

例: designmethods(designSpecs,'FIR','SystemObject',true)

出力引数

すべて折りたたむ

使用可能な設計法。cell 配列として返されます。各 cell には手法の名前が格納され、関数に入力される引数によって決まります。

バージョン履歴

R2009a で導入