Вы находитесь на странице: 1из 13

An Open-Source Platform for Power Converters Teaching

S.A. Gonz´alez, J.R. Fischer, M.A. Herr´an, and D.O. Carrica

Laboratorio de Instrumentaci´on y Control Universidad Nacional de Mar del Plata CONICET sagonzal@fi.mdp.edu.ar

Abstract. This work presents a new approach for teaching power con- verters through the use of power inverter example experiments. This scheme is based on a custom-designed hardware and a software platform based on several open-source tools. The platform is controlled by a 32-bit microprocessor which gives the student the possibility to modify the ex- periments through the control firmware. All the required hardware and software 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 a good 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 by students can previously be simulated in software packages like Matlab or PSim which are very useful for beginner students in power electronics [4–7]. Open- Source alternatives of Matlab , like Octave [8] or Scilab [9], can also be used in the post analysis of the performed experiments. One unique aspect of the laboratory is that undergraduate students, under the direction of a graduate student and faculty staff, designed and constructed all the hardware and software. This accomplishment has led several students to pur- sue graduate schools in this power electronics area. In the following section the hardware design of the power inverter is going to be explained. Section ?? deals with the software tools required to successfully compiled the control firmware for an 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 experiments that are going to be carried on is important in order to define hardware design.

2

Open-Source Platform for Power Converter Teaching

Regarding this, two experimental areas that need be regarded are: open-loop and close-loop control of the power load. Among the open-loop carrier-based Pulse Width Modulation (PWM) schemes are the sinusoidal PWM (also called suboscilation PWM) and the space-vector modulation (SVM). Regarding the closed-loop control schemes the most significative techniques are the hysteresis current control (HCC) and the predictive Dead-Beat current control. Although not close to a complete list of control schemes, students have the opportunity of revisiting a simple method and then scaling up their knowledge into a later more refined technique.

All this control techniques are to be tested with a real load as a 2 kW three phase induction machine. The control of an a.c. machine was selected as the load of the inverter experiments since the motion is visual and students are faced to 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 a broader experience, this aspect is often neglected in theoretical demonstrations and of course, totally avoided in simulations. Students can observe the effects of parasitics, physical limitations of devices, and the differences between poorly and well-designed circuits and software.

Once the experiments to be carried out by the power inverter are defined, it is important to define what kind of hardware must be in place. Since open loop techniques must be implemented, a very rugged software-independent current protection must be implemented. This is done by adding an always present three-phase current measurement hall effect sensor and feeding its signal to three independent comparators. Although open-loop schemes have a clear system gain, students may produce distorted command signals to the inverter, which in term could produce an important demanding currents with catastrophical results. In those cases, current sensors ranging from dc to medium frequency (some tenths of kilohertz) are sufficient to turn-off the inverter fast enough in order to assure security.

Then a decision over the digital control unit must be made. Although a DSP has been generally widely accepted for industrial control, recent improvements in compact 32-bit ARM processor are challenging new deigns. DSP for industrial control are specifically designed to include three-phase PWM modules, timer for event 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 architecture developed by ARM Limited that is widely used in embedded designs. The core has been widely implemented by many semiconductor manufacturers and this allow several companies cover different application areas, what is being called open 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, and that will be useful no matter the application or the specific integrated circuit

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

3

U I SA SA AC U C VSI I SB SB DC U 380Vrms I
U
I SA
SA
AC
U
C VSI
I SB
SB
DC
U
380Vrms
I SC
SC
IGBT Drivers
Digital
I S(A,B,C)
Control
Unit
U S(A,B,C)
Control Interface Board
a.c. motor
Fig. 1. Block diagram of the digital control unit and the main connections to the
voltage source inverter (VSI).

vendor. The last issue was decisive for designing with ARM processor, specifi- cally with the ARM7TDMI architecture for Embedded Processors. Code written for ARM7TDMI is binary-compatible with other members of the ARM7 Family and 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 power inverter for laboratory experiments is the Atmel’s AT91SAM7X256 in PQFP package. Figure 1 is a block diagram of the system. Since the authors aim at obtaining an open hardware platform, the control unit should be replaceable, while the analog support circuitry remain hook and wired to the power inverter. The support circuitry must contain the feedback amplification of both voltage and current sensors, the independent comparators for the short-circuit protections, the host connection interface, the dual rails power supplies and the power and thermal supervisory support circuits. In order to do this, a dual PCB design was preferred with independent optically-isolated power drivers for each IGBT module. Photograph in figure 4 shows clearly this design approach. Figure 3 show a photograph of the control interface board. All the subsystems previously mention are placed on the board. Further used of surface mount technology (SMT) has provided the means of better technology support and smaller 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 mobility is important since the electrical departments lab where the big a.c. machines resides are one building away. The inverter rack consists of a three-phase full bridge inverter constructed with discrete 1200 V, 60 A IGBTs modules, every module consists of a complete leg, thus, 3 modules are laid out with 3 heat sinks. Discrete modules were chosen to minimize space, connections and cost if a leg fails.

4

Open-Source Platform for Power Converter Teaching

4 Open-Source Platform for Power Converter Teaching (a) Front view. (b) Rear view. Fig. 2. Photos

(a) Front view.

Platform for Power Converter Teaching (a) Front view. (b) Rear view. Fig. 2. Photos of the

(b) Rear view.

Fig. 2. Photos of the experimental power converter.

view. Fig. 2. Photos of the experimental power converter. Fig. 3. Photo of the main board

Fig. 3. Photo of the main board and the CPU board as that contains the Atmel’s AT91SAM7X256 microcontroller.

Some of the control racks are specific to applications since the goal of the power 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

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

5

al. : Open-Source Platform for Power Converter Teaching 5 Fig. 4. Photo of the 3 drivers

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

filter (APF) experiments is also shown. The APF rack (in figure 5) is attached to the frame when experiment need to be carried out since access to the grid is required. 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 part of the inverter. Students must have access to the whole inverter in order to fulfil the experiments and answer the study guides of every experiment. The authors preferred the use of oscilloscope with differential isolated probes. In one hand the probes are easy to acquire and are perfectly prepared to access high power devices, on the other hand, oscilloscopes give students control over what are they viewing provided they know what are they looking for. This is important since students are encouraged to read the study guides prior attending the lab experiments. Once a wave form is captured on the oscilloscope and the probe scales are set, the data is downloaded into an ASCII file. This downloading allows the data to be read into Matlab or another post-processing software.

6

Open-Source Platform for Power Converter Teaching

6 Open-Source Platform for Power Converter Teaching Fig. 5. Photo of rack for active power filter

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 same time it allows them to gain skills needed in industrial electronics and motion control applications. Due to the limited time it is important to choose a set of software tools that help 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 embedded systems. First, they provide a high level of abstraction, which eases, and speeds up, algorithm implementation. Secondly, they furnish the programmer with a rich set of low level functions, specially helpful for hardware peripheral mapping of a given microcontroller. There are a number of utilities that compliments a C/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.

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, to get 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 widely available documentation. In conjunction with the GCC, the GNU Binutils [11] software package provides the tools needed to make executable binary files from object files created by GCC. There are several C libraries to use with GCC, one of them which is specially intended for embedded systems is Newlib [12], a C library developed 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 aforementioned tools and can be downloaded from the internet. These binaries targets different host operating systems such as Windows, GNU/Linux or MacOS. The process of creation of the source code can be done with a simple text editor, and the compilation can be executed from the command line, but it is preferable the use an IDE for software development, which provides many useful features, such as code folding, syntax error detection, automation of the build process, and ease of use. Eclipse Platform [13] was chosen, this IDE has been ported to various OS, is powerful, highly customizable, visually attractive and open source. This last feature makes possible to students to build their own plug-ins, improving their C/C++ language programming environment to fit 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 in the source code and control the code execution in the embedded processor. The OpenOCD program compliments GDB, making possible to debug and program the ARM processor via JTAG flash programmer device (IEEE standard 1149.1). As stated before, the microcontroller used for control board is the Atmel’s AT91SAM7X256. Manufacturer gives a software package [15] to simplify firmware development. These tools are used to create a base program that initializes all the peripherals, so students can build the critical functions used in the control of 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 control strategies taught in theory lessons. In this manner, a typical firmware project consist 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 order to 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 in GNU/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

Open-Source Platform for Power Converter Teaching

8 Open-Source Platform for Power Converter Teaching Fig. 6. Eclipse IDE in GNU/Linux Ubuntu 8.10 integration

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

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

A non-profit, open-source community Eclipse Foundation

An extensible application framework for the development of software tools Eclipse 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 IDEs for firmware development, is the indirect benefit from software plug-ins, de- veloped for the Eclipse platform. These plug-ins cover from code documentation tools (such as the Doxygen multi-language documentation tool), versioning tools such as the Subversion (SVN) client to Bug Tracking System tools such as the Bugzilla. All theses benefits improve code readability and testability previously only obtainable with isolated comercial software. The Eclipse IDE is shown in Fig. 6, running in a Ubuntu 8.10 GNU/Linux Desktop PC.

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

9

C a.c. motor U SA U VSI I SA SB U I SB SC n
C
a.c. motor
U
SA
U
VSI
I SA
SB
U
I SB
SC
n
I SC
IGBT Drivers
n
I S(A,B,C)
+ Control
-
Strategy
n
Control Interface Board

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

4 SAMPLE EXPERIMENTS

In the new power electronics course, experiments are used to validate analysis and 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.). In the machines/drives course, experiments are being designed to implement the control of brushless dc machines, stepper motors, and volts/Hertz control of induction machines. To demonstrate the feasibility of the testbed in representative applications, an example is provided. A control of an induction motor is presented in the following section.

4.1 Induction motor control

The block diagram of a motion control system based on a IM can be seen in figure 7. In figure 8 a block diagram of a scalar control is shown. In an scalar control de PWM inverter controls both the frequency and the magnitude of the voltage output. 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.

10

Open-Source Platform for Power Converter Teaching

I S(A,B,C)

Slip Compensation s
Slip
Compensation
s
+ + -
+
+
-
PWM PI Modulator
PWM
PI
Modulator

n

e n
e
n

Fig. 8. Scalar control control strategy.

With this controllable frequency / voltage it is possible to achieve a high efficient speed controller for the induction motor. One thing to consider is the torque on the shaft.

T =

P em

ω r

(1)

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

T

= 3 P em

2

V m

ω

s

2

) 2 + (ω r · L lr ) 2 R r

ω

r

(R

r

(2)

where: P is the number of poles, V m is the counter electromotive force (CEMF), ω s is the angular frequency of the stator current, ω r is the angular frequency of the rotor current, R r is the rotor resistance, and L lr is the locked rotor induc- tance.

T

= 9.55 P em

n

= 9.55

η 3V I

f 60

p

(1

s) cos ϕ = k V m

f

(3)

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

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

11

Results from (3) are fed into the PWM inverter using an specific timer module of the ARM CPU. Figure 9 shows the current at one of the motor phases. As can be seen, a high-quality sinusoidal waveform of 10Hz can be produced modulating the signal conveniently. The switching frequency in all this experiments was kept constant at 20Khz and the characteristics of the motor can be seen in table 4.1. Figure 10 shows both the line voltage and the phase current. It can be seen how the PWM voltage signal spans from V d/2 to V d/2 obtaining the bipolar current also shown in the figure.

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

1) [Tek

TDS210].CH1

20

mV 25 mS

1) [Tek TDS210].CH1 20 mV 25 mS
1) [Tek TDS210].CH1 20 mV 25 mS
1->
1->

Fig. 9. Waveform for a 10Hz fundamental current.

Figure 11 shows the averaged waveform in order to depict both the quality of the signal and the phase lag introduced by motor, in this case 32 deg ap- proximately. The averaged PWM line-to-line voltage was obtained using a Tek TDS210 oscilloscope and sequential acquisitions.

Manufacturer / Origin

Weg / Brasil

Frequency

 

50 Hz

Power

 

1 CV

Speed

 

1430 RPM

Voltage

Y

380V /∆ 220V

current

Y 2.2A/∆ 3.8A

cos(φ)

 

0.74

Inertia

0.00175Kgm 2

Isolation

B Clase (40 Amb.)

IP

 

54

12

Open-Source Platform for Power Converter Teaching

2-> 1-> 1) [Tek TDS210].CH1 20 mV 2) [Tek TDS210].CH2 50 V 1 1 mS
2->
1->
1) [Tek TDS210].CH1 20 mV
2) [Tek TDS210].CH2 50 V
1 1 mS mS

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

1->2-> 1) [Tek TDS210].CH1 20 mV 2) [Tek TDS210].CH2 50 V 25 25 mS mS
1->2->
1) [Tek TDS210].CH1 20 mV
2) [Tek
TDS210].CH2
50
V
25 25 mS mS

Fig. 11. Averaged voltage and current waveforms.

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 accurate measurements and learn safety measures that are required to work with power electronics. 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, author experiences show that GNU GCC compiler is suitable for the real-time code production. Moreover, the code obtained in the experiments presented in this work, 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) 250–255

2.

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

3.

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

4.

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

5.

Widlok, H.: The applications of concurrent simulation in the power electronics laboratory. Proceedings of the IEEE International Symposium on Industrial Elec- tronics, 1996. ISIE ’96. 2 (Jun 1996) 573–577 vol.2

6.

Mohan, N.: A novel approach to integrate computer exercises into teaching of utility-related applications of power electronics. Power Systems, IEEE Transactions on 7(1) (Feb 1992) 359–362

7.

Ayasun, S., Nwankpa, C.: Induction motor tests using matlab/simulink and their integration into undergraduate electric machinery courses. IEEE Trans. Educ. 48(1) (Feb. 2005) 37–46

8.

Octave: http://www.gnu.org/software/octave/index.html

9.

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=4343

16.

Fischer, M.: http://www.yagarto.de/

17.

Zylin: http://www.zylin.com/gccbinary.html