Image:Three types.png
From Wikipedia, the free encyclopedia
Size of this preview: 800 × 560 pixel
Image in higher resolution (1500 × 1050 pixel, file size: 93 KB, MIME type: image/png)
This is a file from the Wikimedia Commons. The description on its description page there is shown below. | |
[edit] Summary
Description |
three methods to generate an intersective pwm: leading edge modulation, trailing edge modulation or centered modulation. The reference signal is a sine wave, not plotted. See Image:Pwm.png for more information |
---|---|
Source |
own work, made with gnuplot 4.0 |
Date |
7/05/06 |
Author |
Cyril BUTTAY |
Permission |
use one of the licenses at your convenience |
The gnuplot sourcecode used is as follow:
# This file is used to generate a plot that explains the # three PWM: centered, tail edge modulated and lead edge modulated # graph configuration set terminal postscript eps enhanced "Times-Roman" 24 color solid set encoding iso_8859_15 unset title set line style 1 lt 3 lw 3 pt 0 ps 0 set line style 2 lt 2 lw 1 pt 0 ps 0 set border 15 lt 7 lw 4 set grid xtics ytics mxtics set xlabel "" set samples 10000 set format x "" set bmargin 0 set tmargin 0 # equation of the trail modulation saw signal trailsignal(x) = x-floor(x) # equation of the lead modulation saw signal leadsignal(x) = ceil(x)-x #equation of the centered triangular signal centersignal(x)=abs(x-1-floor(x-0.5))*2 #equation of the sine signal freq=0.05 sinesignal(x) = 0.5+0.49*sin(freq*x*(2*pi)) #equation of the resulting pwm lead signal pwmleadsignal(x)=leadsignal(x)>=sinesignal(x)?0:1 #equation of the resulting pwm trail signal pwmtrailsignal(x)=trailsignal(x)>=sinesignal(x)?0:1 #equation of the resulting pwm center signal pwmcentersignal(x)=centersignal(x)>=sinesignal(x)?0:1 set ytics ("0" 0, "1" 1) set mxtics 2 set output "three_types.eps" set multiplot set ylabel "lead" set origin 0,0.67 set size 1,0.3 plot [0:19][-0.25:1.25] leadsignal(x) ls 2 title '',\ pwmleadsignal(x) ls 1 title '' set ylabel "trail" set origin 0,0.37 plot [0:19][-0.25:1.25] trailsignal(x) ls 2 title '',\ pwmtrailsignal(x) ls 1 title '' set ylabel "center" set origin 0,0.07 set xlabel set format x "%1.0f T" plot [0:19][-0.25:1.25] centersignal(x) ls 2 title '',\ pwmcentersignal(x) ls 1 title '' unset multiplot
the eps file generated is converted in png by the following command (linux)
convert -density 300 three_types.eps three_types.png
[edit] Licensing
File links
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):