No BSD License  

Highlights from
MPC: Multivariable Constrained State Space example

MPC: Multivariable Constrained State Space example

by

 

04 Jul 2008 (Updated )

A constrained MPC stirred tank reactor example

formcss( p, Upast, f )
%forms c for constraints
function ccon = formcss( p, Upast, f )

Ueye = repmat( eye( p.m ), p.N3, 1 );
Yeye = repmat( eye( p.n ), p.N2, 1);

ccon = [ Ueye*p.dumax;
        -1*Ueye*p.dumin;
        Ueye*( p.Umax-Upast( :, 1 ) );
        Ueye*( -1*p.Umin+Upast( :, 1 ) );
        Yeye*p.Ymax - f;
        -Yeye*p.Ymin + f ];

Contact us