04154535

4
First International Power and Energy Coference PECon 2006 November 28-29, 2006, Putrajaya, Malaysia Development of a Single Phase SPWM Microcontroller-Based Inverter B. Ismail, S.Taib MIEEE, A. R Mohd Saad, M. Isa, C. M. Hadzer 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. 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 is 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. 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 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. 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 AT89C2051- 24PI 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 437

Upload: malini72

Post on 30-Nov-2015

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 04154535

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

Development of a Single Phase SPWMMicrocontroller-Based Inverter

B. Ismail, S.Taib MIEEE, A. R Mohd Saad, M. Isa, C. M. Hadzer

Abstract - This paper presents the development of singlephase sinusoidal pulse width modulation (SPWM)microcontroller-based inverter. The attractiveness of thisconfiguration is the used of a microcontroller to generatesinusoidal pulse width modulation (SPWM) pulses.Microcontroller is able to store the required commands togenerate the necessary waveforms to control the frequency ofthe inverter through proper design of switching pulses. TheSPWM technique was used to produce pure sinusoidal wave ofvoltage and current output. This inverter is designed to beeither for stand-alone or for grid connected from a directsupply of photovoltaic (PV) cells. In this paper SPWMswitching technique is first reviewed. Subsequently controlcircuit and power circuit for inverter are discussed. Finally theexperimental results are discussed. The 200W designedprototype of the inverter was tested with the resistive load andfound that total harmonic distortion (THD) is less than 4 % forvoltage and 8 % for current.

Keywords-- Sinusoidal pulse width modulation, inverter,microcontroller.

I. INTRODUCTION

PWM or sinusoidal pulse width modulation is widelyused in power electronics to digitize the power so that a

sequence of voltage pulses can be generated by the on andoff of the power switches. The pulse width modulationinverter has been the main choice in power electronic fordecades, because of its circuit simplicity and rugged controlscheme [1]. SPWM switching technique is commonly usedin industrial applications [2]. SPWM techniques are

characterized by constant amplitude pulses with differentduty cycle for each period. The width of this pulses are

modulated to obtain inverter output voltage control and toreduce its harmonic content. Sinusoidal pulse widthmodulation or SPWM is the mostly used method in motorcontrol and inverter application. In this development a

unipolar SPWM voltage modulation type [3]-[4] is selectedbecause this method offers the advantage of effectivelydoubling the switching frequency of the inverter voltage,thus making the output filter smaller, cheaper and easier toimplement. Conventionally, to generate this signal, trianglewave as a carrier signal is compared with the sinusoidalwave, whose frequency is the desired frequency.

The proposed alternative approach is to replace theconventional method with the use of microcontroller. Theuse of the microcontroller brings the flexibility to change the

B.Ismail is Vocational Traning Officer at school of electrical systemengineering KUKUM and Master Candidate at school of electrical andelectronic engineering USM.email:yS.Taib is with the School of Electrical and Electronic EngineeringUniversiti Sains Malaysia, P Pinang, email:soibe s

A.R.Mohd Saad, M.Isa and C.M Hadzer are with Kolej UniversitiKejuruteraan Utara Malaysia.

real-time control algorithms without further changes inhardware. It is also low cost and has a small size of controlcircuit for the single phase full bridge inverter.

II SYSTEM OVERVIEW

The inverter developed is intended for stand aloneoperation. Although it is designed for stand alone operation,this single phase inverter may also be arranged so that itcould 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.

Fig. 1. Inverter system overview

The system consists of microcontroller circuit forgenerating SPWM pulses, optoisolator or isolation circuit,gate drivers, inverter circuit or full bridge circuit, filtercircuit and step up transformer. SPWM signal generated bymicrocontroller needs to be isolated for protection andsafety between a safe and a potentially hazardousenvironment. The outputs are then fed to gate drivers whichcontains four independent electrically-isolated MOSFETdrivers. The outputs of the gate drivers are then distributedto power switches in full bridge arrangement. The output ofthe inverter has square waveform due to the switchingpattern. In order to get a sine wave signal the LC filter wasused to reduce harmonic content. The output then fed to stepup transformer to get the required output level.

III. CONTROL CIRCUIT

To generate the SPWM signal an Atmel AT89C2051-24PI microcontroller was used. The AT89C2051-24PI is a

low voltage, high performance CMOS 8-bit microcomputerwith 2K bytes of Flash programmable and erasable readonly memory (PEROM). The device is manufactured usingAtmel's high density nonvolatile memory technology and iscompatible with the industrial standard MCS-5 1 instructionsset. It also has two 16-bit timers that deliver the function

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

437

Page 2: 04154535

used in this application. By combining a versatile 8 bit CPUwith Flash on a monolithic chip, the AT89C205 1 ispowerful microcomputer which provides a highly flexibleand cost effective solution to many embedded controlapplications. Fig. 2 presents the AT89C5 1-24PI pinsassignment for the control system of SPWM in single phaseinverter system.

3OpF

