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

Source Code for Module pypower.case4gs

 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 4 bus, 2 gen case from Grainger & Stevenson. 
18  """ 
19   
20  from numpy import array 
21   
22 -def case4gs():
23 """Power flow data for 4 bus, 2 gen case from Grainger & Stevenson. 24 Please see L{caseformat} for details on the case file format. 25 26 This is the 4 bus example from pp. 337-338 of I{"Power System Analysis"}, 27 by John Grainger, Jr., William Stevenson, McGraw-Hill, 1994. 28 29 @return: Power flow data for 4 bus, 2 gen case from Grainger & Stevenson. 30 """ 31 ppc = {"version": '2'} 32 33 ##----- Power Flow Data -----## 34 ## system MVA base 35 ppc["baseMVA"] = 100.0 36 37 ## bus data 38 # bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin 39 ppc["bus"] = array([ 40 [0, 3, 50, 30.99, 0, 0, 1, 1, 0, 230, 1, 1.1, 0.9], 41 [1, 1, 170, 105.35, 0, 0, 1, 1, 0, 230, 1, 1.1, 0.9], 42 [2, 1, 200, 123.94, 0, 0, 1, 1, 0, 230, 1, 1.1, 0.9], 43 [3, 2, 80, 49.58, 0, 0, 1, 1, 0, 230, 1, 1.1, 0.9] 44 ]) 45 46 ## generator data 47 # bus, Pg, Qg, Qmax, Qmin, Vg, mBase, status, Pmax, Pmin, Pc1, Pc2, 48 # Qc1min, Qc1max, Qc2min, Qc2max, ramp_agc, ramp_10, ramp_30, ramp_q, apf 49 ppc["gen"] = array([ 50 [3, 318, 0, 100, -100, 1.02, 100, 1, 318, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 51 [0, 0, 0, 100, -100, 1, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 52 ]) 53 54 ## branch data 55 #fbus, tbus, r, x, b, rateA, rateB, rateC, ratio, angle, status, angmin, angmax 56 ppc["branch"] = array([ 57 [0, 1, 0.01008, 0.0504, 0.1025, 250, 250, 250, 0, 0, 1, -360, 360], 58 [0, 2, 0.00744, 0.0372, 0.0775, 250, 250, 250, 0, 0, 1, -360, 360], 59 [1, 3, 0.00744, 0.0372, 0.0775, 250, 250, 250, 0, 0, 1, -360, 360], 60 [2, 3, 0.01272, 0.0636, 0.1275, 250, 250, 250, 0, 0, 1, -360, 360] 61 ]) 62 63 return ppc
64