This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

scaleopts

Create an options object for second-order section scaling

Syntax

opts = scaleopts(biquad)
opts = scaleopts(biquad,'Arithmetic',arithType)

Description

example

opts = scaleopts(biquad) uses the current settings in the dsp.BiquadFilter System object™, biquad, to create an options object opts that contains specified scaling options for second-order section scaling. You can pass opts as an input to scale to apply scaling settings to a second-order filter.

opts = scaleopts(biquad,'Arithmetic',arithType) returns filter coefficients for the filter System object, biquad with the arithmetic specified in arithType.

Examples

collapse all

Create an options scaling object that contains the scaling options settings you require.

EllipI = design(fdesign.lowpass('N,Fp,Ap,Ast',10,0.5,0.5,20), 'ellip', 'FilterStructure', 'df1sos','SystemObject',true)
EllipI = 
  dsp.BiquadFilter with properties:

                       Structure: 'Direct form I'
                 SOSMatrixSource: 'Property'
                       SOSMatrix: [5x6 double]
                     ScaleValues: [6x1 double]
      NumeratorInitialConditions: 0
    DenominatorInitialConditions: 0
        OptimizeUnityScaleValues: true

  Show all properties

opts = scaleopts(EllipI)
opts =

              sosReorder: 'auto'
            MaxNumerator: 2
     NumeratorConstraint: 'none'
            OverflowMode: 'wrap'
    ScaleValueConstraint: 'unit'
           MaxScaleValue: 'Not used'

Input Arguments

collapse all

Input filter, specified as a dsp.BiquadFilter System object.

Example: biquad = dsp.BiquadFilter('Structure', 'Direct form I', ...'SOSMatrix', s,'ScaleValues', g);

Arithmetic type used during analysis, specified as 'double', 'single', or 'fixed'. The function assumes a double precision filter when the arithmetic input is not specified and the filter System object is in an unlocked state. The scaleopts function chooses the default values of the scaling options according to the 'Arithmetic' value and the System object biquad settings.

Output Arguments

collapse all

You can create an fdopts.sosscaling object, opts, using the scaleopts function.

The following table lists the properties of opts:

Parameter

Default

Description and Valid Value

sosReorder

'auto'

Reorder section prior to scaling.

Valid options are 'auto' (default), 'none', 'up', 'down', 'lowpass', 'highpass', 'bandpass', and 'bandstop'.

MaxNumerator

2

Maximum allowed value for numerator coefficients.

NumeratorConstraint

'none'

Specifies whether and how to constrain numerator coefficient values. Options are 'none' (default), 'unit', 'normalize', and 'po2'.

OverflowMode

'wrap'

Sets the way the filter handles arithmetic overflow situations during scaling. Valid options are 'wrap' (default), 'saturate', and 'satall'.

ScaleValueConstraint

'unit'

Specify whether to constrain the filter scale values, and how to constrain them. Valid options are 'unit' (default), 'none', and 'po2'.

MaxScaleValue

'Not used'

Maximum allowed scale values. The filter applies the MaxScaleValue limit only when you set ScaleValueConstraint to a value other than unit. Setting MaxScaleValue to a numerical value automatically changes the ScaleValueConstraint setting to none.

Example: opts = scaleopts(biquad)

Introduced in R2011a