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.
This lesson will cover the first C-HIL examplein the HIL Specialist course.
In C-HIL applications, the plant model issimulated in a real time simulator, while
the control component of the system is executedin hardware such as on a digital signal processing
microcontroller or DSP.
In this example, the plant model is simulatedusing a Typhoon HIL402 device, while the control
part is executed on a Texas Instruments LaunchPadmicrocontroller.
The DSP used here is from the TI C2000 microcontrollerfamily.
These chipsets are built for real-time controlin power electronics applications.
This DSP can be connected to the HIL simulatorusing an off-the-shelf Launchpad interface
This TI Launchpad interface supports the boardsshown here from the C2000 and Hercules series.
The HIL TI Launchpad Interface is an interfaceboard designed to enable a seamless interface
between TI's LaunchPad development kits andany of the 4-series and 6-series HIL devices.
You can learn more about accessories and interfacecards in the HIL device lesson of the HIL
This board is divided into a number of keysections.
The analog and digital connectors on the boardare directly pluggable into the analog and
digital connectors of Typhoon HIL emulators.
Three rows of measurement terminals are alsopresent adjacent to the analog and digital
The 16 HIL analog outputs are clamped to 3.3V. The 4 HIL analog inputs are directly connected
to the HIL device.
The 16 HIL digital outputs are level-shiftedfrom the HIL's 5 V to DSP's 3.3 V.
Signal routing information is detailed inthe HIL TI Launchpad Interface documentation
linked in the materials tab.
By default, all LaunchPad boards are poweredvia USB.
With the HIL TI Launchpad Interface, theseboards can be powered from the HIL instead,
thus enabling standalone operation.
For different microcontrollers, custom-madeinterface boards can be made available.
This lesson will use the LaunchPadXL-F28379Dto control a DC/DC converter.
Let's see how to mount the DSP to the TI Launchpadinterface board.
Before mounting the Texas Instruments Launchpadon the Launchpad connectors in the interface
board, check that all pins are connected well.
Mounting the Launchpad incorrectly could causethe pins on the interface card to bend.
Once you successfully mount the Launchpadcard to the interface card, connect the analog
and digital connectors to the HIL device.
The easiest way to connect the connectorsto the HIL device is to start on one side,
and then the other, as shown here.
Now that the interface card is successfullyconnected to the HIL device, let's plug the
USB cable into the Launchpad DSP.
Here you can see how the Launchpad is connectedto the HIL device.
The DC/DC converter that is modeled is a dualactive bridge or DAB.
The Dual-Active Bridge Converter is an attractivetopology because of its high power density,
efficiency, reliability, and galvanic isolation.
Due to these qualities, it is widely usedin uninterruptable power supplies, power converters
for energy storage and energy management systems,and electric vehicles.
In a real DAB application, this series inductoris often regarded as the leakage inductance
of the transformer.
This model consists of four IGBT Legs, twobatteries, a series inductor, a high frequency
transformer, an input filter, and an outputfilter.
The switching frequency of the DAB is 200kHz.
First, make sure that the selected deviceconfiguration supports Switch level GDS oversampling.
Select switch level oversampling in the settingsof all four IGBT legs.
You can find more information about switchlevel GDS oversampling in the GDS oversampling
lesson of the HIL Fundamentals course.
An application of switch level GDS oversamplingis also presented in the DAB application tutorial
linked in the materials tab.
Earlier in this course, you used the internalmodulator control type to control converters
in the schematic editor.
In C-HIL applications, digital inputs aremost often used for controlling the switches
Gate drive inputs are configured in each IGBTswitch, while analog outputs are configured
using the output settings component.
The output settings component enables signalassignment to analog and/or digital outputs
of HIL devices within the Schematic Editormodel.
All corresponding settings of the analog and/ordigital outputs can be set as well.
Once the outputs are set and the model iscompiled and loaded, analog and digital outputs
in the Model Settings section in SCADA willbe configured according to the output settings
parameters defined in the model.
As you can see here, the output current isscaled by a factor of 155.
In this scenario, the output current of 200amperes is scaled down to around 1.3 V on
analog output 4.
Before compiling and loading the model tothe HIL, it is useful to confirm that the
firmware on your HIL device matches the deviceconfiguration selected in the Schematic Editor.
If the versions do not match, your model willautomatically be compiled to the version present
in the HIL device.
To check this, open the Firmware Manager.
In this case, both the model and device areset to configuration four, so we can proceed
to compile and load.
If this is not the case for you, you can changethe configuration in the Firmware Manager
by following the steps in the knowledgebasearticle supplied in the Materials tab.
We are now ready to compile and load the model.
Before running the model, it is necessaryto upload the program code to the controller.
To do so, you will need the .out file providedin the example folder and an appropriate software
tool, for example, UniFlash.
UniFlash is a standalone tool used to programon-chip flash memory in TI microcontrollers
and on-board flash.
It is available free of charge.
To successfully flash the card, it is necessaryto follow the steps from the How-to flash
a TI card and use a serial port widget knowledgebasearticle linked in the materials tab.
Now let's run the simulation.
You can see the analog output configurationset in the Schematic editor from the analog
output tab under model settings.
You can also modify any analog output configurationshere at runtime.
Communication between HIL SCADA and the TIcontroller is handled using the serial communication
In the widget library, you can find the serialwidget.
This serial communication tool is based onthe pyserial python library.
Its main purpose is to open a serial connectionwith the specified parameters on the selected
The opened connection is available througha special identifier that holds the opened
serial connection object.
The connection object is accessible from allmacro and expression scripts for both writing
This example is only one of many ways to communicatewith other devices from within the Typhoon
This Launchpad also has a CAN transceiverand you could use a HIL device with CAN bus
connectivity to emulate a CAN network.
If you want to learn more about communicationprotocols in the Typhoon HIL environment,
please refer to the Communication protocolscourse.
To enable serial communication, you need toset the correct communication port in the
Now we can select connect.
With serial communication enabled, we canrun the converter.
The three operation modes are implementedin the DSP.
The first operation mode is open loop mode,where a constant phase shift is set.
The other two operating modes are closed loopwhere output current is regulated with a feedback
The second operation mode is for Chargingbattery 2.
This is a closed loop mode where the controlinput is the reference charging current of
The final mode is for discharging battery2.
In this mode, the control input is the referencedischarging current of battery 2.
The open loop mode is shown first.
Switching to the operation mode for chargingbattery 2, you can see that the reference
current can be set using a slider.
Since this is a closed loop control mode,you can see the controller regulate the current
to match the reference value.
To discharge the battery, you can set thecombo box to the operation mode for discharging
Similar to the previous mode, a dischargingreference current can be set.
In the scope, you can observe the convertersignals.
When the reference output current value changes,you can see the current that flows through
serial inductor of the DAB converter as wellas the voltage on the primary and secondary
windings of the transformer.
You can also see how the measured output currentis changed as you change the reference value
of the current.
Let's switch to capture mode and capture thesewaveforms
You can zoom in to take a closer look at oneperiod of switching.
As you can see, the switching period is 5s which means that the switching frequency
is 200 kHz.
This concludes this demonstration of a DualActive Bridge example model controlled using
a Texas Instruments microcontroller.
Thank you for watching.