Three Phase - Single Phase...

67
ECE 4600 Group Design Project Three Phase - Single Phase Converter by Group 11 Stephen Perry Ali Rezaee Michelle Ocran Reena Dhir Final report submitted in partial satisfaction of the requirements for the degree of Bachelor of Science in Electrical and Computer Engineering in the Faculty of Engineering of the University of Manitoba Academic Supervisor(s) Shaahin Filizadeh, Department of Electrical and Computer Engineering University of Manitoba Date of Submission March 10, 2014 Copyright © 2014 Stephen Perry, Ali Rezaee, Michelle Ocran, Reena Dhir

Transcript of Three Phase - Single Phase...

Page 1: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

ECE 4600 Group Design Project

Three Phase - Single Phase Converter

byGroup 11

Stephen Perry Ali RezaeeMichelle Ocran Reena Dhir

Final report submitted in partial satisfaction of the requirements for the degree of

Bachelor of Science in Electrical and Computer Engineering in the

Faculty of Engineering of the University of Manitoba

Academic Supervisor(s)

Shaahin Filizadeh,Department of Electrical and Computer Engineering

University of Manitoba

Date of Submission

March 10, 2014

Copyright © 2014 Stephen Perry, Ali Rezaee, Michelle Ocran, Reena Dhir

Page 2: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters
Page 3: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

Abstract

In today’s world, where power demand has increased significantly, the reliance on flexible

energy options has also increased.

Our design is an attempt to take a three phase AC input and convert it to a single phase

AC output. This output would then be connected to a standard household power grid. The

same principle can be applied in the reverse direction.

To achieve this, we use a combination of rectification and inversion processes. These

processes are implemented by using a full bridge and a half bridge converter. The converters

are controlled with Proportional-Integral (PI) controller.

We have completed a full simulation of our entire project. The PI controllers ensure

that the power is transfered at the output of the converter. Whenever the input power

exceeds the required DC voltage, the controller transfers the excess power to the power grid

connection. The PI Controllers are implemented using a microcontroller.

Our project has two major sections, software and hardware. The software algorithm

has been developed and tested. Each hardware component has tested individually. The

hardware and the software part will be assembled together to have our final working model

in the near future.

- i -

Page 4: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

Contributions

Ste

ph

enP

erry

Ali

Rez

aee

Mic

hel

leO

cran

Ree

na

Dh

ir

Research and Investigation • ◦Technical Editor •AC-DC Simulation ◦ •DC-AC Simulation •PI Controller Simulation ◦ ◦ •Software Development •Software Testing •Microcontroller Testing •Hardware Selection and Ordering ◦ ◦ •Hardware Assembly and Testing ◦ ◦ •

Legend: • Lead task ◦ Contributed

- ii -

Page 5: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

Acknowledgements

The team would like to take this opportunity to acknowledge and thank all those who

assisted and supported us for the completion of the project.

We would like to thank our advisor, Dr. Shaahin Filizadeh for providing us an opportunity

to work on his undergraduate project. He has not only helped us in troubleshooting our

technical issues related with our project but has also provided us with some great comments

whether it involved group dynamics or written reports.

We would also like to send our special thanks to Mr. Erwin Dirks for providing us

suggestion and feedback on our hardware components chosen.

Last but not the least, we would like to send our special regards to Mr. Daniel Card, Dr.

Behzad Kordi and Ms. Aidan Topping for giving us feedback whenever it was required and

making this complete course, a great learning experience.

- iii -

Page 6: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter TABLE OF CONTENTS

Table of Contents

Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i

Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii

Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii

List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi

List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii

1 Introduction 1

1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3 Problem Definition and Specifications . . . . . . . . . . . . . . . . . . . . . 2

1.4 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.5 Thesis Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.6 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Modeling and Simulation of Converters 5

2.1 Stage 1: AC-DC Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2 Stage 2: DC-AC Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.3 Power Grid Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.4 PI Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.4.1 Design 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.4.2 Design 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3 Software Development 19

3.1 Software Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.1.1 Sinusoidal Pulse Width Modulation (SPWMs) . . . . . . . . . . . . 20

3.1.2 Creating Sine Wave . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

- iv -

Page 7: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter TABLE OF CONTENTS

3.1.3 Creating a Triangular Wave . . . . . . . . . . . . . . . . . . . . . . . 22

3.1.4 Creating SPWMs: Comparison of the two Waveforms . . . . . . . . 23

3.2 Measuring Voltage and Currents . . . . . . . . . . . . . . . . . . . . . . . . 25

3.2.1 Calculating Average Power . . . . . . . . . . . . . . . . . . . . . . . 27

3.2.2 PI Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3.3 Microcontroller Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4 Hardware Implementation 30

4.1 Design Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.2 Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4.3 Hardware Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4.4 Real and Reactive Power Measuring Module . . . . . . . . . . . . . . . . . . 34

4.5 DC Voltage Measuring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

4.6 Single Phase Current and Voltage Measuring Module . . . . . . . . . . . . . 36

4.7 Half Bridge Rectifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

4.8 Full Bridge Rectifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5 Conclusions 40

References 42

Appendix A Verilog Code 43

Appendix B Budget 57

Appendix C Curriculum Vitae 58

- v -

Page 8: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter LIST OF FIGURES

List of Figures

2.1 AC-DC Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2 AC-DC Converter Voltage Output . . . . . . . . . . . . . . . . . . . . . . . 8

2.3 DC-AC Converter Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.4 DC-AC Voltage Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.5 DC-AC Current Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.6 Complete Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.7 AC-DC PI controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.8 AC-DC Converter Design 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.9 Single Phase Voltage Output Design 1 . . . . . . . . . . . . . . . . . . . . . 15

2.10 Single Phase Voltage Output Design 2 . . . . . . . . . . . . . . . . . . . . . 17

2.11 Shunt Capacitor Output Design 2 . . . . . . . . . . . . . . . . . . . . . . . . 18

3.1 Sine Wave Generated from Look Up table . . . . . . . . . . . . . . . . . . . 21

3.2 Sine Wave Generation Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 22

3.3 Triangular Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.4 Two State SPWM Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.5 Half Bridge SPWM Generation . . . . . . . . . . . . . . . . . . . . . . . . . 26

3.6 Full Bridge SPWM Generation . . . . . . . . . . . . . . . . . . . . . . . . . 26

3.7 PI controller Implementation Block Diagram . . . . . . . . . . . . . . . . . 29

4.1 Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.2 Hardware Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4.3 Half Bridge Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

4.4 Half Bridge Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

4.5 Control of Full Bridge Rectifier . . . . . . . . . . . . . . . . . . . . . . . . . 39

- vi -

Page 9: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter LIST OF TABLES

List of Tables

1.1 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

B.1 Budget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

