Dynamic Model Stimulation

Description of the dynamic model stimulation functionality available through SCADA Input components

Dynamic model stimulation is a feature that enables reproduction of high resolution time-series profiles during simulation runtime. In order to reproduce time-series signals, SCADA Input components are used. The signal resolution is defined by the signal processing execution rate.

Note: This feature is available only for HIL devices. VHIL is not supported.
Note: In order to use this functionality, you need to enable it in the model settings.
The interface is defined through the following HIL API functions:
Table 1. HIL API functions for Model Stimulation
HIL API function declarations Function description
create_signal_stimulus() Creates signal stimulus object.


Prepares initial data for signal stimulus.
start_signal_stimulus() Starts signal reproduction.


Stops signal reproduction.
pause_signal_stimulus() Pauses signal reproduction.


Loads data from a file and prepares it for stimulus object creation.

Reproduction signal definition

In order to use this functionality, the signal to be reproduced must be created where the dictionary keys represent signal names and the signal values are represented as a list of float values. The time axis is represented as a dictionary key "Time" where values need to be in a list of increasing order. The time axis doesn't need to be equidistant, since linear interpolation is used.
Note: All signal lists and the time axis list need to have the same size.
Note: Dictionary keys which are representing signals for reproduction need to have the same names as their corresponding signals.

Signals can be prepared manually through code, or a load_signal_gen_data() function can be used. This function can load all the file formats supported by Typhoon HIL Control Center.

Signals for reproduction don’t need to have same execution rate as the signal processing execution rate.

Creating a stimulus object and performing signal reproduction

In the process of signal reproduction, a signal stimulus object needs to be created with the create_signal_stimulus() function. The function takes the prepared signal in the form of a dictionary as an argument. All other functions will use this object to reference the proper stimulus. Once the object is created, initial data needs to be loaded to the HIL device. This is done with the prepare_signal_stimulus() function. Once the signal is prepared for reproduction, functions for controlling the stimulus can be used. These functions are start, stop, and pause signal stimulus.
Note: In order to run signal stimulation from the beginning of the simulation, start_signal_stimulus() needs to be called before starting the simulation.
import typhoon.api.hil as hil

example_signal = {"SCADA Input1": [0, 1, 2, 3, 4], "Time": [0, 1, 3, 4, 6]}
stimulus_object = hil.create_signal_stimulus(stimulation_signal)




After stopping the simulation there is no need to stop signal stimulation because it will be automatically stopped.

There is no hard limitation regarding to the number of signals used for reproduction, but all signals referenced to a single signal stimulus need to be on the same signal processing simulation rate.