You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/252044062

DSP-controlled photovoltaic inverter for universal application in research and


education

Article · June 2011


DOI: 10.1109/PTC.2011.6019266

CITATIONS READS
3 1,132

3 authors, including:

Fritz Schimpf Lars Norum


Norwegian University of Science and Technology Norwegian University of Science and Technology
5 PUBLICATIONS 184 CITATIONS 109 PUBLICATIONS 1,918 CITATIONS

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Modular Multilevel Converter for Photovolatic Power Plants View project

PMSM for percussive drilling View project

All content following this page was uploaded by Fritz Schimpf on 26 January 2015.

The user has requested enhancement of the downloaded file.


1

DSP-controlled Photovoltaic Inverter for Universal


Application in Research and Education
Fredrick Ishengoma, Member, IEEE, Fritz Schimpf, Non-Member, IEEE, and Lars Norum, Member, IEEE

Abstract—This paper presents a setup for a universal inverter which restrict its usage in the lab. The most severe one is the
board to be used for teaching and research on photovoltaic (PV) (completely unnecessary) risk of electric shock when touching
power systems. The control of power conversion components is parts of the board which are connected to the grid voltage
done by a DSP which offers the advantage of great flexibility.
Depending on the control strategy, the converter can be operated (used for synchronization). Another problem which prevents
as a stand-alone PV system, hybrid PV system, grid-tie PV the board to be used in a standalone system is the missing
system and mixtures of these configurations. A description of power supply from the DC-side.
the hardware and software setup is given and sub-modules to Our goal is to develop a board which does not have these
operate the board in different modes are presented. shortcomings. It can be used for laboratory experiments as well
Index Terms—Batteries, Converter, Digital control, DSP, grid- as for stand-alone-operation without any additional hardware.
tied, Inverter, Microgrid, Photovoltaic, Pulse width modulation, The efficiency does not have to be extremely good, but
Solar-home-system should be high enough for building a small, fully functional
demonstration system.
I. I NTRODUCTION
II. H ARDWARE DESCRIPTION

U NIVERSITIES and colleges worldwide nowadays offer


courses and research on photovoltaic power systems.
Main topics cover PV panels and their characteristics, battery
A. Overview of the system
Fig. 1 gives an overview of the system. It consists of three
charging and discharging, PV power conversion elements power processing stages which are all connected to a common
(inverters and dc-dc converters) and control of components DC-link. Two of them are DC/DC-converters, one connected
in the PV systems. to the PV-input allowing MPPT; the other one is bi-directional
Students need a platform to do practical work in order to and is connecting a battery bank to the DC-link. The third
illustrate different theories covered in modeling and control of stage is an inverter for generating an AC-output. The AC
PV systems. Researchers also need a platform to do experi- output is connected to a filter and a transformer for feeding
ments in order to improve various aspects of PV systems. power to the utility grid or for supplying a load in an island
The way the experiments are done differs from one uni- grid. Using a low-frequency transformer increases the safety
versity to another depending on what is installed in the labs. of the setup, because of the galvanic isolation from the grid,
Some use commercial balance of system (BOS) components even though this is not the most efficient topology [2].
such as inverters, charge controllers, and DC-DC converters. The setup is flexible and can be programmed to operate
Even if such commercial devices become more accessible in several different modes, like shown in Fig. 2. Possible
and cheap, they have disadvantages regarding the use in a operating modes are:
lab, like incomplete documentation and closed firmware. So 1) Battery charge controller from PV: In this mode, the
experimenting with such devices becomes difficult. system acts as a battery charge controller and MPPT. DC-
An interesting approach of offering a freely programmable, loads can be connected to the battery. This mode forms a
universal inverter board is the C2000 Renewable Energy De-
veloper’s Kit [1] from Texas Instruments. The kit is designed P P

to work with Texas Instruments C2000 microcontrollers. The LF−Transformer

board allows implementing all the major functions of a so- 11


00
lar energy system such as boost DC to DC conversion for
00
11
00
11 ~
maximum power point tracking (MPPT), single phase inverter
PV−Panel common LC−Filter (Island−)
operation, synchronizing inverter output with the AC line, and Boost−DC/DC
MPPT
DC−link Inverter grid

