Sunteți pe pagina 1din 5

POWERENG 2009

Lisbon, Portugal, March 18-20, 2009

Design and Implementation of Microcontroller based PWM technique for Sine wave Inverter
A.Ali Qazalbash, Awais Amin, Abdul Manan and Mahveen Khalid
Department of Electrical Engineering National University of Sciences and Technology College of Electrical & Mechanical Engineering, Peshawar road, Rawalpindi PAKISTAN aliqazalbash@ceme.edu.pk,{abdulmanan2005, awais.amin1, mahveen.khalid}@gmail.com

Abstract A microcontroller based advanced technique of generating sine wave with minimized harmonics is implemented in this paper. The proposed technique impulse-sine product aims to design and implement a voltage regulated inverter with ripple free and glitch free output sine wave that can operate electronic devices efficiently. The output voltage of the inverter is regulated by a feedback loop using analog to digital protocol of PIC16f877 microcontroller. The design is essentially focused upon low power electronic appliances such as personal computers, chargers, television sets. The inverter output is regulated from 16-volt rms to 220-volt rms for a variation of load between 1- to 180- loads. The designed inverter provides a range of operation from 25 Watts to 250 Watts. The design is mathematically modeled which is simulated in Matlab, Proteus and finally the results are practically verified. Key-Words: - Sinusoidal pulse width modulation (SPWM), High voltage direct current (HVDC), Analog to Digital converter (ADC), Un-interruptible power supply (UPS), Reduced instruction set computer (RISC).

Fig. 1 Basic Design of an Inverter The sine wave inverter design, involves rectification and inversion modes which include bridge technique, PWM technique, converter or a transformer, output filter and a feedback loop for voltage regulation. There are many methods of generating PWM. Most common of these are comparing a sinusoid with a triangular wave. Analysis of PWM inverter is explained in [4]. High frequency link uses special type of PWM explained in [5], [6] and [7]. II.

I.

INTRODUCTION

Energy crisis are of special attention now-a-days. A need for reasonable power rating inverter is required to smoothly operate electrical and electronic appliances. Most of the commercially available UPS are actually square wave inverters or quasi sine wave inverters. Lights and fans can only be switched with the help of them and other electronic devices cannot be plugged into them as they damage them. Available sine wave inverters are very expensive and by examining the output wave, it is observed that it is not of good quality. Quality of output waveform of an inverter is determined by the harmonic contents present in it. An ideal inverter should only have a fundamental harmonic component at the designed frequency. Square wave contains odd harmonics from which fundamental harmonic component can be extracted by applying higher order filter. Higher order filters in terms of inductors and capacitors are physically unrealizable, its mathematical analysis becomes complex and gain of the system decreases drastically. There are different topologies for implementing sine wave inverter as discussed in [1]. Sine wave inverter is widely used in many commercial and industrial applications including uninterruptable power supplies, induction heating, variable frequency drives, electrical vehicle drives and HVDC links. The basic design of an inverter [2], [3] is shown in Fig.1

GENERAL DESCRIPTION OF THE PROPOSED


DESIGN

Proposed technique is unique of its type because it is implemented through a low cost RISC microcontroller PIC16f877. The operating speed supported by PIC16f877 is 20 MHz clock input [8], [9]. The reference voltage of the ADC module is 5 V with the resolution of 10 bits. High frequency PWM can be generated using this controller. A filter is connected at the output stage of the inverter to translate PWM to a sinusoid wave. The filter is designed in such a wave that it removes harmonics. Voltage regulation is one of the important features of the inverter that requires feedback loop for monitoring the output voltage, voltage regulation has also been addressed in the proposed design. Our designed system parameters are given in Table 1: Table 1 System Parameters Power rating Output voltage (regulated) Peak output current Inverter switching frequency Maximum load (tested) 250 VA 220 V 1.2A 4 kHz 180 ohms

978-1-4244-2291-3/09/$25.00 2009 IEEE

163

Authorized licensed use limited to: University of Punjab. Downloaded on February 22,2010 at 00:35:14 EST from IEEE Xplore. Restrictions apply.

POWERENG 2009

Lisbon, Portugal, March 18-20, 2009

III.

FORMULATION OF THE DESIGN

