Why are my results of the parameter estimation not accurate enough when using function 'lsqnonlin'?

5 views (last 30 days)
It is sought to perform parameter estimation for a Simulink model using function 'lsqnonlin' from the Optimization Toolbox. Given are the experimental results in the form of a timeseries with a particular sampling rate and it is sought to find out the parameters of the Simulink model that produce simulation results that are close as possible to the experimental ones.
Using function 'lsqnonlin' I can formulate a cost function as the sum of squares of each data points in the timeseries from the experimental and the simulation results and have this minimized. The optimization results appears convergent, but when using the estimated parameters in the Simulink model, the simulation results are still far from the experimental results.
Why are my results of the parameter estimation not accurate enough when using function 'lsqnonlin'?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 11 Oct 2021
Please make sure to have a similar sampling rate for the Simulink model and the results from the experiment. In case it is chosen to use an automatic time step size in the Simulink model through the Configuration Parameters, then you cannot ensure that Simulink is going to use as many time steps for the simulation as the ones provided by the experiment. This will result in a smaller time series for the simulation, that you will then need to interpolate in the time instances where the experimental data are available. This way, the least-square problem is not accurately formulated and thus the optimization results will not be accurate.
Instead, please choose the solver configurations such that to allow for Fixed-Step size while specifying as time step (Fixed-step size (fundamental sample time)) the sampling time of your experimental data. By doing so, Simulink is set to use time steps that match the sample time of your experimental data available and hence the simulation will match better the experimental data without having to use resampling. Assuming that the sample size of your experimental data is 0.001, then please configure the Simulink Configuration settings as shown in the screenshot below,
Please note that MATLAB offers a built-in product in Simulink for performing parameter estimation, the so-called Parameter Estimation App, see the following documentation page for more information,

More Answers (0)


No tags entered yet.




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!