Skip to content

GridCal file format

Santiago Peñate Vera edited this page Jul 23, 2016 · 7 revisions

General

Consider watching this tutorial before continuing.

The GridCal file is a simple excel file (.xls or .xlsx) Different tabs contain the diferent types of information:

  • Conf: Configuration variables
  • Bus: Buses information
  • Gen: Generators information
  • Branch: Branches information
  • Lprof: Load active power profile
  • LprofQ: Load reactive power profile
  • Gprof: Generators active power profile

The ordering of the tabs is not essential, neither is the casing of the tab names.

Overall the format of the tabs Bus, Gen and Branch is the same as the one you encounter in MatPower.

Another thing to note is that the bus numbering starts in zero as Python is Zero-based. When a MatPower file is imported into GridCal the indexing is correctly converted from one base to zero base.

If any of the bus, gen or branch structures contains less columns than the program expected those will be filled by the software. Likewise the only mandatory tabs are Conf, bus, branch and gen.

See This file as an example.

Configuration variables

This is a list where the first row contains the headers:

  • property
  • value

And the rest of the rows are the variables and their values.

Buses information

  • bus_i bus number (0 to 29997)
  • type bus type (1 = PQ, 2 = PV, 3 = refference, 4 = isolated)
  • Pd real power demand (MW)
  • Qd reactive power demand (MVAr)
  • Gs shunt conductance (MW at V = 1.0 p.u.)
  • Bs shunt susceptance (MVAr at V = 1.0 p.u.)
  • area area number, 1-100
  • Vm voltage magnitude (p.u.)
  • Va voltage angle (degrees)
  • baseKV base voltage (kV)
  • zone loss zone (1-999)
  • Vmax maximum voltage magnitude (p.u.)
  • Vmin minimum voltage magnitude (p.u.)
  • LaM_P Lagrange multiplier on real power mismatch (u/MW)
  • LaM_Q Lagrange multiplier on reactive power mismatch (u/MVAr)
  • Mu_Vmax Kuhn-Tucker multiplier on upper voltage limit (u/p.u.)
  • Mu_Vmin Kuhn-Tucker multiplier on lower voltage limit (u/p.u.)
  • Bus_X Bus X position on the representation screen
  • Bus_Y Bus Y position on the representation screen
  • Collapsed Is the bus in a voltage collapsed state?

Generators information

  • bus
  • Pg
  • Qg
  • Qmax
  • Qmin
  • Vg
  • mBase
  • status
  • Pmax
  • Pmin
  • Pc1
  • Pc2
  • Qc1min
  • Qc1max
  • Qc2min
  • Qc2max
  • ramp_agc
  • ramp_10
  • ramp_30
  • ramp_q
  • apf
  • MU_PMAX
  • MU_PMIN
  • MU_QMAX
  • MU_QMIN

Branches Information

  • fbus
  • tbus
  • r
  • x
  • b
  • rateA
  • rateB
  • rateC
  • ratio
  • angle
  • status
  • angmin
  • angmax
  • Pf
  • Qf
  • Pt
  • Qt
  • Mu_Sf
  • Mu_St
  • Mu_AngMin
  • Mu_AngMax
  • Current
  • Loading
  • Losses
  • Original_index

Load profiles: Active power

Loads profiles: Reactive power

Generators profiles: Active power