StaticGen#

Static generator group.

Static generators will be replaced by dynamic generators, either synchronous generators or inverter-based resources upon the initialization for dynamics. It is implemented by setting the connectivity status u of the replaced StaticGen to 0.

See the notes in SynGen for replacing one StaticGen with multiple dynamic ones.

Common Parameters: u, name, Sn, Vn, p0, q0, ra, xs, subidx

Common Variables: q, a, v

Available models: PV, Slack

PV#

Static PV generator with reactive power limit checking and PV-to-PQ conversion.

pv2pq = 1 turns on the conversion. It starts from iteration min_iter or when the convergence error drops below err_tol.

The PV-to-PQ conversion first ranks the reactive violations. A maximum number of npv2pq PVs above the upper limit, and a maximum of npv2pq PVs below the lower limit will be converted to PQ, which sets the reactive power to pmax or pmin.

If pv2pq is 1 (enabled) and npv2pq is 0, heuristics will be used to determine the number of PVs to be converted for each iteration.

Parameters#

Name

Symbol

Description

Default

Unit

Properties

idx

unique device idx

u

\(u\)

connection status

1

bool

name

device name

Sn

\(S_n\)

Power rating

100

non_zero

Vn

\(V_n\)

AC voltage rating

110

non_zero

subidx

index for generators on the same bus

bus

idx of the installed bus

mandatory

busr

bus idx for remote voltage control

p0

\(p_0\)

active power set point in system base

0

p.u.

q0

\(q_0\)

reactive power set point in system base

0

p.u.

pmax

\(p_{max}\)

maximum active power in system base

999

p.u.

pmin

\(p_{min}\)

minimum active power in system base

-1

p.u.

qmax

\(q_{max}\)

maximim reactive power in system base

999

p.u.

qmin

\(q_{min}\)

minimum reactive power in system base

-999

p.u.

v0

\(v_0\)

voltage set point

1

vmax

\(v_{max}\)

maximum voltage voltage

1.400

vmin

\(v_{min}\)

minimum allowed voltage

0.600

ra

\(r_a\)

armature resistance

0

xs

\(x_s\)

armature reactance

0.300

busv0

\(V_{0bus}\)

0

Variables#

Name

Symbol

Type

Description

Unit

Properties

q

\(q\)

Algeb

actual reactive power generation

p.u.

v_str

a

\(\theta\)

ExtAlgeb

v

\(V\)

ExtAlgeb

v_str,v_setter

Initialization Equations#

Name

Symbol

Type

Initial Value

q

\(q\)

Algeb

\(q_{0} u\)

a

\(\theta\)

ExtAlgeb

v

\(V\)

ExtAlgeb

\(V_{0bus} \left(1 - u\right) + u v_{0}\)

Algebraic Equations#

Name

Symbol

Type

RHS of Equation "0 = g(x, y)"

q

\(q\)

Algeb

\(u \left(z_{i}^{qlim} \left(- V + v_{0}\right) + z_{l}^{qlim} \left(- q + q_{min}\right) + z_{u}^{qlim} \left(- q + q_{max}\right)\right)\)

a

\(\theta\)

ExtAlgeb

\(- p u\)

v

\(V\)

ExtAlgeb

\(- q u\)

Services#

Name

Symbol

Equation

Type

p

\(p\)

\(p_{0}\)

ConstService

Discretes#

Name

Symbol

Type

Info

qlim

\(qlim\)

SortedLimiter

Config Fields in [PV]

Option

Symbol

Value

Info

Accepted values

allow_adjust

1

allow adjusting upper or lower limits

(0, 1)

adjust_lower

0

adjust lower limit

(0, 1)

adjust_upper

1

adjust upper limit

(0, 1)

pv2pq

\(z_{pv2pq}\)

0

convert PV to PQ in PFlow at Q limits

(0, 1)

npv2pq

\(n_{pv2pq}\)

0

max. # of conversion each iteration, 0 - auto

>=0

min_iter

\(sw_{iter}\)

2

iteration number starting from which to enable switching

int

err_tol

