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

formRss( p, HN123 )
%defines constraints for optimization
function Rcon = formRss( p, HN123 )

T = zeros( p.N3*p.m,p.N3*p.m );

for i=0:(p.N3-1)
    T( 1+2*i:2+2*i, 1:(i+1)*p.m ) = repmat( eye( p.m ), 1, i+1 );
end

Rcon = [ eye( p.N3*p.m ); 
    -1*eye( p.N3*p.m ) ;
    T;
    T*-1;
    HN123;
    -1*HN123    ];



Contact us