MIMOtool Help Desk

DATA STRUCTURE

All the Matlab variables necessary to MIMOtool are stored in a single global structure array [7] "stack" that in turn contains four structures: "general", "evaluation", "simulation" and "temp"; through their names, it's therefore simple from the Matlab command line to access and to handle every variable or export data to other applications.

Without to explain in details the meaning and the relative position inside the global structure "stack" of all the variables used in MIMOtool, the variables in which the user could be interested in are:

 

Variable

Position

 

 

Model (or plant) name

stack.general.model

Plant matrix A

stack.general.A

Plant matrix B

stack.general.B

Plant matrix C

stack.general.C

Plant matrix D

stack.general.D

Numerator of the transfer matrix

stack.general.tfNUM

Denominator of the transfer matrix

stack.general.tfDEN

Advanced flag *

stack.general.adv_flag

Kind of controller

stack.evaluation.kind

Controller system matrix **

stack.evaluation.K

Plant system matrix **

stack.evaluation.plant

Controller matrix Ak

stack.simulation.Ak

Controller matrix Bk

stack.simulation.Bk

Controller matrix Ck

stack.simulation.Ck

Controller matrix Dk

stack.simulation.Dk

Complementary Sensitivity matrix Po **

stack.evaluation.grafici.Po

Control Sensitivity matrix Pi **

stack.evaluation.grafici.Pi

 

 

 

 

(*) The setting (or resetting) of the advanced flag allows the user to activate (or deactivate) the two commands All Sensitivities and Both Sensitivities of the evaluation menu. Each time the user exits from MIMOtool, the value of this flag is saved and it will be reloaded at the next activation of the program.

 

(**) These system matrices represent a packed form of the corresponding state space matrices that can be extracted by using the Matlab command "unpck" (for more details, type help unpck at the Matlab prompt).

When the user closes the program MIMOtool, the global structure "stack" is deleted; at the same time, the workspace and the working directory previous to the calling of MIMOtool, which have been before saved, are restored.

Note: the only variable that the user can (and must) directly modify from the Matlab command line is the advanced flag stack.general.adv_flag.

After a controller has been computed in the last window of a Synthesis or Optimization section, all the variables needed for the evaluation and the simulation of the closed loop system, are stored in the two structures stack.evaluation and stack.simulation.

When the user saves the controller by means of the command Save Controller as …, these structures are copied respectively into the two variables evaluation_var and simulation_var and then they are saved in a .mat file so that it's possible, in another session, to reload the data relative to the current model and to start the evaluation and simulation sections directly from the Modeling main window.

 

In order to extract the matrices of the controller to the Matlab workspace, it's necessary to load the “.mat” file containing the controller by typing load  file_path / file_name.mat, and then to retrieve the four matrices with the unpck command: [Ak,Bk,Ck,Dk] = unpck(evaluation_var.K);

 

Alternatively, if the MIMOtool window is still active, one can simply type [Ak,Bk,Ck,Dk] = unpck(stack.evaluation.K);