Main Content

Set Model to Steady-State When Estimating Parameters (GUI)

This example shows how to set a model to steady-state in the process of parameter estimation. Setting a model to steady-state is important in many applications such as power systems and aircraft dynamics. This example uses a population dynamics model.

Model Description

The Simulink® modelsdoPopulationInfluxmodels a simple ecology where an organism population growth is limited by the carrying capacity of the environment.

$$\frac{d y}{dt} = R (1 - \frac{y}{K}) (y + 10)$$

  • $R$is the inherent growth rate of the organism population.

  • $K$is the carrying capacity of the environment.

There is also an influx of other members of the organism from a neighboring environment. The model uses normalized units.

Open the model.

open_system('sdoPopulationInflux')

Open Parameter Estimator App

To open theParameter Estimator, in the Simulink model window, in theAppsgallery, underControl Systems, clickParameter Estimator. InParameter Estimator, clickOpen Sessionand selectOpen from model workspace, and then selectsdoPopulationInflux_spesessionto load a session with population experiment data already loaded. In the toolstrip, clickPlot Model Response图模型与模型initia的回应l parameter values forRandK. The plot shows that with the model's initial parameter values, the model output is not close to the measured data. You can use the app to compute better estimates of these parameters.

Estimate Parameters

The pre-configured parameter estimation session also specifies thatRandKare to be estimated, and that their lower bounds are 0 since the inherent growth rate and environment carrying capacity are not negative. In the toolstrip, clickAdd Plot并添加一个阴谋显示参数轨迹during estimation, and another plot to show the estimation cost. Use theViewtab to lay out the plots in a convenient format. ClickEstimateto estimate parametersRandK. The optimization goes through several iterations, changing the values of the parameters to improve the fit between model response and data.

Comparing the measured population data with the optimized model response shows that they still do not match well. There is a transient at the beginning of the model response, where it is markedly different from the measured data.

Compute Steady-State Operating Point During Parameter Estimation

To improve the fit between the model and measured data, the model needs to be set to steady-state when parameters are estimated. In the toolstrip clickMore Optionsand selectOperating Point Options.

This shows a dialog where you can specify how to compute steady-state operating points during parameter estimation. There is one state in this model, namely the initial condition of the integrator. Use the operating point dialog to specify that this state should be treated as an unknown, and it should be set to steady state. During parameter estimation, the operating point computation will vary this state to set it at steady-state.

The input to the model is known from the experimental data for the population influx. Use the operating point dialog to specify that this input is known. This input will not be varied by the operating point computation during parameter estimation.

You can also specify options for computing the operating point, by using the options tab in the dialog. For example, the optionGradient descent with projectionis often used to find the operating point for systems that use physical modeling.

After specifying to compute the operating point, clickEstimateand perform parameter estimation again. There is no more transient at the beginning of the model response, and there is a much better match between the model response and measured data, which is also reflected by the lower objective/cost function value in the second optimization. This indicates that a good set of parameter values was found.

Related Examples

To learn how to put models in a steady state using thesdo.optimizecommand, seeSet Model to Steady-State When Estimating Parameters (Code).

Close the model.

bdclose('sdoPopulationInflux')