Solution to Optimal Power flow by Genetic Algorithm
RM Saloman danaraj EEE Department
Jubail Industrial Collge, Jubail,Kingdom Of Saudi Arabia.
Mail:salorajan@[Link]
1. Introduction
.
Optimal Power flow(OPF) is allocating loads to plants
for minimum cost while meeting the
network constraints. It is formulated as an optimization problem of minimizing the total fuel
cost of all committed plant while meeting the network(power flow ) constraints. The variants
of the problems are numerous which model the objective and the constraints in different
ways.
The basic OPF problem can described mathematically as a minimization of problem of
minimizing the total fuel cost of all committed plants subject to the constraints.
n
Minimize Fi ( Pi )
(A1)
i =1
Fi ( Pi ) is the fuel cost equation of the ith plant. It is the variation of fuel cost ($ or Rs) with
generated power (MW).Normally it is expressed as continuous quadratic equation.
Fi (Pi ) = ai Pi + bi Pi + ci , Pi
min
Pi Pi
max
(A2)
The total generation should meet the total demand and transmission loss. The transmission
loss can be determined from power flow.
n
= D + Pl
(A3)
i =1
n
Pl = real ( ViYij V j ), i = 1,2,..n
(A4)
j
n
Ql = imag ( ViYij V j ), i = 1,2,..n
j
(A5)
2. Solution by Genetic Algorithm
[Link] the busdata,line data and cost coefficients and their limits.
2. Convert the constrained optimization problem as an unconstrained problem by penalty
function method.
Minimize
n
Fi ( Pi ) + 1000 * abs( Pi D Pl )
i =1
i =1
3. This software contain two files gaopf.m and opf1.m.opf1.m is a function file which returns
the fuel cost,voltage ,Generation, and transmission [Link]
ieee 30 bus system is
considered for simulation..
[Link] your default folder as [Link] run [Link] results will be displayed on the
command window.
Best
Generation
Mean
f-count
f(x)
Stall
f(x)
1167
Generations
50
805
100
803.3
1533
150
803.3
1614
200
803.3
1436
250
803
2066
300
803
1537
350
803
1475
400
803
2278
450
803
2173
10
500
802.7
2009
11
550
802.7
2072
12
600
802.7
2179
13
650
802.7
2040
14
700
802.7
1765
15
750
802.7
1797
16
800
802.7
1861
17
850
802.7
1575
18
900
802.7
1371
19
950
802.7
1606
20
1000
802.7
1526
21
1050
802.7
1620
22
1100
802.7
1843
23
1150
802.7
1751
24
1200
802.7
1992
10
25
1250
802.5
1837
26
1300
802.5
1809
27
1350
802.5
1760
28
1400
802.5
1847
29
1450
802.5
1855
30
1500
802.5
1799
31
1550
802.5
1487
32
1600
802.4
1627
33
1650
802.4
1757
34
1700
802.4
1752
35
1750
802.4
1831
36
1800
802.4
1598
37
1850
802.4
1808
38
1900
802.4
1405
39
1950
802.4
1880
40
2000
802.4
1914
41
2050
802.4
1877
42
2100
802.4
1440
10
43
2150
802.4
1286
11
44
2200
802.4
1365
12
45
2250
802.4
1444
13
46
2300
802.4
1371
14
47
2350
802.4
1514
15
48
2400
802.4
1725
16
49
2450
802.4
1673
50
2500
802.4
1372
51
2550
802.4
1708
52
2600
802.3
1830
53
2650
802.3
1682
54
2700
802.3
1522
55
2750
802.3
1338
56
2800
802.3
1305
57
2850
802.3
1078
58
2900
802.3
1249
59
2950
802.3
1359
60
3000
802.3
1057
61
3050
802.3
1223
62
3100
802.3
1357
10
63
3150
802.3
1480
64
3200
802.3
1424
65
3250
802.3
1489
66
3300
802.3
1217
67
3350
802.3
1557
68
3400
802.3
1118
69
3450
802.3
1254
70
3500
802.3
1144
71
3550
802.3
1522
72
3600
802.3
1313
73
3650
802
1406
74
3700
802
1356
75
3750
802
1460
76
3800
802
1538
77
3850
802
1241
78
3900
802
1578
79
3950
802
1697
80
4000
801.9
1539
81
4050
801.9
1318
82
4100
801.9
1392
83
4150
801.9
1195
84
4200
801.9
1115
85
4250
801.9
1115
86
4300
801.9
1228
87
4350
801.9
1278
88
4400
801.9
1416
89
4450
801.9
1285
90
4500
801.8
1492
91
4550
801.8
1363
92
4600
801.8
1233
93
4650
801.8
1331
94
4700
801.8
1393
95
4750
801.8
1324
96
4800
801.8
987
97
4850
801.8
1273
98
4900
801.8
1072
99
4950
801.8
1231
100
5000
801.8
1243
10
101
5050
801.8
1001
11
102
5100
801.8
1085
12
103
5150
801.8
955.5
13
104
5200
801.8
1010
14
105
5250
801.8
1323
15
106
5300
801.8
1119
16
107
5350
801.8
998.8
17
108
5400
801.8
1154
18
109
5450
801.8
973.9
19
110
5500
801.8
914
20
111
5550
801.8
1175
21
112
5600
801.8
1027
113
5650
801.8
1019
114
5700
801.8
1046
115
5750
801.8
1044
116
5800
801.8
1150
117
5850
801.8
1010
118
5900
801.8
1207
119
5950
801.8
1219
120
6000
801.8
1123
121
6050
801.8
1024
122
6100
801.8
1008
10
123
6150
801.8
1031
124
6200
801.8
982.3
125
6250
801.8
1048
126
6300
801.8
1118
127
6350
801.8
952.8
128
6400
801.8
1113
129
6450
801.8
1118
130
6500
801.8
912.4
131
6550
801.8
1058
132
6600
801.8
976.3
133
6650
801.8
1111
134
6700
801.8
1047
135
6750
801.8
993
136
6800
801.8
962.9
137
6850
801.8
1014
138
6900
801.8
892.5
139
6950
801.8
872.6
140
7000
801.8
895.6
141
7050
801.8
1084
10
142
7100
801.8
1036
11
143
7150
801.8
863.5
12
144
7200
801.8
995.7
13
145
7250
801.8
941.4
14
146
7300
801.8
927.3
15
147
7350
801.8
937.4
16
148
7400
801.8
940
17
149
7450
801.8
900.3
18
150
7500
801.8
913.6
19
151
7550
801.8
905.9
20
152
7600
801.8
898.6
21
153
7650
801.8
904.2
22
154
7700
801.8
844.3
23
155
7750
801.8
918
24
156
7800
801.8
811.2
25
157
7850
801.8
813.4
26
158
7900
801.8
859.7
27
159
7950
801.8
878.7
28
160
8000
801.8
889.8
29
161
8050
801.8
852.7
30
162
8100
801.8
822.7
31
163
8150
801.8
845.8
32
164
8200
801.8
886.9
33
165
8250
801.8
845.7
34
166
8300
801.8
805.7
35
167
8350
801.8
804.5
36
168
8400
801.8
805.4
37
169
8450
801.8
804.7
38
170
8500
801.8
835.1
39
171
8550
801.8
839.2
40
172
8600
801.8
856.1
41
173
8650
801.8
826
42
174
8700
801.8
820.6
43
175
8750
801.8
820.5
44
176
8800
801.8
826.2
177
8850
801.8
803.5
178
8900
801.8
803.5
179
8950
801.8
803.1
180
9000
801.8
805.5
181
9050
801.8
803.1
182
9100
801.8
802.8
183
9150
801.8
808.5
184
9200
801.8
808.3
185
9250
801.8
808.3
186
9300
801.8
802.5
187
9350
801.8
802.5
188
9400
801.8
802.2
189
9450
801.8
802.2
190
9500
801.8
802.1
191
9550
801.8
802.1
192
9600
801.8
802.1
193
9650
801.8
802
194
9700
801.8
802
195
9750
801.8
801.9
196
9800
801.8
801.9
197
9850
801.8
801.9
198
9900
801.8
801.8
199
9950
801.8
801.8
200
10000
801.8
801.8
Optimization terminated: maximum number of generations exceeded.
F=
801.8295
Pgg =
176.9346 49.1776 21.4519 21.8496 12.1616 11.2210
vv =
Columns 1 through 15
1.0600 1.0430 1.0253 1.0170 1.0100 1.0147 1.0050 1.0100 1.0530 1.0468
1.0820 1.0598 1.0710 1.0449 1.0402
Columns 16 through 30
1.0471
1.0415
1.0304
1.0277
1.0317
1.0345
1.0027 1.0269 1.0128 1.0071 0.9957
TL =
9.3962
ALL THE BEST
1.0350
1.0295
1.0237
1.0204