Main Content

Specify Known Initial States

When to Specify Initial States Versus Estimate Initial States

Sets of measured data are often collected at various times and under different initial conditions. When you estimate model parameters using one data set and subsequently run another estimation with a second data set, your parameter values may not match.

You can use the Parameter Estimator to estimate the initial conditions using procedures that are similar to those you use to estimate parameters. You can then use these initial condition estimates as a basis for estimating parameters for your Simulink® model.

Engine Idle Speed Model

Open the nonlinear idle speed model of an automotive engine.

open_system('engine_idle_speed.slx')

Specify Model Initial States

After you select parameters for estimation, as described in Specify Parameters for Estimation, you can specify initial conditions of states in your model. By default, the estimation uses initial conditions specified in the Simulink model. If you want to specify initial conditions other than the defaults, use the Initial States panel in the experiment editor dialog. For this example, right click NewData and select Edit... from the list to open the experiment editor. Then, click Select Initial States button.

The Select Model States dialog for the engine_idle_speed model looks like

To obtain the engine_idle_speed model, run the following command.

openExample('sldo/EngineIdleSpeedModelExample')

Click the check box next to the state you would like to modify. For example, if you select engine_idle_speed/Transfer Fcn and enter the initial values -0.2 and 0, the Initial States panel now looks like

Click Select Parameters in the Parameter Estimation tab. After you also select the parameters as described in Specify Parameters for Estimation, the Edit: Estimated Parameters dialog looks like the following figure.

Related Examples

More About