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:

   1.
During a non real-time Simulink simulation via the Simulink GUI
   2.
In a run-time environment via the Simulink GUI and external mode
   3.
In a run-time environment using a Real-Time Workshop C-API
   4.
In a run-time environment using a custom interface
There are no limitations when modifying parameters for methods 1 and 2. The limitation described hare apply for methods 3 and 4, when you attempt to interface parameters outside the MATLAB/Simulink/Real-Time Workshop environment.

Background

Specifying parameter attributes allows you to:

The term parameter tuning is used to describe both 1 and 2.

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 parameter Kp 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 of G2=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, specifying int8(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:

These blocks partially supported parameter tuning:



[ Previous | Help Desk ]