DC to DC buck operation for possible battery charging. But P

there are a number of shortcomings associated with this board


fused and

All authors are with the department of Electric Power Engineering, Norwe- 111
000
000
111 Battery
switchable
Terminal for
gian University of Science and Technology, O.S. Bragstads plass 2E, NO-7491 DC−loads

Trondheim, Norway.
F. Ishengoma: fmi@elkraft.ntnu.no DC/DC for battery−
(dis−)charging
F. Schimpf: Fritz.Schimpf@elkraft.ntnu.no
L. Norum: Lars.Norum@elkraft.ntnu.no
Manuscript received February 28, 2011. Fig. 1. Block diagram of the converters
2

1
4 TABLE I
1 R ATINGS
2
11
00
00
11 2 2
3 00
11
3
3 ~ DC-link voltage 35 V
4
(Island−)
grid
Max. input voltage (PV) 35 V
PV−Panel
Boost−DC/DC Inverter MPP tracking range 10..35 V
MPPT
Max. input current (PV) 10 A
Legend: Battery voltage range 10..30 V
1: Solar home system (only DC−loads)
2: Grid tied inverter
Max. battery current 10 A
1 1
3: Battery−inverter with island−grid 000
111 Continuous power all stages 150 W
111
000 3
4: MPPT for DC−loads 000
111
Transformer pri.: 24 V; 6,25 A; sec: 230 V; 0,7 A
DC−load

Battery
DC/DC for battery−
(dis−)charging

1) DSP: A central part of the board is the DSP. It is


Fig. 2. Possible operation modes controlling the power electronic stages by pulse-width mod-
ulation (PWM) and receives feedback via several analog
measurements. For our board the TMS320F2808 from Texas
system also known as solar home system. (PV → Battery → Instruments is used. It is a fixed-point DSP, running at
DC-load). 100 MHz. For avoiding problems during the manual soldering
2) Grid-tie-inverter with MPPT: In this mode, only the we decided to use a controlCARD from TI, which is a small
MPPT-converter and the inverter are used. A battery is not PCB with the DSP, some power-supply components and an
connected (PV → AC-Load → Grid). isolated RS232-port. The controlCARD can be plugged into
3) Battery-inverter for island grid: Instead of the grid, an a 100-pin DIMM-connector. TI offers some controlCARDs,
AC-load is connected and is supplied from PV-power and/or which are pin-compatible; therefore we could easily change
the battery (PV → AC-Load). to the alternative DSPs TMS320F28035 and TMS320F28027.
4) MPPT for DC loads: This scenario supplies power from Sadly we found out that it is very hard to get the required
the PV array directly to the DC load. No battery is connected. 100-pin DIMM-socket. Even TI itself seems to be unable to
A typical application is water pumping (PV → DC-load). deliver it. Therefore we plan to put the DSP directly on our
5) Combinations of the above: In addition there are other
possible combinations. Some examples are: Grid-tie-inverter
+12V
with short term energy storage (supplying peak loads from Power ± 10V
Supply +5V

Local ac Loads
the battery for grid stabilization) and a battery charge con- +3.3V

Vac_inv

LF Transformer
troller from the grid (useful for hybrid systems with a diesel

Vac
Relay3

Grid
Vdc_link
PV array Vpv Boost DC/DC Inverter
generator).

Iac
PWM_BOOST

B. Electrical ratings Ipv PWM_INV1/2/3/4


Relay1

Bi-directional Vbat
DC/DC Relay2

For easy and safe use, all voltages on the board are limited Fuse DC
Battery Load
to ”Safety extra low Voltage” (SELV) which is below 42 V
To relays
PWM_CHG

[3]. The DC-link-voltage is set to a maximum of 35 V. Since Ibat


PWM_DISC

the PV-modules are connected through a boost-converter, the


Vdc-link

Vac_inv

maximum voltage of the PV-modules should be in the same


Vbat

PW_BOOST
Vac

Status LEDs
PWM_DISC
Ibat

Iac

