Main Content

sdo.requirements.SignalTracking

Reference signal to track

Description

Specify a tracking requirement on a time-domain signal. You can then optimize the model response to track the reference using sdo.optimize.

You can specify an equality, upper bound, or lower bound requirement.

Creation

Description

track_req = sdo.requirements.SignalTracking creates an sdo.requirements.SignalTracking object and assigns default values to its properties.

example

track_req = sdo.requirements.SignalTracking(Name=Value) specifies one or more properties using name-value arguments. For example, track_req = sdo.requirements.SignalTracking(Type=">=") creates an sdo.requirements.SignalTracking object and specifies the Type property as a lower bound.

example

Before R2021a, use commas to separate each name and value, and enclose Name in quotes. For example, track_req = sdo.requirements.SignalTracking("Type",">=") creates an sdo.requirements.SignalTracking object and specifies the Type property as a lower bound.

Properties

expand all

Absolute tolerance used to determine bounds as the signal approaches the reference signal, specified as a nonegative scalar.

The bounds on the reference signal are given by:

yu = (1 + RelTol)yr + AbsTol

yl = (1 – RelTol)yrAbsTol

where yr is the value of the reference at a certain time, yu and yl are the upper and lower tolerance bounds corresponding to that time point.

Requirement description, specified as a character vector.

Example: 'Requirement on signal 1'

.

Time points to use when comparing reference and test point signals, specified as one of the following values:

  • "Reference only" — Compare the signals at the time points of the reference signal only.

  • "Testpoint only" — Compare the signals at the time points of the test point signal only.

  • "Reference and Testpoint" — Compare the signals at the time points of both the reference and test point signals.

Linear interpolation is used to compare the signals at the same time points.

The sdo.requirements.SignalTracking object stores the value as a character vector.

Algorithm for evaluating the requirement when the Type property is "==", specified as one of the following values:

  • "SSE"

  • "SAE"

  • "Residuals"

When the requirement is evaluated using evalRequirement, the software computes the error between the reference and test point signals. This property specifies how the error signal e(t) = ys(t) – yr(t) should be processed.

Requirement name, specified as a character vector.

Option to enable normalization, specified as "on" to enable normalization and "off" otherwise. The maximum absolute value of the reference signal is used for normalization.

The sdo.requirements.SignalTracking object stores the value as a character vector.

Reference signal to track, specified as a timeseries object with real finite data points.

Absolute tolerance used to determine bounds as the signal approaches the reference signal, specified as a nonegative scalar.

The bounds on the reference signal are given by:

yu = (1 + RelTol)yr + AbsTol

yl = (1 – RelTol)yrAbsTol

where yr is the value of the reference at a certain time, yu and yl are the upper and lower tolerance bounds corresponding to that time point.

Option to enable robust treatment of outliers when evaluating the requirement, specified as "on" to enable robust treatment of outliers and "off" otherwise.

When robust treatment of outliers is enabled and you call evalRequirement, the software uses a Huber loss function to evaluate the cost for the tracking error outliers. The tracking error is calculated as e(t)=yref(t)-ytest(t). The software uses the error statistics to identify the outliers.

The exact cost function used, F(x), depends on the requirement evaluation Method.

The sdo.requirements.SignalTracking object stores the value as a character vector.

Method NameCost Function for NonoutliersCost Function for Outliers
"SSE"

F(x)=tNOLe(t)×e(t)

NOL is the set of nonoutlier samples.

F(x)=tOLw×|e(t)|

w is a linear weight. OL is the set of outlier samples.

"SAE"

F(x)=tNOL|e(t)|

NOL is the set of nonoutlier samples.

F(x)=tOLw

w is a constant value. OL is the set of outlier samples.

"Residuals"

The software does not remove the outliers.

F(x)=[e(0)e(N)]

N is the number of samples.

Tracking requirement type, specified as one of the following values and stored as a character vector:

  • "==" — Tracking objective.

    "<=" — Upper bound

  • ">=" — Lower bound

Weights to use when evaluating the tracking error between the reference and test point signals, specified as a vector with the same number of elements as the Time property of the timeseries object in the ReferenceSignal property.

By default, the weights are all 1.

Object Functions

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

Examples

collapse all

Create a signal tracking object and specify a reference signal.

r = sdo.requirements.SignalTracking;
r.ReferenceSignal = timeseries(1-exp(-(0:10)'));

Alternatively, you can specify the reference signal when you create the object

r = sdo.requirements.SignalTracking(...
        ReferenceSignal=timeseries(1-exp(-(0:10)')));

Alternatives

Use getbounds to get the bounds specified in a Check Against Reference block.

Version History

Introduced in R2010b