n System, Energy Procedia 79 (2015), 917-923 [20] N.Rugthaicharoencheep, S.Nedphograw, W.Wanaratwijit, Distribution system operation for power loss minimization and improved voltage profile with distributed generation and capacitor placements, 2011DRPT, China, 2011 [21] Y M Atwa, E F El-Saadany, M M A Salama, and R Seethapathy, Optimal Renewable Resources Mix for Distribution systems Energy Loss Minimization, IEEE Tran on Power Sytems, Vol.25, No.1, 2010 [22] Solutions for power factor correction at medium voltage, CIRCUTOR, S.A 2013 76 77 PHỤ LỤC PL1 Thơng số ví dụ * Thơng số tải Nút tải 10 11 12 13 14 15 16 Pi.0, kW 240 348 384 192 432 360 360 192 264 174 192 552 264 672 312 Tổng Qi.0, kVAr Nút tải 192 17 288 18 300 19 156 20 372 21 360 22 360 23 144 24 192 25 132 26 162 27 522 28 216 29 552 30 240 31 12,810 Pi.0, kW Qi.0,kVAr 432 384 588 528 228 168 348 264 228 168 468 408 468 420 504 420 264 240 792 630 672 630 432 372 504 444 360 240 660 564 10,040 * Thông số đường dây Nút ij 1.2 2.3 3.4 4.5 5.6 6.7 7.8 8.9 9.10 10.11 11.12 12.13 13.14 14.15 15.16 16.17 Sij*,t , MVA 26 26 26 26 26 10 10 10 10 10 10 8 8 Rij, 0.15 0.31 0.08 0.23 0.69 1.89 0.46 0.63 0.50 0.84 1.26 1.07 0.83 1.12 1.84 0.95 Xij, 0.38 0.75 0.19 0.57 1.70 1.84 0.45 0.61 0.49 0.82 1.22 0.75 0.59 0.79 1.30 0.67 Nút ij 17.18 2.19 19.20 20.21 21.22 3.23 23.24 24.25 6.26 26.27 27.28 28.29 29.30 30.31 31.32 32.33 Sij*,t , MVA 8 8 8 8 10 10 10 10 8 8 Rij, 2.37 1.78 1.18 1.48 1.18 1.60 1.18 1.48 1.18 1.39 1.47 1.89 1.18 2.07 2.37 2.13 Xij, 1.67 1.25 0.84 1.05 0.84 1.13 0.84 1.05 1.14 1.35 1.43 1.84 0.84 1.46 1.67 1.50 77 78 PL2 Chƣơng trình tính ngơn ngữ lập trình GAMS OPTION LIMROW = 30; OPTION LIMCOL = 30; Option ITERLIM = 50000; Option Solprint = Off; Option Sysout = Off; Option Reslim = 5000000; OPTION OPTCA = 5.35; OPTION OPTCR = 5.35; Option decimals = 2; ******* KHAI BAO MANG DU LIEU VA DU LIEU DAU VAO********** set i So nut /1*40/; alias (i,j); set t Thoi gian tinh toan /1*3/; set h So gio /1*24/; set s mua nam /1*4/; set n so bien tuong ung cong suat roi rac cua Tu /1*12/; Set Gen(i) Nut nguon /1/ Load(i) Nut tai /2*40/ cp(i) Nut dau tu Tu /1*40/ Head1 Bang du lieu duong day /Rf, Xf, Chf, sf/ Head2 Bang du lieu nguon /Pmin, Pmax, Qmin, Qmax/ Head3 Bang du lieu tai /PD0, QD0/ Head4 Bang cong suat gioi han TBA /Ss0/ Head5 Bang cong suat gioi han duong day /Sf0/ Head6 Bang du lieu CP /Qmin, Qmax/ Head10 mua nam /1*4/ ; Scalar phi/3.141592654/; Scalar SBase Cong suat co so MVA /1/; Scalar VBase Dien ap co so kV /35/; Scalar GFD He so phat trien cua phu tai /0.2/; TABLE Generat(Gen,Head2) Du lieu nguon Pmin Pmax Qmin Qmax ; Parameter PmxG(gen,t), PmnG(gen,t), QmxG(gen,t), QmnG(gen,t); PmxG(gen,t) = Generat(gen,"Pmax")/(SBase); 78 79 PmnG(gen,t) = Generat(gen,"Pmin")/(SBase); QmxG(gen,t) = Generat(gen,"Qmax")/(SBase); QmnG(gen,t) = Generat(gen,"Qmin")/(SBase); TABLE Generat1(cp,Head6) Du lieu CP ; Parameter QmxG1(cp,t), QmnG1(cp,t); QmxG1(cp,t) = 10*Generat1(cp,"Qmax")/(SBase); QmnG1(cp,t) = 1*Generat1(cp,"Qmin")/(SBase); TABLE Demand1(s,h,Head10) He so tai va xac suat ; Parameter kt(s,h); kt(s,h) = Demand1(s,h,"s1"); TABLE Demand(i, Head3) Cong suat phu tai PD0 QD0 ; Parameter PD(i,t), QD(i,t); PD(i,t)= 1.2*Demand(i,"PD0")*(1+GFD*(ord(t)-1))/(1000*SBase); QD(i,t)= 1.2*Demand(i,"QD0")*(1+GFD*(ord(t)-1))/(1000*SBase); Table LineData(i,j,head1) Rf Xf Chf sf ; LineData(j,i,head1) = LineData(i,j,head1) ; Parameter Se(i,j,t); Se(i,j,t) = LineData(i,j,"Sf"); Se(i,j,t) = Se(j,i,t); Parameter Re(i,j,t,head1), Xe(i,j,t,head1), Che(i,j,t,head1); Re(i,j,t,"Rf") = Linedata(i,j,"Rf")*(SBase/(VBase*VBase)) ; Xe(i,j,t,"Xf") = Linedata(i,j,"Xf")*(SBase/(VBase*VBase)) ; Che(i,j,t,"Chf")=Linedata(i,j,"Chf"); Re(j,i,t,"Rf")$(Re(i,j,t,"Rf") gt 0) = Re(i,j,t,"Rf") ; Xe(j,i,t,"Xf")$(Xe(i,j,t,"Xf") gt 0) = Xe(i,j,t,"Xf") ; Che(j,i,t,"Chf")$(Che(i,j,t,"Chf") gt 0) = Che(i,j,t,"Chf") ; Parameter Z(i,j,t), GG(i,j,t), BB(i,j,t); Z(i,j,t) = (Re(i,j,t,"Rf")*Re(i,j,t,"Rf")) + (Xe(i,j,t,"Xf")*Xe(i,j,t,"Xf")) ; GG(i,j,t)$(z(i,j,t) ne 0.00) = Re(i,j,t,"Rf")/Z(i,j,t) ; BB(i,j,t)$(z(i,j,t) ne 0.00) = -Xe(i,j,t,"Xf")/Z(i,j,t); Parameter YCL(i,t); YCL(i,t) = sum(j, Che(i,j,t,"Chf")); 79 80 Parameter G(i,j,t) , B(i,j,t) ; B(i,i,t) = sum(j,BB(i,j,t)); G(i,i,t) = sum(j,GG(i,j,t)); G(i,j,t)$(ord(i) ne ord(j)) = -GG(i,j,t); B(i,j,t)$(ord(i) ne ord(j)) = -BB(i,j,t); Parameter Y(i,j,t); Y(i,j,t) = sqrt(G(i,j,t)*G(i,j,t) + B(i,j,t)*B(i,j,t)); Parameter ZI(i,j,t); ZI(i,j,t)$(G(i,j,t) ne 0.00) = abs(B(i,j,t))/abs(G(i,j,t)) ; Parameter theta(i,j,t); theta(i,j,t) = arctan(ZI(i,j,t)); theta(i,j,t)$((b(i,j,t) eq 0) and (g(i,j,t) gt 0)) = 0.0 ; theta(i,j,t)$((b(i,j,t) eq 0) and (g(i,j,t) lt 0)) = phi ; theta(i,j,t)$((b(i,j,t) gt 0) and (g(i,j,t) gt 0)) = theta(i,j,t) ; theta(i,j,t)$((b(i,j,t) lt 0) and (g(i,j,t) gt 0)) = 2*phi - theta(i,j,t) ; theta(i,j,t)$((b(i,j,t) gt 0) and (g(i,j,t) lt 0)) = phi - theta(i,j,t); theta(i,j,t)$((b(i,j,t) lt 0) and (g(i,j,t) lt 0)) = phi + theta(i,j,t); theta(i,j,t)$((b(i,j,t) gt 0) and (g(i,j,t) eq 0)) = 0.5*phi; theta(i,j,t)$((b(i,j,t) lt 0) and (g(i,j,t) eq 0)) = -0.5*phi; theta(i,j,t)$((b(i,j,t) eq 0) and (g(i,j,t) eq 0)) = 0.0 ; Parameter G(i,j,t); G(i,j,t) = -Y(i,j,t)*cos(Theta(i,j,t)); *********** KHAI BAO CAC BIEN VA XAP XI DAU ***************** VARIABLES V(i,t,s,h) Dien ap nut Delta(i,t,s,h) Goc pha dien ap nut P(i,t,s,h) Cong suat TD nhan tu nguon Q(i,t,s,h) Cong suat PK nhan tu nguon QG(i,t) Cong suat PK Tu QG1(i,t) Cong suat PK Tu1 Loss U(n,i,t) ; Tong ton that Bien nhi phan Positive variable P, Q, QG; Binary variable U; Parameter VLevel(Gen) /1 1.1/; V.l(i,t,s,h) = 1.0; V.Fx(Gen,t,s,h) = VLevel(Gen); Delta.l(i,t,s,h) = 0.0; Delta.fx("1",t,s,h) = 0.0; 80 81 ************** HAM MUC TIEU VA RANG BUOC ******************* Equations CostEq Equn1(i,t,s,h) Equn2(i,t,s,h) Equn3(i,t) Equn4(cp) Equn5(i,j,t) Equn6(i,t) ; ************** HAM MUC TIEU ************** CostEq Loss =e= (365/2)*0.5*Sum((i,j,t,s,h),G(i,j,t)*(V(i,t,s,h)*V(i,t,s,h) + V(j,t,s,h)*V(j,t,s,h) 2*V(i,t,s,h)*V(j,t,s,h)*cos(Delta(j,t,s,h)-Delta(i,t,s,h))) + QG(i,t)*0.0002)*Sbase*1000; ************** CAN BANG CONG SUAT NUT ************** Equn1(i,t,s,h)$(ord(i) gt 1) -QG(i,t)*0.0002- PD(i,t)*kt(s,h) =e= Sum(j, Y(i,j,t)*V(i,t,s,h)*V(j,t,s,h)*Cos(theta(i,j,t)+Delta(j,t,s,h) Delta(i,t,s,h))); Equn2(i,t,s,h)$(ord(i) gt 1) (QG(i,t-4)+QG(i,t-3)+QG(i,t-2)+QG(i,t-1)+QG(i,t))QD(i,t)*kt(s,h) =e= -Sum(j, Y(i,j,t)*V(i,t,s,h)*V(j,t,s,h)*Sin(theta(i,j,t)+Delta(j,t,s,h) Delta(i,t,s,h))); ************** RANG BUOC NANG CAP THIET BI ************** Equn2(i,t)$(ord(t) gt 0) QG(i,t) =e= (0.05*U("12",i,t)+0.1*U("11",i,t)+0.15*U("10",i,t)+0.21*U("9",i,t)+0 24*U("8",i,t)+0.3*U("7",i,t) +0.33*U("6",i,t)+0.39*U("5",i,t)+0.42*U("4",i,t)+0.45*U("3",i,t) +0.5*U("2",i,t)+0.55*U("1",i,t) ); Equn3(cp) sum((n,t),U(n,cp,t)) =l= 1; Equn4 sum((n,cp,t),U(n,cp,t)) =l= 5; Equn5(i,j,t)$(ord(i) lt ord(j)) (Smax((s,h),abs(Sbase*V(i,t,s,h)*Y(i,j,t)*(V(j,t,s,h)-V(i,t,s,h)))))=l= Se(i,j,t); Equn6(i,t)$(ord(t) gt 0) QG1(i,t) =e= QG1(i,t-1)+QG(i,t); ********************** GIOI HAN CAC BIEN ********************** QG.Up(cp,t) = 1*QmxG1(cp,t); QG.Lo(cp,t) = 1*QmnG1(cp,t); 81 82 ***************** RANG BUOC DIEN AP NUT ********************** V.Up(load,t,s,h) = 1.05; V.Lo(load,t,s,h) = 0.9; ******************* GOI SLOVER TINH TOAN ********************** Option MINLP=BONMIN; Model OPF /all/; Solve OPF using MINLP Minimizing Loss; ************ TINH TOAN THONG SO VA HIEN THI ****************** Display Loss.l, V.l; 82 ...77 PHỤ LỤC PL1 Thơng số ví dụ * Thông số tải Nút tải 10 11 12 13 14 15 16 Pi.0, kW 240 348 384 192 432 360 360 192 264 174 192 552 264 672 312 Tổng Qi.0, kVAr Nút tải 192 17 288 18