0% found this document useful (0 votes)
183 views78 pages

SYNDEM EduKit Manual

The document is a user manual for the SYNDEM Smart Grid Research and Educational Kit. It provides 3 sentences: The manual describes the hardware and software components of the Syndem Smart Grid Research and Educational Kit, including the control board, power board, auxiliary power supplies, and accessories. It also explains how to install the software, set up different power electronic topologies using the kit, and provides a quick start guide for running a demo of a DC-DC-AC converter with the kit. The document contains detailed diagrams, explanations, and instructions to help users understand and operate the kit.

Uploaded by

imrankhan1995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
183 views78 pages

SYNDEM EduKit Manual

The document is a user manual for the SYNDEM Smart Grid Research and Educational Kit. It provides 3 sentences: The manual describes the hardware and software components of the Syndem Smart Grid Research and Educational Kit, including the control board, power board, auxiliary power supplies, and accessories. It also explains how to install the software, set up different power electronic topologies using the kit, and provides a quick start guide for running a demo of a DC-DC-AC converter with the kit. The document contains detailed diagrams, explanations, and instructions to help users understand and operate the kit.

Uploaded by

imrankhan1995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 78

SYNDEM

Smart Grid Research and Educational Kit


User Manual

Syndem LLC
Willowbrook, IL 60527, U.S.A.

Web: http://www.syndem.com Email: admin@syndem.com

August, 2021
Scan the QR code below to download the latest version of this manual.
CONTENTS

LIST of FIGURES 2

LIST of TABLES 3

1 Safety First 5
1.1 General Warnings 5
1.2 Specific Warnings 5

2 Introduction 7

3 Hardware 9
3.1 Control Board 9
3.1.1 Input/Output Connectors 9
3.1.2 ADC Signal Conditioning 13
3.1.3 Protection Functions 15
3.1.4 PWM Outputs and Relay Control 17
3.1.5 DAC and SPI 19
3.1.6 RS485 and CAN Interfaces 20
3.1.7 Manual Switches and LEDs 20
3.1.8 QEP, CAP, and I2 C 21
3.2 Power Board 22
3.2.1 Input/Output Connectors 22
3.2.2 Main Circuit 25
3.2.3 Additional Three-phase Rectifier 26
3.2.4 Voltage, Current, and IGBT Temperature Sensing 27
3.2.5 Indication of IGBT Faults 27
3.2.6 LED Indicators 28
3.3 Auxiliary Power Supplies 28
3.4 Accessories Needed 30

4 Software 31
4.1 Installation of Software Packages 31
4.2 Automatic Code Generation 36

5 Sample Conversion Topologies 41


5.1 DC-DC Converters 41
5.2 Uncontrolled Rectifiers 41
5.3 PWM-Controlled Rectifiers 41
5.4 θ-Converters 42
5.5 Single-Phase and Three-Phase Inverters 43
5.6 DC-DC-AC Converters 45
5.7 Single-Phase AC-DC-AC Back-to-Back Converters 45
5.8 Three-Phase AC-DC-AC Back-to-Back Converters 45
5.9 100% Power Electronics-based Microgrid Testbeds 46

6 Hardware: Further Details 47


6.1 Measurements and Signal Conditionings 47
6.1.1 Voltage, Current, and IGBT Temperature Sensing 47
6.1.2 Parameters of ADC Channels 48
6.1.3 Voltage, Current, and IGBT Temperature Protection 51
6.1.4 Calibration of ADC Channels 51
6.1.4.1 Calibration of ADC Offsets 52
6.1.4.2 Calibration of Total Gains 54
6.2 PWM Settings 57
6.2.1 Sinusoidal Pulse Width Modulation (SPWM) 58
6.2.2 Dead-band Setting for the IGBT Module 60
6.3 LC Filters 62
6.4 Pre-Charging Circuit 62

7 Quick Start with a DC-DC-AC Converter 65


7.1 Hardware Setup 65
7.2 Software Setup 67
7.3 Operation and Results 71
LIST of FIGURES
2.1 SYNDEM Smart Grid Research and Educational Kit 8

3.1 Main resources on the control board 10


3.2 JTAG interface 17
3.3 Structure of ADC signal conditioning circuits 18
3.4 Protection functions on the control board 18
3.5 PWM outputs and relay control 19
3.6 DAC and SPI 19
3.7 RS485 and CAN interfaces 20
3.8 Main parts on the power board 23
3.9 Main power circuit on the power board 25
3.10 A separate three-phase rectifier on the power board 26
3.11 Detection of faults on the power board 28
3.12 LED indicators on the power board 29
3.13 3-prong grounded male plug for the auxiliary power supplies of the Kit 30

4.1 Installing Embedded Coder Support Package for TI C2000 Processors: Step 1 32
4.2 Installing Embedded Coder Support Package for TI C2000 Processors: Step 2 32
4.3 Installing Embedded Coder Support Package for TI C2000 Processors: Step 3 32
4.4 Installing Embedded Coder Support Package for TI C2000 Processors: Step 4 33
4.5 Installing Embedded Coder Support Package for TI C2000 Processors: Step 5 33
4.6 Installing Embedded Coder Support Package for TI C2000 Processors: Step 6 33
4.7 Installing Embedded Coder Support Package for TI C2000 Processors: Step 7 34
4.8 Installing Embedded Coder Support Package for TI C2000 Processors: Step 8 34
4.9 Installing Embedded Coder Support Package for TI C2000 Processors: Step 9 34
4.10 Installing Embedded Coder Support Package for TI C2000 Processors: Step 10 35
4.11 Installing Embedded Coder Support Package for TI C2000 Processors: Step 11 35
4.12 Installing Embedded Coder Support Package for TI C2000 Processors: Step 12 36
4.13 File path and file name 37
4.14 Model configuration parameters 37
4.15 Build settings and file paths 38
4.16 Diagnostics-viewer window 38
4.17 Building and downloading: Results 39

5.1 Implementation of DC-DC converters 42


5.2 Implementation of PWM-controlled rectifiers 43
2 LIST OF FIGURES

5.3 Implementation of the θ-converter 44


5.4 Implementation of single-phase and three-phase inverters 44
5.5 Implementation of a DC-DC-AC converter 45
5.6 Implementation of a single-phase back-to-back converter 45
5.7 Implementation of a three-phase back-to-back converter 46
5.8 Texas Tech SYNDEM Microgrid that is built up with eight SYNDEM Smart
Grid Research and Educational Kits 46

6.1 Voltage and current sensing 48


6.2 Resistance-temperature characteristics of the IGBT built-in thermistor 48
6.3 Typical protection circuit 51
6.4 The wiring configuration for zero-point ADC offset calibration 52
6.5 GUI for RS485 communication 54
6.6 Wiring configuration for total gain calibration with most wires removed 55
6.7 Equivalence of a 5V signal with a 10 V (ON) and 0 V (OFF) PWM signal 57
6.8 Pulse width modulation with different duty cycles 57
6.9 A single-phase power inverter 58
6.10 Waveforms of bipolar SPWM 58
6.11 Waveforms of unipolar SPWM 59
6.12 Configuration of the ePWM block 60
6.13 Deadband for complementary PWM signals 61
6.14 Deadband settings for the IGBT module 61
6.15 An LC filter 62
6.16 Charging a capacitor without a pre-charging resistor 63
6.17 Charging a capacitor with a pre-charging resistor 63
6.18 Charging the DC-bus capacitors through the on-board pre-charging resistor with
a battery 63
6.19 The capacitor current and voltage during the pre-charging process 64

7.1 Topology of a DC-DC-AC conversion 66


7.2 Hardware configuration for the topology of the DC-DC-AC conversion 66
7.3 System Setup with the Kit to run demo codes 67
7.4 Controller for the DC-DC converter 68
7.5 Codes for DAC outputs 69
7.6 AC output voltage of the Kit with the demo codes: (a) Low-voltage case. (b)
High-voltage case. 72
7.7 DAC outputs in the low-voltage case: (a) DAC 1: Counter. (b) DAC 2: Input
current ipv . (c) DAC 3: DC bus voltage vdc . (d) DAC 4: AC output voltage vac . 73
7.8 DAC outputs in the high-voltage case: (a) DAC 1: Counter. (b) DAC 2: Input
current ipv . (c) DAC 3: DC bus voltage vdc . (d) DAC 4: AC output voltage vac . 73
7.9 Host GUI with data received from RS485 communication: (a) Low-voltage case.
(b) High-voltage case. 74
LIST of TABLES
3.1 Pin description for Connector J1 on the control board 11
3.2 Pin description for Connector J2 (from Power Board A) and J3 (from Power
Board B) on the control board 11
3.3 Pin description for Connector J4 on the control board (for Power Board A) 12
3.4 Pin description for Connector J7 on the control board (for Power Board B) 12
3.5 Pin description for Connector J5 13
3.6 Pin description for Connector J6 with a TMS320F28335 ControlCARD 14
3.7 Pin description for Connector J8 on the control board 15
3.8 Channel allocation of ADC signals on the control board 16
3.9 Manual switches and LEDs 21
3.10 GPIO mapping for QEP, CAP, and I2 C 21
3.11 Pin description for Connector J1 on the power board, which is the same as that
on the control board 22
3.12 Pin description for Connector J2 AC inputs to the diode bridge on the power
board, which is not related to Connector J2 on the control board 22
3.13 Pin description for Connector J3/J2 on power board 24
3.14 Pin description for Connector J7/J4 on the power board 24
3.15 Parameters and maximum values of major components 25
3.16 Parameters of the three-phase rectifier system 27
3.17 Voltage, current, and IGBT temperature sensing 27
3.18 LED indicators on the power board 29

6.1 Signal conditioning parameters for analog measurements 50


6.2 Characteristic points of the IGBT temperature 51
6.3 Protection thresholds for the Kit 52
6.4 List of measured signals and ADC channels 53

7.1 Voltage levels and main system parameters 67


7.2 Measured signals and ADC channels 68
7.3 Discrete implementation of filters 69
7.4 Description of the four DAC outputs for the demo codes 70
7.5 Settings of the RS485 communication 70
7.6 Dataframe of the RS485 communication 70
1
Safety First
1.1 General Warnings
• This SYNDEM Smart Grid Research and Educational Kit (“Kit”
is used hereafter) is an electrical and electronic equipment. Any
person who intends to use it must have taken proper electrical safety
training before using the Kit.
• This Kit must be used only by qualified persons who are familiar
with the risks associated with handling high-voltage electrical and
high-speed mechanical components, systems and subsystems.
• This Kit includes fans that operate at high speeds and electrical
circuits that operate at high voltages and currents, which can
result in electrical shocks, fire hazards, and/or personal injuries
if improperly handled or applied. This Kit must be used with
necessary caution and appropriate measures employed to avoid
personal injuries and/or property damages.
• This Kit is designed to operate in a lab environment only and is not
considered by SYNDEM to be a finished end-product fit for general
consumer or outdoor use without monitoring.
• This Kit should be kept away from water, liquids, and dust.

1.2 Specific Warnings


• The user must confirm that voltages and isolation requirements are
identified and understood before energizing the Kit.
SYNDEM Smart Grid Research and Educational Kit User Manual
c 2021, Syndem LLC
6 Safety First

• Do not touch any metal surfaces of the Kit to avoid electrical shock.
• Do not touch any inner parts of the Kit even when the Kit is
not in operation to avoid damages caused by static electricity. Re-
configuring the Kit with wires and plugging/unplugging connectors
should be conducted by users who wear anti-static gloves.
• The manual switches on the control board should be operated by
users who wear anti-static gloves.
• Some components on the power board may reach very high
temperature, e.g., over 100 ◦ C. Do not touch the power board during
operation or immediately after operation to avoid potential scalds.
• The JTAG Emulator MUST be disconnected from the control board
before conducting experiments if any voltage in the Kit is higher
than 48V.
• The Kit MUST be Powered OFF before connecting or disconnecting
the JTAG Emulator.
• When a fixed-voltage DC source or a battery is to be connected to
the DC bus of the Kit, a pre-charging circuit must be adopted.
• Do not exceed rated operational conditions for specified voltages,
currents, and IGBT temperature.
2
Introduction
Control and power electronics are two major enablers for the paradigm shift1 of
power systems from centralized generation to distributed generation, the electrification of
transportation, and the transformation of billions of lives in third-world countries. For power
systems or smart grids, a large number of active units including wind farms, solar farms,
distributed energy resources (DERs), electric vehicles (EVs), storage systems and flexible
loads are being integrated into power systems through power electronic converters. This
imposes great challenges to the stability, scalability, reliability, security and resiliency of
power systems. Hence, it is vital to develop appropriate control architecture and technologies
so that all these different players are able to take part in the regulation of future power
systems. For electrification of transportation, power electronic converters are widely used
in more-electric aircraft, all-electric ships, electric vehicles, spaceships, and satellites etc. In
third-world countries, billions of lives are waiting for low-cost solutions to access electricity.
The control of power electronic converters lies in the heart of these applications and many
other areas such as computers, data centers, consumer electronics, lighting, motor drives etc.
While advancing technologies are important to address the problems, another key is to
provide low-cost versatile tools to facilitate the research and development of technologies
and to educate next-generation engineers. A lot of education and training on control of
power electronics are simulation-based because of the lack of affordable and reconfigurable
hardware platforms. The emergence of hardware-in-the loop (HIL) simulation has made it
easier to obtain simulation results that are close to real experiments. However, the price of
HIL simulation systems is still high. While these simulations reflect the behavior of real
systems to some extent, many practical issues cannot be accurately modeled or studied with
simulations. Needless to say, real experiments are the best way to reflect the characteristics
of real applications and carrying out physical experiments should be an integrated part
of training next-generation power electronics engineers and leaders. In order to make this
happen, two major challenges need to be overcome: the availability of suitable hardware
platforms and the elimination of software coding burden. It usually takes several months for
a skilled person to build up an experimental system after several iterations. Furthermore,
different topologies usually require different new hardware designs. As to software coding,
it is often the job of another person – it is difficult for a hardware engineer to write codes.
It often takes several months or longer for a beginner to fully understand the programming
platform and the target machine. Moreover, code debugging can be very time-consuming.
The SYNDEM Smart Grid Research and Educational Kit (“the Kit”) provides a great
way to help researchers, graduate students, engineers, and start-ups overcome the two major
1 Q.-C. Zhong, Power Electronics-Enabled Autonomous Power Systems: Next Generation Smart Grids, Wiley-

