Jump to content

File:Delta PWM.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file (SVG file, nominally 500 × 300 pixels, file size: 391 KB)

Render this image in .

Summary

Description

Principle of the delta Pulse Width Modulation (PWM).

Created using maxima code:
freq : 0.05;        /* frequency of the reference signal */
hysteresis : 0.15;  /* hysteresis of the delta pwm */
currentStep : 0.5;  /* rate of increase (or decrease) in the output current */
RefSinSignal(t) := sin(2*%pi*freq*t);
UpSineSignal(t) := RefSinSignal(t) + hysteresis;
LoSineSignal(t) := RefSinSignal(t) - hysteresis;
stepSize : 1e-2;    /* step size for calculations */
stepLim : ceiling(1/(freq*stepSize)); /* final step */
myX : makelist(k*stepSize,k,0,stepLim)$ /* X axis points of evaluation */
increasing : 1;     /* flag to identify if the current is increasing or decreasing */
currentY : [0]$     /* current signal (input to modulate) */
deltaSignal : [0]$  /* the delta-PWM signal (modulated) */
crossing : [0]$     /* rising and falling times of the PWM signal */
for j:1 thru stepLim do /* create the current waveform and its delta-PWM */
    block(
    if(increasing=1)
        then if(currentY[j]<=UpSineSignal(j*stepSize)) /* if current is increasing and below upper limit */
            then block(
                currentY : append(currentY,[currentY[j]+(currentStep*stepSize)]),
                deltaSignal : append(deltaSignal,[1]))
        else block(
            currentY : append(currentY,[currentY[j]-(currentStep*stepSize)]),
            deltaSignal : append(deltaSignal,[0]),
            crossing : append(crossing,[myX[j]]),
            increasing : 0)
    else
        if(currentY[j]>=LoSineSignal(j*stepSize)) /* if current is decreasing and above lower limit */
            then block(
                currentY : append(currentY,[currentY[j]-(currentStep*stepSize)]),
                deltaSignal : append(deltaSignal,[0]))
        else block(
            currentY : append(currentY,[currentY[j]+(currentStep*stepSize)]),
            deltaSignal : append(deltaSignal,[1]),
            crossing : append(crossing,[myX[j]]),
            increasing : 1)
    );
crossing : setify(crossing)$    /* convert list to set */
  /* Plot them */
load(draw);
topPlot : gr2d(points_joined=true,point_type=dot,
    line_width=2,ytics={-1,0,1},font="Times",
    ylabel="Analog signals",font_size=15,
    color=red,key="Reference",explicit(RefSinSignal(x),x,0,20),
    color=green,key="Limits",explicit(UpSineSignal(x),x,0,20),
    key="",explicit(LoSineSignal(x),x,0,20),
    color=blue,key="Output",points(myX,currentY),
    xtics=crossing,grid=true,
    user_preamble="set format x ""; set tmargin 0; 
        set bmargin 0; set xlabel "" 0,1.5",
    title=""
)$
lowPlot : gr2d(points_joined=true,point_type=dot,
    line_width=2,ytics={0,1},font="Times",title="",
    ylabel="Delta-PWM signal",xlabel="Time",
    color=magenta,points(myX,deltaSignal),
    xtics=crossing,grid=true,yrange=[-.25,1.25],
    user_preamble="set format x ""; set tmargin 0;
        set bmargin 1.5"
)$
draw(terminal=svg,file_name="Delta PWM",
    topPlot,lowPlot);
Date (UTC)
Source
Author
Other versions


This is a retouched picture, which means that it has been digitally altered from its original version. Modifications: recreated as vector graphic. The original can be viewed here: Delta PWM.png. Modifications made by Krishnavedala.

I, the copyright holder of this work, hereby publish it under the following licenses:
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.
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.
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.
You may select the license of your choice.

Original upload log

This image is a derivative work of the following images:

  • File:Delta_PWM.png licensed with Cc-by-sa-2.5,2.0,1.0, Cc-by-sa-3.0-migrated, GFDL
    • 2006-06-25T21:37:13Z CyrilB 1500x1050 (85868 Bytes) {{Information |Description=Principle of the delta Pulse Width Modulation (PWM) |Source=Own work, using gnuplot, python and scipy |Date=25/06/2006 |Author=Cyril BUTTAY |Permission=as licensed |other_versions= }}

Uploaded with derivativeFX

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

29 May 2011

image/svg+xml

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current12:05, 28 November 2022Thumbnail for version as of 12:05, 28 November 2022500 × 300 (391 KB)CepheidenFile uploaded using svgtranslate tool (https://svgtranslate.toolforge.org/). Added translation for de.
04:24, 29 May 2011Thumbnail for version as of 04:24, 29 May 2011500 × 300 (391 KB)Krishnavedalaimage dimensions
03:53, 29 May 2011Thumbnail for version as of 03:53, 29 May 2011600 × 500 (392 KB)Krishnavedala{{Information |Description=Principle of the delta Pulse Width Modulation (PWM). Created using maxima code: <source lang="gnuplot"> freq : 0.05; frequency of the reference signal: hysteresis : 0.15; /* hysteresis of t

The following 2 pages use this file:

Global file usage

The following other wikis use this file:

Metadata