File:PWM 3L.gif

Description
Français : Influence de l'amplitude sur la forme de la sortie amplificateur de classe D à trois niveaux
English: Three level PWM
Date 1/02/2008
Source Own work
Author Yves-Laurent
Permission
(Reusing this file)
I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
Category:License migration redundant#PWM%203L.gifCategory:GFDL#PWM%203L.gif
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
This licensing tag was added to this file as part of the GFDL licensing update.
Category:CC-BY-SA-3.0-migrated#PWM%203L.gif
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 2.5 Generic, 2.0 Generic and 1.0 Generic license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-2.5,2.0,1.0#PWM%203L.gif
You may select the license of your choice.
Category:Self-published work

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/

Gifsicle script

gifsicle --delay=32 --loop --optimize  *.gif > PWM_3L.gif
Category:Images with Gnuplot source code Category:Chronograms Category:Amplifier diagrams Category:Animations of vibrations and waves Category:Control theory Category:Pulse width modulation Category:Class D amplifiers Category:GIF animations assembled with gifsicle Category:Animated GIF files
Category:Amplifier diagrams Category:Animated GIF files Category:Animations of vibrations and waves Category:CC-BY-SA-2.5,2.0,1.0 Category:CC-BY-SA-3.0-migrated Category:Chronograms Category:Class D amplifiers Category:Control theory Category:GFDL Category:GIF animations assembled with gifsicle Category:Images with Gnuplot source code Category:License migration redundant Category:Pulse width modulation Category:Self-published work