Inverters are implemented by using different topologies like low frequency inverter design which includes: 1) Bridge type inverters 2) DC-DC converter with a power Bridge Inverters providing galvanic isolation are implemented by using: 1) High frequency link inverter 2) High frequency inverter with Cyclo-converter output stage This paper is mainly focused on the PWM topology, mathematical analysis of filter design and voltage regulation by using an appropriate feedback technique. A. PWM Topology The topology introduced, is simpler and easily implement able with PIC16f877. A 50Hz sinusoid with unity magnitude is multiplied with the impulse train of 4000Hz so that one complete cycle of sinusoid contains 80 impulses as shown in Fig.2
1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1

A table of PWM can be generated in Matlab and we can monitor simulation by programming PIC16f877 according to the table generated by the Matlab in proteus. The PWM repeats itself by every 0.01 seconds i.e half of the time period of sinusoid. The SPWM can be generated by applying PWM on one side of bridge for 0.01 second and turn it off for rest of 0.01 seconds. Similarly second side of the bridge is turned off for first 0.01 seconds and activated for next 0.01 seconds as shown in Fig. 4. This is done easily by programming microcontroller.

Fig. 4 PWM applied on two sides of a bridge The simulated result can be observed in Fig. 5 and hardware implementation can be seen in Fig. 6(a). A close look of positive cycle of PWM can be observed in Fig. 6(b).

amplitude

0.002 0.004

0.006 0.008

0.01 t(sec)

0.012 0.014

0.016 0.018

0.02

Fig. 2 Normalized sine wave and unit impulse train 4000Hz PWM can be generated in such a manner that starting position of pulse should be same as that of impulse and duty cycle of the pulse must be equal to the product of unit impulse and value of sine at that instant as shown in Fig. 3 Fig. 5 SPWM at output of bridge

0.8 amplitude

Fig. 6(a)

Fig. 6(b)

0.6

0.4

0.2

0.001 0.002

0.003 0.004

0.005 0.006 0.007 0.008 0.009 t(sec)

0.01

Fig. 3 Generated PWM

1) Mathematical analysis of PWM topology The method used for the mathematical analysis of PWM is Laplace transformation. The switching frequency of the inverter is 4 kHz so the time period is 0.25 msec. There are 80 pulses in 0.02 sec which is equal to time period of sinusoid. Analysis is applied on the positive cycle of the sinusoid only. There is a delay of 0.25 msec between two consecutive pulses. Keeping all these factors in mind, the PWM of the inverter can be mathematically expressed as:

164
Authorized licensed use limited to: University of Punjab. Downloaded on February 22,2010 at 00:35:14 EST from IEEE Xplore. Restrictions apply.

POWERENG 2009

Lisbon, Portugal, March 18-20, 2009

(1)
Where 0 n39 and Applying Taylor series on equation (9) we get is the pulse at n and The Taylor series can be expressed as

(9)

(10)

(2)
Laplace transform of rectangular pulse is given in equations (3) and (4). (11) Neglecting higher order terms and applying summation the result will be

(3)
and Laplace transform of shifted pulse is given by (12)

(4) The width of the pulse varies according to the (5)

2) Physical realization of Filter Transfer function of filter, resembles to the transfer function of 2nd order low pass filter. Physically realizable values closest to the transfer function are given in Table 2.
Table 2 Realizable values of filter Resistor variable load Inductor 100 mH Capacitor 1000 F

(5) as mentioned before n is the number of pulse So expression of Laplace transform of PWM can be given by:

3) (6)
X(s) is the Laplace transform of the input. Desired output is the sine wave. So the system response can be formulated and system response is equal to the filter response. Filter response will be discussed in Filter design. B. Filter design

Results

The transfer function is implemented in Simulink (Matlab) and Proteus. The results are given in Fig. 7 and Fig. 8.

In filter design output is known and input is analyzed and filter response is manipulated using (7)

Fig. 7 Simulation in Simulink

(7) 1) Mathematical analysis of Filter design Laplace transform of a sine wave is given by:

(8) By using equations (6),(7)and(8) H(s) is manipulated. Fig. 8 Simulation in Proteus

165
Authorized licensed use limited to: University of Punjab. Downloaded on February 22,2010 at 00:35:14 EST from IEEE Xplore. Restrictions apply.

POWERENG 2009

Lisbon, Portugal, March 18-20, 2009

The complete design is implemented in hardware and results obtained are very similar to the simulations. The scope shown in Fig. 9 shows laboratory test of the inverter.

waves are shown in these figures. As the amplitude of the output voltage decreases, the duty cycle of each pulse in PWM increases to regulate the output voltage as observed in Fig. 12 and Fig. 13.

0.8

0.6

0.4

0.2

