Frequently Asked Question

Video: 4.4.1.1. Battery Charger Dual Active Bridge (DAB) with a TI LAUNCHXL-F28379D Controller
Last Updated 3 years 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:02

Hello and welcome.

00:00:03

This lesson will cover the first C-HIL examplein the HIL Specialist course.

00:00:07

In C-HIL applications, the plant model issimulated in a real time simulator, while

00:00:13

the control component of the system is executedin hardware such as on a digital signal processing

00:00:18

microcontroller or DSP.

00:00:20

In this example, the plant model is simulatedusing a Typhoon HIL402 device, while the control

00:00:26

part is executed on a Texas Instruments LaunchPadmicrocontroller.

00:00:30

The DSP used here is from the TI C2000 microcontrollerfamily.

00:00:35

These chipsets are built for real-time controlin power electronics applications.

00:00:40

This DSP can be connected to the HIL simulatorusing an off-the-shelf Launchpad interface

00:00:45

board.

00:00:46

This TI Launchpad interface supports the boardsshown here from the C2000 and Hercules series.

00:00:52

The HIL TI Launchpad Interface is an interfaceboard designed to enable a seamless interface

00:00:57

between TI's LaunchPad development kits andany of the 4-series and 6-series HIL devices.

00:01:02

You can learn more about accessories and interfacecards in the HIL device lesson of the HIL

00:01:07

Fundamentals course.

00:01:08

This board is divided into a number of keysections.

00:01:11

The analog and digital connectors on the boardare directly pluggable into the analog and

00:01:15

digital connectors of Typhoon HIL emulators.

00:01:19

Three rows of measurement terminals are alsopresent adjacent to the analog and digital

00:01:23

connectors.

00:01:24

The 16 HIL analog outputs are clamped to 3.3V. The 4 HIL analog inputs are directly connected

00:01:31

to the HIL device.

00:01:32

The 16 HIL digital outputs are level-shiftedfrom the HIL's 5 V to DSP's 3.3 V.

00:01:40

Signal routing information is detailed inthe HIL TI Launchpad Interface documentation

00:01:44

linked in the materials tab.

00:01:46

By default, all LaunchPad boards are poweredvia USB.

00:01:50

With the HIL TI Launchpad Interface, theseboards can be powered from the HIL instead,

00:01:54

thus enabling standalone operation.

00:01:57

For different microcontrollers, custom-madeinterface boards can be made available.

00:02:03

This lesson will use the LaunchPadXL-F28379Dto control a DC/DC converter.

00:02:09

Let's see how to mount the DSP to the TI Launchpadinterface board.

00:02:13

Before mounting the Texas Instruments Launchpadon the Launchpad connectors in the interface

00:02:18

board, check that all pins are connected well.

00:02:21

Mounting the Launchpad incorrectly could causethe pins on the interface card to bend.

00:02:31

Once you successfully mount the Launchpadcard to the interface card, connect the analog

00:02:35

and digital connectors to the HIL device.

00:02:38

The easiest way to connect the connectorsto the HIL device is to start on one side,

00:02:42

and then the other, as shown here.

00:02:47

Now that the interface card is successfullyconnected to the HIL device, let's plug the

00:02:52

USB cable into the Launchpad DSP.

00:02:54

Here you can see how the Launchpad is connectedto the HIL device.

00:02:56

The DC/DC converter that is modeled is a dualactive bridge or DAB.

00:03:00

The Dual-Active Bridge Converter is an attractivetopology because of its high power density,

00:03:05

efficiency, reliability, and galvanic isolation.

00:03:08

Due to these qualities, it is widely usedin uninterruptable power supplies, power converters

00:03:14

for energy storage and energy management systems,and electric vehicles.

00:03:19

In a real DAB application, this series inductoris often regarded as the leakage inductance

00:03:24

of the transformer.

00:03:29

This model consists of four IGBT Legs, twobatteries, a series inductor, a high frequency

00:03:35

transformer, an input filter, and an outputfilter.

00:03:39

The switching frequency of the DAB is 200kHz.

00:03:43

First, make sure that the selected deviceconfiguration supports Switch level GDS oversampling.

00:03:50

Select switch level oversampling in the settingsof all four IGBT legs.

00:03:54

You can find more information about switchlevel GDS oversampling in the GDS oversampling

00:04:00

lesson of the HIL Fundamentals course.

00:04:02

An application of switch level GDS oversamplingis also presented in the DAB application tutorial

00:04:08

linked in the materials tab.

00:04:12

Earlier in this course, you used the internalmodulator control type to control converters

00:04:17

in the schematic editor.

00:04:19

In C-HIL applications, digital inputs aremost often used for controlling the switches

00:04:23

in converters.

00:04:24

Gate drive inputs are configured in each IGBTswitch, while analog outputs are configured

00:04:29

using the output settings component.

00:04:32

The output settings component enables signalassignment to analog and/or digital outputs

00:04:37

