Package pypower :: Module case9
[hide private]
[frames] | no frames]

Source Code for Module pypower.case9

 1  # Copyright (C) 1996-2011 Power System Engineering Research Center (PSERC) 
 2  # Copyright (C) 2011 Richard Lincoln 
 3  # 
 4  # PYPOWER is free software: you can redistribute it and/or modify 
 5  # it under the terms of the GNU General Public License as published 
 6  # by the Free Software Foundation, either version 3 of the License, 
 7  # or (at your option) any later version. 
 8  # 
 9  # PYPOWER is distributed in the hope that it will be useful, 
10  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
11  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
12  # GNU General Public License for more details. 
13  # 
14  # You should have received a copy of the GNU General Public License 
15  # along with PYPOWER. If not, see <http://www.gnu.org/licenses/>. 
16   
17  """Power flow data for 9 bus, 3 generator case. 
18  """ 
19   
20  from numpy import array 
21   
22 -def case9():
23 """Power flow data for 9 bus, 3 generator case. 24 Please see L{caseformat} for details on the case file format. 25 26 Based on data from Joe H. Chow's book, p. 70. 27 28 @return: Power flow data for 9 bus, 3 generator case. 29 """ 30 ppc = {"version": '2'} 31 32 ##----- Power Flow Data -----## 33 ## system MVA base 34 ppc["baseMVA"] = 100.0 35 36 ## bus data 37 # bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin 38 ppc["bus"] = array([ 39 [1, 3, 0, 0, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 40 [2, 2, 0, 0, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 41 [3, 2, 0, 0, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 42 [4, 1, 0, 0, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 43 [5, 1, 90, 30, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 44 [6, 1, 0, 0, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 45 [7, 1, 100, 35, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 46 [8, 1, 0, 0, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 47 [9, 1, 125, 50, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9] 48 ]) 49 50 ## generator data 51 # bus, Pg, Qg, Qmax, Qmin, Vg, mBase, status, Pmax, Pmin, Pc1, Pc2, 52 # Qc1min, Qc1max, Qc2min, Qc2max, ramp_agc, ramp_10, ramp_30, ramp_q, apf 53 ppc["gen"] = array([ 54 [1, 0, 0, 300, -300, 1, 100, 1, 250, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 55 [2, 163, 0, 300, -300, 1, 100, 1, 300, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 56 [3, 85, 0, 300, -300, 1, 100, 1, 270, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 57 ]) 58 59 ## branch data 60 # fbus, tbus, r, x, b, rateA, rateB, rateC, ratio, angle, status, angmin, angmax 61 ppc["branch"] = array([ 62 [1, 4, 0, 0.0576, 0, 250, 250, 250, 0, 0, 1, -360, 360], 63 [4, 5, 0.017, 0.092, 0.158, 250, 250, 250, 0, 0, 1, -360, 360], 64 [5, 6, 0.039, 0.17, 0.358, 150, 150, 150, 0, 0, 1, -360, 360], 65 [3, 6, 0, 0.0586, 0, 300, 300, 300, 0, 0, 1, -360, 360], 66 [6, 7, 0.0119, 0.1008, 0.209, 150, 150, 150, 0, 0, 1, -360, 360], 67 [7, 8, 0.0085, 0.072, 0.149, 250, 250, 250, 0, 0, 1, -360, 360], 68 [8, 2, 0, 0.0625, 0, 250, 250, 250, 0, 0, 1, -360, 360], 69 [8, 9, 0.032, 0.161, 0.306, 250, 250, 250, 0, 0, 1, -360, 360], 70 [9, 4, 0.01, 0.085, 0.176, 250, 250, 250, 0, 0, 1, -360, 360] 71 ]) 72 73 ##----- OPF Data -----## 74 ## area data 75 # area refbus 76 ppc["areas"] = array([ 77 [1, 5] 78 ]) 79 80 ## generator cost data 81 # 1 startup shutdown n x1 y1 ... xn yn 82 # 2 startup shutdown n c(n-1) ... c0 83 ppc["gencost"] = array([ 84 [2, 1500, 0, 3, 0.11, 5, 150], 85 [2, 2000, 0, 3, 0.085, 1.2, 600], 86 [2, 3000, 0, 3, 0.1225, 1, 335] 87 ]) 88 89 return ppc
90