Optimization of Simulink parameters using Global Optimization toolbox

5 views (last 30 days)
Hi,
In my current project, I am using a complex Simulink model that represents a vehicle, its engine and its driver. The driver is mainly a PI regulator which applies less or more acceleration pedal to the engine, based on the error between target and actual vehicle speed. What I would like to do is to optimize the tuning of this regulator with two objectives :
  • having the best regulation, i.e. minimizing the mean error between target and achieved speed
  • minimizing the coefficient of variation of the accelerator pedal : i want to avoid my driver to be too "dynamic", i.e. oscillations on the accelerator pedal.
The way I see it, it is an optimization problem with an objective function (which can either be the mean error or the variance of the pedal signal), and a non linear inequality function (which is the difference between the mean error or the variance of the pedal, compared to a target value which I have from experimental data). So either I try to minimize Error while keeping Variance under a target value, either I try to minimize the Variance while keeping the Error under a satisfying value.
The specificity is that in order to compute the objective function, the solver needs to change the parameters of the simulink model (with set_param), run the simulation and gather the outputs (saved to workspace).
I first started trying to solve this problem by using fmincon, patternsearch but the solver was not behaving as I need : it found a local minima very quickly (at the first iteration or a few more), which was not at all the global minimum ; or it could simply not find a feasible point satisfying the constraint.
From what I understood, the multistart algorithm could help to avoid getting stuck close to the starting point, so this is the solution I am currently trying. But I am struggling to find the most adapted solver for my problem : what is the best solution in your opinion ?
Thanks for your help,
Thomas

Answers (1)

Alan Weiss
Alan Weiss on 31 Jul 2020
There are a few examples in the documentation using Optimization Toolbox™ with Simulink®:
Perhaps these examples will show how to use Global Optimization Toolbox solvers, too.
It is possible that the issue you are having with fmincon stopping too quickly is related to finite differences. See Optimizing a Simulation or Ordinary Differential Equation.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Categories

Find more on Manual Performance 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!