- vii -

Page 10: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter LIST OF TABLES

Abbreviations

Abbreviation Description

SPWM Sinusoidal Pulse Width Modulation

IGBT Insulated Gate Bipolar Transistor

MOSFET Metal-Oxide Semiconductor Field Effect Transistor

RMS Root Mean Square

ADC Analog to Digital Converter

PI Controller Proportional Integral Controller

AC Alternating Current

DC Direct Current

IC Integrated Circuits

FPGA Field Programmable Gate Array

DE2 Development and Educations Board 2

CT Current Transformer

- viii -

Page 11: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 1. Introduction

Chapter 1

Introduction

The objective of this project is to convert a three-phase power to a single-phase power.

The three-phase source is rectified to obtain DC Voltage. The DC voltage is then inverted

to 120 Vrms. The same principle can be applied in the reverse direction. This can be used

to operate a three-phase system using a single-phase system.

1.1 Background

The background can be explained through the idea of rectification and inversion. Recti-

fication is the process of taking three-phase or single-phase Alternating Current (AC) and

converting it to Direct Current (DC). This can be done in a controlled or uncontrolled

manner. For our design project, we are using a controlled process. To accomplish this

Insulated-Gate Bipolar Transistor’s (IGBT), or Metal-Oxide-Semiconductor Field Effect

Transistor’s (MOSFET) are used in conjunction with controlling pulses. Inversion is simply

rectification in reverse; DC power is converted into AC power.

These devices are controlled using signals, known as firing angles which are responsible for

turning on IGBT’s. These signals are generated using Sinusoidal Pulse Width Modulation

- 1 -

Page 12: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 1.2 Applications

(SPWM). A Proportional-Integral (PI) Controller can adjust the SPWM waveform. The

PI Controller will determine the error between its input and its reference input and adjust

the SPWM.

By combining these systems, we can have an AC input and convert to any AC output.

For example, a 60 Hz, three-phase input can be used to output as a 50 Hz single-phase

system. This is possible by introducing a DC link between the two systems.

1.2 Applications

The application for our project can be seen everywhere in today’s power system world.

In power systems the rectification, inversion scheme is used when connecting systems with

varying frequencies especially, when transferring large amounts of power over long distances.

As this process involves conversion of AC into DC (rectification) and then converted back

to AC at the receiving end (inversion).

Smaller scale systems are used in industries where three-phase power is being supplied,

and single-phase is needed. In the household this method can be used to run three-phase

machines off of the household mains.

1.3 Problem Definition and Specifications

For this project, we use three-phase 220 Vrms input and convert it to a single-phase 120

Vrms output. This power is then send back to single-phase household network. This is

achieved by using PI Controllers, which ensure that maximum power is supplied back to

the network. If this goal is achieved, the PI Controllers will control SPWM waveforms,

which in turn will control our rectification and inversion process.

- 2 -

Page 13: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 1.4 Motivation

1.4 Motivation

In today’s demanding world of power system more and more households and industries

rely heavily on electricity than ever before. Along with this reliance and the advancements

of technology comes a demand for more flexible energy options. Our project design allows

the three-phase to single-phase conversion and vice versa as needed by the consumer.

1.5 Thesis Organization

In order to complete our project, the following approaches were taken to accomplish the

working model of the project.

The first approach involved understanding of how the power electronics devices work as

a whole. In addition to this, the project demanded in depth understanding of each stage,

i.e Stage 1 AC-DC conversion and Stage 2 DC-AC conversion processes.

The second approach was to have a running simulation of our design using PSCAD

software. This software was new to all of the members of the group, so we were required to

educate ourselves on this. In order do this completed as efficiently as possible we divided

it into separate parts.

Lastly, we were responsible for the hardware implementation of the design. To achieve this

Ali worked in the software sections to implement the PI controller using a SPWM waveform.

Michelle handled the signal conditioning between the high voltage and low voltage device

and Stephen and Reena were responsible for the hardware integration of the devices.

As a whole, although section responsibility was assigned to individual members of the

group, every member contributed to each section of the project.

- 3 -

Page 14: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 1.6 Specifications

1.6 Specifications

Table 1.1 will show the specifications needed to meet our design goal.

Table 1.1: Specifications

Stage 1: AC-DC Stage 2: DC-AC

Input Voltage 240 Vrms, three-phase AC 200 Vdc

Input Power 0 ≤ P ≤ 500W 0 ≤ P ≤ 500W

Output Voltage 200 Vdc 120 Vrms, single-phase AC

Output Power 0 ≤ P ≤ 500W 0 ≤ P ≤ 500W

- 4 -

Page 15: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

Chapter 2

Modeling and Simulation of

Converters

In order to design the working model of our project it was required to know the parts and

components necessary to implement our design. The best method to estimate these values

was to perform a simulation of the entire system.

Initially, the complete simulation was assigned to only one of the group members. How-

ever, it was soon found that the simulation was too complex for one member to handle. It

was then divided in two stages. Stage 1 was to convert the kinetic energy of the three-phase

220 Vrms induction machine that outputs single-phase DC. Stage 1 is called AC-DC con-

version. Stage 2 was to take Stage 1’s DC voltage and convert it back to the single phase

120 Vrms. This stage is called DC-AC conversion. For both of the converters, IGBT’s

were chosen as the switches and the switching pulses were generated using SPWM method,

which is explained in Stage 1.

- 5 -

Page 16: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.1 Stage 1: AC-DC Conversion

2.1 Stage 1: AC-DC Conversion

In this stage, a controlled AC-DC converter was designed and simulated to convert the

kinetic energy of a three-phase induction 220 Vrms machine into a DC voltage. Since the

input power and voltage drops in time, the converter keeps the DC voltage constant by

controlling SPWM that generates the switching pulses of the converter.

Fig. 2.1: AC-DC Converter

The SPWM controls six switches as shown in Figure 2.1. To accomplish control, three

sinusoidal waveforms with adjustable phase shifts were introduced as the SPWM references.

The frequencies of these sinusoidal waveforms were chosen to be 60 Hz to match the max-

imum input frequency of the induction machine. To avoid even harmonics the carrier to

reference frequency ratio should be an odd number. A higher frequency will also provide

lower switching loses. Due to the IGBT speed limitations the carrier frequency needed to

be less that 2 kHz. The SPWM waveforms were compared with 1860 Hz triangular wave-

form that acted as a carrier waveform, which satisfied all requirements. Each of the SPWM

waveforms control a complimentary pair of the switches.

- 6 -

Page 17: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.1 Stage 1: AC-DC Conversion

The IGBT switches are typically used with switching frequencies of less than 2 KHz.

Since IGBTs are non-ideal switches, there would be a small delay for them to start fully

