Main Content

sdo.requirements.BodeMagnitude

Bode magnitude bound

Description

Specify frequency-dependent piecewise-linear upper and lower magnitude bounds on a linear system. You can then optimize your model to meet the requirements using sdo.optimize.

You can specify upper or lower bounds, include multiple linear edges, and extend them to + or –infinity.

You must have Simulink® Control Design™ software to specify bode magnitude requirements.

Creation

Description

example

bode_req = sdo.requirements.BodeMagnitude creates an sdo.requirements.BodeMagnitude object and assigns default values to its properties.

example

bode_req = sdo.requirements.BodeMagnitude(Name,Value) specifies one or more properties using name-value arguments. Name is a property name and Value is the corresponding value. Name must appear inside quotes. You can specify several name-value arguments in any order as Name1,Value1,...,NameN,ValueN.

Properties

expand all

Frequency values for the gain bound, specified as a vector. Specify the start and end frequencies for all the edges in the piecewise-linear bound. The property must be a nx2 array of finite doubles, where each row specifies the start and end frequencies of an edge in the piecewise-linear bound. The start and end frequencies must define a positive length. The number of rows must match the number of rows of the BoundMagnitudes property.

Use set to set this and the BoundMagnitudes properties simultaneously.

Use the FrequencyUnits property to specify the frequency units.

Magnitude values for the gain bound, specified as a vector. Specify the start and end gain values for all the edges in the piecewise-linear bound. The property must be a nx2 array of finite doubles where each row specifies the start and end gains of an edge in the piecewise-linear bound. The number of rows must match the number of rows of the BoundFrequencies property.

Use set to set this and the BoundFrequencies properties simultaneously.

Use the MagnitudeUnits property to specify the magnitude units.

Requirement description, specified as a character vector. For example, 'Requirement on signal 1'.

Frequency-axis scaling, specified as either log or linear. Use this property to determine the value of the bound between edge start and end points, specified as one of the following values:

  • 'log' — Logarithmic scaling

  • 'linear' — Linear scaling

For example, if bound edges are at frequencies f1 and f2, and the bound is to be evaluated at f3, the edges are interpolated as a straight lines. The x-axis is either linear or logarithmic.

Frequency units of the requirement, specified as one of the following values:

  • 'Hz'

  • 'rad/s'

  • 'rpm'

  • 'kHz'

  • 'MHz'

  • 'GHz'

  • 'rad/nanosecond'

  • 'rad/microsecond'

  • 'rad/millisecond'

  • 'rad/minute'

  • 'rad/hour'

  • 'rad/day'

  • 'rad/week'

  • 'rad/month'

  • 'rad/year'

  • 'cycles/nanosecond'

  • 'cycles/microsecond'

  • 'cycles/millisecond'

  • 'cycles/hour'

  • 'cycles/day'

  • 'cycles/week'

  • 'cycles/month'

  • 'cycles/year'

Magnitude units of the requirement, specified as either 'db' (decibels) or 'abs' (absolute units).

Requirement name, specified as a character vector.

Extend bound in a negative or positive frequency direction.

Specify whether the first and last edge of the bound extends to –inf and +inf respectively. Use to bound signals that extend beyond the frequency values specified by the BoundFrequencies property.

Must be a 1x2 logical array of true or false. If true, the first or last edge of the piecewise linear bound is extended in the negative or positive direction.

Magnitude bound type, specified as one of the following:

  • '<=' — Upper bound

  • '>=' — Lower bound

Use to specify whether the piecewise-linear bound is an upper or lower bound. Use for upper bound and for lower bound.

Object Functions

evalRequirementEvaluate design requirement
copyCopy design requirement
getGet design requirement property values
setSet design requirement property values

Examples

collapse all

Construct a Bode magnitude requirements object and specify bound frequencies and magnitudes.

r = sdo.requirements.BodeMagnitude;
set(r,'BoundFrequencies', [0.1 10; 10 100],...
'BoundMagnitudes',[1 1; 0.1 0.1])

Alternatively, you can specify the frequency and magnitude during construction.

r = sdo.requirements.BodeMagnitude(...
    'BoundFrequencies', [1 10; 10 100], ...
    'BoundMagnitudes', [1 1; 1 0]);

Alternatives

Use getbounds to get the bounds specified in a Check Bode Characteristics (Simulink Control Design) block.

Version History

Introduced in R2010b