Real-Time Workshop | Search  Help Desk |
Parameter Tuning
Parameter Tuning is a method of modifying a block parameter on-the-fly. There are four types of parameter tuning:
.
.
.
.Background
Specifying parameter attributes allows you to:Disclaimer
The parameter tuning feature is not complete and is still under development. It is, however, available to you in its current form since you may find the currently completed portion useful. Please read the current limitations before attempting to use this Real-Time Workshop feature.Limitations
Expressions
Expressions are not supported. Block parameters must be specified as MATLAB variables to be tunable. For example, a block containing the parameterKp
is tunable, but a block containing 2*Kp
as its parameter is not tunable.
Mask Parameters
Underlying mask variables inherit the top-most mask parameter provided the mask does not transform the parameter value. That is, a name change does not affect the tunability of a masked parameter for any level of mask nesting. Only value changes within the mask affect tunability. For example, a nested mask transformation ofG2=G1=Kp
leaves G1
and G2
tunable (i.e., name and attributes of Kp
are inherited), whereas G1
and G2
are not tunable for mask transformations G2=G1=2*Kp
.
Casting
Tunability of a block parameter is lost when you explicitly cast a parameter inside the block's parameter dialog box. For example, specifyingint8(Kp)
inside the block's parameter dialog makes the blocks parameter non-tunable since Kp is part of an expression.
Silent Errors
Simulink and the Real-Time Workshop do not consistently warn you when you violate the limitations described above.Supported Blocks
These are the blocks that fully supported parameter tuning: