Skip to content

modelref

Hantao Cui edited this page Feb 23, 2020 · 1 revision

ACLine

Common Parameters: u, name

Available models: Line

Line

Group ACLine

Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

bus1

idx of from bus IdxParam

bus2

idx of to bus IdxParam

Sn

Sn Power rating 100 NumParam non_zero

fn

f rated frequency 60 NumParam

Vn1

Vn1 AC voltage rating 110 NumParam non_zero

Vn2

Vn2 rated voltage of bus2 110 NumParam non_zero

r

r connection line resistance 0 NumParam

x

x connection line reactance 0.000 NumParam

b

shared shunt susceptance 0 NumParam

g

shared shunt conductance 0 NumParam

b1

b1 from-side susceptance 0 NumParam

g1

g1 from-side conductance 0 NumParam

b2

b2 to-side susceptance 0 NumParam

g2

g2 to-side conductance 0 NumParam

trans

transformer branch flag 0 NumParam

tap

tap transformer branch tap ratio 1 NumParam

phi

Ο• transformer branch phase shift in rad 0 NumParam

owner

owner code IdxParam

xcoord

x coordinates DataParam

ycoord

y coordinates DataParam

Variables

Name Symbol Initial Value Description Unit Properties

a1

a1 phase angle of the from bus

a2

a2 phase angle of the to bus

v1

v1 voltage magnitude of the from bus

v2

v2 voltage magnitude of the to bus

Equations

