Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MPC toolbox- simulink

57 views
Skip to first unread message

ben harper

unread,
Oct 26, 2009, 10:28:03 AM10/26/09
to
i have a nonlinear model in matlab.
i have linearized it and obtained linear model.
i have designed a controller with mpctool for linear model.
can i use this controller with the nonlinear simulink model?

thank you

ben harper

unread,
Nov 5, 2009, 7:52:02 AM11/5/09
to
can you give a demo etc. which has nonlinear simulink model
which is controlled by
linear mpc controller?

thank you

Arkadiy Turevskiy

unread,
Nov 5, 2009, 1:34:02 PM11/5/09
to
Hi Ben,

If you add MPC Controller block from the Simulink library of Model Predictive Control Toolbox to your Simulink model, and wire the inputs and outputs to the rest of the model, you can just open the block, and press "Design" button. This will linearize your Simulink model and open the GUI for designing the MPC controller. Once you are done with the design, simply run your Simulink model to test controller against your nonlinear model.

This is shown in detail here: http://www.mathworks.com/products/demos/mpc/MPC_Intro/index.html

HTH.
Arkadiy

"ben harper" <contr...@gmail.com> wrote in message <hcuhph$rb3$1...@fred.mathworks.com>...

ben harper

unread,
Nov 5, 2009, 2:48:03 PM11/5/09
to
Dear Arkadiy,
I made the steps you have proposed.
But matlab gived the error "cannot trim" while trying to linearize my simulink system.

my nonlinear system is open loop unstable. but when controller is put in it becomes stable.
can the reason of the trim error could be the unstableness of my ssytem?

thank you.

ben harper

unread,
Nov 21, 2009, 5:11:03 PM11/21/09
to
i solved this problem with matlab's linmod + trim commands.
i have put input and output bloacks to the simulink model. and then linearized effectively.

Cristian

unread,
Oct 18, 2011, 9:07:11 PM10/18/11
to
"ben harper" wrote in message <he9ohn$2vv$1...@fred.mathworks.com>...
> i solved this problem with matlab's linmod + trim commands.
> i have put input and output bloacks to the simulink model. and then linearized effectively.

Hello Ben, I need your help, can you explain how to add linmod + trim command to MPC design wizard.
0 new messages