PF#

Type for power flow routines.

Common Parameters: pd

Common Vars: pg

Available routines: DCPF, PFlow, CPF, PFlow0, DCPF0

DCPF#

DC power flow.

Objective#

Unit

Expression

$

\(min. 0\)

Expressions#

Name

Description

Expression

Unit

Source

plf

Line flow

\(B_{f} \theta_{bus} + P_{f}^{inj}\)

p.u.

Line

Constraints#

Name

Description

Expression

pb

power balance

\(B_{bus} \theta_{bus} + P_{bus}^{inj} + C_{l} p_{d} + C_{sh} g_{sh} - C_{g} p_g = 0\)

sbus

align slack bus angle

\(c_{sb} \theta_{bus} = 0\)

pvb

PV generator

\(C_{PV} (p_g - u_{g} p_{g, 0}) = 0\)

Vars#

Name

Symbol

Description

Unit

Source

Properties

pg

\(p_g\)

Gen active power

p.u.

StaticGen.p

vBus

\(v_{Bus}\)

Bus voltage magnitude, placeholder

p.u.

Bus.v

aBus

\(\theta_{bus}\)

Bus voltage angle

rad

Bus.a

Services#

Name

Symbol

Description

Type

csb

\(c_{sb}\)

select slack bus

VarSelect

cpv

\(C_{PV}\)

Select PV from pg

VarSelect

Parameters#

Name

Symbol

Description

Unit

Source

ug

\(u_{g}\)

Gen connection status

StaticGen.u

pg0

\(p_{g, 0}\)

Gen initial active power

p.u.

StaticGen.p0

gsh

\(g_{sh}\)

shunt conductance

Shunt.g

buss

\(B_{us,s}\)

Bus slack

Slack.bus

pd

\(p_{d}\)

active demand

p.u.

StaticLoad.p0

Cg

\(C_{g}\)

Gen connection matrix

MatProcessor.Cg

Cl

\(C_{l}\)

Load connection matrix

MatProcessor.Cl

CftT

\(C_{ft}^T\)

Transpose of line connection matrix

MatProcessor.CftT

Csh

\(C_{sh}\)

Shunt connection matrix

MatProcessor.Csh

Bbus

\(B_{bus}\)

Bus admittance matrix

MatProcessor.Bbus

Bf

\(B_{f}\)

Bf matrix

MatProcessor.Bf

Pbusinj

\(P_{bus}^{inj}\)

Bus power injection vector

MatProcessor.Pbusinj

Pfinj

\(P_{f}^{inj}\)

Line power injection vector

MatProcessor.Pfinj

genpv

\(g_{DG}\)

gen of PV

PV.idx

PFlow#

Power flow analysis using ANDES PFlow routine.

More settings can be changed via PFlow2._adsys.config and PFlow2._adsys.PFlow.config.

All generator output powers, bus voltages, and angles are included in the variable definitions. However, not all of these are unknowns; the definitions are provided for easy access.

References#

      1. Crow, Computational methods for electric power systems. 2015.

  1. ANDES Documentation - Simulation and Plot. https://docs.andes.app/en/latest/_examples/ex1.html

Objective#

Unit

Expression

$

\(min. 0\)

Expressions#

Name

Description

Expression

Unit

Source

plf

Line flow

\(B_{f} \theta_{bus} + P_{f}^{inj}\)

p.u.

Line

Vars#

Name

Symbol

Description

Unit

Source

Properties

pg

\(p_g\)

Gen active power

p.u.

StaticGen.p

qg

\(q_g\)

Gen reactive power

p.u.

StaticGen.q

aBus

\(\theta_{bus}\)

Bus voltage angle

rad

Bus.a

vBus

\(V_{bus}\)

Bus voltage magnitude

p.u.

Bus.v

Parameters#

Name

Symbol

Description

Unit

Source

Bf

\(B_{f}\)

Bf matrix

MatProcessor.Bf

Pfinj

\(P_{f}^{inj}\)

Line power injection vector

MatProcessor.Pfinj

Config Fields in [PFlow]

Option

Symbol

Value

Info

Accepted values

tol

0.000

convergence tolerance

float