Fig. 9 Hardware implementation C. Voltage regulation using feedback Voltage can be regulated in two manners:
1

0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009

0.01

Fig. 11 PWM at normal condition

I. Cascading of MOSFETs stages If the desired power rating is more than the power rating of the MOSFETs, then the voltage across the load decreases. The available P-channel MOSFETs are of low power rating so Pchannel MOSFETs are replaced by N-channel MOSFETs. Complementary PWM must be given to the high side and low side of paired MOSFETs. Secondly,the load is shared by cascading multiple stages of MOSFETs as shown in Fig. 10.

0.8

0.6

0.4

0.2

0.001

0.002

0.003

0.004

0.005

0.006

0.007

0.008

0.009

0.01

Fig. 12 PWM at loaded condition

0.8

0.6

0.4

Fig. 10 Cascaded MOSFETs stages II. Varying duty cycle of PWM By varying PWM generated by PIC16f877, output voltage is regulated. Feedback and control system is implemented using microcontroller. ADC module present in PIC 16f877 can work on voltage up to 5V.Output voltage is rectified and ripples are removed by using capacitor. At rated voltage of inverter the value of DC voltage is 5V. If the output voltage decreases the DC voltage also decreases and is fed back to PIC16f877. Control system is applied so that whenever DC voltage decreases or increases; duty cycle of PWM varies to regulate the output voltage. Matlab simulation results are shown in Fig. 11, Fig. 12 and Fig. 13. Normalized PWM and normalized output sine

0.2

0.001 0.002

0.003 0.004

0.005 0.006 0.007

0.008 0.009

0.01

Fig. 13 PWM at very high load IV. CONCLUSION Mathematical analysis, simulation results and practical implementation of the sine wave inverter proves that output sine wave is voltage regulated, ripple less and glitch free. For the use of this sine wave inverter in transformer less UPS, DC-DC step up converter can be used. High frequency link inverter is used to step up to 220V. Different electronic appliances are tested by this sine wave inverter and final output is shown in Fig. 14. FFT is also

166
Authorized licensed use limited to: University of Punjab. Downloaded on February 22,2010 at 00:35:14 EST from IEEE Xplore. Restrictions apply.

POWERENG 2009

Lisbon, Portugal, March 18-20, 2009

examined in this Figure. FFT shows that fundamental harmonic component lies at 50 Hz and rest of the harmonic components are negligible.

Fig. 14 Output sine wave with its FFT

REFERENCES
[1] E.Koutroulis, J.Chatzakis, K.Kalaitzakis and N.C.Voulgaris, A bidirectional, sinusoidal, high-frequency inverter design, IEE Proc.Electr. Power Appl., Vol. 148, No. 4, July 2001, pp. 315-318 [2] YING-YU , T., and SHIH-LIANG, J., Full control of a PWM DCAC converter for AC voltage regulation, IEEE Trans. Aerosp. Electron. Syst., 1998, 34, (4), pp. 12181226 [3] Bonert, R. and Chen, J., "Load Independent DC/AC Power Supply for Higher Frequencies with Sine-wave Output", IEEE Transactions on Industry Applications, Vol. IA- 19, No. 2, March/Apri1,1983 pp. 223227. [4] S.R. Narayana Prakash, P.V. Ananda Mohan, B.S.R. Iyengar, A new sinewave inverter with high frequency link and synchronous rectification using power MOSFETs, IEEE Power Electronics Specialists Conf. San Antonio,
Texas, U.S.A., June 11-14, 1990.

[5] I. Yamato et al., New conversion system for UPS using high frequency link, in Proc. IEEE Power Electronics Specialists Conf., 1988, pp. 658663. [6] MATSUI, M., NAGAI, M., MOTCHIZUKI, M., and NABAE, A. Highfrequency link DC/AC converter with suppressed voltage clamp circuits naturally commutated phase angle control with self turn-off devices, IEEE Trans. Ind. Appl., 1996, 32, (2), pp. 293300 [7] RASHID, M.M.: Power electronics: Circuits, devices and applications, Prentice-Hall, 1993, 2nd edn. [8] Mazidi, McKinlay & Causey, PIC Microcontroller, Prentice Hall Inc., 2007 [9] John B Peatman, Design with PIC microcontroller, Pearson Education Inc., 2000

167
Authorized licensed use limited to: University of Punjab. Downloaded on February 22,2010 at 00:35:14 EST from IEEE Xplore. Restrictions apply.

S-ar putea să vă placă și