You are on page 1of 30

[1-5] Microsoft Visual Studio .

NET

VAbase Vbase
()
VAs XR s
ZBs ( pu )
ZB s ( pu ) = (

XR s
VA
1
+ j1)
base
XRs
VAs
1 + XRs2

(1)

()
VAT RT (%) + jX T (%)
ZBT ( pu )
ZBT ( pu ) = (

RT (%) + jX T (%) VAbase


)
100(%)
VAT

(2)

()
Ru + jX u / kM L
PN ZBc ( pu )
ZBc ( pu ) = ( Ru + jX u )

VA
L
2base
1000 PN Vbase

(3)

()

Z M , pu XR M VAM

ZB M ( pu )
ZB M ( pu ) = (

VA
XR M
1
+ j1)
Z M , pu base
XR M
VAM
1 + XR M2

(4)

() 1 p Z b 1
p Z b 1

1 p 1 Z b

I p
V p I p Z b

V2
V
3
M Z bus ( orig )
=
Vn
L

0
V p 0

0
0
M

L 0 Z b

I2
I
3
M

In
L

I p

(5)

() 2 p Z b k
p Z b k 2
I p k V k I p Z kk V p V k
I p Z b

2 p k Z b

Vk ,new = Vk ( orig ) + I p Z kk
V p = Vk ( orig ) + I p ( Z kk + Z b )
= I 2 Z k 2 + I 3 Z k 3 + L + I n Z kn + I p ( Z kk + Z b )

V2
V
3
M
=
Vn
L

V p Z k 2

Z kk + Z b
0

Z bus ( orig )

Z k3

L Z kn

I2
I
3
M

In
L

I p

(6)

() 3 k Z b 1
k Z b 1 3
Z bus (orig )

3 k Z b 1

1 p Z b k p
V p (6)
V p

2 n n Z bus (orig )
Z b Z bus Z bus(new)
(n-1)(n-1)
Z i , j = Z i , j ( orig )

Z in Z nj

(7)

Z kk + Z b

(i, j = 2,3, LL , n)

() 4 j k Z b
j k Z b 4

4 j k Z b

4
V j = Z j 2 I 2 + LL + Z jj I j + Z jk I k LL + I b ( Z jj Z jk )

(8)

Vk = Z k 2 I 2 + LL + Z kj I j + Z kk I k + LL + I b ( Z kj Z kk )

(9)

Vk V j = I b Z b

(10)

(8)(10)
I b Z b + ( Z j 2 Z k 2 ) I 2 + LL + ( Z jj Z kj ) I j + LL

(11)

+ ( Z jk Z kk ) I k + LL + ( Z jj + Z kk 2Z jk ) I b = 0

Z bb
Z bb = Z b + Z jj + Z kk 2 Z jk

(12)

V2
M

V j

Z ( orig )
Vk =
M

Vn
L

L
0 ( Z j 2 Z k 2 )

( Z jk

Z 2 j Z 2k

Z jj Z jk

Z kj Z kk

Z nj Z nk

Z kk ) L
Z bb

I 2
M

I j

I k
M

I n


I b

(13)

n n Z bus (orig )

Z b Z bus Z bus(new) (n-1)(n-1)

Z i , j = Z i , j ( orig )

Z in Z nj
Z b + Z jj + Z kk 2 Z jk

(14)

(i, j = 2,3, LL , n)

Z bus
(Coupling)
Z bus :
Z ij = Z ji

(15)

i, j = 2,3,4, LL , n

i j

5 Z bus
5

5 Z bus :
() nb n
() Z bus
Z bus

() s t s t
1
() Z (ip) ip Z ij Z bus i j

