LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to tune an MPC controller

How is an MPC controller having 2 controller outputs tunned using 

the MPC cost weights matrices?

0 Kudos
Message 1 of 7
(4,508 Views)

Are you trying to implement the formula below in Labview?  (found in Wikipedia)

 

Principles of MPC

Model Predictive Control (MPC) is a multivariable control algorithm that uses:

  • an internal dynamic model of the process
  • a history of past control moves and
  • an optimization cost function J over the receding prediction horizon,

to calculate the optimum control moves.

The optimization cost function is given by:

 

DARN - the formula didn't copy  Smiley Mad  Well the link is here


without violating constraints (low/high limits)

With:

xi = i -th controlled variable (e.g. measured temperature)

ri = i -th reference variable (e.g. required temperature)

ui = i -th manipulated variable (e.g. control valve)

= weighting coefficient reflecting the relative importance of xi

= weighting coefficient penalizing relative big changes in ui

etc.

 

 

Message Edited by tbob on 05-11-2010 11:59 AM
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 7
(4,495 Views)

Yes, I have done the implemention but the needs tips on 

how tune the MPC controller outputs (MIMO). 

0 Kudos
Message 3 of 7
(4,490 Views)

Since this is a Labview forum, you will be lucky to find any help on this subject here.  Are there any MPC help websites?  Google it.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 7
(4,486 Views)

tbob,

 

LabVIEW actually can do Model Predictive Control ! It is part of the Control Design and Simulation Module and it helps you develop, analyze and implement such type of controllers.

 

Vicky Vicky,

 

The tuning is related to the problem you are defining. Maybe you want to check this example and compare with your model:

C:\Program Files\National Instruments\LabVIEW 2009\examples\Control and Simulation\Control Design\MPC\CDEx MPC with Dual Constraints.vi

 

Here are some other guidelines:

1. The model has to be discrete. To discretize, please use the Control Design Functions (which we are discussion in another thread)

2. The Constraints are defined by the physical limits of the plant. In general it is a "cone" or only some lines that delimit the response.

3. The stopping criteria defines how the solver should work. In general you should not be changing this values, but it depends on the problem you are trying to solve

4. The MPC Controller Parameter defines how the sliding window will work. Notice that the Prediction Horizon (how far in the future you see) has to be bigger than the Control Horizon. You should not need to use Integral Action.

5. The Cost Weighting Parameters are the main feature to look at. The define which variable of your system should be optimized first. The documentation tells you how to properly populate those matrices based on the model.

 

Please let me know if this makes sense to you.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 5 of 7
(4,453 Views)

Vicky Vicky,

 

Here are some good documents from the manual of Control Design and Simulation Module. Hopefully they would help.

 

CD Create MPC Controller

http://zone.ni.com/reference/en-XX/help/371894C-01/lvctrldsgn/cd_creatempc/

 

CD Set MPC Controller

http://zone.ni.com/reference/en-XX/help/371894C-01/lvctrldsgn/cd_setmpc/

Andy Chang
National Instruments
LabVIEW Control Design and Simulation
0 Kudos
Message 6 of 7
(4,429 Views)

Can anyone help me please! I've been trying to design a mpc controller for my state space system but I can't. The examples I used them and change the constraints and the model and doesn work, I don't understand them also. Please somebody help I have to get this done as quickly as possible. The space state model with some contraints are:

 

A=[-0.001118 0.00109;0.001597 -0.003519];

B=[2.415;0];

C=[0 1;1 0];

D=[0;0

umin = 0;

umax = 7.5e-4;

ymin = [0;0];

ymax = [0.69;0.69];

 

I would appreciate any helpp!°!

0 Kudos
Message 7 of 7
(4,018 Views)