Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

Specifying Output Options

Introduction

The Output options list on the Data Import/Export configuration pane (Data Import/Export Pane) enables you to control how much output the simulation generates. You can choose from three options:

Refining Output

The Refine output choice provides additional output points when the simulation output is too coarse. This parameter provides an integer number of output points between time steps; for example, a refine factor of 2 provides output midway between the time steps as well as at the steps. The default refine factor is 1.

To get smoother output, it is much faster to change the refine factor instead of reducing the step size. When the refine factor is changed, the solvers generate additional points by evaluating a continuous extension formula at those points. This option changes the simulation step size so that time steps coincide with the times that you have specified for additional output.

The refine factor applies to variable-step solvers and is most useful when you are using ode45. The ode45 solver is capable of taking large steps; when graphing simulation output, you might find that output from this solver is not sufficiently smooth. If this is the case, run the simulation again with a larger refine factor. A value of 4 should provide much smoother results.

Producing Additional Output

The Produce additional output choice enables you to specify directly those additional times at which the solver generates output. When you select this option, an Output times field is displayed on the Data Import/Export pane. Enter a MATLAB expression in this field that evaluates to an additional time or a vector of additional times. This option causes the solver to produce hit times at the output times you have specified, in addition to the times it needs to accurately simulate the model.

Producing Specified Output Only

The Produce specified output only choice provides simulation output only at the simulation start time, simulation stop time, and the specified output times. For example, if the simulation start time is set to 0 and the simulation stop time is set to 60, entering [10: 10: 50] in the Output times field results in simulation output at these times:

0, 10, 20, 30, 40, 50, 60

This option changes the simulation step size so that time steps coincide with the times that you have specified for producing output. The solver may hit other time steps to accurately simulate the model, however the output will not include these points. This choice is useful when you are comparing different simulations to ensure that the simulations produce output at the same times.

Comparing Output Options

A sample simulation generates output at these times:

0, 2.5, 5, 8.5, 10

Choosing Refine output and specifying a refine factor of 2 generates output at these times:

0, 1.25, 2.5, 3.75, 5, 6.75, 8.5, 9.25, 10

Choosing the Produce additional output option and specifying [0:10] generates output at these times

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

and perhaps at additional times, depending on the step size chosen by the variable-step solver.

Choosing the Produce specified output only option and specifying [0:10] generates output at these times:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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