%!PS % Gonzo PS Powerpoint emulation example: Three Phase Magic Sinewaves % ========================================== % by Don Lancaster % Copyright c 2002 by Don Lancaster & Synergetics, Box 809, Thatcher, AZ, 85552 % (928) 428-4073 Email: don@tinaja.com Website: http://www.tinaja.com % Consulting services available http://www.tinaja.com/info01.html % Linking welcome. Reposting expressly forbidden. % All commercial rights and all electronic media rights ~fully~ reserved. % Linking usually welcome. Reposting expressly forbidden. Version 1.1 % Shows how most PowerPoint functions can be created from raw PostScript % with significant speed, size, appearance, and web distribution advantages. % To use, modify features and content as desired, resave as a standard ASCII % textfile to a new name and send to Acrobat Distiller to generate a PDF file. % IMPORTANT NOTE: Don Lancaster's file gonzo.ps is required for this program. % After obvious location mods, uncomment ONE of the following two lines: (C:\\Documents and Settings\\don\\Desktop\\gonzo\\gonzo.ps) run % use internal gonzo % (A:\\gonzo.ps) run % use external gonzo % NOTE THAT ALL PS FILENAME STRINGS !!!DEMAND!!! DOUBLE REVERSE SLASHES. % GONZO20A Guru Gonzo PostScript power tools (Interim release) % Includes gonzo justification and layout utilities. % Copyright c 1990, 1996, 2001 by Don Lancaster and Synergetics, Box 809, % Thatcher Arizona, 5552 (928) 428-4073 don@tinaja.com support % via http://www.tinaja.com All commercial rights and all electronic % media rights **FULLY** reserved. Reposting is expressly forbidden. /guru { gonzo begin ps.util.1 begin printerror nuisance begin} def % guru % activate gonzo utilities %%%%%%%%%%% links menu directory %%%%%%%%%%%% % This code locks pdfmark commands out of a PostScript printer. /pdfmark where {pop}{userdict /pdfmark /cleartomark load put} ifelse % /surl "start url" marks the beginning of a text sequence to be urled. % It also paints the text blue... /surl {mark /blue cvx 0.33 /setgray cvx % change text to blue /currentpoint cvx % remember box start /urly /exch cvx /store cvx /urlx /exch cvx /store cvx ] cvx % complete deferred command printlist exch 3 index exch put % stuff into gonzo printlist exch 1 add exch % increment gonzo list count } def /su {font3 surl} def % shorthand % /eurl "end url" unmarks the end of a text sequence and sets up % the pdfmark needed to define the Acrobat web link. /eurl {mark % start deferred proc exch % position url string % /black cvx 0 /setgray cvx % turn blue marker off % maintextcolor /setrgbcolor cvx % reset to main text color??? /aqua cvx /black cvx /makeurl cvx % defer call of url builder ] cvx % complete deferred proc printlist exch 3 index exch % stuff into gonzo printlist put exch 1 add exch % increment gonzo list count } def % /makeurl generates the pdfmark, receiving a {(urlstring) makeurl}. % Note that it is not called until formatted printlist time... /urlover 0.2 def % fraction of hot area over bounds /makeurl { /cururlname exch store % save the url string mark % start pdfmark currentfont /ScaleMatrix get 3 get /fsize exch store % guess height /Rect [ urlx fsize urlover mul sub % set box left x urly fsize urlover mul sub % set box left y currentpoint exch fsize urlover mul add exch fsize add ] /Border [ 0 0 0] % [0 0 0 ] = none; [0 0 2] = debug /Color [ .7 0 0 ] /Action <> /Subtype /Link /ANN % annotation type pdfmark % call pdf operators } def % /makeurlx generates the box specific pdfmark, receiving % a {(urlstring) makeurl}. % Note that it is not called until formatted printlist time... /makeurlx { /cururlnamex exch store % save the url string mark % start pdfmark /Rect [ xpos % set box left x ypos 0.9 sub % set box left y xpos 2.8 add % box right x ypos 0.9 sub 2.8 add % box right y ] /Border [ 0 0 0] % [0 0 0 ] = none; [0 0 2] = debug /Color [ .7 0 0 ] /Action <> /Subtype /Link /ANN % annotation type pdfmark % call pdf operators } def % dictionary method << %zzzzz /msintro1 (http://www.tinaja.com/glib/msintro1.pdf) /makepat (http://www.tinaja.com/psutils/deltapat.psl) /makepatdemo (http://www.tinaja.com/psutils/deltapat.pdf) /mindist1 (http://www.tinaja.com/glib/mindist1.pdf) /magsn01 (http://www.tinaja.com/magsn01.asp) /msinprop (http://www.tinaja.com/glib/msinprop.pdf) /info01 (http://www.tinaja.com/info01.asp) /homepage (http://www.tinaja.com) /maildon (mailto:don@tinaja.com) >> {mark exch /eurl cvx ] cvx def} forall % color emphasis /tinton1 {mark 0.25 0.25 0.25 /setrgbcolor cvx] cvx printlist exch 3 index exch put exch 1 add exch} def /tinton1a {mark 0.5 /settint cvx 0.33 /setgray cvx] cvx printlist exch 3 index exch put exch 1 add exch} def /tinton1r {mark 0 /settint cvx 0.33 /setgray cvx] cvx printlist exch 3 index exch put exch 1 add exch} def /tintoff {mark 0 /setgray cvx] cvx printlist exch 3 index exch put exch 1 add exch} def /to {tinton1 font3} store % tinton emphasis /tx {tintoff font1} store % tintoff /staytint {0.25 0.25 0.25 setrgbcolor} store % grayout /staytint1r {0 settint 0.25 setgray} store % red /staytint1a {0.5 settint 0.33 setgray} store % aqua %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% parameter dictionary %%%%%% /slideshowdict << % this dictionary determines the slide sequence /sequence [ /three_phase_magic_sinewaves /the_issue /delta_friendly_features /why_three_phase_power /delta_friendly_switching /eight_allowable_switch_states /produce_these_current_patterns /to_always_force_a_zero_average! /the_key_delta_friendly_rule /this_works /so_does_this /leading_to_our_delta_design_rules /delta_friendly_synthesis_starts /with_a_goal_of /ferinstance /continue_synthesis_with_wrap_map /wrap_map_guidelines /write_the_tracking_equations /then_write_the_main_equations /equation_solution /for_additional_help /this_has_been % /an_introduction_to_magic_sinewaves % /magic_sinewaves_are %/magic_sinewave_features %/and_limitations %/magic_sinewave_appearance %/working_in_quadrants %/typical_unfiltered_spectrum %/typical_unfiltered_spectrum_FLASH %/magic_sinewave_generation %/note_that %/two_important_magsine_types %/key_magsine_secret_I %/key_magsine_secret_II % /key_magsine_secret_III %/fourier_pulse_properties %/the_magic_equations %/equation_simplification %/amplitude_adjustment % /quantization %/clocking_frequencies %/how_big_should_n_be %/for_additional_help %/this_has_been ] /gridsize 10 store % default layout grid size = 10 /slidewide 44 % total display width in grid units /slidehigh 33 % total display height /borderwide 2.5 % width of white vertical edges /borderhigh 2.5 % width of white horizontal edges /includeborder false % provide white border? /normalbackground /burpbackmain % name of main background proc /introbackground /burpbackintro % name of intro background proc /fontsused /burpfonts % name of font set used /patstrings /burppatstrings % name of patterns used /titx 6 % x grid position of title /tity 28.75 % y grid position of title /bodx 6 % x grid position of body /body 24 % y grid position of body /ivoryrndcolor [230 230 205 40] % random pattern colors [red blue green variance ] /magentarndcolor [230 100 230 120] /magentaaccent [0.65 0.05 0.65 ] % title accent slash color [red blue green] % temp accent /ivoryrndcolor [227 219 199 40] % random pattern colors [red blue green variance ] /magentarndcolor [232 136 30 120] /magentaaccent [255 256 div 128 256 div 0 256 div ] % title accent slash color [red blue green] >> def slideshowdict begin % open slide show dictionary %%%%%%%%%%%%%%%%% style catalogs %%%%%%%%%%%%%%%%%% % burp is a mottled gray body with random magenta splotch and stripe /burpfonts { /cstretch 0.010 store /sstretch 0.010 store /kern 0.1 store /font0 /StoneSans-Bold 1.8 gonzofont % body titles /font1 /StoneSerif 1.35 gonzofont % normal body /font2 /StoneSerif-Bold 1.20 gonzofont % boxed subseries /font3 /StoneSerif-Bold 1.35 gonzofont % bold body /font4 /StoneSerif-Bold 1.25 gonzofont % smaller font3 for numerals /font5 /StoneSerif-Bold 1.85 gonzofont % oversize for math /font6 /StoneSans-Bold 2.8 gonzofont % titleslide oversize /font8 /StoneSerif-Bold 1 gonzofont % fine print copyright /font9 /ZapfDingbats 1.05 gonzofont % black boxes /font: /StoneSerif-Bold [2 0 0 2 0 -.5] gonzofont % special math * /font; /StoneSerif-Bold [1.4 0 0 1.4 0 .9] gonzofont % fake degrees * /titlefont {font0 }store % define title font /bodyfont {font1} store % defint body font /bodysubfont {font2}store % define bodysubfont /bodytxwide {/txtwide 35.5 store}store /bodyyinc {/yinc 2 store} store } store /burpbackmain { includeborder {borderwide 10 mul borderhigh 10 mul}{0 0} ifelse gridsize setgrid % set grid scale save /snap1 exch store % show the body background bodypatdict matrix % Identity matrix makepattern % Instantiate the pattern /bodypat exch def 0 0 % for the actual slide size slidewide slidehigh /Pattern setcolorspace bodypat setcolor rectfill % Fill rectangle with pattern snap1 restore save /snap1 exch store % show the accent accentpatdict matrix % Identity matrix makepattern % Instantiate the pattern /accentpat exch def 0 slidehigh 13.5 sub % splotch size 4.5 13.5 /Pattern setcolorspace accentpat setcolor rectfill % Fill rectangle with pattern snap1 restore % black outline black line1 0 0 slidewide slidehigh 0.0 setgray rectstroke % Stroke original black outline % accent lines gsave magentaaccent aload pop setrgbcolor 0.7 setlinewidth 1 setlinecap 2 27.5 mt slidewide 4.5 sub r 0 setlinecap 0 27.5 mt 3 r 0.45 setlinewidth 1 setlinecap slidewide 13 sub 2.5 mt 12 r slidewide 2.5 mt 0 setlinecap 2 l grestore fontsused cvx exec % set fonts for normal slide by name } store /burpbackintro { includeborder {borderwide 10 mul borderhigh 10 mul}{0 0} ifelse gridsize setgrid % set grid scale save /snap1 exch store % show the body background bodypatdict matrix % Identity matrix makepattern % Instantiate the pattern /bodypat exch def 0 0 % for the actual slide size slidewide slidehigh /Pattern setcolorspace bodypat setcolor rectfill % Fill rectangle with pattern snap1 restore save /snap1 exch store % show the accent accentpatdict matrix % Identity matrix makepattern % Instantiate the pattern /accentpat exch def 5.5 16.5 33 12 /Pattern setcolorspace accentpat setcolor rectfill % Fill rectangle with pattern snap1 restore % black outline black line1 0 0 slidewide slidehigh 0.0 setgray rectstroke % Stroke original black outline % accent lines gsave magentaaccent aload pop setrgbcolor 0.35 setlinewidth 1 setlinecap 1 setlinejoin 5.5 16.5 0.8 sub mt 13.6 pu -.8 -.8 rlineto 34.6 pr -.8 .8 rlineto 13.6 pd .8 .8 rlineto 34.6 pl closepath stroke 0.35 setlinewidth 1 setlinecap 1 setlinejoin 0 3 mt 12 pr 1.4 pu 20 pr 2.8 pd 20 pl 1.4 pu 1.4 pd 20 pr 1.4 pu 12 pr stroke grestore fontsused cvx exec % set fonts for normal slide by name } store /burppatstrings { ivoryrndcolor buildpixels makeimagestring /bodypatstring exch store magentarndcolor buildpixels makeimagestring /accentpatstring exch store } store %%%%%%%%%%%%%%% pattern utilities %%%%%%%%%%%%%%%%%% /DeviceRGB setcolorspace % pick color model /hpixels 50 store % size of pattern image /vpixels 50 store /issize hpixels vpixels mul store % makestring converts a stack top array into a string... /makestring {dup length string dup /NullEncode filter 3 -1 roll {1 index exch write} forall pop} def % /buildpixels makes three nearby colors given [r b g texture] all 0-255 integers /buildpixels {aload pop /texture exch store /b0 exch store /g0 exch store /r0 exch store 123 srand /r1 r0 texture random texture 2 div sub add cvi dup 255 ge {pop 255}if dup 0 lt {pop 0} if store /g1 g0 texture random texture 2 div sub add cvi dup 255 ge {pop 255}if dup 0 lt {pop 0} if store /b1 b0 texture random texture 2 div sub add cvi dup 255 ge {pop 255}if dup 0 lt {pop 0} if store /r2 r0 texture random texture 2 div sub add cvi dup 255 ge {pop 255}if dup 0 lt {pop 0} if store /g2 g0 texture random texture 2 div sub add cvi dup 255 ge {pop 255}if dup 0 lt {pop 0} if store /b2 b0 texture random texture 2 div sub add cvi dup 255 ge {pop 255}if dup 0 lt {pop 0} if store /r3 r0 texture random texture 2 div sub add cvi dup 255 ge {pop 255}if dup 0 lt {pop 0} if store /g3 g0 texture random texture 2 div sub add cvi dup 255 ge {pop 255}if dup 0 lt {pop 0} if store /b3 b0 texture random texture 2 div sub add cvi dup 255 ge {pop 255}if dup 0 lt {pop 0} if store } store % /makeimagestring creates a sting usable for a pattern image /makeimagestring { 12345 srand % make repeatable /iarray mark issize { r1 g1 b1} repeat ] store % fill all with color 1 issize 2 div cvi { iarray issize % fill half with color 2 random 3 mul cvi [ r2 g2 b2 ] putinterval} repeat issize 2 div cvi { iarray issize % fill third with color 3 random 3 mul cvi [ r3 g3 b3 ] putinterval} repeat iarray makestring } store % /rndimage shows the random string as a patternable image /bodyrandimage { gsave 5 dup scale << % start image dicationary /ImageType 1 % always one /Width hpixels % width in pixels /Height vpixels % height in pixels /ImageMatrix [hpixels 0 0 vpixels neg 0 vpixels ] /DataSource bodypatstring % proc to get string data /BitsPerComponent 8 % color resolution /Decode [0 1 0 1 0 1] % per red book 4.10 >> image % call the image grestore } def /accentrandimage { gsave 5 dup scale << % start image dicationary /ImageType 1 % always one /Width hpixels % width in pixels /Height vpixels % height in pixels /ImageMatrix [hpixels 0 0 vpixels neg 0 vpixels ] /DataSource accentpatstring % proc to get string data /BitsPerComponent 8 % color resolution /Decode [0 1 0 1 0 1] % per red book 4.10 >> image % call the image grestore } def % using a separate pattern dictionary for each pattern... /bodypatdict << /PatternType 1 % Tiling pattern /PaintType 1 % Colored /TilingType 1 /BBox [0 0 50 50] /XStep 5 /YStep 5 /PaintProc { begin bodyrandimage end} >> store /accentpatdict << /PatternType 1 % Tiling pattern /PaintType 1 % Colored /TilingType 1 /BBox [0 0 50 50] /XStep 5 /YStep 5 /PaintProc { begin accentrandimage end} >> store % /makepatternstrings generates the needed patterns /makepatternstrings { [230 210 190 80] buildpixels makeimagestring /accentpatstring exch store [230 100 230 120] buildpixels makeimagestring /bodypatstring exch store } store %%%%%%%% end pattern utils %%%%%%%% %%%%%%% service utilities %%%%% /makeslideshow {setupshow sequence { save /snapxx exch store cvx exec showpage snapxx restore} forall } store /settitle { titlefont gsave 0.25 0.25 0.25 setrgbcolor titx exch tity exch cl grestore} store /setbody { bodyfont bodytxwide bodyyinc bodx exch body exch cl} store % /setupshow first locks out pdfmark from a printer, then sets % the page mode. /setupshow { /pdfmark where {pop}{userdict /pdfmark /cleartomark load put} ifelse [/CropBox [0 0 slidewide includeborder {borderwide 2 mul add} if gridsize mul slidehigh includeborder {borderhigh 2 mul add} if gridsize mul ] % set the wierd size /PAGES pdfmark [ {Catalog} << /ViewerPreferences << /FitWindow true /CenterWindow true >> /PageLayout /SinglePage % no rolling /Pagemode /FullScreen % fullscreen if not on web /View [/XYZ null null 1 ] % force 100% >> /PUT pdfmark % then makes background pattern strings ONCE for later access patstrings cvx exec % get patterns from style area } def %%%%%% background generators %%%%%%%% /setbackground { normalbackground cvx exec } store % link selected background /settitlebackground { introbackground cvx exec } store %%%%%%% individual slide data %%%%%%%% /three_phase_magic_sinewaves { settitlebackground 1 1 1 setrgbcolor /yinc 3 store slidewide 2 div 23 (|6Three Phase|j|j\nMagic Sinewaves|j|j) cc 0.25 0.25 0.25 setrgbcolor /yinc 2 store slidewide 2 div 11 (|3By Don Lancaster \nand Synergetics) cc slidewide 2 div 2.65 (|4 |/su http://www.tinaja.com|/homepage |j|j|j) cc } store /the_issue { setbackground (The Issue\274) settitle /tabs [4 0 0 ]store (|/su Magic Sinewaves|1|/msintro1 offer maximized efficiency with minimized low harmonics for emerging power electronics applications. Per these |/su tutorials|1|/magsn01 . |h But ordinary magic sinewaves are not three phase compatible because they would need extra drivers, equipment rewiring, and have other restrictions. |h Fortunately, a special class of |/tinton1a |3Delta Friendly|/tx magic sinewaves can instead be generated that can end up fully three phase compatible. ) setbody } store /delta_friendly_features { setbackground (Delta Friendly Features\274) settitle /tabs [2 4 0 0 ]store % norm is 2.5 or 4 /stretchyinc {/txtwide 400 store} store (|h|/staytint |/stretchyinc |t|9n|4 Fully three-phase compatible. |h |t|9n|4 Lengths of n|j=|j12, 28, 44, 60, 76,|j\274 available. |h |t|9n|4 Zero out the first (|j3n|j/|j4|j) + 1 harmonics. |h |t|9n|4 Table lookup storage only |/tinton1a one-half|/tx |3|/to of usual. |h |t|9n|4 Analysis and design is faster. ) setbody } store /why_three_phase_power { setbackground (Why Three Phase Power?) settitle /tabs [ 4 0 0 ]store % norm is 2.5 or 4 /stretchyinc {/txtwide 400 store} store (|h|/staytint |/stretchyinc |t|9n|4 Power flow is continuous. |h |t|9n|4 Motors start and reverse easier. |h |t|9n|4 Less noise and vibration. |h |t|9n|4 Smaller wiring sizes. |h |t|9n|4 Better use of copper and iron. ) setbody } store /delta_friendly_switching { setbackground (Delta Friendly Switching\274) settitle ( ) setbody /bigdot {gsave 1.5 dup scale dot grestore} store /unad { currentpoint /yy exch store /xx exch store 2.5 pr 1 pu 4 pr 2 pd 4 pl 1 pu 1 pd 4 pr 1 pu 2.5 r gsave 0.50 settint xx 2.5 add yy 1 add moveto 4 pr 2 pd 4 pl closepath gsave 0.9 setgray fill grestore 0.33 setgray line3 stroke grestore } store /maketriad {gsave translate line3 0 0 mt -60 rotate unad bigdot -120 rotate unad bigdot -120 rotate unad bigdot grestore} store /spst {gsave translate line3 0 setlinecap 0 setlinejoin 0.2 setlinewidth 0 0.33 0.33 setrgbcolor 0 0 mt 2 1 rlineto stroke black 0 0 mt circ1 2 -1 mt circ1 2 1 mt circ1 grestore} def /spst- {gsave translate -1 -1 scale 0 0 spst grestore} store /ground {1 setlinecap -.4 0 rmoveto 0.8 0 rlineto -.65 -0.25 rmoveto .5 0 rlineto -0.35 -0.25 rmoveto .2 0 rlineto stroke} def % for heavier than usual /lground {gsave -90 rotate ground grestore} store /genplot {gsave translate 1.3 dup scale % 33 13 showgrid % uncomment to view line3 black % 2.5 3 mt 1 l 1.5 d ground % 22.5 3 mt 1 r 1.5 d ground 5 1.2 mt 1.3 l lground 5 5.1 mt 1.3 l lground 5 9 mt 1.3 l lground 5 3.2 mt 2.5 l 7.8 u 2.5 r 5 7.1 mt 2.5 l bigdot 2.5 7.1 mt 2.5 l circ1 line3 16 10 mt 1.5 u 7.5 l 1.5 d 1.5 l 7 2.2 mt 1.5 r 2.7 d 12 r 2.5 u 11.3 2.2 mt 1.5 l 3.9 u 2.6 l 16 10 maketriad 7 2.2 spst- 7 6.1 spst- 7 10 spst- 0 0.33 0.33 setrgbcolor font4 -0.2 5.5 (+|jd|jc|j|j) cc 14 0.3 sub 5.7 (a) cc 18 0.3 add 5.7 (b) cc 16 1.9 (c) cc 0 settint 0.33 setgray 7 8.5 (x) cc 7 4.5 (y) cc 7 0.5 (z) cc grestore } store 9.5 8 genplot } store /eight_allowable_switch_states { setbackground (Eight Allowable Switch States\274) settitle ( ) setbody /genplot1 {gsave translate 1.18 dup scale 0.5 settint 0 -3.5 mt 16 pu 25 pr 16 pd closepath 0.9 setgray fill newpath 0 9.5 mt 3 pu 25 pr 3 pd closepath 0.6 setgray fill newpath % 0.54 settint % 7 -3.5 mt 13 pu 13 pr 13 pd closepath % 0.75 setgray fill newpath black % 33 13 showgrid % uncomment to view /yinc 1.5 store font4 1 10.25 (|3|/tinton1a z |j|jy |j|jx |h|2|/black |/staytint 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 ) cl { 21 10.25 (|3|/tinton1a sum |h|2|/black |/staytint zero! zero! zero! zero! zero! zero! zero! zero! ) cl } pop /font: /StoneSerif-Bold [0.8 0 0 0.8 0 .6] gonzofont % special math * { save /yinc 1.1 store 9 11.2 (|/tinton1a |3c|j= |j |/tinton1a |8a|j+|j240|:o|2) cc restore save /yinc 1.1 store 13.5 11.2 (|/tinton1a |3b|j= |j |/tinton1a |8a|j+|j120|:o|2) cc restore save /yinc 1.1 store 18 11.2 (|/tinton1a |3a|j= |j |/tinton1a |8a|j+|j0|:o|2) cc restore } pop { font2 9 11.5 ( |h|/black |/staytint |20 0 ccw ccw cw cw 0 0 ) cc 13.5 11.5 ( |h|/black |/staytint |20 cw 0 cw ccw 0 ccw 0 ) cc 18 11.5 ( |h|/black |/staytint |20 ccw cw 0 0 ccw cw 0 ) cc } pop grestore } store 9 9.5 genplot1 } store /produce_these_current_patterns { setbackground (Produce These Current Patterns\274) settitle ( ) setbody /genplot2 {gsave translate 1.18 dup scale 0.5 settint 0 -3.5 mt 16 pu 25 pr 16 pd closepath 0.9 setgray fill newpath 0 9.5 mt 3 pu 25 pr 3 pd closepath 0.6 setgray fill newpath 0.54 settint 7 -3.5 mt 13 pu 13 pr 13 pd closepath 0.75 setgray fill newpath black % 33 13 showgrid % uncomment to view /yinc 1.5 store font4 1 10.25 (|3|/tinton1a z |j|jy |j|jx |h|2|/black |/staytint 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 ) cl /font: /StoneSerif-Bold [0.8 0 0 0.8 0 .6] gonzofont % special math * save /yinc 1.1 store 9 11.2 (|/tinton1a |3c|j= |j |/tinton1a |8a|j+|j240|:o|2) cc restore save /yinc 1.1 store 13.5 11.2 (|/tinton1a |3b|j= |j |/tinton1a |8a|j+|j120|:o|2) cc restore save /yinc 1.1 store 18 11.2 (|/tinton1a |3a|j= |j |/tinton1a |8a|j+|j0|:o|2) cc restore font2 9 11.5 ( |h|/black |/staytint |20 0 ccw ccw cw cw 0 0 ) cc 13.5 11.5 ( |h|/black |/staytint |20 cw 0 cw ccw 0 ccw 0 ) cc 18 11.5 ( |h|/black |/staytint |20 ccw cw 0 0 ccw cw 0 ) cc grestore } store 9 9.5 genplot2 } store /to_always_force_a_zero_average! { setbackground (To ALWAYS force a zero average!) settitle ( ) setbody /genplot3 {gsave translate 1.18 dup scale 0.5 settint 0 -3.5 mt 16 pu 25 pr 16 pd closepath 0.9 setgray fill newpath 0 9.5 mt 3 pu 25 pr 3 pd closepath 0.6 setgray fill newpath 0.54 settint 7 -3.5 mt 13 pu 13 pr 13 pd closepath 0.75 setgray fill newpath black % 33 13 showgrid % uncomment to view /yinc 1.5 store font4 1 10.25 (|3|/tinton1a z |j|jy |j|jx |h|2|/black |/staytint 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 ) cl 21 10.25 (|3|/tinton1a sum |h|2|/black |/staytint zero! zero! zero! zero! zero! zero! zero! zero! ) cl /font: /StoneSerif-Bold [0.8 0 0 0.8 0 .6] gonzofont % special math * save /yinc 1.1 store 9 11.2 (|/tinton1a |3c|j= |j |/tinton1a |8a|j+|j240|:o|2) cc restore save /yinc 1.1 store 13.5 11.2 (|/tinton1a |3b|j= |j |/tinton1a |8a|j+|j120|:o|2) cc restore save /yinc 1.1 store 18 11.2 (|/tinton1a |3a|j= |j |/tinton1a |8a|j+|j0|:o|2) cc restore font2 9 11.5 ( |h|/black |/staytint |20 0 ccw ccw cw cw 0 0 ) cc 13.5 11.5 ( |h|/black |/staytint |20 cw 0 cw ccw 0 ccw 0 ) cc 18 11.5 ( |h|/black |/staytint |20 ccw cw 0 0 ccw cw 0 ) cc grestore } store 9 9.5 genplot3 } store /the_key_delta_friendly_rule { setbackground (The Key Delta Friendly Rule\274) settitle /upsome {/ypos ypos 0.6 add store} store /tabs [-2 0 0 ]store (Because of the permissible switching combinations\274 |h |j|j|/tinton1a |5All triad samples |h|/upsome |/tinton1a MUST sum to zero|j|j! |h |1Which leads to this strict rule\274 |h |/tinton1r |5NO TRIAD HARMONICS|j|j|j! |h |1Thus, delta friendly magic sinewaves |3|/tinton1a must|/tx |1have precisely |3|/tinton1a zero|/tx 3rd, 9th, 15th, 21st, \274 harmonics. ) setbody } store /to_always_force_a_zero_average! { setbackground (To ALWAYS force a zero average!) settitle ( ) setbody /genplot3 {gsave translate 1.18 dup scale 0.5 settint 0 -3.5 mt 16 pu 25 pr 16 pd closepath 0.9 setgray fill newpath 0 9.5 mt 3 pu 25 pr 3 pd closepath 0.6 setgray fill newpath 0.54 settint 7 -3.5 mt 13 pu 13 pr 13 pd closepath 0.75 setgray fill newpath black % 33 13 showgrid % uncomment to view /yinc 1.5 store font4 1 10.25 (|3|/tinton1a z |j|jy |j|jx |h|2|/black |/staytint 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 ) cl 21 10.25 (|3|/tinton1a sum |h|2|/black |/staytint zero! zero! zero! zero! zero! zero! zero! zero! ) cl /font: /StoneSerif-Bold [0.8 0 0 0.8 0 .6] gonzofont % special math * save /yinc 1.1 store 9 11.2 (|/tinton1a |3c|j= |j |/tinton1a |8a|j+|j240|:o|2) cc restore save /yinc 1.1 store 13.5 11.2 (|/tinton1a |3b|j= |j |/tinton1a |8a|j+|j120|:o|2) cc restore save /yinc 1.1 store 18 11.2 (|/tinton1a |3a|j= |j |/tinton1a |8a|j+|j0|:o|2) cc restore font2 9 11.5 ( |h|/black |/staytint |20 0 ccw ccw cw cw 0 0 ) cc 13.5 11.5 ( |h|/black |/staytint |20 cw 0 cw ccw 0 ccw 0 ) cc 18 11.5 ( |h|/black |/staytint |20 ccw cw 0 0 ccw cw 0 ) cc grestore } store 9 9.5 genplot3 } store /this_works { setbackground (This Works\274) settitle ( ) setbody /genplot3 {gsave translate 1 dup scale % 33 13 showgrid % uncomment to view 0 8 mt 1 setlinecap 1 setlinejoin 0 0.1 90 {/posn exch store posn 24 mul 90 div posn sin 8 mul 8 add lineto } for gsave 8 pd 0.5 settint 0.9 setgray fill grestore line3 0.33 setgray stroke 0 8 mt 1 setlinecap 1 setlinejoin 0 0.1 90 {/posn exch store posn 24 mul 90 div posn 3 mul sin 8 mul 8 add lineto } for gsave 8 pu 0.75 settint 0.9 setgray fill grestore line3 0.33 setgray stroke 0 setlinecap 1 setlinewidth 3.5 8 mt 8 u 3.5 16 add 8 mt 8 u black line3 0 8 mt 24 r [{0 7.6 mt 0.8 u} 1 25] xrpt black font8 24.8 15.6 (fundamental) cl 24.8 -0.3 (third harmonic) cl /yinc 1.2 store 8 5.5 (tracking pulses COMBINE for\nfundamental but CANCEL\nfor triad harmonics) cc font5 0 0.33 0.33 setrgbcolor -1.9 7.3 (|50|;o|5) cc 26.7 7.3 (90|;o|5) cc grestore } store 8 7 genplot3 } store /so_does_this { setbackground (So Does This\274) settitle ( ) setbody /genplot3 {gsave translate 1 dup scale % 33 13 showgrid % uncomment to view 0 8 mt 1 setlinecap 1 setlinejoin 0 0.1 90 {/posn exch store posn 24 mul 90 div posn sin 8 mul 8 add lineto } for gsave 8 pd 0.5 settint 0.9 setgray fill grestore line3 0.33 setgray stroke 0 8 mt 1 setlinecap 1 setlinejoin 0 0.1 90 {/posn exch store posn 24 mul 90 div posn 3 mul sin 8 mul 8 add lineto } for gsave 8 pu 0.75 settint 0.9 setgray fill grestore line3 0.33 setgray stroke 0 setlinecap 1 setlinewidth 16 3.5 sub 8 mt 8 u 3.5 16 add 8 mt 8 u black line3 0 8 mt 24 r [{0 7.6 mt 0.8 u} 1 25] xrpt black font8 24.8 15.6 (fundamental) cl 24.8 -0.3 (third harmonic) cl /yinc 1.2 store 8 5.5 (mirrored pulses COMBINE for\nfundamental but CANCEL\nfor triad harmonics) cc font5 0 0.33 0.33 setrgbcolor -1.9 7.3 (|50|;o|5) cc 26.7 7.3 (90|;o|5) cc grestore } store 8 7 genplot3 } store /the_key_delta_friendly_rule { setbackground (The Key Delta Friendly Rule\274) settitle /upsome {/ypos ypos 0.6 add store} store /tabs [-2 0 0 ]store (Because of the permissible switching combinations\274 |h |j|j|/tinton1a |5All triad samples |h|/upsome |/tinton1a MUST sum to zero|j|j! |h |1Which leads to this strict rule\274 |h |/tinton1r |5NO TRIAD HARMONICS|j|j|j! |h |1Thus, delta friendly magic sinewaves |3|/tinton1a must|/tx |1have precisely |3|/tinton1a zero|/tx 3rd, 9th, 15th, 21st, \274 harmonics. ) setbody } store /leading_to_our_delta_design_rules { setbackground (Leading to our Delta Design rules\274) settitle /adjtxt {/txtwide 30 store 2.5 0 translate} store /tabs [-1.8 0 0 ]store % 4 is normal (|/adjtxt |/staytint |t|9n|4|tIf there is ZERO energy in a narrow interval |/tinton1a x|/tx |/to |4 in the 60 to 90 degree region of the first quadrant, then there must also be ZERO energy in intervals |/tinton1a x|j-|j60|/tx |/to |4 and |/tinton1a 120|j-|jx|/tx |4. |h|/staytint |t|9n|4|tIf there is ONE energy in a narrow interval |/tinton1a x|/tx |/to |4 in the 60 to 90 degree region of the first quadrant, then there must also be ONE energy in EITHER interval |/tinton1a x|j-|j60|/tx |/to |4 OR in the interval |/tinton1a 120|j-|jx|/tx |/to |4. But not both. |h ) setbody } store /delta_friendly_synthesis_starts { setbackground (Delta Friendly Synthesis Starts\274) settitle /tabs [4 0 0 ]store /wider {/txtwide 400 store} store (|/wider |1\274 by picking a number |/tinton1a |3k|/tx |1 of |/tinton1a |3whole|1|/tx and |/tinton1a |3bounded|1|/tx pulses placed in the 60 to 90 degree quadrant interval\274 ) setbody /genplot3 {gsave translate 1 dup scale -.5 0.3 mt 12.8 pu 34.5 pr 12.8 pd closepath gsave 0.5 settint 0.9 setgray fill grestore newpath -.5 10.2 mt 3.1 pu 34.5 pr 3.1 pd closepath gsave 0.5 settint 0.7 setgray fill grestore newpath % 33 13 showgrid % uncomment to show font8 /yinc 1.2 store 2 12 (|8value of|j|j k |h 1 2 3 4 5 |h k) cc 9 12 (|8pulses|j|j per quadrant |h 3 7 11 15 19 |h (|j4k|j-|j1|j) ) cc 16 12 (|8edges|j|j per quadrant |h 6 14 22 30 38 |h 2|j(|j4k|j-|j1|j) ) cc 23 12 (pulses|j|j per cycle |j|jn |h 12 28 44 60 76 |h 4|j(|j4k|j-|j1|j) ) cc 30 12 (harmonics zeroed |h 10 22 34 46 58 |h (|j12k|j-|j2|j) = (|j3n|j/|j4|j)|j+|j1 ) cc grestore } store 6.5 6.7 genplot3 } store /with_a_goal_of { setbackground (With a Goal of\274) settitle /tabs [-1.3 0 0 ]store /downshift {/xpos xpos 3 add store /txtwide 30 store} store /adjtxt {/txtwide 30 store 2.5 0 translate} store (|1\274 creating |/tinton1a |3one|/tx equation for |/tinton1a |3each|/tx available first |1quadrant pulse edge. Specifically\274 |h|/downshift |/staytint |t|9n|4|t|/tinton1a One half|/tx |/to |4of the pulse edges get used as edge |/tinton1a tracking|/tx |/to |4for zero triad harmonics. |h |t|9n|4|t|/tinton1a One|/tx |/to |4pulse edge will set the amplitude. |h |t|9n|4|t|/tinton1a Remaining|/tx |/to |4pulse edges zero 5, 7, 11, 13, 17, 19, \274 non-triad odd harmonics. ) setbody } store /ferinstance { setbackground (Ferinstance\274) settitle (On a delta friendly |/to |4n=28|/tx Magic Sinewave, there are |/tinton1a |3fourteen|/tx first quadrant pulse edges. |h One edge sets the amplitude. Seven edges zero out all triad harmonics |/to |43|/tx , |/to |49|/tx , |/to |415|/tx , |/to |421|/tx , |/to |427|/tx \274 and will guarantee three phase compatibility through |/tinton1a |3edge tracking|/tx . |h Six edges zero harmonics |/to |45|/tx , |/to |47|/tx , |/to |411|/tx , |/to |413|/tx , |/to |417|/tx , & |/to |419|/tx . |h Harmonics |/to |423|/tx and |/to |425|/tx will end up fairly strong. ) setbody } store /continue_synthesis_with_wrap_map { setbackground (Continue Synthesis with Wrap Map\274) settitle /tabs [4 0 0 ]store /wider {/txtwide 400 store} store (Arrange your pulses into a |/tinton1a |3wrap map|/tx of |/to |4(2k-1)|/tx , |/to k|/tx , and |/to k|/tx pulses. The map |/tinton1a |3must|/tx obey the delta rules\274 ) setbody /genplot3 {gsave translate 0.8 dup scale 0.11 settint 0.33 setgray 24 18 showgrid % uncomment to show 0 1 1 setrgbcolor 0.5 settint gsave 0 12 translate line3 3 0 mt 5 pu 7 pr 5 pd gsave closepath 0.85 setgray fill grestore 0.33 setgray stroke 14 0 mt 5 pu 8 pr 5 pd gsave closepath 0.85 setgray fill grestore 0.33 setgray stroke grestore gsave 0 6 translate line3 3 0 mt 5 pu 6 pr 5 pd gsave closepath 0.85 setgray fill grestore 0.33 setgray stroke 15 0 mt 5 pu 5 pr 5 pd gsave closepath 0.85 setgray fill grestore 0.33 setgray stroke grestore gsave 0 0 translate line3 9 0 mt 5 pu 1 pr 5 pd gsave closepath 0.85 setgray fill grestore 0.33 setgray stroke 14 0 mt 5 pu 1 pr 5 pd gsave closepath 0.85 setgray fill grestore 0.33 setgray stroke 20 0 mt 5 pu 2 pr 5 pd gsave closepath 0.85 setgray fill grestore 0.33 setgray stroke grestore line3 black 0 0 mt 24 r 0 6 mt 24 r 0 12 mt 24 r font5 0 0.33 0.33 setrgbcolor -1.9 -0.45 (|50|;o|5) cc 26.7 -0.45 (30|;o|5) cc -2.1 -0.45 6 add (|560|;o|5) cc 26.7 -0.45 6 add (30|;o|5) cc -2.1 -0.45 12 add (|560|;o|5) cc 26.7 -0.45 12 add (90|;o|5) cc font4 2 12.3 (6s) cc 11 12.3 (6e) cc 13 12.3 (7s) cc 23 12.3 (7e) cc 2 6.3 (5e) cc 10 6.3 (5s) cc 14 6.3 (4e) cc 21 6.3 (4s) cc 8 0.3 (1s) cc 11 0.3 (1e) cc 13 0.3 (2s) cc 16 0.3 (2e) cc 19 0.3 (3s) cc 23 0.3 (3e) cc grestore } store 11 5.5 genplot3 } store /wrap_map_guidelines { setbackground (Wrap Map Guidelines\274) settitle /tabs [0 4 0 0 ]store % norm is 2.5 or 4 /stretchyinc {/txtwide 400 store} store (|h|/staytint |/stretchyinc |t|9n|2 Vertical positions MUST have ZERO or TWO pulses. |h |t|9n|2 The 60 to 30 interval INCREASES to the LEFT. |h |t|9n|2 Initially center k pulses in 60 to 90 interval. |h |t|9n|2 Left 60 to 30 pulse aligns LEFT. Rest CENTER. |h |t|9n|2 Left 0 to 30 pulse aligns RIGHT. Rest BY PAIRS. |h |t|9n|2 PAIRS of pulse edges must be perfectly aligned. ) setbody } store /write_the_tracking_equations { setbackground (Write the Tracking Equations\274) settitle /wider {/txtwidehold txtwide store /txtwide 400 store /yinc 1.75 store /ypos ypos 0.85 add store} store /tabs [8] store (|/tinton1a |3Pairs|1|/tx of pulse edges found from the wrap map must be locked together for tracking in order to eliminate all of the triad harmonics\274 |h|2|/staytint |tp1s = 60 - p5s |tp1e = p6e - 60 |tp2s = p7s - 60 |tp2e = 60 - p4e |tp3s = 60 - p4s |tp3e = p7e - 60 |tp5e = 120 - p6s ) setbody } store /then_write_the_main_equations { setbackground (Then Write the Full Equations\274) settitle /wider {/txtwidehold txtwide store /txtwide 400 store /yinc 1.75 store /ypos ypos 0.85 add store} store (Shown for a |/to |4"|jn|j=|j28|j"|/tx delta friendly Magic Sinewave. Because of edge locking, there will be only seven |/tinton1a |3independent|/tx equations in seven unknowns. Only |/tinton1a |3one-half|/tx of the normal storage is needed. |8|/wider |/staytint cos|j( 1*p1s )|j-|jcos|j(1* p1e )|j+|j\274|j+|jcos|j( 1*p7s )|j-|jcos|j( 1*p7e ) = ampl|j*|jpi/4 cos|j( 5*p1s )|j-|jcos|j( 5*p1e )|j+|j\274|j+|jcos|j( 5*p7s )|j-|jcos|j( 5*p7e ) = 0 cos|j( 7*p1s )|j-|jcos|j( 7*p1e )|j+|j\274|j+|jcos|j( 7*p7s )|j-|jcos|j( 3*p7e ) = 0 cos|j(11*p1s)|j-|jcos|j(11*p1e)|j+|j\274|j+|jcos|j(11*p7s)|j-|jcos|j(11*p7e)|j = 0 cos|j(13*p1s)|j-|jcos|j(13*p1e)|j+|j\274|j+|jcos|j(13*p7s)|j-|jcos|j(13*p7e)|j = 0 cos|j(17*p1s)|j-|jcos|j(17*p1e)|j+|j\274|j+|jcos|j(17*p7s)|j-|jcos|j(17*p7e)|j = 0 cos|j(19*p1s)|j-|jcos|j(19*p1e)|j+|j\274|j+|jcos|j(19*p7s)|j-|jcos|j(19*p7e)|j = 0 ) setbody } store /equation_solution { setbackground % modified from original for new calculators (Equation Solution\274) settitle (These equations can be elegantly solved by using |/su These JavaScript Calculators|1|/magsn01 , in a variation of |/to Newton's Method|/tx . |h A guess is made to get you near a trial solution. Additional passes are then made to significantly improve the previous result. |h The process rapidly converges to an exact desired amplitude and precise zero harmonics.) setbody } store /magic_sinewave_features { setbackground (Magic Sinewave Features\274) settitle /stretchyinc {/yinc 2.4 store} store /tabs [0 2.5 0 0 ]store (|h|/staytint |/stretchyinc |t|9n|4 Fewest switch events for highest efficiency. |t|9n|4 Any chosen number of low harmonics are |/tinton1r zero|/tx |4|j. |t|9n|4 All digital and highly low end micro friendly. |t|9n|4 As few as seven values stored per amplitude. |t|9n|4 Precise control of amplitude and frequency. |t|9n|4 Can be made fully three phase compatible. |t|9n|4 Half-bridge switching events for low loss. ) setbody } store /and_limitations { setbackground (And Limitations\274) settitle /stretchyinc {/yinc 2.6 store} store /tabs [0 2 0 0 ]store (|h|/staytint |/stretchyinc |t|9n|4 Generation must be precise. |t|9n|4 Some output filtering is required. |t|9n|4 Load matching is recommended. |t|9n|4 Wide speed range does not extend to dc. |t|9n|4 Best suited for low audio frequencies. |t|9n|4 First two uncontrolled harmonics are large. ) setbody } store /magic_sinewave_appearance { setbackground (Magic Sinewave Appearance \274) settitle ( ) setbody % figure only no text /p1s 11.086 store % best efficiency leans /p1e 12.913 store /p2s 22.211 store /p2e 25.788 store /p3s 33.416 store /p3e 38.583 store /p4s 44.733 store /p4e 51.266 store /p5s 56.192 store /p5e 63.807 store /p6s 67.819 store /p6e 76.180 store /p7s 79.628 store /p7e 88.371 store % redo as normal { /p1s 6.856 store /p1e 7.872 store /p2s 17.735 store /p2e 20.662 store /p3s 29.222 store /p3e 33.995 store /p4s 41.001 store /p4e 47.463 store /p5s 53.096 store /p5e 61.017 store /p6s 65.576 store /p6e 74.624 store /p7s 78.496 store /p7e 88.183 store } pop /hh {32 mul 90 div 0.78 mul } store /uu 12.5 store /posninc 90 7.5 div store /msinplot {gsave translate 0.5 0 0.5 setrgbcolor line1 gsave % [{0 12 moveto 0.8 u} posninc hh 8] xrpt grestore 0 0 mt p1s hh pr uu pu p1e p1s sub hh pr uu pd p2s p1e sub hh pr uu pu p2e p2s sub hh pr uu pd p3s p2e sub hh pr uu pu p3e p3s sub hh pr uu pd p4s p3e sub hh pr uu pu p4e p4s sub hh pr uu pd p5s p4e sub hh pr uu pu p5e p5s sub hh pr uu pd p6s p5e sub hh pr uu pu p6e p6s sub hh pr uu pd p7s p6e sub hh pr uu pu p7e p7s sub hh pr uu pd 90 p7e sub hh pr gsave 0 0.83 0.83 setrgbcolor fill grestore line3 1 setlinecap 1 setlinejoin 0 0.33 0.33 setrgbcolor stroke grestore} store /appcut { gsave translate % 25 15 showgrid % uncomment to view 0 0 msinplot font5 0 0.33 0.33 setrgbcolor 0 -2.7 (|50|;o|5) cc 25.45 -2.7 (90|;o|5) cc grestore } store 9.5 9 appcut } store /working_in_quadrants { setbackground (Working in Quadrants\274) settitle /tabs [4 0 0 ]store (Normally, only the first quadrant of a magic sinewave is generated. This is then mirrored or reflected to form the full sinewave. The first quadrant design benefits include\274 |h|/staytint |t|9n|4 No even harmonics. |t|9n|4 No odd cosine harmonics. |t|9n|4 No dc term. |t|9n|4 One quarter the data storage. |t|9n|4 Much faster analysis. ) setbody } store /typical_unfiltered_spectrum { setbackground (Typical Unfiltered Spectrum\274) settitle ( ) setbody /spectrumplot {gsave translate 0.87 dup scale % compress slightly % 33 13 showgrid % uncomment to view gsave [{0 0 mt 0.3 d} 2 19] xrpt grestore gsave line1 [{-0.4 3 mt 36.9 r} 3 5] yrpt grestore 36.5 0 mt 15 u 0 1 1 setrgbcolor 0 setlinecap line1 0.5 0 mt 15 pu 1 pr 15 pd gsave closepath fill grestore 0 0.33 0.33 setrgbcolor stroke 1 0 1 setrgbcolor 28.5 0 mt 2.5 pu 1 pr 2.5 pd gsave closepath fill grestore 0.33 0 0.33 setrgbcolor stroke 1 0 1 setrgbcolor 30.5 0 mt 3.4 pu 1 pr 3.4 pd gsave closepath fill grestore 0.33 0 0.33 setrgbcolor stroke 1 0 1 setrgbcolor 32.5 0 mt 0.3 pu 1 pr 0.3 pd gsave closepath fill grestore 0.33 0 0.33 setrgbcolor stroke 1 0 1 setrgbcolor 34.5 0 mt 0.5 pu 1 pr 0.5 pd gsave closepath fill grestore 0.33 0 0.33 setrgbcolor stroke black % /font1 /Helvetica 0.8 gonzofont font1 /yinc 2 store font8 gsave 1.6 -0.9 translate 90 rotate black 0 0 (fundamental 3 5 7 9 1|k1 1|k3 1|k5 1|k7 1|k9 2|k1 23 25 27 29 3|k1 33 35) cr grestore 15 -4 (HARMONIC NUMBER) cl -1 -0.3 (0.0) cr -1 2.7 (0.2) cr -1 5.7 (0.4) cr -1 8.7 (0.6) cr -1 11.7 (0.8) cr -1 14.7 (1.0) cr gsave -3.7 4.5 translate 90 rotate black 0 0 (AMPLITUDE) cl grestore black line3 0 0 mt -.5 0 mt 37 r 0 -.5 mt 16 u black 23 13.2 ((|jbest efficiency n|j=|j28|j)) cl % flashtext font3 1 0 0 setrgbcolor % 15 6.65 (All Intermediate\nHarmonics are ZERO|j!!!) cc grestore } store 10 10 spectrumplot } store /typical_unfiltered_spectrum_FLASH { setbackground (Typical Unfiltered Spectrum\274) settitle ( ) setbody /spectrumplot {gsave translate 0.87 dup scale % compress slightly % 33 13 showgrid % uncomment to view gsave [{0 0 mt 0.3 d} 2 19] xrpt grestore gsave line1 [{-0.4 3 mt 36.9 r} 3 5] yrpt grestore 36.5 0 mt 15 u 0 1 1 setrgbcolor 0 setlinecap line1 0.5 0 mt 15 pu 1 pr 15 pd gsave closepath fill grestore 0 0.33 0.33 setrgbcolor stroke 1 0 1 setrgbcolor 28.5 0 mt 2.5 pu 1 pr 2.5 pd gsave closepath fill grestore 0.33 0 0.33 setrgbcolor stroke 1 0 1 setrgbcolor 30.5 0 mt 3.4 pu 1 pr 3.4 pd gsave closepath fill grestore 0.33 0 0.33 setrgbcolor stroke 1 0 1 setrgbcolor 32.5 0 mt 0.3 pu 1 pr 0.3 pd gsave closepath fill grestore 0.33 0 0.33 setrgbcolor stroke 1 0 1 setrgbcolor 34.5 0 mt 0.5 pu 1 pr 0.5 pd gsave closepath fill grestore 0.33 0 0.33 setrgbcolor stroke black % /font1 /Helvetica 0.8 gonzofont font1 /yinc 2 store font8 gsave 1.6 -0.9 translate 90 rotate black 0 0 (fundamental 3 5 7 9 1|k1 1|k3 1|k5 1|k7 1|k9 2|k1 23 25 27 29 3|k1 33 35) cr grestore 15 -4 (HARMONIC NUMBER) cl -1 -0.3 (0.0) cr -1 2.7 (0.2) cr -1 5.7 (0.4) cr -1 8.7 (0.6) cr -1 11.7 (0.8) cr -1 14.7 (1.0) cr gsave -3.7 4.5 translate 90 rotate black 0 0 (AMPLITUDE) cl grestore black line3 0 0 mt -.5 0 mt 37 r 0 -.5 mt 16 u black 23 13.2 ((|jbest efficiency n|j=|j28|j)) cl % flashtext font3 1 0 0 setrgbcolor 15 6.65 (All Intermediate\nHarmonics are ZERO|j!!!) cc grestore } store 10 10 spectrumplot } store /magic_sinewave_generation { setbackground (Magic Sinewave Generation\274) settitle ( ) setbody /box3x5 {gsave /btxt exch store translate -2.5 -1.5 mt 3 pu 5 pr 3 pd closepath gsave 0.5 1 1 setrgbcolor fill grestore line3 0 0.33 0.33 setrgbcolor stroke font4 0 -0.4 btxt cc grestore} def /spst {gsave translate line3 0 setlinecap 0 setlinejoin 0.2 setlinewidth 0 0.33 0.33 setrgbcolor 0 0 mt 2 1 rlineto stroke black 0 0 mt circ1 2 -1 mt circ1 2 1 mt circ1 grestore} def /spst- {gsave translate -1 -1 scale 0 0 spst grestore} store /genplot {gsave translate 1.3 dup scale % 33 13 showgrid % uncomment to view line3 black /ground {1 setlinecap -.4 0 rmoveto 0.8 0 rlineto -.65 -0.25 rmoveto .5 0 rlineto -0.35 -0.25 rmoveto .2 0 rlineto stroke} def % for heavier than usual 11.5 4 mt 2 r 6.5 4 mt 2 l 18.5 4 mt 2 r 2.5 5 mt 1 l 3.5 u 22 r 3.5 d 1 l 12.5 8.5 mt dot 12.5 8.5 mt 1.5 u circ1 0 0.33 0.33 setrgbcolor font4 12.5 10.7 (+|jd|jc|j|j) cc black 2.5 3 mt 1 l 1.5 d ground 22.5 3 mt 1 r 1.5 d ground 20.5 4 spst 4.5 4 spst- 9 4 (Filter) box3x5 16 4 (Load) box3x5 grestore } store 7 8 genplot } store /note_that { setbackground (Note that\274) settitle /tabs [2.5 0 0 ]store % 4 is normal (The magic sinewave synthesis process |/tinton1r |3guarantees|1|/tx maximum low harmonic rejection for any given number of switching events. |h When compared to classic PWM\274 |h|/staytint |t|9n|4 There are far fewer switching events. |t|9n|4 Events are half bridge for lower loss. ) setbody } store /two_important_magsine_types { setbackground (Two Important MagSine Types\274) settitle /tabs [4 0 0 ]store % 4 is normal (|3|/tinton1a Best Efficiency: |h|2|/staytint |t|9n|4 Zeros out first n harmonics. |t|9n|4 n|j/|j2 values stored per amplitude. |t|9n|4 Single phase only. |h|/black |3|/tinton1a Delta Friendly: |h|2|/staytint |t|9n|4 Zeros first (|j3n|j/|j4|j) + 1 harmonics. |t|9n|4 n|j/|j4 values stored per amplitude. |t|9n|4 Fully three phase compatible. ) setbody } store /key_magsine_secret_I { setbackground (The Key MagSine Secret (|j|jI|j|j)|j\274) settitle (By way of an esoteric math transform\274 |h \274Each quadrant pulse edge (indirectly) performs |/tinton1r |3one|/tx useful task. Thus providing you the maximum possible efficiency by minimizing switch events. ) setbody /biarrow {gsave translate 0 0 mt 1 2 rlineto 1 pd 2 pr 1 pu 1 -2 rlineto -1 -2 rlineto 1 pu 2 pl 1 pd closepath 0.83 0 0.83 setrgbcolor fill grestore} store /pulsecut { gsave translate % 15 15 showgrid 0 .55 .55 setrgbcolor 0.5 setlinewidth 1 setlinecap 0 0 mt 3 pr 7.8 pu 6 pr 7.8 pd 3 r 1 4 biarrow 7 4 biarrow grestore } store 14.5 14 pulsecut } store /key_magsine_secret_II { setbackground (Key MagSine Secret (|j|jII|j|j)|j\274) settitle ( |/to ( Example #1 )|/tx |h On a “best efficiency” 28 Magic Sinewave, there are |/to fourteen|/tx first quadrant pulse edges. |h One edge sets the amplitude. Thirteen edges zero out harmonics |/to |43|/tx , |/to |45|/tx , |/to |47|/tx , |/to |49|/tx , |/to |411|/tx , |/to |413|/tx , |/to |415|/tx , |/to |417|/tx , |/to |419|/tx , |/to |421|/tx , |/to |423|/tx , |/to |425|/tx , and |/to |427|/tx . |h|1 Unfiltered harmonics |/to |429|/tx and |/to |431|/tx will be fairly strong, but always will be less than the fundamental. ) setbody } store /key_magsine_secret_III { setbackground (The Key MagSine Secret (|j|jIII|j|j)|j\274) settitle ( |/to ( Example #2 )|/tx |h On a “delta friendly” 28 Magic Sinewave, there are |/to fourteen|/tx first quadrant pulse edges. |h One edge sets the amplitude. Seven edges zero out all triad harmonics |/to |43|/tx , |/to |49|/tx , |/to |415|/tx , |/to |421|/tx , |/to |427|/tx \274 and will guarantee three phase compatibility through |/to edge tracking|/tx . |h Six edges zero harmonics |/to |45|/tx , |/to |47|/tx , |/to |411|/tx , |/to |413|/tx , |/to |417|/tx , & |/to |419|/tx . Harmonics |/to |423|/tx and |/to |425|/tx will be fairly strong. ) setbody } store /fourier_pulse_properties { setbackground (Fourier Pulse Properties\274) settitle /tabs [-2 0 0 ]store (Given a unity height first quadrant pulse starting at angle |/to p1s|/tx and ending at an angle of |/to p1e|/tx , its fundamental amplitude contribution will be\274 |/tinton1a |t|5cos|j(1|:*|5p1s) - cos|j(1|:*|5p1e) = ampl|j|:*|5|jpi/4 |h |1And its harmonic |/to j|/tx contribution will be\274 |/tinton1a |t|5cos|j(j|:*|5p1s) - cos|j(j|:*|5p1e) = ampl|j|:*|5|jpi/4j ) setbody } store /the_magic_equations { setbackground (The Magic Equations\274) settitle /wider {/txtwide 400 store /yinc 1.75 store /ypos ypos 0.5 add store} store ((|jshown for best efficiency Magic Sinewave |/to |4"|jn|j=|j20|j"|/tx |j) |8|/wider |/staytint1a cos|j( 1*p1s )|j-|jcos|j(1* p1e )|j+|j\274|j+|jcos|j( 1*p5s )|j-|jcos|j( 1*p5e ) = ampl|j*|jpi/4 cos|j( 3*p1s )|j-|jcos|j( 3*p1e )|j+|j\274|j+|jcos|j( 3*p5s )|j-|jcos|j( 3*p5e ) = 0 cos|j( 5*p1s )|j-|jcos|j( 5*p1e )|j+|j\274|j+|jcos|j( 5*p5s )|j-|jcos|j( 5*p5e ) = 0 cos|j( 7*p1s )|j-|jcos|j( 7*p1e )|j+|j\274|j+|jcos|j( 7*p5s )|j-|jcos|j( 3*p5e ) = 0 cos|j( 9*p1s )|j-|jcos|j( 9*p1e )|j+|j\274|j+|jcos|j( 9*p5s )|j-|jcos|j( 3*p5e ) = 0 cos|j(11*p1s)|j-|jcos|j(11*p1e)|j+|j\274|j+|jcos|j(11*p5s)|j-|jcos|j(11*p5e)|j = 0 cos|j(13*p1s)|j-|jcos|j(13*p1e)|j+|j\274|j+|jcos|j(13*p5s)|j-|jcos|j(13*p5e)|j = 0 cos|j(15*p1s)|j-|jcos|j(15*p1e)|j+|j\274|j+|jcos|j(15*p5s)|j-|jcos|j(15*p5e)|j = 0 cos|j(17*p1s)|j-|jcos|j(17*p1e)|j+|j\274|j+|jcos|j(17*p5s)|j-|jcos|j(17*p5e)|j = 0 cos|j(19*p1s)|j-|jcos|j(19*p1e)|j+|j\274|j+|jcos|j(19*p5s)|j-|jcos|j(19*p5e)|j = 0 ) setbody } store /equation_simplification { setbackground (Equation Simplification\274) settitle (These equations can be dramatically simplified by noting that trig multi-angles are really one common form of |/to Chebycheff polynominal|/tx . |h A most interesting property of many Chebycheff polynominals is that when they are really good at something, they are often the best possible. |h Thus driving the Cheby to the Levy.) setbody } store /equation_solution_xxxx { setbackground (Equation Solution\274) settitle (These equations are elegantly solved by using |/to Newton's Method|/tx , aka "shake the box". |h A guess is made to get you near the solution. A pulse edge is then moved |/to slightly|/tx to see if the distortion gets better or worse. |h The process repeats for all pulse edges till you get as close to a chosen solution as you want to.) setbody } store /amplitude_adjustment { setbackground (Amplitude Adjustment\274) settitle (When a zero harmonic magic sinewave solution is found, the final amplitude may not be exact. |h This is corrected by asking for a slightly larger or a slightly smaller amplitude. |h For instance, if you want |/to |4.400|/tx and get |/to |4.396|/tx , ask for |/to |4.404|/tx instead. Convergence is often rapid.) setbody } store /quantization { setbackground (Quantization\274) settitle /adjtxt {/txtwide txtwide 1 add store} store (Exact magic sinewave solutions require |/to extreme|/tx math accuracy. Quantization effects will raise the harmonics to low rather than zero values. |h |/adjtxt Very often, ten bits of timing info will give "acceptable" results, while twelve bits should yield "good" results. |h Some |/su "smoke and mirror" techniques"|1|/mindist1 may be needed to allow eight bit timing storage.) setbody } store /how_big_should_n_be { setbackground (How Big Should "n" Be?) settitle (For most uses most of the time, a best efficiency or delta friendly |/to n |k=|k |428|/tx will be optimum. This will zero up to |/to |428|/tx harmonics using as few as |/to seven|/tx values of table lookup storage per amplitude. |h Very large values of |/to "|jn|j"|/tx will require more switch events but allow very wide speed ranges, may reduce audio whine, greatly ease filtering, and still provide benefits over classic PWM. |h Zeroing |/to several thousand|/tx harmonics is possible|j!) setbody } store /clocking_frequencies { setbackground (Clocking Frequencies\274) settitle (Many events have to sequentially take place to properly generate a Magic Sinewave. The number and precision of the events sets the clocking rate. |h Typically, a |/to |44|3 MegaHertz|/tx clocking gives useful |/to |460|3 Hertz|/tx Magic Sinewaves. |h It is often best to separate the frequency setting from the actual Magic Sinewave generation.) setbody } store /for_additional_help { setbackground (For Additional Help\274) settitle /txtwide 400 store (|h Magic Sinewave |/to calculators|/tx and tutorial\274 |h |/su http://www.tinaja.com/magsn01.asp|1|/magsn01 |h Magic Sinewave |/to development|/tx proposal\274 |h |/su http://www.tinaja.com/glib/msinprop.pdf|1|/msinprop |h Magic Sinewave |/to seminars|/tx and consulting\274 |h |/su http://www.tinaja.com/info01.asp|1|/info01 ) setbody } store /newyinc {/yinc 1.25 store /xpos xpos 1 sub store} store /this_has_been { setbackground (This has been\274) settitle ( \274|j|ja presentation by Don Lancaster and |/to Synergetics|/tx , 3860 West First Street, Box 809, Thatcher, Arizona, 85552. (928) 428-4073. |h |/su mailto:don@tinaja.com|1|/maildon |h |h|/staytint1r |/newyinc |8Copyright c 2003 and earlier by Don Lancaster and Synergetics. Linking usually welcome. All media, web, and ALL other rights fully reserved. Mirroring or reposting is expressly forbidden.) setbody } store %%%%%%%%% main loop %%%%%%% makeslideshow % this does it all % EOF