Global Optimization for a Simulink Model
1 view (last 30 days)
Show older comments
Miguel Esteras
on 11 Jan 2021
Commented: Miguel Esteras
on 18 Jan 2021
Hi,
The problem
I need to optimize 10 paramters of a simulink model within some lower/upper bounds so that the mean error between real and simulated ouput is minimized. The problem has multiple optima.
Question
How could I apply the a genetic algorithm or a surrogate optimization as part of the Simulink Design Optimization application? if not, how to convert a Simulink design optimization problem into an objective function that I can pass to the above mentioned functions?
Thank you for your help,
Miguel
0 Comments
Accepted Answer
Alan Weiss
on 11 Jan 2021
Edited: Alan Weiss
on 11 Jan 2021
You probably want to minimize the mean squared error. For an example, see lsqnonlin with a Simulink® Model. You can change the solver from lsqnonlin to ga or surrogateopt easily, by reformulating the objective function as in Nonlinear Data-Fitting.
One word of caution: you probably cannot optimize a Simulink model in parallel by setting the UseParallel option. Please try the optimization in serial.
Alan Weiss
MATLAB mathematical toolbox documentation
3 Comments
Alan Weiss
on 18 Jan 2021
Edited: Alan Weiss
on 18 Jan 2021
To call Simulink in parallel, the underlying mechanism should be parsim. However, ga and surrogateopt do not use parsim. Instead, they use parfor or some other mechanism. I believe that Simulink Design Optimization does use the correct mechanism, but I do not know that product so cannot give you advice relating to it.
Alan Weiss
MATLAB mathematical toolbox documentation
More Answers (0)
See Also
Categories
Find more on Surrogate Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!