conducting or completely stop. Therefore, each IGBT switch was put in parallel with a

diode to provide continuity of currents for inductive loads.

Due to the non-idealities of the switches, the continuous current was found to have some

harmonics. Because of the AC-DC converter’s characteristics, the third harmonics at the

output would be cancelled. To address the output harmonics, they were considered in two

groups: even harmonics and odd harmonics for each phase. The ratio of career frequency

to reference frequency was chosen as an odd integer to avoid even harmonics at the output

of the converter. The ratio used was the highest possible odd integer of 31 such that the

carrier over reference frequency was still less than 2 KHz. To address the remaining odd

harmonics, a DC shunt capacitor was added to the system to maintain a steady DC voltage.

The value of this capacitor was chosen to be 10 mF. The DC output was then made

adjustable via a feedback loop that uses PI Controllers. The PI Controllers maintained a

constant DC voltage at the output by controlling the SPWM, which is further explained in

section 2.4.

Figure 2.1 shows the design topology of the Stage 1 and the simulation result obtained

using the PSCAD software are shown in Figure 2.2.

- 7 -

Page 18: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.2 Stage 2: DC-AC Conversion

Fig. 2.2: AC-DC Converter Voltage Output

2.2 Stage 2: DC-AC Conversion

In stage 2, a controlled DC-AC converter was designed and simulated to convert the DC

output of stage one to a single phase, 120 Vrms. This output is then connected to the power

grid. The switches of the device were controlled by a SPWM waveform, which is explained

above. Furthermore, a feedback loop that has a PI controller enables the converter to

produce a clean AC waveform. This is explained in section 2.4.

At the end of stage two, a shunt capacitor of 180 uF was connected at the output to

maintain a stable voltage, thereby filtering out the higher harmonics. Figure 2.3 to Figure

2.4 show the design topology and the simulation results obtained using the PSCAD software

- 8 -

Page 19: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.2 Stage 2: DC-AC Conversion

for Stage 2.

Fig. 2.3: DC-AC Converter Schematic

Fig. 2.4: DC-AC Voltage Output

- 9 -

Page 20: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.3 Power Grid Connection

Fig. 2.5: DC-AC Current Output

2.3 Power Grid Connection

Stage 1 and Stage 2 were combined together and was successfully simulated using PSCAD

software. The simulation was done to convert three phase 220 Vrms to a single phase 120

Vrms which is then connected back to the power grid. When making this connection, we

had to make sure that the output voltage phase is in synchronism with the phase angle of

power grid. If the voltages were out of phase at the time of connection; a spike of current

might flow from high voltage to the lower voltage, which could damage the system. To

address this issue, an inductive impedance of 0.02 H was added. This inductance was later

replaced by a 1 to 1 transformer to eliminate the phase difference problem at the time of

connection.

- 10 -

Page 21: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.4 PI Controller

The result gave 2 A peak to peak and 170V peak to peak at the output. Due to the

non-availability of the 1:1 transformer, the simulations were then rerun with several other

inductance values. A larger inductance was added instead. Moreover, with the PI controller

design focusing on the phase modulation index took care of the phase difference and hence

helped in replacing the 1:1 transformer from our design. The PI controller is explained in

more detail in the section 2.4.

Figure 2.6 shows the complete schematic when both of the stages are combined.

Fig. 2.6: Complete Schematic

2.4 PI Controller

The PI Controllers are the control systems that monitor the input/output of the AC-DC

or DC-AC converters and adjust the SPWM waveforms of the IGBTs’ accordingly. During

the course, the design of the PI Controllers was modified twice. In the first design, the PI

Controllers were controlled by the output voltages of the AC-DC and DC-AC converters.

In the second design, the PI Controllers were controlled by monitoring the power of the

source and voltage of the shunt capacitor.

- 11 -

Page 22: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.4 PI Controller

2.4.1 Design 1

The objective of PI Controllers were to control the SPWM waveforms of the IGBT’s by

using the output voltage from either the AC-DC and DC-AC. The Pl Controller had two

methods to control the SPWM waveforms, Amplitude Control and Phase Control. In AC-

DC converter, the two PI Controllers utilized the Amplitude Control and Phase Control

separately. While in the DC-AC converter the PI Controller managed the Phase Control.

PI Controllers designed for the AC-DC converter had the PI Controller managing the

Amplitude Control reaching steady state at 4 second at value 100 Vdc. While the PI

Controller managing the Phase Control reaching steady state at 6 second and maximum

valve around 170 Vdc. In Figure 2.7, the differences between Amplitude Control and Phase

Control are shown. When the two PI Controllers were combined, the AC-DC output was

to be at steady state at 0.2 second to the desired output of 200 Vdc as seen in Figure 2.8.

- 12 -

Page 23: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.4 PI Controller

Fig. 2.7: AC-DC PI controls

- 13 -

Page 24: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.4 PI Controller

Fig. 2.8: AC-DC Converter Design 1

- 14 -

Page 25: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.4 PI Controller

Fig. 2.9: Single Phase Voltage Output Design 1

- 15 -

Page 26: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.4 PI Controller

In the first iteration of the PI Controller design for the DC-AC converter, the PI controlled

the modulation index (Amplitude Control) of the SPWM waveform. This controller did

produce the single-phase amplitude but the phase difference was found to be a mismatch

with the desired output.

With advice of our advisor, the PI Controller for the DC-AC converter was redesigned

to control the firing angle of the IGBT’s, (Phase Control). To do this, we change the phase

of the SPWM waveform applied to the rectiers. By focusing on the PI design iteration to

Phase Control, the output waveform could be held within ten percent of our desired output.

The simulation was run with and without the 1:1 transformer with no effects on the result.

To optimization the PI Controllers of the first design we had to find the values that ensured

the settling time of the system output was around 0.03 seconds as seen in Figure 2.9.

2.4.2 Design 2

The PI Controllers in the second design were changed to reflect the industry standard of

monitoring the system. The two PI Controllers for AC-DC side manage the Phase Control

by observing the real power of the source. The Amplitude was controlled by observing

the reactive power. By designing the PI Controllers in this way, we could ensure that the

maximum output is given to the shunt capacitor at all times.

The PI Controller on the DC-AC converter was changed to monitor the changes in voltage

of the shunt capacitor bank. When the shunt capacitor would be voltage higher than the

desired voltage of 170 Vdc, the DC-AC Converter would transfer the excess power to the

grid.

The PI Controllers for the second design obtain steady state within 7 seconds and are

able react to changes of the source voltage as seen in Figures 2.10 and 2.11.

- 16 -

Page 27: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.4 PI Controller

Fig. 2.10: Single Phase Voltage Output Design 2

- 17 -

Page 28: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 2.4 PI Controller

