Frequently Asked Question

Video: 4.0.2. Analog Outputs
Last Updated a year ago


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.

TRANSCRIPT

00:00:00

Hello and welcome back. In the previous lesson, we mentioned that the last step in setting up  

00:00:06

a C-HIL system involves adjusting interface related settings of the model. In this lesson,  

00:00:10

we will talk about Analog Output settings and how they can be set up in Typhoon HIL Control Center. 

00:00:17

For analog outputs, adjusting interface related settings means mapping the necessary signals from  

00:00:22

the model to the appropriate AO pins of the HIL device and setting the correct scaling and offset. 

00:00:28

In this lesson, we will demonstrate a scenario which considers devices under test for which  

00:00:33

the voltage and current capabilities of the HIL device are sufficient, and interfacing  

00:00:38

is done through an interface board.For devices under test which require  

00:00:42

higher voltage or current levels than what the HIL device can provide,  

00:00:46

such as relays and some types of controllers, interfacing is done through a HIL Connect device.  

00:00:52

This scenario will be covered in future courses. You can find more information about this in  

00:00:57

the How to scale simulated signals for a C-HIL interface how-to guide in the Materials section. 

00:01:02

Now, let s talk about scaling.The ratio between the range of the  

00:01:07

variable in the simulation and the voltage range of the HIL device outputs determines the scaling  

00:01:13

required for any given analog output signal.The voltage range of the HIL device outputs  

00:01:19

used in the denominator of this equation should match the interface board input and  

00:01:23

controller specifications as required.Let s look at the following example. 

00:01:28

Here, we see the three main parts that comprise a C-HIL setup. 

00:01:32

In our simulation, let s assume that we are measuring an alternated sinusoidal signal  

00:01:37

with a maximum amplitude of 120 volts.When determining the scaling factor,  

00:01:42

it is important to consider the largest measured value which can appear in the simulation and needs  

00:01:48

to be seen by the device under test an example of this would be to consider transient events,  

00:01:54

where we can have simulation values significantly higher than the nominal ones. 

00:01:58

The scaling factor must ensure that signals of interest produced by simulation do not  

00:02:04

reach HIL device saturation limits and end up clipped at the output. 

00:02:07

Next, we have the Interface board with its rated Analog Inputs and Outputs. 

00:02:13

And finally, we have the controller with its rated Analog inputs. 

00:02:17

In this case, notice that the interface board was designed in such a way so that its outputs match  

00:02:22

the controller under test. However, the rated analog input voltage range of the interface board  

00:02:28

is given as -5 to +5 volts. Therefore, instead of considering the default HIL device output  

00:02:36

specifications, -10 to 10 volts, we will take the interface board inputs into consideration  

00:02:42

when choosing the denominator of the equation.Considering this, a scaling factor of 24 is  

00:02:49

calculated to capture all possible values of the simulated signal. 

00:02:52

In the previous slide, notice that we were considering an interface board with a given  

00:02:57

predefined characteristic. By looking at its Input and Output voltage ranges, we see that  

00:03:03

in this case the Interface Board introduces its own scaling and offset. We refer to this scaling  

00:03:09

as the voltage gain of the board, which in this example is given by setting Gv equal to 0.3. 

00:03:16

The gain at the interface board is a parameter defined at the hardware level of the board. It  

00:03:21

is a part of its specification and can vary for different interface boards. In case no interface  

00:03:27

board is used, voltage gain is equal to 1.As an alternative to the calculation shown before,  

00:03:33

we can use the interface voltage gain to calculate the scaling directly from controller input  

00:03:38

specifications, with the following equation:Here, the range of the simulated variable  

00:03:45

is divided by the analog input voltage range of the controller and multiplied  

00:03:49

by the voltage gain at the interface board.Let s calculate the scaling factor again. 

00:03:55

We see that we have calculated the same value as in the previous equation. We will see how  

00:04:01

different scaling values influence the signals measured on the HIL device outputs later on. 

00:04:06

In addition to scaling, an offset may be required for both AC and DC signals so that the signals  

00:04:13

match the controller ADC specifications. For AC signals, the offset is usually used  

00:04:18

to represent the negative half of the cycle as a set of positive values. For DC signals,  

00:04:23

the offset can be used when measuring a DC value which can change its sign during  

00:04:28

simulation runtime, such as for charging and discharging currents in a battery system. 

00:04:32

We can define scaling with the following equation.Here, the offset is equal to the voltage measured  

00:04:40

at the analog outputs of the HIL device that represents the value of 0 in the simulation. 

00:04:45

In the previously shown example, we see that the AC signal can be fully represented  

00:04:51

on the HIL Device IOs using only scaling therefore, the offset to be defined in the  

00:04:56

