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

futureSetPt( p )
%calculate w for u calculation
function w = futureSetPt( p )

w = p.y( :,1 );

for j = 2:p.N2+1
    w( :, j ) = p.alpha*w( :, j-1 ) + ( 1 - p.alpha )*p.r( :, j );
end

w = w( :,2:end );

w = w(:);
%wnew = [ w( 1 , 1 ); w( 2, 1 ); w( 1, 2 ); w( 2, 2 ); w( 1, 3 ); w( 2, 3 ) ];

%wnew = [ w( 1 , 1 ); w( 1, 2 ); w( 1, 2 ); w( 2, 2 ); w( 1, 3 ); w( 2, 3 ) ];

Contact us