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.
The Simulink® model
sdoPopulationInflux models a simple ecology where an organism population growth is limited by the carrying capacity of the environment.
is the inherent growth rate of the organism population.
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.
To open the Parameter Estimator, in the Simulink model window, in the Apps gallery, under Control Systems, click Parameter Estimator. In Parameter Estimator, click Open Session and select
Open from model workspace, and then select
sdoPopulationInflux_spesession to load a session with population experiment data already loaded. In the toolstrip, click Plot Model Response to plot the model response with the model's initial parameter values for
K. 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.
The pre-configured parameter estimation session also specifies that
K are 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, click Add Plot and add a plot to show the parameter trajectories during estimation, and another plot to show the estimation cost. Use the View tab to lay out the plots in a convenient format. Click Estimate to estimate parameters
K. 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.
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 click More Options and select
Operating 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 option
Gradient descent with projection is often used to find the operating point for systems that use physical modeling.
After specifying to compute the operating point, click Estimate and 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.
To learn how to put models in a steady state using the
sdo.optimize command, see Set Model to Steady-State When Estimating Parameters (Code).
Close the model.