Frequently Asked Question
Press "Ctrl + F" to find the keyword of your interest.
If you wish to have a direct link access to the video timestamps, please follow these instructions.
Found this video helpful? Why not take the whole HIL Specialist course? A Certificate is waiting for you for free at HIL Academy.
Would you or your organization benefit from having these videos narrated in your native language? Contact us and let us know if you wish to contribute.
Hello and welcome back. In the previous lesson, we mentioned that the last step in setting up
a C-HIL system involves adjusting interface related settings of the model. In this lesson,
we will talk about Analog Output settings and how they can be set up in Typhoon HIL Control Center.
For analog outputs, adjusting interface related settings means mapping the necessary signals from
the model to the appropriate AO pins of the HIL device and setting the correct scaling and offset.
In this lesson, we will demonstrate a scenario which considers devices under test for which
the voltage and current capabilities of the HIL device are sufficient, and interfacing
is done through an interface board.For devices under test which require
higher voltage or current levels than what the HIL device can provide,
such as relays and some types of controllers, interfacing is done through a HIL Connect device.
This scenario will be covered in future courses. You can find more information about this in
the How to scale simulated signals for a C-HIL interface how-to guide in the Materials section.
Now, let s talk about scaling.The ratio between the range of the
variable in the simulation and the voltage range of the HIL device outputs determines the scaling
required for any given analog output signal.The voltage range of the HIL device outputs
used in the denominator of this equation should match the interface board input and
controller specifications as required.Let s look at the following example.
Here, we see the three main parts that comprise a C-HIL setup.
In our simulation, let s assume that we are measuring an alternated sinusoidal signal
with a maximum amplitude of 120 volts.When determining the scaling factor,
it is important to consider the largest measured value which can appear in the simulation and needs
to be seen by the device under test an example of this would be to consider transient events,
where we can have simulation values significantly higher than the nominal ones.
The scaling factor must ensure that signals of interest produced by simulation do not
reach HIL device saturation limits and end up clipped at the output.
Next, we have the Interface board with its rated Analog Inputs and Outputs.
And finally, we have the controller with its rated Analog inputs.
In this case, notice that the interface board was designed in such a way so that its outputs match
the controller under test. However, the rated analog input voltage range of the interface board
is given as -5 to +5 volts. Therefore, instead of considering the default HIL device output
specifications, -10 to 10 volts, we will take the interface board inputs into consideration
when choosing the denominator of the equation.Considering this, a scaling factor of 24 is
calculated to capture all possible values of the simulated signal.
In the previous slide, notice that we were considering an interface board with a given
predefined characteristic. By looking at its Input and Output voltage ranges, we see that
in this case the Interface Board introduces its own scaling and offset. We refer to this scaling
as the voltage gain of the board, which in this example is given by setting Gv equal to 0.3.
The gain at the interface board is a parameter defined at the hardware level of the board. It
is a part of its specification and can vary for different interface boards. In case no interface
board is used, voltage gain is equal to 1.As an alternative to the calculation shown before,
we can use the interface voltage gain to calculate the scaling directly from controller input
specifications, with the following equation:Here, the range of the simulated variable
is divided by the analog input voltage range of the controller and multiplied
by the voltage gain at the interface board.Let s calculate the scaling factor again.
We see that we have calculated the same value as in the previous equation. We will see how
different scaling values influence the signals measured on the HIL device outputs later on.
In addition to scaling, an offset may be required for both AC and DC signals so that the signals
match the controller ADC specifications. For AC signals, the offset is usually used
to represent the negative half of the cycle as a set of positive values. For DC signals,
the offset can be used when measuring a DC value which can change its sign during
simulation runtime, such as for charging and discharging currents in a battery system.
We can define scaling with the following equation.Here, the offset is equal to the voltage measured
at the analog outputs of the HIL device that represents the value of 0 in the simulation.
In the previously shown example, we see that the AC signal can be fully represented
on the HIL Device IOs using only scaling therefore, the offset to be defined in the
Analog Output settings is equal to zero.In this example, we can notice that the
Interface board will later include the required offset to match the controller specifications.
Now that we know how to calculate the scaling and the offset, let s
look at how they can be set in Typhoon HIL Control Center. Let s open Schematic Editor.
In this example, an IGBT leg is connected to a resistive-inductive load and is operating in an
open-loop, with a sinusoidal modulating signal.As you can see, the IGBT leg is currently
controlled from inside of the model. In an actual C-HIL setup, the gate drive signals
from a real controller would be connected to the digital inputs of the HIL device and
used to drive the switches in the IGBT leg.In addition, the measurements of interest in
the model have to be assigned as HIL device analog outputs and routed to the controller
through the proper interface board.The first method of setting analog
outputs is by using the Output Settings component found in the System Library.
The Output Settings component enables signal assignment to analog or digital outputs of
HIL devices within the Schematic Editor model. Here, we can also set some additional settings.
Let s assume here that the variable of interest is the load current and let s add this signal.
Using the Name combo-box, we can select the Analog Output pin to which we want to assign the signal.
In the previous theoretical example, we showed how we can calculate scaling and offset for
voltage measurements. When it comes to current measurements, these signals are also represented
as voltages on the outputs of the HIL device, so the exact same procedure shown before applies.
Let s consider that the currents range from +/-30 amperes in this model. Assuming we have
the same interface board detailed in the previous example, whose input range is from +/-5 volts,
we calculate a scaling value of 6. Since the load current is a sinusoidal AC value, the value of
offset will be zero. Notice that we can also limit the voltage range independently for each analog
output. Let s keep that unchecked for now.When it comes to Analog Output settings,
the Hardware Settings tab in Model settings offers a few additional settings.
As we can see, we have an option to Limit all the device analog outputs to +/- 5 V. For now,
we will also leave this option unchecked.By checking the Reset analog/digital outputs
on simulation stop option, the analog and digital outputs can be forced to reset to
0 when the simulation stops. Otherwise, the outputs will report the last recorded value.
Now, let s compile the model and go into HIL SCADA.
Once the outputs are set and the model is compiled and loaded,
the Analog and Digital Outputs in the Model Settings section in
SCADA will be set according to the Output Settings parameters defined in the model.
Signals that were already defined in Schematic Editor using the Output
Settings component are locked and marked by an icon on the left. You can unlock them and
modify the settings as desired. However, be aware that whenever you reload the model,
these modifications will be replaced back to the settings defined in Schematic Editor.
The best practice is to define output settings in Schematic Editor. Still, if necessary,
you can override them in HIL SCADA.Let s now check how changing Analog
Output settings manifests on the outputs of the HIL device in practice.
To demonstrate this, the HIL Device is disconnected from the C-HIL setup,
and we ve connected a PC Oscilloscope directly to the AOs of the HIL Device.
First, let s see how different scaling factors impact the output signal.
Now, let s reduce the scaling factor until the output signal goes over the HIL device limits.
Since the rated output voltage range of the analog outputs of the HIL device is from -10 V to +10 V,
we can see that the outputs ended up being saturated when exceeding these values.
Now, let s get back to the calculated scaling factor and set different values of offset,
to see how our signal changes.
Previously, we have mentioned the option to limit output voltages of the HIL device.
In both Schematic Editor and SCADA, we can customize these voltage limits by selecting
the appropriate checkbox. In the case of our example, we will set these limits to minus
and plus 5 volts to ensure compliance with interface board specifications. Right now,
we will be setting them from HIL SCADA.Now, let s decrease the scaling factor once again.
We see that the signal has now been clipped at our set limit.
In this video, we ve shown you how you can set up
Analog Output settings for your C-HIL applications. Thank you for watching!