IEEE Press, 2020.

SYNDEM Smart Grid Research and Educational Kit User Manual


c 2021, Syndem LLC
8 Introduction

Figure 2.1 SYNDEM Smart Grid Research and Educational Kit

challenges mentioned above and remove the barriers to carry out physical experiments
for control of power electronic-based systems. It is a multifunctional, reconfigurable, and
open-source power electronic converter with the capability of directly downloading codes
from Matlab/Simulink. Through its unique features, it is possible for researchers, graduate
students, engineers, and start-ups to obtain experimental results within hours after completing
simulations by adopting the Kit.
The Kit, as shown in Fig. 2.1, is featured by MathWorks as a reconfigurable power
electronic converter for research and education in smart grids2 . The Kit can be reconfigured
to obtain 10+ different power electronic converters, covering DC/DC converters and single-
phase/three-phase DC/AC, AC/DC, and AC/DC/AC converters. As a result, it can be used to
quickly set up research, development, and education platforms for different applications, such
as solar power integration, wind power integration, machine drives, energy storage systems,
and flexible loads. Moreover, there is no need to spend time on coding because it adopts the
widely-used Texas Instrument (TI) C2000 ControlCARD and is equipped with the automatic
code generation tools of MATLAB/Simulink and TI Code Composer Studio (CCS), making
it possible to generate experimental results within hours from simulations. It comes with
complete interface details and sample implementations, based on which users can easily test
their own control algorithms.
The main features of the Kit include
• Reconfigurable to obtain 10+ different power electronic converter topologies
• Capable of directly downloading control codes from MATLAB/Simulink
• Ideal for research in smart grid, microgrid, renewable energy, EV, energy storage etc.
• Compatible with utilities around the world with 120 V or 230 V voltage, 5 A current
• Versatile communication interfaces, such as RS485 and CAN, for SCADA
• Multiple DAC channels for easy debugging and monitoring of internal states
• Suitable for parallel, grid-tied, or islanded operation with single or multiple Kits
• Designed by a globally well recognized professor in the field
2 https://www.mathworks.com/products/connections/product_detail/syndem-smart-grid-kit.html
3
Hardware
The Kit consists of one control board and one power board. The control board is on top of
the power board and two auxiliary power supplies are located beneath the power board. The
TI C2000 TMS320F28335 ControlCARD is inserted at the back of the control board. Note
that the control board has the capabilities to handle two power boards. The users can add
an additional power board to the Kit for certain applications. For example, with this, it is
possible to carry out experiments for two three-phase converters with one controller, e.g.,
back-to-back converters in permanent magnet synchronous generator (PMSG) or double-
fed induction generator (DFIG)-based wind power generation system (WPGS). A 100-
pin DIM100 connector is provided on the control board for TI C2000 TMS320F28335
ControlCARD. The TMS320F28335 ControlCARD can be replaced with any other TI C2000
DIM100 ControlCARDs, e.g., TI Piccolo F2803x ControlCARD, or TI Concerto F28M35x
ControlCARD, etc.

3.1 Control Board


The main resources of the control board from the top view and the bottom view are given
in Fig. 3.1(a) and Fig. 3.1(b). The control board includes a TI C2000 TMS320F28335
ControlCARD connector, signal conditioning circuits for analog signals, 22-channel 12-
bit ADC inputs, 12-channel PWM outputs, 4-channel 12-bit DAC outputs, 4 switches, 4
programmable LEDs, SPI, RS485 and CAN interfaces, and protection circuits. Up to two
power boards can be connected to each control board.

3.1.1 Input/Output Connectors


As shown in Fig. 3.1, the control board has 9 main input/output connectors, including
• J1 for power supplies, with the pin numbers described in Table 3.1;
• J2 for Power Board A analog inputs, with the pin numbers described in Table 3.2;
• J3 for Power Board B analog inputs, with the pin numbers described in Table 3.2;
• J4 for Power Board A PWM outputs, with the pin numbers described in Table 3.3;
• J7 for Power Board B PWM outputs, with the pin numbers described in Table 3.4;
• J5 for SPI, DAC, two external switches, and RS485, with the pin numbers described in
Table 3.5;
• J6 for TI C2000 ControlCARD, with the pin numbers described in Table 3.6 for TI
TMS320F28335 ControlCARD;
SYNDEM Smart Grid Research and Educational Kit User Manual
c 2021, Syndem LLC
10 Hardware

(a) Top view

(b) Bottom view

Figure 3.1 Main resources on the control board


Hardware 11

Table 3.1 Pin description for Connector J1 on the control board


Pin No. for J1 Description
1 +15 V power supply input
2 Power supply ground
3 -15 V power supply input
4 +5 V power supply input
5 Power supply ground

Table 3.2 Pin description for Connector J2 (from Power Board A) and J3 (from
Power Board B) on the control board
Pin No. for J2/J3 Signals Description
1 va Capacitor Ca voltage
2 vg Grid voltage
3 vb Capacitor Cb voltage
4 Temperature IGBT temperature
5 vc Capacitor Cc voltage
6 Reserved Reserved for user’s measurement
7 ia Inductor L1 current
8 Ground Analog ground
9 ib Inductor L2 current
10 Ground Analog ground
11 ic Inductor L3 current
12 Ground Analog ground
13 idc DC current
14 Ground Analog ground
15 vdc DC-bus voltage
16 Ground Analog ground

• J8 for QEP, CAP, I2 C, and CAN, with the pin numbers described in Table 3.7; and
• J109 for JTAG, with the pin numbers described in Figure 3.2(a).

If a different ControlCARD is used, the pin description for J6 may be slightly


different. Connector J109 is used for JTAG interface to connect to an external JTAG
emulator, as shown in Fig. 3.2. More information about JTAG can be found at
http://www.ti.com/lit/an/spracf0/spracf0.pdf. Note that pin J109-6 is designed to make sure
the connection of the JTAG interface in the right direction, with no needle for pin J109-6
on the control board, as shown in Fig. 3.2(b), and with a needle or pin to block the hole in
the corresponding pin position of the external JTAG emulator, as shown in Fig. 3.2(b). Users
should double check the empty J109-6 pin position on the control board and the blocked hole
in the corresponding pin position of the external JTAG emulator before connecting the JTAG
emulator.
12 Hardware

Table 3.3 Pin description for Connector J4 on the control board (for Power Board A)
Pin No. for J4 Signals Description
1 GPIO-62 Relay control output
2 Fault clear Negative logic output of GPIO-61
3 PWM-1A Gate drive for U-leg high-side switch
4 GPIO-32 Reserved digital I/O signal for users
5 PWM-2A Gate drive for V-leg high-side switch
6 GPIO-33 Reserved digital I/O signal for users
7 PWM-3A Gate drive for W-leg high-side switch
8 Ground Digital ground
9 Fault-A Hardware fault signal to control board
10 Ground Digital ground
11 PWM-3B Gate drive for W-leg low-side switch
12 Ground Digital ground
13 PWM-2B Gate drive for V-leg low-side switch
14 Ground Digital ground
15 PWM-1B Gate drive for U-leg low-side switch
16 Ground Digital ground

Table 3.4 Pin description for Connector J7 on the control board (for Power Board B)
Pin No. for J7 Signals Description
1 GPIO-15 Relay control
2 Fault clear Negative logic of GPIO-61 (same as J4-2)
3 PWM-4A Gate drive for U-leg high-side switch
4 GPIO-32 Reserved digital I/O signal
5 PWM-5A Gate drive for V-leg high-side switch
6 GPIO-33 Reserved digital I/O signal
7 PWM-6A Gate drive for W-leg high-side switch
8 Ground Digital ground
9 Fault-B Hardware fault signal to control board
10 Ground Digital ground
11 PWM-6B Gate drive of W-leg low-side switch
12 Ground Digital ground
13 PWM-5B Gate drive of V-leg low-side switch
14 Ground Digital ground
15 PWM-4B Gate drive of U-leg low-side switch
16 Ground Digital ground
Hardware 13

Table 3.5 Pin description for Connector J5


Pin No. for J5 Port type Signals Description
1 SCS Multiple slave chip select pin
2 SIMO Slave in, master out pin
SPI
3 SOMI Slave out, master in pin
4 CLK Serial clock pin
5 A DAC output channel A
6 B DAC output channel B
7 DAC outputs C DAC output channel C
8 D DAC output channel D
9 Ground DAC common ground
10 -
External Switch Paralleled with S1 note1
11 -
12 -
External Switch Paralleled with S2 note2
13 -
14 BZ RS485 low
Half-duplex RS485
15 AY RS485 high
Note 1: This is connected to the boat switch on the main case.
Note 2: An additional switch can be connected in parallel with S2 if needed.

3.1.2 ADC Signal Conditioning

The structure of the ADC signal conditioning circuits on the control board is shown in Fig.
3.3. As shown in Table 3.2, Connector J2 imports 11 analog signals, which are divided
into Group A (8 signals) and Group C (3 signals). Similarly, Connector J3 also imports
11 analog signals, which are divided into Group B ( 8 signals) and Group C (3 signals).
Two high-accurate voltage reference signals at 1 V and 2 V are added to Group C. After
signal conditioning, Group B signals are directly sent to TI C2000 ControlCARD through
ADC Channel B, but Group A and Group C signals are sent to the ADC Channel A of the
ControlCard through a signal selector, which is controlled by GPIO-63. If GPIO-63 is at a
logic high level, Group A is selected and sent to TI C2000 ControlCARD ; if GPIO-63 is at
a logic low level, Group C is selected. The channel allocation of the ADC signals are shown
in Table 3.8.
It is worth noting that the high-accurate voltage references 1V and 2V can be used for the
diagnosis of the selection in the ADC signal selector circuit. GPIO-63 can be either statically
set with a fixed logic level or dynamically changed according to the requirements of the user.
If the signals in Group A and Group C are both required, the voltage references provide a
diagnostic tool to confirm the right selection in the signal selector circuit, when the dynamic
setting of GPIO-63 is considered.
14 Hardware

Table 3.6 Pin description for Connector J6 with a TMS320F28335 ControlCARD


Hardware 15

Table 3.7 Pin description for Connector J8 on the control board


Pin No. for J8 Port type Signals Description
1 A QEPA signal
2 B QEPB signal
3 QEP I QEP Index signal
4 +5V +5 V power out
5 Ground Digital ground
6 CAP-1 Capture-1
7 CAP CAP-2 Capture-2
8 Ground Digital ground
9 SCL Serial clock pin
10 I2 C SDA Serial data pin
11 +5 V +5 V power out
12 Ground Digital ground
13 CAN_L CAN low
CAN
14 CAN_H CAN high

3.1.3 Protection Functions

The control board provides protection functions for voltages, currents, and the IGBT
temperature on two power boards through the analog measurements, as shown in Fig. 3.4.
For Power Board A, the 11 signals from Connector J2 after signal conditioning are further
sent to the protection circuit. An additional digital hardware fault signal from Power Board
A, which reflects any fault in the IGBT and its drivers, is also sent to this protection circuit
via Connector J4-9. If any of DC over-voltage, AC over-voltage, DC over-current, AC over-
current, over temperature, or IGBT faults happens on the power board, the protection circuits
generate a fault signal and send it to the fault latch circuit A. This fault is then reported to
TI C2000 ControlCARD through GPIO-59, and indicated by a LED, D15. Simultaneously,
a PWM A lock signal (logic high) is generated to disable the PWM A outputs in Connector
J4. The same procedures are adopted for Power Board B through protection circuits and
fault latch circuit B, where the fault is sent to TI C2000 ControlCARD through GPIO-12
and indicated by a LED, D18. The PWM lock B signal is generated to disable the PWM B
outputs in Connector J7, if a fault appears on Power Board B.
GPIO-61 is designed to clear the PWM A/B lock signals, GPIO-59 and GPIO-12 fault
signals, fault LEDs D15 and D18, and the driver IC fault signals on Power Boards A and
B. It is worth noting that GPIO-61 MUST be kept as logic low to activate fault latch circuit
A/B during the normal operation. During system initialization, a 2 ms pulse signal can be
programmed on GPIO-61 to clear any initialization faults.
The protection functions of the driver ICs and the IGBTs on the power board are described
in Section 3.2.5.
16
Table 3.8 Channel allocation of ADC signals on the control board
Group Order Signals Input Pin No. ControlCARD Description

