Description |
Français : Influence de l'amplitude sur la forme de la sortie amplificateur de classe D à trois niveaux
English: Three level PWM
|
Source |
travail personnel
|
Date |
1/02/2008
|
Author |
Yves-Laurent
|
Permission
(Reusing this image) |
I, the copyright holder of this work, hereby publish it under the following licenses:
You may select the license of your choice.
|
|
[edit] Gnuplot script
Save this script to file "anim" then run the command line "gnuplot anim", you will get classe_D_*.gif (*=1, ..? ,17), if you have well installed gnuplot 4.0 or later.
# script based on "Three types.png"'s script by Cyril BUTTAY
# graph configuration
set terminal gif font 'Times_New_Roman' 28
set encoding iso_8859_15
unset border
unset label
unset xtics
unset ytics
set samples 15000
set yrange [-0.1:1.1]
Nb=24
set xrange [0:Nb-0.1]
# equation of the trail modulation saw signal
trailsignal(x) = x-floor(x)
#equation of the sine signal
freq=1.0/Nb
ve(x,amp) = 0.5+amp*sin(freq*x*(2*pi))
#equation of the resulting pwm trail signal
pwm(x,amp)=trailsignal(x)>=ve(x,amp)?0:1
pwm3l(x,amp)=(abs(ve(x,amp)-pwm(x,amp)))>0.5?0.5:pwm(x,amp)
set output "class_D_01.gif"
plot ve(x,0.05) title "Ve" with lines lw 2, \
pwm3l(x,0.05) title "Vs" with lines lw 2
set output "class_D_02.gif"
plot ve(x,0.1) title "Ve" with lines lw 2, \
pwm3l(x,0.1) title "Vs" with lines lw 2
set output "class_D_03.gif"
plot ve(x,0.15) title "Ve" with lines lw 2, \
pwm3l(x,0.15) title "Vs" with lines lw 2
set output "class_D_04.gif"
plot ve(x,0.2) title "Ve" with lines lw 2, \
pwm3l(x,0.2) title "Vs" with lines lw 2
set output "class_D_05.gif"
plot ve(x,0.25) title "Ve" with lines lw 2, \
pwm3l(x,0.25) title "Vs" with lines lw 2
set output "class_D_06.gif"
plot ve(x,0.3) title "Ve" with lines lw 2, \
pwm3l(x,0.3) title "Vs" with lines lw 2
set output "class_D_07.gif"
plot ve(x,0.35) title "Ve" with lines lw 2, \
pwm3l(x,0.35) title "Vs" with lines lw 2
set output "class_D_08.gif"
plot ve(x,0.4) title "Ve" with lines lw 2, \
pwm3l(x,0.4) title "Vs" with lines lw 2
set output "class_D_09.gif"
plot ve(x,0.45) title "Ve" with lines lw 2, \
pwm3l(x,0.45) title "Vs" with lines lw 2
set output "class_D_10.gif"
plot ve(x,0.4) title "Ve" with lines lw 2, \
pwm3l(x,0.4) title "Vs" with lines lw 2
set output "class_D_11.gif"
plot ve(x,0.35) title "Ve" with lines lw 2, \
pwm3l(x,0.35) title "Vs" with lines lw 2
set output "class_D_12.gif"
plot ve(x,0.3) title "Ve" with lines lw 2, \
pwm3l(x,0.3) title "Vs" with lines lw 2
set output "class_D_13.gif"
plot ve(x,0.25) title "Ve" with lines lw 2, \
pwm3l(x,0.25) title "Vs" with lines lw 2
set output "class_D_14.gif"
plot ve(x,0.2) title "Ve" with lines lw 2, \
pwm3l(x,0.2) title "Vs" with lines lw 2
set output "class_D_15.gif"
plot ve(x,0.15) title "Ve" with lines lw 2, \
pwm3l(x,0.15) title "Vs" with lines lw 2
set output "class_D_16.gif"
plot ve(x,0.1) title "Ve" with lines lw 2, \
pwm3l(x,0.1) title "Vs" with lines lw 2
set output "class_D_17.gif"
plot ve(x,0.05) title "Ve" with lines lw 2, \
pwm3l(x,0.05) title "Vs" with lines lw 2
Don't forget to set GDFONTPATH before running gnuplot with something like :
export GDFONTPATH=/var/lib/defoma/gs.d/dirs/fonts/
[edit] Gifsicle script
gifsicle --delay=32 --loop --optimize *.gif > PWM_3L.gif
Cliquer sur une date et une heure pour voir le fichier tel qu’il était à ce moment-là