| 1 |
.PS |
| 2 |
# EEP.m4 |
| 3 |
cct_init |
| 4 |
include(libSLD.m4) |
| 5 |
|
| 6 |
command "{\sf" |
| 7 |
|
| 8 |
Pic1: [ |
| 9 |
T: dot |
| 10 |
switch(up_ elen_); {"Public supply" above} |
| 11 |
Bus1: sl_busbar(right_ 5*dimen_,6,port=D) with .c at T |
| 12 |
{"{\scriptsize 20$\,$kV}" at Bus1.Start above ljust} |
| 13 |
S1: switch(from Bus1.P1-(0,elen_) up_ elen_) |
| 14 |
S2: switch(from Bus1.P2-(0,elen_) up_ elen_) |
| 15 |
TRF1: sl_transformer(from Bus1.P3 down_ elen_,type=S,,,Delta,Y) |
| 16 |
arrow down_ dimen_/3 |
| 17 |
TRF2: sl_transformer(from Bus1.P4 down_ elen_,type=S,,,Delta,Y) |
| 18 |
arrow down_ dimen_/3 |
| 19 |
TRF3: sl_transformer(from Bus1.P5 down_ elen_,type=S,,,Delta,Y) |
| 20 |
arrow down_ dimen_/3 |
| 21 |
S3: switch(from Bus1.P6-(0,elen_) up_ elen_) |
| 22 |
Bus2: sl_busbar(right_ 1.5*dimen_,3,port=D) with .c at Bus1.P1+(0,-dimen_*3) |
| 23 |
{"{\scriptsize 20$\,$kV}" at Bus2.Start above ljust} |
| 24 |
{"{\scriptsize 1.25$\,$MVA}" at Bus2.P2 below} |
| 25 |
S4: switch(from Bus2.P2 to S1.start) |
| 26 |
TRF4: sl_transformer(from Bus2.P1 down_ elen_,type=S,,,Delta,Y) |
| 27 |
S4: switch(from Bus2.P3+(0,-elen_) to Bus2.P3) |
| 28 |
] |
| 29 |
|
| 30 |
command "\definecolor{cornflowerblue}{rgb}{0.39, 0.58, 0.93}" |
| 31 |
command "\definecolor{goldenrod}{rgb}{0.85, 0.65, 0.13}" |
| 32 |
command "\definecolor{colorA}{rgb}{0.79, 0.59, 0.57}" |
| 33 |
command "\definecolor{colorB}{rgb}{0.2, 0.8, 0.2}" |
| 34 |
command "\definecolor{colorC}{rgb}{0.21, 0.47, 0.86}" |
| 35 |
command "\definecolor{colorD}{rgb}{0.2, 0.6, 0.8}" |
| 36 |
command "\definecolor{colorE}{rgb}{0.2, 0.63, 0.8}" |
| 37 |
command "\definecolor{colorF}{rgb}{0.78, 0.36, 0.3}" |
| 38 |
Pic2: [ |
| 39 |
# https://tex.stackexchange.com/questions/597643/draw-a-power-system-network |
| 40 |
B1: sl_busbar(up_ dimen_*4/3,3) |
| 41 |
sl_transformer(right_ 2*dimen_ from last [].P2, |
| 42 |
type=S;body=shaded "lightgray"); variable(,,,dimen_*3/2) |
| 43 |
B2: sl_busbar(up_ dimen_*4/3,3) |
| 44 |
{ line left_ dimen_/2 from B2.P1 |
| 45 |
C1: capacitor(down_ dimen_/2); ground(,T) } |
| 46 |
line right_ dimen_/2 |
| 47 |
{ line to (Here,C1.start); C2: capacitor(to (Here,C1.end)); ground(,T) } |
| 48 |
ebox(right_ 3.5*dimen_, 2.5*dimen_, dimen_/5, 0.75) |
| 49 |
{ line to (Here,C1.start); C3: capacitor(to (Here,C1.end)); ground(,T) } |
| 50 |
line right_ dimen_/2 |
| 51 |
B3: sl_busbar(up_ dimen_*4.5,6) |
| 52 |
line right_ dimen_*3/4 from B3.P1; box wid dimen_*3 ht dimen_*.6 \ |
| 53 |
shaded "goldenrod" "Static Load" |
| 54 |
line right_ dimen_*3/4 from B3.P2; box wid dimen_*3 ht dimen_*.6 \ |
| 55 |
shaded "colorA" "Electronic Load" |
| 56 |
sl_disk(right_ dimen_ from B3.P3, |
| 57 |
text="A/C";circle=shaded "colorB";diam=dimen_*3/4) |
| 58 |
sl_disk(right_ dimen_ from B3.P4, |
| 59 |
text="M";circle=shaded "colorC";diam=dimen_*3/4) |
| 60 |
sl_disk(right_ dimen_ from B3.P5, |
| 61 |
text="M";circle=shaded "colorD";diam=dimen_*3/4) |
| 62 |
sl_disk(right_ dimen_ from B3.P6, |
| 63 |
text="M";circle=shaded "colorE";diam=dimen_*3/4) |
| 64 |
sl_disk(left_ dimen_ from 1/2 between B3.P1 and B3.P2, |
| 65 |
text="\scriptsize DER\_A"; circle=shaded "colorF";diam=dimen_*3/4) |
| 66 |
] with .B1 at Pic1.Bus2.End+(24bp__,0) |
| 67 |
|
| 68 |
Pic3: [ |
| 69 |
define(`shadedb',shaded "cornflowerblue") |
| 70 |
Loopover_(`LR', # loop to take advantage of symmetry |
| 71 |
`define(`opposite',`ifelse(LR,left,right,left)')dnl |
| 72 |
ifelse(LR,left,L,R)`'side: [ |
| 73 |
sl_generator(LR dimen_/2,type=B;name=G1;circle=shadedb,box=shadedb) |
| 74 |
{ move from G1 opposite last circle.rad*3/2 down_ last circle.rad |
| 75 |
ifelse(LR,left,`Delta',`Wye')symbol(,size=sourcerad_*2/3) } |
| 76 |
T1: sl_transformer(opposite dimen_*3/2,name=Tx) |
| 77 |
Bus1: sl_busbar(up_ dimen_*3/2,3,) with .P2 at Here |
| 78 |
Br1: sl_breaker(from Bus1.P3 opposite elen_,box=shadedb) |
| 79 |
line opposite dimen_*4/3 |
| 80 |
Br2: sl_breaker(from Bus1.P1 opposite elen_,box=shadedb) |
| 81 |
Br3: sl_breaker(down_ dimen_,box=shadedb) |
| 82 |
Bus2: sl_busbar(opposite dimen_,3) with .P2 at Here |
| 83 |
T2: sl_transformer(down_ dimen_ from Bus2.P2,name=X2) |
| 84 |
sl_disk(down_ dimen_/2,type=B;text="SM";name=SM1;circle=shadedb,box=shadedb) |
| 85 |
{ move from last circle opposite sourcerad_*3 |
| 86 |
Wyesymbol(,type=G`'ifelse(LR,right,L);size=sourcerad_*2/3) } |
| 87 |
]', |
| 88 |
left,right) |
| 89 |
"Bus 1" at Lside.Bus1.top above |
| 90 |
"Bus 2" at Rside.Bus1.top above |
| 91 |
"Bus 3" at Lside.Bus2.w above |
| 92 |
"Bus 4" at Rside.Bus2.e above |
| 93 |
"TL$_1$ 50$\,$km 69$\,$kV" at 1/2 between Lside.Br1 and Rside.Br1 above |
| 94 |
"TL$_2$ 30$\,$km" ljust "69$\,$kV" ljust at Lside.Br2.end + (-18bp__,12bp__) |
| 95 |
"TL$_3$ 20$\,$km" ljust "69$\,$kV" ljust at Rside.Br2.end + (-18bp__,12bp__) |
| 96 |
"G$_1$ 50$\,$MVA" ljust "13.8$\,$kV" ljust at Lside.G1.w+(-25bp__,-32bp__) |
| 97 |
"G$_2$ 30$\,$MVA" ljust "13.8$\,$kV" ljust at Rside.G1.w+(10bp__,-28bp__) |
| 98 |
"T$_1$ 50$\,$MVA" "13.8/69$\,$kV $\Delta$/Y" \ |
| 99 |
at Lside.Tx.s+(-2bp__,-25bp__) below |
| 100 |
"T$_2$ 30$\,$MVA" "69/13.8$\,$kV Y/$\Delta$" \ |
| 101 |
at Rside.Tx.s+(2bp__,-27bp__) below |
| 102 |
"T$_3$ 50$\,$MVA" rjust "13.8/69$\,$kV Y/$\Delta$" rjust \ |
| 103 |
at Lside.X2.w+(-4bp__,0) |
| 104 |
"T$_4$ 20$\,$MVA" ljust "69/6.9$\,$kV Y/$\Delta$" ljust \ |
| 105 |
at Rside.X2.e+(4bp__,0) |
| 106 |
"SM$_1$ 30$\,$MVA" rjust "13.8$\,$kV" rjust at Lside.SM1.w+(-4bp__,0) |
| 107 |
"SM$_2$ 20$\,$MVA" ljust "6.9$\,$kV" ljust at Rside.SM1.e+( 4bp__,0) |
| 108 |
] with .nw at (Pic1.w,last [].sw + (0,-15bp__)) |
| 109 |
|
| 110 |
command "}%" |
| 111 |
|
| 112 |
.PE |