()
1
ifo(i) ito(i)
brgpu(i) brgpu(i) nb
nbus Ybus
'
Public Sub bulid_zbus()
For i = 1 To nb
k = ifo(i)
kk = ito(i)
If brprotery(i) = 1 Then
rbus(k, k) = brrpu(i)
xbus(k, k) = brxpu(i)
ElseIf brprotery(i) = 2 Then
jj = kk - 1
For j = 1 To jj
rbus(kk, j) = rbus(k, j)
xbus(kk, j) = xbus(k, j)
rbus(j, kk) = rbus(kk, j)
xbus(j, kk) = xbus(kk, j)
Next j
rbus(kk, kk) = rbus(k, k) + brrpu(i)
xbus(kk, kk) = xbus(k, k) + brxpu(i)
ElseIf brprotery(i) = 3 Then
mm = nbus + 1
For j = 1 To nbus
rbus(mm, j) = rbus(k, j)
xbus(mm, j) = xbus(k, j)
rbus(j, mm) = rbus(mm, j)
xbus(j, mm) = xbus(mm, j)
Next j
rbus(mm, mm) = rbus(k, k) + brrpu(i)
xbus(mm, mm) = xbus(k, k) + brxpu(i)
For i1 = 1 To nbus
For j1 = 1 To nbus
r1 = rbus(i1, mm)
x1 = xbus(i1, mm)
r2 = rbus(mm, j1)
x2 = xbus(mm, j1)
6


Call cmpmult
r3 = rbus(mm, mm)
x3 = xbus(mm, mm)
Call cmpdiv
rbus(i1, j1) = rbus(i1, j1) - rdiv
xbus(i1, j1) = xbus(i1, j1) - xdiv
Next j1
Next i1
ElseIf brprotery(i) = 4 Then
mm = nbus + 1
For j = 1 To nbus
rbus(mm, j) = rbus(k, j) - rbus(kk, j)
xbus(mm, j) = xbus(k, j) - xbus(kk, j)
rbus(j, mm) = rbus(mm, j)
xbus(j, mm) = xbus(mm, j)
Next j
rbus(mm, mm) = rbus(k, k) + brrpu(i) + rbus(kk, kk) - 2 * rbus(k, kk)
xbus(mm, mm) = xbus(k, k) + brxpu(i) + xbus(kk, kk) - 2 * xbus(k, kk)
For i1 = 1 To nbus
For j1 = 1 To nbus
r1 = rbus(i1, mm)
x1 = xbus(i1, mm)
r2 = rbus(mm, j1)
x2 = xbus(mm, j1)
Call cmpmult
r3 = rbus(mm, mm)
x3 = xbus(mm, mm)
Call cmpdiv
rbus(i1, j1) = rbus(i1, j1) - rdiv
xbus(i1, j1) = xbus(i1, j1) - xdiv
Next j1
Next i1
End If
Next i
End Su

Private Sub cmpmult()


rmu = r1 * r2 - x1 * x2
xmu = r1 * x2 + r2 * x1
End Sub

Private Sub cmpdiv()


sqz = r3 ^ 2 + x3 ^ 2
rdiv = (rmu * r3 + xmu * x3) / sqz
xdiv = (xmu * r3 - rmu * x3) / sqz
End Sub

()
1.

k
1.732 X/R
k 1.6 k 1.5[6-7]

2.

5~8 6
k 8
k =1.05 k =1.1 500MVA
k 0.1[6-7]

3.

VAbase i
(Driving Point Impedance) Z ii Z ii
8

I i , sym I i ,asy S i , sym


S i ,asy :
I i , sym =

VAb

(16)

3Vi Z ii

I i ,asy = 1.6 I i , sym

(17)

i = 2,3,4, LL , n

Vi 0.6kV
S i , sym =

VAbase
Z ii

(18)

S i ,asy = k i S i , sym

(19)

i = 2,3,4, LL , n

Vi 0.6kV

600

k i
ki = 1 + e 2Rii / X ii

(20)

I i , sym I i ,asy

I i , sym =

VAbase

(21)

3Vi Z ii

I i , asy = k i I sym

(22)

i = 2,3, L , n

Vi < 0.6kV

10

Ybus

Ybus Vbus = I bus

(23)

I bus Ybus
(23)
1
Vbus = Ybus
I bus = Z bus I bus

(24)
(24) Z bus Ybus
Ybus Ybus
Ybus
n
1 Ybus (n 1) (n 1)
i m i

Y ii= y ij

(25)

j =1

(i = 2,3, LLL , n)

Y ij = Y ji = y ij

(26)

ji

i = 2,3,4, LL , n

j = 2,3, LL , n

Visual Basic6.0 ifo(i)


ito(i) brgpu(i) brgpu(i)
nbt nbus Ybus

'(nbus)*(nbus)
Public Sub cal_ybus()
For i = 1 To nbus
For j = 1 To nbus
bbus(i, j) = 0
gbus(i, j) = 0
Next
Next
For i = 1 To nbt
bbus(ifo(i), ifo(i)) = bbus(ifo(i), ifo(i)) + brbpu(i)
gbus(ifo(i), ifo(i)) = gbus(ifo(i), ifo(i)) + brgpu(i)
If ito(i) = 1 Then
GoTo 5
End If
11


