Professional Documents
Culture Documents
FPGA Based Three-Phase Sinusoidal PWM Co
FPGA Based Three-Phase Sinusoidal PWM Co
FPGA Based Three-Phase Sinusoidal PWM Co
By
Ahmed M. T. Ibraheem
Supervisor Supervisor
Dr. Abdul Kareem Z. Mansoor Dr. Nasseer M. Basheer
Assistant Professor Lecturer
ﺑﺈﺷﺮﺍﻑ
ﻣﻴﻼﺩﻱ ﻫﺠﺮﻱ
ABSTRACT
ﻓﻲ ﻫﺬﻩ ﺍﻟﺮﺳﺎﻟﺔ ﺗﻢ ﺗﺼﻤﻴﻢ ﻭﺑﻨﺎء ﺩﺍﺋﺮﺓ ﻋﻤﻠﻴﺔ ﻟﻌﺎﻛﺲ ﻓﻮﻟﺘﻴﺔ ﺛﻼﺛﻲ ﺍﻟﻄﻮﺭ ﻭﺗﻤﺖ ﺍﻟﺴﻴﻄﺮﺓ
ﻋﻠﻴﻪ ﻣﻦ ﺧﻼﻝ ﻣﺼﻔﻮﻓﺔ ﺍﻟﺒﻮﺍﺑﺎﺕ ﺍﻟﻤﺒﺮﻣﺠﺔ ﺣﻘﻠﻴﺎ .ﺗﻢ ﺍﺳﺘﺨﺪﺍﻡ ﺗﻘﻨﻴﺔ ﺗﻀﻤﻴﻦ ﻋﺮﺽ ﺍﻟﻨﺒﻀﺔ ﺃﻟﺠﻴﺒﻲ
) (SPWMﻟﻠﺴﻴﻄﺮﺓ ﻋﻠﻰ ﻣﺤﺮﻙ ﺣﺜﻲ ﺛﻼﺛﻲ ﺍﻟﻄﻮﺭ .ﻫﺬﻩ ﺍﻟﺴﻴﻄﺮﺓ ﺗﻌﺘﻤﺪ ﻋﻠﻰ ﺗﻐﻴﻴﺮ ﺍﻟﺠﻬﺪ ﺍﻟﺪﺍﺧﻞ
ﻟﻠﻌﻀﻮ ﺍﻟﺜﺎﺑﺖ ﺍﻟﺨﺎﺹ ﺑﺎﻟﻤﺤﺮﻙ ،ﻭﻋﻦ ﻃﺮﻳﻖ ﺗﻐﻴﻴﺮ ﺍﻟﺠﻬﺪ ﻭ ﺍﻟﺘﺮﺩﺩ ﺍﻟﺪﺍﺧﻞ ﻟﻠﻌﻀﻮ ﺍﻟﺜﺎﺑﺖ ﺍﻟﺨﺎﺹ
ﻹﺷﺎﺭﺍﺕ ﺗﻀﻤﻴﻦ ﻋﺮﺽ ﺍﻟﻨﺒﻀﺔ ﺑﺎﻟﻤﺤﺮﻙ .ﺍﺳﺘﺨﺪﻣﺖ ﻣﺼﻔﻮﻓﺔ ﺍﻟﺒﻮﺍﺑﺎﺕ ﺍﻟﻤﺒﺮﻣﺠﺔ ﺣﻘﻠﻴﺎ ﻛﻤﻮﻟﺪ
ﻓﻲ ﻫﺬﺍ ﺍﻟﺒﺤﺚ ﺍﻟﻼﺯﻣﺔ ﻟﺘﺸﻐﻴﻞ ﻣﻔﺎﺗﻴﺢ ﻋﺎﻛﺲ ﺍﻟﻔﻮﻟﺘﻴﺔ .ﺗﻢ ﺗﻤﺜﻴﻞ ﻭﺗﺤﻘﻴﻖ ﻃﺮﻕ ﺍﻟﺴﻴﻄﺮﺓ ﺍﻟﻤﻘﺘﺮﺣﺔ
Xilinxﻣﻦ ﻧﻮﻉ Spartan-3E Starter ﺑﺎﺳﺘﺨﺪﺍﻡ ﻣﺼﻔﻮﻓﺔ ﺍﻟﺒﻮﺍﺑﺎﺕ ﺍﻟﻤﺒﺮﻣﺠﺔ ﺣﻘﻠﻴﺎ ﻣﻦ ﻋﺎﺋﻠﺔ
.kitﺗﻢ ﺍﺳﺘﺨﺪﺍﻡ ﻟﻐﺔ ﻭﺻﻒ ﺍﻟﻜﻴﺎﻧﺎﺕ ﺍﻟﻤﺎﺩﻳﺔ ) (VHDLﻟﺒﺮﻣﺠﺔ ﻣﺼﻔﻮﻓﺔ ﺍﻟﺒﻮﺍﺑﺎﺕ ﺍﻟﻤﺒﺮﻣﺠﺔ ﺣﻘﻠﻴﺎ
ﻣﻘﺎﺭﻧﺔ ﺑﺘﻘﻨﻴﺎﺕ ﺗﻀﻤﻴﻦ ﻋﺮﺽ ﺍﻟﻨﺒﻀﺔ ﺍﻟﺮﻗﻤﻴﺔ ﺍﻷﺧﺮﻯ ،ﺗﻘﺪﻡ ﺍﻟﻄﺮﻳﻘﺔ ﺍﻟﻤﻘﺘﺮﺣﺔ ﻋﺪﺓ ﻓﻮﺍﺋﺪ
ﻣﻨﻬﺎ :ﺍﻟﺘﺼﻤﻴﻢ ﺍﻟﺮﻗﻤﻲ ﺍﻟﺴﻬﻞ ،ﺍﺳﺘﺨﺪﺍﻡ ﺃﻗﻞ ﻣﺎ ﻳﻤﻜﻦ ﻣﻦ ﺍﻟﺪﻭﺍﺋﺮ ﺍﻟﺮﻗﻤﻴﺔ ،ﻗﺎﺑﻠﻴﺔ ﺇﻋﺎﺩﺓ ﺍﻟﺘﻬﻴﺌﺔ ،ﻣﺮﻭﻧﺔ
ﻓﻲ ﺍﻟﺘﻜﻴﻒ ،ﻭﺍﻟﺘﻄﺒﻴﻖ ﺍﻟﻌﻤﻠﻲ ﺍﻟﻤﺒﺎﺷﺮ .ﺑﺎﻹﺿﺎﻓﺔ ﺇﻟﻰ ﻣﺼﻔﻮﻓﺔ ﺍﻟﺒﻮﺍﺑﺎﺕ ﺍﻟﻤﺒﺮﻣﺠﺔ ﺣﻘﻠﻴﺎ ،ﺗﻢ ﺍﺳﺘﺨﺪﺍﻡ
ﺍﻟﺘﻲ ﺗﻢ ﺍﻟﺤﺼﻮﻝ ﻋﻠﻴﻬﺎ ﻣﻦ ﺍﻟﻤﺤﺎﻛﺎﺓ ﻣﻊ ﺍﻟﺘﻲ ﺗﻢ ﺍﻟﺤﺼﻮﻝ ﻋﻠﻴﻬﺎ ﻣﻦ ﺍﻟﻨﻤﻮﺫﺝ ﺍﻟﻌﻤﻠﻲ .ﺃﻭﺿﺤﺖ
Title Page
Contents
0B I
List of Figures IV
0T
List of Symbols Х
CHAPTER ONE: INTRODUCTION
1B 1
1-1: Preface 1
1-2: Literature Survey 2
1-3: Aim of the Work 5
1-4: The Scope of the Thesis 6
CHAPTER TWO:THEORETICAL BACKGROUND 7
2-1: Three-Phase Voltage Source Inverter (VSI) 7
2-2: PWM Techniques 8
2-2-1: Sinusoidal Pulse Width Modulation 9
2-2-2: Third-Harmonic Injection PWM (THIPWM) 11
2-2-3: 60-Degree PWM 12
2-2-4: Space Vector Modulation 13
2-3: Three-Phase SPWM Harmonic Analysis 13
2-4: Induction Motor (IM) 15
2-5: Induction Motor Drive 15
2-5-1: Stator Voltage Control 16
2-5-2: Frequency Control 17
2-5-3: Voltage and Frequency Control 18
2-6: Field Programmable Gate Array 21
2-7: Spartan-3E FPGA Family 22
2-8: Spartan-3E XC3S500E Architecture 22
2-9: FPGA Design Advantage 26
II
Title Page
Title Page
Figure Page
Figure Title
No. No.
4.11 58
1050Hz): (a) ISE simulator, (b) Simulation, and (c)
Experimental
Results of the gate switching signals for modulation
index (m i = 0.875) and carrier frequency (f carrier =
R R R R
4.12 59
1950Hz) : (a) ISE simulator, (b) Simulation, and (c)
Experimental
VI
Abbreviation Description
AC Alternating Current
ASIC Application Specific Integrated Circuit
BJT Bipolar Junction Transistor
CLB Configurable Logic Block
DC Direct Current
DCM Digital Clock Manager
IP Intellectual Property
ISE Integrated Software Environment
LED Light Emitting Diode
LUT Look Up Table
MATLAB MATrix LABoratory program
MOSFET Metal-Oxide Semiconductor Field-Effect Transistor
PS Phase Shifter
PV Photovoltaic
RAM Random Access Memory
IX
RMS
20B Root Mean Square
ROM Read Only Memory
SVM
21B
Space Vector Modulation
THD
2B Total Harmonic Distortion
THIPWM
23B
Third-Harmonic Injection PWM
TTL
24B
Transistor Transistor Logic
UCF
25B User Constraints File
VHDL VHSIC Hardware Description Language
VHSIC
26B Very High Speed Integrated Circuit
VSI Voltage Source Inverter
VVVF
27B
Variable Voltage Variable Frequency
X
LIST OF SYMBOLS
Symbol Description
Ac
29B Peak value of the triangular carrier wave
30B
Ar
31B Peak value of the sinusoidal reference wave
32B
CLKFX
3B Clock frequency which obtained from DFS unit of the DCM
34B
f Supply frequency
fcarrier Carrier waveform frequency
fclock Main system frequency of the FPGA
fclk
35B Clock frequency
freference
36B Reference waveform frequency
h
37B Harmonic order
Ls Stator inductance
𝐿𝐿𝑟𝑟 ′ Rotor inductance referred to the stator
Lm Magnetizing inductance
m Theta width
mf Frequency modulation ratio
mi
38B Modulation index
n Bit size of the up/down counter
p Number of poles of IM
r Bit size of the sine wave
𝑅𝑅𝑠𝑠 Per phase resistance of the stator winding of the IM
𝑅𝑅 𝑟𝑟 ′ Rotor resistance referred to the stator
S Slip of the motor
𝑇𝑇𝑑𝑑 Torque developed
Vcr
39B carrier signal
VDC
40B DC input voltage
41B
CHAPTER ONE
INTRODUCTION
1-1: Preface
U
solution for special applications with large market. Owing to the progress
of technology, the life cycle of most modern electronic products become
shorter than their design cycle. The emergence of FPGA has drawn much
attention due to its shorter design cycle, lower cost and higher density. The
simplicity and programmability of FPGA make it the most favorable choice
for prototyping digital systems[3]. For this reason, in the work the FPGA is
used as a sinusoidal PWM generator for the signals driving the three-phase
VSI. A three-phase VSI based on sinusoidal PWM make it possible to
control magnitude of the voltage applied to a motor, and to control both
the frequency and magnitude of the voltage applied to a motor with
constant V/F control method in open loop mode.
The work in this thesis is divided into three parts: FPGA as a
controller card, power electronics part (DC-to-AC converter), and
machines part (induction motor).
Ali. M. Eltamaly (2007) has proposed a digital speed control strategy for
three-phase induction motor. This strategy depended on varying the stator
voltage to control the speed of an induction motor. The system consisted of
six bidirectional switches. The digital control strategy used a saw-tooth
waveform with twice the supply frequency as a control signal to be
compared with triangular waveform as a carrier signal. The voltage output
from AC voltage regulator was controlled by varying the voltage level of
the saw-tooth waveform. The simulation of the system was carried out by
Powersim (PSIM) computer program. The control strategy was
implemented by using FPGA. The simulation and experimental results
showed stable operation for wide range of speed control[9].
Nitish Patel and Udaya Madawala (2008) have proposed a novel bit-
stream based of a constant V/F scalar controller technique for induction
machines. The technique was ideally suited for FPGA or Application
Specific Integrated Circuits (ASIC) implementation. The digital circuits
have been simulated using VHDL within Modelsim and synthesized on a
Stratix FPGA using Altera’s Quartus tool chain. The inverter drive was a
standard power stage consisting of six N channel MOSFETs[10].
CHAPTER TWO
THEORETICAL BACKGROUND
D1 D3 D5
S1 S3 S5
VDC A
B
C
S4 D4 D6 D2
S6 S2
The circuit has a bridge topology with three leg branches (A, B, and
C), each consisting of two power switches. The input DC supply VDC is
usually obtained from a single-phase or three-phase utility power supply
through a diode bridge rectifier and LC or C filter. For an inductive load,
the load current in each phase remains positive after the voltage in that
phase became negative, i.e. after the top switch has been turned off. The
load current then flows through the antiparallel diode of the bottom switch,
returning power to the DC link. The same happens of course when the
bottom switch is turned off and the load current flows through the
antiparallel diode of the top switch[13].
A certain switching algorithm can be applied to each of the six
switch modules S1, S2, S3, S4, S5, and S6 in order to control the inverter to
generate the desired sinusoidal output with the desired frequency and
magnitude. Among the practical switching schemes, pulse width
modulation (PWM) is classical and most widely used. It will be discussed
in detail in the following sections[12].
Ac --
Ar --
2π
g1
2π
g4
2π
g3
2π
g6
2π
g5
2π
g2
Vab
VDC
-VDC
2π
Vbc
VDC
-VDC
2π
Vca
VDC
-VDC
2π
Where :
mi is the modulation index ratio, defined as the ratio of the
amplitude of the reference and carrier signals and is given by
𝐴𝐴𝑟𝑟
mi = ………………… (2.6)
Ac
1.5
Fundamental waveform
1
Modulating waveform
0.5
-0.5
Injected waveform
-1
-1.5
π 2π
Modulating waveform
0.5
-0.5
Triple harmonics
-1
-1.5
0
π 2π
Fig.(2.4): 60-Degree PWM
13
Where:
𝑅𝑅𝑠𝑠 , 𝑋𝑋𝑠𝑠 are the per phase resistance and leakage reactance of the
stator winding as shown in the equivalent circuit of induction
motor in Fig.(2.5).
𝑅𝑅 𝑟𝑟 ′ , 𝑋𝑋𝑟𝑟 ′ are the rotor resistance and reactance referred to the stator
s is the slip of the motor
𝜔𝜔 𝑠𝑠 −𝜔𝜔 𝑚𝑚
𝑠𝑠 = ………………………..(2.14)
𝜔𝜔 𝑠𝑠
Vs2
Vs3
At rated voltage and rated frequency, the flux has rated value.
18
Voltage
V rate
F rate Frequency
This makes the flux produced by the stator proportional to the ratio
of applied voltage and frequency of supply. By varying the frequency, the
speed of the motor can be varied. Therefore, by varying the voltage and
frequency at the same ratio, flux and hence, the torque can be kept constant
throughout the speed range. This method enables us to obtain a wide range
variation in the operating speed of an IM. The Torque/speed characteristics
of an induction motor at four different values of V/F ratio are given in
Fig.(2.9)[19].
20
4. Dedicated Multipliers:
The Spartan-3E XC3S500E device provide 20 dedicated
multiplier blocks per device. Multiplier blocks accept two 18-bit
binary numbers as inputs and calculate the product. The multiplier
blocks primarily perform two’s complement numerical
multiplication. Each multiplier performs the principle operation P =
A × B, where 'A' and 'B' are 18-bit words in two’s complement form,
and 'P' is the full-precision 36-bit product, also in two’s complement
form.
5. Digital Clock Manager (DCM) Blocks:
The Spartan-3E XC3S500E device provide 4 DCMs. DCMs
provide flexible, complete control over clock frequency, phase shift
and skew. To accomplish this, the DCM employs a Delay-Locked
Loop (DLL), a fully digital control system that uses feedback to
maintain clock signal characteristics with a high degree of precision
despite normal variations in operating temperature and voltage. The
DCM supports three major functions:
• Clock-skew Elimination (delay locked loop).
• Frequency Synthesis (multiplication, and division).
• High-resolution Phase Shifting.
The DCM consists of four interrelated functional units:
A. Delay-Locked Loop (DLL): The most basic function of the DLL
component is to eliminate clock skew. The main signal path of the
DLL consists of an input stage, followed by a series of discrete
delay elements or steps, which in turn leads to an output stage.
This path together with logic for phase detection and control
forms a system complete with feedback. The DLL component has
two clock inputs, CLKIN and CLKFB, as well as seven clock
outputs, CLK0, CLK90, CLK180, CLK270, CLK2X,
CLK2X180, and CLKDV.
25
D. Status Logic: The Status Logic indicates the present state of the
DCM and a means to reset the DCM to its initial known state.
The Status Logic signals are described in Table (2.3).
2. Synthesis: After design entry and optional simulation, the synthesis step
should be run. During this step, VHDL, Verilog, or mixed language
designs become netlist files that are accepted as input to the
implementation step.
3. Implementation: Design implementation converts the logical design
into a physical file format that can be downloaded to the selected target
device. From Project Navigator, the implementation process can be run
in one step.
Design Implementation includes the following steps[25]:
• Translate (merges multiple design files to a single netlist).
• Map (maps the generic gates in the netlist to FPGAs logic cells
and IOBs and the ISE tool gives a report about the usage
hardware resources (Design Summary).
• Place and Route (derives the physical layout inside the FPGA
chip) in this process, all the components, signals and connections
are placed and routed in the FPGA package which gives a report
about the consumer hardware resources and errors.
4. Verification: Design verification is testing the functionality and
performance of the design. Design verification includes following
ways[24]:
• Simulation (functional and timing).
• Static timing analysis.
• In-circuit verification (In-circuit verification tests the circuit under
typical operating conditions).
5. Device Configuration: The last step is to generate the configuration file
and download this file from a host computer to the FPGA device to
configure the logic cells and switches[25]. The Spartan-3E Starter Kit
board supports a variety of FPGA configuration options[26]:
• Download FPGA designs directly to the Spartan-3E FPGA via
PROM, then configure the FPGA from the image stored in the
Platform Flash PROM using Master Serial mode.
• Program the on-board 16 Mbit ST Microelectronics SPI serial Flash
PROM, then configure the FPGA from the image stored in the SPI
serial Flash PROM using SPI mode.
• Program the on-board 128 Mbit Intel Strata Flash parallel NOR
Flash PROM, then configure the FPGA from the image stored in the
Flash PROM using BPI Up or BPI Down configuration modes.
In this work the first configuration option is used to download
the configuration file.
There are two tasks in this configuration option[26]:
1. Connecting the USB Cable: The Spartan-3E Starter Kit includes
embedded USB-based programming logic and an USB connector.
When the board is powered on, the Windows operating system
should recognize and install the associated driver software. When
the USB cable driver is successfully installed and the board is
correctly connected to the PC, a green LED lights up, indicating a
good connection.
2. Programming via iMPACT: After successfully compiling an
FPGA design using the Xilinx development software, the design
can be downloaded using the iMPACT programming software.
When the FPGA successfully programs, the iMPACT software
indicates success, as shown in Fig.(2.15).
3-1: Preface
To design the PWM signals generation using field programmable
gate arrays, first the functional description of the design is modelled in
VHDL using the behavioural, and structural abstraction level. Then this
VHDL code is synthesized and simulated using Xilinx synthesis and
simulation tools. After successfully synthesizing and simulating then the
design can be downloaded to the targeting device (FPGA).
This chapter discusses how the functional description is generated
and modelled in VHDL to generate the Sinusoidal Pulse Width Modulation
(SPWM) signals suitable for three-phase voltage source inverter.
Sampled sine
wave
Sampled
triangular wave
Fig.(3.2): FPGA based SPWM control scheme for variable voltage control
4π /3 × 8192
THETA = = 5461 = 1010101010101
2π (d ) (bin)
The THETA input of the third Sine module (third phase) is forced
to initialize after a delay of two thirds of the period (sin(-240°) = sin(120°)
= sin( 2π /3 )) by making the programmable up counter of this phase
initialize with "0101010101011" as shown in the following equation.
2π
2π /3 = THETA radians
213
2π /3 × 8192
THETA = = 2731 = 0101010101011
2π (d ) (bin)
Fig.(3.5) shows the three-phase sine wave generator module.
rst fclk
"1010101010101"
Up Theta
counter
fclk rst Sine
module sine out-b
fclock CLK fclk
divider fclk
50MHz
"0101010101011" Up Theta
counter
fclk rst Sine
module sine out-c
fclk
Where:
𝐶𝐶𝐶𝐶𝐶𝐶𝐹𝐹𝐹𝐹 is the clock frequency which is obtained from digital
frequency synthesizer (DFS) unit of the digital clock
manager (DCM), and used for the generation of the
carrier frequency,
𝐶𝐶𝐶𝐶𝐶𝐶𝐼𝐼𝐼𝐼 is the DFS clock frequency input which is equal to the
system frequency ( f clock = 50 MHz),
𝐶𝐶𝐶𝐶𝐶𝐶𝐹𝐹𝐹𝐹_𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 is an integer ranging from 2 to 32, and
𝐶𝐶𝐶𝐶𝐶𝐶𝐹𝐹𝐹𝐹_𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷 is an integer ranging from 1 to 32.
The carrier frequency (𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ) has a relationship with the clock
frequency and the up/down counter state which can be expressed as:
𝐶𝐶𝐶𝐶𝐶𝐶𝐹𝐹𝐹𝐹
𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = ………...... (3.5)
2(𝑛𝑛 +1) +1
38
The peak amplitude of the triangular carrier wave (Ac) depends on
the bit size of the up/down counter (n), as shown in the equation (3.6)
below;
𝐴𝐴𝑐𝑐 = 2(𝑛𝑛 −1) − 1 ……...... (3.6)
The value of the frequency modulation ratio (mf) should be odd
multiple of three as mentioned in Chapter Two. Therefore, the values of
carrier frequency (1050 Hz, and 1950 Hz) are used to operate the three-
phase inverter.
• In the first selected carrier frequency, the DCM is used to multiply the
11
main clock frequency (50 MHz) by the ratio of ( ) via DFS unit to
4
Three multipliers are used to multiply the values of the three sine
reference waves (sine out-a, sine out-b, and sine out-c) which are stored in
an internal block ROM (r = 10-bits) with the external data (multiply)
(ex = 6-bits) to get a variation in the sine reference wave amplitude
resulting in a variation of the modulation index as shown in Fig.(3.7). To
avoid the negative sign in the multiply then its bit size (ex) is increased by
one bit as a most significant bit (sign bit) and kept constant at logic '0' in
the VHDL code as shown in equations (3.8).
multiplicand = '0' " multiply" (ex =7-bits) ………………… (3.8)
40
multiplicand
sine out-a
× Vra
sine out-b
× Vrb
sine out-c
× Vrc
The peak value of the sine reference wave (Ar) depends on the
width bit (r) of the output of a three-phase sine reference waves (sine out-
a, sine out-b, and sine out-c), and the multiplicand as shown in equation
(3.9).
2𝑟𝑟
𝐴𝐴𝑟𝑟 = ∗ 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 ……...... (3.9)
4
Hence the sine wave width bit (r) and the multiplicand will determine the
modulation index of the SPWM. The value of the external data (ex = 6-bits)
can be adjusted by using six slide switches (four of them are the switches
already existing on the FPGA kit, and two switches added externally with
circuit diagram shown in Fig.(3.8)).
Voltage regulator
L7805CV
+
Vin Vout
External gnd
9V
+
- Voltage To
supply + 5V + 3.3V FPGA
divider
-
Vcr PWMAU
Digital
PWMAL
comparator
Vra
PWMBU
Digital
comparator PWMBL
Vrb
PWMCU
Digital
Vrc comparator PWMCL
The digital comparator output is logic '1' if the value of the sine
reference wave is greater than the value of the triangular carrier wave;
otherwise its output is logic '0' as shown in Fig.(3.11). Each the
comparators outputs (PWMAU, PWMBU, PWMCU) are negated to produce
the complement signals (PWMAL, PWMBL, PWMCL) of each value to
trigger the lower power switches of the three-phase inverter.
Resulting PWM
waveform
'1'
'0'
rst
fclock
50MHz
internal
rst
rst
Final note regarding architecture control design is that the reset (rst)
signal is used to force the PWM signals to be logic '0' at anytime. The reset
(rst) signal can be applied by using push-button switch which is already
existing on the FPGA kit.
The FPGA utilization summary of this proposed architecture design
is shown below in Table (3.1).
45
Table (3.1): Device utilization summary of the FPGA based SPWM
control for variable voltage control
The User Constraints File (UCF) of the FPGA based SPWM control
for variable voltage control architecture that downloaded in the Xilinx
XC3S500E Spartan-3E FPGA is given in APPENDIX (A2).
3-2-2: FPGA Based SPWM Control Scheme for VVVF using V/F
Control Strategy:
The purpose of this architecture is to adjust the speed of the IM by
controlling the frequency and amplitude of the stator voltage, the ratio of
stator voltage to frequency should be kept constant. As shown in Fig.(3.14),
the architecture of the control consists of five major parts: (1) three-phase
sine wave generator module, (2) triangular wave generator module, (3)
three-digital comparators module, (4) dead time module, and (5) V/F
control module.
46
rst PWMCU
rst PWMCL
fclock
50MHz
internal
Three Sine
modules Multipliers
External data
(1) Three-phase
sine wave generator
module
CHAPTER FOUR
HARDWARE CONSTRUCTION OF THE AC DRIVE SYSTEM
AND THE RESULTS
The basic block diagram of the AC drive system with FPGA control
is shown in Fig.(4.1). This system is divided into five stages. The first stage
represents generating the PWM signals via FPGA. The second stage
represents gate drive circuit to isolate and buffer the FPGA from the three-
phase bridge inverter circuit. The third stage represents designing the three-
phase bridge inverter circuit. The forth stage represents the three-phase step
up transformer. Last stage represents the three-phase IM. Each of these five
stages will be discussed in the next subsections.
FPGA Gate
Drive
Kit
Circuit
Induction
Three-Phase
Bridge Inverter Motor
DC Power
Supply
FPGA
Gate Drive
Circuit
Three-Phase
Transformer
each of these gating signals are negated by using three logical operator
(NOT) to produce a gating signals (g4, g6, and g2) are applied to the lower
switches (S4, S6, and S2) of the three-phase bridge inverter to generate
Three-phase
bridge inverter
PWM
generator
(a)
1.5
g1
g1
0 0.02
1.5
g4
g2
0 0.02
(b)
PWMAU
(g1)
PWMAL
(g4)
(c)
Fig.(4.11): Results of the gate switching signals at modulation index
(mi = 0.875) and carrier frequency (fcarrier =1050 Hz): (a) ISE simulator,
(b) Simulation, and (c) Experimental
59
(a)
1.5
1
g1
g1
0
0 0.02
1.5
g40.5
g2
0 0.02
(b)
PWMAU
(g1)
PWMAL
(g4)
(c)
Fig.(4.12): Results of the gate switching signals at modulation index
(mi = 0.875) and carrier frequency (fcarrier =1950 Hz): (a) ISE simulator,
(b) Simulation, and (c) Experimental
60
4-4: Dead Time Results
U
(a)
PWM
PWM
(b)
4-5: Results of the FPGA based SPWM Control Scheme for Variable
U
U Voltage Control
The line-to-line output voltage waveforms of the inverter circuit
(stator voltage of IM) with variable voltage control at different modulation
indexes and carrier frequencies are shown in Fig.(4.14), Fig.(4.15),
Fig.(4.16), and Fig.(4.17). The input DC supply (VDC) equals to 100V (the
voltage probe was set to 10:1 scale), for the reference frequency ( freference =
50 Hz).
Figures (4.14), and (4.15) show the simulation and experimental
results of the line-to-line output voltages (Vab, and Vcb) at two values of the
modulation indexes: (mi = 0.1875), and (mi = 0.875) respectively, at the
carrier frequency (fcarrier =1050 Hz).
Figures (4.16), and (4.17) show the results of the line-to-line output
voltages (Vab, and Vcb) at two values of the modulation indexes: (mi =
0.1875), and (mi = 0.875) respectively, at the carrier frequency (fcarrier
=1950 Hz).
The capability of variation the modulation index can provide a soft
starting for the induction motor. The soft starting is implemented by
starting the motor with low value of modulation index and then increasing
it gradually during the starting period to avoid a high starting current.
The experimental results are similar to the simulation results, i.e.
there is no different in the general switching pattern in both results, these
uniform voltage waveform has a fundamental sinusoidal component
responsible for a sinusoidal stator current and flux.
62
100
Vab
-100
0.02
100
Vcb
-100
0.02
(a)
Vab
Vcb
(b)
Fig.(4.14): Results of the line-to-line output voltages waveforms at
modulation index (mi = 0.1875) and carrier frequency (fcarrier =1050 Hz)
:(a) Simulation, and (b) Experimental
63
100
Vab
0
-100
0.02
100
Vcb
-100
0.02
(a)
Vab
Vcb
(b)
Fig.(4.15): Results of the line-to-line output voltages waveforms at
modulation index (mi = 0.875) and carrier frequency (fcarrier = 1050 Hz)
:(a) Simulation, and (b) Experimental
64
100
Vab
-100
0.02
100
Vcb
-100
0.02
(a)
Vab
Vcb
(b)
100
Vab
0
-100
0.02
100
Vcb
-100
0.02
(a)
Vab
Vcb
(b)
(a)
Ia
(b)
Fig.(4.18): Results of the stator current waveform at modulation index
(mi = 0.9375) and carrier frequency (fcarrier =1050 Hz) :(a) Simulation,
and (b) Experimental
67
(a)
Ia
(b)
Fig.(4.19): Results of the stator current waveform at modulation index
(mi = 0.9375) and carrier frequency (fcarrier =1950 Hz) :(a) Simulation,
and (b) Experimental
68
(a)
(b)
Fig.(4.20): FFT analysis for frequency order at (mi = 1) and at
:(a) Carrier frequency (fcarrier =1050 Hz), (b) (fcarrier =1950 Hz)
69
The FFT analysis of the output voltage of the inverter shows that in
case carrier frequency (1950 Hz and 1050 Hz respectively) the harmonic
components are shifted to be centred about the modulation frequencies (mf)
order (39th and 21st respectively). This means that as the value of mf is
increased the harmonic components are shifted away from the fundamental
component which has the advantage of reduced filter size, although the
switching loss is slightly increased.
Fig.(4.21.a) shows the variation of the fundamental voltage
component V1/VDC versus modulation index (mi) at different carrier
frequencies (fcarrier = 1050 Hz, and fcarrier = 1950 Hz), Fig.(4.21.b) illustrates
the variation of the Total Harmonic Distortion (THD) of the output voltage
of the inverter versus mi, and Fig.(4.21.c) illustrates the variation of the
THD of the stator current versus mi.
70
1
fcarrier=1050Hz
0.9 fcarrier=1950Hz
0.8
0.7
0.6
V1/Vdc
0.5
0.4
0.3
0.2
0.1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Modulation index (m i)
(a)
350 fcarrier=1050Hz
fcarrier=1950Hz
300
250
%THD
200
150
100
50
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Modulation index (m i)
(b)
40 fcarrier=1050Hz
fcarrier=1950Hz
30
%THD
20
10
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Modulation index (m i)
(c)
due to the low voltage (V1) and high value of the other harmonic
components, then the THD decays to less than (70%) at (mi = 1).
4-7: Results of the FPGA Based SPWM Control Scheme for VVVF
U
Table (4.1) shows the actual speed of the IM with variable voltage
variable frequency controller in open loop mode.
Vab
Vcb
Vab
Vcb
(b): freference=21.875 Hz
Vab
Vcb
(c): freference=18.75 Hz
73
Vab
Vcb
(d): freference=15.625 Hz
Vab
Vcb
(e): freference=12.5 Hz
Fig.(4.22): Experimental results of the line-to-line output voltage
waveform of the inverter for VVVF using V/F control
Ia
Ia
(b): freference=21.875 Hz
Ia
(c): freference=18.75 Hz
75
Ia
(d): freference=15.625 Hz
Ia
(e): freference=12.5 Hz
CHAPTER FIVE
CONCLUSIONS AND FUTURE WORK
5-1: Conclusions
In this thesis the generation of PWM gating signals for the three-
phase VSI switches based on FPGA was successfully realized. Using
FPGA to generate PWM provides flexibility to modify the designed circuit
without altering the hardware part, easy and fast circuit modification,
comparatively low cost for a complex circuitry and rapid prototyping. The
control algorithm of the three-phase VSI was constructed in the
FPGA chip, also the hardware equipments needed for this driver were
constructed. They contain: a three-phase bridge inverter, and a gate driving
circuit.
Here are some conclusion points that can be highlighted as:
• The experimental and simulation results had shown satisfactory
results in terms of the gating PWM pulses (shape and number),
output voltage waveforms of the three-phase voltage source inverter
which fed the three-phase IM, and the load current (stator current
waveforms of the IM).
• The FPGA can provide digital control for the induction motor via
soft starting technique by varying the modulation index.
• The FPGA can implement the V/F speed control strategy for the
induction motor to give ability for varying the speed with
maintaining the torque is constant.
77
• The higher modulation index and switching frequencies give the best
Total Harmonic Distortion (THD) value.
[6] Andrew Vareed and Avilesh Pranish "FPGA Controlled Sine Wave
Inverter With RMS Control and THD Minimization", Part I Project
Final Report , University of Auckland, 2004.
[7] N. Praveen Kumar, and V.T. Ranganathan, " FPGA Based Digital
Platform For The Control Of AC Drives", India International
Conference of IEEE on Power Electronics, 19-21 Dec. 2006, pp. 253-
258.
80
[10] Nitish Patel, and Udaya Madawala, "A Bit-Stream Based Scalar
Control of an Induction Motor", 34th Annual Conference of IEEE
Industrial Electronics, 2008, Vol. 25, pp.1071-1076.
[23] Yu Jen Fan , " An FPGA- based general purpose neural network
chip with On-chip learning", state university of New York, New
Paltz, 2004.
[25] Pong P. Chu, " FPGA Prototyping By VHDL Examples ", © 2008
by John Wiley & Sons, Inc, ISBN 978-0-470-18531-5.
[26] "Spartan-3E Starter Kit Board User Guide", UG230 (v1.0) March9,
2006. ©2006 Xilinx, Inc.
[27] Volnei A. Pedroni " Circuit Design with VHDL", © 2004 Massachu-
usetts Institute of Technology, ISBN 0-262-16224-5.
82
[28] Teshome Ababu, " Design of Pulse Width Modulation and It’s
Implementation In Xilinx FPGA", Master thesis, ADDIS ABABA
University, February 2007.
[30] "Sine/Cosine Look-Up Table v5.0" May 21, 2004 Xilinx Inc.
URL: www.xilinx.com/ipcenter.
U U
APPENDIX (A1)
APPENDIX (A2)
PWMAU PWMAL
PWMBU PWMBL
PWMCU PWMCL
A4-3
APPENDIX (A4)
APPENDIX (A5)
Parameters of the IM