PWM_INV1
Vpv

PWM_INV2
PWM_CHG

PWM_INV4
PWM_INV3
Ipv

Drivers
Relays

range. The converter for the battery has a boost-characteristic


DAC

+12V
Additional analog
from the battery to the DC-link and a buck-characteristic in the signals Analog signals
conditioning, scaling and
other direction. Reasonable system-voltages for the battery are ± 10V offset MOSFET
Additional
digital I/O

therefore 12 or 24 V. The power rating of all converter stages DRIVERS


0-3V signals
is 150 W. This is still small enough to make a cheap board
EPWM1A

EPWM2A

EPWM2B
EPWM3A

EPWM3B
EPWM4A

EPWM4B
EPWM5A

without large heatsinks, but it is enough power for reasonable ADC PWM I/O
operation of a small one-family-PV-system which could supply +5V
lamps, a laptop, and charge mobile devices. A summary of the
technical data is given in table I.
SCI JTAG

+3.3V
RS232 JTAG connector

C. Hardware structure and block diagram


PC (GUI & CCS)
A block diagram of the complete board is shown in Fig.
3. Basically it consists of the power electronic part, a power
supply, measurement circuitry and the DSP. Fig. 3. Block diagram of inverter board
3

board in the next revision. III. S OFTWARE AND C ONTROL


2) Power supply: One important design criterion for the A. Digital control
board is that it should be possible to operate it as a stand-
The system is controlled digitally. This increases the flex-
alone unit. That means it should be independent from ex-
ibility of the converter board, because the control becomes
ternal laboratory power supplies or AC-adaptors. Therefore
a question of software only. For example, between the con-
the power supply for the board is taken from the DC-link
figurations for an off-grid-system and a grid-tied inverter no
of the power stage. That means that a connected PV-panel,
hardware changes will be needed (except for the sources/sinks
a battery or any other source connected to the terminals of
of the power). For a closer review of advantages of digital
the converters can be used for supplying the logic circuits
control refer to textbooks like [4].
and the DSP. The minimum input voltage required is 15 V
and the maximum voltage is 35V. The output voltages of
the power supply are +12 V (mainly relay-drivers and gate- B. Software Framework
drivers), +5 V (Logic, DSP), ±10 V (analog measurements) The software for the DSP is written in C. Fig. 4 shows the
and 3.3 V (mainly JTAG and clamping of the analog inputs). flow diagram of the software. At startup, the main subroutine
The different supply voltages are also shown in Fig. 3. initializes the DSP and all peripheral units like PWMs, ADCs
3) Analog measurements: Several analog parameters are and GPIOs. Then the background loop is entered. It is used
measured via the ADC of the DSP for feedback: to execute non time-critical tasks like communication via the
RS232 port and switching of relays and LEDs. The back-
• Voltage and current at PV input,
ground loop can trigger different tasks on a specific timing.
• voltage at DC-link,
There are tasks which are executed every 1 ms, 10 ms, 100 ms
• voltage and current at battery,
and every second.
• inverter voltage and
Currently, five interrupt service routines (ISRs) are used:
• grid voltage and current measured on low-voltage side of
transformer. • End of conversion ADC ISR is triggered when the ADC
module completes ADC conversion. This ISR is the most
All analog signals are conditioned and scaled to be within important because it is the time-base for all real-time
the range of 0..3V which is the voltage range which can be calculations. In this ISR, values of measured signals (in
converted by the ADC inputs of DSP. Currents are converted digital form) are extracted, and scaled. Then all digital
to voltages through shunt resistors and then amplified. For ac controllers which run at the PWM-frequency (50 kHz) are
quantities which have positive and negative values, an offset is
added in order to represent negative values by voltages from
0 to 1.5 V. Scaling and offsetting is done through operational Main EOC ADC ISR
amplifiers.
4) PWM and gate drive: All power stages are controlled by Initialization Get measured
28x device level ADC and scaling
PWM-signals generated from the ePWM-modules of the DSP.
Peripheral level
The DC/DC-converter for MPPT needs only one PWM-signal, System level
ISR, ADC
the battery-charger needs two inputs with interlock and the Calculate
averages
inverter requires four PWM-signals with pair-wise interlock.
Integrated gate drivers IRS2183 are used. They have an Background loop
Update
integrated interlock between the upper and lower switch of 1ms task
parameters for
controllers and
a leg and insert a fixed deadtime of 400 ns between turn-off 10 ms task PWMs