bbus(ito(i), ito(i)) = bbus(ito(i), ito(i)) + brbpu(i)
bbus(ifo(i), ito(i)) = bbus(ifo(i), ito(i)) - brbpu(i)
bbus(ito(i), ifo(i)) = bbus(ifo(i), ito(i))
gbus(ito(i), ito(i)) = gbus(ito(i), ito(i)) + brgpu(i)
gbus(ifo(i), ito(i)) = gbus(ifo(i), ito(i)) - brgpu(i)
gbus(ito(i), ifo(i)) = gbus(ifo(i), ito(i))
5 Next
'(nbus-1)*(nbus-1)
For i = 1 To nbus - 1
For j = 1 To nbus - 1
ybus(i, j) = 0
ybusag(i, j) = 0
Next
Next
For i = 1 To nbus - 1
For j = 1 To nbus - 1
rp = gbus(i + 1, j + 1)
ip = bbus(i + 1, j + 1)
ybus(i, j) = (rp ^ 2 + ip ^ 2) ^ 0.5
Call ybsang
ybusag(i, j) = agle
If Abs(ybusag(i, j)) > pi Then
If ybusag(i, j) < 0 Then
ybusag(i, j) = ybusag(i, j) + 2 * pi
ElseIf ybusag(i, j) > 0 Then
ybusag(i, j) = ybusag(i, j) - 2 * pi
End If
End If
Next
Next
End Sub
'
Public Sub ybsang()
If rp = 0 And ip = 0 Then
agle = 0
Exit Sub
ElseIf rp = 0 And ip > 0 Then
agle = pi / 2
Exit Sub
ElseIf rp = 0 And ip < 0 Then
agle = -pi / 2
Exit Sub
End If
ag = Atn(Abs(ip) / Abs(rp))
If rp > 0 And ip >= 0 Then
agle = ag
ElseIf rp < 0 And ip > 0 Then
agle = pi - ag
ElseIf rp < 0 And ip < 0 Then
agle = (pi + ag)
ElseIf rp > 0 And ip <= 0 Then
agle = -ag
End If
End Sub

12

Ybus
Ybus (Nonsingular Matrix)
-(Gauss-Jordan
Method) 3
()
Y11 Y12
Y
21 Y22
Y31 Y32

1
0
0

Y13
Y23
Y33

(27)

() Y11
1 Y121

1
0 Y22
0 Y 1
32

Y131
Y231
Y331

Y141

Y241
Y341

(28)

0
() 1
0
Y111 Y121
1
1
Y21 Y22
Y 1 Y 1
32
31

Y131
Y231
Y331

1
0

(29)

() Y221
Y112
2
Y21
Y 2
31

0 Y132
1 Y232
0

Y332

Y142

Y242
Y342

(30)

0
() 0
1
Y112 Y122
2
2
Y21 Y22
Y 2 Y 2
32
31

Y132
Y232
Y332

0
1

(31)

() Y332
Y113 Y123
3
3
Y21 Y22
Y 3 Y 3
32
31

Y133
Y233
Y333

Y143

Y243
Y343

(32)

13


1
1
Ybus
= Z bus Z bus

1
Z bus

Y113 Y123

= Y213 Y223
Y 3 Y 3
32
31

Y133

Y233
Y333

(33)

1
(Reference Node)
8 16 23

8 16 23

3 (1) 1
(Feeder Node) 1 (Root Node)
1 (2)
14

(3)

1 16 4
(1) 9 (2)(3)
10

9 1

10 3

m 2
() m

1
1
() 1

m
() 1

15

11 Fi r 1
n 1 1
n+1 r

11 Fi r

Fi r
Fi 3
1
Fi x ZFD Fi , x
Kx

ZFDFi , x = ZBFi , x , s

(34)

s =1

x = 1,2,LLL, n

F
=
m
,
m

1
,
L
L
,
2
,
1
i

ZB Fi , x , s Fi x s
16

2
Fi y
FFi , y y ZFD Fi , y

Ky

ZFD Fi , y = ZE Fi , y + ZB Fi , x , s

(35)

S =1

