Generation of PWM Using Verilog in FPGA PDF
Generation of PWM Using Verilog in FPGA PDF
ABSTRACT :
INTRODUCTION :
In last two decades, the Pulse width modulation (PWM) techniques are
extensively used for controlling the analog circuitry. In particular, it is more
commonly used for controlling the power converters employed in various
industrial/domestic applications. In power converters it is used for firing of
power electronic devices like thyristors, Insulated- Gate Bipolar Transistors
(IGBTS), Metal Oxide Semiconductor Field Effect Transistors (MOSFET) etc.
Duty cycle (D) can be defined as ratio of ON time over to total ON and
OFF time and is shown in Fig. .
D= Ton *100
(Ton+Toff)
Whereas Time period (T) is defined as sum of Ton and Toff Ton- time
for which switch is on
Toff – time for which witch is off
Period
Duty cycle
ton
toff
The main advantage of Pulse width modulation is that it has very low power
loss in switching devices and higher frequency that affects the devices which
uses power. Only digital circuits can produce PWM signals. In this paper
counters are used to generate PWM signals which will be in the form of
square wave.
The conventional method of generating the PWM pulses using analog circuitry
have disadvantages of complex circuitry, limited function and low flexibility in
circuit modification. Due to limitations offered by analog circuit designing, the
digital methods of generating the pulses are getting more popularity. Today
basically engineers use various micro-controllers to make control system but
these microcontrollers are being replaced by FPGA. The FPGA (Field
Programmable Gate Array) allows user to have all features on a single chip. It
is an array of programmable logic blocks which can be connected to each
other by using Hardware Description Language. The most common HDL used
are VERILOG and VHDL. This paper describes or propose how to generate
PWM in Verilog for implementation on FPGA for further applications.FPGA
Board, ISE software is necessary for this implementation
There is one counter used for each PWM signal generated. A clock and a
reset is taken common for all counters. Total six counters are taken for
generation of six PWM signals. Now system clock which is of 50 MHz is
divided to provide delay and the duty cycle is taken as 50%. As we know in
India the frequency is of 50 Hz for AC supply, so time period can be
calculated as T= 1/50 = 20 msec which are converted to nanoseconds.
1 cycle = 3600
00 0msecs
600 3.33msecs
1200 6.66msecs
1800 10msecs
2400 13.33msecs
3000 16.66msecs
IMPLEMENTATION OF VERILOG CODES IN XILINX :
When the codes are written in Xilinx one can get output waveforms on Model
Sim as well as one can view the RTL schematic (Fig.2) so the RTL
schematic which is shown below in parts from Fig.3-Fig.6 which provides a
brief overview of the functioning of our proposed PWM generator. The code
used is mentioned in appendix in which the functionality is described of
proposed design for PWM generator.
Before we proceed its most important to understand that what is RTL
(Register Transfer Level) schematic. RTL schematic tells us how our HDL
code is interpreted and implemented. It helps to do analysis in one go and to
derive actual wiring from higher level representation for lower level design
implementation.
The detailed RTL schematic is bit complex but it is not so difficult to
understand. Once if we look carefully to the RTL schematic we are able to
understand how the proposed design is working.
The simulation results obtained and are shown in Fig.7 and Fig.8. As shown
in Fig. 7, no pulses are generated as the reset port is high only system clock
is visible whereas in Fig.8 the PWM pulse are generated when reset port is
low. The pulses generated are suitable for firing six power devices in three
phase inverter.
CONCLUSION :
The proposed model can be refined and modified for better performance and
more accurate PWM generation. The counters can be turned on and off at
more précised intervals or instead of counters comparator may be used for
the PWM generation purpose in which waveforms can be compared to
generate PWM.
REFERENCES :