How to solve an optimization problem with stability constraints using 'fmincon'?

4 ビュー (過去 30 日間)
camenzind
camenzind 2019 年 4 月 1 日
編集済み: Matt J 2019 年 4 月 2 日
Hi,
Let us say that a plant model of the following form is given:
The output of the model (y) is its position (x) and velocity (v).
Using this output, I am going to construct a PI controller (u) of the following form:
Then, the task is to find the optimal gains () and () such that the following quantity is maximized:
Without any constraints, this problem can be solve easily using the MATLAB command 'fminsearch' or 'fminunc.'
But I'd like to add a stability constraint such that the closed-loop system with PI control is always stable.
Mathematically, it is realized by constraining the eigenvalues of the closed-loop system in the left-hand plane.
But I'm wondering how to add this constraint using MATLAB commands.
Any comments will be greatly appreciated.
Thank you.

回答 (2 件)

Alan Weiss
Alan Weiss 2019 年 4 月 2 日
Perhaps this example will give you some ideas. It is written as a multiobjective problem, but you can adapt the code easily to single-objective minimization.
Alan Weiss
MATLAB mathematical toolbox documentation
  2 件のコメント
Stephan
Stephan 2019 年 4 月 2 日

Alan could you please explain the reason for the warning the OP gets, when trying to use eig? I could not find something in the documentation so far.

Alan Weiss
Alan Weiss 2019 年 4 月 2 日
I have no idea. The link I gave was to an optimization example using eig, so I know that it can work, and the warning the OP referred to must be for something else.
Alan Weiss
MATLAB mathematical toolbox documentation

サインインしてコメントする。


Matt J
Matt J 2019 年 4 月 2 日
編集済み: Matt J 2019 年 4 月 2 日
Since it isn't clear that such an eigenvalue constraint is smooth, I would use ga instead of fmincon. This is closer to what you were doing with fminsearch, but with ga you can specify a nonlinear constraint function like the following,
function [c,ceq]=nonlcon(x)
ceq=[];
c=max(real(eig(x)));
end

カテゴリ

Help Center および File ExchangeAdaptive Control についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by