100 ms task
and turn-on. 1 s task
Data logging
N
5) Serial communication: For communication between the enabled?

DSP and PC the board has an isolated RS-232 port. The Y

communication is used to transmit commands from a PC to update


datalogger
buffers
the inverter. Later on we will implement a Graphical User Background loop
Interface (GUI) on the PC for sending commands, configuring
the converter and also to visualize logged data on the PC.
Every If Vdc- Exit EOC ADC
6) JTAG: The DSP can be programmed and debugged 100µs link>35V ISR

via a JTAG port. Texas Instrument’s Code composer studio Timer0 ISR Trip Zone EOC ADC
SCIRx ISR SCITx ISR
software is used for software development, debugging and (TZ) ISR ISR
Update Transmit
online visualization of the desired variables from the running counters for Disable
Enable logic
character
for serial
code in the DSP. timing of PWMs communicati to PC
tasks in outputs and on manager
7) Digital Outputs: Some digital output signals are used for background turn ON
loop error LED
controlling status LEDs and relays. There is also an additional
connector for future extensions of the board or for debugging
(e.g. trigger output for oscilloscope). Fig. 4. Flowchart of the control program
4

calculated/serviced. This ISR is also used for servicing a


data-logger which is very useful for debugging. CT 1,T 4 = d (1)
• Timer 0 ISR occurs at every 100 µs and is used to update
various program counters used for timing of different
tasks in the background loop.
CT 2,T 3 = Ptimer − d (2)
• Trip zone (TZ) ISR is used for protection purposes of
the semiconductors on the board. Whenever the DC link Where C is the new compare value and d is the desired
voltage exceeds 35 V, the PWM modules are disabled duty cycle. For negative output voltage, d has negative val-
from outputting the PWM signals. This ISR is only used ues. Ptimer is the period of the timer. Fig. 6 illustrates the
for stopping the inverter and turning on a trip-LED. generation of the PWM waveforms for T1/T4 and T2/T3. The
• SCIRx ISR is triggered when there is a character received frequency of the timer is exaggeratedly low in the figure for
from the PC GUI through the serial port. simplicity.
• SCITx ISR is triggered when there is a character to
transmit from the DSP to PC GUI for visualization. PRD
Compare 1
Timer 1

C. PWM generation for the inverter stage PRD

Timer 2

The used DSP has a flexible hardware unit for generating 0 Compare 2

PWM waveforms. For the generation a compare value is 1 PWM

compared with a counter. When the compare value matches the 0


T1 / T4

counter, the unit can fulfill an action like clearing or setting 1


PWM
T2/T3
0

the corresponding output pin. It is possible to differentiate


between a compare match at up-count and at down-count. Fig. 6. PWM generation
Clearing or setting of the output is also possible when the
counter reaches zero or its programmed maximum value. For
detailed documentation of the PWM unit refer to [5].
Unipolar switching of the inverter bridge is used at the D. Control sub-modules
moment, but we plan to program bipolar switching for compar-
ison, too. In the unipolar method the inverter output is switch- Since the setup allows quite complicated combinations of
ing between the positive DC-link voltage and a zero vector the power processing stages, the control will be developed in
during the positive half wave of the desired output and between sub-modules. These can be operated separately or in connec-
the negative DC-link voltage and zero during the negative half tion with each other.
wave. Compared to bipolar switching which always switches As an example, Fig. 7 shows the control structure for
between positive and negative DC-link voltage, unipolar PWM grid-tied operation [6]. Here the sub-modules MPPT, PLL
creates less distortion and reduces the losses in the AC-filter. and inverter control are used.
Fig. 5 shows the switching during positive and negative half
wave. When the desired output voltage is positive, only T1 In the following paragraphs some of the required modules
and T4 switch synchronously with HF, while T2 and T3 stay are described:
off permanently. For a negative output, only T2 and T3 are 1) MPPT module: The output of the photovoltaic mod-
switching with HF, while T1 and T4 stay off. ule/array varies with the amount of solar radiation available
and ambient temperature. The solar radiation and ambient
temperature depends on the time of year, time of the day and
T1 T3 the amount of clouds. There is one point on the P-V curve
+ where the PV array generates the maximum possible power
_ output for a given irradiance, ambient temperature and loading
T2 T4 condition [7]. The MPPT is used to track this point in order
to utilize the power from PV array to the maximum.
Fig. 5. Illustration of unipolar switching
V DC,ref
For generating the required signals, two PWM-units are I PV
D V DC DC−link voltage− I r
used. The timers of the two units are synchronized and are V PV
MPPT PWM DC/DC
− controller
counting up and down, creating a discrete sawtooth carrier
PV
signal. Each of the power transistors has its own compare
value which determines its duty cycle. The distinction between Ir
positive and negative half wave is done by using an “inverted“ V AC PLL
x
I g,ref

