02 April 2019 3 9K Report

Hi,

Let us say that a plant model of the following form is given:

\dot{q} = A*q + B*u,

y = C*q.

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:

u = K1*x + K2*v.

Then, the task is to find the optimal gains (K1) and (K2) such that some given cost function is minimized.

Without any constraints, this problem can be solved 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.

I tried to use the command 'eig' in the constraint function (nonlcon) of 'fmincon' but MATLAB says that command is not allowed to be used in the fmincon constraint function.

Any comments will be greatly appreciated.

Thank you.

More David Cho's questions See All
Similar questions and discussions