6
TEACHING THE PWM AC VOLTAGE CONTROLLER USING MATLAB GRAPHICAL USER INTERFACE Ibrahim A. Altawil, and Osama I. Hajier Yarmouk University, Irbid, Jordan ABSTRACT This paper presents an adequate approach for teaching the sinusoidal pulse width modulation (SPWM) in AC voltage control regulators. In this paper the Graphical User Interface (GUI) functions, which constitute one of the important pillars of MIATLAB software, are developed to an easy-to-use educational software tool. Single-Phase AC voltage controller is mathematically modeled and then simulated using basic MALAB commands. GUI is implemented to construct an active link with these models. So that, instructors can demonstrate the change in SPWM system response due to parameter variation. An example, using the GUI, is provided to demonstrate the usefulness of the developed software. Keywords computer simulations; PWM; AC voltage controller; teaching aids; graphical user interface List of symbols VO The rms output voltage vo The instantaneous output voltage VI The rms value of the fundamental component of the input voltage Is The rms value of the input current The rms value of the fundamental component of the input current THD Total harmonic distortion PF Power factor 1. INTRODUCTION tasks, where students can learn by observing the parameters variations during the simulation process, Educational experimental modules are not only costly which can be repeated several times. This inevitably but also, rarely provide the necessary facilities to strengthens student's ability to grasp the key concept realize PWM control or to switch from one scheme to of system behavior and digest the power electronics another. Therefore, computer aided design packages principle such as PWM techniques such MIALAB, or Pspice can be very helpful tools to enhance the student's ability to understand the idea The present paper demonstrates an attractive approach under discussion. The majority of current software for teaching Sinusoidal Pulse Width Modulated packages are highly reliable and versatile [4]. (SPWM) in using a NIATLAB environment. It Therefore, the new trends in engineering education are explains the principle single-phase PWM AC voltage strongly relying on these packages in teaching and controller and how the student can simulate the single- assisting engineers in solving their problems. phase PWM AC voltage controller more easily using Furthermore the new authors and revisers of recently only basic MIATLAB instructions. Then, a brief published textbooks have incorporated new exercises description of GUI windows is given followed by an and problems based on computer aided design animated demonstration of the behavior and packages. This stimulated the teaching decision- performance of the SPWM AC voltage controller makers and curriculum designers at universities and results. At this stage, students can show the advantage other academic institions to include these packages of M\/ATLAB GUI and how he/she can learn the within their teaching plans course descriptions, capabilities to develop an attractive and user-friendly software packages for teaching PWM AC voltage Matlab's GUI techniques have been employed in controller. This eventually enhances the theoretical teaching power electronics material. This teaching understanding of the studies topic and facilitates the technique gives the instructors the opportunities to analysis and design experience in this field. Finally, focus on both fundamental and advance concept. The the paper concludes the results done in the study software packages are intended to do computation 1101

Teaching the Pwm Ac Voltage Controller Using Matlab Graphical User Interface

Embed Size (px)

Citation preview

Page 1: Teaching the Pwm Ac Voltage Controller Using Matlab Graphical User Interface

TEACHING THE PWM AC VOLTAGE CONTROLLER USING MATLAB GRAPHICALUSER INTERFACE

Ibrahim A. Altawil, and Osama I. Hajier

Yarmouk University, Irbid, Jordan

ABSTRACT

This paper presents an adequate approach for teaching the sinusoidal pulse width modulation (SPWM) in AC voltagecontrol regulators. In this paper the Graphical User Interface (GUI) functions, which constitute one of the importantpillars of MIATLAB software, are developed to an easy-to-use educational software tool. Single-Phase AC voltagecontroller is mathematically modeled and then simulated using basic MALAB commands. GUI is implemented toconstruct an active link with these models. So that, instructors can demonstrate the change in SPWM system responsedue to parameter variation. An example, using the GUI, is provided to demonstrate the usefulness of the developedsoftware.

Keywords computer simulations; PWM; AC voltage controller; teaching aids; graphical user interface

List of symbols

VO The rms output voltagevo The instantaneous output voltage

VI The rms value of the fundamental component of the input voltageIs The rms value of the input current

The rms value of the fundamental component of the input currentTHD Total harmonic distortionPF Power factor

1. INTRODUCTION tasks, where students can learn by observing theparameters variations during the simulation process,

