Voltage and Current Measurements

Description of the voltage and current measurement components in Schematic Editor

Our toolbox provides you with current and voltage measurement blocks that enable you to measure and route the analog output channels with any voltage and current from the modeled circuit. The name of the output variable will correspond to the user given block name.

Table 1. Voltage and current meter components in HIL Toolbox
component component dialog window component parameters

Voltage measurement

  • BW Limit (True/False)
  • Cutoff frequency (Hz)
  • Exact measurement flag
  • Override signal name flag
  • Execution rate
  • Logic operator
  • Threshold

Current measurement

  • BW Limit (true/false)
  • Cutoff frequency (Hz)
  • Exact measurement flag
  • Override signal name flag
  • Execution rate
  • Logic operator
  • Treshold

Tab: General

If the Override signal name property checkbox is checked, Signal name property (which appears in SCADA as the name of the corresponding measurement) can be modified in the appropriate textbox.

Generally, the name of the signal is the name of the component in the model. If it is a part of a subsystem (e.g. Sub1), then the signal's name consist of both subsystem's and component's names (Sub1.Measurement1), while in case of more nested subsystems, all of them appear in the signal's name (e.g. Sub1.Sub2.Sub3.Measurement1).

Overriding signal name allows for not only avoiding the appearance of subsystems being mentioned in the name of the signal, but also modifying the signal's name as desired. The table bellow shows a few examples to demonstrate this, with the assumption of having a component s1.s2.s3.Va1.

Textbox entry Signal name in SCADA
signal1 signal1
.signal1 s1.s2.s3.signal1
..signal1 s1.s2.signal1
.s4.signal1 s1.s2.s3.s4.signal1
..s4.signal1 s1.s2.s4.signal1

Figure 1: General tab in voltage/current measurement’s properties window



Tab: Signal Processing

If the Enable signal output property checkbox is checked, the measured value is available on a dynamically added output signal port. The Execution rate property defines the output execution rate. If the BW limit property (Bandwidth tab) is set to False, the output will be full bandwith signal, otherwise the Output filtered and full bandwith signals property checkbox appears and you can choose if the output is a vector of two signals (filtered and full bandwith signals) or the output is just a filtered signal. Voltage and current measurement components with an enabled output terminal are given in Figure 4.
Note: When the Output filtered and full bandwith signals option is enabled, signals appear in following order: [filtered signal, full bandwitdth signal].

Figure 2: Signal Processing tab in the Properties window of the Voltage Measurement and Current Measurement components when BW limit is set to False



Figure 3: Signal Processing tab in the Properties window of the Voltage Measurement and Current Measurement components when BW limit is set to True



Figure 4: Voltage and current measurement components

Tab: Bandwidth

In order to emulate the bandwidth of some real sensors, a first order filter can be used with measurement blocks. The first order filter is activated by setting BW limit to True in the Bandwidth tab, in each measurement components' Properties window. The cutoff frequency is defined as the frequency where the gain filter is -3dB. An RC filter is used for voltage filtering, while an RL filter is used for current filtering, as shown in Figure 6. The name of the filtered voltage/current is the user defined label of the measurement. The not filtered voltage/current is also available under name: (user defined label)_not_filtered.

Figure 5: Bandwidth tab in voltage/current measurement’s properties window



Figure 6: First order filters behind measurement blocks

Resistor and capacitor values shown in Figure 6 are calculated as:

C f = 10 - 2 f c       R f = 1 2 π f c C f    

The resistor and inductor in LR filter are calculated as:

L f = f c 10 - 7 R f = 2 π f c L f

Where fc is a cutoff frequency set by the user.

Tab: Comparator

An additional feature of the measurement blocks is comparator functionality. This feature is supported in HIL402, HIL404, HIL602+, and HIL604 devices. The Comparator tab in the measurement block properties window is shown in Figure 7. It is the same for both the Current Measurement and Voltage Measurement componentS.

The comparator feature is activated by checking the Comparator enable property checkbox. The operator for comparison can be set in one of five different modes: equal; greater; less; greater or equal; less or equal. A threshold value can be set in the Treshold text box. There is a option to compare the threshold with the absolute value of the signal, which can be activated by checking the parameter Absolute value. This option is usually used when the comparator input is an AC signal. The comparator output can be observed from the digital outputs. In the Control Panel Digital Output settings, a comparator output will appear as (user defined name for measurement)_cmp.

Figure 7: Comparator tab in voltage/current measurement’s properties window



Note: In addition to measured voltages and currents, all state space variables (that are not degenerated, linearly independent ones) will be automatically available for observation from any of the analog output channels.

Analog output signals from measurements added in the schematic

Analog output variable name Description
name Regular output from measurement or filtered if bandwidth limit is enabled
name_full_bandwidth Regular output from measurement if bandwidth limit is enabled

Digital output signals from current and voltage measurements

Digital output variable name Description
name_cmp Output from the compare unit, if enabled

Tab: Advanced

In the Advanced tab, shown in Figure 8, there is a property called Exact measurement . If its value is set to true, the measurement is calculated as a state variable. There are two advantages using exact measurements:
  1. Latency of the measured signal is one simulation step less,
  2. Measurement accuracy is increased (this might be important if the system have very fast time constants <1e-5s).
Drawbacks using exact measurements are:
  1. Might increase the memory usage,
  2. Might require more processing power which may result in a larger required simulation step.

Figure 8: Advanced tab in voltage/current measurement’s properties window