Fig. 2.11: Shunt Capacitor Output Design 2

- 18 -

Page 29: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 3. Software Development

Chapter 3

Software Development

The software implementation for this project was done with a combination of program-

ming in the Verilog language and Schematic designs used Altera’s Quartus, and the FPGAs

used the DE2 development unit.

3.1 Software Implementation

Several codes were written in Verilog language until an effective algorithm was developed.

After compiling these codes, Quartus optimizes the logical implementation of software in-

structions for the fastest operational speed and demand on the FPGAs physical resources.

As the next step, Quartus uses the optimized version of software instructions to program

the FPGAs’ look up tables. The DE2 unit holds these hardware implementations until

an external source reset the DE2 unit. The instructions embedded into the FPGAs are

represented in the software implementation section by a combination of algorithms, block

diagrams, and sample of the codes when appropriate. The code used for the project can be

found in the Appendix A: Verilog Code, with repetitive section not shown.

- 19 -

Page 30: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 3.1 Software Implementation

3.1.1 Sinusoidal Pulse Width Modulation (SPWMs)

There were two methods, which were considered for generating controllable SPWM using

FPGA; the microcontroller used in this project. In the first method, an external source such

as a function generator generates the waveforms required and these are supplied to the DE2

unit via an Analog to Digital converter (ADC). In the second method, the SPWM waveforms

are created within the DE2 units and by programming the FPGAs. After comparing the

two different methods and advise from the project’s supervisor, the second method was

selected due to FPGA’s control speed.

This method uses digital representations of sinusoidal and triangular waveforms. To

optimize the execution speed, such representations were done so that:

1. Their waveform values are always positive.

2. The samples can be represented with binary numbers.

3.1.2 Creating Sine Wave

During the research for the SPWM implementation in FPGAs, a verilog look up table

with 256 sampled values for a sine wave was found that on a webpage that was used to

generate audio files [1].

A sine waveform of desired frequency can be created by increasing the table’s index from

0h00 to 0hff (or 0 to 256 in base 10). This gives a sine wave, with 0hFFFF (65534 height in

base 10) maximum peak, 0h7FFF offset(or 0.5*65534 = 32767 in base 10), and minimum

of 0h0000(0 in base 10), as seen in Figure 3.1.

This sine wave also has an adjustable frequency by choosing the appropriate clock speed

for using the sine wave look up table. Since there are 256 samples in one cycle, and the

- 20 -

Page 31: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 3.1 Software Implementation

Fig. 3.1: Sine Wave Generated from Look Up table

desired frequency of the sine wave is 60Hz, the clock speed needs to be:

Clockspeed = 256 ∗ 60 = 15360Hz.

The clock used for this program is 50 MHz supplied by the DE2. To get the desired

frequency, a new clock was defined for the sine wave. The speed of the desired clock is: 50

MHz / 15360 Hz = 3255. In other words, for every 3255 cycles of 1 MHz, the slowed clock

toggles once. This moves the index of the sine look up table once and thereby creating the

sine wave with a frequency of 60 Hz. The simplified algorithm for this process is shown in

Figure 3.2:

- 21 -

Page 32: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 3.1 Software Implementation

Fig. 3.2: Sine Wave Generation Algorithm

3.1.3 Creating a Triangular Wave

Since the output reactive power of a power supply is normally kept to a minimal value

(Q is very close to 0) to reduce losses and increase the efficiency of the supply system, it

is possible to set the modulation index reference to a consent. This consent should be less

than 1 to avoid over modulation. A high modulation index improves performance, so an

index of 0.9 was chosen. In this manner, the PI controller unit controls the full bridge

rectifier by adjusting phase angles of sine waveforms.

- 22 -

Page 33: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 3.1 Software Implementation

To have the modulation index set at 0.9, the ratio of the peak of the sine wave form

(0hFFFF) to the ratio of the peak of the triangle waveform should be equal to 0.9. In other

words, the maximum peak of the triangle waveform is 0h11C6F:

PeakofTriangle =65534

0.9= 72815 = 0H11C6FHex

This triangle can be constructed in steps size of 100. Therefore, there are approximately,

729 steps from zero to the peak of the triangle. Next the triangular waveform is created by

a counter value. In the first half cycle, the counter value increases from 0h0000 to 0h11C6F

one step at a time, and then decreases to 0h0000 with the same step size. A simplified

algorithm for generating a triangular waveform is shown in figure 3.3.

This triangular waveform also has an adjustable frequency by choosing the appropriate

clock speed very similar to the sine wave. There are 2*729 = 1458 samples in one cycle of

the triangle. In order to avoid even harmonics, an odd ratio of carrier to reference frequency

was used. The triangle frequency was then selected to be 19*60 = 1020 Hz. Therefore, the

required clock speed to generate this triangle waveform should slow down the 50 MHz clock

by:

SlowedClock = 50MHz/(19 ∗ 60 ∗ 729 ∗ 2) = 30

In other words, every 30 cycles of clock 50 MHz, will make one cycle of slowed clock.

3.1.4 Creating SPWMs: Comparison of the two Waveforms

For the half bridge, a comparator detects when a sine wave value and a triangle value are

equal and this drives two complimentary switches as seen in Figure 3.4.

- 23 -

Page 34: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 3.1 Software Implementation

Fig. 3.3: Triangular Algorithm

The same methodology applies to the full bridge SPWM but with a slight modification.

A variable td is used as a time delay between the sine waveforms. This time delay is used

to create the phase differences between the three sine wave forms as seen in Figure 3.5 and

Figure 3.6.

- 24 -

Page 35: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 3.2 Measuring Voltage and Currents

Fig. 3.4: Two State SPWM Algorithm

3.2 Measuring Voltage and Currents

The measured voltages and currents are converted to digital values by aid of Analog to

Digital Convertors (ADCs), as described in the hardware section. Since there are three

measurements, and each measurement requires 8 bits, there are 24 pins required to read

the sampled digital values. The microcontroller takes these values as an input by using 24

of the 32 available pints of the GPIO O ports.

- 25 -

Page 36: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 3.2 Measuring Voltage and Currents

Fig. 3.5: Half Bridge SPWM Generation

Fig. 3.6: Full Bridge SPWM Generation

- 26 -

Page 37: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 3.2 Measuring Voltage and Currents

3.2.1 Calculating Average Power

The average power of an AC power can be calculated as:

P = V rms ∗ IrmsCos(θ)

Where,

V rms =V peak√

2

&

Irms =Ipeak√

2

or alternatively:

Pave =

∑Psampled

NumberofSamples=

∑Vsampled

NumberofSamples∗ Isampled

To implement this design, the microcontroller constantly reads samples of voltage and

current values. These samples are stored in memory over a period of 30 seconds. Next,

