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,