max_iter

25

max. number of iterations

>=10

method

NR

calculation method

('NR', 'dishonest', 'NK')

check_conn

1

check connectivity before power flow

(0, 1)

n_factorize

4

first N iterations to factorize Jacobian in dishonest method

>0

CPF#

Continuous power flow.

Still under development, not ready for use.

Objective#

Unit

Expression

$

\(min. 0\)

Expressions#

Name

Description

Expression

Unit

Source

plf

Line flow

\(B_{f} \theta_{bus} + P_{f}^{inj}\)

p.u.

Line

Vars#

Name

Symbol

Description

Unit

Source

Properties

pg

\(p_g\)

Gen active power

p.u.

StaticGen.p

qg

\(q_g\)

Gen reactive power

p.u.

StaticGen.q

aBus

\(\theta_{bus}\)

Bus voltage angle

rad

Bus.a

vBus

\(V_{bus}\)

Bus voltage magnitude

p.u.

Bus.v

Parameters#

Name

Symbol

Description

Unit

Source

Bf

\(B_{f}\)

Bf matrix

MatProcessor.Bf

Pfinj

\(P_{f}^{inj}\)

Line power injection vector

MatProcessor.Pfinj

Config Fields in [CPF]

Option

Symbol

Value

Info

Accepted values

tol

0.000

convergence tolerance

float

max_iter

25

max. number of iterations

>=10

method

NR

calculation method

('NR', 'dishonest', 'NK')

check_conn

1

check connectivity before power flow

(0, 1)

n_factorize

4

first N iterations to factorize Jacobian in dishonest method

>0

PFlow0#

AC Power Flow using PYPOWER.

This class is deprecated as of version 0.9.12 and will be removed in 1.1.0.

Notes#

  1. AC pwoer flow is solved with PYPOWER runpf function.

  2. AC power flow formulation in AMS style is NOT DONE YET, but this does not affect the results because the data are passed to PYPOWER for solving.

Vars#

Name

Symbol

Description

Unit

Source

Properties

pg

\(p_{g}\)

Gen active power

p.u.

StaticGen.p

aBus

\(a_{Bus}\)

bus voltage angle

rad

Bus.a

plf

\(p_{lf}\)

Line flow

p.u.

Line

vBus

\(v_{Bus}\)

bus voltage magnitude

p.u.

Bus.v

qg

\(q_{g}\)

reactive power generation

p.u.

StaticGen.q

Parameters#

Name

Symbol

Description

Unit

Source

ug

\(u_{g}\)

Gen connection status

StaticGen.u

x

\(x\)

line reactance

p.u.

Line.x

tap

\(t_{ap}\)

transformer branch tap ratio

float

Line.tap

phi

\(\phi\)

transformer branch phase shift in rad

radian

Line.phi

pd

\(p_{d}\)

active deman

p.u.

StaticLoad.p0

qd

\(q_{d}\)

reactive power load in system base

p.u.

StaticLoad.q0

Config Fields in [PFlow0]

Option

Symbol

Value

Info

Accepted values

qlim

0

Enforce generator q limits

(0, 1, 2)

DCPF0#

DC power flow using PYPOWER.

This class is deprecated as of version 0.9.12 and will be removed in 1.1.0.

Notes#

  1. DCPF is solved with PYPOWER runpf function.

  2. DCPF formulation is not complete yet, but this does not affect the results because the data are passed to PYPOWER for solving.

Vars#

Name

Symbol

Description

Unit

Source

Properties

pg

\(p_{g}\)

Gen active power

p.u.

StaticGen.p

aBus

\(a_{Bus}\)

bus voltage angle

rad

Bus.a

plf

\(p_{lf}\)

Line flow

p.u.

Line

Parameters#

Name

Symbol

Description

Unit

Source

ug

\(u_{g}\)

Gen connection status

StaticGen.u

x

\(x\)

line reactance

p.u.

Line.x

tap

\(t_{ap}\)

transformer branch tap ratio

float

Line.tap

phi

\(\phi\)

transformer branch phase shift in rad

radian

Line.phi

pd

\(p_{d}\)

active deman

p.u.

StaticLoad.p0