Analog Output settings is equal to zero.In this example, we can notice that the  

00:05:03

Interface board will later include the required offset to match the controller specifications. 

00:05:07

Now that we know how to calculate the scaling and the offset, let s  

00:05:11

look at how they can be set in Typhoon HIL Control Center. Let s open Schematic Editor. 

00:05:16

In this example, an IGBT leg is connected to a resistive-inductive load and is operating in an  

00:05:23

open-loop, with a sinusoidal modulating signal.As you can see, the IGBT leg is currently  

00:05:29

controlled from inside of the model. In an actual C-HIL setup, the gate drive signals  

00:05:34

from a real controller would be connected to the digital inputs of the HIL device and  

00:05:39

used to drive the switches in the IGBT leg.In addition, the measurements of interest in  

00:05:44

the model have to be assigned as HIL device analog outputs and routed to the controller  

00:05:49

through the proper interface board.The first method of setting analog  

00:05:53

outputs is by using the Output Settings component found in the System Library. 

00:05:58

The Output Settings component enables signal assignment to analog or digital outputs of  

00:06:03

HIL devices within the Schematic Editor model. Here, we can also set some additional settings. 

00:06:09

Let s assume here that the variable of interest is the load current and let s add this signal.  

00:06:14

Using the Name combo-box, we can select the Analog Output pin to which we want to assign the signal. 

00:06:21

In the previous theoretical example, we showed how we can calculate scaling and offset for  

00:06:26

voltage measurements. When it comes to current measurements, these signals are also represented  

00:06:31

as voltages on the outputs of the HIL device, so the exact same procedure shown before applies. 

00:06:36

Let s consider that the currents range from +/-30 amperes in this model. Assuming we have  

00:06:42

the same interface board detailed in the previous example, whose input range is from +/-5 volts,  

00:06:48

we calculate a scaling value of 6. Since the load current is a sinusoidal AC value, the value of  

00:06:55

offset will be zero. Notice that we can also limit the voltage range independently for each analog  

00:07:01

output. Let s keep that unchecked for now.When it comes to Analog Output settings,  

00:07:08

the Hardware Settings tab in Model settings offers a few additional settings. 

00:07:14

As we can see, we have an option to Limit all the device analog outputs to +/- 5 V. For now,  

00:07:21

we will also leave this option unchecked.By checking the Reset analog/digital outputs  

00:07:26

on simulation stop option, the analog and digital outputs can be forced to reset to  

00:07:31

0 when the simulation stops. Otherwise, the outputs will report the last recorded value. 

00:07:37

Now, let s compile the model and go into HIL SCADA. 

00:07:42

Once the outputs are set and the model is compiled and loaded,  

00:07:46

the Analog and Digital Outputs in the Model Settings section in  

00:07:50

SCADA will be set according to the Output Settings parameters defined in the model. 

00:07:57

Signals that were already defined in Schematic Editor using the Output  

00:08:01

Settings component are locked and marked by an icon on the left. You can unlock them and  

00:08:06

modify the settings as desired. However, be aware that whenever you reload the model,  

00:08:12

these modifications will be replaced back to the settings defined in Schematic Editor. 

00:08:16

The best practice is to define output settings in Schematic Editor. Still, if necessary,  

00:08:22

you can override them in HIL SCADA.Let s now check how changing Analog  

00:08:27

Output settings manifests on the outputs of the HIL device in practice. 

00:08:31

To demonstrate this, the HIL Device is disconnected from the C-HIL setup,  

00:08:35

and we ve connected a PC Oscilloscope directly to the AOs of the HIL Device. 

00:08:42

First, let s see how different scaling factors impact the output signal. 

00:08:51

Now, let s reduce the scaling factor until the output signal goes over the HIL device limits. 

00:09:00

Since the rated output voltage range of the analog outputs of the HIL device is from -10 V to +10 V,  

00:09:07

we can see that the outputs ended up being saturated when exceeding these values. 

00:09:12

Now, let s get back to the calculated scaling factor and set different values of offset,  

00:09:17

to see how our signal changes. 

00:09:24

Previously, we have mentioned the option to limit output voltages of the HIL device. 

00:09:29

In both Schematic Editor and SCADA, we can customize these voltage limits by selecting  

00:09:35

the appropriate checkbox. In the case of our example, we will set these limits to minus  

00:09:40

and plus 5 volts to ensure compliance with interface board specifications. Right now,  

00:09:45

we will be setting them from HIL SCADA.Now, let s decrease the scaling factor once again. 

00:09:56

We see that the signal has now been clipped at our set limit. 

00:10:00

In this video, we ve shown you how you can set up  

00:10:03

Analog Output settings for your C-HIL applications. Thank you for watching!

Please Wait!

Please wait... it will take a second!