Adjustment of a simulation model by optimization of parameters
4 ビュー (過去 30 日間)
I have a Simulink multibody model which depend on some uncertain parameters. I want to adjust them by using experimental data, so I pretend to give them diferent values on a range until simulation results are the same as experimental ones (or very close to them), in a iterative way. This is the algorithm I have on my mind:
- Give a value to uncertain variables
- Run the simulation model in Simulink
- Take some examples of the simulation results
- Compare them with experimental results
- Repite the cycle unti the results of the simulation are the same as experimental
I know there are optimization tools and functions on Matlab, but I don't know how to choose the appropriate one, neither how to configurate them. Could I do it using this optimization tool or is it better to do it programming by code?
Could someone recommend me a method, tool, function, tutorial or something to help me doing this adjustment? Has anyone an example of something similar to this? I would be great if i could see it.
Thank you in advance. Best regards,
Ameer Hamza 2020 年 4 月 2 日
If your model runs very fast, then you can use an optimization function such as fmincon to optimize the parameter. Something like this will work
function y = objFun(x)
% change values of x to your parameter names
sinOut = sim('modelName');
% calculate the fitness of the parameters using the simulation data
However, fmincon can take several hundred or thousands function evaluations to reach an optimal solution, so try this only if your model runs fast.
The other approach is to use the batch simulation features provided by the Simulink. See these links for details.