How can I use fmincon to set up a nonlinear model predictive control for MIMO plants.

14 views (last 30 days)
I want to minimise the same cost function defined in the MPC toolbox. I want to use a nonlinear black box model which is a comercial simulator. I have an interface between Matlab and the simulator in order to read the outputs and to apply the control signals.
My confussion is about how to define several inputs and output constraints in the fmincon function handle.
best regards

Answers (1)

HIMOUR
HIMOUR on 22 Oct 2013
Edited: John Kelly on 27 Feb 2015
Hello, In the link below some complete examples about how to use "fmincon" in predictive control, you'll find a matlab function "nmpc" that uses fmincon, and some of it's examples. The problem for me is how to transmit reference signal
  1 Comment
Jhonatan Camacho
Jhonatan Camacho on 23 Oct 2013
Hi HIMOUR,
Thanks for your answer. I think the NMPC routine proposed by lars grune is a good start point for use the fmincon.
I have the following appreciations:
1.) The authors divide the code in three sections: update states, solve optimal control and apply control. This scheme is easy to adapt for black box models because the use of user defined functions.
2.) The objective function is based on minimize tracking error for system states. I think, it is possible to adapt the runningcosts user function in order to transmit the reference signal. However, it would be grate if is possible to minimize cost similar to MPC toolbox: http://www.mathworks.com/help/mpc/ug/qp-matrices.html
3) I implement a code using the NMPC routine as template. I approximate the delta u using the diff command. I use a simple sumation over the prediction horizon of the error signal and input cost.
4.) The results for me were very bad. I think it is because the fmincon function use backward/forward difference scheme to estimate the derivatives.
Thanks in advance for your answer. If you find other example using fmincon for MPC it would be interesting.

Sign in to comment.

Categories

Find more on Adaptive Control in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!