You are on page 1of 4

First International Power and Energy Coference PECon 2006 November 28-29, 2006, Putrajaya, Malaysia

437

Development of a Single Phase SPWM Microcontroller-Based Inverter
B. Ismail, S.Taib MIEEE, A. R Mohd Saad, M. Isa, C. M. Hadzer
real-time control algorithms without further changes in hardware. It is also low cost and has a small size of control circuit for the single phase full bridge inverter.
II SYSTEM OVERVIEW

Abstract - This paper presents the development of single phase sinusoidal pulse width modulation (SPWM) microcontroller-based inverter. The attractiveness of this configuration is the used of a microcontroller to generate sinusoidal pulse width modulation (SPWM) pulses. Microcontroller is able to store the required commands to generate the necessary waveforms to control the frequency of the inverter through proper design of switching pulses. The SPWM technique was used to produce pure sinusoidal wave of voltage and current output. This inverter is designed to be either for stand-alone or for grid connected from a direct supply of photovoltaic (PV) cells. In this paper SPWM switching technique is first reviewed. Subsequently control circuit and power circuit for inverter are discussed. Finally the experimental results are discussed. The 200W designed prototype of the inverter was tested with the resistive load and found that total harmonic distortion (THD) is less than 4 % for voltage and 8 % for current. Keywords-- Sinusoidal pulse width modulation, inverter, microcontroller.
I.

The inverter developed is intended for stand alone operation. Although it is designed for stand alone operation, this single phase inverter may also be arranged so that it could be operated as an inverter parallel to power lines, unity power factor rectifier or static VAR Generator (SVG) [5]-[6]. The block diagram of the whole system is shown in Fig. 1 below.

INTRODUCTION

PWM or sinusoidal pulse width modulation is widely used in power electronics to digitize the power so that a sequence of voltage pulses can be generated by the on and off of the power switches. The pulse width modulation inverter has been the main choice in power electronic for decades, because of its circuit simplicity and rugged control scheme [1]. SPWM switching technique is commonly used in industrial applications [2]. SPWM techniques are characterized by constant amplitude pulses with different duty cycle for each period. The width of this pulses are modulated to obtain inverter output voltage control and to reduce its harmonic content. Sinusoidal pulse width modulation or SPWM is the mostly used method in motor control and inverter application. In this development a unipolar SPWM voltage modulation type [3]-[4] is selected because this method offers the advantage of effectively doubling the switching frequency of the inverter voltage, thus making the output filter smaller, cheaper and easier to implement. Conventionally, to generate this signal, triangle wave as a carrier signal is compared with the sinusoidal wave, whose frequency is the desired frequency. The proposed alternative approach is to replace the conventional method with the use of microcontroller. The use of the microcontroller brings the flexibility to change the
B.Ismail
Vocational Traning Officer at school of electrical system engineering KUKUM and Master Candidate at school of electrical and electronic engineering USM.email:y S.Taib is with the School of Electrical and Electronic Engineering Universiti Sains Malaysia, P Pinang, email:soibe s A.R.Mohd Saad, M.Isa and C.M Hadzer are with Kolej Universiti Kejuruteraan Utara Malaysia.
is

Fig. 1. Inverter system overview

The system consists of microcontroller circuit for generating SPWM pulses, optoisolator or isolation circuit, gate drivers, inverter circuit or full bridge circuit, filter circuit and step up transformer. SPWM signal generated by microcontroller needs to be isolated for protection and safety between a safe and a potentially hazardous environment. The outputs are then fed to gate drivers which contains four independent electrically-isolated MOSFET drivers. The outputs of the gate drivers are then distributed to power switches in full bridge arrangement. The output of the inverter has square waveform due to the switching pattern. In order to get a sine wave signal the LC filter was used to reduce harmonic content. The output then fed to step up transformer to get the required output level.
III.

CONTROL CIRCUIT

To generate the SPWM signal an Atmel AT89C205124PI microcontroller was used. The AT89C2051-24PI is a low voltage, high performance CMOS 8-bit microcomputer with 2K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel's high density nonvolatile memory technology and is compatible with the industrial standard MCS-5 1 instructions set. It also has two 16-bit timers that deliver the function

