Simulink model parameters optimization

9 views (last 30 days)
Khalid
Khalid on 28 Nov 2016
Hi everyone
I would like to ask how I can arrange the following point in Simulink model:
1- I would like to use the optimization toolbox to estimate my Simulink model parameters to fit the measured data but I don't know how I can arrange the time series of the measured data so that can match the Model/Simulink or vice-versa.
2- Also, assume my model time series is from 0 to 10 and the parameters need to be estimated for the measured data between 5 to 8. is there any way to give the Optimization toolbox a range in time period (window/region) to start evaluating the parameters when the model reach that time period.
Thanks in advance

Answers (1)

Arkadiy Turevskiy
Arkadiy Turevskiy on 14 Dec 2016
For estimating parameters of Simulink model, I recommend using Simulink Design Optimization.
For the second part of your question you can either write a custom cost function as explained here , or create an output from the model that is equal to measured signal in [0;5] and [8;10] time ranges and equal to calculated model output in [5:8].
  2 Comments
Lee
Lee on 5 Sep 2018
Hi Arkadiy! I am already doing something similar to above, optimising up to 10 parameters using fsolve to match 10 target outputs. However, when using a Simulink model with variable-step solver (ode23tb), the process breaks down... the nature of the model means variable step is over 10x faster than fixed-step, but it seems the sim by sim variation in time steps creates too much noise in my objective function for fsolve to progress to a solution.
I have tried all 3 fsolve algorithms, even tightened the Simulink max-step size and tolerance (at sacrifice of speed) to try and improve the precision, but fsolve still fails regularly (depending on initial conditions and the targets). Any thoughts? or is variable-step just not compatible with optimisation toolbox due to the effect of this noise on calculating derivatives etc...?
LALIT PANKAJ GROVER
LALIT PANKAJ GROVER on 7 Sep 2021
Hello Arkadiy,
I want to optimize 2 system values from my simulink model to get a minimum power output. How can I define minimum of the power output value in requirements?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!