current
controller
PWM DC/AC ~
compare value for transistors T2 and T3. Whenever the grid
Ig
compare registers are updated, they are calculated from the
desired duty cycle: Fig. 7. Control structure for grid-tie operation
5

2) Battery charging/discharging module: The bi-directional IV. R ESULTS AND FUTURE WORK
DC/DC converter operates as a buck converter when charging The hardware setup, i.e. the board is finished and tested.
the battery and as a boost converter when discharging the A photo of the complete board is shown in Fig. 8. In the
battery. The charging/discharging algorithm can be developed background the power stage with the MOSFETs, inductors
to cater for different types for batteries since each type of and DC-link capacitors is visible. More in the foreground the
battery has different characteristics. We will start with imple- DSP-card and the analog circuitry can be seen.
menting a charging algorithm for a lead-acid battery, since The basic software framework is coded and tested, too. At
this is a commonly used type of battery in PV systems. The the moment we are at the stage of implementing the control-
algorithm to be developed will conform to ones recommeded submodules and the GUI. We will continue the development
by battery manufacturers, i.e. a four state charge algorithm and will demonstrate the setup in different configurations at
with temperature compensation. Powertech 2011 in Trondheim.
3) Inverter current-control module: This module includes
a resonant controller for controlling the output-current of the V. C ONCLUSION
inverter. It is optimized for a sinusoidal reference input.
The universal PV-Inverter is useful for teaching and re-
4) Grid synchronization: A software-PLL is used to gen-
search, because it allows an easy process of getting started
erate the phase-angle of the grid voltage from a voltage
with DSP-control of power electronic converters. The board
measurement. This is very helpful for generating a sinusoidal
is also fully operational without additional hardware and can
current, even if the grid-voltage is distorted.
be used in actual PV-systems. This is a feature which is not
5) Frequency and voltage thresholds, anti-islanding: This offered by any commercial board on the market. Since digital
module checks if the grid voltage is within the allowed toler- control is used for control of the converters on the board,
ances defined in the standards. Also it checks, if the connection it is anticipated that students and researchers will be able to
to the grid is active or not. The information generated by the implement various control algorithmms for PV systems and
module can be used to change the mode of operation from hence improve the techniques for harvesting electricity from
grid-tied to island-operation or vice versa. PV panels.
6) Data logging module: This module is responsible for
logging the values of interested variables in the DSP RAM.
Logging is initiated through configurable trigger conditions
which are specified by the user through the GUI on a PC
connected to the board. By downloading the logged data to
a PC, further visualization and analysis can be done using
software such as MATLAB, LabView and Microsoft Excel.
7) Extra features module: Extra features can be added. For
example, the loads can be run in a prioritized mode depending
on the source of power. In a stand-alone system, low-priority
loads can be switched off in case there is not enough power
from the battery and PV to supply them all. This is done
automatically by the controller.
Another feature is running the system in hybrid mode where
an additional power source like a diesel generator can be
connected to the AC-terminal of the inverter. Then the batteries
can be charged while the generator is running.
For such additional features the board has four general Fig. 8. Photo of the complete board
purpose relay outputs which can be used for switching loads,
the generator or the connection to the grid.

