Download PnPMPC Toolbox v. 1.0 - User manual

Transcript
and it can be used in the following two ways:
• objlss = objlss.addExoInput(M,N), in this case we set the global M ∈ Rn×nd and N
∈ Rp×nd matrices of the LSS, according to (2.7) and (2.8).
• objlss = objlss.addExoInput(M,N,i,j), in this case we set only blocks Mij and
Nij of matrices M and N (2.5) and (2.6), i.e. the relation among subsystem i and the
exogenous signal j, defined (2.5) and (2.6). The relation among all the other subsystems
different from i and exogenous signal j is automatically set as zero if not defined yet.
The addCentralizedInput method
The addCentralizedInput method is used to set matrices Bcen and Dcen .
The method declaration is:
objlss = objlss.addCentralizedInput(Bcen,Dcen,i,j)
and it can be used in the following two ways:
• objlss = objlss.addCentralizedInput(Bcen,Dcen), in this case we set the global
Bcen ∈ Rn×nu and Dcen ∈ Rp×nu matrices of the LSS, according to (2.7) and (2.8).
• objlss = objlss.addCentralizedInput(Bcen,Dcen,i,j), in this case we set Bcenij
and Dcenij of matrices Bcen and Dcen (2.5) and (2.6), i.e. the relation among subsystem
i and the centralized input j, defined (2.5) and (2.6). The relation among all the other
subsystems different from i and centralized control input j is automatically set as zero if
not already defined.
example1lss ;
% specify how exogenous input number 1 affects system 1 ( creation of M )
modelCart = modelCart . addExoInput ([0;1] ,[] , 1 ,1);
% specify how exogenous input number 1 affects system 2 ( creation of M )
modelCart = modelCart . addExoInput ([16;2] ,[] ,2 ,1);
% specify how exogenous input number 2 affects system 2 ( creation of M )
modelCart = modelCart . addExoInput ([0;3] ,[] ,2 ,2);
% instead of calling addExoInput three times we can use
% modelCart = modelCart . addExoInput ([0 0; 1 0; 16 0; 2 3] ,[]);
% specify how centralized input number 1 affects system 1 ( creation of Bcen )
modelCart = modelCart . addCentral i ze d In p ut ([0;4] ,[] ,1 ,1);
% specify how centralized input number 1 affects system 2 ( creation of Bcen )
modelCart = modelCart . addCentral i ze d In p ut ([0;5] ,[] ,2 ,1);
% instead of the previous calls to addCentral i ze d In p ut we can use
% modelCart = modelCart . addCentral i ze d In p ut ([0;4;0;5] ,[]);
14