Option to specify initial model state or operating point for simulation
Model Configuration Pane: Data Import/Export
When you load initial states, the simulation starts from the specified state or operating point. You specify the initial state or operating point as a variable or expression. At the start of simulation, the software loads the initial state data.
By default, the model does not load initial states or an initial operating point at the start of simulation. The simulation uses default initial states and initial conditions specified in the model.
The simulation starts from the specified initial state or operating point. In the text box, specify the name of the variable that contains the initial state or operating point. For example, the initial state could be a
Simulink.op.ModelOperatingPointobject saved from a prior simulation of the same model.
To specify the most complete initial state information, use a
ModelOperatingPointobject. The model operating point contains complete information about the state of the simulation, including block states, hidden block states, the state of the solver and execution engine, and output values for some blocks. When you use a model operating point as the initial state, the simulation results are the same as a simulation that runs from the beginning. When you specify initial states using logged states data alone, the simulation results might not match. For more information, see Specify Initial State for Simulation.
When you specify logged states data as the initial state for simulation, use the
Structure with timeformat. These formats support several options that the
Arrayformat does not support:
Associating initial state values with the path to the block to which the state applies. This association removes dependencies on the block execution order.
Using different data types for each initial state value.
Initializing a subset of states.
Initializing states for a model hierarchy.
Arrayformat is not recommended. When you log states data using the
Arrayformat, the order of the states within the array depends on the execution order, which can change from one simulation to the next. The
Arrayformat does not include block path information, so the order of states in the array determines the initial state value associated with each block.
Initial states loaded using the Initial state parameter override initial conditions and initial values specified in the model.
To load initial state data for a model that contains bus-valued states, use the
By default, the software issues a warning when you specify initial states using the
Arrayformat. You can control this diagnostic behavior using the Initial state is array parameter.
The Initial state parameter does not load initial state data from a data dictionary. When a model uses a data dictionary and you disable model access to the base workspace, the Initial State parameter still has access to resolve variables in the base workspace.
The table summarizes recommended values for this parameter based on considerations related to code generation.
|Safety precaution||No recommendation|
|Type: string | character vector|
Introduced before R2006a