Educational experimental modules are not only costly which can be repeated several times. This inevitablybut also, rarely provide the necessary facilities to strengthens student's ability to grasp the key conceptrealize PWM control or to switch from one scheme to of system behavior and digest the power electronicsanother. Therefore, computer aided design packages principle such as PWM techniquessuch MIALAB, or Pspice can be very helpful tools toenhance the student's ability to understand the idea The present paper demonstrates an attractive approachunder discussion. The majority of current software for teaching Sinusoidal Pulse Width Modulatedpackages are highly reliable and versatile [4]. (SPWM) in using a NIATLAB environment. ItTherefore, the new trends in engineering education are explains the principle single-phase PWM AC voltagestrongly relying on these packages in teaching and controller and how the student can simulate the single-assisting engineers in solving their problems. phase PWM AC voltage controller more easily usingFurthermore the new authors and revisers of recently only basic MIATLAB instructions. Then, a briefpublished textbooks have incorporated new exercises description of GUI windows is given followed by anand problems based on computer aided design animated demonstration of the behavior andpackages. This stimulated the teaching decision- performance of the SPWM AC voltage controllermakers and curriculum designers at universities and results. At this stage, students can show the advantageother academic institions to include these packages of M\/ATLAB GUI and how he/she can learn thewithin their teaching plans course descriptions, capabilities to develop an attractive and user-friendly

software packages for teaching PWM AC voltageMatlab's GUI techniques have been employed in controller. This eventually enhances the theoreticalteaching power electronics material. This teaching understanding of the studies topic and facilitates thetechnique gives the instructors the opportunities to analysis and design experience in this field. Finally,focus on both fundamental and advance concept. The the paper concludes the results done in the studysoftware packages are intended to do computation

1101

Page 2: Teaching the Pwm Ac Voltage Controller Using Matlab Graphical User Interface

2. AC VOLTAGE CONTROLLER symmetrical with respect to gT / 2. The output voltagecan be expressed using Fourier series as follows:

Ac voltage controllers are employed in many industrial napplications such as heating, lighting, and they supply V0 = ao + E A cos(noft) + Bn sin(ncot)variable voltage for induction motors. Triacs or anti- 1 (1)parallel connected thyristors are commonly used to where n 1 2 3 4 5obtain variable AC voltage from a fixed AC voltagesource. Medium-to-high frequency chopping withPWM control is employed to vary the rms amplitude of Referring to the output voltage shown in Figure (b), itthe output voltage. Improved performance of AC is observed that even harmonics are absent due to thevoltage controllers could be achieved by using less symmetry of the wave. Furthermore, the coefficientsreliable, more complex and expensive forced An and a0 are zero, thus, the above equation is reducedcommutated regulators [1] [2]. In spite of the fact that to:AC voltage controllers have large harmonic distortion n

and poor power factor they are widely used in small V0 = B sin(not) where n = 1, 3, 5 (2)AC drive applications. Sinusoidal PWM, and uniformPWM technique have been used commonly to improveperformance and efficiency of AC voltage controllers. The value of B1 is computed as:In SPWM technique used, the width of each pulse isvaried proportionally to the amplitude of a sine wave. 2V Fsin(n - I)ct sin(n - ))clThis type of technique is commonly used in industrial B=application to reduce the total harmonic distortion (n+l) ] ka3(THD) and low-order harmonics. The power circuit ofa PWM AC chopper driving a single-phase induction nmotor is shown in the Figure (I a).

Where Vm is the maximum value of the input sinewave. The fundamental component is given by:s+J f i~~~~ingle phwe mw o r

2Vm sin(n-)ot

The total Harmonic Distortion THD, which is a

l..rC measure of closeness in shape between a waveformand its fundamental component, is defined as

+11rl Pl THD =- Lv21 (5)a 3 2~~~~~~~~~~~~~~~V -2,n

2,l1i.1 II m

The input power factor of the AC voltage controller isdefined as

t PF= Slcos7 (6)

isFigure (1) a. Ac voltage controller power circuit, b. Where Is, is the fundamental of the component of theTypical output voltage of SPWM AC voltage input current Is and 4i is the angle between thecontroller

fundamental component of the input current andThere are two switches labeled as SI and S2; SI is used supply voltagefor connecting the load to the source and S2 isemployed to free wheel the load current, when Si is 3. BUILDING MALAB GUI

switced of.Siis tuned o at ariou swithingGUI is simply an interface that can call upon differentangles, a1l aX3 ,.* * ,k-i and turned off at Matlab operations and operate them without the

bx2,x4,,tz per quarter cycle. The output voltage necessity of using the M\/ATLAB commands. GUIincorporates graphics objects such as windows, icons,

of the AC chopper with k pulses per half cycle iS buttons menu and text. Activating these objects byshown in Figure (lb).The switching angles are'.. mouse or other pointing device causes an action or

1102

