Model Requirements for Importing Data

Before you can analyze and preprocess the estimation data, you must assign the data to the model ports or signals. In order to assign the data, the Simulink® model must contain one of the following elements:

  • Top-level Inport block

      Note:   You do not need an Inport block if your model already contains a fixed input block, such as a Step block.

  • Top-level Outport block

  • Logged signal, which can be a top-level signal in the model or a signal in a model subsystem

    To enable signal logging for a signal, in the Simulink Editor, select the signal, click the Record button arrow and click Log/Unlog Selected Signals. For more information, see Export Signal Data Using Signal Logging in the Simulink documentation.

When you create an experiment, as described in Create Experiment, the top level input and output ports as well as logged signals are selected by default. You can add or remove the input and output signals using the experiment editor. In the experiment editor, the rows in the Inputs panel correspond to the model's top-level Inport blocks.

Similarly, the rows in the Outputs panel correspond to either the top-level Outport blocks or logged signals in the model.

Select Input Signals

You can add the Inport block in the experiment editor by clicking the Select Inputs button in the Inputs panel to launch the Select Inputs dialog box. You can select the Inport block you want by selecting the check box corresponding to it and clicking OK. There is only one Inport block for the engine_idle_speed model.

Using the dialog box, you can import the input data by typing, for example, [time,iodata(:,1)] in the Inputs panel. To learn more about importing data, see Import Data.

Select Output Signals

You can add the Output block in the experiment editor by clicking Select Measured Output Signals in the Outputs panel to launch the Select Outputs dialog box. You can select the Outport block you want by clicking the check box corresponding to it, and clicking OK. There is only one Outport block for the engine_idle_speed model.

Using the dialog box, you can import the output data by typing, for example, [time,iodata(:,2)] in the Inputs panel. To learn more about importing data, see Import Data.

Related Examples

More About

Was this topic helpful?