Hardware
1 va J2-1 ADC-A0 Capacitor Ca voltage from Power Board A
2 vb J2-3 ADC-A1 Capacitor Cb voltage from Power Board A
3 vc J2-5 ADC-A2 Capacitor Cc voltage from Power Board A
4 ia J2-7 ADC-A3 Inductor L1 current from Power Board A
Group A
5 ib J2-9 ADC-A4 Inductor L2 current from Power Board A
6 ic J2-11 ADC-A5 Inductor L3 current from Power Board A
7 idc J2-13 ADC-A6 DC current from Power Board A
8 vdc J2-15 ADC-A7 DC bus voltage from Power Board A
1 va J3-1 ADC-B0 Capacitor Ca voltage from Power Board B
2 vb J3-3 ADC-B1 Capacitor Cb voltage from Power Board B
3 vc J3-5 ADC-B2 Capacitor Cc voltage from Power Board B
4 ia J3-7 ADC-B3 Inductor L1 current from Power Board B
Group B
5 ib J3-9 ADC-B4 Inductor L2 current from Power Board B
6 ic J3-11 ADC-B5 Inductor L3 current from Power Board B
7 idc J3-13 ADC-B6 DC current from Power Board B
8 vdc J3-15 ADC-B7 DC bus voltage from Power Board B
1 vg J2-2 ADC-A0 Grid voltage from Power Board A
2 Temperature J2-4 ADC-A1 IGBT temperature from Power Board A
3 Reserved J2-6 ADC-A2 Reserved measurement for Power Board A
4 vg J3-2 ADC-A3 Grid voltage from Power Board B
Group C
5 Temperature J3-4 ADC-A4 IGBT temperature from Power Board B
6 Reserved J3-6 ADC-A5 Reserved measurement for Power Board B
7 1V - ADC-A6 1 V reference signal
8 2V - ADC-A7 2 V reference signal
Hardware 17

(a) Pin description for JTAG Connector J109 on the control board

(b) JTAG connector on the control board (left) and on an external emulator (right)

Figure 3.2 JTAG interface

3.1.4 PWM Outputs and Relay Control


The PWM outputs and relay control signals are shown in Fig. 3.5. Before PWM A/B
signals sent out through Connectors J4 and J7, the 3.3 V PWM A/B signals from TI C2000
ControlCARD are converted to 5V PWM A/B output signals through voltage conversion
circuits A and B, which can be disabled by a software-controllable signal GPIO-22 and the
PWM A lock signal generated by the fault latch A circuit in Fig. 3.4. Only if both the PWM
A lock signal is at a logic low level (no faults) and the GPIO-22 is at a logic high level, PWM
outputs are enabled. For a PWM A lock signal with a logic high level or a GPIO-22 with a
logic low level, the PWM A outputs are disabled. Similarly, PWM B outputs can be disabled
by a software-controllable signal GPIO-26 and the PWM B lock signal generated in Fig. 3.4.
18 Hardware

Figure 3.3 Structure of ADC signal conditioning circuits

Figure 3.4 Protection functions on the control board

The relay control for Power Board A is done through GPIO-62 sent to Connector J4-1 and
the relay control for Power Board B is done through GPIO-15 sent to Connector J7-1.
Combining the protection functions in Subsection 3.1.3 and the control of the voltage
conversion circuits A/B, the Kit can shut itself down to protect the system when abnormal
operations of the Kit happen. In Fig. 3.5, PWM A channel includes 6 signals of PWM-
1A/B, PWM-2A/B, and PWM-3A/B, as indicated in Table 3.3; and PWM B channel
Hardware 19

Figure 3.5 PWM outputs and relay control

Figure 3.6 DAC and SPI

includes 6 signals of PWM-4A/B, PWM-5A/B, and PWM-6A/B, as shown in Table


3.4. More information about PWM functions of TI C2000 controllers can be found at
http://www.ti.com/lit/ug/sprugp2a/sprugp2a.pdf and Section 6.2.

3.1.5 DAC and SPI


The design of the DAC and SPI circuits are shown in Fig. 3.6. They share the SPI interface,
with the DAC circuit configured to operate in the slave mode. In order to obtain an external
20 Hardware

Figure 3.7 RS485 and CAN interfaces

SPI interface for the control board, a CSC selection circuit is designed to select different SPI
peripherals via GPIO-60. If GPIO-60 is at a logic high level, the external SPI is selected;
if GPIO-60 is at a logic low level, the DAC circuit is selected. By default, the GPIO-60 is
pulled down to a logic low level so DAC is selected. It is worth noting that if the external SPI
is configured to operate in the slave mode, then GPIO-60 can be dynamically set to maintain
the operation of both the DAC circuit and the external SPI. For example, another DAC circuit
can be added to the external SPI to increase the number of DAC channels. If the external
SPI is configured to operate in the master mode, then the DAC circuit is disabled. More
information about SPI can be found at http://www.ti.com/lit/ug/sprueu3a/sprueu3a.pdf.

3.1.6 RS485 and CAN Interfaces


The design of RS485 and CAN communication interfaces are shown in Fig. 3.7. Both RS485
and CAN communications are isolated in order to improve the reliability of communication.
The SCI-A channel is configured for RS485 communication in the half-duplex mode. The
master/slave mode should be configured for the RS485 network if there are three or more
nodes in the network.
For the CAN communication, the CAN-A channel is configured on the control board.
Two jumpers, J10 and J14, are designed to enable or disable the terminal resistors for
RS485 and CAN communications, respectively.

3.1.7 Manual Switches and LEDs


As shown in Fig. 3.1 and Table 3.9, the control board is equipped with 4 manual switches,
4 programmable LEDs, and 6 LED indicators. The manual switches are connected to four
GPIOs so that users can conduct different activities. Four programmable LEDs are controlled
Hardware 21

Table 3.9 Manual switches and LEDs


Type Hardware Function description
S1 GPIO-27 input
S2 GPIO-14 input
Manual switch
S3 GPIO-13 input
S4 GPIO-49 input
LED1, D112 GPIO-84 output
LED2, D113 GPIO-85 output
Programmable LEDs
LED3, D114 GPIO-86 output
LED4, D123 GPIO-58 output
D15 Power Board A fault
D18 Power Board B fault
D127 RS485 RXD
Non-programmable LEDs
D146 +5V power supply
D147 +15V power supply
D148 -15V power supply

Table 3.10 GPIO mapping for QEP, CAP, and I2 C


Type Signals GPIO No.
A GPIO-20
QEP B GPIO-21
I GPIO-23
CAP-1 GPIO-24
CAP
CAP-2 GPIO-25
SCL GPIO-33
I2 C
SDA GPIO-32

by GPIOs to represent different operation conditions as programmed by users. LEDs, D15


and D18, respectively, indicate the corresponding faults on the power boards, as shown in
Fig. 3.4, which can be cleared via GPIO-61. Three LEDs, D146, D147, and D148, indicate
that the power supplies are normal. LED D127 indicates the receiving status of RS485
communication.

3.1.8 QEP, CAP, and I2 C


The GPIO mapping for QEP, CAP, and I2 C is shown in Table 3.10.
More details about QEP can be found at http://www.ti.com/lit/ug/sprug05a/sprug05a.pdf.
More details about CAP can be found at http://www.ti.com/lit/ug/spru807b/spru807b.pdf.
More details about I2 C can be found at http://www.ti.com/lit/ug/sprue11c/sprue11c.pdf.
22 Hardware

Table 3.11 Pin description for Connector J1 on the power board, which is the
same as that on the control board
Pin No. for J1 Description

1 +15 V power supply input


2 Power supply ground
3 -15 V power supply input
4 +5 V power supply input
5 Power supply ground

Table 3.12 Pin description for Connector J2 AC inputs to the diode bridge on the
power board, which is not related to Connector J2 on the control board
Pin No. for J2 Description

1 AC phase A
2 AC phase B
3 AC phase C

3.2 Power Board


The main resources of the power board from the top view and the bottom view are shown in
Fig. 3.8(a) and Fig. 3.8(b). The power board contains connectors, a three-leg IGBT module
A1P35S12M3 and its driver circuits, DC-bus capacitors, inductors, AC capacitors, current
sensors, voltage sensors, a three-channel relay, a three-phase diode bridge along with a
DC capacitor, and a pre-charging resistor. The power board accepts pulse-width-modulation
(PWM) signals from the control board through Connector J7/J4 and transfers analogue
voltage/current/temperature signals to the control board through Connector J3/J2.

3.2.1 Input/Output Connectors


As shown in Fig. 3.8, the power board has 4 main input/output connectors, including
Connector J1 for power supply; Connector J2 for AC inputs to the three-phase diode bridge;
Connector J3/J2 for analog outputs to the control board; Connector J7/J4 for PWM inputs
from the control board. Note that Connector J3/J2 is a single connector and that Connector
J7/J4 is also a single connector.
The pin description for Connector J1 is shown in Table 3.11, which is exactly the same as
Connector J1 on the control board. The pin description for Connector J2 for AC inputs to the
three-phase diode bridge is shown in Table 3.12, which is NOT related to Connector J2 on
the control board. The pin description for Connector J3/J2 is shown in Table 3.13, which is
matched with Connectors J3 and J2 on the control board. The pin description for Connector
J7/J4 is shown in Table 3.14, which is matched with Connectors J7 and J4 on the control
board.
Hardware 23

(a) Top view

(b) Bottom view

Figure 3.8 Main parts on the power board


24 Hardware

Table 3.13 Pin description for Connector J3/J2 on power board


Pin No. for J3/J2 Signals Description
1 va Capacitor Ca voltage measurement
2 vg Grid voltage measurement
3 vb Capacitor Cb voltage measurement
4 Temperature IGBT temperature measurement
5 vc Capacitor Cc voltage measurement
6 Reserved Reserved for user’s measurement note1
7 ia Inductor L1 current measurement
8 Ground Analog ground
9 ib Inductor L2 current measurement
10 Ground Analog ground
11 ic Inductor L3 current measurement
12 Ground Analog ground
13 idc DC current measurement
14 Ground Analog ground
15 vdc DC-bus voltage measurement
16 Ground Analog ground
Note 1: A signal can be connected for measurement if needed.

Table 3.14 Pin description for Connector J7/J4 on the power board
Pin No. for J7/J4 Signals Description
1 Relay control Relay control signal input
2 Fault clear Fault clear signal input
3 PWM signal note1 Gate drive input for U-leg high-side switch
4 Reserved Reserved digital I/O signal note2
5 PWM signal note1 Gate drive input for V-leg high-side switch
6 Reserved Reserved digital I/O signal note2
7 PWM signal note1 Gate drive input for W-leg high-side switch
8 Ground Digital ground
9 Fault output Hardware fault signal output
10 Ground Digital ground
11 PWM signal note1 Gate drive input for W-leg bottom switch
12 Ground Digital ground
13 PWM signal note1 Gate drive input for V-leg bottom switch
14 Ground Digital ground
15 PWM signal note1 Gate drive input for U-leg bottom switch
16 Ground Digital ground
Note 1: The negative logic is used to drive IGBT switches.
Note 2: The user can add additional digital signals if needed.
Hardware 25

Figure 3.9 Main power circuit on the power board

Table 3.15 Parameters and maximum values of major components


Maximum working
Components Parameters
conditions
C76, C77 470 µF 450 Vdc
250 Vrms @ 50/60Hz
Ca (C79), Cb (C78), Cc (C80) 20 µF
or 350 Vdc
2 mH @ 0 A;
L1 (La ), L2 (Lb ), L3 (Lc ) 10 Adc or 10 Arms
1.2 mH @ 10 A
note 10 Arms 250 Vrms
Three-channel relay
R61 5.1 kΩ 5W
5 Ω @ 25◦ C; 8 Adc or 8 Arms
VR1, VR2, VR3
0.18 Ω @ 160◦ C @ 25◦ C
F1, F2, F3, F4 - 10 Adc or 10 Arms
Note: This is an AC relay. Although it is allowed to pass up to 10 A DC current, it is forbidden to turn off a DC current.

3.2.2 Main Circuit


The main circuit on the power board, as shown in Fig. 3.9, is the core power circuit of the Kit,
which includes a three-leg IGBT module, two sets of DC capacitors, three sets of inductors,
three sets of AC capacitors, one three-channel relay, four sets of current sensors, three power
thermistors, four fuses, and a pre-charging resistor R61. The IGBT module A1P35S12M3
contains six 1200 V 35 A devices in three legs with a common positive bus. It has a built-in
negative temperature coefficient (NTC) thermistor for temperature measurement. The U-leg
and V-leg IGBTs are designed with a standard H-bridge output. The negative pole of the W-
leg is not connected to the common negative pole of the U-leg and the V-leg, which provides
26 Hardware

Figure 3.10 A separate three-phase rectifier on the power board

