Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

evalRequirement

Class: sdo.requirements.SignalTracking
Package: sdo.requirements

Evaluate tracking requirement

Syntax

c = evalRequirement(req,sig)
c = evalRequirement(req,sig,ref)

Description

c = evalRequirement(req,sig) evaluates whether a test point signal, sig, tracks the reference signal specified by a requirement object, req.

c = evalRequirement(req,sig,ref) evaluates whether sig tracks the reference signal specified by ref. req specifies the error computation options. Estimating parameters for multiple experiments requires you to repeatedly compare test point and reference signal sets. Use this syntax if you use the same evaluation criteria for all comparisons. You vary sig and ref, and re-use the requirement object, req.

Input Arguments

req

sdo.requirements.SignalTracking object.

sig

MATLAB® timeseries object or nxm array, where the 1st column is time and subsequent columns are signal values.

ref

Reference signal, specified as a MATLAB timeseries object.

Output Arguments

c

  • Measure of how well the test point signal matches the reference signal, if the Type property of req is '=='. Specify the algorithm used to compute the tracking measure through the Method property.

  • Signed distance of the test point signal to the reference signal, if the Type property of req is '>=' or '<='. Negative values indicate the bound is satisfied while positive values indicate that the bound is violated.

The command compares the reference and test point signals only at time points that are in the range of both signals. Time points outside this range are ignored. The software uses the interpolation method specified by ref.InterpolationTimes to compare the data in the valid time range.

Examples

expand all

Create the reference data.

time = (0:0.1:10)';
data = 1-exp(-time);

Create the signal tracking requirement object. Specify the reference signal.

req = sdo.requirements.SignalTracking;
req.ReferenceSignal = timeseries(data,time);

Obtain the test point signal.

sig = timeseries(1-exp(-time/2),time);

Evaluate the signal tracking requirement.

c = evalRequirement(req,sig);

When you estimate parameters for multiple experiments, you repeatedly compare test point and reference signal sets. If you use the same evaluation criteria for all comparisons, you can use the c = evalrequirement(req,sig,ref) syntax. You vary sig and ref, and re-use the requirement object, req. req specifies the estimation error computation options.

Create a reference and test point signal. Then, use a requirement object to evaluate the requirement.

Create the reference signal.

time = (0:0.1:10)';
data = 1-exp(-time);
ref = timeseries(data,time);

Create the signal tracking requirement object. Specify the error computation method.

Specify 'Residuals' as the algorithm for error computation.

req = sdo.requirements.SignalTracking;
req.Method = 'Residuals';

Obtain the test point signal.

sig = timeseries(1-exp(-time/2),time);

Evaluate the signal tracking requirement.

c = evalRequirement(req,sig,ref);

See Also

| |

Topics

    Was this topic helpful?