these samples are added together, and divide by the number of samples to give the average

power.

3.2.2 PI Controller

The formal equation[7] of a PI Controller in s domain is :

G(s) = Kp+KI/S

- 27 -

Page 38: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 3.2 Measuring Voltage and Currents

This equation can be implemented in a digital logic system [4,5,6] as:

I(k) = (E(k) + E(k − 1)) ∗ Ki ∗ Ts/

2 + I(k − 1)

P (k) = Kp ∗ E(k)

The PI controller can be logically implemented in by using the following algorithms: For

the stage 1’s (full bridge rectifier) PI controllers the average AC power and average DC

power are measured, as seen in Figure 3.7. Their difference is the error for the PI controller

responsible for the phase angles of sine waves. For the modulation index, constant 0.9 was

used as the modulation index.

For the stage 2, whenever the capacitor voltage becomes higher than 200V, the stage 2’s

PI controller is activated. This device measures the single-phase ac output and compares

is to 120 Vrms. The error drives the phase angle of stage 2’s SPWM.

- 28 -

Page 39: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 3.3 Microcontroller Integration

Fig. 3.7: PI controller Implementation Block Diagram

3.3 Microcontroller Integration

One of the project design challenges was connecting a low voltage, low power microcon-

troller to high voltage, high power systems. The microcontroller was required to monitor

voltages and currents in different stages, the real and the reactive power supplied to the

system and to control the IGBT switching signals. To protect the microcontroller from any

damage any possible leakage of high power should be avoided. Thus, different alternatives

and methods were considered. It was then decided to employ a combination of optoisola-

tors and step down transformers to safely communicate between the high voltage and low

voltage sides of the system. These sections are further explained in Chapter 4, Hardware

Implementation.

- 29 -

Page 40: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 4. Hardware Implementation

Chapter 4

Hardware Implementation

4.1 Design Topology

The objective of this project is to develop a three phase- single-phase converter. The

project converts power of an Alternating Current (AC) source of any frequency and voltage

value, within the specifications of the system, to a single phase AC of desired voltage and

frequency in two stages.

Fig. 4.1: Topology

From figure 4.1, in stage one, a controlled full bridge rectifier, with six IGBTs convert

the three-phase AC power to a DC power. Two PI controllers that control the phase and

- 30 -

Page 41: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 4.2 Components

modulation index monitor this conversion. The average of the three-phase AC source’s real

power is measured and is used as the reference. This reference is then compared with the

stage 1’s DC output power. The comparison provides an error that is used to drive the

phase angle of SPWM waveforms. This process optimizes the firing angles of the full bridge

rectifier’s IGBTs so that the maximum real power is transferred to the DC side, which is

the input of stage two.

In stage two, a PI controller monitors the energy stored in a shunt DC capacitor by

measuring the capacitor’s voltage. When the capacitor voltage exceeds a set value, the PI

controller of stage 2 transforms the excessive DC energy to the desired single phase AC

power. Finally, the converter transfers this converted AC power to the power grid via a 1:1

transformer, which damps the possible phase difference between the output power and the

power grid.

4.2 Components

1. Full bridge rectifier: After research and simulation we found that a full bridge rectifier

was needed to convert the three-phase input to DC. To implement this we decided that a pre-

built IGBT bridge would best suit our needs. This was chosen for high voltage MOSFET’s

since it was more economical to use the IGBT components since they were available at the

University of Manitoba.

2. Half bridge rectifier: Independent DC power supply for half bridge rectifier The dc

output of stage 2 is measured with respect to neutral not ground. Therefore, to supply the

required voltages to drive the half bridge switches, an independent dc power supply was

used. This dc power supply, provides the require power for an optoisolators and Integrated

Circuits (ICs).

- 31 -

Page 42: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 4.2 Components

3. IGBT’s: The IGBT switches are typically used with switching frequencies of less than

2 KHz. Since these switches were readily available in the university, we ended up choosing

them for our design project.

4. Capacitor Bank: A capacitor bank was provided by the university. This device was

to simulate the AC capacitor 180 uF at the final output. Instead of ordering a single

capacitor, we decided to use the capacitor bank to tune our final single phase AC output.

The capacitor bank has three rows of standard values (0.1 uF to 150 uF) giving us control

of remove harmonics that will occur in our final single phase AC output.

5. Optoisolators: Independent DC supply: The optoisolator circuit that drives the full

bridge rectifier requires a 24 V power supply. The design team ordered a 24-power supply

with the input of 120 Vrms.

6. Three-phase voltage and current transducers: The three phase voltage and current

transducer was obtained from the university. This device will be used to provide the voltages

and currents of each three phases of the source. All outputs of this device are given as

voltages. Testing and measuring of this device was reacquired to find the range of the

device.

7. Isolation Amplifiers: The Isolated Amplifier used to measure our high DC voltage at

the shunt capacitor. This amplifier provides isolated protection while reading voltage and

provides zero to five Volts output. A voltage divider is connected to the input ensuring it

is with in the range of zero to five Volts.

8. Microcontroller: The project demands a fast and reliable microcontroller to control

the system adequately and safely. Additionally, good development software and available

- 32 -

Page 43: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 4.3 Hardware Assembly

technical support were required. The selection was also limited by the cost of the microcon-

troller and its availability. Considering the requirements and constraints, the design team

selected Altera’s DE2 Development and Educational Board. This board uses a Cyclone

II Field-Programmable Gate Array, (FPGA) which satisfied our clock speed requirements.

Furthermore, this controller can process different tasks in parallel (such as creating sine

wave and triangle waves) unlike software with one processor, where one task has to be

processed before then next one begins.

4.3 Hardware Assembly

Figure 4.2 shows the hardware assembly of the design topology with the measuring de-

vice modules and the microcontroller. There are three measuring device modules: Real

and Reactive Power Measuring Module, DC Voltage Module and the Single-Phase Cur-

rent and Voltage Measuring Module. All the Measuring Module outputs are inputs to the

microcontroller.

Fig. 4.2: Hardware Assembly

- 33 -

Page 44: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 4.4 Real and Reactive Power Measuring Module

The source is model using LabVolt three-phase power supply. The power supply is ad-

justed to the voltage of 220 Vrms and is connected to the real and reactive power measuring

module. The full bridge rectifier receives input from the real and reactive power measuring

module. Simultaneously, it receives SPWM waveform from the microcontroller.

The equivalent DC shunt capacitor of 10 mF connects the full-bridge rectifier and the half-

bridge rectifier. Measurements are taken from the shunt capacitor through the DC voltage

module, and the output received from the DC voltage module is given to the microcontroller.

The half-bridge rectifier receives its SPWM waveform from the microcontroller and output

