Thread Subject:
MPC toolbox- simulink

Subject: MPC toolbox- simulink

From: ben harper

Date: 26 Oct, 2009 14:28:03

Message: 1 of 6

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

Subject: MPC toolbox- simulink

From: ben harper

Date: 5 Nov, 2009 12:52:02

Message: 2 of 6

can you give a demo etc. which has nonlinear simulink model
which is controlled by
linear mpc controller?

thank you

Subject: MPC toolbox- simulink

From: Arkadiy Turevskiy

Date: 5 Nov, 2009 18:34:02

Message: 3 of 6

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" <controlusc@gmail.com> wrote in message <hcuhph$rb3$1@fred.mathworks.com>...
> can you give a demo etc. which has nonlinear simulink model
> which is controlled by
> linear mpc controller?
>
> thank you

Subject: MPC toolbox- simulink

From: ben harper

Date: 5 Nov, 2009 19:48:03

Message: 4 of 6

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.

> 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

Subject: MPC toolbox- simulink

From: ben harper

Date: 21 Nov, 2009 22:11:03

Message: 5 of 6

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.

Subject: MPC toolbox- simulink

From: Cristian

Date: 19 Oct, 2011 01:07:11

Message: 6 of 6

"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.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
trim ben harper 21 Nov, 2009 17:14:08
linmod ben harper 21 Nov, 2009 17:14:08
model predictive c... ben harper 8 Nov, 2009 06:24:08
mpc Arkadiy Turevskiy 5 Nov, 2009 13:34:05
controller ben harper 26 Oct, 2009 10:29:05
linearization ben harper 26 Oct, 2009 10:29:05
simulink ben harper 26 Oct, 2009 10:29:05
mpc ben harper 26 Oct, 2009 10:29:05
rssFeed for this Thread

Contact us