Nonlinear optimization with differential equations in Constraint

1 Ansicht (letzte 30 Tage)
Sareh Agheb
Sareh Agheb am 18 Mai 2018
Kommentiert: Nafis Irtija am 26 Sep. 2020
Hello, I have a nonlinear optimization problem like min f(X), where X is a vector of four elements. And the constraints are in the form of dX/dt=g(X,u), where u is the decision variable and it is defined by: u=h(X). I tried to use fmincon and ode23 together, however, I do not know what to do with u=h(X) as the constraint. If I want to define that as a nonlinear constraint in fmincon, how to define the function as X is not still known. Thank you.

Antworten (2)

Nikhil Negi
Nikhil Negi am 18 Mai 2018
i can think of two ways you can try both try replacing the dX/dt = g(X,u) with dX/dt = g(X,h(X)) so eventually you have dX/dt = p(X) and then continue with how you did it.
or you can define u as a separate function and pass it as a parameter when calculating dX/dt.
  4 Kommentare
Nikhil Negi
Nikhil Negi am 21 Mai 2018
Bearbeitet: Nikhil Negi am 21 Mai 2018
i don't think your x0 is getting updated to x00=[x(end,1),x(end,2),x(end,3),x(end,4)] should it get updated for the next window of time?? i'm not really familiar with model predictive control but from your code it seems like you want it to get updated.
Sareh Agheb
Sareh Agheb am 22 Mai 2018
Thank you Nikhil for your help. x00 and x is getting updated in MyobjFunction, but the problem is the results of x is not returned to the main program. So, what I get for both x and u is just zero.

Melden Sie sich an, um zu kommentieren.


Sareh Agheb
Sareh Agheb am 21 Mai 2018
Bearbeitet: Sareh Agheb am 21 Mai 2018
Hello Nikhil. I am going to apply Model Predictive Control on the above optimization problem. So, the objective should be minimized over the control time horizon. U is the control input and x is the states. Since, I am using a feedback control, u=-kx2. u is a vector of N by 1, and x is a matrix of N by 4, where N is the prediction horizon.
  1 Kommentar
Nafis Irtija
Nafis Irtija am 26 Sep. 2020
Hello Sareh, were you able to solve this problem? I am trying to solve an optimization problem similar to yours, and I am having a similar problem. I am unable to find any answer.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Nonlinear Optimization finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by