Name Symbol Equation (x'=f or g=0) Type

a1

a1 $u \left(- \frac{v_{1} v_{2} \left(- b_{hk} \sin{\left(\phi - a_{1} + a_{2} \right)} + g_{hk} \cos{\left(\phi - a_{1} + a_{2} \right)}\right)}{t_{ap}} + \frac{v_{1}^{2} \left(g_{h} + g_{hk}\right)}{t_{ap}^{2}}\right)$ ExtAlgeb

a2

a2 $u \left(v_{2}^{2} \left(g_{h} + g_{hk}\right) - \frac{v_{1} v_{2} \left(b_{hk} \sin{\left(\phi - a_{1} + a_{2} \right)} + g_{hk} \cos{\left(\phi - a_{1} + a_{2} \right)}\right)}{t_{ap}}\right)$ ExtAlgeb

v1

v1 $u \left(- \frac{v_{1} v_{2} \left(- b_{hk} \cos{\left(\phi - a_{1} + a_{2} \right)} - g_{hk} \sin{\left(\phi - a_{1} + a_{2} \right)}\right)}{t_{ap}} - \frac{v_{1}^{2} \left(b_{h} + b_{hk}\right)}{t_{ap}^{2}}\right)$ ExtAlgeb

v2

v2 $u \left(- v_{2}^{2} \left(b_{h} + b_{hk}\right) + \frac{v_{1} v_{2} \left(b_{hk} \cos{\left(\phi - a_{1} + a_{2} \right)} - g_{hk} \sin{\left(\phi - a_{1} + a_{2} \right)}\right)}{t_{ap}}\right)$ ExtAlgeb

Services

Name Symbol Equation Type

gh

gh 0.5gβ€…+β€…g1 ConstService

bh

bh 0.5bβ€…+β€…b1 ConstService

gk

gk 0.5gβ€…+β€…g2 ConstService

bk

bk 0.5bβ€…+β€…b2 ConstService

yh

yh u(ibh+gh) ConstService

yk

yk u(ibk+gk) ConstService

yhk

yhk $\frac{u}{r + i x}$ ConstService

ghk

ghk re (yhk) ConstService

bhk

bhk im (yhk) ConstService

ACTopology

Common Parameters: u, name

Common Variables: a, v

Available models: Bus

Bus

Group ACTopology

AC Bus model developed using the symbolic framework Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

Vn

Vn AC voltage rating 110 kV NumParam non_zero

vmax

Vmax Voltage upper limit 1.100 p.u. NumParam

vmin

Vmin Voltage lower limit 0.900 p.u. NumParam

v0

V0 initial voltage magnitude 1 p.u. NumParam non_zero

a0

ΞΈ0 initial voltage phase angle 0 rad NumParam

xcoord

x coordinate (longitude) 0 DataParam

ycoord

y coordinate (latitude) 0 DataParam

area

Area code IdxParam

zone

Zone code IdxParam

owner

Owner code IdxParam

Variables

Name Symbol Initial Value Description Unit Properties

a

ΞΈ ΞΈ0(1βˆ’flatstart)β€…+β€…1.0β€…β‹…β€…10β€…βˆ’β€…8flatstart voltage angle rad v_str

v

V V0(1βˆ’flatstart)β€…+β€…flatstart voltage magnitude p.u. v_str

Equations

Name Symbol Equation (x'=f or g=0) Type

a

ΞΈ 0 Algeb

v

V 0 Algeb

Exciter

Exciter group for synchronous generators.

Common Parameters: u, name

Common Variables: vout

Available models: EXDC2

EXDC2

Group Exciter

EXDC2 model. Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

syn

Synchronous generator idx IdxParam mandatory

TR

TR Sensing time constant 1 p.u. NumParam

TA

TA Lag time constant in anti-windup lag 0.040 p.u. NumParam

TC

TC Lead time constant in lead-lag 1 p.u. NumParam

TB

TB Lag time constant in lead-lag 1 p.u. NumParam

TE

TE Exciter integrator time constant 0.800 p.u. NumParam

TF1

TF1 Feedback washout time constant 1 p.u. NumParam non_zero

KF1

KF1 Feedback washout gain 0.030 p.u. NumParam

KA

KA Gain in anti-windup lag TF 40 p.u. NumParam

KE

KE Gain added to saturation 1 p.u. NumParam

VRMAX

VRMAX Maximum excitation limit 7.300 p.u. NumParam

VRMIN

VRMIN Minimum excitation limit -7.300 p.u. NumParam

E1

E1 First saturation point 0 p.u. NumParam

SE1

SE1 Value at first saturation point 0 p.u. NumParam

E2

E2 Second saturation point 0 p.u. NumParam

SE2

SE2 Value at second saturation point 0 p.u. NumParam

Ae

Ae Gain in saturation 0 p.u. NumParam

Be

Be Exponential coefficient in saturation 0 p.u. NumParam

Sn

Sm Rated power from generator MVA ExtParam

Vn

Vm Rated voltage from generator kV ExtParam

bus

bus Bus idx of the generators ExtParam

Variables

Name Symbol Initial Value Description Unit Properties

vp

Vp vf0 Voltage after saturation feedback, before speed term p.u. v_str

LS_x

xβ€²LS 1.0V State in lag transfer function v_str

LL_x

xβ€²LL Vi State in lead-lag transfer function v_str

LA_x

xβ€²LA KAyLL State in lag transfer function v_str

W_x

xβ€²W Vp State in washout filter v_str

omega

Ο‰ Generator speed

vout

vout vf0 Exciter final output voltage v_str

Se

Se Se0 Saturation output p.u. v_str

vref

Vref Vref0 Reference voltage input p.u. v_str

vi

Vi Vb0 Total input voltages p.u. v_str

LL_y

yLL Vi Output of lead-lag transfer function v_str

W_y

yW 0 Output of washout filter v_str

vf

vf Excitation field voltage to generator

a

ΞΈ Bus voltage phase angle

v

V Bus voltage magnitude

Equations

Name Symbol Equation (x'=f or g=0) Type

vp

Vp $\frac{- K_{E} V_{p} - S_{e} V_{p} + x'_{LA}}{T_{E}}$ State

LS_x

xβ€²LS $\frac{1.0 V - x'_{LS}}{T_{R}}$ State

LL_x

xβ€²LL $\frac{V_{i} - x'_{LL}}{T_{B}}$ State

LA_x

xβ€²LA $\frac{LA_{lim zi} \left(K_{A} y_{LL} - x'_{LA}\right)}{T_{A}}$ State

W_x

xβ€²W $\frac{V_{p} - x'_{W}}{T_{F1}}$ State

omega

Ο‰ 0 ExtState

vout

vout VpΟ‰β€…βˆ’β€…vout Algeb

Se

Se AeeBevoutβ€…βˆ’β€…Se Algeb

vref

Vref Vref0β€…βˆ’β€…Vref Algeb

vi

Vi β€…βˆ’β€…Viβ€…+β€…Vrefβ€…βˆ’β€…xβ€²LSβ€…βˆ’β€…yW Algeb

LL_y

yLL $x'_{LL} - y_{LL} + \frac{T_{C} \left(V_{i} - x'_{LL}\right)}{T_{B}}$ Algeb

W_y

yW (KF1/TF1)W(Vpβˆ’xβ€²W)β€…βˆ’β€…yW Algeb

vf

vf u(βˆ’vf0+vout) ExtAlgeb

a

ΞΈ 0 ExtAlgeb

v

V 0 ExtAlgeb

Services

Name Symbol Equation Type

Se0

Se0 AeeBevf0 ConstService

vr0

Vr0 vf0(KE+Se0) ConstService

vb0

Vb0 $\frac{V_{r0}}{K_{A}}$ ConstService

vref0

Vref0 Vβ€…+β€…Vb0 ConstService

W_KT

(KF1/TF1)W $\frac{K_{F1}}{T_{F1}}$ ConstService

Discrete

Name Symbol Type

LA_lim

limLA AntiWindupLimiter

StaticGen

Static generator group for power flow calculation

Common Parameters: u, name, p0, q0

Common Variables: p, q, a, v

Available models: PV, Slack

PV

Group StaticGen

Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

Sn

Sn Power rating 100 NumParam non_zero

Vn

Vn AC voltage rating 110 NumParam non_zero

bus

the idx of the installed bus IdxParam

busr

the idx of remotely controlled bus IdxParam

p0

p0 active power set point in system base 0 p.u. NumParam

q0

q0 reactive power set point in system base 0 p.u. NumParam

pmax

pmax maximum active power in system base 999 p.u. NumParam

pmin

pmin minimum active power in system base -1 p.u. NumParam

qmax

qmax maximim reactive power in system base 999 p.u. NumParam

qmin

qmin minimum reactive power in system base -999 p.u. NumParam

v0

v0 voltage set point 1 NumParam

vmax

vmax maximum voltage voltage 1.400 NumParam

vmin

vmin minimum allowed voltage 0.600 NumParam

ra

ra armature resistance 0.010 NumParam

xs

xs armature reactance 0.300 NumParam

Variables

Name Symbol Initial Value Description Unit Properties

p

p p0 actual active power generation p.u. v_str

q

q q0 actual reactive power generation p.u. v_str

a

ΞΈ

v

V v0 v_str,v_setter

Equations

Name Symbol Equation (x'=f or g=0) Type

p

p u(βˆ’p+p0) Algeb

q

q u(ziqlim(βˆ’V+v0)+zlqlim(βˆ’q+qmin)+zuqlim(βˆ’q+qmax)) Algeb

a

ΞΈ β€…βˆ’β€…pu ExtAlgeb

v

V β€…βˆ’β€…qu ExtAlgeb

Discrete

Name Symbol Type

qlim

qlim SortedLimiter

Slack

Group StaticGen

Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

Sn

Sn Power rating 100 NumParam non_zero

Vn

Vn AC voltage rating 110 NumParam non_zero

bus

the idx of the installed bus IdxParam

busr

the idx of remotely controlled bus IdxParam

p0

p0 active power set point in system base 0 p.u. NumParam

q0

q0 reactive power set point in system base 0 p.u. NumParam

pmax

pmax maximum active power in system base 999 p.u. NumParam

pmin

pmin minimum active power in system base -1 p.u. NumParam

qmax

qmax maximim reactive power in system base 999 p.u. NumParam

qmin

qmin minimum reactive power in system base -999 p.u. NumParam

v0

v0 voltage set point 1 NumParam

vmax

vmax maximum voltage voltage 1.400 NumParam

vmin

vmin minimum allowed voltage 0.600 NumParam

ra

ra armature resistance 0.010 NumParam

xs

xs armature reactance 0.300 NumParam

a0

ΞΈ0 reference angle set point 0 NumParam

Variables

Name Symbol Initial Value Description Unit Properties

p

p p0 actual active power generation p.u. v_str

q

q q0 actual reactive power generation p.u. v_str

a

ΞΈ ΞΈ0 v_str,v_setter

v

V v0 v_str,v_setter

Equations

Name Symbol Equation (x'=f or g=0) Type

p

p u(ziplim(βˆ’ΞΈ+ΞΈ0)+zlplim(βˆ’p+pmin)+zuplim(βˆ’p+pmax)) Algeb

q

q u(ziqlim(βˆ’V+v0)+zlqlim(βˆ’q+qmin)+zuqlim(βˆ’q+qmax)) Algeb

a

ΞΈ β€…βˆ’β€…pu ExtAlgeb

v

V β€…βˆ’β€…qu ExtAlgeb

Discrete

Name Symbol Type

qlim

qlim SortedLimiter

plim

plim SortedLimiter

StaticLoad

Static load group.

Common Parameters: u, name

Available models: PQ

PQ

Group StaticLoad

Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

bus

linked bus idx IdxParam mandatory

Vn

Vn AC voltage rating 110 kV NumParam non_zero

p0

p0 active power load in system base 0 p.u. NumParam

q0

q0 reactive power load in system base 0 p.u. NumParam

vmax

vmax max voltage before switching to impedance 1.100 NumParam

vmin

vmin min voltage before switching to impedance 0.900 NumParam

owner

owner idx IdxParam

Variables

Name Symbol Initial Value Description Unit Properties

a

ΞΈ

v

V

Equations

Name Symbol Equation (x'=f or g=0) Type

a

ΞΈ $u \left(Req V^{2} p2z + p2p p_{0}\right) \left(t_{dae} > 0\right) + u \left(\frac{V^{2} p_{0} z_{l}^{vcmp}}{v_{min}^{2}} + \frac{V^{2} p_{0} z_{u}^{vcmp}}{v_{max}^{2}} + p_{0} z_{i}^{vcmp}\right) \left(t_{dae} \leq 0\right)$ ExtAlgeb

v

V $u \left(V^{2} Xeq q2z + q2q q_{0}\right) \left(t_{dae} > 0\right) + u \left(\frac{V^{2} q_{0} z_{l}^{vcmp}}{v_{min}^{2}} + \frac{V^{2} q_{0} z_{u}^{vcmp}}{v_{max}^{2}} + q_{0} z_{i}^{vcmp}\right) \left(t_{dae} \leq 0\right)$ ExtAlgeb

Services

Name Symbol Equation Type

Req

Req $\frac{p_{0}}{V_{0}^{2}}$ ConstService

Xeq

Xeq $\frac{q_{0}}{V_{0}^{2}}$ ConstService

Discrete

Name Symbol Type

vcmp

vcmp Limiter

StaticShunt

Static shunt compensator group.

Common Parameters: u, name

Available models: Shunt

Shunt

Group StaticShunt

Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

bus

idx of connected bus IdxParam

Sn

Sn Power rating 100 NumParam non_zero

Vn

Vn AC voltage rating 110 NumParam non_zero

g

g shunt conductance (real part) 0 NumParam y

b

b shunt susceptance (positive as capatance) 0 NumParam y

fn

f rated frequency 60 NumParam

Variables

Name Symbol Initial Value Description Unit Properties

a

ΞΈ

v

V

Equations

Name Symbol Equation (x'=f or g=0) Type

a

ΞΈ V2g ExtAlgeb

v

V β€…βˆ’β€…V2b ExtAlgeb

SynGen

Synchronous generator group.

Common Parameters: u, name, Sn, Vn, fn, bus

Common Variables: omega, delta, tm, vf

Available models: GENCLS, GENROU

GENCLS

Group SynGen

Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

bus

interface bus id IdxParam mandatory

gen

static generator index IdxParam mandatory

coi

center of inertia index IdxParam

Sn

Sn Power rating 100 NumParam

Vn

Vn AC voltage rating 110 NumParam

fn

f rated frequency 60 NumParam

D

D Damping coefficient 0 NumParam power

M

M machine start up time (2H) 6 NumParam non_zero,power

ra

ra armature resistance 0 NumParam z

xl

xl leakage reactance 0 NumParam z

xq

xq q-axis synchronous reactance 1.700 NumParam z

kp

kp active power feedback gain 0 NumParam

kw

kw speed feedback gain 0 NumParam

S10

S1.0 first saturation factor 0 NumParam

S12

S1.2 second saturation factor 1 NumParam non_zero

Variables

Name Symbol Initial Value Description Unit Properties

delta

Ξ΄ Ξ΄0 v_str

omega

Ο‰ u v_str

Id

Id Id0 v_str

Iq

Iq Iq0 v_str

vd

Vd Vd0 v_str

vq

Vq Vq0 v_str

tm

Ο„m Ο„m0 mechanical torque v_str,v_setter

te

Ο„e P0 electric torque v_str,v_setter

vf

vf vf0 v_str,v_setter

psid

ψd ψd0 v_str

psiq

ψq ψq0 v_str

a

ΞΈ Bus voltage phase angle

v

V Bus voltage magnitude

Equations

Name Symbol Equation (x'=f or g=0) Type

delta

Ξ΄ 2Ο€fu(Ο‰βˆ’1) State

omega

Ο‰ $\frac{u \left(- D \left(\omega - 1\right) - \tau_e + \tau_m\right)}{M}$ State

Id

Id Idxqβ€…+β€…Οˆdβ€…βˆ’β€…vf Algeb

Iq

Iq Iqxqβ€…+β€…Οˆq Algeb

vd

Vd Vsin (Ξ΄βˆ’ΞΈ)β€…βˆ’β€…Vd Algeb

vq

Vq Vcos (Ξ΄βˆ’ΞΈ)β€…βˆ’β€…Vq Algeb

tm

Ο„m β€…βˆ’β€…Ο„mβ€…+β€…Ο„m0 Algeb

te

Ο„e β€…βˆ’β€…Idψqβ€…+β€…Iqψdβ€…βˆ’β€…Ο„e Algeb

vf

vf β€…βˆ’β€…vfβ€…+β€…vf0 Algeb

psid

ψd β€…βˆ’β€…Οˆdβ€…+β€…u(Iqra+Vq) Algeb

psiq

ψq ψqβ€…+β€…u(Idra+Vd) Algeb

a

ΞΈ β€…βˆ’β€…u(IdVd+IqVq) ExtAlgeb

v

V β€…βˆ’β€…u(IdVqβˆ’IqVd) ExtAlgeb

Services

Name Symbol Equation Type

_V

Vc VeiΞΈ ConstService

_S

S P0β€…βˆ’β€…iQ0 ConstService

_I

Ic $\frac{S}{\operatorname{conj}{\left(V_{c} \right)}}$ ConstService

_E

E Ic(ra+ixq)β€…+β€…Vc ConstService

_deltac

Ξ΄c $\log{\left(\frac{E}{\operatorname{abs}{\left(E \right)}} \right)}$ ConstService

delta0

Ξ΄0 uim (Ξ΄c) ConstService

vdq

Vdq Vcueβ€…βˆ’β€…Ξ΄cβ€…+β€…0.5iΟ€ ConstService

Idq

Idq Icueβ€…βˆ’β€…Ξ΄cβ€…+β€…0.5iΟ€ ConstService

Id0

Id0 re (Idq) ConstService

Iq0

Iq0 im (Idq) ConstService

vd0

Vd0 re (Vdq) ConstService

vq0

Vq0 im (Vdq) ConstService

tm0

Ο„m0 u(Id0(Id0ra+Vd0)+Iq0(Iq0ra+Vq0)) ConstService

psid0

ψd0 Iq0rauβ€…+β€…Vq0 ConstService

psiq0

ψq0 β€…βˆ’β€…Id0rauβ€…βˆ’β€…Vd0 ConstService

vf0

vf0 Id0xqβ€…+β€…Iq0raβ€…+β€…Vq0 ConstService

GENROU

Group SynGen

Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

bus

interface bus id IdxParam mandatory

gen

static generator index IdxParam mandatory

coi

center of inertia index IdxParam

Sn

Sn Power rating 100 NumParam

Vn

Vn AC voltage rating 110 NumParam

fn

f rated frequency 60 NumParam

D

D Damping coefficient 0 NumParam power

M

M machine start up time (2H) 6 NumParam non_zero,power

ra

ra armature resistance 0 NumParam z

xl

xl leakage reactance 0 NumParam z

xq

xq q-axis synchronous reactance 1.700 NumParam z

kp

kp active power feedback gain 0 NumParam

kw

kw speed feedback gain 0 NumParam

S10

S1.0 first saturation factor 0 NumParam

S12

S1.2 second saturation factor 1 NumParam non_zero

xd

xd d-axis synchronous reactance 1.900 NumParam z

xd1

xβ€²d d-axis transient reactance 0.302 NumParam z

xd2

xβ€²β€²d d-axis sub-transient reactance 0.204 NumParam z

xq1

xβ€²q q-axis transient reactance 0.500 NumParam z

xq2

xβ€²β€²q q-axis sub-transient reactance 0.300 NumParam z

Td10

Tβ€²d0 d-axis transient time constant 8 NumParam

Td20

Tβ€²β€²d0 d-axis sub-transient time constant 0.040 NumParam

Tq10

Tβ€²q0 q-axis transient time constant 0.800 NumParam

Tq20

Tβ€²β€²q0 q-axis sub-transient time constant 0.020 NumParam

Variables

Name Symbol Initial Value Description Unit Properties

delta

Ξ΄ Ξ΄0 v_str

omega

Ο‰ u v_str

e1q

eβ€²q eβ€²q0 v_str

e1d

eβ€²d eβ€²d0 v_str

e2d

eβ€³d eβ€³d0 v_str

e2q

eβ€³q eβ€³q0 v_str

Id

Id Id0 v_str

Iq

Iq Iq0 v_str

vd

Vd Vd0 v_str

vq

Vq Vq0 v_str

tm

Ο„m Ο„m0 mechanical torque v_str,v_setter

te

Ο„e P0 electric torque v_str,v_setter

vf

vf vf0 v_str,v_setter

psid

ψd ψd0 v_str

psiq

ψq ψq0 v_str

psiaq

ψaq ψaq0 q-axis air gap flux v_str

psiad

ψad ψad0 d-axis air gap flux v_str

psia

ψa abs (ψa0, dq) air gap flux magnitude v_str

Se

Se(|ψa|) Se0 saturation output v_str

a

ΞΈ Bus voltage phase angle

v

V Bus voltage magnitude

Equations

Name Symbol Equation (x'=f or g=0) Type

delta

Ξ΄ 2Ο€fu(Ο‰βˆ’1) State

omega

Ο‰ $\frac{u \left(- D \left(\omega - 1\right) - \tau_e + \tau_m\right)}{M}$ State

e1q

eβ€²q $\frac{- S_e(|\psi_{a}|) \psi_{ad} - e'_{q} + v_{f} - \left(- x \prime_d + x_{d}\right) \left(- I_{d} \left(1 - \gamma_{d1}\right) + I_{d} - \gamma_{d2} e''_{d} + \gamma_{d2} e'_{q}\right)}{T \prime_{d0}}$ State

e1d

eβ€²d $\frac{S_e(|\psi_{a}|) \gamma_{qd} \psi_{aq} - e'_{d} + \left(- x \prime_q + x_{q}\right) \left(- I_{q} \left(1 - \gamma_{q1}\right) + I_{q} - \gamma_{q2} e''_{q} - \gamma_{q2} e'_{d}\right)}{T \prime_{q0}}$ State

e2d

eβ€³d $\frac{- I_{d} \left(x \prime_d - x_{l}\right) - e''_{d} + e'_{q}}{T \prime \prime_{d0}}$ State

e2q

eβ€³q $\frac{- I_{q} \left(x \prime_q - x_{l}\right) - e''_{q} - e'_{d}}{T \prime \prime_{q0}}$ State

Id

Id Idxβ€²β€²dβ€…βˆ’β€…Ξ³d1eβ€²qβ€…+β€…Οˆdβ€…βˆ’β€…eβ€³d(1βˆ’Ξ³d1) Algeb

Iq

Iq Iqxβ€²β€²qβ€…+β€…Ξ³q1eβ€²dβ€…+β€…Οˆqβ€…βˆ’β€…eβ€³q(1βˆ’Ξ³q1) Algeb

vd

Vd Vsin (Ξ΄βˆ’ΞΈ)β€…βˆ’β€…Vd Algeb

vq

Vq Vcos (Ξ΄βˆ’ΞΈ)β€…βˆ’β€…Vq Algeb

tm

Ο„m β€…βˆ’β€…Ο„mβ€…+β€…Ο„m0 Algeb

te

Ο„e β€…βˆ’β€…Idψqβ€…+β€…Iqψdβ€…βˆ’β€…Ο„e Algeb

vf

vf β€…βˆ’β€…vfβ€…+β€…vf0 Algeb

psid

ψd β€…βˆ’β€…Οˆdβ€…+β€…u(Iqra+Vq) Algeb

psiq

ψq ψqβ€…+β€…u(Idra+Vd) Algeb

psiaq

ψaq Iqxβ€²β€²qβ€…+β€…Οˆqβ€…βˆ’β€…Οˆaq Algeb

psiad

ψad Ξ³d1eβ€²qβ€…+β€…Ξ³d2eβ€³d(xβ€²dβˆ’xl)β€…βˆ’β€…Οˆad Algeb

psia

ψa $- \psi_{a} + \sqrt{\psi_{ad}^{2} + \psi_{aq}^{2}}$ Algeb

Se

Se(|ψa|) $\frac{S_{B} z_{0}^{Slt} \left(- S_{A} + \psi_{a}\right)^{2}}{\psi_{a}} - S_e(|\psi_{a}|)$ Algeb

a

ΞΈ β€…βˆ’β€…u(IdVd+IqVq) ExtAlgeb

v

V β€…βˆ’β€…u(IdVqβˆ’IqVd) ExtAlgeb

Services

Name Symbol Equation Type

gd1

Ξ³d1 $\frac{x \prime \prime_d - x_{l}}{x \prime_d - x_{l}}$ ConstService

gq1

Ξ³q1 $\frac{x \prime \prime_q - x_{l}}{x \prime_q - x_{l}}$ ConstService

gd2

Ξ³d2 $\frac{- x \prime \prime_d + x \prime_d}{\left(x \prime_d - x_{l}\right)^{2}}$ ConstService

gq2

Ξ³q2 $\frac{- x \prime \prime_q + x \prime_q}{\left(x \prime_q - x_{l}\right)^{2}}$ ConstService

gqd

Ξ³qd $\frac{- x_{l} + x_{q}}{x_{d} - x_{l}}$ ConstService

Sa

Sa $0.912870929175277 \sqrt{\frac{S_{1.0}}{S_{1.2}}}$ ConstService

SA

SA $1.2 + \frac{0.2}{S_{a} - 1}$ ConstService

SB

SB 30.0S1.2(Saβˆ’1)2((Sa>0)+(Sa<0)) ConstService

_V

Vc VeiΞΈ ConstService

_S

S P0β€…βˆ’β€…iQ0 ConstService

_Zs

Zs raβ€…+β€…ixβ€²β€²d ConstService

_It

It $\frac{S}{\operatorname{conj}{\left(V_{c} \right)}}$ ConstService

_Is

Is $I_{t} + \frac{V_{c}}{Z_{s}}$ ConstService

psia0

ψa0 IsZs ConstService

psia0_arg

θψa0 arg (ψa0) ConstService

psia0_abs

|ψa0| abs (ψa0) ConstService

_It_arg

ΞΈIt0 arg (It) ConstService

_psia0_It_arg

θψaIt β€…βˆ’β€…ΞΈIt0β€…+β€…ΞΈΟˆa0 ConstService

Se0

Se0 $\frac{S_{B} \left(- S_{A} + |\psi_{a0}|\right)^{2} \left(|\psi_{a0}| \geq S_{A}\right)}{|\psi_{a0}|}$ ConstService

_a

a Se0Ξ³qd|ψa0|β€…+β€…|ψa0| ConstService

_b

b (xβ€²β€²qβˆ’xq)abs (It) ConstService

delta0

Ξ΄0 $\theta_{\psi a0} + \operatorname{atan}{\left(\frac{b \cos{\left(\theta_{\psi a It} \right)}}{- \theta + b \sin{\left(\theta_{\psi a It} \right)}} \right)}$ ConstService

_Tdq

Tdq β€…βˆ’β€…isin (Ξ΄0)β€…+β€…cos (Ξ΄0) ConstService

psia0_dq

ψa0, dq Tdqψa0 ConstService

It_dq

It, dq conj (ItTdq) ConstService

psiad0

ψad0 re (ψa0, dq) ConstService

psiaq0

ψaq0 im (ψa0, dq) ConstService

Id0

Id0 im (It, dq) ConstService

Iq0

Iq0 re (It, dq) ConstService

vd0

Vd0 β€…βˆ’β€…Id0raβ€…+β€…Iq0xβ€²β€²qβ€…βˆ’β€…Οˆaq0 ConstService

vq0

Vq0 β€…βˆ’β€…Id0xβ€²β€²dβ€…βˆ’β€…Iq0raβ€…+β€…Οˆad0 ConstService

tm0

Ο„m0 u(Id0(Id0ra+Vd0)+Iq0(Iq0ra+Vq0)) ConstService

vf0

vf0 Id0(βˆ’xβ€²β€²d+xβ€²d)β€…+β€…Id0(βˆ’xβ€²d+xd)β€…+β€…Se0ψad0β€…+β€…Οˆad0 ConstService

psid0

ψd0 Iq0rauβ€…+β€…Vq0 ConstService

psiq0

ψq0 β€…βˆ’β€…Id0rauβ€…βˆ’β€…Vd0 ConstService

e1q0

eβ€²q0 Id0Ξ³d1(xβ€²dβˆ’xd)β€…βˆ’β€…Id0Ξ³d2(βˆ’xβ€²d+xd)(xβ€²dβˆ’xl)β€…βˆ’β€…Se0ψad0β€…+β€…vf0 ConstService

e1d0

eβ€²d0 Iq0Ξ³q1(βˆ’xβ€²q+xq)β€…+β€…Iq0Ξ³q2xβ€²q(βˆ’xβ€²q+xq)β€…+β€…Iq0Ξ³q2xl(xβ€²qβˆ’xq)β€…+β€…Se0Ξ³qdψaq0 ConstService

e2d0

eβ€³d0 Id0Ξ³d1(xβ€²dβˆ’xd)β€…βˆ’β€…Id0(xβ€²dβˆ’xl)(βˆ’Ξ³d2xβ€²d+Ξ³d2xd+1)β€…βˆ’β€…Se0ψad0β€…+β€…vf0 ConstService

e2q0

eβ€³q0 Iq0Ξ³q1(xβ€²qβˆ’xq)β€…+β€…Iq0Ξ³q2xβ€²q(xβ€²qβˆ’xq)β€…+β€…Iq0Ξ³q2xl(βˆ’xβ€²q+xq)β€…βˆ’β€…Iq0xβ€²qβ€…+β€…Iq0xlβ€…βˆ’β€…Se0Ξ³qdψaq0 ConstService

Discrete

Name Symbol Type

Slt

Slt LessThan

TurbineGov

Turbine governor group for synchronous generator.

Common Parameters: u, name

Common Variables: pout

Available models: TG2, TGOV1

TG2

Group TurbineGov

Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

syn

Synchronous generator idx IdxParam mandatory

R

R Speed regulation gain under machine base 0.050 p.u. NumParam ipower

wref0

Ο‰ref0 Base speed reference 1 p.u. NumParam

pmax

pmax Maximum power output 999 p.u. NumParam power

pmin

pmin Minimum power output 0 p.u. NumParam power

dbl

Ldb Deadband lower limit -0.000 p.u. NumParam

dbu

Udb Deadband upper limit 0.000 p.u. NumParam

dbc

Cdb Deadband neutral value 0 p.u. NumParam

T1

T1 Transient gain time 0.200 NumParam

T2

T2 Governor time constant 10 NumParam

Sn

Sm Rated power from generator MVA ExtParam

Vn

Vm Rated voltage from generator kV ExtParam

Variables

Name Symbol Initial Value Description Unit Properties

ll_x

xβ€²ll Ο‰dmG State in lead-lag transfer function v_str

omega

Ο‰ Generator speed p.u.

pout

Pout Ο„m0 Turbine final output power v_str

wref

Ο‰ref Ο‰ref0 Speed reference variable v_str

w_d

Ο‰dev 0 Generator speed deviation before dead band (positive for under speed) v_str

w_dm

Ο‰dm 0 Measured speed deviation after dead band v_str

w_dmg

Ο‰dmG 0 Speed deviation after dead band after gain v_str

ll_y

yll Ο‰dmG Output of lead-lag transfer function v_str

pnl

Pnl Ο„m0 Power output before hard limiter v_str

tm

Ο„m Mechanical power to generator

Equations

Name Symbol Equation (x'=f or g=0) Type

ll_x

xβ€²ll $\frac{\omega_{dmG} - x'_{ll}}{T_{2}}$ State

omega

Ο‰ 0 ExtState

pout

Pout Pnlziplimβ€…βˆ’β€…Poutβ€…+β€…pmaxzuplimβ€…+β€…pminzlplim Algeb

wref

Ο‰ref Ο‰ref0β€…βˆ’β€…Ο‰ref Algeb

w_d

Ο‰dev β€…βˆ’β€…Ο‰β€…βˆ’β€…Ο‰devβ€…+β€…Ο‰ref Algeb

w_dm

Ο‰dm Ldbzlrwdbβ€…+β€…Udbzurwdbβ€…+β€…Ο‰dev(1βˆ’ziwdb)β€…βˆ’β€…Ο‰dm Algeb

w_dmg

Ο‰dmG GΟ‰dmβ€…βˆ’β€…Ο‰dmG Algeb

ll_y

yll $\frac{T_{1} \left(\omega_{dmG} - x'_{ll}\right)}{T_{2}} + x'_{ll} - y_{ll}$ Algeb

pnl

Pnl β€…βˆ’β€…Pnlβ€…+β€…Ο„m0β€…+β€…yll Algeb

tm

Ο„m u(Poutβˆ’Ο„m0) ExtAlgeb

Services

Name Symbol Equation Type

gain

G $\frac{u}{R}$ ConstService

Discrete

Name Symbol Type

w_db

wdb DeadBand

plim

plim HardLimiter

TGOV1

Group TurbineGov

TGOV1 model. Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

syn

Synchronous generator idx IdxParam mandatory

R

R Speed regulation gain under machine base 0.050 p.u. NumParam ipower

wref0

Ο‰ref0 Base speed reference 1 p.u. NumParam

VMAX

Vmax Maximum valve position 1.200 p.u. NumParam power

VMIN

Vmin Minimum valve position 0 p.u. NumParam power

T1

T1 Valve time constant 0.100 NumParam

T2

T2 Lead-lag lead time constant 0.200 NumParam

T3

T3 Lead-lag lag time constant 10 NumParam

Dt

Dt Turbine damping coefficient 0 NumParam power

Sn

Sm Rated power from generator MVA ExtParam

Vn

Vm Rated voltage from generator kV ExtParam

Variables

Name Symbol Initial Value Description Unit Properties

LAG_x

xβ€²LAG Pd State in lag transfer function v_str

LL_x

xβ€²LL xβ€²LAG State in lead-lag transfer function v_str

omega

Ο‰ Generator speed p.u.

pout

Pout Ο„m0 Turbine final output power v_str

wref

Ο‰ref Ο‰ref0 Speed reference variable v_str

pref

Pref RΟ„m0 Reference power input v_str

wd

Ο‰dev 0 Generator under speed p.u. v_str

pd

Pd Ο„m0 Pref plus under speed times gain p.u. v_str

LL_y

yLL xβ€²LAG Lead-lag Output v_str

tm

Ο„m Mechanical power to generator

Equations

Name Symbol Equation (x'=f or g=0) Type

LAG_x

xβ€²LAG $\frac{LAG_{lim zi} \left(P_{d} - x'_{LAG}\right)}{T_{1}}$ State

LL_x

xβ€²LL $\frac{x'_{LAG} - x'_{LL}}{T_{3}}$ State

omega

Ο‰ 0 ExtState

pout

Pout DtΟ‰devβ€…βˆ’β€…Poutβ€…+β€…yLL Algeb

wref

Ο‰ref Ο‰ref0β€…βˆ’β€…Ο‰ref Algeb

pref

Pref β€…βˆ’β€…Prefβ€…+β€…RΟ„m0 Algeb

wd

Ο‰dev β€…βˆ’β€…Ο‰β€…βˆ’β€…Ο‰devβ€…+β€…Ο‰ref Algeb

pd

Pd G(Pref+Ο‰dev)β€…βˆ’β€…Pd Algeb

LL_y

yLL $\frac{T_{2} \left(x'_{LAG} - x'_{LL}\right)}{T_{3}} + x'_{LL} - y_{LL}$ Algeb

tm

Ο„m u(Poutβˆ’Ο„m0) ExtAlgeb

Services

Name Symbol Equation Type

gain

G $\frac{u}{R}$ ConstService

Discrete

Name Symbol Type

LAG_lim

limlag AntiWindupLimiter

Undefined

Common Parameters: u, name

Available models: Area, Toggler, PI2

Area

Group Undefined

Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

Bus

RefParam

ACTopology

RefParam

Vn

ExtParam

Variables

Name Symbol Initial Value Description Unit Properties

a

a

v

v

Equations

Name Symbol Equation (x'=f or g=0) Type

a

a 0 ExtAlgeb

v

v 0 ExtAlgeb

Toggler

Group Undefined

Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

model

Model or Group of the device with this timer DataParam mandatory

dev

Idx of the device with this timer IdxParam mandatory

t

switch time for connection status -1 TimerParam mandatory

PI2

Group Undefined

Parameters

Name Symbol Description Default Unit Type Properties

u

u connection status 1 bool NumParam

name

name device name DataParam

Kp

NumParam

Ki

NumParam

Wmax

NumParam

Wmin

NumParam

Variables

Name Symbol Initial Value Description Unit Properties

uin

uin 0 v_str

x

x 0.05 v_str

y

y 0.05 v_str

w

w 0.05 v_str

Equations

Name Symbol Equation (x'=f or g=0) Type

uin

uin $\begin{cases} 0 & \text{for}\: t_{dae} \leq 0 \\1 & \text{for}\: t_{dae} \leq 2 \\-1 & \text{for}\: t_{dae} < 6 \\1 & \text{otherwise} \end{cases}$ State

x

x KiuinziHL State

y

y Kpuinβ€…+β€…xβ€…βˆ’β€…y Algeb

w

w WmaxzuHLβ€…+β€…WminzlHLβ€…βˆ’β€…wβ€…+β€…yziHL Algeb

Discrete

Name Symbol Type

HL

HL HardLimiter
Clone this wiki locally