flexibility in configuring IGBTs to achieve different power electronic converters. The gate-
drive signals for the IGBT module are shown in Table 3.14. Note that the negative logic1 is
designed for the IGBT drives on the power board. The double circles in Fig. 3.9 represent
banana sockets on the power board, as shown in Fig. 3.8, which allows the reconfiguration of
the main circuit into different power electronic converter topologies with banana wires. The
main circuit has three phases, A, B, and C, associated with three IGBT legs. Three 1.2mH
10A inductors L1 (La ), L2 (Lb ), L3 (Lc ), three 20 µF 250 V AC capacitors Ca (C79), Cb
(C78), Cc (C80), a three-channel relay, three power thermistors VR1, VR2 and VR3, and
three fuses F2, F3, F4, are placed between the IGBT legs and the three-phase terminals.
The circuit between the W-leg and the Terminal A and the circuit between the V-leg and the
Terminal B are reconfigurable. An additional neutral Terminal, N, along with two banana
sockets are designed. These provide additional flexibility in configuring the Kit for different
topologies. Bus+ and Bus- terminals are the DC buses, where a fuse, F1, is placed on the Bus+
channel. Two DC-bus 450Vdc 470 µF capacitors, C76 and C77, can be connected in parallel
if a larger capacitance is required for DC-bus or in series if a high voltage is required for the
DC-bus. Particular attention should be paid to avoid over-voltage across the capacitors. The
pre-charging resistor R61 can be used to pre-charge capacitor Ca (C19) or another capacitor,
if Terminal A is required to connect to a battery or a DC source. Three AC capacitors, Ca
(C79), Cb (C78), Cc (C80) can also be used for DC applications. The four fuses and three
power thermistors are used for the protection of over-currents and inrush currents.
The parameters and maximum working conditions of the major components of the main
circuit are shown in Table 3.15.

3.2.3 Additional Three-phase Rectifier


In addition to the main circuit, a separate three-phase rectifier with a DC 470 µF 450 Vdc
capacitor, as shown in Fig. 3.10, is provided on the power board. This can be used to generate
a DC source to power the DC bus, in case an external DC source is not available. The
parameters of this three-phase rectifier system is shown in Table 3.16. Note that the input
voltage should be lower than a value that does not generate a DC voltage higher than 450
1 The negative logic means that high logic-level PWM signals turn the IGBT OFF, and low logic-level PWM

signals turn the IGBT ON.


Hardware 27

Table 3.16 Parameters of the three-phase rectifier system


Parameters Values
Rated input voltage < 250V RMS
Rated input current 5 Arms (three-phase) or 8 Arms (single-phase)
Capacitor C16 470 µF 450 Vdc

Table 3.17 Voltage, current, and IGBT temperature sensing


Measurement Description
Capacitor Ca voltage va Voltage between A2a and A3
Grid voltage vg Voltage between Cg and C3 or Ag note1
Capacitor Cb voltage vb Voltage between B2a and B3
IGBT temperature A built-in thermistor in the IGBT
Capacitor Cc voltage vc Voltage between C2a and C3
Inductor L1 current ia Current sensor IA in series with L1
Inductor L2 current ib Current sensor IB in series with L2
Inductor L3 current ic Current sensor IC in series with L3
DC current idc Current sensor ID on DC Bus+
DC-bus voltage vdc Voltage between D3 and DC Bus-
Note 1: A jumper JP4 is configured for grid phase voltage or line-line voltage measurement.
C3 for phase voltage, and Ag for line-line voltage.

V. Apparently, the three-phase rectifier can also be used for a single-phase AC input as well,
leaving one leg not used. It is suggested to insert an isolation transformer between the utility
grid and Connector J2 for safety reasons. Note that Connector J2 on the power board is not
related to Connector J2 on the control board.

3.2.4 Voltage, Current, and IGBT Temperature Sensing


On the power board, voltages, currents and the IGBT temperature are measured and sent to
the control board through Connector J3/J2, as shown in Table 3.13. The detailed descriptions
of voltage, current, and IGBT temperature sensing are shown in Table 3.17, where the related
voltage and current sensing positions can be found on the main circuit shown in Fig. 3.9. The
IGBT temperature sensing is achieved by a voltage divider circuit, as shown in Fig. 3.11.

3.2.5 Indication of IGBT Faults


There are two parts of fault detections on the power board, as shown in Fig. 3.11. One part
is from the gate-driver ICs. If a gate-driver IC detects over-currents of the IGBT, the gate-
driver IC turns OFF the gate-drive signal and send out a fault signal. Another part is from the
over-temperature detection of the IGBT module. When the IGBT temperature goes up, the
resistance of the IGBT thermistor decreases and the voltage on the fixed resistor increases,
according to the circuit shown in Fig. 3.11. If the IGBT temperature is over the threshold,
28 Hardware

Figure 3.11 Detection of faults on the power board

which is set at 100 ◦ C by default, the over-voltage detection circuit sends out a fault signal. If
any of these faults happens, the fault handling circuit sends out a hardware fault signal to the
control board through Connector J7/J4-9 and turns ON LED D16. The gate-driver IC fault
signals can be cleared by GPIO-61 (via J4/J7-2).

3.2.6 LED Indicators


There are 10 LED indicators on the power board, as shown in Fig. 3.12. The detailed function
descriptions of LED indicators are shown in Table 3.18.

3.3 Auxiliary Power Supplies


The Kit is powered by two auxiliary isolated power supplies beneath the power board. One
has a 12 V power supply to power four cooling fans, and the other has +15 V / -15 V / +5V
power supplies to power the control board and the power board through Connectors J1, as
indicated in Table 3.1 and Table 3.11. Both auxiliary power supplies are connected to a 3-
prong grounded male plug with a 4.5 ft AC cable, which is connected out at the left side
of the Kit, as shown in Fig. 3.13. Through this 3-prong grounded male plug, both auxiliary
power supplies can be powered by a standard 120/240 Vrms, 50/60 Hz single-phase AC grid.
When the auxiliary power supplies are powered on by a standard AC grid, the Kit is powered
on with the fans running and power supply LEDs on. Note that this 3-prong grounded male
plug does not have any relationship with the main circuit shown in Fig. 3.9 on the power
board. This 3-prong grounded male plug is just used to power two auxiliary power supplies.
Hardware 29

Figure 3.12 LED indicators on the power board

Table 3.18 LED indicators on the power board


LED indicators Function description
D13 Drive signal for U-leg high-side switch
D14 Drive signal for V-leg high-side switch
D15 Drive signal for W-leg high-side switch
D17 Drive signal for W-leg low-side switch
D10 Drive signal for V-leg low-side switch
D11 Drive signal for U-leg low-side switch
D16 Driver IC or over-temperature fault
D4 +5V power supply
D5 +15V power supply
D3 -15V power supply
30 Hardware

Figure 3.13 3-prong grounded male plug for the auxiliary power supplies of the Kit

3.4 Accessories Needed


The following accessories are required for the use of the Kit:
• A host computer for developing control algorithms and monitoring operation
conditions of the Kit.
• A Texas Instruments XDS100V2 USB JTAG Emulator for software downloading
from the host computer to the TI C2000 microcontroller on the Kit, which is matched
with J109 on the control board shown in Fig. 3.1(a) and Fig. 3.2. More information
about JTAG can be found at http://www.ti.com/tool/TMDSEMU100V2U-14T.
• A USB RS485 Adapter for data monitoring and data logging on the host computer
through RS485 communication. It is very useful for ADC calibration. The user can
purchase it online, e.g., from the link below 2 .
• An oscilloscope for monitoring signals in the system and/or signals sent out through
the DAC channels on the control board.

2 https://www.amazon.com/Serial-Converter-Adapter-Supports-Windows/dp/B01AT1PUQI/ref=sr_1_1_sspa?

ie=UTF8&qid=1544205410&sr=8-1-spons&keywords=usb+485+adapter&psc=1
4
Software
4.1 Installation of Software Packages
First of all, avoid using long names for files and folders and keep the depth of paths short.
The following software tools are required to use the Kit:
• Texas Instruments (TI) Code Composer Studio (CCS) v5.5 or higher.
• TI controlSUITE v3.4 or higher.
• MATLAB/Simulink R2015b or higher with the following toolboxes1
– Embedded Coder
– MATLAB Coder
– Simulink Coder
– Instrument Control Toolbox if RS485 communication is to be used
– Embedded Coder Support Package for Texas Instruments C2000 Processors
TI CCS and TI controlSUITE can be downloaded from the Texas Instruments website
(www.ti.com) for free after registration. The installation of TI CCS, TI controlSUITE and
MATLAB/Simulink can be completed following their instructions provided.
The Embedded Coder Support Package for Texas Instruments C2000 Processors is a
free add-on toolbox based on the MATLAB/Simulink environment. After completing the
installations of TI CCS, TI control SUITE, and MATLAB/Simulink with the above toolboxes,
the following procedures can be followed to install Embedded Coder Support Package for TI
C2000 Processors:
1. Open MATLAB 2015b, select “Add-Ons”, and then select “Get Hardware
Support Packages”, as shown in Fig. 4.1. If you cannot find the buttons, enter
“supportPackageInstaller” in the MATLAB command window. This also starts the
Support Package Installer wizard.
2. On the Support Package Installer screen, select “Install from Internet”, and then
select “Next >”, as shown in Fig. 4.2.
3. Select “Texas Instruments C2000” and Select “support packages” of “Generate code
optimized for C2000 MCU”. Specify the path to install in the “Installation folder”, as
shown in Fig. 4.3. Click “Next >” and follow the instructions on the subsequent pages
of the Support Package Installer” wizard. Note that a file will be needed to copy into
this installation folder so keep a record for the path of this folder.
1 If the users are very familiar with CCS, then it can be used for software coding without MATLAB/Simulink.

SYNDEM Smart Grid Research and Educational Kit User Manual


c 2021, Syndem LLC
32 Software

Figure 4.1 Installing Embedded Coder Support Package for TI C2000 Processors: Step 1

Figure 4.2 Installing Embedded Coder Support Package for TI C2000 Processors: Step 2

Figure 4.3 Installing Embedded Coder Support Package for TI C2000 Processors: Step 3

4. On the “Confirm installation” screen, select “Install”, as shown in Fig. 4.4.


5. The “Support Package Installer” starts to download Embedded Coder Support
Package for Texas Instruments C2000 Processors, as shown in Fig. 4.5.
6. The “Install/update complete” screen shows that the support package is successfully
Software 33

Figure 4.4 Installing Embedded Coder Support Package for TI C2000 Processors: Step 4

Figure 4.5 Installing Embedded Coder Support Package for TI C2000 Processors: Step 5

Figure 4.6 Installing Embedded Coder Support Package for TI C2000 Processors: Step 6

installed. Click “Continue >” to set up the installed support package, as illustrated in
Fig. 4.6.
7. On the “Set up support package” screen, select the support package for “Texas
Instruments C2000 (Embedded Coder)”. Then select “Next >”, as illustrated in Fig.
34 Software

Figure 4.7 Installing Embedded Coder Support Package for TI C2000 Processors: Step 7

Figure 4.8 Installing Embedded Coder Support Package for TI C2000 Processors: Step 8

Figure 4.9 Installing Embedded Coder Support Package for TI C2000 Processors: Step 9

4.7.
8. On the “Select toolchain” screen, select the version of Texas Instruments Code
Composer Studio (CCS V5.5 or higher) that Embedded Coder uses to build generated
code for TI C2000 processors, as illustrated in Fig. 4.8.
Software 35

Figure 4.10 Installing Embedded Coder Support Package for TI C2000 Processors: Step 10

Figure 4.11 Installing Embedded Coder Support Package for TI C2000 Processors: Step 11

9. On the “Install third-party software” screen, review the list of third-party software.
Download and install supported versions of the required third-party software if needed.
If you already installed the software tools above, just Click “Next >”, as illustrated in
Fig. 4.9.

10. On the “Validation Code Composer Studio installation” screen, specify the
installation folder of the C2000 Code Generation Tools. “Browse” to the installation
folder and click “Validate”, as shown in Fig. 4.10. Note that the correct compiler
folder, e.g., “c2000_6.2.0” folder under CCS V5.5, should be selected.

11. On the “Validate controlSUITE installation” screen, specify the installation folder
of the TI controlSUITE. “Browse” to the installation folder and click “Validate”, as
shown in Fig. 4.11.

12. Click “Confirm” on the “Environment configuration” screen, then “Confirm” on


the “Confirm third-party installation” screen, and finally “Finish” on the “Support
Package Setup Complete” screen to finish the installation, as shown in Fig. 4.12.
36 Software

(a)

(b)

(c)

Figure 4.12 Installing Embedded Coder Support Package for TI C2000 Processors: Step 12

4.2 Automatic Code Generation


After the software environment is set up with all software tools installed, a sample software
code can be downloaded to the control board of the Kit to test the software environment. This
sample software code is used to flash the 4 LED lights on the control board, as shown in Fig.
3.1. The code Sample_code_LED_flashing_2015b.slx (software code for TI TMS320F28335
ControlCARD) can be found at ..\Edu_Kit_Manual\demo_codes\Sample_Code\.
Software 37

Figure 4.13 File path and file name

Figure 4.14 Model configuration parameters

Here are the procedures to download the this sample code to TI TMS320F28335
ControlCARD.

1. Copy the file “F28335_XDS100v2.ccxml” in the folder “..\Edu_Kit_Manual\demo_codes”


to the same folder where the support package is installed. For the installation shown in
Fig. 4.3, the folder is“..\MATLAB\SupportPackages\R2015b\texasinstrumentsc2000\to
olbox\target\supportpackages\tic2000\CCS_Config”.
2. Use MATLAB to open the code by double-clicking the file name “Sample_code_LED
_flashing_2015b.slx”, as shown in Fig 4.13. The sample code is then opened, as shown
in Fig. 4.14.
38 Software

Figure 4.15 Build settings and file paths

Figure 4.16 Diagnostics-viewer window

3. Click “Model Configuration Parameters” in code interface shown in Fig. 4.14 to


