Documente Academic
Documente Profesional
Documente Cultură
INSTITUTE OF ENGINEERING
PULCHOWK CAMPUS
A
Final Year Project Report
on
Constant V/Hz Inverter based on
Sinusoidal PWM technique
(As a partial fulfillment of the requirement for the Bachelor’s degree in Electrical Engineering)
(EG777EE)
Project Supervisor
Prof. Dr. Indraman Tamrakar
Project Members
Ayush Shakya (065/BEL/302)
Deepa K.C. (065/BEL/305)
Labi Bajracharya (065/BEL/310)
Sadam Bala (065/BEL/332)
Sandesh Kunwar (065/BEL/333)
October 2012
TRIBHUVAN UNIVERSITY
INSTITUTE OF ENGINEERING
PULCHOWK CAMPUS
The undersigned certify that they have read and recommended to the Institute of
Engineering for acceptance of a final year project report entitled, ‘Constant V/Hz
inverter based on Sinusoidal PWM technique’ submitted by Ayush Shakya, Deepa
K.C., Labi Bajracharya, Sadam Bala and Sandesh Kunwar in partial fulfillment of the
requirements for the Bachelor’s Degree of Electrical Engineering.
________________________________________________ ________________________________________________
Project Supervisor Head of Department
Prof. Dr. Indraman Tamrakar Assoc. Prof. Kumudini Koirala
Department of Electrical Engineering Department of Electrical Engineering
________________________________________________ ________________________________________________
External Examiner External Examiner
Dr. Laxmi Bhakta Shilpakar Er. Ramesh Shrestha
Member, Public Enterprises Board Principal, Sagarmatha Engineering College
ii
COPYRIGHT
The author has agreed that the Library, Department of Electrical Engineering,
Pulchowk Campus, Institute of Engineering (IOE) may make this report freely available
for inspection. Moreover, the author has agreed that permission for extensive copying
of this project report for scholarly purpose may be granted by the supervisors who
supervised the project work recorded herein or, in their absence, by the Head of the
Department wherein the project report was done. It is understood that the recognition
will be given to the author of this report and to the Department of Electrical
Engineering, Pulchowk Campus, Institute of Engineering in any use of the material of
this project report. Copying or publication or the other use of this report for financial
gain without approval of to the Department of Electrical Engineering, Pulchowk
Campus, Institute of Engineering and author’s written permission is prohibited.
Request for permission to copy or to make any other use of the material in this report
in whole or in part should be addressed to:
Head of Department
Department of Electrical Engineering
Pulchowk Campus, Institute of Engineering (IOE)
Lalitpur, Nepal
iii
ACKNOWLEDGEMENT
We are greatly indebted to all those who have helped us in our project entitled, ‘Constant
Volt-Hertz Inverter using Sinusoidal PWM technique’. We would like to express our
sincere gratitude to our Supervisor Prof. Dr. Indraman Tamrakar for guiding us for our
project. His valuable advice, suggestions, instructive guidance and co-operative supervision
has been one of the very motivating factors for the completion of our project.
We would also like to express our deep thank to Head of Department, Mrs. Kumudini
Koirala and Deputy Head of Department, Er. Dipesh Lamsal for providing us with the well
equipped laboratory and sophisticated equipments. Without their help and support, our
project would face many hurdles.
We are also thankful to Mr. Deepak Shrestha, Chief Instructor of Instrumentation and
Control laboratory, for his generous help in providing us with the necessary equipment. We
are also indebted to Mr. Madhusudan Shrestha for supporting us in completion of our
project.
Our special thanks go to the Department of Electrical Engineering and all its staffs for
providing us good environment and lots of cooperation to conduct this project.
Last but not the least, we would also like to express our deep gratitude to our families and
friends in creating an environment to accomplish this project. Without their love and
affection, we would not be in a state to submit this report.
iv
ABSTRACT
Modern sophisticated power appliances and machine system demand adjustable sources at
many instances. This is not possible with in hand available constant AC supply system. So,
inverter technology has been extensively developed for adjustable voltage source. One of the
various adjustable AC source requires constant ratio of volt to hertz at output. Constant
volt/hertz inverter is able to supply adjustable AC source while maintaining constant
volt/hertz ratio at output. Sinusoidal PWM generated using digital technology has been
employed as control strategy in constant V/Hz inverter. The final ‘Constant V/Hz inverter’
hardware system was designed and fabricated after successful software simulations in
Proteus and MATLAB. The simulated results and the actual hardware results were compared
and they were found to be similar. This system finds its application in electrical appliances
and machine employing variable induction motor drive.
v
TABLE OF CONTENTS
Title Page
No.
CHAPTER 1: INTRODUCTION
1.1 Background 1
1.2 Objectives 1
1.3 Scope of the project 2
1.4 Methodology 2
BIBLIOGRAPHY 31
vi
LIST OF FIGURES
Page
No.
1. Figure 2.1: Duty cycle and frequency of PWM 3
2. Figure 2.2: Single phase half-bridge topology 4
3. Figure 2.3: SPWM Generation principle 5
4. Figure 2.4: Three phase VSI topology 5
5. Figure 2.5: Complementary PWM signals(10kHz) generated by microcontroller 6
6. Figure 2.6: Diagram showing the scaling operation to generate the required duty cycle
from the sine table 7
7. Figure 2.7 Gate signal pattern for upper switch and corresponding complementary gate
signal for lower switch 8
8. Figure 2.8 Changing Vmod through PWM pattern where, M.I (a) > M.I (b) > M.I(c) 9
9. Figure 3.1: Constant V/f PWM generator block 13
10. Figure 3.2: Inverter bridge 13
11. Figure 3.3: Output waveforms of MATLAB simulation 14
12. Figure 3.4: Layout for Proteus Simulation 16
13. Figure 3.5: PWM signal generation from microcontroller with PWM frequency of 10 kHz 16
14. Figure 3.6: Line-to-line voltage waveform (Proteus Simulation) 17
15. Figure 3.7: Line-to-neutral voltage waveform (Proteus Simulation) 18
16. Figure 4.1: Block diagram of the proposed scheme 19
17. Figure 4.2: MOSFET Inverter Bridge 20
18. Figure 4.3: LM317 Typical Connection 21
19. Figure 4.4: Optocoupler Schematic 21
20. Figure 4.5: Optocoupler IC package 21
21. Figure 4.6: I-V characteristics of MOSFET 23
22. Figure 4.7: Power MOSFET Schematic 23
23. Figure 4.8: Fabrication of Hardware (Microcontroller Part) 25
24. Figure 4.9: Fabrication of Hardware (Three Phase Inverter Part) 26
25. Figure 4.10: Complementary PWM outputs (from Digital Oscilloscope) 26
26. Figure 4.11: Complete train of pulses for a complete cycle with complementary outputs 27
27. Figure 4.12: Line-to-neutral voltage waveform (Hardware result) 27
28. Figure 4.13: Line-to-Line voltage waveform (Hardware result) 28
vii
CHAPTER 1
INTRODUCTION
1.1 Background
After long debates in the past, it is proven that AC transmission and distribution is more
economical and reliable than DC. Hence, AC transmission and distribution is used widely
which has resulted in growing popularity of AC based appliances. AC can also be divided as
single phase or three phases. Three phase AC is more popular in high power application
while single phase is used in home appliances and low power systems.
Even though constant AC sources are readily available, in many cases we need to control the
frequency and magnitude of output voltage of the available AC source. Speed Control of
induction motors, used in various appliances and machines like conveyer belt, air
conditioner, pumps, electric traction, etc is one of the examples where it is necessary to
control the frequency for controlling the speed of the motor to match the variable torque,
power and speed requirement. Due to robust and rugged structure, induction motors are more
popular than DC motors. But speed control of AC motor is not as simple as that of DC
motors due to complex torque-speed characteristics of AC induction motor. So, it requires
special control system like constant Volt/Hz Inverter.
Constant Volt/Hertz Inverter is the inverter which maintains the ratio of magnitude of output
AC voltage to frequency constant. This inverter finds its application for control of AC motor
drive which implements constant V/f speed control method. One of the most popular control
strategies used for variable AC output from inverter is Pulse Width Modulation (PWM)
technique which controls the duty cycle of the controller switches at high switching
frequency to achieve controlled AC output from inverter. In this project, sinusoidal PWM
technique is used to control the magnitude of output AC voltage from the inverter
maintaining constant V/f ratio.
1.2 Objective
To design and fabricate constant volt/hertz inverter
The major objective of this project is to develop a control strategy to change voltage when
frequency is varied externally so as to maintain a constant volt/hertz inverter.
1
1.3 Scope of the project
In this project, there is provision of changing voltage by varying frequency externally so as
to maintain a constant voltage to frequency ratio. This project is microcontroller based and is
easily controllable. It has wide range of applications when employed for controlling speed of
a three phase induction motor in industrial sectors.
1.4 Methodology
In order to carry out the mentioned objectives, the following methodology will be adopted:
1. Preliminary study of inverter, particularly constant Volt/Hertz Inverter
2. Simulations of constant Volt/Hertz Inverter on MATLAB/Simulink
3. Programming in MPLAB software for dsPIC microcontroller
4. Simulation of constant Volt/Hertz Inverter in Proteus software to determine required
parameters of the hardware using the microcontroller
5. Design and fabrication of hardware of the proposed scheme
6. Testing and debugging of fabricated hardware
7. Final report of the project illustrating activities and results obtained
2
CHAPTER 2
INVERTER SYSTEM
Pulse Width Modulation (PWM) refers to a form of signal modulation where data is
represented by the duty cycle (ratio of the ON time to the total time).PWM has the property
where the instantaneous DC component is directly proportional to the duty cycle. By using
PWM techniques, the frequency spectra of input waveforms can be changed such that the
major non-fundamental components are at relatively high frequency and also to reduce the
switching stress imposed upon the power switching devices. The high frequency components
can be filtered by using low pass filters so as to reduce the harmonic distortion at output.
3
Where,
tON
D=
tW
1
And fPWM=
tw
4
Figure 2.3: SPWM Generation principle
Vdc
2
Vdc
2
Figure 2.4 shows the three phase topology of full bridge inverter. SPWM can be generated
using digital logic equipments like microcontroller by using sine table. Complementary
PWM outputs are generated from a microcontroller using its PWM module. Altogether,
there are six PWM channels with three PWM pairs configured in complementary mode for
the three arms of the inverter. In complementary mode, if one of the PWM is high, the other
is low and vice-versa as shown in figure below. A certain programmable dead time is
inserted so that upper and lower switches of the H-bridge are not simultaneously ‘ON’ to
prevent short circuiting of the DC bus. This PWM technique is applied by using PWM
5
module of dsPIC microcontroller for generating required PWM control signals for this
project. Complementary PWM signals (10 kHz) generated by dsPIC microcontroller with
2µs dead time between the two signals is shown in figure 2.5.
PWM High Side
Consider a single phase half bridge as shown with load connected at point ‘a’ as shown in
figure 2.2. If the complementary outputs have a 50 % duty cycle, then for half of the time,
the upper switch is ON and the voltage across the load is +VDC/2 with respect to point ‘N’
and for the next half of the period, the lower switch is ON (with upper switch now in OFF
state) and so the voltage across the load is –VDC/2. Therefore, 50 % duty cycle corresponds
to average voltage of zero volts averaged over a PWM period in complementary mode.
Sinusoidal waveform can be generated by using a look-up table. A look-up table contains,
sine values for a complete electrical cycle (0 to 360 degrees), normalized in the range -1 to 1.
The number of data points to be used depends upon the PWM frequency and the modulation
frequency i.e. frequency of sine wave to be generated. Also, too little points will cause a
‘staircase’ effect in the motor current waveform. The staircase effect will cause excessive
motor current distortion, which causes higher heat dissipation. Too many points will use
more memory of the microcontroller. A good rule of thumb is to divide maximum desired
modulation frequency by the PWM frequency.
In this project, 256 points have been used in sine table for a 10 kHz PWM frequency and
maximum modulating frequency of 77.97 Hz.
The sine values for the 256 different points can be evaluated by the expression;
6
2π
y[i] = sin ×i
256
where, i = 0 to 255
The sine values are read from the table at periodic interval, scaled to match the allowable
ranges of duty cycle, and then written to the duty cycle register. If any numerical value is put
in the duty cycle register then the microcontroller produces output PWM waveform of that
particular duty cycle.
At first, the data from table is first multiplied by 50 percent duty cycle value. The resulting
value is then multiplied by the value of modulation index (M.I) to change the average
voltage of through the variation of pulse widths. Finally, 50 percent duty cycle value is then
added to ensure that resulting duty cycle value is positive.
Sine table[i] = y[i] * 50 percent duty cycle * M.I + 50 percent duty cycle
Figure 2.6: Diagram showing the scaling operation to generate the required duty cycle from
the sine table
Figure 2.6 shows the scaling process carried so that duty cycle values are obtained
sinusoidally. Figure 2.7 shows the PWM signals for the upper and lower switch and shows
the variation of duty cycle over a completer electrical cycle for modulation index value of
one. It can be seen that at zero electrical degree of sine wave, the duty cycle of the high side
PWM is 50%, therefore the average voltage is zero for a PWM period as the lower switch is
also ‘ON’ for remaining 50% of the PWM period. At around 90 electrical degree, the upper
switch is ‘ON’ for all PWM period (i.e 100% duty cycle), so the output is high during this
period and voltage across the load is +VDC/2 with respect to point ’N’. But, at around 270
electrical degrees, the upper switch is ‘OFF’ for whole PWM period (i.e. 0% duty cycle)
7
while the lower switch is ‘ON’ for full PWM period. So, the output voltage is negative and
voltage across the load is –VDC/2. Similarly, at other electrical degrees, the duty cycle varies
sinusoidally so as to encode the sinusoidal signal in the PWM waveform.
Figure 2.7: Gate signal pattern for upper switch and corresponding complementary gate
signal for lower switch
8
Figure 2.8 given shows the effect of changing the modulation index on the variation of pulse
width, thereby changing the amplitude of the fundamental voltage component.
Figure 2.8: Changing Vmod through PWM pattern where, M.I (a) > M.I (b) > M.I(c)
A variable called ‘Phase’ is used as a 16-bit pointer to the sine table with 0x0000
representing 0° and 0xFFFF representing 360°. Let us assume the sine table pointer is
adjusted every PWM period. In other words, at each PWM interrupt, ‘Frequency’ variable is
added to the ‘Phase’. The value of ‘Delta_Phase’ determines how fast the code moves
through the sinusoidal data table, and, as a result, sets the modulation frequency.
9
76
Delta_phase = 216 × =498.07=498
10000
After the Phase variable has been adjusted by Delta_Phase, two additional table pointers are
calculated for the 2nd and 3rd motor phases by adding a constant offset to Phase. For a 16-bit
pointer, a value of 0x5555 provides 120° offset and a value of 0xAAAA gives a 240° offset.
The Sine PWM is implemented using a VSI (Voltage Source Inverter) as shown in figure
2.4. At any instant, either the top or the bottom switch of a half bridge is on. Hence, the
resultant fundamental component of phase-to-neutral point ‘O’ voltage (VAO, VBO and VCO)
can be represented as:
Vdc
Vio= ×Vif
2
Where i = A,B,C
Vif represents the 3-phase waveforms shifted at an angle of 120° with one another. Each
phase waveform can be represented as shown below:
VAf = m × sinθ
VBf = m × sin (θ+120°)
VCf = m × sin (θ+240°)
Vdc
∴VAO= ×m× sin θ
2
Vdc
VBO= × m× sin (θ+120°)
2
Vdc
VCO= × m × (θ+240°)
2
The resultant line-to-line output voltage is given by:
√(3)Vdc
VAB = VAO-VBO = ×m× sin (θ+30°)
2
√(3)Vdc
VBC = VBO-VCO = ×m× sin (θ+150°)
2
√(3)Vdc
VCA = VCO-VAO = ×m× sin (θ+270°)
2
From the above equations, it is clear that the maximum line-to line voltage is achieved when
m=1
10
√3 Vdc
. . Maximum line-to-line voltage =
2
Vdc
√2×VLL(rms)= √3
2
∴VLL(rms)= 0.612 Vdc
VLL(rms) 0.612
Vph(rms) = = × Vdc = 0.354Vdc
√3 √3
These equations are valid for modulation index, M.I. = m = 1. For any value of m, the
following equations will be valid.
∴VLL(rms)= 0.612 m Vdc
VLL(rms) m 0.612
Vph(rms)= = × Vdc = 0.354 m Vdc
√3 √3
Vreq
Let us assume that =k (a)
freq
Where k = constant
Dividing both sides of equation (a) by Vph(rms) with m=1, we get
Vreq k
=
Vph(rms)×f Vph(rms)
Vreq k
or, m= = ×f
Vph(rms) Vph(rms)
11
CHAPTER 3
SIMULATION STUDIES
Before carrying out activities in hardware, simulations were carried out in software such as
MATLAB/Simulink and Proteus. This chapter is mainly concerned with the simulations in
these software.
1. Clock: This block is used to provide current simulation real time for the program.
2. Programming block: It is a block where program can be written. This block is used
in this model for specifying modulation index and frequency input to the PWM
generator block.
3. PWM generator block: This block generates sinusoidal PWM signals for
MOSFETs used in the three phase H-bridge.
Constant V/f PWM generator block simulates the working of microcontroller, which
generates constant V/f PWM outputs. With the help of programming block, required V/f
ratio and output as per the real time could be obtained and modulation index and frequency
are fed to PWM generator, which generates sine PWM signals to provide it to the gates of
the inverter.
12
Programming block
13
Figure 3.3: Output waveforms
14
3.2 Software realization
Fmin = minimum frequency to be generated
MImin =minimum modulation index
Fbase = arbitrarily set frequency above which Modulation Index become 1
Start
Yes
Set Modulation Index = MImin
Is f<fmin ?
and f =fmin
No
Yes
Is f>fbase? Set Modulation Index = 1
No
15
3.3 Proteus Simulation
After performing simulations on MATLAB, further simulations were carried out on Proteus.
Before this, programming was done in MPLAB and the hex code, thus generated after
compilation of the source code, was loaded in the microcontroller. The layout of Proteus
simulation is shown in figure 3.4. The load used in this simulation is three-phase resistive
load. The PWM waveforms generated from the microcontroller are shown in the figures 3.5.
Figure 3.5: PWM signal generation from microcontroller with PWM frequency of 10 kHz
16
In figure 3.5, PWMH1 and PWML1 are complementary PWM outputs from the
microcontroller for producing gate signals for the first arm of the three-phase H-bridge.
Similarly, PWMH2 and PWML2 are complementary PWM outputs from the microcontroller
for producing gate signals for the second arm of the bridge. Figure 3.6 and 3.7 show the
output waveforms.
17
Figure 3.7: Line-to-neutral voltage waveform
18
CHAPTER 4
Sinusoidal pulse width modulation (SPWM) is widely used in power electronics to digitize
the power so that a sequence of voltage pulses can be generated by ON and OFF of the
power switches. The pulse width modulation inverter is simple and provides better control
scheme. SPWM techniques are characterized by constant amplitude pulses with different
duty cycle for each period. The width of this pulses are modulated to obtain inverter output
voltage control and to reduce its harmonic content. To generate this signal, triangular wave
is used as a carrier signal and is compared with sinusoidal wave, whose frequency is the
desired frequency. The proposed alternative approach is to replace the conventional method
with the use of microcontroller. The use of microcontroller brings the flexibility to change
the real-time control algorithms without further changes in hardware. It is also low cost and
has a small size of control circuit for the three phase full bridge inverter. The microcontroller
has the built in dead time control circuit and various other features to control pwm signals.
AC
POWER
DC VOLTAGE AC
SUPPLY
LINK SUPPLY VOLTAGE
RECTIFIER MOSFET INVERTER THREE PHASE
BRIDGE LOAD
ISOLATION
MICROCONTROLLER CIRCUIT
19
a. Rectifier: The first step in this process is to convert the AC supply voltage into DC by the
use of a rectifier. DC power contains voltage ripples which are smoothed using filter
capacitors. This section of the VFD is often referred to as the DC link. In our project,
rectifier is not used. Instead, dc supply is directly taken from the available dc bank.
b. MOSFET Inverter Bridge: This DC voltage is then converted back into AC. This
conversion is typically achieved through the use of power electronic devices such as IGBT
power transistors or MOSFETs using a technique called Pulse width Modulation (PWM).
The output voltage is turned on and off at a high frequency, with the duration of on-time, or
width of the pulse, controlled to approximate a sinusoidal waveform. The MOSFET inverter
bridge has 6 switches that are controlled in order to generate 3-phase AC output from the DC
bus. PWM signals, generated from the microcontroller, control these 6 switches. Switches
H1 through H3 are upper switches. Switches L1 through L3 are lower switches. The
amplitude of phase voltage is determined by the duty cycle of the PWM signals. In this
configuration, three out of six switches will be on at any given time; either one upper and
two lower switches or one lower and two upper switches. The switching produces a
rectangular shaped output waveform that is rich in harmonics. When switches are turned off,
the inductive nature of the load oppose any sudden change in direction of flow of the current
until all of the energy stored in the load is dissipated. To facilitate this, fast recovery diodes
are provided across each switch. These diodes are known as freewheeling diodes.
H1 H2 H3
THREE
PHASE
L1 L2 L3
LOAD
20
d. Isolation Circuit: The isolation circuit is used to isolate low voltage signals from high
voltage signals for protection and safety. This can be done by using optoisolator.
Here, as shown in the adjacent figure, Cin is required if regulator is located at an appreciable
distance from power supply filter. Co is not needed for stability; however, it does improve
transient response. The datasheet of LM317 can be found in Appendix B.
4.2.2 Optocoupler
Certain isolation system between high voltage level and low
voltage level is required in Constant V/Hz Inverter system.
The microcontroller which is operating at low voltage level Figure 4.4: Optocoupler Schematic
(3.3V) has to control load which is at much higher voltage level. So,
the microcontroller needs to be isolated to protect from overvoltage
damage. Optocoupler can provide such isolation. It is also known as
optoisolators.
They are best for transmitting PWM signals with frequent switching. In this project, high
speed 6N137 logic gate optocoupler is selected. The datasheet of this optocoupler is given in
Appendix B.
The threshold voltage between gate and drain determines the switching level of the
MOSFET switch. By applying suitable drive voltage to the gate of MOSFET, the resistance
of drain source channel can be varied from very high value (OFF state), effectively an open
circuit, to very low value (ON state), effectively short circuit. MOSFETs can be effectively
turned on and off at very high switching frequency to pass current through it. MOSFETs are
more efficient and faster in comparison to same rating of bipolar transistor switches and
IGBTs. Features like fast switching speed, high peak current, ease of drive, dv/dt capability
has boosted the popularity of MOSFETs as logic switches.
Enhancement mode MOSFET has been used in our project for switching electronic signals.
Enhancement mode MOSFET can be taken as a switch as these transistors require a positive
gate voltage to turn 0N and a zero voltage to turn 0FF making them easily understood as
switches and also easy to interface with logic gates.
The operation of the enhancement mode MOSFET can best be described using its I-V
characteristics curves shown below. When the Input voltage, (Vin) to the gate of the
22
transistor is zero, the MOSFET conducts virtually no current and the output voltage (Vout) is
equal to the supply voltage (VDD). So the MOSFET is fully-OFF and in its cut-off region.
The minimum ON-state gate voltage required to ensure that the MOSFET remains fully-ON
when carrying the selected drain current can be determined from the V-I transfer curves
above. When VIN is high or equal to VDD the MOSFET Q-point moves to point A along the
load line. The drain current (ID) increases to its maximum value due to reduction in the
channel resistance. ID becomes a constant value independent of VDD, and is dependent only
on gate source voltage(VGS). Therefore, the transistor behaves like a closed switch but the
channel on-resistance does not reduce fully to zero due to its R DS(on) value, but gets very
small.
Likewise, when Vin is low or reduced to zero the MOSFET Q-point moves from point A to
point B along the load line. The channel resistance is very high so the transistor acts like an
open circuit and no current flows through the channel. So if the gate voltage of the MOSFET
toggles between two values, high and low the MOSFET well behave as a single-pole single-
throw (SPST) solid state switch.
23
Saturation region
In the saturation or linear region, the transistor will be biased so that the maximum amount
of gate voltage is applied to the device which results in the channel resistance R DS (on) being
as small as possible with maximum drain current flowing through the MOSFET switch.
Therefore the MOSFET is switched fully 0N.
Six IRF840 MOSFETs are used in this project as switches. The datasheet of IR840 is
included in Appendix B.
One feature of power MOSFETs is that they have a large stray capacitance between the gate
and the other terminal. The effect of this is that when the pulse to the gate terminal arrives, it
must first charge this capacitance up before the gate voltage can reach the 10 V required.
The gate terminal then effectively takes current. Therefore the circuit that drives the gate
terminal should be capable of supplying a reasonable current so the stray capacitance can be
charged up as quickly as possible. The best way to do this is to use a dedicated MOSFET
driver chip.
Three IRS2110 high and low side MOSFET driver are used in this project whose datasheet is
included in Appendix B.
24
After successful implementation of the proposed scheme in softwares, design and fabrication
of hardware was carried out. Some of the pictures of the hardware are shown below:
LM317
VOLTAGE
REGULATOR
dsPIC
MICRONCONTROLLER
FREQUENCY VARYING
KNOB
PWM OUTPUTS FROM
MICROCONTROLLER
Figure 4.9 shows microcontroller part. The microcontroller part is a low voltage part of the
project. In order to vary frequency, a potentiometer was used as shown in the above figure.
The voltage developed in potentiometer is fed to the microcontroller which by means of its
ADC (analog-to digital converter) converts the analog signal (i.e. voltage) into digital signal
to be used internally for calculating frequency. The PWM signals generated from the
microcontroller is fed to the three phase part as shown in the figure 4.2 via PWM channels of
the microcontroller. LM317 voltage regulator was used so as to convert dc voltage from dc
bank to dc voltage of about 3.3 V as required by the microcontroller.
Figure 4.10 depicts the three phase part of the inverter. Optocoupler 6N137 was used so as to
isolate low voltage level from the high voltage level. The PWM signals are received from
the microcontroller via optocoupler which is applied to MOSFETs. Before applying these
gate signals to MOSFETs, they are firstly fed to MOSFET drivers. There is no problem in
turning ON the lower semiconductor switches but there is problem in turning ON the higher
semiconductor switches. In order to turn ON the higher semiconductor switches, MOSFET
drivers are used which builds up the required gate-to-source voltage by means of bootstrap
capacitor.
25
Snubber circuit
Three Phase
outputs
MOSFET
Optocoupler
MOSFET Driver
26
Figure 4.11: Complete train of pulses for a complete cycle with complementary outputs
27
Figure 4.13: Line-to-line voltage waveform
Power analyzer was used to check if constant volt/hertz ratio was being maintained at output
of the inverter. The ratio of fundamental rms phase voltage to frequency (V/f) was set at
0.106 in the code of the microcontroller. The observations of the experiment are tabulated
below in Table 4.1:
28
Table 4.1
S.No. Frequency Fundamental Fundamental Modulation Index (M. I) Vph
ratio
(Hz) RMS line- RMS Phase Vph f
=
line Voltage Voltage (Vph) Vph1
(volt/Hz)
(VLL)
VLL
Vph=
√3
1 12.38 1.9 1.09 0.205 0.088
2 14.71 2.3 1.33 0.251 0.090
3 31.85 5.0 2.88 0.543 0.090
From the above observations, it can be noticed that constant volt/hertz ratio is maintained
approximately equal to that previously set value (0.106 V/Hz).
Simulations in MATLAB was also carried out with the paramaters set the same as in
experiment. And, the results obtained are tabulated below;
Table 4.2
By looking at the experimental results and MATLAB simulation results, it is clear that the
ratio of magnitude to frequency of output voltage is maintained near constant in both cases.
So the objective of the project is fulfilled.
29
CHAPTER 5
CONCLUSION AND RECOMMENDATION
5.1 Conclusion
The major objective of this project is to design and fabricate constant volt/hertz inverter
using sinusoidal pulse width modulation (PWM) technique. In order to achieve this
objective, a series of steps were taken. Firstly, the project was designed and evaluated using
softwares such as Proteus and MATLAB. After achieving satisfactory results, the project
was implemented in hardware. This implementation was found to be successful. It was
verified by observing whether the ratio of voltage to frequency ratio was constant or not
when the frequency was varied externally by means of potentiometer knob. The V/f ratio
was noticed to be nearly constant which implied success of the project.
5.2 Recommendation
Constant volt/hertz Inverter system was successfully designed as per the aim of project. But
still we can improve the performance of this system by further study and enhancement. This
system can also be used to drive three phase induction motor with few enhancements and
proper protection system. The following are suggestions for future enhancement for better
performance and reliability of the system:
By employing extra protection system (a better snubber circuits) for MOSFET
switching circuit, the reliability of the system can be increased.
This system can be used for speed control mechanism of AC induction drive after
considering the maximum voltage and current level which the system can handle.
MOSFETs with better static and dynamic characteristics can be used to increase
switching efficiency and hence the overall efficiency of the system.
Isolation circuit with optocoupler of better rise and fall time can be used to prevent
losses of pulse during PWM signal transfer.
By adding proper filter circuits, the quality of output can be increased for driving
both resistive and inductive loads.
30
BIBLIOGRAPHY
31
APPENDIX A
SOURCE CODE
The following source code is program for microcontroller.
// Source code compiled in MPLAB using C30 compiler and simulated in
Proteus software
//programming reference can be taken from microchip site and dspic pdf
void initInterrupts(void)
{ INTCON1bits.NSTDIS = 0; // Interrupt nesting enabled here
IPC14bits.PWM1IP = 6; // Set PWM interrupt priority to 6 (level 7
is highest)
_PWM1IF=0; // reset
_PWM1IE=1; // enable interrupt
T3CONbits.TON = 0; // Disable Timer
T3CONbits.TCS = 0; // Select external clock
T3CONbits.TGATE=0; //disable gated timer mode
T3CONbits.TCKPS = 0b00; // Select 1:1 Prescaler
TMR3 = 0x00; // Clear timer register
PR3 = 20000; // Load the period value= 20000*1/(40)=500us
IPC2bits.T3IP = 3; // Set Timer3 Interrupt Priority Level
i
IFS0bits.T3IF = 0; // Clear Timer3 Interrupt Flag
IEC0bits.T3IE = 0; // Enable Timer3 interrupt
T3CONbits.TON = 1; // Start Timer3
}
/*========================================================================
=====
ADC INITIALIZATION FOR CHANNEL SCAN
==========================================================================
===*/
void initAdc1(void)
{
/*========================================================================
=====
ADC INTERRUPT SERVICE ROUTINE
==========================================================================
===*/
// this will be called after timer3 register matches the period after
200us (special trigger event)
void __attribute__((interrupt, no_auto_psv)) _ADC1Interrupt(void)
{
float freq;
asm("mov _ADC1BUF0,W3"); //Read the ADC results into W3 ::suppose the pot
is set at 100%, then ADC1BUF0 reads //1023d decimal
ii
asm("asr W3,#1,W4");// Right shift by 1 bits to get the frequency(named
in placed of PhaseReq) :: this statement //divides it by 2..ie1023/2=
511 decimal and this number is the frequency (511*10000)/65536= 77.972 Hz
so the //highesh freq by this method is 77.972 Hz.. So, if we use 10Khz
freq, we can achieve 77.97 Hz maximum freq using this //algorithm
asm("mov W4,_Frequency");
void init_PWM()
{
P1TCONbits.PTMOD = 0b10;// PWM time base input clock period is
TCY (1:1 prescale)
P1TCONbits.PTCKPS = 0b00; // PWM time base output post
scale is 1:1
P1TCONbits.PTOPS = 0b00;
// Choose PWM time period based on input clock selected
// Refer to Equation 14-1
// PWM switching frequency is 20 kHz
// FCY is 40 MHz
// P1TPER = (FCY/(Fpwm*1*2))-1 =1000=999
P1TPER = 1999;
// PWM I/O pairs 1 to 3 are in complementary mode
// PWM pins are enabled for PWM output
PWM1CON1bits.PMOD1 = 0;
PWM1CON1bits.PMOD2 = 0;
PWM1CON1bits.PMOD3 = 0;
PWM1CON1bits.PEN1H = 1;
PWM1CON1bits.PEN2H = 1;
PWM1CON1bits.PEN3H = 1;
PWM1CON1bits.PEN1L = 1;
PWM1CON1bits.PEN2L = 1;
PWM1CON1bits.PEN3L = 1;
PWM2CON1bits.PEN1H = 0; //PWM module 2 used as general i/o
PWM2CON1bits.PEN1L = 0;
// synchronized update of PWM enabled
PWM1CON2bits.IUE = 0; //1 means immediate update
// Clock period for Dead Time Unit B is TcY
P1DTCON1bits.DTAPS = 0b01;
iii
P1DTCON1bits.DTBPS = 0b01;
// Dead time value for Dead Time Unit B and Unit A
P1DTCON1bits.DTA = 45;
P1DTCON1bits.DTB = 45;// Tcy * 2 * 45= 2.25 usec
// Dead Time Unit selection for PWM signals
// Dead Time Unit A selected for PWM active transitions
// Dead Time Unit B selected for PWM inactive transitions
P1DTCON2bits.DTS3A = 0;
P1DTCON2bits.DTS2A = 0;
P1DTCON2bits.DTS1A = 0;
P1DTCON2bits.DTS3I = 1;
P1DTCON2bits.DTS2I = 1;
P1DTCON2bits.DTS1I = 1;
// PWM I/O pin controlled by PWM Generator
P1OVDCONbits.POVD3H = 1;
P1OVDCONbits.POVD2H = 1;
P1OVDCONbits.POVD1H = 1;
P1OVDCONbits.POVD3L = 1;
P1OVDCONbits.POVD2L = 1;
P1OVDCONbits.POVD1L = 1;
// Initialize duty cycle values for PWM1, PWM2 and PWM3
signals
P1DC1 =1999; // 50% duty cycle
P1DC2 =1999; // 50% duty cycle
P1DC3 =1999; // 50%
PhaseA=0; // pointers for 3 sine waves generation
PhaseB=0;
PhaseC=0;
//Enabling PWM Pulse Generation
P1TCONbits.PTEN = 1;
return;
}
void delay10ms(int n){
int i;
for(i=0;i<n;i++){
__delay_ms(10);
}
}
// MAIN function
int main(void)
{
_TRISB6=0;
_LATB6=1;
/* Configure PLL prescaler, PLL postscaler, PLL divisor */
PLLFBD=30; /* M = PLLFBD + 2=32 */
CLKDIVbits.PLLPOST=0b00; /* N2 = 2 */
CLKDIVbits.PLLPRE=0b10; /* N1 = 4 */
// Fosc=20 * 32 /(2*4)=79.2275 Mhz ; Fcy=39.61375Mhz used in this
case
vi
APPENDIX B
DATASHEETS OF SOME OF THE COMPONENTS USED
vii
dsPIC33FJ32MC202/204
viii
ix
x
xi
xii
Optocoupler/ Optoisolators (6N137)
xiii
xiv
Power MOSFET (IRF840A)
xv
MOSFET driver (IRS2110)
xvi
Figure: Pin Configuration of MOSFET driver
xvii