Tunable components

This section describes tunable components and their impact on the simulation.

Tunable components overview

Tunable components in signal processing enable changing certain parameters while the simulation is running without recompiling the model. By default, most of the signal processing components have inlined (constant) parameters. In order to change the values of those parameters, the model has to be recompiled. Tunable components enable run-time tuning of parameters with the caveat of some performance penalties.

Each supported component has a tunable property setting which enables select parameters of that component to be tunable. The global switch for tunable components is available in Table 3.

List of supported tunable components and their functionalities when active

Component name Available from release version Effect when active Note
Gain 2021.2 Enables run-time tuning of the selected component. This will allow you to change values for gain during simulation without the need to recompile the model. Tunable properties are available in HIL SCADA in Model Explorer.
PID Controller 2021.2 Enables run-time tuning of the selected component. Depending on the selected type of controller, this setting will allow you to change values for Kp, Ki, Kd, Upper saturation limit, and Lower saturation limit during simulation without the need to recompile the model. Tunable properties are available in HIL SCADA in Model Explorer.
Constant 2021.2 Enables run-time tuning of the selected component. This will allow you to change values for value during simulation without the need to recompile the model. Tunable properties are available in HIL SCADA in Model Explorer.
Sinusoidal Source 2021.2 Enables run-time tuning of the selected component. This will allow you to change values for frequency, DC offset, amplitude, and phase during simulation without the need to recompile the model. Tunable properties are available in HIL SCADA in Model Explorer. Phase can be tuned only before the start of the simulation.
Square Wave Source 2021.2 Enables run-time tuning of the selected component. This will allow you to change values for frequency, high-state output, low-state output, duty cycle, and phase during simulation without the need to recompile the model. Tunable properties are available in HIL SCADA in Model Explorer. Phase can be tuned only before the start of the simulation.
Triangular Wave Source 2021.2 Enables run-time tuning of the selected component. This will allow you to change values of frequency, minimum signal value, maximum signal value, duty cycle, and phase during simulation without the need to recompile the model. Tunable properties are available in HIL SCADA in Model Explorer. >Phase can be tuned only before the start of the simulation.
FMI Import 2021.2 If Model control is set to Tunable, parameter can be changed during the simulation from Model Explorer which is available in HIL SCADA By default, all parameters are treated as constants. The Start value can be changed if Model control is set to Constant. Only variables available in Parameters tab can be set to tunable.
Low-Pass Filter 2021.2 Enables run-time tuning of the selected component. This will allow you to change values for cutoff frequency, during simulation without the need to recompile the model. Tunable properties are available in HIL SCADA in Model Explorer.
Single phase phasor 2021.2 Enables run-time tuning of the selected component. This will allow you to change values for low pass filter cutoff frequency, during simulation without the need to recompile the model. Tunable properties are available in HIL SCADA in Model Explorer.
ABC to DQ 2021.2 Enables run-time tuning of the selected component. This will allow you to change values for dq filter cutoff frequency during simulation without the need to recompile the model. Tunable properties are available in HIL SCADA in Model Explorer.

Limitations and performance impact

Currently, from the release 2021.2, all tunable parameters are limited to 32 bit variables (int32, uint32 and float). In some cases, this can result in numerical inaccuracy. For example, if the component uses inlined parameters that are by default double precision, when switching the component to tunable parameters, depending on which parameters are tunable, precision in part of the calculation can drop to single precision.

Tunable components can signficantly affect the CPU usage of the HIL device. If CPU usage is nearing 100% consider minimising the number of tunable components or increasing the execution rate.