E. Graphical user interface


For debugging the software, the JTAG-connection and Code
Composer Studio is used. But in order to get an easy to use
environment which also can be operated by less experienced
users, a GUI will be programmed.
It can be used for changing parameters of the converter soft-
ware, controlling relays, and logging and displaying/plotting
data. We plan to use MATLAB’s GUIDE environment for
programming the GUI. From MATLAB it can be compiled to a
stand-alone application which is not dependent on a MATLAB
installation any more.
6

R EFERENCES Fritz Schimpf finished his MSc degree in Elec-


trical Power Engineering 2004 at the University
[1] Texas Instruments, C2000 Renewable Energy Developer’s Kit of Technology Berlin, Germany (TU Berlin). From
(TMDSENRGYKIT), http://focus.ti.com/docs/toolsw/folders/print/ 2004 to 2007 he worked in the R&D-department
tmdsenrgykit.html, retrieved 22 October 2010. of SMA Solar Technology AG in Kassel, Germany
[2] F. Schimpf, L. E. Norum, Grid Connected Converters for Photovoltaic, on transformer-less grid-tied inverters for PV ap-
State of the Art, Ideas for Improvement of Transformerless Inverters, plications. Since 2008 he is a PhD-student at the
Nordic Workshop on Power and Industrial Electronics, 2008, 9-11 June Norwegian University of Science and Technology
2008, Espoo, Finland. (NTNU) in Trondheim, Norway with research focus
[3] European standard IEC 60664-1:2007, Insulation coordination for equip- on Power Electronic Converters for PV-applications.
ment within low-voltage systems - Part 1: Principles, requirements and
tests.
[4] S. Buso, P. Mattavelli, Digital Control in Power Electronics (Synthesis
Lectures on Power Electronics), Morgan & Claypool, 2006.
[5] Texas Instruments, TMS320x280x, 2801x, 2804x Enhanced Pulse Width
Modulator (ePWM) Module - Reference Guide, SPRU791F, November Lars Einar Norum received his MSc and PhD
2004, revised July 2009 degrees in Electrical Engineering from the Norwe-
[6] R. Theodorescu, V. Benda, P. Rodriguez, D. Sera, T. Kerekes, Course gian Institute of Technology (NTH), Trondheim in
material from Industrial/PhD-course Photovoltaic Power Systems - in 1975 and 1985 respectively. From 1975 to 1980
theory and practice, October 25-28 2010, Department of Energy Tech- he was a member of the research staff at the
nology, Aalborg University, Aalborg, Denmark Norwegian Electric Power Research Institute. He
[7] F. M Ishengoma, L. Norum, Design and implementation of a digi- then joined the Norwegian University of Science
tally controlled stand-alone photovoltaic power supply, in Proc. 2002 and Technology (NTNU), where he is currently a
NORDIC Workshop on Power and Industrial Electronics. Professor in Industrial Electronics at the Faculty of
Information Technology, Mathematics and Electrical
Engineering.
He served as Head of the Department of Electrical Power Engineering at
NTNU (1996-2000) and as a Scientific Advisor to SINTEF Energy Research.
Fredrick Ishengoma received his MSc degree He has been involved in many research and industrial development projects in
in Control Engineering from Bradford University, the field of power and industrial electronics. Presently his research activities
Bradford, England in 1988. Since 1988, he is a mem- are within the field of digital and analogue signal processing, mathematical
ber of academic staff at the department of Electrical modelling and control of electrical energy conversion in renewable energy
and Computer Systems Engineering, University of systems.
Dar es Salaam, Tanzania. Currently he is a PhD Prof. Norum is a member of IEEE, ACM and ISES. He has served as
student at Norwegian University of Science and President for the Board of Science and Technology at the Norwegian Society
Technology, Norway. His research focus is on Con- of Chartered Engineers (1997-2001).
trol and Energy Management of hybrid PV systems
for microgrid applications.

View publication stats

You might also like