PowerInverterJSL2009 Smaller

Embed Size (px)

Citation preview

  • 8/10/2019 PowerInverterJSL2009 Smaller

    1/13

    An Open-Source Platform for

    Power Converters Teaching

    S.A. Gonzalez, J.R. Fischer, M.A. Herran, and D.O. Carrica

    Laboratorio de Instrumentacion y ControlUniversidad Nacional de Mar del Plata

    [email protected]

    Abstract. This work presents a new approach for teaching power con-verters through the use of power inverter example experiments. Thisscheme is based on a custom-designed hardware and a software platform

    based on several open-source tools. The platform is controlled by a 32-bitmicroprocessor which gives the student the possibility to modify the ex-periments through the control firmware. All the required hardware andsoftware necessary to design and implement the control is open-source.

    1 Introduction

    Power electronics is a subject included in both Electrical and Electronics Engi-neering curricula and also a research area. Laboratory experiments can help stu-dents assimilate the theoretical concepts and get hands-on practical results [1,2].Nevertheless, laboratory experiments in the power electronics field, though agood strategy, present problems of time, money, and safety [3].

    This work presents a new custom-designed Power Electronics Converter ex-periment in a safe and cost effective way. All the real experiments conducted bystudents can previously be simulated in software packages like Matlabor PSimwhich are very useful for beginner students in power electronics [47]. Open-Source alternatives ofMatlab , like Octave [8] or Scilab [9], can also be usedin the post analysis of the performed experiments.

    One unique aspect of the laboratory is that undergraduate students, underthe direction of a graduate student and faculty staff, designed and constructed allthe hardware and software. This accomplishment has led several students to pur-sue graduate schools in this power electronics area. In the following section thehardware design of the power inverter is going to be explained. Section ?? dealswith the software tools required to successfully compiled the control firmware foran experiment. In section 4, an power inverter experiment is shown and results

    are presented.

    2 Hardware design and development

    Since the main idea is to have a laboratory power inverter, the set of experimentsthat are going to be carried on is important in order to define hardware design.

  • 8/10/2019 PowerInverterJSL2009 Smaller

    2/13

    2 Open-Source Platform for Power Converter Teaching

    Regarding this, two experimental areas that need be regarded are: open-loopand close-loop control of the power load. Among the open-loop carrier-based

    Pulse Width Modulation (PWM) schemes are the sinusoidal PWM (also calledsuboscilation PWM) and the space-vector modulation (SVM). Regarding theclosed-loop control schemes the most significative techniques are the hysteresiscurrent control (HCC) and the predictive Dead-Beat current control. Althoughnot close to a complete list of control schemes, students have the opportunityof revisiting a simple method and then scaling up their knowledge into a latermore refined technique.

    All this control techniques are to be tested with a real load as a 2 kW threephase induction machine. The control of an a.c. machine was selected as the loadof the inverter experiments since the motion is visual and students are facedto motion control requirements, as start/stop control, brake and acceleration.Other important aspect is sound, since variable speed converters are noisy and

    the difference between modulation schemes or switching frequency can be heard.It is educational to hear the difference in the laboratory and thus obtain abroader experience, this aspect is often neglected in theoretical demonstrationsand of course, totally avoided in simulations. Students can observe the effectsof parasitics, physical limitations of devices, and the differences between poorlyand well-designed circuits and software.

    Once the experiments to be carried out by the power inverter are defined, itis important to define what kind of hardware must be in place. Since open looptechniques must be implemented, a very rugged software-independent currentprotection must be implemented. This is done by adding an always presentthree-phase current measurement hall effect sensor and feeding its signal to threeindependent comparators. Although open-loop schemes have a clear system gain,

    students may produce distorted command signals to the inverter, which in termcould produce an important demanding currents with catastrophical results. Inthose cases, current sensors ranging from dc to medium frequency (some tenthsof kilohertz) are sufficient to turn-off the inverter fast enough in order to assuresecurity.

    Then a decision over the digital control unit must be made. Although a DSPhas been generally widely accepted for industrial control, recent improvementsin compact 32-bit ARM processor are challenging new deigns. DSP for industrialcontrol are specifically designed to include three-phase PWM modules, timer forevent recording as encoders, several general purpose I/O and serial communi-cations to be able to communicate to DACs and a host system. Nevertheless,DSPs have grown to fulfill communication market rather the the industrial one.

    On the other hand, ARM architecture is a 32-bit RISC processor architecturedeveloped by ARM Limited that is widely used in embedded designs. The corehas been widely implemented by many semiconductor manufacturers and thisallow several companies cover different application areas, what is being calledopen platforms, contrary to closed platform as DSPs. This has impact over stu-dent where they can learn an architecture rather than a specific DSP code, andthat will be useful no matter the application or the specific integrated circuit

  • 8/10/2019 PowerInverterJSL2009 Smaller

    3/13

    S.A.Gonzalez et al.: Open-Source Platform for Power Converter Teaching 3

    VSI

    IGBT Drivers

    DigitalControlUnit

    AC

    DCC

    ISA

    IS(A,B,C)

    ISB

    ISC

    USA

    US(A,B,C)

    USB

    USC

    Control Interface Board

    380Vrms

    a.c. motor

    Fig.1. Block diagram of the digital control unit and the main connections to thevoltage source inverter (VSI).

    vendor. The last issue was decisive for designing with ARM processor, specifi-cally with the ARM7TDMI architecture for Embedded Processors. Code writtenfor ARM7TDMI is binary-compatible with other members of the ARM7 Familyand forward compatible with the ARM9 and ARM9E families. The specific ven-dor we have chosen for a control unit aims at the real-time control of a powerinverter for laboratory experiments is the Atmels AT91SAM7X256 in PQFPpackage. Figure 1 is a block diagram of the system.

    Since the authors aim at obtaining an open hardware platform, the controlunit should be replaceable, while the analog support circuitry remain hook andwired to the power inverter. The support circuitry must contain the feedback

    amplification of both voltage and current sensors, the independent comparatorsfor the short-circuit protections, the host connection interface, the dual railspower supplies and the power and thermal supervisory support circuits. In orderto do this, a dual PCB design was preferred with independent optically-isolatedpower drivers for each IGBT module. Photograph in figure 4 shows clearly thisdesign approach.

    Figure 3 show a photograph of the control interface board. All the subsystemspreviously mention are placed on the board. Further used of surface mounttechnology (SMT) has provided the means of better technology support andsmaller board occupation.

    Figure 2 shows the front and rear views of the complete power inverter.The authors have chosen an open-frame 4-wheels rack in order to students to

    have a complete access of the inverter, low weight and mobility. The mobilityis important since the electrical departments lab where the big a.c. machinesresides are one building away. The inverter rack consists of a three-phase fullbridge inverter constructed with discrete 1200 V, 60 A IGBTs modules, everymodule consists of a complete leg, thus, 3 modules are laid out with 3 heatsinks. Discrete modules were chosen to minimize space, connections and cost ifa leg fails.

  • 8/10/2019 PowerInverterJSL2009 Smaller

    4/13

    4 Open-Source Platform for Power Converter Teaching

    (a) Front view. (b) Rear view.

    Fig. 2.Photos of the experimental power converter.

    Fig.3. Photo of the main board and the CPU board as that contains the AtmelsAT91SAM7X256 microcontroller.

    Some of the control racks are specific to applications since the goal of thepower inverter is to carry out several different experiments. In the photograph,the connector to the ac motor can be seen and a complete rack for active power

  • 8/10/2019 PowerInverterJSL2009 Smaller

    5/13

    S.A.Gonzalez et al.: Open-Source Platform for Power Converter Teaching 5

    Fig.4.Photo of the 3 drivers and their isolation barrier, the dc-bus and its decouplingcapacitors.

    filter (APF) experiments is also shown. The APF rack (in figure 5) is attachedto the frame when experiment need to be carried out since access to the grid isrequired. In this way other racks can be attached to suit specific experiments.

    2.1 Data analysis

    One of the most important issues for students is waveform display of every partof the inverter. Students must have access to the whole inverter in order to fulfilthe experiments and answer the study guides of every experiment. The authorspreferred the use of oscilloscope with differential isolated probes. In one hand

    the probes are easy to acquire and are perfectly prepared to access high powerdevices, on the other hand, oscilloscopes give students control over what arethey viewing provided they know what are they looking for. This is importantsince students are encouraged to read the study guides prior attending the labexperiments. Once a wave form is captured on the oscilloscope and the probescales are set, the data is downloaded into an ASCII file. This downloading allowsthe data to be read into Matlab or another post-processing software.

  • 8/10/2019 PowerInverterJSL2009 Smaller

    6/13

    6 Open-Source Platform for Power Converter Teaching

    Fig. 5.Photo of rack for active power filter (APF) experiments.

    3 Software tools

    The main goal is to create in the students the skills required to develop an

    industrial-grade embedded firmware that is both secure and safe. At the sametime it allows them to gain skills needed in industrial electronics and motioncontrol applications.

    Due to the limited time it is important to choose a set of software tools thathelp students develop applications by example in a rapid and natural fashion.Today, most embedded software applications are written in C/C++, these lan-guages have special features that makes them attractive for use in embeddedsystems. First, they provide a high level of abstraction, which eases, and speedsup, algorithm implementation. Secondly, they furnish the programmer with arich set of low level functions, specially helpful for hardware peripheral mappingof a given microcontroller. There are a number of utilities that compliments aC/C++ compiler, which are needed in order to obtain a working embedded ap-plication. The tools needed to do complete firmware development are as follows:

    A C cross-compiler for ARM7 processors. Binary utilities, such as assembler, linker, and other programs to make exe-

    cutable code. A C library specially intended for use on embedded systems. A program debugger.

  • 8/10/2019 PowerInverterJSL2009 Smaller

    7/13

    S.A.Gonzalez et al.: Open-Source Platform for Power Converter Teaching 7

    A modern Integrated Development Environment (IDE), which provides fa-cilities to write, debug, and compile the source code for ARM processors.

    In order to meet these requirements, a number of choices are to be made, toget a functional software environment for rapid development of lab projects.

    The GNU Compiler Collection (GCC) [10] was selected as a C/C++ cross-compiler, due to its compatibility with ARM cores, its flexibility, and its widelyavailable documentation. In conjunction with the GCC, the GNU Binutils [11]software package provides the tools needed to make executable binary files fromobject files created by GCC. There are several C libraries to use with GCC, one ofthem which is specially intended for embedded systems is Newlib [12], a C librarydeveloped by the Red Hat Foundation. It is only available in source code form,so it has to be used in the compilation process of GCC for targeting ARM7 cores.Due to the inherent difficulty of creating a custom made tool-chain for C cross-compiling, there are pre-compiled packages which includes the aforementionedtools and can be downloaded from the internet. These binaries targets differenthost operating systems such as Windows, GNU/Linux or MacOS.

    The process of creation of the source code can be done with a simple texteditor, and the compilation can be executed from the command line, but itis preferable the use an IDE for software development, which provides manyuseful features, such as code folding, syntax error detection, automation of thebuild process, and ease of use. Eclipse Platform [13] was chosen, this IDE hasbeen ported to various OS, is powerful, highly customizable, visually attractiveand open source. This last feature makes possible to students to build theirown plug-ins, improving their C/C++ language programming environment tofit their particular needs.

    For debugging purposes, the GNU debugger, GNU GDB [14], was chosen.

    This software can easily be integrated in the Eclipse IDE to set breakpoints inthe source code and control the code execution in the embedded processor. TheOpenOCD program compliments GDB, making possible to debug and programthe ARM processor via JTAG flash programmer device (IEEE standard 1149.1).

    As stated before, the microcontroller used for control board is the AtmelsAT91SAM7X256. Manufacturer gives a software package [15] to simplify firmwaredevelopment. These tools are used to create a base program that initializes allthe peripherals, so students can build the critical functions used in the controlof the power stage. This is done to avoid the problem of creating an applica-tion from scratch and make students focus in practical application of controlstrategies taught in theory lessons. In this manner, a typical firmware projectconsist of a few dozens of lines of C code, students can write them mostly during

    laboratory time. An introductory lesson of the base application is given in orderto help students understand how to write their code.The software development and firmware programming platform was tested

    in Windows XP using the tools provided by the YAGARTO project [16], and inGNU/Linux Ubuntu 8.10, using a tool chain provided by Zylin Consulting [17].Although command line tools can be used successfully, and integrated devel-opment environment is preferable. The authors preferred the Eclipse IDE since

  • 8/10/2019 PowerInverterJSL2009 Smaller

    8/13

    8 Open-Source Platform for Power Converter Teaching

    Fig. 6.Eclipse IDE in GNU/Linux Ubuntu 8.10

    integration with the GCC set of tools is well tested over several OSs. Eclipse isa number of concepts:

    A non-profit, open-source community Eclipse Foundation

    An extensible application framework for the development of software toolsEclipse Platform

    A collection of open-source projects providing solutions for multiple devel-opment applications

    An extensible Integrated Development Environment (IDE)

    An important advantage, not found in equivalent company-specific IDEsfor firmware development, is the indirect benefit from software plug-ins, de-veloped for the Eclipse platform. These plug-ins cover from code documentationtools (such as the Doxygen multi-language documentation tool), versioning toolssuch as the Subversion (SVN) client to Bug Tracking System tools such as theBugzilla. All theses benefits improve code readability and testability previouslyonly obtainable with isolated comercial software.

    The Eclipse IDE is shown in Fig. 6, running in a Ubuntu 8.10 GNU/LinuxDesktop PC.

  • 8/10/2019 PowerInverterJSL2009 Smaller

    9/13

    S.A.Gonzalez et al.: Open-Source Platform for Power Converter Teaching 9

    VSI

    IGBT Drivers

    ControlStrategy

    C

    ISA

    IS(A,B,C)

    ISB

    ISC

    USAUSB

    USC

    Control Interface Board

    a.c. motor

    n

    n

    n

    +-

    Fig. 7.Block diagram of a complete motion control system.

    4 SAMPLE EXPERIMENTS

    In the new power electronics course, experiments are used to validate analysisand design controls for converters, inverters, and rectifiers. In addition, experi-ments are performed to demonstrate the influence of parasitics on system per-

    formance (electromagnetic interference, power quality, acoustic noise, etc.). Inthe machines/drives course, experiments are being designed to implement thecontrol of brushless dc machines, stepper motors, and volts/Hertz control ofinduction machines.

    To demonstrate the feasibility of the testbed in representative applications,an example is provided. A control of an induction motor is presented in thefollowing section.

    4.1 Induction motor control

    The block diagram of a motion control system based on a IM can be seen infigure 7.

    In figure 8 a block diagram of a scalar control is shown. In an scalar controlde PWM inverter controls both the frequency and the magnitude of the voltageoutput. This is done in order to achieve the following characteristics:

    the frequency is modified according to the desired output speed, output voltage is adjusted in order to maintain a constant air-gap flux in

    the constant-torque region.

  • 8/10/2019 PowerInverterJSL2009 Smaller

    10/13

    10 Open-Source Platform for Power Converter Teaching

    PWMModulator

    SlipCompensation

    PI

    IS(A,B,C)

    n

    e

    n

    s

    ++

    -

    Fig. 8.Scalar control control strategy.

    With this controllable frequency / voltage it is possible to achieve a highefficient speed controller for the induction motor.

    One thing to consider is the torque on the shaft.

    T = Pem

    r(1)

    If the voltage added to the motor changes, the frequency also has to changeto ensure torque on the shaft. Looking at the torque, expressed from the power(P) and the speed the following equation is given:

    T = 3Pem

    2

    Vms

    2 r

    (Rr)2

    + (r Llr)2

    Rr (2)

    where:Pis the number of poles, Vm is the counter electromotive force (CEMF),s is the angular frequency of the stator current, r is the angular frequency ofthe rotor current, Rr is the rotor resistance, and Llr is the locked rotor induc-tance.

    T = 9.55 Pemn

    = 9.55 3V If60

    p (1 s)cos = k V

    m

    f (3)

    This equation implies that if the ratio between the voltage and the frequencyare kept constant the torque also stays constant. Moreover, output torque ofthe machine will depend only on r, irrespective of the stator frequency, s,provided the ratioVm/s is kept constant.

  • 8/10/2019 PowerInverterJSL2009 Smaller

    11/13

  • 8/10/2019 PowerInverterJSL2009 Smaller

    12/13

    12 Open-Source Platform for Power Converter Teaching

    1->

    2->

    1) [Tek TDS210].CH1 20 mV 1 mS

    2) [Tek TDS210].CH2 50 V 1 mS

    Fig.10.Waveform for a 100Hz fundamental current an its PWM line-to-line voltage.

    1->2->

    1) [Tek TDS210].CH1 20 mV 25 mS2) [Tek TDS210].CH2 50 V 25 mS

    Fig. 11. Averaged voltage and current waveforms.

  • 8/10/2019 PowerInverterJSL2009 Smaller

    13/13

    S.A.Gonzalez et al.: Open-Source Platform for Power Converter Teaching 13

    5 Conclusion

    This work presents a hardware-based educational tool for teaching power con-verters, which has been designed to h help students get hand-on technology.In addition, they further develop their skills to obtain meaningful and accuratemeasurements and learn safety measures that are required to work with powerelectronics.

    All the firmware designed for the control experiments is developed using open-source tools. Both security and safety issues were implemented in the firmware,without loosing flexibility and performance for the real-time control algorithm.Although these can be a challenge to any firmware development tool, authorexperiences show that GNU GCC compiler is suitable for the real-time codeproduction. Moreover, the code obtained in the experiments presented in thiswork, less than 14 s was required to implement the control algorithms.

    References

    1. Torrey, D.: A project-oriented power electronics laboratory. Power Electronics,IEEE Transactions on 9(3) (May 1994) 250255

    2. Williams, J., Cale, J., Benavides, N., Wooldridge, J., Koenig, A., Tichenor, J.,Pekarek, S.: Versatile hardware and software tools for educating students in powerelectronics. IEEE Trans. Educ.47(4) (Nov. 2004) 436445

    3. Jimenez-Martinez, J., Soto, F., Jodar, E., Villarejo, J., Roca-Dorda, J.: A newapproach for teaching power electronics converter experiments. IEEE Trans. Educ.48(3) (Aug. 2005) 513519

    4. Hart, D.W.: Circuit simulation as an aid in teaching the principles of power elec-tronics. IEEE Trans. Educ. 36(1) (February 1993) 1016

    5. Widlok, H.: The applications of concurrent simulation in the power electronicslaboratory. Proceedings of the IEEE International Symposium on Industrial Elec-tronics, 1996. ISIE 96. 2 (Jun 1996) 573577 vol.2

    6. Mohan, N.: A novel approach to integrate computer exercises into teaching ofutility-related applications of power electronics. Power Systems, IEEE Transactionson 7(1) (Feb 1992) 359362

    7. Ayasun, S., Nwankpa, C.: Induction motor tests using matlab/simulink and theirintegration into undergraduate electric machinery courses. IEEE Trans. Educ.48(1) (Feb. 2005) 3746

    8. Octave: http://www.gnu.org/software/octave/index.html9. Scilab: http://www.scilab.org

    10. GCC: http://gcc.gnu.org/11. GNUBinutils: http://www.gnu.org/software/binutils/12. Newlib: http://sourceware.org/newlib/

    13. Eclipse: http://www.eclipse.org/14. GDB: http://www.gnu.org/software/gdb/15. Atmel: http://www.atmel.com/dyn/products/tools_card.asp?tool_id=434316. Fischer, M.: http://www.yagarto.de/17. Zylin: http://www.zylin.com/gccbinary.html