1-4244-0273-5/06/$20.00 (C2006 IEEE

s4 Basically.& S1. 5 below shows the optocoupler circuit. 2 presents the AT89C5 1-24PI pins assignment for the control system of SPWM in single phase inverter system. the Vbs voltage is used to provide the supply to the high side driver circuitry of the gate driver. more reliable and the most important one is to reduce their dimensions and compon(ents. The interfacing of the isolation circuit between digital signals needs to be designed correctly for proper protection. C Emitt e r S F H 61 8A FROM SPTWM 1 OR 2 Fig. 6. High side means the source of MOSFET of the power element can float between ground and high voltage power rail. Fig. since the microcontroller operates at 5V level it is desired to isolate the control board from higher voltage of the inverter circuit.3 P34 P34 GNI The isolation circuit is used to isolate signals for protection and safety between a safe and a potentially hazardous environment. For the gate drivers to operate as a bootstrap circuit. These are high side and low side drivers. the AT89C205 1 is powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications. Switching strategy for single phase inverter . Isolation Circuit 3OpF P3. 5.6 microcontroller. Low side means the source of the MOSFET is always connected to ground. While the turn ON and OFF switch 2 (S2) and switch 3 (S3) are controlled by SPWM 2 generated at port 1. Fig. Fig. MOSETls tiring sequences This supply needs to be in the range of 1OV to 20V to ensure that the gate driver is fully enhanced the power MOSFET. The maximum applied voltage for single phase inverter is 240V. 3. Pins assignment for the control system of SPWM single phase inverter. 4 shows the MOSFETs firing sequences that are used ini this I 2 A Collect. Fig. This can be done by using SFH618A optocoupler. There are various methods to generate the Vbs supply. S4 uimlmuaa . A. Fig. 5V RST VCC The turn ON and OFF switch 1 (SI) and switch 4 (S4) are controlled by SPWM 1 generated at port 1.1 X TAL2 _ P30 P17 SPVM 2 P1 6 p5 P 1. Isolation circuit B. 2. being dependent on the project to be implemente d by a small standalone microcontroller embedded in the converter system. One of these is bootstrap method. By combining a versatile 8 bit CPU with Flash on a monolithic chip. Only one component can perform the function of a whole circuit. h12 _1 Fig. Gate Driver development. The duty cycle and the on time are limited by . 3 below shows the switching strategy and Fiig. This method is simple and inexpensive but has some limitations.438 used in this application. Gate driver circuit Voutinverter Fig. there are two fundamental categories for gate drivers. Both SPWM 1 and SPWM 2 used the same control signal generated by the microcontroller. The Vbs supply is the floating supply that sits on the top of the Vs voltage. 4.4 P1 3 P1 2 P 11 Pl 0 P37 SPWM 1 3F 3OpF XTALI P32 P 3.7 microcontroller. The microcontroller is developed as the controller ci rcuit to make the design simpler. Vbs is the voltage difference between the Vb and Vs pins on the gate driver IC. The different is only SPWM 1 signal is leading SPWM 2 by half cycle or 180 degree of the switching signal.

It consists of DC voltage source or photovoltaic module. LC Filter and Step-up Transformer transformer is shown in Fig.7 O Output voltage waveform (I1OOV/div) with resistive load and to load l Fig. transformer and load. four switching elements (MOSFETs). SPWM 2 Fig. UF4001 is used in this circuit.439 the requirement to refresh the charge in the bootstrap capacitor Cbs. It was found that the THD is less than 4 00 for voltage and 800 for current which comply with IEEE (519-1992) standard. 12 shows the output current waveform from single phase inverter with Fig. four channel digital storage oscilloscope was used to measure the experimental results. CONCLUSION The single phase SPWM microcontroller-based 200W inverter is designed and tested. Fig. SPWM 1 and SPWM 2 waveform (2V/div) generating pulses from microcontroller +4- v 1 11 4 IC <e ~~~ad _ . SPWM 1 III. EXPERIMENTAL RESULTS Tektronix TPS 2014.8 O IV. The full bridge topology is chosen with considerations that it must be capable of delivering high current at low voltage. Fig.8%. The waveform is pure sinusoidal with amplitude around 240 Vrms. This property is important if the inverter is designed for photovoltaic applications. 50Hz and THD is around 3. It gives a good result for the solar panel application. 11 shows the output voltage waveform from single phase inverter with resistive load. . LC filter. 7 Full bridge inverter topology. 9. The bootstrap diode must be fast enough to switch the inverter switches.6 microcontrollers. 9. The experimental result from microcontroller output port is shown in Fig. resistive load. Selecting the suitable bootstrap diode is very important.7 %. 7 shows the full bridge inverter topology. Output wxaveform (IOV/div) from single phase inverter before filter Fig. 10. Therefore. The LC filter and transformer arrangement IV. The amplitude of current waveform is around 435 mA and THD is 7. 8. from the inverter THD =3. I11. POWER CIRCUIT The power circuit topology chosen is full bridge inverter. / \ A. 10 shows the waveform of the output of the inverter before the filter. The sinusoidal output signal then fed to step-up transformer to amplify the voltage to proper level. several improvements are being made and the work is in progress. L The LC filter is required to reduce harmonic content and to make the signal become sinusoidal. SPWM 1 is leading SPWM 2 by half cycle of the switching signal. In order to achieve a much better performance. 12. The arrangement of the LC filter and step-up Fig. Output current wxaxveform (200mA/dix) wxith resistixve load and THD =7. SPWM 1 is output from port 1. Fig. an ultra fast diode. 8. 6.7 and SPWM 2 is output from port 1. Fig.7 /_f Fig. The design of the gate driver with bootstrap supply in the form of bootstrap diode and capacitor is shown in Fig.

Vol. Sutanto. Worked 1985. Indonesia in 1976. On Industry Appl." Losses Analysis of DC/DC Converter Based on 3 Level NPC ZVS Inverter". pp 847-858. Eng(Hons) and M. BIOGRAPHIES Baharuddin bin Ismail from UTM was in born 1976. He received his B. lightning protection system and high voltage engineering. engineering centre. electrical engineer Malayawata Steel Bhd. Experts Systems and currently involved in the development of Renewable Energy System. Muzamir is a Deputy Dean in students affairs and alumni. no. he started his graduate studies in 2003 at Tun Hussein Onn University College (KUITTHO) for M. Ehsani. Nov 1999 to Dec 2002 position as a held the at is Muzamir Bin Isa received his B.Robbins. 2002. He now is Dean at H KUKi OM. Malaysia in 2001. "DSP Control Method of Single -Phase Inverters for UPS Applications ". He is now a Professor at KUKUM. USM as the head of Electrical Power Program. USM Engineering Campus. He has been with USM as a lecturer since 1984. Tzong-Shiann Wu. pp 590-595. Skudai. His research interests include Electronic Control Engineering." An Improved Full-Bridge ZeroVoltage Switching PWM Converter Using a Two-Inductor Rectifieir IEEE Trans. He is lecturer in school of computer and communication KUKUM since 2002." IEEE trans. Che Mat Hadzer is Program Chairman for Electronic Engineering. Johor. Kedah. Deepakraj m. Mohan. he joint USM as a fellow in Academic Staff Training Scheme in 1978. After two years of working experience with Telekom Research & Development Sdn Bhd.Eng degree in electrical power engineering. Malaysia engineering received his B. 2004. Bellar. N Kutkut. L.P. sc from USM in 1989 and 2001 respectively. W. [4] [5] [6] [7] VI. Soib Bin Taib received Universiti Sains Malaysia as degree electronic for his in BSc from in 1984. IEEE Recommended Practice and Requirements for Harmonic Control in Electrical Power System. IEEE Trans. Second edition. John Wiley & Sons Inc. . 1998. His research interests include renewable energy. 1995. Power Quality and Renewable Energy. in He Pendang. Abdul Rahman Bin Mohd Saad was born in Alor Setar Kedah. fuel cell engineering. T. Javad Maria D. IEEE Standard 519-1992.Undeland. in Serdang. . Attached to the School of Electrical and Electronic Engineering. Masters Thesis Project. On Industry Application. 1995. Prentice Hall 2004. Che Mat Hadzer Mahmud received his BSc and Jr degrees in electronic engineering from Institute Technology Bandung.440 VI. After 6 months. He then started his graduate studies in 1978 at Salford University for MSc degree and moved to UMIST in 1979 for PhD in electronic control engineering and control engineering respectively.Electrical Engineering Dept. J. al. 1992.Eng in Electrical Engineering from UTM. After two years of working experience with Radio & TV Malaysia. " Power Electronic-Converters.Third Edition. training officier He at now vocational school of e lecica ~snce his system engineering. 4. . He has been with KUKUM as a lecturer since December. Research interest in University UK in 1986 and Power Electronic and Drives. "Power Electronics.Eng (Hons) in in he electrical From 1999. Aristide Mahdavi and M. Divan et. Mihalache.M. Obtained MSc and PhD degrees from Bradford System Engineer at PERNAS NEC 1990 respectively. N. " A Review of Soft-switched DC-AC Converter. REFERENCES [1] [2] [3] Tchamdjau. he jaoints KUKUM as Vocational Training Officer. 1999. KUKUM 2003 and currently working in power towards master renewable energy (photovoltaic) at school of electrical and electronic engineering USM. 1. Muhammad H. He is Associate Professor of School of Electrical & Electronic Eng. Nibong Tebal. He is lecturer of School of Electrical Engineering in KUKUM. vol. 43.. On Industry Appl. Circuit's Devices and Applications". Selangor. Rashid. Applications and Design". Research interests in embedded system and microcontroller applications. 31 no.