y = n + 1, n + 2,LLL, r

Fi = m, m 1,LL,2,1

ZE Fi , y Fi y

FFi , y
3 Fi
Fi ZE Fi

1
ZE Fi = r
1

t =1 ZFD Fi , t

(36)

y = n + 1, n + 2,LLL, r

Fi = m, m 1,LL,2,1
1 ZBS F 1
ZEF 1
ZBSF1 = ZEF 1
(37)
()
12 Fi k
1 13 Fi k

17

12 k

13 Fi k

13 ZB S Fi , k ZFDFi , k = Fi
k i
ZBS Fi , k ,To ( i ) (1) i i-1

(2)
ZP1 ZP2 ZP1 ZP2
ZBS Fi , k ,To ( i )

2
Fi
1
18

Fi x i
ZBS Fi , x ,To ( i )

ZBS Fi , x ,To ( i )

i 1
Kx
1

=
+ ZB Fi , x , s // ZB Fi , x ,t
1
1
s =i

t =1
ZBS
ZFD
Fi
Fi , x

(38)

i = k x , k x 1 ,LLL,3,2

x = 1,2,LLLLL, n
F = 1,2,LLLL, m
i

2
Fi y Fi , y y
i ZBS Fi , k ,To ( i )

ZBS Fi , y ,To ( i )

Ky
i 1


=
+ ZB Fi , y , s // ZE Fi , y + ZB Fi , y ,t (39)
1
1
s =i
t =1


t i 1

ZBS
ZFD
Fi
Fi , y

i = k y , k y 1 , LLL,2,1

y = n + 1, n + 2,LL, r
F = 1,2,LLLL, m
i

19

14

20

8 16 23 Access

Access
15 Access

15 Access

()
1.

2.

21

3.

4.

22

5.

()
1.

23

2.

3.

4.


Visual Basic6.0

Public inputdb As New ADODB.Connection, bsvltb As New ADODB.Recordset, tpsrtb As New


ADODB.Recordset
Public trtb As New ADODB.Recordset, contb As New ADODB.Recordset, loadtb As New
ADODB.Recordset
Public bsintcpdb As New ADODB.Connection, hvlinscptb As New ADODB.Recordset, lvlinscptb As
New ADODB.Recordset
Public hvlintrcptb As New ADODB.Recordset, afaltbsvtb As New ADODB.Recordset

'
Public Sub set_database_and_table()

24

'
inputdb.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\
.mdb"
inputdb.CursorLocation = adUseClient
inputdb.Open
bsvltb.Open "", inputdb, adOpenStatic, adLockOptimistic
tpsrtb.Open "", inputdb, adOpenStatic, adLockOptimistic
trtb.Open "", inputdb, adOpenStatic, adLockOptimistic
contb.Open "", inputdb, adOpenStatic, adLockOptimistic
loadtb.Open "", inputdb, adOpenStatic, adLockOptimistic
'
bsintcpdb.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\
.mdb"
bsintcpdb.CursorLocation = adUseClient
bsintcpdb.Open
hvlinscptb.Open "", bsintcpdb, adOpenStatic, adLockOptimistic
lvlinscptb.Open "", bsintcpdb, adOpenStatic, adLockOptimistic
hvlintrcptb.Open "", bsintcpdb, adOpenStatic, adLockOptimistic
afaltbsvtb.Open "", bsintcpdb, adOpenStatic, adLockOptimistic
End Sub

25

8 16 16 22
Microsoft Visual Studio .NET

16 22

Image Web 2
TextBox 1 DropDownList 1

17

2
26

17

18 DataGrid1 1
7
()
()
()
()
()
()

()

18

19 DataGrid1 1

5
()

() TextBox
()
27

19

()
()

20 DataGrid1 1
6
()
()
()

20

()
28

()
()

21 CrystalReportViewer 1
CrystalReport 5
()
()
()
()
()

21

Visual Basic 16 22

Microsoft Visual Studio .NET

29

1A.GrossPower System Analysis, john Wiley & Sons Inc, 1992.


2Hadi SaadatPower System Analysis Mcgraw-Hill Inc, 1999.
3
1983
4Auto CAD 1995

5
Feb. 1997 PP.43-62
61992
7 1996
8, 2004, ASP.NET ,
9 , 2005, Visual Basic.NET ,

10, 2003, Visual Basic.NET -Crystal Report ,

30