open “Configuration Parameters” window shown in Fig. 4.15. Select “Hardware
Implementation”, and “Build options” to check the build setting in Fig. 4.15. Same
settings in Fig. 4.15 should be followed for all software codes to be downloaded to
TI TMS320F28335 ControlCARD. Make sure that “Linker command file” is set as
“$(TARGET_ROOT)\src\c28335.cmd”, and “CCS hardware configuration file” is
set as “$(TARGET_ROOT)\CCS_Config\F28335_XDS100v2.ccxml”.
4. Power OFF the Kit.
5. Connect the Kit, XDS100V2 USB JTAG Emulator, and the host computer with one
end of the JTAG Emulator connected to Connector J109 on the control board and the
other end connected to a USB port on the host computer. Note that the Kit MUST be
Powered OFF, when connecting or disconnecting the JTAG Emulator.
Software 39

Figure 4.17 Building and downloading: Results

6. Power ON the Kit through the 3-prong grounded male plug with a single-phase
120/240 Vrms, 50/60 Hz source.
7. Press “Ctrl+B” on keyboard to download the sample code to the Kit, as shown in Fig.
4.14. A “Diagnostic Viewer” window can be opened by clicking “View diagnostics”,
as shown in Fig. 4.16, to view the process when building the software code.
8. When the sample code is well built and downloaded to TI TMS320F28335
ControlCARD, the “Diagnostic Viewer” window displays "### Successfully
generated all binary outputs", “*** Program is running”, “*** LOAD & RUN
DONE”, and “Build process completed successfully”, as shown in Fig. 4.17.
9. Power OFF the Kit after the sample code is downloaded completely.
10. Disconnect the JTAG Emulator between the JTAG interface and control board.
11. Power ON the Kit again, the sample code automatically starts running with the 4
programmable LEDs flashing.

Note that Step 1 only needs to be conducted once. All demo codes provided are correctly set
for Step 3, the user does not need to check them. Step 9 is very important for proper operation
of the Kit. If the Kit is to be operated with a DC-bus voltage higher than 48V, the JTAG
Emulator MUST be disconnected from the control board before conducting experiments
to avoid any damage. Note that the Kit MUST be Powered OFF before connecting or
disconnecting the JTAG Emulator.
5
Sample Conversion Topologies
The SYNDEM Kit can be reconfigured into different converter topologies for various
applications, such as solar power, wind power, energy storage system, motor drives, electric
vehicles, and flexible loads. Some sample topologies are outlined below.

5.1 DC-DC Converters

DC-DC converters are used to change the voltage level of a DC source to another level that is
suitable for the load connected. A DC-DC converter can be designed to increase the voltage,
decrease the voltage, or both. The ratio between the output voltage and the input voltage is
called the conversion ratio. When the conversion ratio is lower than 1, the converter is called
a buck (step-down) converter; when the conversion ratio is higher than 1, the converter is
called a boost (step-up) converter; when the conversion ratio can be higher and lower than
1, then the converter is called a buck-boost converter. The SYNDEM Kit can be adopted to
realize all these three types of DC-DC converters. Fig. 5.1 shows some implementations.

5.2 Uncontrolled Rectifiers

Because of the diodes in the IGBT module, it is easy to implement uncontrolled rectifiers
with the SYNDEM Kit. The standalone three-phase bridge rectifier can also be used for
this purpose. When the system is configured as an uncontrolled rectifier, no PWM control
command is needed from the control board. A command signal can be given to operate the
relay.

5.3 PWM-Controlled Rectifiers

The SYNDEM Kit can be configured to form a single-phase or three-phase PWM-controlled


rectifier, as shown in Fig. 5.2. The circuit configurations of these PWM-controlled rectifiers
can also be used for single-phase/three-phase uncontrolled rectifiers, with the main difference
being that the switches are not controlled through PWM signals from the DSP.
SYNDEM Smart Grid Research and Educational Kit User Manual
c 2021, Syndem LLC
42 Sample Conversion Topologies

Q1
L1/La A
Bus+ P W
+ +

DC input

DC output
Ca/C79
Q2

_ _
EW
(a) Buck converter

A W TD6 TB3
+ L1/La +
Q1

DC output
Cb/C78
DC input

Ca/C79

Q2
_ _

EW
(a) Boost converter

Bus+ W EW
P
_
+
Q2
DC output
Cb/C78

Q1
DC input

L1/La

_
+
A
(c) Buck-boost converter

Figure 5.1 Implementation of DC-DC converters

5.4 θ-Converters
The SYNDEM Kit can be used to implement other rectification topologies, for example,
the θ-converter1 and the Beijing converter 2 . The configuration of the θ-converter is shown
in Fig. 5.3, which is a single-phase bridge converter that looks like the symbol θ. It has a
common AC and DC ground, which reduces common-mode voltages and leakage currents.
The DC-bus capacitor C77 provides a direct path for the double-frequency ripple current
inherently existing in single-phase converters to return continuously. The output capacitor
1 Q.-C. Zhong and W. Ming, “A θ-Converter That Reduces Common Mode Currents, Output Voltage Ripples,

and Total Capacitance Required,” IEEE Transactions on Power Electronics, vol. 31, no. 12, pp. 8435-8447, Dec.
2016.
2 Q.-C. Zhong, W.-L. Ming, W. Sheng and Y. Zhao, “Beijing Converters: Bridge Converters with a Capacitor

added to Reduce Leakage Currents, DC-bus Voltage Ripples and Total Capacitance Required,” IEEE Trans. on
Industrial Electronics, vol.64, no.1, pp. 325-335, 2017.
Sample Conversion Topologies 43

P TD2 Bus+
+

Cd2/C76
C

DC output
L3/Lc

AC input
U

Cc/C80
V

Cd1/C77
N TB6 _
EU EV Bus-
(a) A single-phase rectifier
P TD2 Bus+
+
A L L

Cd2/C76

DC output
AC input

LL
B W
V
U
LL

Cd1/C77
C

_
C C
  EW EV EU Bus-
Cc

N
(b) A three-phase rectifier

Figure 5.2 Implementation of PWM-controlled rectifiers

C78 only deals with switching ripples so it can be chosen small. Moreover, the DC-bus
capacitor C77 is designed to store the system ripple energy with large voltage ripples. As a
result, its capacitance can be reduced as well. The θ-converter offers more advantages than a
conventional bridge converter because its two legs are controlled independently. The inductor
L2/Lb can also be connected between P and Bus+ to form an improved θ-converter.

5.5 Single-Phase and Three-Phase Inverters


An inverter converts a DC source into an AC output. According to the type of the DC supply,
there are current source inverters (CSI) and voltage-source inverters (VSI). Typically, an
inverter is a VSI if there is a large capacitor across the DC bus and is a CSI if there is a large
inductor in series with the DC supply. The SYNDEM Kit can be configured as VSI for single-
phase and three-phase applications, as shown in Fig. 5.4. Depending on the control algorithm
implemented, the output of the inverter can be current-controlled or voltage-controlled. Both
control methods can be implemented with the SYNDEM Kit because there are sensors to
measure the output voltage and the output current. The inverter can be operated in the
islanded or grid-tied mode. If it is operated in the grid-tied mode, the voltage on the grid
side is available for synchronization. Once it is synchronized, the relay can be turned ON.
44 Sample Conversion Topologies

A



P Bus+
 
C77 T +
A   

  D 
V


_

N TA7 TB8 TB7

Figure 5.3 Implementation of the θ-converter

Bus+ TD2 P
+
Cd2/C76

C
L3/Lc
DC input

AC output
U
Cc/C80

V
Cd1/C77

_ TB6 N
Bus-
(a) A single-phase inverter
Bus+ TD2 P
+
L1/La A
Cd2/C76

AC output
DC input

L2/Lb
W B
V
U
L3/Lc
Cd1/C77

_
Bus- EU EV EW
Cc

Ca
Cb

N
(b) A three-phase inverter

Figure 5.4 Implementation of single-phase and three-phase inverters


Sample Conversion Topologies 45

TD2 P
Q1 Q3 Q5

Cd2/C76
C
L3/Lc

AC output
A

Cc/C80
W U
+ L1/La V

Cd1/C77
DC input

Ca/C79 Q4 Q6
_ Q2 TB6 N
Bus- TA7 EW EV EU

Figure 5.5 Implementation of a DC-DC-AC converter

B TB3
P
Q1 Q3 I+
+ + Q5
A V+ C
W C77 Vd V _

Cb/C78
L1/La _ U
L3/Lc

AC output
AC input

L2/Lb
Ca/C79

Cc/C80
Q2 Q4
Q6
B

N TA7 TB8 TB7 N

Figure 5.6 Implementation of a single-phase back-to-back converter

5.6 DC-DC-AC Converters


Some applications require DC-DC and DC-AC two-stage conversion. For example, a solar
power system often needs a DC-DC converter on the PV side to step up the voltage before
conversion with a DC-AC converter. The Kit can be configured to implement this conversion,
as shown in Fig. 5.5. Two separate controllers, but inside the same ControlCARD, are needed
for the DC-DC converter and the DC-AC inverter, respectively.

5.7 Single-Phase AC-DC-AC Back-to-Back Converters


The SYNDEM Kit can be used to implement AC-DC and DC-AC back-to-back conversion.
As shown in Fig. 5.6, the implementation only needs three legs, with a common neutral point
provided by the θ-converter. The three legs are controlled independently.

5.8 Three-Phase AC-DC-AC Back-to-Back Converters


Three-phase applications, such as wind power systems, frequency converters, and motor
drives, often require three-phase back-to-back converters. One SYNDEM Kit plus an
additional power board can be used to form such a three-phase back-to-back converter, as
shown in Fig. 5.7. Both power boards can be controlled through one control board.
46 Sample Conversion Topologies

P !"# %&'( %&'( !"# P

*+ + +
*
/+-*
L1/La L1/La
A
/-* A

0. 0.
AC input

AC output
L2/Lb L2/Lb
B W
$ $ W B
U *+ *+ U
C
L3/Lc
,-* ,-* L3/Lc C
.. 1 1 ..
EW 2$ EU %&') %&') EU 2$ EW
Ca

Cc
Cb

Ca
Cc

Cb
N P3456 %3768 9 P3456 %3768 # N

Figure 5.7 Implementation of a three-phase back-to-back converter

Figure 5.8 Texas Tech SYNDEM Microgrid that is built up with eight SYNDEM Smart Grid
Research and Educational Kits

5.9 100% Power Electronics-based Microgrid Testbeds


Because of the versatile reconfigurability of the Kit, it can be adopted to quickly build up
physical smart grid testing facilities. Figure 5.8 shows such a SYNDEM Microgrid facility
established at Texas Tech University.
This microgrid consists of renewable resources (including a wind turbine emulator and
a solar system emulator), energy storage system (batteries), a traditional generator, a utility
grid interface, and two flexible loads. The sources and loads are integrated through eight Kits
connected to a common AC bus. The set-up of the system was very quick so that the focus
was able to be paid on developing advanced control algorithms to guarantee an autonomous,
robust, and stable operation for the microgrid.
6
Hardware: Further Details
This Chapter provides some further details about the hardware.

6.1 Measurements and Signal Conditionings


6.1.1 Voltage, Current, and IGBT Temperature Sensing
In the Kit, differential amplifier circuits, as shown is Fig. 6.1(a), are adopted to measure
DC and AC voltages on the power board with operational amplifiers TL082. A differential
amplifier circuit has two inputs to provide the amplification of the voltage difference between
two points, i.e., Vin − Vref . The resistors in the two input channels are accurately and
symmetrically matched. Based on the equations of the operational amplifier
Vref − V1 V1 − Vout
= , (6.1)
R2 R1
Vin − V1 V1
= , (6.2)
R2 R1
there is
R1
Vout = (Vin − Vref ) (6.3)
R2
where R R2 is the amplification gain. This amplification gain can be lower than 1 or higher
1

R1
than 1 with different selection of R 2
.
Isolated current sensors, LEM LAH 25-NP, are adopted to measure both DC and AC
currents on the power board. LAH 25-NP is a compensated (closed-loop) multi-range current
transducer based on the Hall effect. According to the data-sheet1 of LAH 25-NP, the turns
ratio KN =0.002 is configured for the Kit, as shown in Fig. 6.1(b), where Pin-1 is the current
input, Pin-4/5 is the current output, Pin-2/3/6 should be connected together in the primary
circuit, and RM is the measuring resistor connected to Pin-Mo in the secondary circuit.
The output from the sensor is a current that is in proportion to the input current measured.
The current flows through the measuring resistor RM and the resulting voltage is processed
further. Therefore, the relationship between the output voltage Vout and the measured current
Iin is
Vout = KN RM Iin .
The IGBT temperature sensing is conducted by a voltage divider circuit, as shown in Fig.
3.11. The resistance-temperature curves2 of the IGBT built-in thermistor are shown in Fig.
1 https://www.lem.com/sites/default/files/products_datasheets/lah_25-np.pdf
2 https://www.st.com/resource/en/datasheet/a1p35s12m3-f.pdf

SYNDEM Smart Grid Research and Educational Kit User Manual


c 2021, Syndem LLC
48 Hardware: Further Details

(a) Voltage sensing (b) Current sensing

Figure 6.1 Voltage and current sensing

(a) Resistance-temperature curve (b) Zoom-in curve

Figure 6.2 Resistance-temperature characteristics of the IGBT built-in thermistor