Page 3: Teaching the Pwm Ac Voltage Controller Using Matlab Graphical User Interface

change to occur. Several windows are designed and voltage controller, which are the input PF, THD'spresented in this paper to show the crucial role of GUI versus different modulation index. Also, RMS, 3rd, 5thapplied for this approach. The proposed GUI for 7th harmonics of the output voltage versus differentsimulating a mathematical model of SPWM AC modulation index. These plots facilitate examine thevoltage controller supplying (R-L) load has been behavior of the system and select the best designdeveloped to suite the current work. Particularly, the condition.GUI functions in callbacks string used to execute theuser selection as shown in Figure (2a). When a GUI 4. RESPONSES TO MATLAB GUI'Scommand is typed, it calls up a window created by theGUI programmer where a possible window element The simplicity of handling tool presented, helpsuch as menus, buttons, lists, fields, and clickable students accurately understand the analysis and thebuttons as the GUI window shown in Figure (2b). In design requirements of the SPWM AC voltageorder to simulate the mathematical model of the AC controller. One of the significant features ofthis simplevoltage controller, it is initially required to input the tool, can effectively illustrate the changing in thevalues of parameters of the AC voltage controller in system behavior and focus on both fundamental andthe fields of the main GUI window before executing advanced concept of the system. On the other hand,the run command and calling the MATLAB program. students can efficiently run this program many times

with different input values to see how the behavior ofThe operation of this instructional software has been the system changes and select the best performance fordivided into two modes of operations. The first GUI design. This instructional tool makes teaching ofwindow is the parameters and waveform analysis SPWM very attractive task and encourages students towindow. It contains five input fields, which are for the learn while playing. Electrical engineering students canpossible variable parameters of the AC voltage learn several power electronics principles by masteringcontroller, as shown in Figure (2b). These fields are the GUI such as:frequency of the input power supply, the phase angle * The SPWM technique in switching signal generatingof the load, the modulation index, number of pulses per * Explore THD as the function of modulation indexhalf cycle and harmonic order. As soon as, the fields * Observing the different number of pulses per halfattains the required values within the specific range the cycle and how can affect the THDcomputation is commenced after ordering the run * Monitoring the current and voltage waveforms atcommand of GUI's function. The results are displayed different power factor loadsto represent different types of performance parameters * Students place their hands in the design problemswith their computed values. Furthermore, various plots * Enhance student's interest in design and understandof waveforms of input and output currents and voltages the power electronics course easily and deeplyof the Ac voltage controller appear in time andfrequency domain as shown in Figures 3, 5 and 6. CONCLUSIONAlso, results of GUI's output demonstrate how thegates signals of the AC voltage controller have been An adequate and useful approach for teaching agenerated as shown in Figure (4). SPWM AC voltage controller has been presented in

this paper. A mathematically model was built andThe second GUI window is the performance desig simulated for this type of controller using basicGUI window that iS used to simulate and showed the MATLAB instructions. The developed MATLAB GUIperformance behavior of system with variable tool has been simplified by providing an active linkmodulation index M, and variable phase angle load ihtesmltdmdl.Ti ntutoa oli(PF). This window gives the opportunity to insert chaterizd b its versaTility oan repeatedifferent input frequency and different number of .actions bygru o ers.tislly integratedapulses per half cycle before executing the running allows understanding waveform analysis and flexiblecommand as shown in Figure (2c). Then using the designaproac thog the varian flcircicapabilities of the software prefos the computationthrough the varaton of crcut

and the results are displayed in the form similar to that parameter values. An illustrative example is presentedshown in Figure (7). An example, for k = ,6and load to show the significance and usefulness of the

PF= 0.57 has been commence to examine the best developed tool.design order. The developed instructional softwareresults display the performance parameters of the AC

[2] GYU-HA CHOE, ALAN K. WALLACE, ANDREFERENCES MIN-HO PARK, "An Improved PWM Technique for[1] 5. A. HAMED, "Steady-State Modeling, AC Chippers", IEEE TRANSACTION ON POWERAnalysis, and Performance of Transistor controlled ELECTRONICS, VOL. 4, NO. 4, OCTOBER 1989AC Power Conditioning System" IEEE Transaction [3] Howard Abramowitz," Phase-Control AlternativeON Power Electronics, VOL. 5, NO., 3 JULY 1990 for Single-Phase AC Motors Offer Smart Low-Cost

Solutions", Power systems world 2003

1103

Page 4: Teaching the Pwm Ac Voltage Controller Using Matlab Graphical User Interface

