blockParam = getBlockParam(st,'B-1');
fieldName = blockParam.Name;
blockValues = struct(fieldName,newB1);
Definitions
Tuned Blocks
Tuned blocks, used by the slTuner interface, identify blocks in a Simulink model whose
parameters are to be tuned to satisfy tuning goals. You can tune most Simulink blocks
that represent linear elements such as gains, transfer functions, or state-space models.
(For the complete list of blocks that support tuning, see “How Tuned Simulink Blocks Are
Parameterized” on page 10-36). You can also tune more complex blocks such as
SubSystem or S-Function blocks by specifying an equivalent tunable linear model
(Control System Toolbox).
Use tuning commands such as systune to tune the parameters of tuned blocks.
You must specify tuned blocks (for example, C1 and C2) when you create an slTuner
interface.
st = slTuner('scdcascade',{'C1','C2'})
You can modify the list of tuned blocks using addBlock and removeBlock.
To interact with the tuned blocks use:
- getBlockParam, getBlockValue, and getTunedValue to access the tuned block
parameterizations and their current values. - setBlockParam, setBlockValue, and setTunedValue to modify the tuned block
parameterizations and their values. - writeBlockValue to update the blocks in a Simulink model with the current values
of the tuned block parameterizations.
Tuned Variables
Within an slTuner interface, tuned variables are any Control Design Blocks (Control
System Toolbox) involved in the parameterization of a tuned Simulink block, either
setBlockValue