* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download DSP-controlled Photovoltaic Inverter for Universal
Power over Ethernet wikipedia , lookup
Audio power wikipedia , lookup
Control system wikipedia , lookup
Electronic engineering wikipedia , lookup
Electrification wikipedia , lookup
Immunity-aware programming wikipedia , lookup
Electric power system wikipedia , lookup
Stray voltage wikipedia , lookup
Three-phase electric power wikipedia , lookup
Electrical substation wikipedia , lookup
Vehicle-to-grid wikipedia , lookup
Rechargeable battery wikipedia , lookup
History of electric power transmission wikipedia , lookup
Electrical grid wikipedia , lookup
Power engineering wikipedia , lookup
Amtrak's 25 Hz traction power system wikipedia , lookup
Voltage optimisation wikipedia , lookup
Buck converter wikipedia , lookup
Distributed generation wikipedia , lookup
Opto-isolator wikipedia , lookup
Alternating current wikipedia , lookup
Distribution management system wikipedia , lookup
Variable-frequency drive wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Mains electricity wikipedia , lookup
Power inverter wikipedia , lookup
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 board to be used for teaching and research on photovoltaic (PV) power systems. The control of power conversion components is done by a DSP which offers the advantage of great flexibility. Depending on the control strategy, the converter can be operated as a stand-alone PV system, hybrid PV system, grid-tie PV system and mixtures of these configurations. A description of the hardware and software setup is given and sub-modules to operate the board in different modes are presented. Index Terms—Batteries, Converter, Digital control, DSP, gridtied, Inverter, Microgrid, Photovoltaic, Pulse width modulation, Solar-home-system which restrict its usage in the lab. The most severe one is the (completely unnecessary) risk of electric shock when touching parts of the board which are connected to the grid voltage (used for synchronization). Another problem which prevents the board to be used in a standalone system is the missing power supply from the DC-side. Our goal is to develop a board which does not have these shortcomings. It can be used for laboratory experiments as well as for stand-alone-operation without any additional hardware. The efficiency does not have to be extremely good, but should be high enough for building a small, fully functional demonstration system. I. I NTRODUCTION U NIVERSITIES and colleges worldwide nowadays offer courses and research on photovoltaic power systems. Main topics cover PV panels and their characteristics, battery charging and discharging, PV power conversion elements (inverters and dc-dc converters) and control of components in the PV systems. Students need a platform to do practical work in order to illustrate different theories covered in modeling and control of PV systems. Researchers also need a platform to do experiments in order to improve various aspects of PV systems. The way the experiments are done differs from one university to another depending on what is installed in the labs. Some use commercial balance of system (BOS) components such as inverters, charge controllers, and DC-DC converters. Even if such commercial devices become more accessible and cheap, they have disadvantages regarding the use in a lab, like incomplete documentation and closed firmware. So experimenting with such devices becomes difficult. An interesting approach of offering a freely programmable, universal inverter board is the C2000 Renewable Energy Developer’s Kit [1] from Texas Instruments. The kit is designed to work with Texas Instruments C2000 microcontrollers. The board allows implementing all the major functions of a solar energy system such as boost DC to DC conversion for maximum power point tracking (MPPT), single phase inverter operation, synchronizing inverter output with the AC line, and DC to DC buck operation for possible battery charging. But there are a number of shortcomings associated with this board All authors are with the department of Electric Power Engineering, Norwegian University of Science and Technology, O.S. Bragstads plass 2E, NO-7491 Trondheim, Norway. F. Ishengoma: [email protected] F. Schimpf: [email protected] L. Norum: [email protected] Manuscript received February 28, 2011. II. H ARDWARE DESCRIPTION A. Overview of the system Fig. 1 gives an overview of the system. It consists of three power processing stages which are all connected to a common DC-link. Two of them are DC/DC-converters, one connected to the PV-input allowing MPPT; the other one is bi-directional and is connecting a battery bank to the DC-link. The third stage is an inverter for generating an AC-output. The AC output is connected to a filter and a transformer for feeding power to the utility grid or for supplying a load in an island grid. Using a low-frequency transformer increases the safety of the setup, because of the galvanic isolation from the grid, even though this is not the most efficient topology [2]. The setup is flexible and can be programmed to operate in several different modes, like shown in Fig. 2. Possible operating modes are: 1) Battery charge controller from PV: In this mode, the system acts as a battery charge controller and MPPT. DCloads can be connected to the battery. This mode forms a P P LF−Transformer 11 00 00 11 00 11 PV−Panel Boost−DC/DC MPPT ~ common DC−link Inverter LC−Filter (Island−) grid P 111 000 000 111 DC/DC for battery− (dis−)charging Fig. 1. Block diagram of the converters Battery fused and switchable Terminal for DC−loads 2 2 3 TABLE I R ATINGS 4 1 1 11 00 00 11 00 11 2 3 2 3 4 PV−Panel Boost−DC/DC MPPT ~ DC-link voltage (Island−) grid Max. input voltage (PV) 35 V MPP tracking range 10..35 V Inverter Legend: 1: Solar home system (only DC−loads) 2: Grid tied inverter 3: Battery−inverter with island−grid 4: MPPT for DC−loads 1 000 111 111 000 000 111 1 3 35 V Max. input current (PV) 10 A Battery voltage range 10..30 V Max. battery current 10 A Continuous power all stages 150 W Transformer pri.: 24 V; 6,25 A; sec: 230 V; 0,7 A DC−load Vbat RS232 To relays Relays Drivers JTAG JTAG connector PC (GUI & CCS) Block diagram of inverter board +3.3V +12V Additional digital I/O EPWM5A EPWM4B EPWM4A EPWM3B PWM +5V SCI DAC PWM_INV4 PWM_INV1 PWM_INV2 PWM_INV3 PWM_DISC PWM_CHG PW_BOOST ADC EPWM3A EPWM2A EPWM1A MOSFET DRIVERS EPWM2B PWM_CHG PWM_DISC Analog signals conditioning, scaling and offset 0-3V signals Fig. 3. Grid DC Load Ibat Iac Vac Ibat Vac_inv Vpv ± 10V Local ac Loads Relay2 Battery C. Hardware structure and block diagram 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. Vac Iac PWM_INV1/2/3/4 Bi-directional DC/DC Fuse Additional analog signals LF Transformer Inverter Status LEDs Ipv Vac_inv Vdc_link Relay3 Boost DC/DC Relay1 Vpv PV array B. Electrical ratings For easy and safe use, all voltages on the board are limited to ”Safety extra low Voltage” (SELV) which is below 42 V [3]. The DC-link-voltage is set to a maximum of 35 V. Since the PV-modules are connected through a boost-converter, the maximum voltage of the PV-modules should be in the same range. The converter for the battery has a boost-characteristic from the battery to the DC-link and a buck-characteristic in the other direction. Reasonable system-voltages for the battery are therefore 12 or 24 V. The power rating of all converter stages is 150 W. This is still small enough to make a cheap board without large heatsinks, but it is enough power for reasonable operation of a small one-family-PV-system which could supply lamps, a laptop, and charge mobile devices. A summary of the technical data is given in table I. +12V ± 10V +5V +3.3V Power Supply Vbat system also known as solar home system. (PV → Battery → DC-load). 2) Grid-tie-inverter with MPPT: In this mode, only the MPPT-converter and the inverter are used. A battery is not connected (PV → AC-Load → Grid). 3) Battery-inverter for island grid: Instead of the grid, an AC-load is connected and is supplied from PV-power and/or the battery (PV → AC-Load). 4) MPPT for DC loads: This scenario supplies power from the PV array directly to the DC load. No battery is connected. A typical application is water pumping (PV → DC-load). 5) Combinations of the above: In addition there are other possible combinations. Some examples are: Grid-tie-inverter with short term energy storage (supplying peak loads from the battery for grid stabilization) and a battery charge controller from the grid (useful for hybrid systems with a diesel generator). 1) DSP: A central part of the board is the DSP. It is controlling the power electronic stages by pulse-width modulation (PWM) and receives feedback via several analog measurements. For our board the TMS320F2808 from Texas Instruments is used. It is a fixed-point DSP, running at 100 MHz. For avoiding problems during the manual soldering we decided to use a controlCARD from TI, which is a small PCB with the DSP, some power-supply components and an isolated RS232-port. The controlCARD can be plugged into a 100-pin DIMM-connector. TI offers some controlCARDs, which are pin-compatible; therefore we could easily change to the alternative DSPs TMS320F28035 and TMS320F28027. Sadly we found out that it is very hard to get the required 100-pin DIMM-socket. Even TI itself seems to be unable to deliver it. Therefore we plan to put the DSP directly on our PWM_BOOST Possible operation modes Vdc-link Fig. 2. Battery Ipv DC/DC for battery− (dis−)charging I/O 3 board in the next revision. 2) Power supply: One important design criterion for the board is that it should be possible to operate it as a standalone unit. That means it should be independent from external laboratory power supplies or AC-adaptors. Therefore the power supply for the board is taken from the DC-link of the power stage. That means that a connected PV-panel, a battery or any other source connected to the terminals of the converters can be used for supplying the logic circuits 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 gatedrivers), +5 V (Logic, DSP), ±10 V (analog measurements) and 3.3 V (mainly JTAG and clamping of the analog inputs). The different supply voltages are also shown in Fig. 3. 3) Analog measurements: Several analog parameters are measured via the ADC of the DSP for feedback: • • • • • Voltage and current at PV input, voltage at DC-link, voltage and current at battery, inverter voltage and grid voltage and current measured on low-voltage side of transformer. All analog signals are conditioned and scaled to be within the range of 0..3V which is the voltage range which can be converted by the ADC inputs of DSP. Currents are converted to voltages through shunt resistors and then amplified. For ac 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 amplifiers. III. S OFTWARE AND C ONTROL A. Digital control The system is controlled digitally. This increases the flexibility of the converter board, because the control becomes a question of software only. For example, between the configurations for an off-grid-system and a grid-tied inverter no hardware changes will be needed (except for the sources/sinks of the power). For a closer review of advantages of digital control refer to textbooks like [4]. B. Software Framework The software for the DSP is written in C. Fig. 4 shows the flow diagram of the software. At startup, the main subroutine initializes the DSP and all peripheral units like PWMs, ADCs and GPIOs. Then the background loop is entered. It is used to execute non time-critical tasks like communication via the RS232 port and switching of relays and LEDs. The background loop can trigger different tasks on a specific timing. There are tasks which are executed every 1 ms, 10 ms, 100 ms and every second. Currently, five interrupt service routines (ISRs) are used: • End of conversion ADC ISR is triggered when the ADC module completes ADC conversion. This ISR is the most important because it is the time-base for all real-time calculations. In this ISR, values of measured signals (in digital form) are extracted, and scaled. Then all digital controllers which run at the PWM-frequency (50 kHz) are Main 4) PWM and gate drive: All power stages are controlled by PWM-signals generated from the ePWM-modules of the DSP. The DC/DC-converter for MPPT needs only one PWM-signal, the battery-charger needs two inputs with interlock and the inverter requires four PWM-signals with pair-wise interlock. Integrated gate drivers IRS2183 are used. They have an integrated interlock between the upper and lower switch of a leg and insert a fixed deadtime of 400 ns between turn-off and turn-on. Initialization 28x device level Peripheral level System level ISR, ADC 7) Digital Outputs: Some digital output signals are used for 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). Get measured ADC and scaling Calculate averages Background loop Update parameters for controllers and PWMs 1ms task 10 ms task 100 ms task 1 s task Data logging enabled? 5) Serial communication: For communication between the DSP and PC the board has an isolated RS-232 port. The communication is used to transmit commands from a PC to the inverter. Later on we will implement a Graphical User Interface (GUI) on the PC for sending commands, configuring the converter and also to visualize logged data on the PC. 6) JTAG: The DSP can be programmed and debugged via a JTAG port. Texas Instrument’s Code composer studio software is used for software development, debugging and online visualization of the desired variables from the running code in the DSP. EOC ADC ISR Y update datalogger buffers Background loop Every 100µs Timer0 ISR Update counters for timing of tasks in background loop Fig. 4. Exit EOC ADC ISR If Vdclink>35V Trip Zone (TZ) ISR Disable PWMs outputs and turn ON error LED EOC ADC ISR SCIRx ISR Enable logic for serial communicati on manager Flowchart of the control program SCITx ISR Transmit character to PC N 4 • • • • calculated/serviced. This ISR is also used for servicing a data-logger which is very useful for debugging. 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. Trip zone (TZ) ISR is used for protection purposes of the semiconductors on the board. Whenever the DC link voltage exceeds 35 V, the PWM modules are disabled from outputting the PWM signals. This ISR is only used for stopping the inverter and turning on a trip-LED. SCIRx ISR is triggered when there is a character received from the PC GUI through the serial port. SCITx ISR is triggered when there is a character to transmit from the DSP to PC GUI for visualization. CT 1,T 4 = d (1) CT 2,T 3 = Ptimer − d (2) Where C is the new compare value and d is the desired duty cycle. For negative output voltage, d has negative values. Ptimer is the period of the timer. Fig. 6 illustrates the generation of the PWM waveforms for T1/T4 and T2/T3. The frequency of the timer is exaggeratedly low in the figure for simplicity. PRD Compare 1 Timer 1 0 PRD C. PWM generation for the inverter stage Timer 2 The used DSP has a flexible hardware unit for generating PWM waveforms. For the generation a compare value is compared with a counter. When the compare value matches the counter, the unit can fulfill an action like clearing or setting the corresponding output pin. It is possible to differentiate between a compare match at up-count and at down-count. 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 moment, but we plan to program bipolar switching for comparison, too. In the unipolar method the inverter output is switching between the positive DC-link voltage and a zero vector during the positive half wave of the desired output and between the negative DC-link voltage and zero during the negative half wave. Compared to bipolar switching which always switches between positive and negative DC-link voltage, unipolar PWM creates less distortion and reduces the losses in the AC-filter. Fig. 5 shows the switching during positive and negative half wave. When the desired output voltage is positive, only T1 and T4 switch synchronously with HF, while T2 and T3 stay off permanently. For a negative output, only T2 and T3 are switching with HF, while T1 and T4 stay off. T1 T3 + _ T2 Fig. 5. T4 Compare 2 0 1 PWM T1 / T4 0 1 PWM T2/T3 0 Fig. 6. PWM generation D. Control sub-modules Since the setup allows quite complicated combinations of the power processing stages, the control will be developed in sub-modules. These can be operated separately or in connection with each other. As an example, Fig. 7 shows the control structure for grid-tied operation [6]. Here the sub-modules MPPT, PLL and inverter control are used. In the following paragraphs some of the required modules are described: 1) MPPT module: The output of the photovoltaic module/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 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 condition [7]. The MPPT is used to track this point in order to utilize the power from PV array to the maximum. Illustration of unipolar switching V DC,ref For generating the required signals, two PWM-units are used. The timers of the two units are synchronized and are counting up and down, creating a discrete sawtooth carrier signal. Each of the power transistors has its own compare value which determines its duty cycle. The distinction between positive and negative half wave is done by using an “inverted“ compare value for transistors T2 and T3. Whenever the compare registers are updated, they are calculated from the desired duty cycle: I PV MPPT V PV D PWM V DC DC/DC − DC−link voltage− I r controller PV Ir V AC PLL x I g,ref − current controller PWM Ig Fig. 7. Control structure for grid-tie operation DC/AC ~ grid 5 2) Battery charging/discharging module: The bi-directional DC/DC converter operates as a buck converter when charging the battery and as a boost converter when discharging the battery. The charging/discharging algorithm can be developed to cater for different types for batteries since each type of battery has different characteristics. We will start with implementing a charging algorithm for a lead-acid battery, since this is a commonly used type of battery in PV systems. The algorithm to be developed will conform to ones recommeded by battery manufacturers, i.e. a four state charge algorithm with temperature compensation. 3) Inverter current-control module: This module includes a resonant controller for controlling the output-current of the inverter. It is optimized for a sinusoidal reference input. 4) Grid synchronization: A software-PLL is used to generate the phase-angle of the grid voltage from a voltage measurement. This is very helpful for generating a sinusoidal current, even if the grid-voltage is distorted. 5) Frequency and voltage thresholds, anti-islanding: This module checks if the grid voltage is within the allowed tolerances defined in the standards. Also it checks, if the connection to the grid is active or not. The information generated by the module can be used to change the mode of operation from grid-tied to island-operation or vice versa. 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 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 software, 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. IV. R ESULTS AND FUTURE WORK The hardware setup, i.e. the board is finished and tested. A photo of the complete board is shown in Fig. 8. In the background the power stage with the MOSFETs, inductors and DC-link capacitors is visible. More in the foreground the DSP-card and the analog circuitry can be seen. The basic software framework is coded and tested, too. At the moment we are at the stage of implementing the controlsubmodules and the GUI. We will continue the development and will demonstrate the setup in different configurations at Powertech 2011 in Trondheim. V. C ONCLUSION The universal PV-Inverter is useful for teaching and research, because it allows an easy process of getting started with DSP-control of power electronic converters. The board is also fully operational without additional hardware and can be used in actual PV-systems. This is a feature which is not offered by any commercial board on the market. Since digital control is used for control of the converters on the board, it is anticipated that students and researchers will be able to implement various control algorithmms for PV systems and hence improve the techniques for harvesting electricity from PV panels. Fig. 8. Photo of the complete board 6 R EFERENCES [1] Texas Instruments, C2000 Renewable Energy Developer’s Kit (TMDSENRGYKIT), http://focus.ti.com/docs/toolsw/folders/print/ tmdsenrgykit.html, retrieved 22 October 2010. [2] F. Schimpf, L. E. Norum, Grid Connected Converters for Photovoltaic, State of the Art, Ideas for Improvement of Transformerless Inverters, Nordic Workshop on Power and Industrial Electronics, 2008, 9-11 June 2008, Espoo, Finland. [3] European standard IEC 60664-1:2007, Insulation coordination for equipment 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 2004, revised July 2009 [6] R. Theodorescu, V. Benda, P. Rodriguez, D. Sera, T. Kerekes, Course material from Industrial/PhD-course Photovoltaic Power Systems - in theory and practice, October 25-28 2010, Department of Energy Technology, Aalborg University, Aalborg, Denmark [7] F. M Ishengoma, L. Norum, Design and implementation of a digitally controlled stand-alone photovoltaic power supply, in Proc. 2002 NORDIC Workshop on Power and Industrial Electronics. Fredrick Ishengoma received his MSc degree in Control Engineering from Bradford University, Bradford, England in 1988. Since 1988, he is a member of academic staff at the department of Electrical and Computer Systems Engineering, University of Dar es Salaam, Tanzania. Currently he is a PhD student at Norwegian University of Science and Technology, Norway. His research focus is on Control and Energy Management of hybrid PV systems for microgrid applications. Fritz Schimpf finished his MSc degree in Electrical Power Engineering 2004 at the University of Technology Berlin, Germany (TU Berlin). From 2004 to 2007 he worked in the R&D-department of SMA Solar Technology AG in Kassel, Germany on transformer-less grid-tied inverters for PV applications. Since 2008 he is a PhD-student at the Norwegian University of Science and Technology (NTNU) in Trondheim, Norway with research focus on Power Electronic Converters for PV-applications. Lars Einar Norum received his MSc and PhD degrees in Electrical Engineering from the Norwegian Institute of Technology (NTH), Trondheim in 1975 and 1985 respectively. From 1975 to 1980 he was a member of the research staff at the Norwegian Electric Power Research Institute. He then joined the Norwegian University of Science and Technology (NTNU), where he is currently a 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. He has been involved in many research and industrial development projects in the field of power and industrial electronics. Presently his research activities are within the field of digital and analogue signal processing, mathematical modelling and control of electrical energy conversion in renewable energy systems. Prof. Norum is a member of IEEE, ACM and ISES. He has served as President for the Board of Science and Technology at the Norwegian Society of Chartered Engineers (1997-2001).