To test the simulation output of a model against a defined baseline, use a baseline test
case. In this example, use the
model to compare the simulation output to a baseline captured from an earlier state of the
To open the Test Manager from the model, select Analysis > Test Manager.
From the Test Manager toolstrip, click New to create a test file. Name and save the test file.
The test file consists of a test suite that contains one baseline test case. They appear in the Test Browser pane.
Right-click the baseline test case in the Test Browser
pane, and select Rename. Rename the test case to
Slip Baseline Test.
Under System Under Test in the test case, click the
Use current model button to load the
sldemo_absbrake model into the test case.
To record a baseline from the system under test, under Baseline Criteria, click Capture.
In the Capture Baseline dialog box, for the file format, select
MAT. Specify a location to save the baseline to
and click Create.
Expand the Baseline Criteria section. The baseline
criteria file and the logged signals appear in the table. Set the
Absolute Tolerance of the
To add or remove columns in the baseline criteria table, click the column selector button .
For more information about tolerances and criteria, see Apply Tolerances to Test Criteria.
sldemo_absbrake model, set the Desired
relative slip constant block to
In the Test Manager, select the Slip Baseline Test case in the Test Browser pane.
On the Test Manager toolstrip, click Run.
In the Results and Artifacts pane, the new test result appears at the top of the table.
Expand the results until you see the baseline criteria result. Right-click the result and select Expand All Under.
yout.Ww passes, but the overall baseline test
fails because other signal comparisons specified in the Baseline
Criteria section of the test case were not satisfied.
To view the
yout.Ww signal comparison between the model and
the baseline criteria, expand
Baseline Criteria Result and
click the option button next to the
The Comparison tab opens and shows the criteria
comparisons for the
yout.Ww signal and the tolerance.
You can also view signal data from the simulation. Expand
Output and select the signals you want to plot.
The Visualize tab opens and plots the simulation output.
For information on how to export results and generate reports from results, see Export Test Results and Generate Reports.