| 1 |
.PS |
| 2 |
# slddiagsDPV.m4 |
| 3 |
cct_init(svg_font(sans-serif,10bp__)) |
| 4 |
include(libSLD.m4) |
| 5 |
|
| 6 |
Pic1: [ |
| 7 |
define(`TrDeltaWye', |
| 8 |
`sl_transformer(down_ elen_ `$1',type=S) |
| 9 |
{ Deltasymbol(at last [].M1); Ysymbol(at 2nd last [].M2,,D) } ') |
| 10 |
|
| 11 |
T: dot |
| 12 |
switch(up_ elen_); {"Public supply" above} |
| 13 |
Bus1: sl_busbar(right_ 5*dimen_,6,port=D) with .c at T |
| 14 |
{"svg_small(20 kV)" at Bus1.Start above ljust} |
| 15 |
S1: switch(from Bus1.P1-(0,elen_) up_ elen_) |
| 16 |
S2: switch(from Bus1.P2-(0,elen_) up_ elen_) |
| 17 |
TRF1: TrDeltaWye(from Bus1.P3); arrow down_ dimen_/3 |
| 18 |
TRF2: TrDeltaWye(from Bus1.P4); arrow down_ dimen_/3 |
| 19 |
TRF3: TrDeltaWye(from Bus1.P5); arrow down_ dimen_/3 |
| 20 |
S3: switch(from Bus1.P6-(0,elen_) up_ elen_) |
| 21 |
Bus2: sl_busbar(right_ 1.5*dimen_,3,port=D) with .c at Bus1.P1+(0,-dimen_*3) |
| 22 |
{"svg_small(20 kV)" at Bus2.Start above ljust} |
| 23 |
{"svg_small(1.25 MVA)" at Bus2.P2 below} |
| 24 |
S4: switch(from Bus2.P2 to S1.start) |
| 25 |
TRF4: TrDeltaWye(from Bus2.P1) |
| 26 |
S4: switch(from Bus2.P3+(0,-elen_) to Bus2.P3) |
| 27 |
] |
| 28 |
|
| 29 |
Pic2: [ |
| 30 |
# https://tex.stackexchange.com/questions/597643/draw-a-power-system-network |
| 31 |
B1: sl_busbar(up_ dimen_*4/3,3) |
| 32 |
sl_transformer(right_ 2*dimen_ from last [].P2, |
| 33 |
type=S;body=shaded "lightgray"); variable(,,,dimen_*3/2) |
| 34 |
B2: sl_busbar(up_ dimen_*4/3,3) |
| 35 |
{ line left_ dimen_/2 from B2.P1 |
| 36 |
C1: capacitor(down_ dimen_/2); ground(,T) } |
| 37 |
line right_ dimen_/2 |
| 38 |
{ line to (Here,C1.start); C2: capacitor(to (Here,C1.end)); ground(,T) } |
| 39 |
ebox(right_ 3.5*dimen_, 2.5*dimen_, dimen_/5, 0.75) |
| 40 |
{ line to (Here,C1.start); C3: capacitor(to (Here,C1.end)); ground(,T) } |
| 41 |
line right_ dimen_/2 |
| 42 |
B3: sl_busbar(up_ dimen_*4.5,6) |
| 43 |
line right_ dimen_*3/4 from B3.P1; box wid dimen_*3 ht dimen_*.6 \ |
| 44 |
shaded "Goldenrod" "Static Load" |
| 45 |
line right_ dimen_*3/4 from B3.P2; box wid dimen_*3 ht dimen_*.6 \ |
| 46 |
shaded rgbstring(0.99*0.8, 0.74*0.8, 0.71*0.8) "Electronic Load" |
| 47 |
sl_disk(right_ dimen_ from B3.P3, |
| 48 |
text="A/C";circle=shaded ```rgbstring(.2,.8,.2)''';diam=dimen_*3/4) |
| 49 |
sl_disk(right_ dimen_ from B3.P4, |
| 50 |
text="M";circle=shaded ```rgbstring(.21,.47,.86)''';diam=dimen_*3/4) |
| 51 |
sl_disk(right_ dimen_ from B3.P5, |
| 52 |
text="M";circle=shaded ```rgbstring(.2,.6,.8)''';diam=dimen_*3/4) |
| 53 |
sl_disk(right_ dimen_ from B3.P6, |
| 54 |
text="M";circle=shaded ```rgbstring(.2,.63,.8)''';diam=dimen_*3/4) |
| 55 |
sl_disk(left_ dimen_ from 1/2 between B3.P1 and B3.P2, |
| 56 |
text="svg_small(DER_A)";\ |
| 57 |
circle=shaded ```rgbstring(0.78,0.36,0.3)''';diam=dimen_*3/4) |
| 58 |
] with .nw at last [].sw + (100bp__,120bp__) |
| 59 |
|
| 60 |
Pic3: [ |
| 61 |
define(`shadedb',`shaded "CornflowerBlue"') |
| 62 |
Loopover_(`LR', # loop to take advantage of symmetry |
| 63 |
`define(`opposite',`ifelse(LR,left,right,left)')dnl |
| 64 |
ifelse(LR,left,L,R)`'side: [ |
| 65 |
sl_generator(LR dimen_/2,type=B;name=G1;circle=shadedb,box=shadedb) |
| 66 |
T1: sl_transformer(opposite dimen_*3/2) |
| 67 |
Bus1: sl_busbar(up_ dimen_*3/2,3,) with .P2 at Here |
| 68 |
Br1: sl_breaker(from Bus1.P3 opposite elen_,box=shadedb) |
| 69 |
line opposite dimen_ |
| 70 |
Br2: sl_breaker(from Bus1.P1 opposite elen_,box=shadedb) |
| 71 |
Br3: sl_breaker(down_ dimen_,box=shadedb) |
| 72 |
Bus2: sl_busbar(opposite dimen_,3) with .P2 at Here |
| 73 |
T2: sl_transformer(down_ dimen_ from Bus2.P2,name=X2) |
| 74 |
sl_disk(down_ dimen_/2,type=B;text="SM";name=SM1;circle=shadedb,box=shadedb) |
| 75 |
ground(at last circle.s,dimen_/2) |
| 76 |
]', |
| 77 |
left,right) |
| 78 |
"Bus 1" at Lside.Bus1.top above |
| 79 |
"Bus 2" at Rside.Bus1.top above |
| 80 |
"Bus 3" at Lside.Bus2.w above |
| 81 |
"Bus 4" at Rside.Bus2.e above |
| 82 |
"TL`'svg_sub(1) 50 km 69 kV" at 1/2 between Lside.Br1 and Rside.Br1 above |
| 83 |
"TL`'svg_sub(2) 30 km" ljust "69 kV" ljust at Lside.Br2.end + (-18bp__,12bp__) |
| 84 |
"TL`'svg_sub(2) 20 km" ljust "69 kV" ljust at Rside.Br2.end + (-18bp__,12bp__) |
| 85 |
"G`'svg_sub(1) 50 MVA" ljust "13.8 kV" ljust at Lside.G1.w+(0,-28bp__) |
| 86 |
"G`'svg_sub(2) 30 MVA" ljust "13.8 kV" ljust at Rside.G1.w+(0,-28bp__) |
| 87 |
"T`'svg_sub(1) 50 MVA" ljust "13.8/69 kV svg_Delta/Y" ljust \ |
| 88 |
at Lside.T1.start+(0,-37bp__) |
| 89 |
"T`'svg_sub(2) 30 MVA" ljust "69/13.8 kV Y/svg_Delta" ljust \ |
| 90 |
at Rside.T1.end+(5bp__,-33bp__) |
| 91 |
"T`'svg_sub(3) 50 MVA" rjust "13.8/69 kV Y/svg_Delta" rjust \ |
| 92 |
at Lside.X2.w+(-4bp__,0) |
| 93 |
"T`'svg_sub(4) 20 MVA" ljust "69/6.9 kV Y/svg_Delta" ljust \ |
| 94 |
at Rside.X2.e+(4bp__,0) |
| 95 |
"SM`'svg_sub(1) 30 MVA" rjust "13.8 kV" rjust at Lside.SM1.w+(-4bp__,0) |
| 96 |
"SM`'svg_sub(2) 20 MVA" ljust "6.9 kV" ljust at Rside.SM1.e+( 4bp__,0) |
| 97 |
] with .nw at (Pic1.w,last [].sw + (0,-15bp__)) |
| 98 |
|
| 99 |
command "</g>" |
| 100 |
.PE |