a single-phase 120 Vrms to the 1:1 transformer. The 1:1 transformer then passes this signal

to the capacitor bank that filters out the unwanted harmonics. This signal is then connected

back to the power grid.

4.4 Real and Reactive Power Measuring Module

The Real and Reactive Power Measuring Modules consist of the following components:

three-phase voltage and current transducers, six ADCs. This module takes the three-phase

current and the voltage measurement and sends out a 6 to 8 bit outputs to the microcon-

troller. These outputs are then converted to power measurements and are used in the PI

Controller algorithms controlling the full bridge rectifier.

For the three-phase measurements, we use a single board which is capable of measure

each phase independently. For the voltage measurements, a transformer is mounted on the

board. We send it the phase voltage of our input and it produces a more manageable low

voltage value. For current measurements 3 individual current transformers (CT) are used.

Each CT produces a low current. This current than must be sent through a resistor. The

voltage of the resistor is read, and the current is in turn calculated :

- 34 -

Page 45: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 4.5 DC Voltage Measuring

Iin =VresistorR

∗N

Where N is the number of turns in the current transformer.

ADC will take in the output of the current transducer and voltage reading (, range 0-5V)

and will convert the input to the 8-bit input for the microcontroller. The ADCs are setup

on a continuous mode output which allows the microcontroller to sample the bits at its

bit rate. The microcontroller then formulate a numerical conversion of current and voltage

8-bit reading to appropriate power values. These values are used in the microcontroller

which controls the full bridge rectifier.

When we are looking at the single phase side, a measurement of the output current is

needed. This is a pre-built board. This board consists of a CT and group of resistors.

When we initially took the measurements, the current output was too low. When we apply

addition coil turns to the device.

4.5 DC Voltage Measuring

The DC Voltage Module consist of a voltage divider, an isolation amplifier and an ADC.

The DC voltage of 200 V is stepped down to 5 V, by the voltage divider, filter through an

isolated amplifier, and is then converted to 8-bit output by the ADC. The 8-bit output is

then returned to the microcontroller which controls the half-bridge rectifier.

The step down voltage was created with the voltage divider to the top railing of the shunt

capacitor. The current through the voltage divider was selected to be 10mA. This current

will generate some power loss on the DC side. The resistors values were calculated based

on the input of 120 Vdc and the input of 5Vdc. Thus, we choose R1 = 100 k ohms and R2

- 35 -

Page 46: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 4.6 Single Phase Current and Voltage Measuring Module

= 2.7 k Ohms.

The shunt capacitor is referenced with respect to the neutral. We cannot connect the

voltage divider directly to an ADC as this might create a large current to be driven into the

ACD. Thus, an isolated amplifier was used to provide the isolation and protection required.

The isolated amplifier takes the voltage across the 2.7 k ohms resistor as its input. This

input signal then goes through the voltage transformations within the amplifier and pro-

duces an output with reference to ground ( range 0 to 5V). This output is then passed

through ADC which is then converted to 8-bit output to be used in the microcontroller.

4.6 Single Phase Current and Voltage Measuring Module

Single Phase Current and Voltage Measuring Module monitors the output of the single

phase system. The module consists of multi-meter, single phase current transducer and an

ADC. The mulit-meter is used to monitor the voltage output. The single phase current

transducer converts the current into voltage. This allows the ADC chip to read the voltage

and provide us the current reading via the microcontroller.

4.7 Half Bridge Rectifier

In stage two, a half bridge rectifier converts DC to AC as shown in Figure 4.3. This

rectifier receives a controlled DC, which is measured with respect to neutral. To convert

DC to AC, the microcontroller unit sends complementary signals to the IGBT gates to turn

them on and off, and the speed of these signals determines the output’s frequency.

For the IGBT half bridge rectifier, device CM50DY-12H was selected. This device is a

collection of two back to back IGBTs. On the dc side, collector of the first IGBT (C1) and

- 36 -

Page 47: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 4.8 Full Bridge Rectifier

Fig. 4.3: Half Bridge Schematic

the emitter of the second IGBT (E2) are connected to the dc capacitor, which keeps a stiff

dc voltage of 200 V. The emitter of the first IGBTS (E1) and the collector of the second

IGBT (C2) are connected together and their output provides 120 Vrms, output with respect

to the ground.

This conversion is controlled by DE2 s FPGAs via a collection of an optoisolator and

an Integerated Circuit (IC), ( Digi-Key part part CNY17F2MFS-ND ) as shown in Figure

4.4. To power the optoisolator and the IC circuit, and independent power supply,( Digi-Key

part 835-1118-ND ) was used to supply 15 Vdc with respect to neutral. The microcontroller

unit sends pulses to the IC circuit. At this stage the IC chip sends out two complementary

signals of 15 Vdc. To turn these complementary switches on, S2 switch requires supply 15

Vdc with respect to neutral while the S1 requires 15 Vdc with respect to E1 C2 point.

4.8 Full Bridge Rectifier

To convert the three phase 220 Vrms to 200 Vdc, a combination of an IC circuit and a

full IGBT bridge rectifier was used, as seen in Figure 4.5, similar to the control algorithm

of the half bridge rectifer. In this stage, FPGAs send their commanding signals to the IC,

- 37 -

Page 48: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 4.8 Full Bridge Rectifier

Fig. 4.4: Half Bridge Block Diagram

part number BP7A. This IC circuit isolates the microcontroller from the IGBT switches

and is powered by a 24V power supply, part number 285-1827-ND. On the output of the IC,

the full bridge rectifier, part PH150CLA060, made by FRX, receives switching commands

and converts the ac to dc as specified.

- 38 -

Page 49: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 4.8 Full Bridge Rectifier

Fig. 4.5: Control of Full Bridge Rectifier

- 39 -

Page 50: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter 5. Conclusions

Chapter 5

Conclusions

This project report has outlined the design and implementation of a three-phase system to

a single-phase system. Although this report demonstrated only one model of the converter

that was designed i.e., going from three-phase system to single-phase system direction, this

project opens up a window to develop a converter going into the reverse direction i.e single-

phase system being used to operate a three-phase system. Thereby, bestowing the idea of

a regenerative breaking system.

In order to meet our goal, a complete PSCAD simulation was done. Based on the results,

we selected our individual hardware components. To monitor the input or output of the

AC-DC or DC-AC converters and adjust the SPWM waveforms of the IGBTs accordingly,

we used a PI control system in the simulation. To optimize control performance of the

system a fast control unit was desired. This led to choose FPGAs as our control unit.

As of now, the controller algorithm has been developed and is at testing and debugging

stage. For the hardware implementation, each component has been tested individually and

made sure that they meet our project specification.

- 40 -

Page 51: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

