Pulse Width Modulation Techniques For in
Pulse Width Modulation Techniques For in
Pulse Width Modulation Techniques For in
Dr.Sreejith.S
School of Electrical Engineering
(SELECT)
VIT
UNIVERSITY
(Estd. u/s 3 of UGC Act 1956)
MAY 2015
1
CERTIFICATE
This is to certify that the project work titled PULSE WIDTH MODULATION
TECHNIQUES FOR INVERTERS submitted by Kiran.R and Arokkia Jerald Praveen.D is
in partial fulfillment of the requirements for the award of BACHELOR OF TECHNOLOGY in
Electrical and Electronic Engineering , is a record of bonafide work done under my guidance.
The contents of this project work, in full or in parts, have neither been taken from any other
source nor have been submitted to any other Institute or University for award of any degree or
diploma and the same is certified.
Approved by
Dean
2
ACKNOWLEDGEMENTS
We have taken efforts in this project. However, it would not have been possible without the kind
support and help of many individuals and organizations. We would like to extend my sincere
thanks to all of them.
We are highly indebted to Dr.Sreejith.S for his guidance and constant supervision as well as for
providing necessary information regarding the project & also for his support in completing the
project.
We would like to express our gratitude to our chancellor Dr.G Visvanathan, Dr.Partha Sarathi
Malik Dean of SELECT school and Prof.Vijaya Kumar (Program Chair) and members of VIT
University for their kind co-operation and encouragement which helped us in completion of this
project
KIRAN.R(11BEE0168)
3
Table of Contents
Abstract ...........................................................................................................................................6
1.Introduction...................................................................................................................................7
1.1.Objective....................................................................................................................................8
1.2.Motivation..................................................................................................................................8
1.3.Background................................................................................................................................9
3.Technical Specification...............................................................................................................11
4.1.Design Approach.....................................................................................................................12
4.1.1.Rectifier circuit.........................................................................................................12
4.1.2.7805 regulator..........................................................................................................14
4.1.4.Microcontroller.........................................................................................................16
4.1.4.2.PWM Mode...............................................................................................23
4.1.4.3.Analog.......................................................................................................26
4.1.4.4.Digital........................................................................................................27
4.1.5.PulseWidthModulationTechiniques.........................................................................29
4
4.1.5.4.Harmonic Pulse Width Modulation......................................................34
6. Project Demonstration..........................................................................................................45
8.Hardware setup......................................................................................................................47
9.Summary...............................................................................................................................48
10.Conclusion..........................................................................................................................49
11.References...........................................................................................................................50
Appendix A..............................................................................................................................51
5
Abstract
In this project, we have generated ten different types of pulse width modulation
techniques for inverters. The microcontroller is the most efficient tool for generating various
pulse width modulation techniques. Microcontroller is used to produce different types of pulse
width modulation techniques and those pulses are fed to the inverter . A opto-isolator is used to
feed the pulses from the microcontroller to the inverter. The advantages of PWM based
switching power converter over linear power amplifier are Lower power dissipation, Easy to
implement and control, No temperature variation and aging-caused drifting or degradation in
linearity and Compatible with today’s digital micro-processors. In this project study and
comparison of different types of pulse width modulation controlled methods are implemented.
The different PWM techniques are Single-pulse modulation, Multiple pulse modulation and
Sinusoidal pulse width modulation, Modified sinusoidal pulse width modulation, Harmonics
Injected modulation, Phase Displacement control, stepped modulation, staircase modulation,
trapezoidal modulation and selected harmonics modulation are implemented using
microcontroller in software and hardware.
6
1. Introduction
The output voltage waveform of ideal inverters should be sinusoidal. However, the
waveform of practical inverters are non-sinusoidal and contain harmonics. The harmonic
contents of output voltage can be minimized by implementing different pulse width modulation
techniques. Inverters are widely used in industrial applications such as variable-speed ac motor
drives, induction heating, standby power supplies and uninterruptible power supplies.
The advantages of PWM based switching power converter over linear power amplifier
are Lower power dissipation, Easy to implement and control, No temperature variation and
aging-caused drifting or degradation in linearity and compatible with today’s digital micro -
processors[1][2].
The reference paper [3] discuss about inverters that transfers power from a DC source to
an AC load. Inverters are widely used in motor drives, to maintain voltage , in ups, etc. Output
voltage from an inverter can also be adjusted by exercising a control within the inverter itself.
The most efficient method of doing this is by pulse width modulation control used within an
inverter. This paper presents study of performance of Sinusoidal Pulse Width Modulation
(SPWM) technique for voltage source inverter. SPWM scheme is modeled in Pspice. This model
is used to predict harmonics under various conditions of modulation index. The performance of
technique is presented in terms of the Total Harmonic Distortion (THD) and output RMS
voltage. Basically, Total Harmonic Distortion describes the quality of the output waveform.
Effects of harmonics on output of sinusoidal pulse width modulation (PWM inverter) is
presented[4].
To control Induction motor drives, PWM inverters is very popular . Using VSI possible
to control both frequency and magnitude of the voltage and current applied to Induction motor
drive. As a result, PWM inverter-fed IM motor drives are more variable, reliable and offer a
wide range speed. Also it gives better efficiency and higher performance when compared to
fixed frequency Induction motor drives[5].
7
1.1 Objective
The main objective of the project is to study the switching techniques for dc-ac
converters known as inverters and to study the operation of inverters. The other objective is to
eliminate harmonics and obtain a near sinusoidal output waveform from the inverter by
implementing different pulse width modulation techniques.
Pulse-width modulation (PWM) is the basis for control in power electronics. The
theoretically zero rise and fall time of an ideal PWM waveform represents a preferred way of
driving modern semiconductor power devices. With the exception of some resonant converters,
the vast majority of power electronic circuits are controlled by PWM signals of various forms.
DC to AC converters are known as Inverters.
The function of inverter is to change DC input voltage to a symmetric output voltage of
desired magnitude and frequency. The output voltage could be fixed or variable at a fixed or
variable frequency. A variable output voltage can be obtained by varying the input DC supply
and maintaining the gain of the inverter constant.
On the other hand, if the DC input voltage is fixed and it is not controllable, a variable
output voltage can be obtained by varying the gain of the inverter, which is normally
accomplished by pulse width modulation control within the inverter. The inverter gain is
normally defined as the ratio of ac output voltage to dc input voltage.
1.2 Motivation
One common problem in producing the pulses in the convention way is the huge size of
the circuits with the comparator . This results in frequent faults in the circuits and boredom for
the user to fix the faults. Microcontroller has advantages of reduced faults and reduced circuit
size. Microcontroller is dumped with a special program which produces 10 different types of
input pulse width modulation waveforms. It will provide a range of pulse width modulation
techniques to enhance the inverter output waveform. It will be able to reduce harmonics of the
output waveform.
8
1.3 Background
There are numerous types of pulse width modulation techniques to trigger the inverters.
But using wave generators and comparators will result in increase in the size of the pulse
generation circuit and causes fault frequency to increase. Switching power converters are used in
industrial application to convert and deliver their required energy to the motor or lo ad because
of advances in solid state power devices and microprocessors. Pulse Width Modulation variable
speed drives are increasingly applied in many new industrial applications that require superior
performance.
The goal of the Pulse Width Modulation techniques for inverters project is to generate 10
different types of pulse width modulation waveforms using microcontroller that autonomously
generates pulses itself by selecting the type of pulses to be given to the inerter. In order to do this
the program for generating pulses must be dumped into the microcontroller. The project has been
divided into five broad areas to achieve the targeted functionality:
Using a rectifier circuit to feed the microcontroller with constant 5V DC power supply.
The presently existing method for generating pulse width modulation techniques has
complex circuits and has high frequency of fault occurrence. Therefore, the targeted
microcontroller based pulse generation method has lesser complex circuits and very less
possibility of fault occurrence. The infrequency of faults would not only reflect simplicity in
the implementation of the system by non-technical customers, but it would also be reliable.
9
Fig.2.1.Block Diagram of PWM techniques for Inverters
10
With the above mentioned goals in mind, the microcontroller based pulse generation system will
have the following functions:
In addition, the microcontroller based pulse generation system will also have the following
features:
3. Technical Specification
While the overall goals, strategies and objectives have been stated, the specifications of the
components will be determined as they are identified for their applicability in the project. The
overall system will meet the specifications stated in Table 3.1.
11
Operational Specifications Value
Performance Specifications
Output accuracy 99 %
Fault occurrence 1%
Failures 0
Table 3.1. Technical specifications for the Microcontroller based pulse generation system.
Physical Specifications
4.1.1.Rectifier
Cost Circuit: < $100
12
Historically, even synchronous electromechanical switches and motors have been used.
Early radio receivers, called crystal radios, used a "cat's whisker" of fine wire pressing on a
crystal of galena (lead sulfide) to serve as a point-contact rectifier or "crystal detector".
Rectifiers have many uses, but are often found serving as components of DC power
supply and high-voltage direct current power transmission systems. Rectification may serve in
roles other than to generate direct current for use as a source of power. As
noted, detectors of radio signals serve as rectifiers.
In gas heating systems flame rectification is used to detect presence of flame. The simple
process of rectification produces a type of DC characterized by pulsating voltages and currents
(although still unidirectional). Depending upon the type of end-use, this type of DC current may
then be further modified into the type of relatively constant voltage DC characteristically
produced by such sources as batteries and solar cells
13
4.1.2.7805 REGULATOR:
14
4.1.3.Power Supply Circuit:
The rectifier is used to convert AC to DC supply. A voltage regulator IC 7805 is used to provide
constant 5V dc supply to the microcontroller. Capacitors are used to remove the ripples.
15
4.1.4.MICROCONTROLLER:
Micro controllers are used for more specific applications. In the micro controller family
PIC16F877A is more widely used device in the recent times. The reasons for its wide usage are it
has large memory capacity, it has adequate input /output ports etc. The following are the details
about the PIC micro controller.
PIC16F874A/877A devices are available in 40-pin and 44-pin packages. All devices in
the PIC16F87XA family share common architecture with the few differences. The available
features are summarized below
16
Peripheral Features
• Timer1: 16-bit timer/counter with prescaler can be incremented during SLEEP via
external crystal/clock.
• Timer2: 8-bit timer/counter with 8-bit period register, prescaler and post scaler
• Synchronous Serial Port (SSP) with SPI™ (Master mode) and I2C™
• Parallel Slave Port (PSP) 8-bits wide, with external RD, WR and CS Controls (40/44-
pin only).
Analog Features
17
Special Microcontroller Features
• Watchdog Timer with its own on-chip RC oscillator for reliable operation.
MEMORY ORGANISATION
There are three memory blocks in each of the PIC16F87XA devices. The Program
Memory and Data Memory have separate buses so that concurrent access can occur.
18
Table 4.1.2. Summary of Registers Associated With Port A
PORTB is an 8-bit wide, bi-directional port. Setting a TRISB bit (= 1) will make the
corresponding PORTB pin an input three pins of PORTB are multiplexed with the In- Circuit
Debugger and Low Voltage Programming function: RB3/PGM, RB6/PGC and RB7/PGD.
PORTC is an 8-bit wide, bi-directional port. The corresponding data direction register is
TRISC. Setting a TRISC bit (= 1) will make the corresponding PORTC pin an input. Clearing a
TRISC bit (= 0) will make the corresponding PORTC pin an output. PORTC is multiplexed with
several peripheral functions. PORTC pins have Schmitt Trigger input buffers. When enabling
peripheral functions, care should be taken in defining TRIS bits for each PORTC pin. Some
peripherals override the TRIS bit to make a pin an output, while other peripherals override the
TRIS bit to make a pin an input. Since the TRIS bit override is in effect while the peripheral is
enabled, read-modify-write instructions (BSF, BCF and XOR WF) with TRISC as the
destination should be avoided.
20
PORTD and TRISD Registers
PORTD is an 8-bit port with Schmitt Trigger input buffers. Each pin is individually
configurable as an input or output. PORTD can be configured as an 8-bit wide microprocessor
port (parallel slave port) by setting control bit PSPMODE. In this mode, the input buffers are
TTL.
21
PORTE and TRISE Register
PORTE has three pins (RE0/RD/AN5, RE1/WR/AN6, and RE2/CS/AN7), which are
individually configurable as inputs or outputs. These pins have Schmitt Trigger input buffers.
The PORTE pins become the I/O control inputs for the microprocessor port when bit PSPMODE
is set. In this mode, the user must make certain that the TRISE bits are set, and that the pins are
configured as digital inputs. Also ensure that ADCON1 is configured for digital I/O. In this
mode, the input buffers are TTL. The TRISE register controls the parallel slave port operation.
PORTE pins are multiplexed with analog inputs. When selected for analog input, these pins will
read as ’0’s. TRISE controls the direction of the RE pins, even when they are being used as
analog inputs. The user must make sure to keep the pins configured as inputs when using them as
analog inputs.
22
4.1.4.2.PWM mode:
These bits are the two LSbs of the PWM duty cycle. The eight MSbs are found in CCPRxL.
1010 = Compare mode, generate software interrupt on match (CCPxIF bit is set, CCPx pin is
unaffected)
1011 = Compare mode, trigger special event (CCPxIF bit is set, CCPx pin is unaffected);
CCP1resets TMR1; CCP2 resets TMR1 and starts an A/D conversion (if A/D module is enabled)
In Pulse Width Modulation mode, the CCPx pin produces up to a 10-bit resolution PWM output.
Since the CCP1 pin is multiplexed with the PORTC data latch, the TRISC<2> bit must be
cleared to make the CCP1 pin an output. Figure 4.6.1 shows a simplified block diagram of the
CCP module in PWM mode.
23
Fig. 4.1.3.SIMPLIFIED PWM BLOCK DIAGRAM
A PWM output has a time base (period) and a time that the output stays high (duty
cycle). The frequency of the PWM is the inverse of the period(1/period)
24
Fig 4.1.4. PWM OUTPUT
PWM PERIOD
The PWM period is specified by writing to the PR2 register. The PWM period can be
calculated using the following formula:
PWM frequency is defined as 1/[PWM period].When TMR2 is equal to PR2, the following three
events occur on the next increment cycle:
• TMR2 is cleared
• The CCP1 pin is set (exception: if PWM duty cycle = 0%, the CCP1 pin will not be set)
The PWM duty cycle is specified by writing to the CCPR1L register and to the
CCP1CON<5:4> bits. Up to 10-bit resolution is available. The CCPR1L contains the eight MSbs
and the CCP1CON<5:4> contains the two LSbs. This 10-bit value is represented by
CCPR1L:CCP1CON<5:4>. The following equation is used to calculate the PWM duty cycle in
time:
CCPR1L and CCP1CON<5:4> can be written to at any time, but the duty cycle value is not
latched into CCPR1H until after a match between PR2 and TMR2 occurs (i.e., the period is
complete). In PWM mode,CCPR1H is a read-only register.The CCPR1H register and a 2-bit
internal latch are used to double-buffer the PWM duty cycle. This double-buffering is essential
for glitch-free PWM operation.When the CCPR1H and 2-bit latch match TMR2,concatenated
with an internal 2-bit Q clock or 2 bits of the TMR2 pre scalar , the CCP1 pin is cleared.
25
PWM:
Pulse width modulation (PWM) is a powerful technique for controlling analog circuits
with a processor's digital outputs. PWM is employed in a wide variety of applications, ranging
from measurement and communications to power control and conversion.
4.1.4.3.Analog electronics:
An analog signal has a continuously varying value, with infinite resolution in both time and
magnitude. A nine-volt battery is an example of an analog device, in that its output voltage is not
precisely 9V, changes over time, and can take any real-numbered value. Similarly, the amount of
current drawn from a battery is not limited to a finite set of possible values. Analog signals are
distinguishable from digital signals because the latter always take values only from a finite set of
predetermined possibilities, such as the set {0V, 5V}.
Analog voltages and currents can be used to control things directly, like the volume of a car
radio. In a simple analog radio, a knob is connected to a variable resistor. As you turn the knob,
the resistance goes up or down. As that happens, the current flowing through the resistor
increases or decreases. This changes the amount of current driving the speakers, thus increasing
or decreasing the volume. An analog circuit is one, like the radio, whose output is linearly
proportional to its input.
As intuitive and simple as analog control may seem, it is not always economically attractive or
otherwise practical. For one thing, analog circuits tend to drift over time and can, therefore, be
very difficult to tune. Precision analog circuits, which solve that problem, can be very large,
heavy (just think of older home stereo equipment), and expensive. Analog circuits can also get
very hot; the power dissipated is proportional to the voltage across the active elements multiplied
by the current through them. Analog circuitry can also be sensitive to noise. Because of its
infinite resolution, any perturbation or noise on an analog signal necessarily changes the current
value.
26
4.1.4.4.Digital control :
By controlling analog circuits digitally, system costs and power consumption can be
drastically reduced. What's more, many microcontrollers and DSPs already include on-chip
PWM controllers, making implementation easy.
In a nutshell, PWM is a way of digitally encoding analog signal levels. Through the use of high-
resolution counters, the duty cycle of a square wave is modulated to encode a specific analog
signal level. The PWM signal is still digital because, at any given instant of time, the full DC
supply is either fully on or fully off. The voltage or current source is supplied to the analog load
by means of a repeating series of on and off pulses. The on-time is the time during which the DC
supply is applied to the load, and the off-time is the periods during which that supply is switched
off. Given a sufficient bandwidth, any analog value can be encoded with PWM.
PWM controllers:
• Set the period in the on-chip timer/counter that provides the modulating square wave
• Set the direction of the PWM output, which is one of the general-purpose I/O pins
Although specific PWM controllers do vary in their programmatic details, the basic idea is
generally the same.
27
4.1.4.4.1.Communication and control:
One of the advantages of PWM is that the signal remains digital all the way from the
processor to the controlled system; no digital-to-analog conversion is necessary. By keeping the
signal digital, noise effects are minimized. Noise can only affect a digital signal if it is strong
enough to change a logic-1 to a logic-0, or vice versa.
Increased noise immunity is yet another benefit of choosing PWM over analog control,
and is the principal reason PWM is sometimes used for communication. Switching from an
analog signal to PWM can increase the length of a communications channel dramatically. At the
receiving end, a suitable RC (resistor-capacitor) or LC (inductor-capacitor) network can remove
the modulating high frequency square wave and return the signal to analog form.
The output of a PWM controller could be connected to a switch between the supply and
the brake. To produce more stopping power, the software need only increase the duty cycle of
the PWM output. If a specific amount of braking pressure is desired, measurements would need
to be taken to determine the mathematical relationship between duty cycle and pressure. (And
the resulting formulae or lookup tables would be tweaked for operating temperature, surface
wear, and so on.)
To set the pressure on the brake to, say, 100 psi, the software would do a reverse lookup
to determine the duty cycle that should produce that amount of force. It would then set the PWM
duty cycle to the new value and the brake would respond accordingly. If a sensor is available in
the system, the duty cycle can be tweaked, under closed-loop control, until the desired pressure is
precisely achieved.PWM is economical, space saving, and noise immune.
28
4.1.5.Pulse Width Modulation Techniques:
In single pulse width modulation, only one pulse per half cycle is generated and the width
of the pulse is varied to control the inverter output voltage. The gating signals are generated by
comparing a rectangular reference signal with a triangular carrier signal. The figure 4.1.5.1
shows the generation of gating signals of single pulse width modulation.The frequency of the
reference signal determines the fundamendal frequency of the output voltage.
29
The ratio of Ar to Ac is the control variable and defined as the amplitude modulation
index. The modulation index,M is given by,
M=Ar / Ac
By varying Ar from 0 to Ac , the pulse width can be modified from 00 to 1800 and the rms output
voltage V0, from 0 to Vs.
30
4.1.5.2.Multiple Pulse Width modulation:
The harmonics can be reduced by using several pulses in each half cycle of output
voltage. The gating signals are generated by comparing a rectangular reference signal with a
triangular carrier signal.
31
The carrier frequency determines number of pulses per half cycle. The frequency of the reference
signal sets the output frequency f0, and the carrier frequency fc determines the number of pulse
per half cycle p.The modulation index controls the output voltage. This type of modulation signal
is also known as uniform pulse width modulation( UPWM). The number of pulses per half cycle
is found from ,
p = fc / 2 f0 = mf /2
where,
32
4.1.5.3.Sinusoidal Pulse Width Modulation:
Instead of maintaining the width of the pulses same as in the case of multiple pulse width
modulation, the width of each pulses is varied in proportion to the amplitude of a sine wave . The
gating signals are generated by comparing sinusoidal reference signal with a carrier triangular
wave. The frequency of the reference signal fr determines the inverter output frequency f0 and its
peak amplitude Ar controls the modulation index,M .The number of pulses per half cycle
depends on the carrier frequency.This sinusoidal pulse width modulation is commonly used in
industrial applications.
33
Fig. 4.1.5.3.2.Sinusoidal Pulse Width Modulation
34
The line to line voltage is sinusoidal PWM and the amplitude of the fundamendal
components in approximately 15% more than that of the normal sinusoidal PWM.
35
4.1.5.5.Phase Displacement Control:
The phase displacement modulation is used to produce pulses by channging the delay
angle. This type of modulation is highly usefull for high power applications, requiring a large
number of switching devies in parallel.
36
Voltage control can be obtained by using multiple inverters and summing the output
voltage of individual inverters. As single phase full bridge inverter can be preceived as the sum
of two half bridge inverters.
If the gate signals g1 and g2 are delayed by a some angles α1= α and α2(=∏-α), the output
voltage V has a quaterwave symmetry at ∏ / 2.
37
4.1.5.6.Modified Sinusoidal Modulation:
In Sinusoidal PWM ,the width of the pulses nearer to the peak of the sine wave do not
change with variation of modulation index.This is due to the charecteristics of sine wave and the
sinusoidaal Pulse width modulation can be modified so that carrier wave is applied during the
first and last 60 degree intervals per half cycle.
38
When the fundamendal component is increased and its harmonic components are
improved. The fundamendal component is increased and its harmonic charecteristics are
improved.This reduces the number of switching of power devices and also reduces switching
losses.
39
4.1.5.7.Stepped Modulation:
The modulating signal is a stepped wave. The stepped wave is not a sample
approximation to the sine wave. It is divided into specific interval say 200,each interval
controlled individually to control the magnitude of fundamendal component and eliminate
specific harmonics. This type of control gives low distortions but higher fundamendal amplitude
compared with normal PWM control.
40
4.1.5.8.Selected Harmonic Injected Modulation:
41
4.1.5.9.Trapezoidal Modulation:
The gating signal are generated by comparing a triangular carrier wave with a modulating
trapezoidal wave. The magnitude wave can be obtained from a triangular wave by limiting its
magnitude. The trapezoidal wave can be obtained from a triangular wave by limiting its
magnitude to +/- Ar, which is related to peak value Ar max, by
Ar = ζ Ar(max)
42
4.1.5.10.Staircase Modulation:
The staircase modulation is not a sampled approximation to the sine wave.The levels of
the stairs are calculated to eliminate specific harmonics. The number of steps are choosen to
obtain the desired quantity of output. The level of stairs are calculated to eliminate specific
harmonics. This is an optimized PWM and is not recommened for fewer than 15 pulses in one
cycle.
43
4.2 Codes and Standards:
The current choice for our pulse generation is Microcontroller. The input to the
microcontroller is a constant 5V dc supply. So the AC power supply must be converted into DC
power supply. Also, the voltage put onto the microcontroller must be compliant with the electric
standard to ensure that our pulse generator does not have an unfair advantage in terms of voltage
being delivered to it. The voltage range of the Microcontroller is 0-5 Volts. Also for safety
reasons the microcontroller cannot put out a voltage exceeding 5 volts since it could damage the
microcontroller board.
Accuracy and simplicity of use are two fundamental issues for this product. Instead of
using microcontroller, an arduino could be used and it could be used for pulse generation with a
switches. However, arduino does not have enough memory to store all the program for
generating 10 different type of pulse width modulation techniques. Also, the time delay of
transmitting the data along with the instruction would make the control sluggish and
unresponsive. In addition, an arduino would be more expensive than purchasing a
microcontroller. The added weight of an arduino would also hinder the performance of the Pulse
generator.
Letting the end user select the type of information by pressing switch is preferred to
design a system where the pulse generator is user friendly. While using a series of switches saves
the user from entering into confusion, it is more accurate than having software determine the
type of input pulse to be provided. Since all types of pulses to be generated are standardized,
series of switches can determine more accurately the type of input pulse required. As an added
bonus, the microcontroller can exactly produce any pulse conceivable by the user since the
generation of pulses are standardized.
44
5. Schedule, Tasks and Milestones
There are three major milestones as well as sever smaller tasks that must be achieved in
order to reach the milestones. The three milestones are:
Programming for producing pulse width modulation techniques using the computer with
PIC C compiler.
From the opto-isolator, the triggering pulses are fed to the single phase inverter.
Tasks will be split up among group members according to each member’s level of expertise
or comfort. Each task will be done by the one, who is responsible for completion of that task.
However, the other group member is expected to provide assistance if needed. This way, an
engineer can concentrate on a task but still get help if needed.
6. Project Demonstration
The most important specification that the Pulse generator has to meet is to be competitive
against an experienced user while still being accessible to a new user. Therefore the primary
project demonstration will pit the generation of pulses for inverter against two human opponents,
one with less than 3 hours of experience and the other with more than 30 hours. The track for the
demonstration will be random with the only constraints being available is the generation of
pulses and the necessity to make the two people do the same activity. If the pulse generation can
stay within half the time period of the opponent, either leading or following then it is acceptable.
The secondary design presentation will test the other features such as the best time, and
best speed, production of pulses etc. These features can be demonstrated but do not have
performance criteria to test against.
45
Due to the time required to build the system, it is probably impractical to have the
demonstration live in the classroom. Therefore a photos of the demonstration will be shown
instead.
Our product will have a scalable interface that can be tailored to a variety of users
ranging from technical enthusiasts to young children. The microcontroller interface allows the
user to get the desired type of pulse width modulation. In addition, our system will be much
more accurate in generating the 10 different types of pulse width modulation techniques. This
means that over many competitors, this system will still be able to generate different types of
pulses faster and accurate.
Table 7.2.1. Cost analysis for the PWM techniques for inverter .
46
8.Hardware Setup:
Fig.8.1.Hardware setup
The microcontroller is used for generating ten different types of pulses. The different
types of pulses to be feded to the inverter is selected by using a resister switch. The 230V a.c.
supply is converted into 12V a.c supply by using a transformer. A rectifier is then used to
convert a.c to d.c. supply.
A constant d.c. supply to the microcontroller is fed by using a 7805 voltage regulator.
The microcontroller has input from the resistor switch to the input port. These input switches aid
in selecting the type of pulse to be given to the inverter.
The output port of the microcontroller is connected to the gate terminal of the inverter
through opto-isolator. The MOSFET is given a constant d.c. supply from a Variable Power
Supply. The output waveforms are visualized using a digital CRO.
47
9. Summary
Currently, ten different types of pulse width modulation techniques are generated using a
single circuit with PIC microcontroller. Other microcontrollers was also looked into . Once the
PIC microcontroller is chosen, it was purchased and interfaced with the inverter. Preliminary
designs for the generation of pulse waveforms was viewed using Proteus software and tested as
well.
48
10.Conclusion:
The most efficient method of controlling output voltage is to incorporate Pulse Width
Modulation control within inverters. In this method, a fixed d.c. voltage is supplied to inverter
and a controlled a.c. output voltage is obtained by adjusting the type of pulse width modulation
techniques generated using microcontroller. Pulse Width Modulation variable speed drives are
increasingly applied in many new industrial applications that require superior performance.
Switching power converters are used in industrial application to convert and deliver their
required energy to the motor or load because of advances in solid state power devices and
microprocessors . There are so many techniques which are used for controlling of induction
motor drives and PWM technique improves the quality of the current and reduce the torque
ripple in induction motor drive efficiently while maintaining the other performance
characteristics of the system.
11. References
49
[1] Sandeep Kumar Singh, Harish Kumar, Kamal Singh and Amit Patel “A SURVEY AND STUDY OF
DIFFERENT TYPES OF PWM TECHNIQUES USED IN INDUCTION MOTOR DRIVE ” International Journal of
Engineering Science & Advanced Technology,Volume-4, Issue-1, 2014.
[2] Satish Kumar Peddapelli “Recent Advances in Pulse Width Modulation Techniques and Multilevel
Inverters’’ World Academy of Science, Engineering and Technology International Journal of Electrical,
Computer, Electronics and Communication Engineering Vol:8 No:3, 2014
[3] Sangeeta Deb Barman and Tapas Roy “Different Types of PWM Techniques analysis for Z-Source
Inverter” IOSR Journal of Electrical and Electronics Engineering (IOSR-JEEE) e-ISSN: 2278-1676,p-ISSN:
2320-3331, Volume 9, Issue 3 Ver. IV (May – Jun. 2014), PP 09-17
[4] Sonal Arvind Barge & S. R. Jagtap," Harmonic Analysis of Sinusoidal Pulse Width Modulation"
International Journal of Advanced Electrical and Electronics Engineering, (IJAEEE), Volume-2, Issue-5,
2013.
[5]Mr. Sandeep N Panchal, Mr. Vishal S Sheth, Mr. Akshay A Pandya," Simulat ion Analysis of SVPWM
Inverter Fed Induction Motor Drives", International Journal of Emerging Trends in Electrical and
Electronics (IJETEE) Vol. 2, Issue. 4, April-2013.
[6]Srinivasa Rao Maturu and Avinash Vujji," SVPWM Based Speed Control of Induction Motor Drive with
Using V/F Control Based 3-Level Inverter" VSRD-IJEECE, Vol. 2 (7), 2012, 421-437.
[7]Mahesh A patel and Ankit R patel “Use of PWM techniques for Power quality Improvement”
International Journal of Recent trends in engineering,Vol.1,No 4, May 2009.
[8] A.K.Gupta and A.M.Khabadkone “ A General Space Vector PWM Algorithm for Multilevel Inverters,
Including Operation in Over modulation Range”, IEEE Transactions on Power Electronics, vol.22,No.2,
March 2007, pp517-526
APPENDIX
50
SOFTWARE USED TO RUN THE COMPUTER PROGRAM
The software used is PIC C Compiler. It is written in embedded "C" language and compiled using
PIC C Compiler. The source program is converted into a hex file by the compiler. The program is then
loaded into the microcontroller using a USB cable.
#if defined(__PCM__)
#include <16f877a.h>
#include <string.h>
#include <math.h>
#fuses HS,NOWDT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7)
#include <stdlib.h>
#include <stdio.h>
#byte ADCON1=0x9f
void main(void)
int16 s=0,s1=0,s2=0,s3=0,s4=0,s5=0,s6=0,s7=0,s8=0,s9=0;
ADCON1=0x07;
set_tris_b(0Xff);
set_tris_a(0xff);
set_tris_e(0xff);
set_tris_d(0x00);
output_b(0x00);
output_a(0x00);
output_e(0x00);
51
output_low(pin_d0);
output_low(pin_d1);
while(true)
if(input(pin_A0)==0)
s=1;
s1=0;
s2=0;
s3=0;
s4=0;
s5=0;
s6=0;
s7=0;
s8=0;
s9=0;
else if(input(pin_A1)==0)
s=0;
s1=1;
s2=0;
s3=0;
s4=0;
s5=0;
s6=0;
52
s7=0;
s8=0;
s9=0;
else if(input(pin_A2)==0)
s=0;
s1=0;
s2=1;
s3=0;
s4=0;
s5=0;
s6=0;
s7=0;
s8=0;
s9=0;
else if(input(pin_A3)==0)
s=0;
s1=0;
s2=0;
s3=1;
s4=0;
s5=0;
s6=0;
53
s7=0;
s8=0;
s9=0;
else if(input(pin_A4)==0)
s=0;
s1=0;
s2=0;
s3=0;
s4=1;
s5=0;
s6=0;
s7=0;
s8=0;
s9=0;
else if(input(pin_A5)==0)
s=0;
s1=0;
s2=0;
s3=0;
s4=0;
s5=1;
s6=0;
54
s7=0;
s8=0;
s9=0;
else if(input(pin_e0)==0)
s=0;
s1=0;
s2=0;
s3=0;
s4=0;
s5=0;
s6=1;
s7=0;
s8=0;
s9=0;
else if(input(pin_e1)==0)
s=0;
s1=0;
s2=0;
s3=0;
s4=0;
s5=0;
s6=0;
55
s7=1;
s8=0;
s9=0;
else if(input(pin_e2)==0)
s=0;
s1=0;
s2=0;
s3=0;
s4=0;
s5=0;
s6=0;
s7=0;
s8=1;
s9=0;
else if(input(pin_b0)==0)
s=0;
s1=0;
s2=0;
s3=0;
s4=0;
s5=0;
s6=0;
56
s7=0;
s8=0;
s9=1;
if(s==1)
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d0);
delay_ms(7);
output_low(pin_d0);
delay_ms(1);
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(7);
output_low(pin_d1);
delay_ms(1);
57
else if(s1==1)
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
58
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
else if(s2==1)
59
{
output_high(pin_d0);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
60
output_high(pin_d0);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
else if(s3==1)
61
printf("Harmonic injection modulation \r\n");
output_high(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d0);
output_high(pin_d1);
62
delay_ms(1);
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
else if(s4==1)
output_low(pin_d1);
output_low(pin_d0);
63
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(2);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
delay_ms(1);
output_low(pin_d1);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
64
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(2);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
else if(s5==1)
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d0);
delay_ms(2);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(2);
output_low(pin_d0);
65
delay_ms(1);
output_high(pin_d0);
delay_ms(2);
output_low(pin_d0);
delay_ms(1);
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(2);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(2);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(2);
output_low(pin_d1);
delay_ms(1);
else if(s6==1)
66
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d0);
delay_ms(2);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(2);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(2);
output_low(pin_d0);
delay_ms(1);
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(2);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
67
delay_ms(2);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(2);
else if(s7==1)
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
delay_ms(2);
output_high(pin_d0);
delay_ms(2);
output_low(pin_d0);
delay_ms(2);
output_high(pin_d0);
delay_ms(2);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
output_high(pin_d1);
68
delay_ms(4);
output_low(pin_d0);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
else if(s8==1)
output_high(pin_d0);
output_low(pin_d1);
delay_ms(10);
output_low(pin_d0);
output_high(pin_d1);
delay_ms(10);
else if(s9==1)
69
printf("staircase Modulation \r\n");
output_high(pin_d0);
output_low(pin_d1);
delay_ms(2);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(2);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(2);
output_low(pin_d0);
delay_ms(1);
output_high(pin_d0);
delay_ms(1);
output_low(pin_d0);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(2);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(2);
70
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(2);
output_high(pin_d1);
delay_ms(1);
output_low(pin_d1);
delay_ms(1);
71
72