of HIL devices within the Schematic Editormodel.

00:04:40

All corresponding settings of the analog and/ordigital outputs can be set as well.

00:04:45

Once the outputs are set and the model iscompiled and loaded, analog and digital outputs

00:04:49

in the Model Settings section in SCADA willbe configured according to the output settings

00:04:53

parameters defined in the model.

00:04:55

As you can see here, the output current isscaled by a factor of 155.

00:05:00

In this scenario, the output current of 200amperes is scaled down to around 1.3 V on

00:05:06

analog output 4.

00:05:11

Before compiling and loading the model tothe HIL, it is useful to confirm that the

00:05:15

firmware on your HIL device matches the deviceconfiguration selected in the Schematic Editor.

00:05:20

If the versions do not match, your model willautomatically be compiled to the version present

00:05:25

in the HIL device.

00:05:26

To check this, open the Firmware Manager.

00:05:31

In this case, both the model and device areset to configuration four, so we can proceed

00:05:36

to compile and load.

00:05:38

If this is not the case for you, you can changethe configuration in the Firmware Manager

00:05:42

by following the steps in the knowledgebasearticle supplied in the Materials tab.

00:05:47

We are now ready to compile and load the model.

00:05:53

Before running the model, it is necessaryto upload the program code to the controller.

00:05:58

To do so, you will need the .out file providedin the example folder and an appropriate software

00:06:03

tool, for example, UniFlash.

00:06:06

UniFlash is a standalone tool used to programon-chip flash memory in TI microcontrollers

00:06:11

and on-board flash.

00:06:13

It is available free of charge.

00:06:15

To successfully flash the card, it is necessaryto follow the steps from the How-to flash

00:06:20

a TI card and use a serial port widget knowledgebasearticle linked in the materials tab.

00:06:28

Now let's run the simulation.

00:06:30

You can see the analog output configurationset in the Schematic editor from the analog

00:06:35

output tab under model settings.

00:06:37

You can also modify any analog output configurationshere at runtime.

00:06:44

Communication between HIL SCADA and the TIcontroller is handled using the serial communication

00:06:49

protocol.

00:06:50

In the widget library, you can find the serialwidget.

00:06:53

This serial communication tool is based onthe pyserial python library.

00:06:58

Its main purpose is to open a serial connectionwith the specified parameters on the selected

00:07:02

COM port.

00:07:04

The opened connection is available througha special identifier that holds the opened

00:07:08

serial connection object.

00:07:10

The connection object is accessible from allmacro and expression scripts for both writing

00:07:14

and reading.

00:07:15

This example is only one of many ways to communicatewith other devices from within the Typhoon

00:07:20

HIL environment.

00:07:22

This Launchpad also has a CAN transceiverand you could use a HIL device with CAN bus

00:07:26

connectivity to emulate a CAN network.

00:07:28

If you want to learn more about communicationprotocols in the Typhoon HIL environment,

00:07:33

please refer to the Communication protocolscourse.

00:07:36

To enable serial communication, you need toset the correct communication port in the

00:07:41

serial widget.

00:07:45

Now we can select connect.

00:07:49

With serial communication enabled, we canrun the converter.

00:07:52

The three operation modes are implementedin the DSP.

00:07:56

The first operation mode is open loop mode,where a constant phase shift is set.

00:08:01

The other two operating modes are closed loopwhere output current is regulated with a feedback

00:08:06

signal.

00:08:07

The second operation mode is for Chargingbattery 2.

00:08:10

This is a closed loop mode where the controlinput is the reference charging current of

00:08:13

battery 2.

00:08:15

The final mode is for discharging battery2.

00:08:18

In this mode, the control input is the referencedischarging current of battery 2.

00:08:25

The open loop mode is shown first.

00:08:33

Switching to the operation mode for chargingbattery 2, you can see that the reference

00:08:37

current can be set using a slider.

00:08:40

Since this is a closed loop control mode,you can see the controller regulate the current

00:08:44

to match the reference value.

00:08:51

To discharge the battery, you can set thecombo box to the operation mode for discharging

00:08:56

battery 2.

00:08:58

Similar to the previous mode, a dischargingreference current can be set.

00:09:04

In the scope, you can observe the convertersignals.

00:09:07

When the reference output current value changes,you can see the current that flows through

00:09:11

serial inductor of the DAB converter as wellas the voltage on the primary and secondary

00:09:16

windings of the transformer.

00:09:17

You can also see how the measured output currentis changed as you change the reference value

00:09:22

of the current.

00:09:23

Let's switch to capture mode and capture thesewaveforms

00:09:29

You can zoom in to take a closer look at oneperiod of switching.

00:09:35

As you can see, the switching period is 5s which means that the switching frequency

00:09:40

is 200 kHz.

00:09:43

This concludes this demonstration of a DualActive Bridge example model controlled using

00:09:47

a Texas Instruments microcontroller.

00:09:50

Thank you for watching.

Please Wait!

Please wait... it will take a second!