\(\epsilon_{tol}\)

0.010

iteration error below which to enable switching

float

abs_violation

1

use absolute (1) or relative (0) limit violation

(0, 1)

Slack#

Slack generator.

Parameters#

Name

Symbol

Description

Default

Unit

Properties

idx

unique device idx

u

\(u\)

connection status

1

bool

name

device name

Sn

\(S_n\)

Power rating

100

non_zero

Vn

\(V_n\)

AC voltage rating

110

non_zero

subidx

index for generators on the same bus

bus

idx of the installed bus

mandatory

busr

bus idx for remote voltage control

p0

\(p_0\)

active power set point in system base

0

p.u.

q0

\(q_0\)

reactive power set point in system base

0

p.u.

pmax

\(p_{max}\)

maximum active power in system base

999

p.u.

pmin

\(p_{min}\)

minimum active power in system base

-1

p.u.

qmax

\(q_{max}\)

maximim reactive power in system base

999

p.u.

qmin

\(q_{min}\)

minimum reactive power in system base

-999

p.u.

v0

\(v_0\)

voltage set point

1

vmax

\(v_{max}\)

maximum voltage voltage

1.400

vmin

\(v_{min}\)

minimum allowed voltage

0.600

ra

\(r_a\)

armature resistance

0

xs

\(x_s\)

armature reactance

0.300

a0

\(\theta_0\)

reference angle set point

0

busv0

\(V_{0bus}\)

0

busa0

\(\theta_{0bus}\)

0

Variables#

Name

Symbol

Type

Description

Unit

Properties

q

\(q\)

Algeb

actual reactive power generation

p.u.

v_str

p

\(p\)

Algeb

actual active power generation

p.u.

v_str

a

\(\theta\)

ExtAlgeb

v_str,v_setter

v

\(V\)

ExtAlgeb

v_str,v_setter

Initialization Equations#

Name

Symbol

Type

Initial Value

q

\(q\)

Algeb

\(q_{0} u\)

p

\(p\)

Algeb

\(p_{0} u\)

a

\(\theta\)

ExtAlgeb

\(\theta_{0} u + \theta_{0bus} \left(1 - u\right)\)

v

\(V\)

ExtAlgeb

\(V_{0bus} \left(1 - u\right) + u v_{0}\)

Algebraic Equations#

Name

Symbol

Type

RHS of Equation "0 = g(x, y)"

q

\(q\)

Algeb

\(u \left(z_{i}^{qlim} \left(- V + v_{0}\right) + z_{l}^{qlim} \left(- q + q_{min}\right) + z_{u}^{qlim} \left(- q + q_{max}\right)\right)\)

p

\(p\)

Algeb

\(u \left(z_{i}^{plim} \left(- \theta + \theta_{0}\right) + z_{l}^{plim} \left(- p + p_{min}\right) + z_{u}^{plim} \left(- p + p_{max}\right)\right)\)

a

\(\theta\)

ExtAlgeb

\(- p u\)

v

\(V\)

ExtAlgeb

\(- q u\)

Discretes#

Name

Symbol

Type

Info

qlim

\(qlim\)

SortedLimiter

plim

\(plim\)

SortedLimiter

Config Fields in [Slack]

Option

Symbol

Value

Info

Accepted values

allow_adjust

1

allow adjusting upper or lower limits

(0, 1)

adjust_lower

0

adjust lower limit

(0, 1)

adjust_upper

1

adjust upper limit

(0, 1)

pv2pq

\(z_{pv2pq}\)

0

convert PV to PQ in PFlow at Q limits

(0, 1)

npv2pq

\(n_{pv2pq}\)

0

max. # of conversion each iteration, 0 - auto

>=0

min_iter

\(sw_{iter}\)

2

iteration number starting from which to enable switching

int

err_tol

\(\epsilon_{tol}\)

0.010

iteration error below which to enable switching

float

abs_violation

1

use absolute (1) or relative (0) limit violation

(0, 1)

av2pv

\(z_{av2pv}\)

0

convert Slack to PV in PFlow at P limits

(0, 1)