how to solve optimal control problem with constraint for nonlinear system ?
6 次查看(过去 30 天)
显示 更早的评论
i'm trying to solve optimal control problem for nonlinear dynamic system with uncertaint condition using fmincon and ode and not recive desired output
optimization not converged to feasible point.
thanks.
0 个评论
采纳的回答
Shantanu Dixit
2025-4-28
Hi Hossein,
When using 'fmincon' to solve an optimal control problem for a nonlinear system, one common issue is that the optimization doesn't converge because the initial guess is too far from a feasible point. It helps if the initial guess already roughly satisfies the constraints (even though 'fmincon' can technically handle infeasible starting points, having a feasible or near-feasible initial guess usually makes a big difference)
Another thing you might want to check is the choice of algorithm. By default, 'fmincon' might not pick the best one for your type of problem. You can set an appropriate algorithm for the task by adding setting the 'Algorithm' when creating the options. https://www.mathworks.com/help/optim/ug/fmincon.html#busog7r-options.
It can also be useful to play with the solver tolerances. Sometimes the default tolerances are either too tight or too loose for a particular problem.
Lastly, if the solver is still having a hard time finding a feasible solution, enabling the feasibility mode is worth trying. It tells fmincon to first try to find any feasible point before worrying about optimizing the cost. This can be turnen on with 'EnableFeasibilityMode', true in the options. You can refer to the documentation for more information: https://www.mathworks.com/help/optim/ug/constrained-nonlinear-optimization-algorithms.html#mw_e825c521-552e-4f75-80e8-8a5c2d2062ee
Hope this helps.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinear Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!