Given the time frame and the budget allotted for the project, the team is optimistic to

finish the working model by the presentation date.

- 41 -

Page 52: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter REFERENCES

References

[1] J. Loomis. (2009, 18 November). Digital Labs using the Altera DE2 Board [Online].Available:http://www.johnloomis.org/digitallab/ [January 11, 2014]

[2] Z. Chaunwei, B. Zhifeng, C. Binggang, and L. Jingcheng (August 14-16, 2004). Stud-ies of Regenerative Braking in Electric Vehicle [Online]. IEEE Xplore Digital Library.Available:http://ieeexplore.ieee.org/xpl/login.jsp?tp=arnumber=1375826url=http

[3] S.R. Cikanek, and K.E. Bailey (February 12, 2002). Regenerative braking system fora hybrid electric vehicle [Online]. IEEE Xplore Digital Library. Available:http://www.researchgate.net/publication/3961650 Regenerative braking system for a hy-brid electric vehicle [June 3, 2013]

[4] P. Schad, and D. Carney (January 17, 2011). Case study of PID control in an FPGA[online]. IEEE Xplore Digital Library. Available:http://www.embedded.com/design/configurable-systems/4212241/Case-Study-of-PID-Control-in-an-FPGA- [December 25, 2013]

[5] N. Watjanathepin, N. Eawsakul, M. Puangpool, A. Namahoot, and S. Yimman. (Oc-tober 22, 2003 ). Implementation of PI Controllers with the FPGA [online]. Available:http://eng.rmutsb.ac.th/events/admin2/Redearchpapers/ImplementaionofP IcontrollerwithFPGA.pdf [January5, 2014]

[6] M. Hassan, S. Mahmood, and M. Croock. (September 3, 2006). Design of FPGABased P/PI/PD/PID Controller for Industrial Applications [Online].Available:http://www.iasj.net/iasj?func=fulltextaId=10213 [accessed February 11, 2014]

[7] D. Tilbury, and B. Messner. (2012, Oct 21). PID Control [Online]. Available:http://www.ni.com/white-paper/6440/en/ [February 11, 2014]

- 42 -

Page 53: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter A. Verilog Code

Appendix A

Verilog Code

This modules slows down its input clock by a factor of 15360

module sine_clock(clk,slow_clock);

input clk;

output slow_clock;

reg [31:0]temp;

reg slow_clock;

always @ (posedge clk)

if (temp < 15360) begin

temp = temp + 1’b1;

end

else begin

temp <= 32’b0;

slow_clock = ~slow_clock;//1’b1;

end

endmodule

- 43 -

Page 54: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

This program gets receives the appropriate clock for the sine wave, and creates an indexfor a sine table that follows it.

contenmodule sine_index (clock, count,up_down);

input clock;

output [15:0] count;

output up_down;

reg [7:0] count;

reg up_down;

always @ (posedge clock)

begin

if (up_down > 0)begin// && up_down) begin

count = count + 1’b1;

up_down = 1’b1;

if (count > 254) begin

up_down = 1’b0;

end

end

else begin

count = count - 1’b1;

up_down = 1’b0;

if (count <1)begin

up_down = 1’b1;

end

end

end

endmodule

- 44 -

Page 55: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

This module is essentially a look up table that receives an index and outputs the appro-priate sine value according to that index.

module sine_look_up_table (

input [7:0] table_index,

output [15:0] sine_wave

);

reg [15:0] sine_wave;

always@( sine_look_up_table)

begin

case(sine_look_up_table)

8’h00: sine_wave = 16’h0000 ;

8’h01: sine_wave = 16’h0192 ;

8’h02: sine_wave = 16’h0323 ;

8’h03: sine_wave = 16’h04b5 ;

// look up table continues

8’hfc: sine_wave = 16’hf9bb ;

8’hfd: sine_wave = 16’hfb4b ;

8’hfe: sine_wave = 16’hfcdd ;

8’hff: sine_wave = 16’hfe6e ;

default: sine_wave = 16’h0000;

endcase

end

endmodule

- 45 -

Page 56: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

This program synthesises a simple triangular wave by using a binary counter that countsup and down as a part of the SPWM waveform generator.

module t_wave(clock, count, up_down, sample);

input clock;

output [15:0] count;

output up_down;

output [3:0]sample;

reg [15:0] count;

reg up_down;

always @ (posedge clock)

begin

if (up_down > 0)begin// && up_down) begin

count = count + 100;

up_down = 1’b1;

if (count > 16’hefff) begin // reached more than 72815 or Oh11CF6

up_down = 1’b0;

end

end

else begin

count = count - 100;

up_down = 1’b0;

if (count <1000)begin

up_down = 1’b1;

end

end

end

assign sample[0] = count[12];

assign sample[1] = count[13];

assign sample[2] = count[14];

assign sample[3] = count[15];

endmodule

- 46 -

Page 57: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

This is a comparator of sine and triangle wave form. When they cross, the module willchange its output state: pulse

module wave_comparator(clk, sine,triangle, pulse);

input clk;

input [15:0] triangle;

input [15:0] sine;

output pulse;

reg pulse;

always @ (posedge clk)

if (triangle == sine) begin

pulse = ~pulse;

end

endmodule

- 47 -

Page 58: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

This module adjust the possible phase shifts between three SPWM wave forms for thefull bridge rectifier as phase shift between identical waveforms of fixed frequency, can bealso represented by a shift on the time axes. In this case, this phase / time shift is done byshift in sine waves look up table index.

module full_bridge_sines(clk, t1, indx1, indx2, indx3);

input clk;

input [1:0] t1;

input [1:0] indx1;

output [1:0] indx2;

output [1:0] indx3;

always @ (posedge clk)

begin

indx2 = indx1+t1;

indx3 = indx2+t1;

end

endmodule

- 48 -

Page 59: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

This module adjust the possible phase shifts for the half bridge rectifier phase controlunit.

module half_bridge_sine_shift(clk, t1, indx1, indx2);

input clk;

input [1:0] t1;

input [1:0] indx1;

output [1:0] indx2;

always @ (posedge clk)

begin

indx2 = indx1+t1;

end

endmodule

- 49 -

Page 60: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

This module calculates an error between two signals

module error(clock,reference, feedback, error);

input clock;

input [7:0] reference;

input [7:0] feedback;

output [7:0] error;

reg [7:0] error;

always @ (posedge clock)

begin

error = reference -feedback;

end

endmodule

- 50 -

Page 61: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

This module is part of the PI controller. Particularly, this is the module for time delaywhere the module receives an input signal, outputs that signal while it holds the outputvalue until the next positive edge of clock.

module time_delay(clock, input_value,output_value);

input clock;

input [7:0] input_value;

output [7:0] output_value;

