PV Inverter Design Using Solar Explorer Kit
PV Inverter Design Using Solar Explorer Kit
Manish Bhardwaj and Bharathi Subharmanya .................................... C2000 Systems and Applications Team
ABSTRACT
This application report goes over the solar explorer kit hardware and explains control design of Photo
Voltaic (PV) inverter using the kit.
Contents
1 Introduction .................................................................................................................. 2
2 Getting Familiar With the Kit ............................................................................................... 3
3 Power Stages on the Kit ................................................................................................... 5
4 PV Systems Using Solar Explorer Kit ................................................................................... 20
5 Hardware Details .......................................................................................................... 23
6 Software .................................................................................................................... 26
7 References ................................................................................................................. 34
List of Figures
1 TMDSSOLAR(P/C)EXPKIT ................................................................................................ 2
2 Solar Explorer Kit Overview ............................................................................................... 4
3 Macro Block on Solar Explorer Kit ........................................................................................ 6
4 Boost DC-DC Single Phase With MPPT Power Stage ................................................................ 7
5 Boost With MPPT Control Diagram....................................................................................... 8
6 DC-DC Battery Charging Sepic Power Stage ........................................................................... 8
7 Battery Charging With MPPT Control Diagram ........................................................................ 10
8 Single Phase Full Bridge Inverter Power Stage ....................................................................... 10
9 Modulation Scheme ....................................................................................................... 12
10 Primary Current ............................................................................................................ 13
11 Shorting the Grid .......................................................................................................... 13
12 Synchronous Buck Boost ................................................................................................. 14
13 Gain Curve ................................................................................................................. 15
14 Switching Diagram Using C2000 PWM................................................................................. 15
15 Light Sensor Panel ........................................................................................................ 16
16 Curves of the PV Emulator Table ....................................................................................... 17
17 DC Link Capacitor and Ripple on the DC Bus ......................................................................... 19
18 DC-DC PV Street Lighting ................................................................................................ 20
19 Control of PV Street Light With Battery Charging ..................................................................... 21
20 PV Grid Tied Inverter ..................................................................................................... 21
21 Control of PV Grid Tied Inverter ......................................................................................... 22
22 PV Off Grid Inverter System ............................................................................................. 22
23 Solar Explorer Kit Block Diagram With C2000 MCU (connectivity peripherals can differ from one device
to the other including Ethernet, USB, CAN, SPI, and so forth) ...................................................... 24
24 Solar Explorer Jumpers and Connectors ............................................................................... 25
25 PV Inverter Software Structure (i) Main Loop (ii) Inverter Stage ISR (iii) DCDC Boost Stage ISR ............. 27
26 DC-DC 1ph Boost With MPPT Software Diagram ................................................................... 28
27 Closed Loop Current Control for DC-AC With Grid Connection .................................................... 29
28 Timing Diagram for Boost and Inverter Integration ................................................................... 31
29 Full Control Scheme for the PV Inverter................................................................................ 33
List of Tables
1 PV Emulator Table ........................................................................................................ 17
2 Resource Mapping: PWM, ADC, GPIO, Comms ...................................................................... 23
3 Jumpers and Connectors on Solar Explorer Board ................................................................... 25
1 Introduction
The solar explorer kit, TMDSSOLAR(P/C)EXPKIT, (see Figure 1) provides a flexible and low voltage
platform to evaluate the C2000™ microcontroller family of devices for a variety of PV and solar power
applications. The kit is available through the TI e-store ([Link]
Figure 1. TMDSSOLAR(P/C)EXPKIT
WARNING
This EVM is meant to be operated in a lab environment only and is
not considered by TI to be a finished end-product fit for general
consumer use.
This EVM must be used only by qualified engineers and
technicians familiar with risks associated with handling high
voltage electrical and mechanical components, systems and
subsystems.
This equipment operates at voltages and currents that can result in
electrical shock, fire hazard and personal injury if not properly
handled or applied. Equipment must be used with necessary
caution and safeguards employed to avoid personal injury or
property damage. appropriate
It is your responsibility to confirm that the voltages and isolation
requirements are identified and understood, prior to energizing the
board and or simulation. When energized, the EVM or components
connected to the EVM should not be touched.
Light Sensor
Piccolo-
A
Converter + Inverter + Battery Charger
ACDC
Power DC-DC DC-DC DC-AC
Adapter Buck/Boost Boost Inverter
40 MPPT
35
30 MPPT
25
DC-DC + –
Power
20 SEPIC
15
10 SPI
5
PV Inverter
DIMM100
0
0 5 10 15 20 25 30
Demo GUI
Panel Voltage
As PV is a light dependent source, a light sensor is integrated on the board, which can be used to change
behavior of the panel with varying light conditions.
The following section goes through the individual macros and the control scheme.
Q1
+ +
PWMnA Vboost
Vpv Ci Co
Iboostsw
Ipv
Signal I/F Conditioning
Vpv
Drivers
Piccolo
Vboost Digital Controller PWMnA
Iboostsw
+
Q1
+ +
PWM4A L2 Vbatt
Vpnl C1 C3
Ibattsw
Ipnl
Signal I/F Conditioning
Vpnl
Drivers
Piccolo
Vbatt Digital Controller PWM4A
Ibattsw
MPPT Vpnl_Ref +
Gv PWM To Plant
Iref=func(Vpnl, Ipnl) -
Battery Charge State
Determination
Runs in a slow
background task, Trickle, Over and Float Charging State
not timing critical
Vbat
-
Vbatt_ref Gv
+
Q1 Q3
Vline
PWM1A PWM2A L1
+ Cac Grid
Vdc
L2
PWM1B PWM2B Vneutral
C1 Q2 Q4
Ileg1 Ileg2
Vdc
Signal I/F Conditioning
PWM1A
Vac
Drivers
PWM1B
Piccolo
Ileg1 Digital Controller PWM2A
Ileg2 PWM2B
Igrid
SW1 SW3
Vdc
Vgrid
switched
LCL
+ Impedance Grid
Vdc (Zlcl)
C1 SW4
SW2 Vlcl
Time Base
Counter
SW1
SW2
SW3
SW4
Unipolar Modulation
The LCL filter at the output of the inverter filters this waveform. Now the voltage across the LCL filter can
be written as:
• VLCL,on = Vdc − Vgrid, when SW1 and SW4 are conducting
• VLCL,on = −Vdc − Vgrid, when SW3 and SW4 are conducting
• VLCL,off = −Vgrid, when SW2 and SW4 are conducting
Therefore, the change in grid current per switching cycle is computed shown in Equation 1:
Di grid =
(Vdc - vgrid ).D + (0 - vgrid )(1 - D ) = Vdc * D - vgrid
ZLCL (FSW ) ZLCL (F ) ZLCL (F )
SW SW (1)
It is noted from Equation 1 that the current can be controlled by varying the duty cycle. Typically, a current
transformer is used to measure the gird current. However, on the explorer kit, shunt current measurement
is used as this is a learning platform.
Two shunt current measurement resistors are placed, the grid current (that is, the current fed into the grid
from the inverter) is estimated by subtracting the two leg currents.
Δigrid = ileg2 - ileg1 (2)
Assume the positive half of the sine wave feeds current into the grid.
Vline
Q1 Q3 L1
+ Cac Grid
Vdc
Q2 Q4 L2
Vneutral
C1
Ileg1 Ileg2
Primary current fed into the grid during the positive half is ileg2, ileg1 and measures zero. However, when the
current reference for the inverter is very low (Q1 is open most of the times), this can result in shorting the
grid across SW2 and SW4. When shorted, a high current flows through both Leg1 and Leg2. This is why
the Leg1 current is subtracted from the Leg1 current at all times to get the change in the grid current.
Vline
Q1 Q3 L1
+ Cac Grid
Vdc
Q2 Q4 L2
Vneutral
C1
Ileg1 Ileg2
Shorting the grid under low modulation case, then the negative current is not sensed.
3.5 PV Emulator
Ipv_emu
L1
Q1 Q4
PWMnA Q2 Q3 PWM(n+1)B
+ +
PWMnB PWM(n+1)A
Vdc_in Co Vpv_emu
Ci
PWMnA
Vpv_emu
Drivers
Piccolo PWMnB
Digital Controller PWM(n+1)A
Ipv_emu
PWM(n+1)B
If the power stage is switched such that the buck and the boost duty are the same (that is, Dbu - Dbo) the
gain curve is as shown in Figure 13.
6
4
Buck Region Boost Region
Gain
1
X: 0.5
Y: 1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Duty
Therefore, it can be concluded for duty less than 50% the stage behaves as a buck and 50% and above
as a boost. The detailed switching diagram using C2000 PWM module is depicted in Figure 14.
P P P
Z Z Z
Pulse Center
TimeBase
PWM1
PWM Sync Pulse
P CB CA CB
P CA P
A
A
EPWM1A
EPWM1B
DbFed DbRed
TimeBase
PWM2
EPWM2A
EPWM2B
DbFed DbRed
This stage is controlled using Piccolo-A (F28027), which is present on the EVM baseboard. This controller
is separate from the controller that does the DC-DC boost, battery charging and the DC-AC conversion
present on the board.
The input voltage to the buck boost stage is from the DC Power entry block. This voltage is 20 V, as the
power adapter shipped with the kit is 20 V. However, you can use another voltage input by connecting it to
the terminal block present on the board.
To emulate the panel characteristics, the stage needs to operate as a current controlled voltage source
(depending on the load current demand, the output voltage will change). This is achieved by changing the
voltage reference of the stage based on the look-up table value.
Light Sensor
Reading Ipv_emu Vpv_emu
The current being drawn by the panel Ipv is used as the index for the look-up table that is stored on the
controller. The look-up table is then used to provide the voltage reference Vpv_ref for the panel
corresponding to the Ipv. A light sensor is placed on the board to control the irradiance level and produce a
corresponding V-I curve. For getting curves between different luminance levels, the values from the stored
curve are interpolated using Equation 4.
V G2
pv _ ref _ G2 = * Vpv _ ref
G1 (4)
Where, G2 is the new luminance value and G1 is the old luminance value.
NOTE: This is just an approximation of the PV characteristics, the real panel characteristics may
differ.
Figure 16 shows the curves of the PV emulator table that are stored for the PV emulation on the
controller.
Panel Emulator Characteristic Power Vs Voltage at different Luminance Levels, Uoc=28 V, Isc=3.0 Amp, Umpp=18 V, Impp=2.0 Amp
40
X: 18.46
Y: 36.02
35
X: 16.42
Y: 32.42
X: 14.68
30 Y: 28.82
X: 12.77
Y: 25.22
2
25 1000W/m
X: 10.96
2
Y: 21.61 900W/m
Power
20 X: 9.093 2
Y: 18.01 800W/m
2
X: 7.363 700W/m
Y: 14.41
15
2
600W/m
X: 5.473
Y: 10.81
2
500W/m
10
X: 3.67
Y: 7.205 2
400W/m
2
5 300W/m
2
200W/m
0
0 5 10 15 20 25 30
Panel Voltage
2.5
1.5
0.5
0
0 5 10 15 20 25 30
Panel Voltage
Grid
1
pdc = [Link] pac = [Link] = — ipk vpk (1 – cos( 2 wt ))
2
vac
iac
pac Pdc
Let the AC current being fed to the grid or load and the AC voltage be:
• iac = Ipk sin(wt)
• vac = Vpk sin(wt)
which implies the power supplied by the inverter is:
1
pac = vac * iac = Vpk I pk ëé1 - cos (2wt )ûù
2 (5)
In Equation 5, the power injected into a single-phase grid follows a sinusoidal waveform with twice the
frequency of the grid. The PV module cannot be operated at the MPP if this alternating power is not
decoupled by means of an energy buffer. Therefore, a capacitor bank is typically used for buffering this
energy.
To estimate the amount of capacitance needed to buffer this energy, let the magnitude of the ripple
induced on the DC bus due to the alternating nature of the power being drawn be ∆V . Now Looking at a
quarter of the sinusoidal power waveform, the equation for the power being drawn for 1/8th of the grid
cycle can be written as follows:
1 2 1 2
DE 2 CV - 2 C (V - DV )
= 4 * fac * C æçV 2 - (V - DV ) ö÷
2
pac = =
T 1 è ø
8
(8 * fac ) (6)
As is clear from Equation 6, the minimum capacitance required is a function of the value of voltage this
energy buffer is kept at and the AC power delivered.
LED
DC-DC String
PV Boost
Emulator
Controlled
using Pic-A
Sepic-
DCDC- Battery
MPPT
NOTE: The idea is not to illustrate the most optimal power stage, but to illustrate the control of such
a system using C2000 MCU’s.
LED
String
DC-DC Sepic Batt Charging DC-DC Boost
Photovoltaic Ipnl Vpnl With MPPT
Panel
MPPT
Vpnl_ref =
func(Vpnl, Ipnl)
Current Control of LED
Battery {using switched current of the boost}
Vpnl Isw
Bulk Charging State
PWM
Isw_ref Gi PWM
Vpnl_Ref +
Gv
–
Vboost_max
Battery Charge State Trickle, Over and Float Charging State Vboost
Determination
Vbat
Runs in a slow –
background task, Vbatt_ref Gv
not timing critical
+
Controlled
using Pic-A
The DC-DC stage is responsible to maintain MPPT of the panel and the inverter is responsible for the
synchronization with the grid and feeding current into the grid. Figure 21 shows the control of a PV
inverter stage.
Vboost
Ifdbk
Imax
Controlled
using Pic-A
The Panel is used to
charge the battery.
Sepic-
DCDC- Battery
MPPT
5 Hardware Details
Figure 23. Solar Explorer Kit Block Diagram With C2000 MCU
(connectivity peripherals can differ from one device to the other including
Ethernet, USB, CAN, SPI, and so forth)
[M7] JP1- USB [M6]SW2– 12, [M6]JP1 – DC [M6] J1 – Source [M6 ]TB1 – External [M6]SW1– Panel [Main]U1
Connection for 5 , 3.3VDC Jack for 20V DC power from DC Power Supply Connection Emulator Power Light Sensor
on-board emulation power switch power supply Jack Jumper terminal Block Rail On/Off
[M7]J2 – External
JTAG emulator
interface
[Main]BS2
[M7] J5– On-board Banana
emulation disable Connector jack
jumper for GND
Connection
[M7]J1 & J2– Boot
Option Jumper [Main]BS1
Banana
Connector for
[M7] J4– JTAG Panel Emulator
TRSTn Jumper Output
[Main]BS3
Banana
Connector jack for
[Main]BS5 – Panel Input
Banana Connector
jack for
Inverter Input
[Main] BS7
[Main]BS5 – Banana
Banana Connector Connector jack for
jack for GND Panel Input
Connection
[Main]TB2 –
Terminal Connector
for Battery Pack
Connection
NOTE: If you are going to boot from Flash and connect using the GUI, you would need to use the
Boot from Flash settings as described in the Table Boot Options.
6 Software
This section describes the details of the PV inverter control and software for the solar explorer kit.
Figure 25 shows the structure of the PV inverter software, with the main background loop, the DC-DC ISR
and the DC-AC ISR.
(i) Main Loop
Cinit_0
Initialize Modules –
Inverter- PWM1,2
DCDC Boost – PWM3
ADC
Initialize Macros –
MPPT, SizeAnalyzer, PID...
Enable Interrupts
Inverter – ADCINT1
Boost – EPWM_INT
(ii) DC-AC Inverter ISR (20Khz) (iii)DC-DC Boost ISR (50Khz)
DC-AC Inverter ISR
C – ISR BackGround Loop ASM – ISR
(Inverter Control) MPPT (Boost Control)
GUI DC-DC Boost ISR
Save contexts and clear interrupt Save contexts and clear int flags
flags - EINT
Figure 25. PV Inverter Software Structure (i) Main Loop (ii) Inverter Stage ISR (iii) DCDC Boost Stage ISR
slower rate ~ 10Hz. It is noted from Figure 5 that the boost stage output voltage is not being controlled
through software. Boost output voltage however is regulated by the DC-AC inverter, which modulates the
current drawn by the inverter to keep this voltage regulated. However, for protection, the output of the
boost is connected to the ADC pin with the internal comparator that can be used to trip the PWM to the
DC-DC stage in case of over-voltage.
50Khz
50Khz
50Khz PWMDRV_1chUpDwnCntCompl:3:
CNTL_2P2Z:1:
CNTL_2P2Z:2:
Ref
Out IboostSwRef Ref P
W PWM3A
VpvRef Fdbk Out Duty3A Duty
Fdbk M
DBUFF Period
Coef DBUFF
Coef
CNTL_2P2Z_CoefStruct
B0 CNTL_2P2Z_CoefStruct
B1 B0
B2 B1
A1 B2 50Khz
A2 A1
Dmin A2 ADCDRV_1ch:1:
Dmax Dmin
Dmax
A
IboostswRead Rlt D ADC B6
50Khz C
MATH_EMAVG:2:
A
VpvRead Rlt ADC A1
D
C
10-20Hz
MPPT PnO / INCC 50Khz 50Khz
MATH_EMAVG:1: ADCDRV_1ch:6:
A
IpvRead_EMAVG Out In IpvRead Rlt ADC A0
D
C
Multiplier
ADCDRV_1ch:5:
A
VboostRead Rlt D ADC A2
C
As the switching rate of the DC-DC stage is fairly high, 100 Khz, the control ISR for the DC-DC is
implemented in an optimized assembly ISR (ASM – ISR) that uses components from the digital power
library. In the PV inverter project, the DC-DC ISR is invoked every alternate switching cycle; this is done
because the PV panel output does not change very fast. Figure 26 shows the software diagram for the
DC-DC stage using the optimized blocks from the digital power library.
The ADC result registers are read by the ADCDRV_1ch block and converted to normalized values, and
stored in variables IpvRead, Vpvread, Iboostswread and Vboostread. Two 2-pole 2-zero controllers (CNTL_2P2Z) are
used to close the inner DC-DC boost current loop and the outer input voltage loop. The MPPT algorithm
provides reference input voltage to the boost stage to enable panel operation at maximum power point.
The sensed input voltage is compared with the voltage command (Vpvref) generated by the MPPT controller
in the voltage control loop. The voltage controller output is then compared with the output current
(Iboostswread) feedback in the current controller. The current loop controller’s output decides the amount of
duty to be imparted to the PWM so as to regulate the input voltage indirectly. The
PWMDRV_1ch_UpDwnCntCompl block is used to drive the DC-DC stage. The panel current and voltage
are filtered using the MATH_EMAVG block; this is done to remove any noise on the panel current and
voltage sensing that may confuse the MPPT algorithm.
Notice the color coding for the software blocks. The blocks in ‘dark blue’ represent the hardware modules
on the C2000 controller. The blocks in ‘blue’ are the software drivers for these modules. The blocks in
‘yellow’ are the controller blocks for the control loop. Although a 2-pole 2-zero controller is used here, the
controller could very well be a PI/PID, a 3-pole 3-zero or any other controller that can be suitably
implemented for this application. Similarly for MPP tracking, you can choose to use a different algorithm.
Solar_SoftPLL Ileg2_fb
VboostRead (struct) subtract
Ileg1_fb
.sin(θ)
.cos(θ)
Vac_fb .Vin
.(θ)
wn
Solar_SineAnalyzer
(struct)
T=1/f .PosCyc
.Vrms
.Vin
.Vavg
.freq
SampleFreq
Threshold .ZCD
Figure 27. Closed Loop Current Control for DC-AC With Grid Connection
PWM PRD = 3000 counts = 20Khz at 60Mhz CPU Clock PWM synchronization
TBPRD1 = 1500 event happens here
TimeBase 1
PWM 1B
TimeBase 2
PWM 3A
Figure 28 illustrates the PWM waveform generation on a 60 MHz device for 20 KHz DC-AC inverter and a
50 KHz control loop rate of the DC-DC boost with MPPT stage (note the switching rate is 100 KHz). The
PWM peripheral offers the flexibility to trigger the start of conversions (SOC’s) for the ADC every switching
cycle or alternate, avoiding any unnecessary load on the ADC.
In addition to this, a phase shift is implemented to avoid any conflict on the ADC resource. A phase shift of
30 clock cycles is chosen to account for a 7 cycle sampling window and a 15 cycle first conversion delay.
DPL_ISR()
50Khz 50Khz
50Khz PWMDRV_1chUpDwnCntCompl:3:
CNTL_2P2Z:1:
CNTL_2P2Z:2:
Ref
Out IboostSwRef Ref P
W PWM3A
VpvRef Fdbk Out Duty3A Duty
Fdbk M
DBUFF Period
Coef DBUFF
Coef
CNTL_2P2Z_CoefStruct
B0 CNTL_2P2Z_CoefStruct
B1 B0
B2 B1
A1 B2 50Khz
A2 A1
Dmin A2 ADCDRV_1ch:1:
Dmax Dmin
Dmax
A
IboostswRead Rlt D ADC B6
50Khz C
MATH_EMAVG:2:
50Khz
VpvRead_EMAVG Out In ADCDRV_1ch:7:
Multiplier A
Rlt D ADC A1
VpvRead C
50Khz 50Khz
10-20Hz
MATH_EMAVG:1: ADCDRV_1ch:6:
MPPT PnO / INCC
A
IpvRead_EMAVG Out In IpvRead Rlt ADC A0
D
C
Multiplier
ADCDRV_1ch:5:
A
VboostRead Rlt D ADC A2
C
inv_ISR()
20Khz / ZCD
20Khz
PID_Grando PWMDRV_1phInv_unipolar
(struct) PID_Grando
(struct) (n,period,Duty)
VboostRead .Ref
inv_Iset X .Ref PWMnA
.Out
.Out Duty P PWMnB
VdcRef .Fdbk DBUFF W PWM(n+1)A
.Fdbk DBUFF Coef M
Coef
InvSine Coef PWM(n+1)B
Solar_SoftPLL pidGRANDO_Iinv
(struct)
Ileg2_fb
.sin(θ) subtract
Ileg1_fb
.cos(θ)
Vac_fb .Vin
.(θ)
wn
Solar_SineAnalyzer
(struct)
T=1/f .PosCyc
.Vrms
.Vin
.Vavg
.freq
SampleFreq
Threshold .ZCD
7 References
• C2000 SolarWorkshop: [Link]
• F28M35H52C, F28M35H22C, F28M35M52C, F28M35M22C, F28M35M20B F28M35E20B Concerto
Microcontrollers Data Sheet (SPRS742)
• Concerto F28M35x Technical Reference Manual (SPRUH22)
• Soeren Baekhoej Kjaer, John K. Pedersen & Frede Blaabjerg, “A review of Single – phase grid
connected inverters for photovoltaic systems”, IEEE transactions on industry applications, vol 41, No.
5, September / October 2005
• Remus Teodorescu, Marco Liserre, Pedro Rodriguez, “Gird Converters for Photovoltaic and Wind
Power Systems”, John Wiley and Sons, 2011
• Tamas Kerekes, “Analysis and Modeling of Transformerless Photovoltaic Inverter Systems”,
Department of Energy Technology , Aalborg University, 2009
• Zhang Housheng; Zhao Yanlei; , "Research on a Novel Digital Photovoltaic Array Simulator," Intelligent
Computation Technology and Automation (ICICTA), 2010 International Conference on , vol.2, no.,
pp.1077-1080, 11-12 May 2010
• Britton, Lunscher, and Tanju,“A 9KW High-Performance Solar Array Simulator”, Proceedings of the
European Space Power Conference, August 1993 (ESA WPP-054, August 1993)
• Soeren Baekhoej Kjaer ,Design and Control of an Inverter for Photovoltaic Applications, Department of
Energy Technology , Aalborg University, 2009
• Francisco D. Freijedo et al, “Robust Phase Locked Loops Optimized for DSP implementation in Power
Quality Applications”, IECON 2008, 3052-3057
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2013, Texas Instruments Incorporated