6.2. The resistance-temperature relationship is highly nonlinear, which can be easily noticed
from the logarithmic coordinate on the resistance in Fig. 6.2(a). It can be found that at 25◦ C,
the resistance is R25 = 5000 Ω, and at 100◦ C the resistance is R100 = 500 Ω, which is used
as the threshold for protecting the IGBT. When R25 = 5000 Ω, the output voltage sent to the
control board is 2.9 V, and when R100 = 500 Ω, the output voltage is 8 V.

6.1.2 Parameters of ADC Channels


Most signals measured on the power board have both positive and negative values except
DC voltages, DC currents, and the IGBT temperature. For example, AC voltages and AC
currents are sinusoidal signals. However, the TI C2000 TMS320F28335 ControlCARD can
only receive valid ADC signals within 0 V ~ 3 V.
Hardware: Further Details 49

The relationship between digital value reading and ADC input voltage for the TI C2000
TMS320F28335 ControlCARD is derived as

 0,
 when input voltage ≤ 0 V
Digital value reading = 4096 × Input voltage
3
- ADCLO
, when 0 V < input voltage < 3 V

4095, when input voltage ≥ 3 V

where the number 4096 represents the 12-bit ADC used in the ControlCARD and ADCLO
is usually set at 0. The corresponding ADC gain is 4096/3. In order to match the signals
between the measurements on the power board and the ADC inputs for the TI C2000
TMS320F28335 ControlCARD, the measured signals are further conditioned on the control
board. For example, the measurements for AC voltages and AC currents should be further
amplified, with the zero point of these signals shifted to the circuit offset, which is 1.5 V. The
measurements for DC voltages, DC currents, and the temperature also need to be amplified
and sometime shifted as well, e.g., for negative DC currents. The amplification gains of the
control board and the power board for the analog signals are shown in Table 6.1. Therefore,
the relationship between the ADC input voltage and the measured signal can be represented
as
Circuit Measured Gain on Gain on
ADC input voltage = + × ×
offset signal power board control board,
where the circuit offset is 1.5V or 0V depending on the signal measured. The digital value
reading contains an ADC offset corresponding to the circuit offset, which is 2048 for a 1.5V
circuit offset or 0 for a 0V circuit offset, and can be represented as
Digital value reading = ADC offset + Measured signal × Total gain
with the total gain given by
Gain on Gain on
Total gain = × × ADC gain.
power board control board
When developing the software codes, the measured signal can be calculated as
Measured signal = (Digital value reading − ADC offset) /Total gain. (6.4)
This equation is applicable to all measured signals with linear properties, e.g., for AC
voltages, AC currents, DC currents, and DC voltages. In practice, the total gains and ADC
offsets should be further calibrated in order to obtain accurate measurements. It is worth
noting that Equation (6.4) and Table 6.1 still hold when the measurements of AC voltage and
AC currents are conducted for DC applications.
Based on the IGBT thermistor resistance at the room temperature 25◦ C and the protection
threshold at 100◦C, and the amplification gains in Table 6.1, the digital value reading and the
IGBT temperature at these two characteristic points are shown in Table 6.2. This relationship
can be further linearized as
IGBT temperature = Digital value reading × 0.0306769 − 16.6666667. (6.5)
Note that this relationship is only indicative because of the non-linearity. If the threshold is
moved up, damages to the IGBT may occur.
50
Hardware: Further Details
Table 6.1 Signal conditioning parameters for analog measurements
Measurement Gain on Gain on Circuit ADC
ADC gain Total gain
signals power board control board offset offset
AC voltage va , vb ,vc , vg 0.0201 -0.19675000 1.5 V 4096/3 -5.3994496 2048
AC currents ia , ib ,ic 0.4990 -0.19675000 1.5 V 4096/3 -134.0460373 2048
DC current idc 0.4990 -0.19675000 1.5 V 4096/3 -134.0460373 2048
DC voltage vdc 0.0201 0.31000000 0 4096/3 8.507392 0
IGBT Temperature 1 0.34818177 0 4096/3 475.3841805 0
Note: 1. The reciprocal of a total gain can be used for software development;
2. Both the total gain and the ADC offset should be calibrated to achieve accurate measurements.
Hardware: Further Details 51

Table 6.2 Characteristic points of the IGBT temperature


IGBT Thermistor Output voltage on
Digital value reading
Temperature resistance power board
25 ◦ C 5000 Ω 2.9 V 1358
100 ◦ C 500 Ω 8.0 V 3803

Figure 6.3 Typical protection circuit

6.1.3 Voltage, Current, and IGBT Temperature Protection


The protection functions for voltages, currents, and the IGBT temperature are designed on
the control board, as shown in Fig. 3.4. A typical protection circuit is shown in Fig. 6.3 with
a comparator, e.g., an LM193. If the input voltage Vin is higher than the high threshold or
lower than the low threshold, the fault output is activated to trigger the protection function.
The hardware protection thresholds for each signals are shown in Table 6.3. Note that all
protection thresholds are set for peak values, not RMS values. In addition to these protection
functions implemented in hardware, protection functions should also be implemented in the
control software, with narrower thresholds than the hardware protection thresholds in Table
6.3.

6.1.4 Calibration of ADC Channels


As discussed in Subsection 6.1.2 and Table 6.1, both the total gains and the zero-point ADC
offsets should be calibrated in order to achieve accurate measurements. The error of the ADC
offset is usually affected by two factors: one is the offset error of the measurement circuit
cased by the power supplies, chip offsets, etc. and the other is the offset error of the ADC
in TI C2000 ControlCARD. In practice, AC measurements often present larger offset errors
than DC measurements. It is critical to calibrate ADC offsets for zero points. The error of
the total gain is usually affected by the accuracy of the resistors, the accuracy of the chips,
etc. Since highly accurate resistors and highly accurate chips are used in the design of the
52 Hardware: Further Details

Table 6.3 Protection thresholds for the Kit


Measured signal Protection threshold
va , vb , vc , vg −355 V ~ +355 V
ia , ib , ic −14.5 A ~ +14.5 A
Idc −14.5 A ~ +14.5 A
Vdc ≤ +450 V
IGBT temperature 100◦ C

Note: These protection functions are applicable to signals on Power Board A/B.
All protection thresholds are set for peak values.

Figure 6.4 The wiring configuration for zero-point ADC offset calibration

measurement circuits on the power board and the control board, the calibration for the total
gains is often not necessary unless high accuracy is needed.
It is worth noting that all voltage and current measurements should be calibrated. Since
the IGBT temperature measurement is only indicative, there is no need to calibrate it. Users
can check the temperature reading at the room temperature based on (6.5) to test the IGBT
temperature measurement and monitor the temperature during operations.
Before calibrating ADC channels, the software tools described in Section 4 should have
been installed and an USB RS485 adapter mentioned in Subsection 3.4 is available for use.

6.1.4.1 Calibration of ADC Offsets


The ADC offset calibration can be done via open-circuiting current sensors and short-
circuiting voltage sensors without having any voltage on the DC bus or the power terminals.
For example, the main circuit of the power board can be configured, as shown in Fig. 6.4, with
wire connections as T D2 − T E2, T E2 − Bus−, T A3 − T A7, T B3 − T B7, T C2 − N ,
T C1 − N , T A1 − T C1. Here “-” means connecting the two terminals with a banana wire.
Jumper J4 needs to be configured as either the grid phase voltage measurement or the grid
line-line voltage measurement. An USB RS485 adapter mentioned in Section 3.4 is required.
Hardware: Further Details 53

Table 6.4 List of measured signals and ADC channels


Measured signals ADC channel Measurement signals ADC channel
va in power board B B0 ic in power board B B5
vb in power board B B1 idc in power board B B6
vc in power board B B2 vdc in power board B B7
ia in power board B B3 vg in power board B A3
ib in power board B B4 IGBT temperature A4

A set of demo codes including three files are provided for this:
• ADC_Offset_Calibration_Demo_Code_2015b.slx (software code for TI TMS320F28335
ControlCARD)
• Host_RS485_ADC_Offset_Calibration_2015b.slx (GUI file under Simulink environ-
ment)
• ADC_Offset_Calibration_results.m (Post-processing of ADC offset results)
These three files are located in ..\Edu_Kit_Manual\demo_codes\ADC_offset_calibration.
These demo codes considers the case with Power Board B connected to the control board
(by default). Users can expand the codes for the case with two power boards connected to one
control board if needed. The analogue outputs of the power board are connected to Connector
J3 on the control board by default. The GPIO63 is set to a logic low level to use Group C, as
shown in Fig. 3.3. The relationships between the measurement signals and the ADC channels
are discussed in Table 7.2. In these demo codes, nine offsets for ADC channels B0~B7 and
A3 are calibrated, with the IGBT temperature observed through ADC channel A4 based on
equation (6.5).
Here are the procedures to calibrate ADC offsets:
1. Double check the wire configurations in Fig. 6.4.
2. Power OFF the Kit.
3. Connect the Kit, XDS100V2 USB JTAG Emulator, and the host computer, with one
end of the JTAG Emulator connected to J109 connector on the control board of the Kit
and the other end connected to a USB port on the host computer. Note that the Kit must
be Powered OFF, before connecting or disconnecting the JTAG Emulator.
4. Connect the USB RS485 adapter between the Kit and the host computer, with the
communication end of the USB RS485 adapter connected to Pin 14/15 of Connector
J5 on the control board and the USB end connected to the host computer.
5. Power ON the Kit through the 3-pin standard AC power cord with a single-phase
120/240 Vrms, 50/60 Hz source.
6. Open MATLAB/Simulink code “ADC_Offset_Calibration_Demo_Code_2015b.slx”,
and press “Ctrl+B” on the keyboard to download the software code to the Kit. Further
information about downloading the software code can be found in Section 4.2.
7. After downloading the software code, open “ADC_Offset_Calibration_Host_RS485_
2015b.slx”, and configure the right COM port for the USB RS485 adapter on both
modules of “Serial Configuration” and “Serial Receive”, as shown in Fig. 6.5.
54 Hardware: Further Details

Figure 6.5 GUI for RS485 communication

Note: This figure was kindly provided by Texas Tech University, which is greatly appreciated.

8. Press “Ctrl+L” on the keyboard to RUN “Host_RS485_ADC_Offset_Calibration_2015b.slx”


GUI file. The ADC data at both ADC A channels and ADC B channels are then dis-
played.
9. The GUI file stops after running for 100 s and an variable named “ADC” is stored in
the MATLAB workspace. Save this “ADC” variable if needed. The Kit can be powered
OFF.
10. Run ADC_Offset_Calibration_results.m to obtain the calibrated ADC offsets for ADC
channels B0~B7 and A3, and save the values for future use.
11. Update the calibrated ADC offsets in other software codes.

6.1.4.2 Calibration of Total Gains


Though the calibration for the total gains is not necessary for most cases, here are some
details about calibrating of total gains.
The following tools are required for calibrating total gains:

• Standard DC voltage source


• Standard DC current source
• USB RS485 adapter.

Before calibrating total gains, the ADC offsets should be calibrated first. Unlike the wiring
configuration in Fig. 6.4 for the ADC offset calibration, most wires should be removed for
Hardware: Further Details 55

Figure 6.6 Wiring configuration for total gain calibration with most wires removed

total gain calibration. Fig. 6.6 illustrates the wiring diagram for calibrating the total gain of
the DC-bus voltage vdc sensor, where only one wire is needed to connect the T E2 and Bus−
terminals.
The following two files designed for a topology of a DC-DC-AC conversion can be used
to demonstrate the total gain calibration:
• SYNDEM_Educational_Kit_demo_code_HV250V_2015b.slx (software code for TI
TMS320F28335 ControlCARD)
• Host_RS485_for_demo_code_2015b.slx (GUI file under Simulink environment)
These files are located in ..\Edu_Kit_Manual\demo_codes\DC_to_DC_to_AC\.
Here are the procedures to calibrate the total gain of a current sensor3 :
1. Double check the wire configurations in Fig. 6.6.
2. Power OFF the Kit.
3. Connect the Kit, XDS100V2 USB JTAG Emulator, and the host computer, with one
end of the JTAG Emulator connected to J109 connector on the control board of the Kit
and the other end connected to a USB port on the host computer. Note that the Kit must
be Powered OFF, before connecting or disconnecting the JTAG Emulator.
4. Connect the USB RS485 adapter between the Kit and the host computer, with the
communication end of the USB RS485 adapter connected to Pin 14/15 of Connector
J5 on the control board and the USB end connected to the host computer.
5. Power ON the Kit through the 3-pin standard AC power cord with a single-phase
120/240 Vrms, 50/60 Hz source.
6. Open MATLAB/Simulink code “SYNDEM_Educational_Kit_demo_code_HV250V
_2015b.slx”, and update the calibrated ADC offsets in this code.
7. Press “Ctrl+B” on the keyboard to download the software code to the Kit.
8. Power OFF the Kit, and connect wires for the current sensor to be calibrated. For
example, if sensor IA is to be calibrated, then the output of the standard DC current
source should be connected to terminal T A4 and terminal T A5.
3 Note that the total gain calibration for ic may not be available on some Kits.
56 Hardware: Further Details