reg [7:0] output_value;

always @ (posedge clock)

begin

output_value = input_value;

end

endmodule

- 51 -

Page 62: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

This module calculates the sum of two signals

module sum(clock,sig1, sig2, sum);

input clock;

input [7:0] sig1;

input [7:0] sig2;

output [7:0] sum;

reg [7:0] sum;

always @ (posedge clock)

begin

sum = sig1 + sig2;

end

endmodule

- 52 -

Page 63: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

This module multiplies KI ∗ Ts and divides them by 2 as a part of the PI controllerimplementation.

module ki_ts(clock,ki, ts, res);

input clock;

input [7:0] ki;

input [7:0] ts;

output [7:0] res;

reg [7:0] temp;

reg [7:0] res;

always @ (posedge clock)

begin

temp = ki*ts;

res = temp/2;

end

endmodule

- 53 -

Page 64: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

This module multiplies KI*Ts and divides them by 2 as a part of the PI controllerimplementation for the full bridge.

module pi_control_half(clock, reference_, feed_back_, phase_shift);

input clock;

input [7:0] reference_;

input [7:0] feed_back_;

output [7:0] phase_shift;

reg [7:0] phase_shift;

wire kp = 2;

wire ki = 0.005;

reg [7:0] ts = clock;

reg [7:0] error;

reg [7:0] perv_error;

reg [7:0] res;

reg [7:0] kp_times_error_res;

reg [7:0] ki_sum;

reg [7:0] kp_sum;

reg [7:0] perv_sum;

error e1(clock,reference, feedback, error);

kp_times_error res2(clock,kp, error, kp_times_error_res);

time_delay delay1 (clock, eror,perv_error);

sum error_and_pervious_error(clock,e1, delay1, ki_sum);

ki_ts ki_ts_dev_by2(clock,ki, ts, res);

time_delay delay2 (clock, ki_sum,perv_sum);

sum pi_output(clock,ki_sum1, kp_times_error_res, phase_shift);

endmodule

- 54 -

Page 65: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

This module multiplies KI*Ts and devides them by 2 as a part of the PI controllerimplementation for the half bridge.

module pi_half_bridge(

// Clock Input (50 MHz)

input CLOCK_50, // 50 MHz

input CLOCK_27, // 27 MHz

// Push Buttons

input [3:0] KEY,

// DPDT Switches

input [17:0] SW,

// 7-SEG Displays

output [6:0] HEX0, HEX1, HEX2, HEX3, HEX4, HEX5, HEX6, HEX7,

// LEDs

output [8:0] LEDG, // LED Green[8:0]

output [17:0] LEDR, // LED Red[17:0]

// TV Decoder

output TD_RESET, // TV Decoder Reset

// I2C

inout I2C_SDAT, // I2C Data

output I2C_SCLK, // I2C Clock

// Audio CODEC

output/*inout*/ AUD_ADCLRCK, // Audio CODEC ADC LR Clock

input AUD_ADCDAT, // Audio CODEC ADC Data

output /*inout*/ AUD_DACLRCK, // Audio CODEC DAC LR Clock

output AUD_DACDAT, // Audio CODEC DAC Data

inout AUD_BCLK, // Audio CODEC Bit-Stream Clock

output AUD_XCK, // Audio CODEC Chip Clock

// GPIO Connections

input [35:0] GPIO_0,

output [35:0] GPIO_1

);

wire [7:0]voltage_feedback;

reg [7:0]voltage_reference;

reg [7:0] phase_shift;

reg [7:0] count;

reg [7:0] count_triangle;

reg [15:0] sine_value;

reg s;

- 55 -

Page 66: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter

//receiving measured voltage as the reference

//of half bridge control

assign voltage_feedback[0] = GPIO_0[19];

assign voltage_feedback[1] = GPIO_0[21];

assign voltage_feedback[2] = GPIO_0[23];

assign voltage_feedback[3] = GPIO_0[25];

assign voltage_feedback[4] = GPIO_0[27];

assign voltage_feedback[5] = GPIO_0[29];

assign voltage_feedback[6] = GPIO_0[31];

assign voltage_feedback[7] = GPIO_0[31];

//output s goes to the IC

assign GPIO_1[29] = s;

//controlled slow clocks for sine wave and triangle

sine_clock c1(CLOCK_50,slow_clock1);

clock_1M c2(CLOCK_50,slow_clock2);

//pi controller’s controll of the sine of SPWM

pi_control_half p1(slow_clock2, voltage_reference, voltage_feedback, phase_shift);

//generating the sine waveform

sine_index(clock, count,up_down);

half_bridge_sine_shift shift(slow_clock2, phase_shift, count, indx2);

sine_look_up_table ( indx2, sine_wave);

//generating the triangle waveform

t_wave(clock, count_triangle, up_down, sample);

//compare the sine and triangle of SPWM and when they cross, pulse s

wave_comparator w(slow_clock2, sine_value,triangle, s);

endmodule

- 56 -

Page 67: Three Phase - Single Phase Converterece.eng.umanitoba.ca/undergraduate/ECE4600/ECE4600/Archive/2013/2013_2014_Final...3 Phase - 1 Phase Converter 2. Modeling and Simulation of Converters

3 Phase - 1 Phase Converter B. Budget

Appendix B

Budget

The Electrical Engineering Department had allocated $400 for this project. In addition,the project supervisor, Dr. Shaahin Filizadeh, has agreed to provide an additional $300 ifrequired. Table III shows the estimated budget summary the project.

Table B.1: Budget

Part Description DigiKey Part Number Vendor Quantity Cost

AC Capacitor 22000 uF 100V 338-1990-ND Digi-Key 2 $37.52

IC OPamp Isolation 2kHz SIP AD202JY-ND Digi-Key 2 $98.50

Opt isolation CNY17F2MFS-ND Digi-key 4 $2.20

Half Bridge Driver IR2111PBF-ND Digi-Key 4 $12.04

24V DC Supply 285-1827-ND Digi-Key 1 $25.08

15V supply 835-1118-ND Digi-Key 2 $39.56

10 pin Connector WM2818-ND Digi-Key 1 $2.04

2 pin Connector WM3200-ND Digi-Key 3 $0.93

Thermal Past 345-1007-ND Digi-Key 1 $11.97

Connectors 298-10304-ND Digi-Key 10 $2.50

Half Bridge Rectifier CM50DY-12H U of M 1 $0

Full Bridge Rectifier PH150CLA060 U of M 1 $0

Microcontroller Altera DE2 U of M 1 $0

Heat Sink N/A U of M 2 $0

Total $232.34

Table B1 suggests a total cost of $232.34 has been utilized from $700 budget. Hence, thegroups expenditure is well within its budget.

- 57 -