3F _

3OpF

RST VCCP30 P17P3.1 P1 6X TAL2 p5

P 1.4P1 3

XTALI P1 2

P32 P 11P 3.3 P l 0

P34 P37

P34GNI

5V

SPWM 1SPVM 2

Fig. 2. Pins assignment for the control system of SPWM singleinverter.

The microcontroller is developed as the controller cito make the design simpler, more reliable and theimportant one is to reduce their dimensions and compon(Only one component can perform the function of a wcircuit, being dependent on the project to be implementea small standalone microcontroller embedded inconverter system.

Fig. 3 below shows the switching strategy and Fishows the MOSFETs firing sequences that are used indevelopment.

438

The turn ON and OFF switch 1 (SI) and switch 4 (S4) arecontrolled by SPWM 1 generated at port 1.7microcontroller. While the turn ON and OFF switch 2 (S2)and switch 3 (S3) are controlled by SPWM 2 generated atport 1.6 microcontroller. Both SPWM 1 and SPWM 2 usedthe same control signal generated by the microcontroller.The different is only SPWM 1 signal is leading SPWM 2 byhalf cycle or 180 degree ofthe switching signal.

A. Isolation Circuit

The isolation circuit is used to isolate signals forprotection and safety between a safe and a potentiallyhazardous environment. The interfacing of the isolationcircuit between digital signals needs to be designed correctlyfor proper protection. The maximum applied voltage forsingle phase inverter is 240V, since the microcontrolleroperates at 5V level it is desired to isolate the control boardfrom higher voltage of the inverter circuit. This can be doneby using SFH618A optocoupler. Fig. 5 below shows theoptocoupler circuit.

phase

rcuitmostents.holed by

I A Collect,

2 C Emitt e r

FROM SPTWM 1 OR 2S F H 61 8A

the Fig. 5. Isolation circuit

ig. 4 B. Gate Driveri this

Basically, there are two fundamental categories for gatedrivers. These are high side and low side drivers. High sidemeans the source of MOSFET of the power element canfloat between ground and high voltage power rail. Low sidemeans the source of the MOSFET is always connected toground. For the gate drivers to operate as a bootstrap circuit,the Vbs voltage is used to provide the supply to the high sidedriver circuitry of the gate driver. Vbs is the voltagedifference between the Vb and Vs pins on the gate driver IC.

s4

Fig. 3. Switching strategy for single phase inverter

S1. S4,& uimlmuaa

. h12_1

Voutinverter

Fig. 4. MOSETls tiring sequences

Fig. 6. Gate driver circuit

This supply needs to be in the range of 1OV to 20V toensure that the gate driver is fully enhanced the powerMOSFET. The Vbs supply is the floating supply that sits onthe top of the Vs voltage. There are various methods togenerate the Vbs supply. One of these is bootstrap method.This method is simple and inexpensive but has somelimitations. The duty cycle and the on time are limited by

Page 3: 04154535

the requirement to refresh the charge in the bootstrapcapacitor Cbs. Selecting the suitable bootstrap diode is veryimportant. The bootstrap diode must be fast enough toswitch the inverter switches. Therefore, an ultra fast diode,UF4001 is used in this circuit. The design of the gate driverwith bootstrap supply in the form of bootstrap diode andcapacitor is shown in Fig. 6.

III. POWER CIRCUIT

The power circuit topology chosen is full bridge inverter.Fig. 7 shows the full bridge inverter topology. It consists ofDC voltage source or photovoltaic module, four switchingelements (MOSFETs), LC filter, transformer and load. Thefull bridge topology is chosen with considerations that itmust be capable of delivering high current at low voltage.This property is important if the inverter is designed forphotovoltaic applications.

439

resistive load. The amplitude of current waveform is around435 mA and THD is 7.8%.

SPWM 1

SPWM 2

Fig. 9. SPWM 1 and SPWM 2 waveform (2V/div) generating pulses frommicrocontroller

+4-

v 1 11 4 IC <e ~~~ad

Fig. 7 Full bridge inverter topology.

A. LC Filter and Step-up Transformer

The LC filter is required to reduce harmonic content andto make the signal become sinusoidal. The sinusoidal outputsignal then fed to step-up transformer to amplify the voltageto proper level. The arrangement of the LC filter and step-uptransformer is shown in Fig. 8.

L

from theto load

inverterl

Fig. 8. The LC filter and transformer arrangement

IV. EXPERIMENTAL RESULTS

Tektronix TPS 2014, four channel digital storageoscilloscope was used to measure the experimental results.The experimental result from microcontroller output port isshown in Fig. 9. SPWM 1 is output from port 1.7 andSPWM 2 is output from port 1.6 microcontrollers. SPWM 1

is leading SPWM 2 by half cycle of the switching signal.Fig. 10 shows the waveform of the output of the inverterbefore the filter. Fig. 11 shows the output voltage waveformfrom single phase inverter with resistive load. Thewaveform is pure sinusoidal with amplitude around 240Vrms, 50Hz and THD is around 3.7 %. Fig. 12 shows theoutput current waveform from single phase inverter with

Fig. 10. Output wxaveform (IOV/div) from single phase inverter beforefilter

_ .7 /_f/ \

Fig. I11. Output voltage waveform (I1OOV/div) with resistive load andTHD =3.7 O

Fig. 12. Output current wxaxveform (200mA/dix) wxith resistixve load andTHD =7.8 O

IV. CONCLUSION

The single phase SPWM microcontroller-based 200Winverter is designed and tested. It gives a good result for thesolar panel application. It was found that the THD is lessthan 4 00 for voltage and 800 for current which comply withIEEE (519-1992) standard. In order to achieve a muchbetter performance, several improvements are being madeand the work is in progress.

Page 4: 04154535

VI. REFERENCES

[1] Maria D. Bellar, Tzong-Shiann Wu, Aristide Tchamdjau, JavadMahdavi and M. Ehsani, " A Review of Soft-switched DC-AC Converter,"IEEE trans. On Industry Appl, vol. 43, no. 4, pp 847-858, 1998.

[2] Muhammad H. Rashid. "Power Electronics; Circuit's Devices andApplications",Third Edition, Prentice Hall 2004.

[3] L. Mihalache. "DSP Control Method of Single -Phase Inverters for UPSApplications ". IEEE Trans. On Industry Application. 2002, pp 590-595.

[4] N. Mohan, T.M.Undeland, W.P.Robbins, " Power Electronic-Converters,Applications and Design", Second edition, John Wiley & Sons Inc., 1995.

[5] N Kutkut. Deepakraj m. Divan et. al. ," An Improved Full-Bridge Zero-Voltage Switching PWM Converter Using a Two-Inductor RectifieirIEEE Trans. On Industry Appl. Vol. 31 no. 1, 1995.

[6] J. Sutanto." Losses Analysis of DC/DC Converter Based on 3 Level NPCZVS Inverter", Masters Thesis Project,Electrical Engineering Dept. 1999.

[7] IEEE Recommended Practice and Requirements for Harmonic Control inElectrical Power System, IEEE Standard 519-1992, 1992.

VI. BIOGRAPHIES

Baharuddin bin Ismail was born in

Pendang, Kedah, Malaysia in 1976. He

received his B.Eng (Hons) in electrical

engineering from UTM in 1999. From

Nov 1999 to Dec 2002 he held the

position as a electrical engineer at

Malayawata Steel Bhd. He now is

vocational training officier at school of

e lecica system engineering, KUKUM

~snce 2003 and currently working towards

his master degree in power electronic for

renewable energy (photovoltaic) at schoolof electrical and electronic engineering USM.

Soib Bin Taib received his BSc from

Universiti Sains Malaysia in 1984. Worked

as System Engineer at PERNAS NEC in

1985. Obtained MSc and PhD degreesfrom Bradford University UK in 1986 and

1990 respectively. Attached to the School

of Electrical and Electronic Engineering,USM as the head of Electrical PowerProgram. Research interest in Power

Electronic and Drives, Experts Systemsand currently involved in the development of Renewable Energy System.

440

Abdul Rahman Bin Mohd Saad was born inAlor Setar , Kedah. He received his B.Eng(Hons) and M. sc from USM in 1989and 2001 respectively. He is lecturer inschool of computer and communicationKUKUM since 2002. Research interests inembedded system and microcontrollerapplications. He now is Dean atengineering centre, KUH Ki OM.

Muzamir Bin Isa received his B.Eng inElectrical Engineering from UTM, Skudai,Johor, Malaysia in 2001. After two yearsof working experience with TelekomResearch & Development Sdn Bhd, in

Serdang, Selangor, he jaoints KUKUM asVocational Training Officer. After 6months, he started his graduate studies in2003 at Tun Hussein Onn UniversityCollege (KUITTHO) for M.Eng degree inelectrical power engineering. He has been

with KUKUM as a lecturer since December, 2004. He is lecturer of Schoolof Electrical Engineering in KUKUM. Muzamir is a Deputy Dean instudents affairs and alumni. His research interests include renewableenergy, fuel cell engineering, lightning protection system and high voltageengineering.

Che Mat Hadzer Mahmud received hisBSc and Jr degrees in electronicengineering from Institute TechnologyBandung, Indonesia in 1976. After twoyears of working experience with Radio& TV Malaysia, he joint USM as a fellowin Academic Staff Training Scheme in1978. He then started his graduate studiesin 1978 at Salford University for MScdegree and moved to UMIST in 1979 forPhD in electronic control engineering and

control engineering respectively. He has been with USM as a lecturer since1984. He is Associate Professor of School of Electrical & Electronic Eng,USM Engineering Campus, Nibong Tebal. Che Mat Hadzer is ProgramChairman for Electronic Engineering. He is now a Professor at KUKUM.His research interests include Electronic Control Engineering, PowerQuality and Renewable Energy.