9. Power ON the Kit, and inject the current through sensor IA through the standard DC
current source. The direction of the injected current should be consistent with the
application. By default, the ADC reading in the demo code corresponds to a current
flowing from terminal T A4 to terminal T A5.
10. Open MATLAB/Simulink file “Host_RS485_for_demo_code_2015b.slx”, and config-
ure the right COM port for USB RS485 adapter on both blocks of “Serial Config-
uration” and “Serial Receive”. This step may be skipped if the COM port is already
configured properly.
11. Press “Ctrl+L” on the keyboard to RUN “Host_RS485_ADC_Offset_Calibration_2015b.slx”
GUI file. The corresponding current ia is then displayed.
12. Compare the current reading on the standard DC current source and the reading on the
Simulink GUI, the correcting coefficient for ia can be obtained as

kia = Reading on Simulink GUI/Reading on standard DC current source.

Then, the total gain in Table 6.1 for ia measurement should be updated by multiplying
it with this coefficient kia . This should be updated in future applications as well.

Similarly, the total gain calibration of a voltage sensor can be done as follows:

1. The same procedures from Step 1 to Step 7 in total gain calibrations for currents to
download the demo code to the Kit;
2. Power OFF the Kit, and connect the wires for the target voltage measurement. For
example, if the DC-bus voltage vdc measurement is to be calibrated, the output of the
standard DC voltage source can be connected to terminal T D2 and terminal Bus−.
In this case, an additional wire is needed to connect the T E2 and Bus− terminals,
as shown in Fig. 6.6. Note also that the terminal T D2 should be connected to the
positive terminal of the standard DC voltage source and the terminal Bus− should be
connected to the negative terminal of the standard DC voltage source.
3. Power ON the Kit, and supply the voltage to the DC-bus capacitor, C76, through the
standard DC voltage source.
4. Open MATLAB/Simulink file “Host_RS485_for_demo_code_2015b.slx”, and config-
ure the right COM port for USB RS485 adapter on both blocks of “Serial Config-
uration” and “Serial Receive”. This step may be skipped if the COM port is already
configured properly.
5. Press “Ctrl+L” on the keyboard to RUN “Host_RS485_ADC_Offset_Calibration_2015b.slx”
GUI file. The corresponding voltage vdc is then displayed.
6. Compare the voltage reading on the standard DC voltage source, and the reading on
the Simulink GUI, the correcting coefficient for vdc can be obtained as

kvdc = Reading on Simulink GUI/Reading on standard DC voltage source.

Then the total gain in Table 6.1 for vdc measurement should be updated by multiplying
it with this coefficient kvdc .This should be updated in future applications as well.
Hardware: Further Details 57

Figure 6.7 Equivalence of a 5V signal with a 10 V (ON) and 0 V (OFF) PWM signal

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
(a) With 25% duty cycle
1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
(b) With 50% duty cycle
1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
(c) With 75% duty cycle

Figure 6.8 Pulse width modulation with different duty cycles

6.2 PWM Settings


Pulse width modulation (PWM) is a technique to use a digital signal to represent an analogue
signal based on the average amplitude during a switching period. For example, a 5 V voltage
signal can be represented by a PWM signal with an ON level of 10 V for 50% of the time
and an OFF level of 0 V by 50% of the time, as shown in Fig. 6.7. The ratio of the ON time
to the period is the duty cycle of the PWM signal. Fig. 6.8 shows PWM signals with different
duty cycles.
58 Hardware: Further Details

+
S1 S3

A
ܸௗ ‫ݒ‬஺஻
B

S2 S4

-
Figure 6.9 A single-phase power inverter

-1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

1
S1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

1
S3

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Vd
v AB

-V d
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Figure 6.10 Waveforms of bipolar SPWM

6.2.1 Sinusoidal Pulse Width Modulation (SPWM)


Fig. 6.9 shows a single-phase power inverter with an AC voltage output, where S1 ∼ S4
are four semiconductor switches. In order to provide a sinusoidal voltage output, a desired
clean sinusoidal signal, called the modulating signal, can be compared with a triangular
carrier wave at a switching frequency much higher than the frequency of the modulating
Hardware: Further Details 59

-1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

1
S1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

1
S3

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Vd
v AB

-V d
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Figure 6.11 Waveforms of unipolar SPWM

signal to generate a train of pulses, as shown in Fig. 6.10, where the drive signals for high-
side switches, S1 and S3 , are demonstrated,. The low-side switches, S2 and S4 should be
operated complementarily with the high-side switches, S1 and S3 , respectively. The output
voltage VAB shown in Fig. 6.10 is a PWM output voltage. When the carrier frequency, i.e.,
the switching frequency, is high enough, then the harmonic components in vAB can be easily
filtered out to obtain a clean sinusoidal voltage output via a low-pass filter, which is often an
LC or LCL filter. The frequency of the modulating signal determines the frequency of the
output voltage and its amplitude controls the RMS value of the output voltage. As a result,
the amplitude and frequency of the output voltage can easily be changed by controlling the
modulating signal.
In Fig. 6.10, since the waveform of vAB switches between positive and negative DC
voltages on both positive half and negative half cycles, this SPWM scheme is bipolar.
The bipolar PWM only uses one sinusoidal modulating wave and the high-side switches
S1 and S3 also work in a complementary way. There are some disadvantages of bipolar
PWM technique, such as, high harmonics, high switching loss, etc. A unipolar PWM
scheme can be used to mitigate these disadvantages. As shown in Fig. 6.11, it uses two
180 degree phase shifted sinusoidal signals with the same magnitude and frequency as
modulating signals. These two modulating signals are compared with a common triangular
60 Hardware: Further Details

Figure 6.12 Configuration of the ePWM block

carrier wave to generate gating signals for the two legs respectively, where drive signals for
high-side switches, S1 and S3 , are demonstrated in Fig. 6.11. Unlike the bipolar PWM in
Fig. 6.10, S1 and S3 do not work in a complementary way in unipolar PWM. It can be
observed that the waveform of vAB switches either between zero and Vd during positive
half cycle, or between zero and −Vd during negative half cycle, thus this SPWM technique
is called unipolar PWM. Note that in both bipolar PWM and unipolar PWM, the high-
side switch and the low-side switch on the same leg are operated in a complementary
way. Although both bipolar PWM and unipolar PWM can be easily implemented in the
Kit, the unipolar PWM is suggested for software code development. This is used in the
provided demo codes, “SYNDEM_Educational_Kit_demo_code_HV100V_2015b.slx” and
“SYNDEM_Educational_Kit_demo_code_HV250V_2015b.slx”.
The implementation of PWM can be achieved through the configuration of ePWM block
through MATLAB/Simulink environment for TI C2000 ControlCARD, as show in Fig. 6.12.
For example, in the demo codes, “SYNDEM_Educational_Kit_demo_code_HV100V_2015b.slx”
and “SYNDEM_Educational_Kit _demo_code_HV250V_2015b.slx”, ePWM6 is configured
for a bi-directional boost-buck DC-DC converter, and ePWM4 and ePWM5 are configured
with unipolar SPWM. If users want to change PWM configurations, please follow the
guidelines of PWM settings for TI TMS320F28335 microcontroller, which can be found at
http://www.ti.com/lit/ug/sprug04a/sprug04a.pdf, or contact SYNDEM, LLC for further in-
formation.

6.2.2 Dead-band Setting for the IGBT Module


Whichever PWM scheme is adopted, it is very important to avoid the short circuit of the DC
bus when both the high-side switch and the low-side switches are ON. The parasitics in the
Hardware: Further Details 61

H
Upper switch
gate signal ON OFF ON
L

Lower switch H
gate signal OFF ON OFF
L

Deadband Deadband

Figure 6.13 Deadband for complementary PWM signals

Figure 6.14 Deadband settings for the IGBT module

drive circuits and the IGBT internal circuits cause turn-on and turn-off delays during IGBT
switching. These delays may cause short circuit of the DC bus, which may cause over-current
or even damages. In practice, a dead band can be inserted into the high-side and low-side drive
signals, as shown in Fig. 6.13.
This dead-band can be configured in the ePWM block through MATLAB/Simulink
environment, as shown in Fig. 6.14. In the demo codes, the dead-band is set with 375 clock
cycles. According to the 150 MHz clock frequency of TI TMS320F28335 microcontroller,
62 Hardware: Further Details

Figure 6.15 An LC filter

the dead-band time can be calculated as


1
× 375 clock cycle = 2.5µs.
150 MHz
Note that if a smaller dead-band is required, please contact SYNDEM, LLC for further
information. If a single IGBT is used, i.e., when the high-side switch or the low-side switch
is disabled, the dead-band is not required.

6.3 LC Filters
As shown in both Fig. 6.10 and Fig. 6.11, the voltage output vab from the IGBT terminals are
PWM signals, which is full of harmonics. The harmonic components around the switching
frequencies can be filtered out via a low-pass filter. An LC or LCL filter is often used for
this purpose. The Kit is equipped with three LC filters, as shown in Fig. 6.15. The cut-off
frequency is very important for the design of the LC filter, which should be much smaller
than the switching frequency.
The cut-off frequency fc of the LC filter is
1
fc = √ (6.6)
2π LC
For example, the inductance of the inductor on the power board is around L = 1.5 mH when
loaded and the AC capacitor has a capacitance of C = 20 µF. The cut-off frequency can be
calculated as
fc = 918.88 Hz.
With a switching frequency usually selected at 20 kHz, the cut-off frequency of the LC filter
is much smaller than the switching frequency and the harmonics in the output voltage are
expected to be low. Note that users can reconfigure the filters in the Kit if needed by putting
them in parallel or in series, while not exceeding the voltage and current ratings.

6.4 Pre-Charging Circuit


Because of a large capacitance on the DC bus of the Kit, the direct connection of a DC source
or a battery to the DC bus is forbidden. It is recommended to use an adjustable DC source or
a pre-charging circuit.
Hardware: Further Details 63

Figure 6.16 Charging a capacitor without a pre-charging resistor

Figure 6.17 Charging a capacitor with a pre-charging resistor

Figure 6.18 Charging the DC-bus capacitors through the on-board pre-charging resistor with a battery

Fig. 6.16 illustrates the situation when a battery or a DC source is connected to a capacitor
through a main circuit breaker. The initial state of the capacitor can be treated as short-
circuited with 0 resistance. When the main circuit breaker is closed, a very large inrush
current appears, which may damage the battery, the capacitor, the wires, and the main circuit
breaker. For the Kit, the main circuit breaker is a relay with a DC current rating of 10 A. The
direct turn-on of the relay can easily damage the relay permanently.
In order to handle this inrush current, a 5.1 kΩ pre-charging resistor is provided on the
64 Hardware: Further Details

Capacitor voltage (V)


Capacitor current (A)
0.05 300
250
0.04
200
0.03 150
0.02 100
0.01 50
0 0
0 5 10 15 20 25 30 0 5 10 15 20 25 30
Time (s) Time (s)
(a) Capacitor current (b) Capacitor voltage

Figure 6.19 The capacitor current and voltage during the pre-charging process

power board and it should be used whenever possible. As shown in Fig. 6.17, when a battery
or a DC source needs to be connected to a capacitor, the external circuit breaker can be closed
at first with the main circuit breaker remained open. The battery charges the capacitor through
the pre-charging resistor and the capacitor voltage increases during the pre-charging process.
When the pre-charging process is close to be finished, the main circuit breaker can be closed.
Note that it is not necessary to have an additional external circuit breaker in some cases. The
switches of the DC source or the battery can serve the purpose.
Through this pre-charging process, the charging current of the capacitor is limited by the
pre-charging resistor. For the R = 5.1 kΩ pre-charging resistor provided on board, if a 250
V battery needs to be connected to the DC bus with the two parallel DC-bus capacitors (total
940 µF), then the pre-charging resistor can be connected as shown in Fig. 6.18. The initial
charging current can be calculated as
250 V
i(0) = ≈ 0.049 A.
5.1 kΩ
The decrease of the charging current and the increase of the capacitor voltage from initial
states are shown in Fig. 6.19 based on a simulation conducted in MATLAB/Simulink. Note
that after 11 s, the charging current reduces to 10% of the initial current, and the capacitor
voltage reaches 90% of the battery voltage. The main circuit breaker can then be turned ON.
7
Quick Start with a DC-DC-AC
Converter
This quick start illustrates how the Kit is adopted to build up a DC-DC-AC converter with a
100 V DC-bus voltage and a 250V DC-bus voltage. The following three files are provided:

• SYNDEM_Educational_Kit_demo_code_LV100V_2015b.slx: software code for TI


TMS320F28335 ControlCARD with a 100 V DC-bus voltage
• SYNDEM_Educational_Kit_demo_code_HV250V_2015b.slx: software code for TI
TMS320F28335 ControlCARD with a 250 V DC-bus voltage
• Host_RS485_for_demo_code_2015b.slx: GUI file for Simulink to monitor the
operation

These files are located in ..\Edu_Kit_Manual\demo_codes\DC_to_DC_to_AC\.


The users are strongly advised to read this chapter carefully to understand the demo codes
before conducting any experiments.

7.1 Hardware Setup


Fig. 7.1 shows the topology of a DC-DC-AC conversion system with a DC or PV input
and an AC output. In this topology, the W-leg of the IGBT module and inductor L1 /La are
configured as a bi-directional boost/buck DC-DC converter, with the boost conversion from
Terminal A to the DC bus and the buck conversion from the DC bus to Terminal A. The
V-leg/U-leg of the IGBT module and inductors L2 /Lb and L3 /Lc are configured as an H-
bridge DC-AC converter. The demo codes will control this topology to convert the power
from the DC/PV input at Terminal A to a higher voltage on the DC bus and then convert the
power from the DC bus to the AC output. The same configuration can be easily adapted for
reverse applications, e.g. battery storage systems.
The main circuit of the power board is configured , as shown in Fig. 7.2, with the following
wiring connections:

