Generation of PWM Using Verilog in FPGA
Generation of PWM Using Verilog in FPGA
Generation of PWM Using Verilog in FPGA
Abstract— In this paper a new approach of generating the Whereas Time period (T) is defined as sum of Ton and Toff
Pulse width modulation (PWM) signals which are to be used in
various power electronics application like power converters and Ton- time for which switch is on
inverters is presented. Pulse Width Modulation (PWM) triggers
the gate terminals of the power electronic semiconductor devices Toff – time for which witch is off
like thyristors, Insulated-Gate Bipolar Transistors (IGBTS),
Metal Oxide Semiconductor Field Effect Transistors (MOSFET)
etc. which are used as switches for voltage regulation. The pulses
are generated using hardware description language (HDL) which
is suitable for usage in Spartan-3E Field Programmable Gate
Array (FPGA) board which is used as high performance Period
controller in vector control of induction motor. Simulation is Duty cycle
done in Model Sim 6.2b environment and results are obtained
ton
validated with register transfer level (RTL) schematic. toff
D= Ton
×100
Ton+Toff
4593
Authorized licensed use limited to: VIT University. Downloaded on February 23,2022 at 16:19:26 UTC from IEEE Xplore. Restrictions apply.
II. STRATEGY FOR BUILDING PWM SIGNALS IN FPGA USING at the register transfer level (RTL). We have used Verilog
VERILOG instead of VHDL because of various advantages of Verilog
over VHDL.
00 0msecs
600 3.33msecs
0
120 6.66msecs
2400 13.33msecs
3000 16.66msecs
4594
Authorized licensed use limited to: VIT University. Downloaded on February 23,2022 at 16:19:26 UTC from IEEE Xplore. Restrictions apply.
Figure 6. Part 4 of RTL schematic
Figure 4. Part 2 of RTL schematic
IV. RESULT AND DISCUSSION
4595
Authorized licensed use limited to: VIT University. Downloaded on February 23,2022 at 16:19:26 UTC from IEEE Xplore. Restrictions apply.
end else begin
count_reg0 := 0;
out_0 := ~out_0;
end
if (counter1 < 833) begin
counter1 := counter1 + 1;
end else begin
counter1 := 0;
out_1 := ~out_1;
end
if (counter2 < 416) begin
counter2 := counter2 + 1;
end else begin
counter2 := 0;
out_2 := ~out_2;
end
if (counter3 < 277) begin
counter3 := counter3 + 1;
Figure 8. Simulation result of model sim while reset is 0 end else begin
counter3 <= 0;
out_3 := ~out_3;
V. CONCLUSION end
In this study the generation of PWM pulses using Verilog is if (counter4 < 208) begin
counter4 := counter4 + 1;
investigated. A program is developed for the study of PWM
end else begin
generation of fixed frequency in the Verilog which is counter4 := 0;
implemented on FPGA. FPGA are more reliable and suitable out_4 := ~out_4;
than traditional MCUs. RTL schematic validates the output of end
developed program for Pulse generation. The simulation if (counter5 < 166) begin
results showed that an effective PWM pulses can be generated counter5 := counter5 + 1;
using proposed approach. end else begin
counter5 := 0;
VI. FUTURE SCOPE out_5 := ~out_5;
end
The proposed model can be refined and modified for better
end
performance and more accurate PWM generation. The end
counters can be turned on and off at more précised intervals or endmodule
instead of counters comparator may be used for the PWM
generation purpose in which waveforms can be compared to References
generate PWM.
[1] R.M. Jalanekar & K.S. Jog, “Pulse –Width-Modulation Techniques: A
Appendix Review,” IETE journal of research, Vol. 46, No. 3, May-June 2000.
[2] Youichi Ito and Scoichi Kawauchi, “Microprocessor –Based Robust
Digital control for UPS with three phase PWM Inverter,” IEEE
The main Verilog program to generate PWM signals Transactions on Power Electronics, Vol.10, No.2, March 1995.
[3] Brian von Herzen, “Signal processing at 250 MHz using high-
always @(posedge clk) performance FPGA s,” IEEE Transactions on VLSI Systems 6, 1998,
begin pp. 238–246.
if (reset1) then [4] O. Cadenas, G. Megson, “A clocking technique for FPGA pipelined
counter0 :=12bit binary0; designs,” Journal of Systems Architecture 50, 2004, pp. 687–696.
out0: = 0 [5] M.M. Islam, D. Allee, S. Konasani, A. Rodriguez, “A low-cost digital
counter1 :=12bit binary0; controller for a switching DC converter with improved voltage
out1 := 0 regulation,” IEEE Power Electronics Letters 2, 2004, pp. 121–124.
counter2 :=12bit binary0; [6] A. Arbit, D. Pritzker, A. Kuperman, R. Rabinovici, “A DSP-controlled
out_2 := 0 PWM generator using field programmable gate array,” 23rd IEEE
Convention of Electrical and Electronic Engineers, vol. 1, 2004, pp.
counter3 :=12bit binary0;
325–328.
out_3 := 0
[7] R. Ramos, D. Biel, E. Fossas, F. Guinjoan, “A fixed-frequency quasi-
counter4 :=12bit binary0;
sliding control algorithm: application to power inverters design by
out_4 := 0 means of FPGA implementation,” IEEE Transactions on Power
counter5 :=12bit binary0; Electronics 18, 2003, pp. 344–355.
out_5 := 0 [8] A.M. Omar, N. Rahim, S. Mekhilef, “Three-phase syn-chronous PWM
end for flyback converter with power-factor correction using FPGA ASIC
else begin design,” IEEE Transactions on Industrial Electronics 51, 2004 pp. 96-
if (counter0 < 1388) begin 106.
counter0 := counter0 + 1;
4596
Authorized licensed use limited to: VIT University. Downloaded on February 23,2022 at 16:19:26 UTC from IEEE Xplore. Restrictions apply.
[9] Koutroulis, Eftichios, Apostolos Dollas, and Kostas Kalaitzakis. "High- [10] Nouman, Z. "Generating PWM Signals With Variable Duty From 0% to
frequency pulse width modulation implementation using FPGA and 100% Based FPGA SPARTAN3AN." Electrorevue Journal,
CPLD ICs." Journal of Systems Architecture 52.6, 2006, pp. 332-344. International Society for Science and Engineering publications 4.4,
2013, pp. 75-79.
4597
Authorized licensed use limited to: VIT University. Downloaded on February 23,2022 at 16:19:26 UTC from IEEE Xplore. Restrictions apply.