[4] N. Francis and 0. Moullarney, A Methodology Information System and Education, Vol.4, pp.199-and Tooset for Supporting the Development of 212, 1997Graphical User Interface", computer Graphics [6] Tilbury, D.,luntz, J., and Messner,W.,1998,Forum, Vol.10, NO.1 PP 37-47, 1991 Controls Education on the WWW: Tutorials for

[5] T. Tetsuyuki, M. Tomi and S. Setsuko, " A Matlab and Simulink," in: Proceeding of theMethod of Separating the Graphical User Interface American Control Conference, Philadelphia, PA, PP.INCAI System", Transaction of Japanese Society for 1304-1308

Z 1111111111111111111-_~~~~~~~~~~~~~~~..f..............................-:

AC'FI '': ;-i"l~~ZeZZZefft!I

Teching the PWM AC voltage controller Using Matlabs1 GUI I

a X~~~~~~~~~~~~~~Tha RMaS V; N}iatnha mitpnlt ItnE m n0.5872 TDIB l 0.185Waveforms and Harmonics Performance Diesiqn ft-mdXtYi e>SFnpeg0g>g- g- I

TheRM5 v a ue .5i1 I h oi Crt3dTH4Dk 1.47

Figure 2.a Main GUI window Figure 2.b Parameters and waveform analysis GUI

Leneratlan Ut ne UU1sut voltage -fulses

0+s 1 2 1 H3 4 5 6

0.8

0.6- 1 2 3 4 5 6~~~~~~~~~~~~~~~~~~~~~~~R4SM1U,6 btU dtd .673PNmaibOia"tiii HM6 .30

o 2 4 6 8 10 12 14 16 18 0 o 9 1.1471

Harmoni Olrder RSadian

Figure 3. a,wb F2ure4.an c

:-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~unrto Lit--- i e uioimatae oie1.5 12

M 11 0 I K

-K J -T~~~~~~~~~~~~~~~~~~~~~~~~-

-1 -2 -

0 1 2 3 4 5 - ------B

0j3~~~~~~~~~RdA -,

02 ~ ~ ~~ ~ ~~~~~~~~~2

0 21 4 8 10 12 14 16 18 20 0 2

0 2 4 6 a 1 0 1 2 1 4 1 I a 200 2 6 8 112 14 16 13 2

Figure 5. a, b Figure 6. a, b

Figure (2) a. The main GUI window, b. The waveform analysis windowFigure (3) a. The input currant waveform in (pu), b. The harmonic spectrums of the input current

1104

Page 5: Teaching the Pwm Ac Voltage Controller Using Matlab Graphical User Interface

Figure (4) a. The sinusoidal reference waveform, b. The triangle waveform (carrier signal) and the sinusoidalwaveform (the reference signal), c. The generated gating signalFigure (5) a. The output currant waveform in (p.u.), b. The harmonic spectrums of the output current waveformFigure (6) a. The output voltage waveform in (p.u.), b. The harmonic spectrums of the output voltage

f LAMOlP6f qM6t iirLAt W 6Ige50 Th6 ph 6 6gI6 6f h iri d ig 'i55

u 6

Figure 2c Performance Design GUI Window

Page 6: Teaching the Pwm Ac Voltage Controller Using Matlab Graphical User Interface

THD V6 0irnun Modulation indeo, M THD In Virnun Modulation indexk, M3.5 02

2.5

~~~~~~~~~~~~~~~~~~~~~IG r2-

M-15 H-G

0 0050.1 0.2 0.2 04 05 0.5 O .7 0.5 0.5 1 01 02 02 04 05 0G 7 05D 0N 1

Modulation index, M Modulation iodex,t M

a b

THD In Viroun Modulation index, M input PF nouo Mdodulation indeob M45 05

4~ ~ ~~~~~~~~~~~~~~~0

O~~~~~~~~~~~~~~~~~~~~~~~4

a2a

35- 7 -0

025-

Mo6dulation index tUMMModlaiond inde M

C ~~~~~~~~~~~d

RMS 3rd 5th 7th Harmonicofi utputoultaeipUrtun Modulation index, M

_| R=s 39rhtFigure (7) shows the performance parameters of the AC0. th voltage controllers fork 6 and load PF= 0.57~~o.5 7th - ~~~~~~a) THD V0 versus M,

30.7 ..~ ,.-b) THD lo versus M,0.51 if c) THD Is versus M,

S d) The input Pf versus M,S~~~~~~~~~~~~~~~~~~~~~~~i04 11/e) RMS, 3rd, 5th, 7th harmonics of the output voltage versus

M

.1 0.2 0.3 0.4 0.5 0.G 0.7 0.5 0.9 1Modulation indebx M

e

1106