• Bus+: T D3 − T D1, T D6 − T D5
• Bus-: T E6 − Bus−
• DC-bus capacitors: T D5 − T D2, T D6 − T E1, and T E2 − Bus−
SYNDEM Smart Grid Research and Educational Kit User Manual
c 2021, Syndem LLC
66 Quick Start with a DC-DC-AC Converter

Figure 7.1 Topology of a DC-DC-AC conversion

Figure 7.2 Hardware configuration for the topology of the DC-DC-AC conversion

• W-leg: T A6 − T A5, T A3 − T A1, and T A7 − Bus−


• V-leg: T B6 − T B5, T B8 − T B3, and T B3 − N
• U-leg: T C2 − T B7.
Note that these wires are connected by default when the Kit is delivered. Users just need to
double check whether the wire connections are loose or not because of the delivery before
conducting experiments.
The voltage levels and main system parameters are shown in Table 7.1 for the two
cases with different DC-bus voltages. The host graphical user interface (GUI) file, namely
Host_RS485_ for_demo_code_2015b.slx, can be used for both the low-voltage and the high-
voltage cases.
The following equipments or materials are required to run the Kit with the demo codes:
• A DC source (preferably adjustable) or a PV source: 200 V, 5 A;
• Power resistors: For the low-voltage case, the resistance is higher than 10 Ω and, for
the high-voltage case, the resistance is higher than 24 Ω. A 30 Ω ~ 50 Ω, 500 W, power
resistor is suggested for both cases. If other resistance values are used, the users should
make sure the output current does not exceed 5A and the power dissipation does not
exceed the rating of the resistor, based on the AC output voltage.
Quick Start with a DC-DC-AC Converter 67

Table 7.1 Voltage levels and main system parameters


Case DC/PV input voltage DC-bus voltage AC output Output power
50 Vrms ,
Low-voltage 50~80 Vdc 100 Vdc ≤250 W
60 Hz
120 Vrms ,
High-voltage 140~200 Vdc 250 Vdc ≤ 600 W
60 Hz

Figure 7.3 System Setup with the Kit to run demo codes

• Oscilloscope: The voltage probe can measure up to 250 V.


• USB RS485 adapter: The order link can be found in Section 3.4.

The connections of the system with the Kit to run the demo codes are shown in Fig. 7.3,
where

• The Positive and Negative terminals of the DC/PV source are connected to Terminal A
and Terminal Bus-, respectively, of the Kit;
• The resistor load is connected to Terminal C and Terminal N;
• The connection between the Kit and PC is through an USB RS485 adapter.

Note that if a PV source is used, the users are suggested to add an external switch between
the PV source and the Kit.

7.2 Software Setup


The most parts of the software codes for the low-voltage and the high-voltage cases are the
same, except different voltage reference settings for the DC voltage and the AC voltage. The
demo codes are designed with the following hardware settings:

• J3 Analog B on the control board is used for ADC measurements;


• J7 PWM B on the control board is used for PWM outputs.
68 Quick Start with a DC-DC-AC Converter

Table 7.2 Measured signals and ADC channels


ADC channel Measured signals Comments
B0 va on power board DC/PV input voltage vpv
B1 vb on power board Negative value of vc
B2 vc on power board AC output voltage vac
B3 ia on power board DC/PV input current ipv
B4 ib on power board Negative value of ic
B5 ic on power board AC output current iac
B6 idc on power board DC-bus input current idc
B7 vdc on power board DC-bus voltage vdc
A3 vg on power board N/A
A4 IGBT temperature IGBT temperature

Figure 7.4 Controller for the DC-DC converter

The relationships between measured signals and ADC channels are shown in Table 7.2.
PWM-6A/B is configured for the bi-directional boost-buck DC-DC converter; and PWM-
4A/B and PWM-5A/B are configured with unipolar SPWM for the DC/AC converter. The
PWM frequencies for both the DC-DC converter and the DC-AC converter are 20 kHz.
For the bi-directional boost-buck DC-DC converter, a proportional-integral (PI) controller
is adopted to control the DC-bus voltage. Furthermore, in order to mitigate the effect of
the second-order harmonics (120 Hz) from the DC-AC converter side on the input side, a
resonant controller is adopted to eliminate the harmonics in the input current passing through
L1 /La . The final controller for the bi-directional boost-buck DC-DC converter is shown in
Fig. 7.4, where the PI controller can be expressed as
Z
uP I = kpdc (vdc−ref − vdc ) + kidc (vdc−ref − vdc )dt.

2ξhωs
The main part of the resonant controller is a resonant filter s2 +2ξhωs+(hω)2 shown in Fig.
7.4.
Quick Start with a DC-DC-AC Converter 69

Table 7.3 Discrete implementation of filters


Filter s-domain z-domain
12π 0.002819z+0.002819
Low-pass filter s+12π z−0.9944
4.8πs 0.002255z−0.002255
Resonate filter s2 +4.8πs+(240π)2 z 2 −1.985z+0.9977

Figure 7.5 Codes for DAC outputs

For the control of the DC-AC converter, a closed-loop controller based on the integral
controller Z
Uac−ref = kiac (vrms−ref − vrms )dt

is adopted to control the magnitude of the AC voltage while the frequency of the AC voltage
is set as 60 Hz without being controlled. The sampling time for the main controller is 0.15
ms or the sampling frequency is 20/3 kHz. The sampling time of the RS485 communication
is 50 ms.
Note that filters are very important in software code development. For example, a low-pass
filter can be used after the calculations of real power, reactive power, and root mean square
(RMS) values to filter out the high-order harmonics (at 120 Hz and above). Low-pass filters
with a 6 Hz cut-off frequency are used in the demo codes. For the resonant filter adopted
for the DC-DC converter control in Fig. 7.4, a “c2d” function in MATLAB can be used to
convert the transfer function in the s-domain into the discretized form, as shown in Table 7.3.
Other methods can be used to discretize controllers as well.
The Kit is equipped with four 12-bit DAC channels on the control board to convert a digital
signal of 0 ~ 4095 to an analogue signal of -5 V ~ +5 V. Any signals in the controller, whether
measured or calculated, can be sent out through these channels for display on an oscilloscope,
without using differential probes. This is a very powerful function for developing new control
algorithms and should be mastered. The relevant code is shown in Fig. 7.5. The users are
suggested to normalize the output data to the range of -1 ~ +1, following the settings shown
in Fig. 7.5. The detailed descriptions for the 4 DAC output signals in the demo codes are
shown in Table 7.4. Note that only one channel is refreshed in each control sampling period,
which means the sampling frequency of the DAC channels is 1/4 of the controller sampling
frequency. For the demo codes, the DAC sampling frequency is 1.667 kHz.
70 Quick Start with a DC-DC-AC Converter

Table 7.4 Description of the four DAC outputs for the demo codes
DAC Channel DAC signal
Channel 1 Digital counter of 0 ~ 59, with a 0 V ~ 5V DAC output
Channel 2 DC/PV input current ipv
Channel 3 DC-bus voltage vdc
Channel 4 AC output voltage vac

Table 7.5 Settings of the RS485 communication


RS485 setting Parameters
Baud rate 19200
Data bits 8
Stop bits 1
Parity mode Even
Data byte order Little Endian

Table 7.6 Dataframe of the RS485 communication


Numbers Definition Comments
1 Header ‘S’, uint8
2 Free counter uint16
3 PV voltage 0.1 factor, uint16
4 PV current 0.1 factor, uint16
5 PV power 0.1 factor, uint16
6 AC RMS voltage Vc 0.1 factor, uint16
7 AC RMS voltage Vb 0.1 factor, uint16
8 AC RMS current Ic 0.1 factor, uint16
9 AC RMS current Ib 0.1 factor, uint16
10 AC real power 0.1 factor, -1000 offset, uint16
11 AC reactive power 0.1 factor, -1000 offset, uint16
12 DC voltage 0.1 factor, uint16
13 DC input current 0.1 factor, uint16
14 IGBT temperature 0.1 factor, uint16
15 Error code 0.1 factor, uint16
16 Terminator ‘E’, uint8
Quick Start with a DC-DC-AC Converter 71

The Kit is also equipped with the RS485 communication interface, which can be used to
send operational data of the system from the controller to other terminals, e.g., a GUI file
based on the Simulink environment. The settings for the RS485 communication are shown in
Table 7.5, with the dataframe shown in Table 7.6. The unsigned integer type data is usually
used for communication, with the header and the terminator in 8-bit integer type (uint8).
The other signals are with 16-bit integer type (int16) data. Note that the sampling time of
RS485 communication is only 50 ms. Therefore, most of time, the RS485 communication
only can be used to transfer DC signals or low-frequency AC signals. Still remember the
Shannon sampling theorem? Any high-frequency signals cannot be shown properly through
the RS485.
The Kit based on the demo codes for both cases can be started by pressing the manual boat
switch on the main case because it is connected in parallel with Switch S1, as shown in Table
3.9 and Table 3.5. It is programmed to be able to

• start the DC-DC converter to regulate the DC-bus voltage when the DC/PV input
voltage vpv > 40 V for the low-voltage case or vpv > 130 V for the high-voltage case;
• start the DC-AC converter to regulate the AC output voltage when the DC-bus voltage
vdc > 85 V for the low-voltage case or vdc > 235 V for the high-voltage case.

The demo system can be turned OFF by turning OFF the boat switch.

7.3 Operation and Results


The users can operate the Kit with the demo code according to the following procedures:

1. Double check the wire connections according to Fig. 7.2.


2. Power OFF the Kit.
3. Connect the Kit, XDS100V2 USB JTAG Emulator, and the host computer, with one
end of the JTAG Emulator connected to J109 connector on the control board of the Kit
and the other end connected to a USB port on the host computer. Note that the Kit must
be Powered OFF, before connecting or disconnecting the JTAG Emulator.
4. Connect the USB RS485 adapter between the Kit and the host computer, with the
communication end of the USB RS485 adapter connected to Pin 14/15 of Connector
J5 on the control board and the USB end connected to the host computer.
5. Connect the DC source and the AC load, as shown in Fig. 7.3. If a PV source is used,
an external switch is suggested to be connected between the PV source and the Kit.
6. Power ON the Kit and download the low-voltage demo code. Further information about
downloading the software code can be found in Section 4.2.
7. Power OFF the Kit.
8. Disconnect the XDS100V2 USB JTAG Emulator.
9. Power ON the DC source. Then tune the DC input voltage to 60 V for the low-voltage
scenario or another voltage value within the range in Table 7.1. If a PV source with
proper input voltage is used, just turn on the external switch to connect the PV source.
72 Quick Start with a DC-DC-AC Converter

Output voltage [50V/div] Output voltage [50V/div]

(a) (b)

Figure 7.6 AC output voltage of the Kit with the demo codes: (a) Low-voltage case. (b) High-voltage
case.

10. Turn ON Switch S1 through the boat switch on the main case. Note that either the boat
switch on the main case or Switch S1 on the control board can be used. The one not in
use should be turned OFF.
11. Use an oscilloscope with voltage probes to measure the output voltage. If the Kit runs
normally, the AC output voltage in the low-voltage case should be 50 Vrms 60 Hz, as
shown in Fig. 7.6(a). Note that the voltage probes can be pre-connected before Step 6
for safe operation.
12. Use the oscilloscope with voltage probes to measure the DAC outputs. If the Kit runs
normally, the four-channel DAC outputs should be similar to the results shown in Fig.
7.7. Note that the small steps in both the counter and the AC output voltage via the DAC
are consistent with the DAC sampling frequency 1.667 kHz. If the sampling time of the
main controller can be decreased then the DAC output performance can be improved.
13. Run the GUI file Host_RS485_for_demo_code_2015b.slx in the Simulink environment
to monitor the real-time system operation, as indicated in Table 7.6. The results should
be similar to those shown in Fig. 7.9(a).
14. The following procedures should be followed to turn OFF the system:

(a) Turn OFF Switch S1 to stop the Kit operation;


(b) Tune the DC input voltage to 0 V and power OFF the DC source or disconnect
the PV source;
(c) Power OFF the Kit;
(d) Disconnect the wires if needed.

Note that there may still be residual energy stored in the DC-bus capacitors after turning off
the Kit.
The high-voltage case can be tested similarly. The AC output voltage directly measured
with an oscilloscope is shown in Fig. 7.6(b); the DAC outputs are shown in Fig. 7.8; and the
GUI results are shown in Fig. 7.9(b).
Quick Start with a DC-DC-AC Converter 73

(a) (b)

(c) (d)

Figure 7.7 DAC outputs in the low-voltage case: (a) DAC 1: Counter. (b) DAC 2: Input current ipv .
(c) DAC 3: DC bus voltage vdc . (d) DAC 4: AC output voltage vac .

(a) (b)

(c) (d)

Figure 7.8 DAC outputs in the high-voltage case: (a) DAC 1: Counter. (b) DAC 2: Input current ipv .
(c) DAC 3: DC bus voltage vdc . (d) DAC 4: AC output voltage vac .
74 Quick Start with a DC-DC-AC Converter

(a)

(b)

Figure 7.9 Host GUI with data received from RS485 communication: (a) Low-voltage case. (b) High-
voltage case.
Note: This figure was kindly provided by Texas Tech University, which is greatly appreciated.

You might also like