Documentation |
Modify value of Control Design Block in Generalized Model
M = setBlockValue(M0,blockname,val)
M = setBlockValue(M0,blockvalues)
M = setBlockValue(M0,Mref)
M = setBlockValue(M0,blockname,val) modifies the current or nominal value of the Control Design Block blockname in the Generalized Model M0 to the value specified by val.
M = setBlockValue(M0,blockvalues) modifies the value of several Control Design Blocks at once. The structure blockvalues specifies the blocks and replacement values. Blocks of M0 not listed in blockvalues are unchanged.
M = setBlockValue(M0,Mref) takes replacement values from Control Design blocks in the Generalized Model Mref. This syntax modifies the Control Design Blocks in M0 to match the current values of all corresponding blocks in Mref.
Use this syntax to propagate block values, such as tuned parameter values, from one parametric model to other models that depend on the same parameters.
M0 |
Generalized Model containing the blocks whose current or nominal value is modified to val. For the syntax M = setBlockValue(M0,Mref) M0 can be a single Control Design Block whose value is modified to match the value of the corresponding block in Mref. |
blockname |
Name of the Control Design Block in the model M0 whose current or nominal value is modified. To get a list of the Control Design Blocks in M0, enter M0.Blocks. |
val |
Replacement value for the current or nominal value of the Control Design Block, blockname. The value val can be any value that is compatible with blockname without changing the size, type, or sampling time of blockname. For example, you can set the value of a tunable PID block (ltiblock.pid) to a pid controller model , or to a transfer function (tf) model that represents a PID controller. |
blockvalues |
Structure specifying Control Design Blocks of M0 to modify, and the corresponding replacement values. The fields of the structure are the names of the blocks to modify. The value of each field specifies the replacement current or nominal value for the corresponding block. |
Mref |
Generalized Model that shares some Control Design Blocks with M0. The values of these blocks in Mref are used to update their counterparts in M0. |
M |
Generalized Model obtained from M0 by updating the values of the specified blocks. |
genss | getBlockValue | getValue | hinfstruct | looptune | showBlockValue | systune