Skip to Main Content Skip to Search
Product Documentation

Viewing Simulink Time Series Data

Overview

The Test Results Viewer lets you plot test results over time. Simulink can generate time series data when it runs a model, and the SystemTest software can use this data to generate time series plots. Instead of knowing simply that a change in a test vector resulted in a specific test result value, you can now know when during the test that the test vector caused that test result value to be achieved.

This section shows how you plot test results containing time series data. The examples in this section use the model from the Inverted Pendulum demo; if you want to load this model and follow the examples in this section, see Before You Begin.

Creating a Time Series Plot

Time series plots require that you have time series data. Your test results will contain time series data because of any of the following:

You can verify whether your test generated time series data by reviewing the test results list in the Test Results Viewer's Data pane. The viewer labels time series test results as being of type Simulink.Timeseries (Simulink saves time series data within the workspace in Model Data Logs objects).

To create a time series plot:

  1. Run the test in the SystemTest software.

  2. Click the Time Series Plot button in the viewer.

  3. In the Define Plot pane, click the Y Axis menu to show a list of test results with time series data. The Y Axis field shows only test results with time series values. The X Axis field is always set to Time in a time series plot.

  4. Click the test result you want to use. For the Inverted Pendulum example, click st_loggedsignal.

  5. Click the Refresh Plot button.

The Test Results Viewer generates a time series plot with your selected data.

At this point, you can use the data exploration and refinement tools explained in Viewing Your Test Results and Refining Your Test Results to make more sense of the test results in the plot.

For example, you can use a constraint to step through each individual iteration, by selecting the Plot single iteration at a time check box.

As this example shows, the time series test result for a single test iteration is composed of many values over time. There are many points with uneven spacing reflecting the actual values of the signal over the time period.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS