# Interactive Power Electronics Tool for Undergraduate Laboratories and Research Purposes

Naji Ama, Lourenco Matakas Junior, Fuad Kassab Junior

► To cite this version:

Naji Ama, Lourenco Matakas Junior, Fuad Kassab Junior. Interactive Power Electronics Tool for Undergraduate Laboratories and Research Purposes. 3rd Doctoral Conference on Computing, Electrical and Industrial Systems (DoCEIS), Feb 2012, Costa de Caparica, Portugal. pp.387-394, 10.1007/978-3-642-28255-3_42. hal-01365729

HAL Id: hal-01365729

https://inria.hal.science/hal-01365729

Submitted on 13 Sep 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Interactive Power Electronics Tool for Undergraduate Laboratories and Research Purposes

Naji Ama, Lourenco Matakas Junior and Fuad Kassab Junior

Polytechnic School of the University of Sao Paulo,
Av. Prof. Luciano Gualberto, tr. 3, n.158, 05508-900 Sao Paulo, SP, Brazil
naji@usp.br, matakas@pea.usp.br fuad@lac.usp.br

**Abstract.** This research proposes the use of hardware emulation for inverter plants for the first time. This results in a new low cost, safe and robust solution for teaching control strategies for power electronics inverter circuits, composed of a digital controller (DSP or FPGA) connected to the inverter "hardware emulation circuit". The inverter dynamical behavior is emulated by cheap operational amplifiers circuits, in such way that the student can safely measure the inverter emulated currents/voltages. The hardware emulation is not beneficial only for educational purposes but can be used for scientific research, testing and fault diagnosis of inverter systems. Substantial part of the control software development and tests can be safely and comfortably done at an office desk, without the high costs, risks and safety measures required for manipulating a real scale inverter.

**Keywords:** Hardware Emulation, Inverter, PWM, power electronics.

## 1 Introduction

To teach the practical/advanced modern power electronics, a wide range of knowledge/experience is needed by the teacher and the student, and practically it's impossible to cover all the details in one course.

The first available solution is to use a complete hardware setup, composed by a controller and power inverter. This approach suffers several issues, such as the high construction and maintenance costs, the user and equipment safety risks, the need for skilled technicians to monitor the experiments for each platform to avoid user errors. In spite of the above listed problems, it has one unquestionable advantage, according to [1]: "A laboratory control experiment or project is one of the most exciting, revealing and confidence-building engineering experiences to undergraduate and graduate students alike. Students derive satisfaction in seeing working control systems that they have just successfully implemented".

The second available solution is to use the simulation software approach. There are several available software's, such as MATLAB/Simulink, PSPICE/ORCAD, java, MathCad and PSIM [2-15]. This approach main drawback is the lack of practical hands-on experience in dealing with actual physical control systems [1].
The third available solution is a combination of the first and the second ones, in an
attempt to keep their advantages and reduce their disadvantages. This approach is
used by many modern papers such as [16-28].

This work focuses on a solution similar to the combined solution, but with the use
of a new low cost, simple, safe and robust circuit, which consists of the inverter
hardware emulation circuit connected to a digital controller (DSP or FPGA). The
inverter hardware emulation circuit is based on the inverter instantaneous equivalent
circuit and consists of cheap components (OPAMP, resistors and capacitors), in such
way that the student can safely measure the inverter emulated currents/voltages.

## 2 Contribution to Value Creation

As a result of the use of the inverter emulation, all the hardware implementation
details (power circuit assembling, DC supply, AC side load, gate drivers, cooling
system, current and voltage transformers, etc.) are avoided; but the students still have
the practical sense in changing the control variables (switching frequency, inverter
filter parameters, load, PI controller parameters ...etc) and observing the results on
the oscilloscope. Students can invoke system instabilities without damaging the
hardware, leading to more freedom and better self learning.

To have full flexibility, the MATLAB/Simulink is used to program the
DSP/FPGA, since it allows the implementation in block diagram with the minimum
knowledge of DSP/FPGA programming.

As a next step, when the undergraduate student starts its graduate studies, the
hardware emulation circuit can be changed to a compatible real inverter circuit, so
that all the past experiments can be implemented with minimum changes. Thus the
system can be used in advanced research using the sequence: 1-design, 2-simulate, 3-
emulate, 4-real implementation.

Using this approach, the teacher has the full control over the given contents, so that the teacher can separate the practical implementation concepts such as analog signal conditioning, gate drive isolation, dead time generation, current and voltage sensing ...etc, from the control theory details and from the DSP/FPGA programming details, meanwhile these contents are still available for another advanced courses and for curious students, so that they can try to investigate all the details on its own without getting disappointed with a black box.

Key contributions: 1- Economic value (i.e. cheap hardware) 2- Educational value
flexible educational tool 3- pre-testing tool for real hardware circuits.

## 3 The Proposed Laboratory Setup

In this section only one simple example of a laboratory setup will be presented due to
the article size limitation. This case demonstrates the use of the inverter hardware
emulation circuit. In order to facilitate the understanding of the complete system, a
brief description of the real hardware implementation, simulation and hardware
emulation is presented in the next sections.
## 3.1 Case Study: H-Bridge Inverter

**Real Inverter Controlled by DSP Board.** As stated before, this part is only considered for the advanced students. Fig. 1 shows the block diagram of the real inverter circuit setup, which consists of an H-Bridge inverter constructed with the Smart Power Module (FSBS10CH60) from Fairchild. The inverter is controlled by a DSP board (eZdsp TMS320f2812), that is connected to the host computer, and a function generator.

The DSP program is generated on the host computer using the MATLAB/Simulink (Fig.2), requiring no knowledge of DSP programming and reducing significantly the time for program development. Furthermore, a program was developed using visual basic to provide interactive way for modifying the system parameters (switching frequency, modulation index, PI parameters). Using this feature, the student can change the parameters in an interactive real time way (one mouse click) and observe the changes on the oscilloscope.

<figure><img src="image_2.png" /><figcaption>Fig. 1 Block diagram of the real inverter laboratory setup</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>Fig. 2 Sample DSP code generation using MATLAB/Simulink</figcaption></figure>
<figure><img src="image_4.png" /><figcaption>Fig. 3 Simulation circuit using PSIM.</figcaption></figure>

**Computer Simulation of the Inverter.** The inverter circuit is simulated using PSIM (Fig.3), the simulation circuit is modeled using continuous time domain PI controller (any continuous or discrete controller can be used), and using the ideal components (PWM modulator, subtructor...) to enable the student focus on the desired class subject.

**Emulated Inverter controlled by DSP.** The emulated setup has a block diagram similar to the one shown in Fig.1. The difference is the real inverter, where its gate drive interface, transistors, current and potential transformers are completely replaced by the inverter emulation board (two OPAMP and a set of resistors and capacitors). Thus; the same software developed in section 3.1.1 is used without modification. Fig. 4 shows the equivalent circuit of the real inverter of Fig. 1. The input signals of the inverter are the gate signals, while the output signals are the inverter current and voltage.

<figure><img src="image_5.png" /><figcaption>Fig. 4 Real inverter instantaneous equivalent circuit</figcaption></figure>

The inverter voltage $v_{inv}$ is calculated by (ignoring the voltage drop over the transistors):

$$v_{inv} = \begin{cases} +1 & \text{if } v_{Gate} = 1 \\ -1 & \text{if } v_{Gate} = 0 \end{cases} \qquad (1)$$

Equivalently this can be implemented by using operational amplifiers, as shown in (Fig.5 (a)) using the equation:

$$v_{inv\_e} = (v_{Gate} - 3.3/2)2/3.3 \qquad (2)$$

Using the equivalent circuit we can write:

$$v_{inv} = L di/dt + Ri \qquad (3)$$

To emulate the inverter current, theoretically an inductor in series with a resistor can be connected to the emulated voltage output, practically this is not possible due to the
high current values that cannot be supported by the OPAMP beside the need for very big inductor. Therefore the current is implemented as voltage signal, thus all the instabilities that can occurred are limited to the max value equal to the supply voltage of the used OPAMP; this arrangement eliminate the need for the current sensor. Using Laplace transform, the inverter transfer function can be written as

$$ \frac{v_{inv}}{i} = \frac{(1/R)}{(L/R)s + 1} \qquad (4) $$

To emulate this transfer function a first order low pass filter is used (Fig.5 (b)), assuming an ideal operational amplifier we have:

$$ I = V_i / Z_i = -V_o / Z_f \qquad (5) $$

$$ Z_i = R_1, Z_f = R_2 // sC \qquad (6) $$

Combining the eq.5 and eq.6 we get:

$$ \frac{V_o}{V_i} = \frac{(R_2/R_1)}{(L/R)s + 1} \qquad (7) $$

By comparing eq.4 and eq.7 we get:

$$ R_2 = L/RC, R_1 = RR_2 \qquad (8) $$

One more stage is needed to feedback the emulated current $i_e$ signal to the DSP board (Fig.5(c)), by shifting the signal level to be compatible with the ADC converter (0 → 3.3v).

<figure><img src="image_6.png" /><figcaption>Fig. 5 H-Bridge inverter emulation circuit</figcaption></figure>
## 4 Discussion of Results and Critical View

Fig. 6 and Fig. 7 show the experimental results of the emulator. The results using the real inverter setup and the simulation are not shown in this paper. Several experiments were carried as the following:-

* Fig.6 (a, b, c, d) is the open loop case, where the student can observe the effect of the change of the modulation index (m) and the sampling frequency on the instantaneous inverter voltage and current and their spectrum. These changes are done on the fly using the developed program in Visual Basic.

* Fig.7 (a, b, c, d) is the closed loop case, similar to the above case, the student can change the controller parameters (Kp, Ki) and the reference signal on the fly and observe the results on the oscilloscope.

<figure><img src="image_7.png" /><figcaption>Fig. 6 Experimental results of the inverter emulator (Open Loop) – (a) Fs=1.3KHz, m=1 (b) Fs=1.3KHz, m=0.5 (c) Fs=3KHz, m=1 (d) Fs=3KHz, m=0.5</figcaption></figure>

## 5 Conclusions and Further Work

The proposed experimental setup shows strong correlation between the emulation and the real inverter (not shown in this paper). It is a good solution for substituting real
inverters in undergraduate laboratories. It presents several advantages such as the reduced circuit complexity, low cost, ease of maintenance and safety.

The use of code generation/simulation tools such as the MATLAB offers a significant improvement in the educational projects because they allow the students/instructors to easily generate the controller code with minimal knowledge of the DSP/FPGA programming details.

<figure><img src="image_8.png" /><figcaption>Fig. 7 Experimental results of the inverter emulator (Closed Loop) – (a) Fs=3KHz, iref=1, stable PI controller (b) Fs=3KHz, iref=1, weak PI controller (c) Square wave reference signal (d) Fs=3KHz, iref=1, unstable PI controller</figcaption></figure>

References

1. Kheir, N.A., Åström, K.J., Auslander, D., Cheok, K.C., Franklin, G.F., Masten, M., Rabins, M., Control systems engineering education, In Automatica, vol. 32,(2), pp. 147--166, (1996)

2. Abramovitz, A.: An Approach to Average Modeling and Simulation of Switch-Mode Systems, IEEE Transactions on Education (54:3), pp. 509--517, (2011)

3. Aliane, N.: A Matlab/Simulink-Based Interactive Module for Servo Systems Learning, IEEE Transactions on Education (53:2), pp. 265--271, (2010)

4. Ayasun, S., Nwankpa, C.O.: Induction motor tests using MATLAB/Simulink and their integration into undergraduate electric machinery courses, IEEE Transactions on Education (48:1), pp. 37--46, (2005)

5. Cathey, J.J.: A MATLAB-based graphical technique for amortization study of adjustable speed drives, "IEEE Transactions on Education (45:2), pp. 177--181, (2002)

6. Dixon, W.E., Dawson, D.M., Costic, B.T., de Queiroz, M.S.: A MATLAB-based control systems laboratory experience for undergraduate students: toward standardization and shared resources, IEEE Transactions on Education (45:3), pp. 218--226, (2002)

7. Domnisoru, C.: Using MATHCAD in teaching power engineering, IEEE Transactions on Education (48:1), pp. 157--161, (2005)
8. Kikuchi, T., Kenjo, T., Fukuda, S.: Developing an educational simulation program for the PM stepping motor, IEEE Transactions on Education (45:1), pp. 70--78, (2002)

9. Martinez, F., Herrero, L.C., de Pablo, S.: Project-Based Learning and Rubrics in the Teaching of Power Supplies and Photovoltaic Electricity, IEEE Transactions on Education, pp. 87--96, (2011)

10. Nigim, K.A., DeLyser, R.R.: Using MathCad in understanding the induction motor characteristics, IEEE Transactions on Education (44:2), pp. 165--169, (2001)

11. Patil, M.B., Das, S.P., Joshi, A., Chandorkar, M.: A new public-domain simulator for power electronic circuits, " IEEE Transactions on Education (45:1), pp. 79--85, (2002)

12. Pires, V.F., Silva, J.F.A.: Teaching nonlinear modeling, simulation, and control of electronic power converters using MATLAB/SIMULINK, IEEE Transactions on Education (45:3), pp. 253--261, (2002)

13. Su, J.-H., Chen, J.-J., Wu, D.-S.: Learning feedback controller design of switching converters via MATLAB/SIMULINK, IEEE Transactions on Education, pp.307--315, (2002)

14. Uran, S., Jezernik, K.: Virtual Laboratory for Creative Control Design Experiments, IEEE Transactions on Education (51:1), pp. 69--75, (2008)

15. Canesin, C.A., Goncalves, F.A.S., Sampaio, L.P.: Simulation Tools for Power Electronics Courses Based on Java Technologies, IEEE Transactions on Education (53:4), pp. 580--586, (2010)

16. Balog, R.S., Sorchini, Z., Kimball, J.W., Chapman, P.L., Krein, P.T.: Modern laboratory-based education for power electronics and electric machines, IEEE Transactions on Power Systems (20:2), pp. 538--547, (2005)

17. Chu, R.H., Lu, D.D.-C., Sathiakumar, S.: Project-Based Lab Teaching for Power Electronics and Drives, IEEE Transactions on Education (51:1), pp. 108--113, (2008)

18. Hurley, W.G., Lee, C.K.: Development, implementation, and assessment of a web-based power electronics laboratory, IEEE Transactions on Education, pp. 567--573, (2005)

19. Jimenez-Martinez, J.M., Soto, F., Jodar, E., Villarejo, J.A., Roca-Dorda, J.: A New Approach for Teaching Power Electronics Converter Experiments, IEEE Transactions on Education (48:3), pp. 513--519, (2005)

20. Leva, A.: A hands-on experimental laboratory for undergraduate courses in automatic control, IEEE Transactions on Education (46:2), pp. 263--272, (2003)

21. Lim, D.-J.: A laboratory course in real-time software for the control of dynamic systems, IEEE Transactions on Education (49:3), pp. 346--354, (2006)

22. Lim, D.-J., An undergraduate laboratory course in real-time dynamic control, IEEE Transactions on Education (48:1), pp. 105--110, (2005)

23. Max, L., Thiringer, T., Undeland, T., Karlsson, R.: Power Electronics Design Laboratory Exercise for Final-Year M.Sc. Students, IEEE Transactions on Education (52:4), pp. 524--531, (2009)

24. Moallem, M.: A laboratory testbed for embedded computer control, " IEEE Transactions on Education (47:3), pp. 340--347, (2004)

25. Sanchez, J., Dormido, S., Pastor, R., Morilla, F.: A Java/Matlab-based environment for remote control system laboratories: illustrated with an inverted pendulum, IEEE Transactions on Education (47:3), pp. 321--329, (2004)

26. Schubert, T.F., Jacobitz, F.G., Kim, E.M.: Exploring Three-Phase Systems and Synchronous Motors: A Low-Voltage and Low-Cost Experiment at the Sophomore Level, IEEE Transactions on Education (54:1), pp. 67--76, (2011)

27. Torrey, D.A.: A project-oriented power electronics laboratory, IEEE Transactions on Power Electronics (9:3), pp. 250--255, (1994)

28. Williams, J.M., Cale, J.L., Benavides, N.D., Wooldridge, J.D., Koenig, A.C., Tichenor, J. L., Pekarek, S.D.: Versatile hardware and software tools for educating students in power electronics, " IEEE Transactions on Education (47:4), pp. 436--445, (2004)