Top Banner

of 4

Fast simulation of PWM_99.pdf

Jun 04, 2018

Download

Documents

Atakan OzturK
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/13/2019 Fast simulation of PWM_99.pdf

    1/4

    IEEE 1999 International Conference on Power Electronics and Drive Systems, PEDS'99, July 1999, Hong Kong.

    Fast Simulationof PWM Inverters using MATLABL. K. Wong Frank H. F. Leung

    Department of Electronic and Information EngineeringThe Hong Kong Polytechnic UniversityHung Hom, Kowloon, Hong Kong

    Peter K. S. Tam

    Abstract - This paper presents simulations of PWM invertersusing MATLAB. Since MATLAB has the necessary numericaltools to solve non-linear differential equations simulations canbe carried out by developing system differential equations o thePWM inverters. More importantly due to the CAD toolsavailable in the MATLAB environment a CAD package forregulated inverters can easily be developed. It is shown that theaccuracy of the simulation results by using MATLAB is high ascompared with that by using PSPICE. However the simulationspeed o MATLAB is much faster. Examples using resistiveload inductive load and non-linear load are shown.I. INTRODUCTION

    PWM inverters [3] are widely used in uninterruptiblepower supplies (UPS) and driving motors. It converts a DCvoltage into an AC sinusoidal one under various kinds ofload, including resistive loads, inductive loads and non-linearloads. Simulations of PW M inverters can be carried out byusing PSPICE. Howeve r, such simulations usually take longtime. This will become a significant problem when manysimilar simulations are required to reach an optimal design byfine-tuning parameters. Moreover, PSPICE may sometimessuffer from the con verg enc e problem. Due to theseweaknesses, we propose to simulate PWM inverters usingMATLAB.There are many advantages on using MATLAB to simulatePW M inverters. First, the simulation speed can be muchfaster than that using PSPICE. Second, there are a lot ofavailable tools that can be used in the MATLAB environmentto design and optimize the performance of the open-loop andclosed-loop PWM inverter system easily [1, 21. In this paper,we show how to model inverters under different loads asdifferential equations. The n, by applying ode2 , aMATLAB function which can solve a system of ordinarynon-linear differential equations using numerical method, theresponses of PWM inverters can be simulated.We present three examples to illustrate the modelling andsimulation of PWM inverters under different kinds of load.Section I1 and I11 detail the simulations of PWM invertersunder a resistive and an inductive load respectively. Insection IV, a non-linear phase-controlled load will be used inthe simulation. Th e results obtained by MA TLA B will becompared with those obtained from PSPICE.

    11. RESISTIVE LOADA half-bridge PW M inv erter is shown in Fig. 1. It consistsof an LC filter formed by an inductor Lf nd a capacitor Cwith series resistance R L ~ , nd Rc, respectively. Thebandwidth of this filter is designed to be much lower than the

    switching frequency. The load in Fig. 1 is a resistor ofresistance RL= 10R in this section. It is assumed that the bi-directional switches S I and S2 are ideal. When S I is turnedon, t is turned off such that v , is equal to V,. On the otherhand, when S I is turned off, S 2 is turned on such that v , isequal to -V . Let tI and t l f lbe the turn-on and turn-off timeof S I respectively, we define a duty cycle d as follows:

    1)where t + t l f l s the switching period which is constant. Itshould be noted that the value of d is ranged from -1 to 1.Assume the switching frequency is much higher than thebandwidth of the LC filter, by applying the time-averagingtechnique, the value of v , is effectively equal to

    t , n - t l f lt , n tlfl

    d=-

    t n v f/ -v, )(2)=dV .

    Then a system differential equation with d as the controlinput and v , as the output can be written as follows:

    V I =t o n +

  • 8/13/2019 Fast simulation of PWM_99.pdf

    2/4

    --Fig. 1 A PWM inverterMA TLAB , a PWM inverter with the same set of parameters,but with the ideal switch replaced by a MO SFET IRF730 andan anti-parallel diode MUR460, is simulated using PSPICE.The switching frequency is 20kHz. Th e simulated responsesof v and iL are shown in Fig. 2and 3 respectively. Thesmall discrepancies in the waveforms given by MATLABand PSPICE are due to the power loss of the non-ideal switchand diode used in PSPICE.It should be noted that although only the open-loopresponses are shown here, the closed-loop responses based oncertain controller design can readily be analysed in theMATLAB environment through modifying the sinusoidal dfunction as another external control function. With the CA Dtool available in MATLAB, a CAD package for regulatedPWM inverter can easily be developed.

    III. INDUCTIVE LOADIn this section, the load in Fig. 1is changed to a resistor of

    resistance RL = SQ in series with an inductor of inductanceLL = l OOOpH Since the system now is one order higher thanthat in the previous section, the system differential equationis modified a s follows:

    1--L ,

    1LL I

    5040

    0 0.002 0.004 0.006 0.008 0.01Fig. 2 Simulated responsesof v under resistive load

    5 TLAB432101

    2-3-4

    SPICE

    ~0.002 0.004 0.006 0.008 0.01Fig. 3 Simulated responsesof i under resistive load

    345

    Authorized licensed use limited to: Hong Kong Polytechnic University . Downloaded on July 7, 2009 at 04:08 from IEEE Xplore. Restrictions apply.

  • 8/13/2019 Fast simulation of PWM_99.pdf

    3/4

    v 5ovL 500pH-RLi 0.152ci 1OpFI R C f 0.0552Table 1. List of parameters

    -5010 0.002 0.004 0.006 0.008 0.01Fig. 4 Simulated responses of v under inductive load

    86420

    -2-4-6

    -0 0.002 0.004 0.006 0.008 0.01Fig. 5 Simulated responses of iyunder inductive load

    (6)A MATLAB m-file describing 5) is shown in Appendix 11.The control input and switching frequency are the same asthose in section 11. The open-loop response of iLf vc and ican be obtained from the following command:[ t , y1 = ode23('invl', 0, 0. 01, [ O ; 0 ; 0 1 ) ;and the response of v can be obtained based on (6). Thesimulated responses of v and iL,are shown in Fig. 4 and 5respectively.

    -600 0.002 0.004 0.006 0.008 0.01Fig. 6 Simulated responses of v,, under phase-controlled load

    \MATLAB4

    2

    0

    -2

    -4

    -6 10 0.002 0.004 0.006 0.008 0.01Fig. 7 Simulated responses of iw under phase-controlled load

    IV. NON-LINEAR LOADIn this section, a non-linear phase-controlled load is used

    [3]. The non-linear load is effectively a resistor of 10R whenthe phase of the sine wave is from 72 to 360 . Otherwise,the load draws only a little leakage current, and is effectivelya resistor of IMR. The system differential equation is thesame as that of 2) and (3) with the load RL witches between1MR and 10R with respect to the phase. Th e m-file of thissystem is shown in Appendix 111. It can be seen that such anon-linear load can be easily simulated using MATLAB.The simulated responses of v and iLf are shown in Fig. 6and7 espectively.

    V. CONCLUSIONSimulation of PWM inverters using MATLAB is proposedin this paper. By modelling inverters as differential equationsand making use of the MATLAB function ode23 , heresponses of PWM inverters can be obtained accurately and

    346

    Authorized licensed use limited to: Hong Kong Polytechnic University . Downloaded on July 7, 2009 at 04:08 from IEEE Xplore. Restrictions apply.

  • 8/13/2019 Fast simulation of PWM_99.pdf

    4/4

    fast. Examp les corresponding to a resistive load, an inductiveload and a non-linear load have been shown to illustrate thesimulations using MA TLAB . The simulated responsesobtained by PSPICE are also obtained for comparisonpurpose. The simulation results from MATL AB are found tobe accurate. The small differences in the waveform s givenby MATLAB and PSPICE are due to the power loss of thenon-ideal switche and diode used in PSPICE. The simulationtime of the three examples using MATLAB and PSPICEbased on a Pentium I1 300 system is listed in Table 2. It isfound that the simulation time for PWM inverters usingMATLAB is more than a hundred time shorter than thatusing PSPICE.

    REFERENCE[11[2]

    MATLAB User s Guid e, The Mathworks, Inc., August1992.F. H. F. Leung, T. C .T. Ng, L. K. Wong, and P. K. STam, A CAD package for fast simulation ofregulated dc-dc con verte rs in large signal, in Proc.IECON '97,New Orleans, USA, November 1997, vol.[3] Naser M. Abdel-Rahim and John E. Quaicoe,Analysis and design of a multiple feedback loopcontrol strategy for single-phase voltage-sou rce UPSinverter, IEEE Trans. Power Electronics, vol. 11, no.4, July 1996.

    2, pp. 755-758.

    ACKNOWLEDGEMENTThe work described in this paper was substantiallysupported by a grant from the Hong Kong PolytechnicUniversity (Project No. A-PA54).

    APPENDIX If unc t i on yp = I nvR t , y)

    Mat hemat i cal model f or a PWM i nvert erOut put l oad i s pure r es i s t i vey 1 ) i s i nduc to r cur r enty 2) i s out put vol t age1 = 500e- 6;r l = 0. 1;c = 10e-6 ;r c = 0. 05;r = 10;vsource = 50;d = 0. 9 * s i n 2 * pi * 500 * t ) ;d = max - 0. 9, m n 0. 9, d) ) ;vi = vsour ce d;r r c = r + r c ;yp = [ - r l / l - r * r c/ l / r r c - r / l / r r c ; l / c - r c / c / r r c- l / c / r r c l y + [l/l; 01 * v i ;

    Resistive load 0.49 s 201.64sInductive load 195.43sNon-linear load 1.76s 205.75sTable 2 Simulation time

    APPEN DIX I1f unc t i on yp = I nvL t , y)

    Mat hemat i cal model f or a PWM i nver t e rOut put l oad i s i nduct i vey ( l ) i s i nduc to r cur renty 2) i s output vo l t agey 3 ) i s output l oad i nduct or cur r ent

    1 = 500e- 6;r l = 0. 1;c = 10e-6 ;r c = 0. 05;r = 5 ;l r = 1000e- 6;vsource = 50;d = 0.9 * s i n 2 * pi * 500 * t ) ;d = max - 0. 9, m n 0. 9. d) ) ;vi = vsour ce * d;Ac l = [ - r c +r l ) / l - 1/ 1 r c / l ;l / c 0 - l / c ;r c/ l r l / l r - r +r c ) l r l ;yp = Ac l * y + [ l / l ; 0; 01 * v i ;

    APPENDIX I11f unc t i on yp = I nvNonl t , y)

    Mat hemat i cal model f or a PWM i nver t e r8 Output l oad i s non- l i neary ( l ) i s i nduc to r cur r enty 2) i s out put vol t age

    1 = 500e- 6;r l = 0. 1;c = 10e-6 ;r c = 0. 05;vsour ce = 50;d = 0. 9 s i n 2 * pi * 500 * t l ;d = ma x - 0. 9, m n 0. 9. d) ) ;vi = vsource * d:nl i n = squar e 2 pi * 500 * t , 20) ;i f nl i n == 1el se

    end

    r = l e6;r = 10;

    r r c = r + r c ;yp = [ - r l / l - r * r c/ l / r r c - r / l / r r c ; l / c - r c / c / r r c- l / c / r r c l * y + [ l / l ; 01 * v i ;

    347

    A th i d li d li it d t H K P l t h i U i it D l d d J l 7 2009 t 04 08 f IEEE X l R t i ti l